Documentation ¶
Index ¶
- Variables
- func RegisterWalletServiceServer(s grpc.ServiceRegistrar, srv WalletServiceServer)
- type Account
- type GetAccountRequest
- func (*GetAccountRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountRequest) GetAccountId() string
- func (x *GetAccountRequest) GetUserId() string
- func (*GetAccountRequest) ProtoMessage()
- func (x *GetAccountRequest) ProtoReflect() protoreflect.Message
- func (x *GetAccountRequest) Reset()
- func (x *GetAccountRequest) String() string
- type GetAccountResponse
- func (*GetAccountResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountResponse) GetAccount() *Account
- func (*GetAccountResponse) ProtoMessage()
- func (x *GetAccountResponse) ProtoReflect() protoreflect.Message
- func (x *GetAccountResponse) Reset()
- func (x *GetAccountResponse) String() string
- type TransferRequest
- func (*TransferRequest) Descriptor() ([]byte, []int)deprecated
- func (x *TransferRequest) GetAmount() uint64
- func (x *TransferRequest) GetFromAccountId() string
- func (x *TransferRequest) GetOperationId() string
- func (x *TransferRequest) GetToAccountId() string
- func (*TransferRequest) ProtoMessage()
- func (x *TransferRequest) ProtoReflect() protoreflect.Message
- func (x *TransferRequest) Reset()
- func (x *TransferRequest) String() string
- type TransferResponse
- type UnimplementedWalletServiceServer
- type UnsafeWalletServiceServer
- type WalletServiceClient
- type WalletServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_basket_wallet_service_v1_wallet_proto protoreflect.FileDescriptor
var WalletService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "basket.wallet_service.v1.WalletService", HandlerType: (*WalletServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Transfer", Handler: _WalletService_Transfer_Handler, }, { MethodName: "GetAccount", Handler: _WalletService_GetAccount_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "basket/wallet-service/v1/wallet.proto", }
WalletService_ServiceDesc is the grpc.ServiceDesc for WalletService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterWalletServiceServer ¶
func RegisterWalletServiceServer(s grpc.ServiceRegistrar, srv WalletServiceServer)
Types ¶
type Account ¶
type Account struct { AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` Balance uint64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"` // contains filtered or unexported fields }
func (*Account) Descriptor
deprecated
func (*Account) GetAccountId ¶
func (*Account) GetBalance ¶
func (*Account) ProtoMessage ¶
func (*Account) ProtoMessage()
func (*Account) ProtoReflect ¶
func (x *Account) ProtoReflect() protoreflect.Message
type GetAccountRequest ¶
type GetAccountRequest struct { AccountId string `protobuf:"bytes,1,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetAccountRequest) Descriptor
deprecated
func (*GetAccountRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead.
func (*GetAccountRequest) GetAccountId ¶
func (x *GetAccountRequest) GetAccountId() string
func (*GetAccountRequest) GetUserId ¶ added in v0.2.172
func (x *GetAccountRequest) GetUserId() string
func (*GetAccountRequest) ProtoMessage ¶
func (*GetAccountRequest) ProtoMessage()
func (*GetAccountRequest) ProtoReflect ¶
func (x *GetAccountRequest) ProtoReflect() protoreflect.Message
func (*GetAccountRequest) Reset ¶
func (x *GetAccountRequest) Reset()
func (*GetAccountRequest) String ¶
func (x *GetAccountRequest) String() string
type GetAccountResponse ¶
type GetAccountResponse struct { Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*GetAccountResponse) Descriptor
deprecated
func (*GetAccountResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountResponse.ProtoReflect.Descriptor instead.
func (*GetAccountResponse) GetAccount ¶
func (x *GetAccountResponse) GetAccount() *Account
func (*GetAccountResponse) ProtoMessage ¶
func (*GetAccountResponse) ProtoMessage()
func (*GetAccountResponse) ProtoReflect ¶
func (x *GetAccountResponse) ProtoReflect() protoreflect.Message
func (*GetAccountResponse) Reset ¶
func (x *GetAccountResponse) Reset()
func (*GetAccountResponse) String ¶
func (x *GetAccountResponse) String() string
type TransferRequest ¶
type TransferRequest struct { OperationId string `protobuf:"bytes,1,opt,name=operation_id,json=operationId,proto3" json:"operation_id,omitempty"` // unique operation id for deduplication FromAccountId string `protobuf:"bytes,2,opt,name=from_account_id,json=fromAccountId,proto3" json:"from_account_id,omitempty"` ToAccountId string `protobuf:"bytes,3,opt,name=to_account_id,json=toAccountId,proto3" json:"to_account_id,omitempty"` Amount uint64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"` // contains filtered or unexported fields }
func (*TransferRequest) Descriptor
deprecated
func (*TransferRequest) Descriptor() ([]byte, []int)
Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead.
func (*TransferRequest) GetAmount ¶
func (x *TransferRequest) GetAmount() uint64
func (*TransferRequest) GetFromAccountId ¶
func (x *TransferRequest) GetFromAccountId() string
func (*TransferRequest) GetOperationId ¶ added in v0.2.170
func (x *TransferRequest) GetOperationId() string
func (*TransferRequest) GetToAccountId ¶
func (x *TransferRequest) GetToAccountId() string
func (*TransferRequest) ProtoMessage ¶
func (*TransferRequest) ProtoMessage()
func (*TransferRequest) ProtoReflect ¶
func (x *TransferRequest) ProtoReflect() protoreflect.Message
func (*TransferRequest) Reset ¶
func (x *TransferRequest) Reset()
func (*TransferRequest) String ¶
func (x *TransferRequest) String() string
type TransferResponse ¶
type TransferResponse struct {
// contains filtered or unexported fields
}
func (*TransferResponse) Descriptor
deprecated
func (*TransferResponse) Descriptor() ([]byte, []int)
Deprecated: Use TransferResponse.ProtoReflect.Descriptor instead.
func (*TransferResponse) ProtoMessage ¶
func (*TransferResponse) ProtoMessage()
func (*TransferResponse) ProtoReflect ¶
func (x *TransferResponse) ProtoReflect() protoreflect.Message
func (*TransferResponse) Reset ¶
func (x *TransferResponse) Reset()
func (*TransferResponse) String ¶
func (x *TransferResponse) String() string
type UnimplementedWalletServiceServer ¶
type UnimplementedWalletServiceServer struct { }
UnimplementedWalletServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedWalletServiceServer) GetAccount ¶
func (UnimplementedWalletServiceServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
func (UnimplementedWalletServiceServer) Transfer ¶
func (UnimplementedWalletServiceServer) Transfer(context.Context, *TransferRequest) (*TransferResponse, error)
type UnsafeWalletServiceServer ¶
type UnsafeWalletServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWalletServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WalletServiceServer will result in compilation errors.
type WalletServiceClient ¶
type WalletServiceClient interface { Transfer(ctx context.Context, in *TransferRequest, opts ...grpc.CallOption) (*TransferResponse, error) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) }
WalletServiceClient is the client API for WalletService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewWalletServiceClient ¶
func NewWalletServiceClient(cc grpc.ClientConnInterface) WalletServiceClient
type WalletServiceServer ¶
type WalletServiceServer interface { Transfer(context.Context, *TransferRequest) (*TransferResponse, error) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) // contains filtered or unexported methods }
WalletServiceServer is the server API for WalletService service. All implementations must embed UnimplementedWalletServiceServer for forward compatibility