proto

package
v0.0.0-...-b36981d Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

README

protoc --proto_path=. --go_out=plugins=grpc:. ./pkg/wallet/proto/*.proto

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWalletServiceServer

func RegisterWalletServiceServer(s *grpc.Server, srv WalletServiceServer)

Types

type GetWalletResponse

type GetWalletResponse struct {
	Data                 *Wallet  `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetWalletResponse) Descriptor

func (*GetWalletResponse) Descriptor() ([]byte, []int)

func (*GetWalletResponse) GetData

func (m *GetWalletResponse) GetData() *Wallet

func (*GetWalletResponse) ProtoMessage

func (*GetWalletResponse) ProtoMessage()

func (*GetWalletResponse) Reset

func (m *GetWalletResponse) Reset()

func (*GetWalletResponse) String

func (m *GetWalletResponse) String() string

func (*GetWalletResponse) XXX_DiscardUnknown

func (m *GetWalletResponse) XXX_DiscardUnknown()

func (*GetWalletResponse) XXX_Marshal

func (m *GetWalletResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetWalletResponse) XXX_Merge

func (dst *GetWalletResponse) XXX_Merge(src proto.Message)

func (*GetWalletResponse) XXX_Size

func (m *GetWalletResponse) XXX_Size() int

func (*GetWalletResponse) XXX_Unmarshal

func (m *GetWalletResponse) XXX_Unmarshal(b []byte) error

type Wallet

type Wallet struct {
	Id                   int64                `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Amount               int64                `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	UpdatedAt            *timestamp.Timestamp `protobuf:"bytes,3,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func (*Wallet) Descriptor

func (*Wallet) Descriptor() ([]byte, []int)

func (*Wallet) GetAmount

func (m *Wallet) GetAmount() int64

func (*Wallet) GetId

func (m *Wallet) GetId() int64

func (*Wallet) GetUpdatedAt

func (m *Wallet) GetUpdatedAt() *timestamp.Timestamp

func (*Wallet) ProtoMessage

func (*Wallet) ProtoMessage()

func (*Wallet) Reset

func (m *Wallet) Reset()

func (*Wallet) String

func (m *Wallet) String() string

func (*Wallet) XXX_DiscardUnknown

func (m *Wallet) XXX_DiscardUnknown()

func (*Wallet) XXX_Marshal

func (m *Wallet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Wallet) XXX_Merge

func (dst *Wallet) XXX_Merge(src proto.Message)

func (*Wallet) XXX_Size

func (m *Wallet) XXX_Size() int

func (*Wallet) XXX_Unmarshal

func (m *Wallet) XXX_Unmarshal(b []byte) error

type WalletServiceClient

type WalletServiceClient interface {
	GetWallet(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetWalletResponse, error)
	Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}

WalletServiceClient is the client API for WalletService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWalletServiceClient

func NewWalletServiceClient(cc *grpc.ClientConn) WalletServiceClient

type WalletServiceServer

type WalletServiceServer interface {
	GetWallet(context.Context, *empty.Empty) (*GetWalletResponse, error)
	Withdraw(context.Context, *WithdrawRequest) (*empty.Empty, error)
}

WalletServiceServer is the server API for WalletService service.

type WithdrawRequest

type WithdrawRequest struct {
	TransId              string   `protobuf:"bytes,1,opt,name=trans_id,json=transId,proto3" json:"trans_id,omitempty"`
	Amount               int64    `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WithdrawRequest) Descriptor

func (*WithdrawRequest) Descriptor() ([]byte, []int)

func (*WithdrawRequest) GetAmount

func (m *WithdrawRequest) GetAmount() int64

func (*WithdrawRequest) GetTransId

func (m *WithdrawRequest) GetTransId() string

func (*WithdrawRequest) ProtoMessage

func (*WithdrawRequest) ProtoMessage()

func (*WithdrawRequest) Reset

func (m *WithdrawRequest) Reset()

func (*WithdrawRequest) String

func (m *WithdrawRequest) String() string

func (*WithdrawRequest) XXX_DiscardUnknown

func (m *WithdrawRequest) XXX_DiscardUnknown()

func (*WithdrawRequest) XXX_Marshal

func (m *WithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WithdrawRequest) XXX_Merge

func (dst *WithdrawRequest) XXX_Merge(src proto.Message)

func (*WithdrawRequest) XXX_Size

func (m *WithdrawRequest) XXX_Size() int

func (*WithdrawRequest) XXX_Unmarshal

func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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