@@ -19,16 +19,16 @@ const (
19
19
blockchainServiceEndpoint = "https://api.developer.coinbase.com/waas/blockchain"
20
20
)
21
21
22
- // BlockchainServiceClient is the client to use to access WaaS BlockchainService APIs.
23
- type BlockchainServiceClient struct {
22
+ // blockchainServiceClient is the client to use to access WaaS BlockchainService APIs.
23
+ type blockchainServiceClient struct {
24
24
client * innerClient.BlockchainClient
25
25
}
26
26
27
27
// NewBlockchainServiceClient returns a BlockchainServiceClient based on the given inputs.
28
28
func NewBlockchainServiceClient (
29
29
ctx context.Context ,
30
30
waasOpts ... clients.WaaSClientOption ,
31
- ) (* BlockchainServiceClient , error ) {
31
+ ) (BlockchainServiceClient , error ) {
32
32
config , err := clients .GetConfig (blockchainServiceName , blockchainServiceEndpoint , waasOpts ... )
33
33
if err != nil {
34
34
return nil , err
@@ -44,27 +44,27 @@ func NewBlockchainServiceClient(
44
44
return nil , err
45
45
}
46
46
47
- return & BlockchainServiceClient {
47
+ return & blockchainServiceClient {
48
48
client : innerClient ,
49
49
}, nil
50
50
}
51
51
52
52
// Close closes the connection to the API service. The user should invoke this when
53
53
// the client is no longer required.
54
- func (p * BlockchainServiceClient ) Close () error {
55
- return p .client .Close ()
54
+ func (b * blockchainServiceClient ) Close () error {
55
+ return b .client .Close ()
56
56
}
57
57
58
58
// Connection returns a connection to the API service.
59
59
//
60
60
// Deprecated: Connections are now pooled so this method does not always
61
61
// return the same resource.
62
- func (p * BlockchainServiceClient ) Connection () * grpc.ClientConn {
63
- return p .client .Connection ()
62
+ func (b * blockchainServiceClient ) Connection () * grpc.ClientConn {
63
+ return b .client .Connection ()
64
64
}
65
65
66
66
// GetNetwork gets a Network.
67
- func (b * BlockchainServiceClient ) GetNetwork (
67
+ func (b * blockchainServiceClient ) GetNetwork (
68
68
ctx context.Context ,
69
69
req * blockchainpb.GetNetworkRequest ,
70
70
opts ... gax.CallOption ) (* blockchainpb.Network , error ) {
@@ -118,15 +118,15 @@ func (n *networkIteratorImpl) Response() *blockchainpb.ListNetworksResponse {
118
118
}
119
119
120
120
// ListNetworks lists the Networks supported by WaaS APIs.
121
- func (b * BlockchainServiceClient ) ListNetworks (
121
+ func (b * blockchainServiceClient ) ListNetworks (
122
122
ctx context.Context ,
123
123
req * blockchainpb.ListNetworksRequest ,
124
124
opts ... gax.CallOption ) NetworkIterator {
125
125
return & networkIteratorImpl {iter : b .client .ListNetworks (ctx , req , opts ... )}
126
126
}
127
127
128
128
// GetAsset retrieves an Asset by resource name.
129
- func (b * BlockchainServiceClient ) GetAsset (
129
+ func (b * blockchainServiceClient ) GetAsset (
130
130
ctx context.Context ,
131
131
req * blockchainpb.GetAssetRequest ,
132
132
opts ... gax.CallOption ) (* blockchainpb.Asset , error ) {
@@ -155,40 +155,40 @@ type assetIteratorImpl struct {
155
155
}
156
156
157
157
// PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
158
- func (n * assetIteratorImpl ) PageInfo () * iterator.PageInfo {
159
- return n .iter .PageInfo ()
158
+ func (a * assetIteratorImpl ) PageInfo () * iterator.PageInfo {
159
+ return a .iter .PageInfo ()
160
160
}
161
161
162
162
// Next returns the next result. Its second return value is iterator.Done if there are no more
163
163
// results. Once Next returns Done, all subsequent calls will return Done.
164
- func (n * assetIteratorImpl ) Next () (* blockchainpb.Asset , error ) {
165
- asset , err := n .iter .Next ()
164
+ func (a * assetIteratorImpl ) Next () (* blockchainpb.Asset , error ) {
165
+ asset , err := a .iter .Next ()
166
166
167
167
return asset , clients .UnwrapError (err )
168
168
}
169
169
170
170
// Response is the raw response for the current page.
171
171
// Calling Next() or InternalFetch() updates this value.
172
- func (n * assetIteratorImpl ) Response () * blockchainpb.ListAssetsResponse {
173
- if n .iter .Response == nil {
172
+ func (a * assetIteratorImpl ) Response () * blockchainpb.ListAssetsResponse {
173
+ if a .iter .Response == nil {
174
174
return nil
175
175
}
176
176
177
- response := n .iter .Response .(* blockchainpb.ListAssetsResponse )
177
+ response := a .iter .Response .(* blockchainpb.ListAssetsResponse )
178
178
179
179
return response
180
180
}
181
181
182
182
// ListAssets lists the Assets supported by WaaS APIs.
183
- func (b * BlockchainServiceClient ) ListAssets (
183
+ func (b * blockchainServiceClient ) ListAssets (
184
184
ctx context.Context ,
185
185
req * blockchainpb.ListAssetsRequest ,
186
186
opts ... gax.CallOption ) AssetIterator {
187
187
return & assetIteratorImpl {b .client .ListAssets (ctx , req , opts ... )}
188
188
}
189
189
190
190
// BatchGetAssets returns the list of Assets indicated by the given request.
191
- func (b * BlockchainServiceClient ) BatchGetAssets (
191
+ func (b * blockchainServiceClient ) BatchGetAssets (
192
192
ctx context.Context ,
193
193
req * blockchainpb.BatchGetAssetsRequest ,
194
194
opts ... gax.CallOption ) (* blockchainpb.BatchGetAssetsResponse , error ) {
0 commit comments