v1

package
v0.2.184 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 2, 2024 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_basket_wallet_service_v1_wallet_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Account.ProtoReflect.Descriptor instead.

func (*Account) GetAccountId

func (x *Account) GetAccountId() string

func (*Account) GetBalance

func (x *Account) GetBalance() uint64

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) ProtoReflect

func (x *Account) ProtoReflect() protoreflect.Message

func (*Account) Reset

func (x *Account) Reset()

func (*Account) String

func (x *Account) String() string

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) Transfer

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.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL