-
Notifications
You must be signed in to change notification settings - Fork 66
/
channel.go
126 lines (102 loc) · 3.23 KB
/
channel.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
package hedera
/*-
*
* Hedera Go SDK
*
* Copyright (C) 2020 - 2024 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
import (
"github.com/hashgraph/hedera-sdk-go/v2/proto/services"
"google.golang.org/grpc"
)
type _Channel struct {
crypto services.CryptoServiceClient
file services.FileServiceClient
contract services.SmartContractServiceClient
topic services.ConsensusServiceClient
freeze services.FreezeServiceClient
network services.NetworkServiceClient
token services.TokenServiceClient
schedule services.ScheduleServiceClient
util services.UtilServiceClient
addressBook services.AddressBookServiceClient
client *grpc.ClientConn
}
func _NewChannel(client *grpc.ClientConn) _Channel {
return _Channel{
client: client,
}
}
func (channel _Channel) _GetCrypto() services.CryptoServiceClient {
if channel.crypto == nil {
channel.crypto = services.NewCryptoServiceClient(channel.client)
}
return channel.crypto
}
func (channel _Channel) _GetFile() services.FileServiceClient {
if channel.file == nil {
channel.file = services.NewFileServiceClient(channel.client)
}
return channel.file
}
func (channel _Channel) _GetContract() services.SmartContractServiceClient {
if channel.contract == nil {
channel.contract = services.NewSmartContractServiceClient(channel.client)
}
return channel.contract
}
func (channel _Channel) _GetTopic() services.ConsensusServiceClient {
if channel.topic == nil {
channel.topic = services.NewConsensusServiceClient(channel.client)
}
return channel.topic
}
func (channel _Channel) _GetFreeze() services.FreezeServiceClient {
if channel.freeze == nil {
channel.freeze = services.NewFreezeServiceClient(channel.client)
}
return channel.freeze
}
func (channel _Channel) _GetNetwork() services.NetworkServiceClient {
if channel.network == nil {
channel.network = services.NewNetworkServiceClient(channel.client)
}
return channel.network
}
func (channel _Channel) _GetToken() services.TokenServiceClient {
if channel.token == nil {
channel.token = services.NewTokenServiceClient(channel.client)
}
return channel.token
}
func (channel _Channel) _GetSchedule() services.ScheduleServiceClient {
if channel.schedule == nil {
channel.schedule = services.NewScheduleServiceClient(channel.client)
}
return channel.schedule
}
func (channel _Channel) _GetUtil() services.UtilServiceClient {
if channel.util == nil {
channel.util = services.NewUtilServiceClient(channel.client)
}
return channel.util
}
func (channel _Channel) _GetAddressBook() services.AddressBookServiceClient {
if channel.addressBook == nil {
channel.addressBook = services.NewAddressBookServiceClient(channel.client)
}
return channel.addressBook
}