github.com/cloudwan/edgelq-sdk@v1.15.4/iam/client/v1/service_account/service_account_service.pb.client.go (about) 1 // Code generated by protoc-gen-goten-client 2 // API: ServiceAccountService 3 // DO NOT EDIT!!! 4 5 package service_account_client 6 7 import ( 8 "context" 9 10 "google.golang.org/grpc" 11 "google.golang.org/protobuf/runtime/protoimpl" 12 ) 13 14 // proto imports 15 import ( 16 service_account "github.com/cloudwan/edgelq-sdk/iam/resources/v1/service_account" 17 emptypb "google.golang.org/protobuf/types/known/emptypb" 18 ) 19 20 // Reference imports to suppress errors if they are not otherwise used. 21 var ( 22 _ = protoimpl.DescBuilder{} 23 _ = new(context.Context) 24 _ = grpc.ClientConn{} 25 ) 26 27 // make sure we're using proto imports 28 var ( 29 _ = &service_account.ServiceAccount{} 30 _ = &emptypb.Empty{} 31 ) 32 33 // This is a compile-time assertion to ensure that this generated file 34 // is compatible with the proto package it is being compiled against. 35 // A compilation error at this line likely means your copy of the 36 // proto package needs to be updated. 37 const ( 38 // Verify that this generated code is sufficiently up-to-date. 39 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 40 // Verify that runtime/protoimpl is sufficiently up-to-date. 41 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 42 ) 43 44 // This is a compile-time assertion to ensure that this generated file 45 // is compatible with the grpc package it is being compiled against. 46 const _ = grpc.SupportPackageIsVersion6 47 48 // ServiceAccountServiceClient is the client API for ServiceAccountService. 49 // 50 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 51 type ServiceAccountServiceClient interface { 52 GetServiceAccount(ctx context.Context, in *GetServiceAccountRequest, opts ...grpc.CallOption) (*service_account.ServiceAccount, error) 53 BatchGetServiceAccounts(ctx context.Context, in *BatchGetServiceAccountsRequest, opts ...grpc.CallOption) (*BatchGetServiceAccountsResponse, error) 54 ListServiceAccounts(ctx context.Context, in *ListServiceAccountsRequest, opts ...grpc.CallOption) (*ListServiceAccountsResponse, error) 55 WatchServiceAccount(ctx context.Context, in *WatchServiceAccountRequest, opts ...grpc.CallOption) (WatchServiceAccountClientStream, error) 56 WatchServiceAccounts(ctx context.Context, in *WatchServiceAccountsRequest, opts ...grpc.CallOption) (WatchServiceAccountsClientStream, error) 57 CreateServiceAccount(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*service_account.ServiceAccount, error) 58 UpdateServiceAccount(ctx context.Context, in *UpdateServiceAccountRequest, opts ...grpc.CallOption) (*service_account.ServiceAccount, error) 59 DeleteServiceAccount(ctx context.Context, in *DeleteServiceAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) 60 GetMyAgentShard(ctx context.Context, in *GetMyAgentShardRequest, opts ...grpc.CallOption) (*GetMyAgentShardResponse, error) 61 GetShardEndpoints(ctx context.Context, in *GetShardEndpointsRequest, opts ...grpc.CallOption) (*GetShardEndpointsResponse, error) 62 } 63 64 type client struct { 65 cc grpc.ClientConnInterface 66 } 67 68 func NewServiceAccountServiceClient(cc grpc.ClientConnInterface) ServiceAccountServiceClient { 69 return &client{cc} 70 } 71 72 func (c *client) GetServiceAccount(ctx context.Context, in *GetServiceAccountRequest, opts ...grpc.CallOption) (*service_account.ServiceAccount, error) { 73 out := new(service_account.ServiceAccount) 74 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/GetServiceAccount", in, out, opts...) 75 if err != nil { 76 return nil, err 77 } 78 return out, nil 79 } 80 81 func (c *client) BatchGetServiceAccounts(ctx context.Context, in *BatchGetServiceAccountsRequest, opts ...grpc.CallOption) (*BatchGetServiceAccountsResponse, error) { 82 out := new(BatchGetServiceAccountsResponse) 83 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/BatchGetServiceAccounts", in, out, opts...) 84 if err != nil { 85 return nil, err 86 } 87 return out, nil 88 } 89 90 func (c *client) ListServiceAccounts(ctx context.Context, in *ListServiceAccountsRequest, opts ...grpc.CallOption) (*ListServiceAccountsResponse, error) { 91 out := new(ListServiceAccountsResponse) 92 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/ListServiceAccounts", in, out, opts...) 93 if err != nil { 94 return nil, err 95 } 96 return out, nil 97 } 98 99 func (c *client) WatchServiceAccount(ctx context.Context, in *WatchServiceAccountRequest, opts ...grpc.CallOption) (WatchServiceAccountClientStream, error) { 100 stream, err := c.cc.NewStream(ctx, 101 &grpc.StreamDesc{ 102 StreamName: "WatchServiceAccount", 103 ServerStreams: true, 104 }, 105 "/ntt.iam.v1.ServiceAccountService/WatchServiceAccount", opts...) 106 if err != nil { 107 return nil, err 108 } 109 x := &watchServiceAccountWatchServiceAccountClient{stream} 110 if err := x.ClientStream.SendMsg(in); err != nil { 111 return nil, err 112 } 113 if err := x.ClientStream.CloseSend(); err != nil { 114 return nil, err 115 } 116 return x, nil 117 } 118 119 type WatchServiceAccountClientStream interface { 120 Recv() (*WatchServiceAccountResponse, error) 121 grpc.ClientStream 122 } 123 124 type watchServiceAccountWatchServiceAccountClient struct { 125 grpc.ClientStream 126 } 127 128 func (x *watchServiceAccountWatchServiceAccountClient) Recv() (*WatchServiceAccountResponse, error) { 129 m := new(WatchServiceAccountResponse) 130 if err := x.ClientStream.RecvMsg(m); err != nil { 131 return nil, err 132 } 133 return m, nil 134 } 135 136 func (c *client) WatchServiceAccounts(ctx context.Context, in *WatchServiceAccountsRequest, opts ...grpc.CallOption) (WatchServiceAccountsClientStream, error) { 137 stream, err := c.cc.NewStream(ctx, 138 &grpc.StreamDesc{ 139 StreamName: "WatchServiceAccounts", 140 ServerStreams: true, 141 }, 142 "/ntt.iam.v1.ServiceAccountService/WatchServiceAccounts", opts...) 143 if err != nil { 144 return nil, err 145 } 146 x := &watchServiceAccountsWatchServiceAccountsClient{stream} 147 if err := x.ClientStream.SendMsg(in); err != nil { 148 return nil, err 149 } 150 if err := x.ClientStream.CloseSend(); err != nil { 151 return nil, err 152 } 153 return x, nil 154 } 155 156 type WatchServiceAccountsClientStream interface { 157 Recv() (*WatchServiceAccountsResponse, error) 158 grpc.ClientStream 159 } 160 161 type watchServiceAccountsWatchServiceAccountsClient struct { 162 grpc.ClientStream 163 } 164 165 func (x *watchServiceAccountsWatchServiceAccountsClient) Recv() (*WatchServiceAccountsResponse, error) { 166 m := new(WatchServiceAccountsResponse) 167 if err := x.ClientStream.RecvMsg(m); err != nil { 168 return nil, err 169 } 170 return m, nil 171 } 172 173 func (c *client) CreateServiceAccount(ctx context.Context, in *CreateServiceAccountRequest, opts ...grpc.CallOption) (*service_account.ServiceAccount, error) { 174 out := new(service_account.ServiceAccount) 175 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/CreateServiceAccount", in, out, opts...) 176 if err != nil { 177 return nil, err 178 } 179 return out, nil 180 } 181 182 func (c *client) UpdateServiceAccount(ctx context.Context, in *UpdateServiceAccountRequest, opts ...grpc.CallOption) (*service_account.ServiceAccount, error) { 183 out := new(service_account.ServiceAccount) 184 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/UpdateServiceAccount", in, out, opts...) 185 if err != nil { 186 return nil, err 187 } 188 return out, nil 189 } 190 191 func (c *client) DeleteServiceAccount(ctx context.Context, in *DeleteServiceAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { 192 out := new(emptypb.Empty) 193 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/DeleteServiceAccount", in, out, opts...) 194 if err != nil { 195 return nil, err 196 } 197 return out, nil 198 } 199 200 func (c *client) GetMyAgentShard(ctx context.Context, in *GetMyAgentShardRequest, opts ...grpc.CallOption) (*GetMyAgentShardResponse, error) { 201 out := new(GetMyAgentShardResponse) 202 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/GetMyAgentShard", in, out, opts...) 203 if err != nil { 204 return nil, err 205 } 206 return out, nil 207 } 208 209 func (c *client) GetShardEndpoints(ctx context.Context, in *GetShardEndpointsRequest, opts ...grpc.CallOption) (*GetShardEndpointsResponse, error) { 210 out := new(GetShardEndpointsResponse) 211 err := c.cc.Invoke(ctx, "/ntt.iam.v1.ServiceAccountService/GetShardEndpoints", in, out, opts...) 212 if err != nil { 213 return nil, err 214 } 215 return out, nil 216 }