Documentation ¶
Overview ¶
Package payment is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterPaymentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterPaymentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PaymentServiceClient) error
- func RegisterPaymentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterPaymentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PaymentServiceServer) error
- func RegisterPaymentServiceServer(s *grpc.Server, srv PaymentServiceServer)
- type CreateTxByEntityRequest
- func (*CreateTxByEntityRequest) Descriptor() ([]byte, []int)
- func (m *CreateTxByEntityRequest) GetAmount() float32
- func (m *CreateTxByEntityRequest) GetReason() string
- func (m *CreateTxByEntityRequest) GetType() CryptoType
- func (m *CreateTxByEntityRequest) Marshal() (dAtA []byte, err error)
- func (m *CreateTxByEntityRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *CreateTxByEntityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CreateTxByEntityRequest) ProtoMessage()
- func (m *CreateTxByEntityRequest) Reset()
- func (m *CreateTxByEntityRequest) Size() (n int)
- func (m *CreateTxByEntityRequest) String() string
- func (m *CreateTxByEntityRequest) Unmarshal(dAtA []byte) error
- func (this *CreateTxByEntityRequest) Validate() error
- func (m *CreateTxByEntityRequest) XXX_DiscardUnknown()
- func (m *CreateTxByEntityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CreateTxByEntityRequest) XXX_Merge(src proto.Message)
- func (*CreateTxByEntityRequest) XXX_MessageName() string
- func (m *CreateTxByEntityRequest) XXX_Size() int
- func (m *CreateTxByEntityRequest) XXX_Unmarshal(b []byte) error
- type CryptoBalanceDTO
- func (*CryptoBalanceDTO) Descriptor() ([]byte, []int)
- func (m *CryptoBalanceDTO) GetBalance() float32
- func (m *CryptoBalanceDTO) GetEntityID() string
- func (m *CryptoBalanceDTO) GetHistories() []*CryptoHistoryDTO
- func (m *CryptoBalanceDTO) GetType() CryptoType
- func (m *CryptoBalanceDTO) Marshal() (dAtA []byte, err error)
- func (m *CryptoBalanceDTO) MarshalTo(dAtA []byte) (int, error)
- func (m *CryptoBalanceDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CryptoBalanceDTO) ProtoMessage()
- func (m *CryptoBalanceDTO) Reset()
- func (m *CryptoBalanceDTO) Size() (n int)
- func (m *CryptoBalanceDTO) String() string
- func (m *CryptoBalanceDTO) Unmarshal(dAtA []byte) error
- func (this *CryptoBalanceDTO) Validate() error
- func (m *CryptoBalanceDTO) XXX_DiscardUnknown()
- func (m *CryptoBalanceDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CryptoBalanceDTO) XXX_Merge(src proto.Message)
- func (*CryptoBalanceDTO) XXX_MessageName() string
- func (m *CryptoBalanceDTO) XXX_Size() int
- func (m *CryptoBalanceDTO) XXX_Unmarshal(b []byte) error
- type CryptoCurrencyDTO
- func (*CryptoCurrencyDTO) Descriptor() ([]byte, []int)
- func (m *CryptoCurrencyDTO) GetBalance() []*CryptoBalanceDTO
- func (m *CryptoCurrencyDTO) GetEntityID() string
- func (m *CryptoCurrencyDTO) Marshal() (dAtA []byte, err error)
- func (m *CryptoCurrencyDTO) MarshalTo(dAtA []byte) (int, error)
- func (m *CryptoCurrencyDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CryptoCurrencyDTO) ProtoMessage()
- func (m *CryptoCurrencyDTO) Reset()
- func (m *CryptoCurrencyDTO) Size() (n int)
- func (m *CryptoCurrencyDTO) String() string
- func (m *CryptoCurrencyDTO) Unmarshal(dAtA []byte) error
- func (this *CryptoCurrencyDTO) Validate() error
- func (m *CryptoCurrencyDTO) XXX_DiscardUnknown()
- func (m *CryptoCurrencyDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CryptoCurrencyDTO) XXX_Merge(src proto.Message)
- func (*CryptoCurrencyDTO) XXX_MessageName() string
- func (m *CryptoCurrencyDTO) XXX_Size() int
- func (m *CryptoCurrencyDTO) XXX_Unmarshal(b []byte) error
- type CryptoHistoryDTO
- func (*CryptoHistoryDTO) Descriptor() ([]byte, []int)
- func (m *CryptoHistoryDTO) GetAmount() float32
- func (m *CryptoHistoryDTO) GetReason() string
- func (m *CryptoHistoryDTO) GetTx() string
- func (m *CryptoHistoryDTO) GetWithdrawAddress() string
- func (m *CryptoHistoryDTO) Marshal() (dAtA []byte, err error)
- func (m *CryptoHistoryDTO) MarshalTo(dAtA []byte) (int, error)
- func (m *CryptoHistoryDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CryptoHistoryDTO) ProtoMessage()
- func (m *CryptoHistoryDTO) Reset()
- func (m *CryptoHistoryDTO) Size() (n int)
- func (m *CryptoHistoryDTO) String() string
- func (m *CryptoHistoryDTO) Unmarshal(dAtA []byte) error
- func (this *CryptoHistoryDTO) Validate() error
- func (m *CryptoHistoryDTO) XXX_DiscardUnknown()
- func (m *CryptoHistoryDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CryptoHistoryDTO) XXX_Merge(src proto.Message)
- func (*CryptoHistoryDTO) XXX_MessageName() string
- func (m *CryptoHistoryDTO) XXX_Size() int
- func (m *CryptoHistoryDTO) XXX_Unmarshal(b []byte) error
- type CryptoType
- type EmptyRequest
- func (*EmptyRequest) Descriptor() ([]byte, []int)
- func (m *EmptyRequest) Marshal() (dAtA []byte, err error)
- func (m *EmptyRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *EmptyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*EmptyRequest) ProtoMessage()
- func (m *EmptyRequest) Reset()
- func (m *EmptyRequest) Size() (n int)
- func (m *EmptyRequest) String() string
- func (m *EmptyRequest) Unmarshal(dAtA []byte) error
- func (this *EmptyRequest) Validate() error
- func (m *EmptyRequest) XXX_DiscardUnknown()
- func (m *EmptyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *EmptyRequest) XXX_Merge(src proto.Message)
- func (*EmptyRequest) XXX_MessageName() string
- func (m *EmptyRequest) XXX_Size() int
- func (m *EmptyRequest) XXX_Unmarshal(b []byte) error
- type PaymentServiceClient
- type PaymentServiceServer
- type UnimplementedPaymentServiceServer
- func (*UnimplementedPaymentServiceServer) CreateTx(ctx context.Context, req *CreateTxByEntityRequest) (*CryptoBalanceDTO, error)
- func (*UnimplementedPaymentServiceServer) GetAllByEntity(ctx context.Context, req *EmptyRequest) (*CryptoCurrencyDTO, error)
- func (*UnimplementedPaymentServiceServer) GetBalanceByEntity(ctx context.Context, req *EmptyRequest) (*CryptoBalanceDTO, error)
- func (*UnimplementedPaymentServiceServer) Withdraw(ctx context.Context, req *WithdrawRequest) (*CryptoBalanceDTO, error)
- type WithdrawRequest
- func (*WithdrawRequest) Descriptor() ([]byte, []int)
- func (m *WithdrawRequest) GetAddress() string
- func (m *WithdrawRequest) GetAmount() float32
- func (m *WithdrawRequest) GetType() CryptoType
- func (m *WithdrawRequest) Marshal() (dAtA []byte, err error)
- func (m *WithdrawRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *WithdrawRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WithdrawRequest) ProtoMessage()
- func (m *WithdrawRequest) Reset()
- func (m *WithdrawRequest) Size() (n int)
- func (m *WithdrawRequest) String() string
- func (m *WithdrawRequest) Unmarshal(dAtA []byte) error
- func (this *WithdrawRequest) Validate() error
- func (m *WithdrawRequest) XXX_DiscardUnknown()
- func (m *WithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WithdrawRequest) XXX_Merge(src proto.Message)
- func (*WithdrawRequest) XXX_MessageName() string
- func (m *WithdrawRequest) XXX_Size() int
- func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthPayment = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPayment = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPayment = fmt.Errorf("proto: unexpected end of group") )
var CryptoType_name = map[int32]string{
0: "BTC",
1: "LTC",
2: "ETH",
3: "DOGE",
}
var CryptoType_value = map[string]int32{
"BTC": 0,
"LTC": 1,
"ETH": 2,
"DOGE": 3,
}
Functions ¶
func RegisterPaymentServiceHandler ¶
func RegisterPaymentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterPaymentServiceHandler registers the http handlers for service PaymentService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterPaymentServiceHandlerClient ¶
func RegisterPaymentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PaymentServiceClient) error
RegisterPaymentServiceHandlerClient registers the http handlers for service PaymentService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PaymentServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PaymentServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "PaymentServiceClient" to call the correct interceptors.
func RegisterPaymentServiceHandlerFromEndpoint ¶
func RegisterPaymentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterPaymentServiceHandlerFromEndpoint is same as RegisterPaymentServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterPaymentServiceHandlerServer ¶
func RegisterPaymentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PaymentServiceServer) error
RegisterPaymentServiceHandlerServer registers the http handlers for service PaymentService to "mux". UnaryRPC :call PaymentServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterPaymentServiceServer ¶
func RegisterPaymentServiceServer(s *grpc.Server, srv PaymentServiceServer)
Types ¶
type CreateTxByEntityRequest ¶
type CreateTxByEntityRequest struct { Type CryptoType `protobuf:"varint,1,opt,name=Type,proto3,enum=payment.CryptoType" json:"Type,omitempty"` Amount float32 `protobuf:"fixed32,2,opt,name=Amount,proto3" json:"Amount,omitempty"` Reason string `protobuf:"bytes,3,opt,name=Reason,proto3" json:"Reason,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CreateTxByEntityRequest) Descriptor ¶
func (*CreateTxByEntityRequest) Descriptor() ([]byte, []int)
func (*CreateTxByEntityRequest) GetAmount ¶
func (m *CreateTxByEntityRequest) GetAmount() float32
func (*CreateTxByEntityRequest) GetReason ¶
func (m *CreateTxByEntityRequest) GetReason() string
func (*CreateTxByEntityRequest) GetType ¶
func (m *CreateTxByEntityRequest) GetType() CryptoType
func (*CreateTxByEntityRequest) Marshal ¶
func (m *CreateTxByEntityRequest) Marshal() (dAtA []byte, err error)
func (*CreateTxByEntityRequest) MarshalTo ¶
func (m *CreateTxByEntityRequest) MarshalTo(dAtA []byte) (int, error)
func (*CreateTxByEntityRequest) MarshalToSizedBuffer ¶
func (m *CreateTxByEntityRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CreateTxByEntityRequest) ProtoMessage ¶
func (*CreateTxByEntityRequest) ProtoMessage()
func (*CreateTxByEntityRequest) Reset ¶
func (m *CreateTxByEntityRequest) Reset()
func (*CreateTxByEntityRequest) Size ¶
func (m *CreateTxByEntityRequest) Size() (n int)
func (*CreateTxByEntityRequest) String ¶
func (m *CreateTxByEntityRequest) String() string
func (*CreateTxByEntityRequest) Unmarshal ¶
func (m *CreateTxByEntityRequest) Unmarshal(dAtA []byte) error
func (*CreateTxByEntityRequest) Validate ¶
func (this *CreateTxByEntityRequest) Validate() error
func (*CreateTxByEntityRequest) XXX_DiscardUnknown ¶
func (m *CreateTxByEntityRequest) XXX_DiscardUnknown()
func (*CreateTxByEntityRequest) XXX_Marshal ¶
func (m *CreateTxByEntityRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CreateTxByEntityRequest) XXX_Merge ¶
func (m *CreateTxByEntityRequest) XXX_Merge(src proto.Message)
func (*CreateTxByEntityRequest) XXX_MessageName ¶
func (*CreateTxByEntityRequest) XXX_MessageName() string
func (*CreateTxByEntityRequest) XXX_Size ¶
func (m *CreateTxByEntityRequest) XXX_Size() int
func (*CreateTxByEntityRequest) XXX_Unmarshal ¶
func (m *CreateTxByEntityRequest) XXX_Unmarshal(b []byte) error
type CryptoBalanceDTO ¶
type CryptoBalanceDTO struct { EntityID string `protobuf:"bytes,1,opt,name=EntityID,proto3" json:"EntityID,omitempty"` Type CryptoType `protobuf:"varint,2,opt,name=Type,proto3,enum=payment.CryptoType" json:"Type,omitempty"` Balance float32 `protobuf:"fixed32,3,opt,name=Balance,proto3" json:"Balance,omitempty"` Histories []*CryptoHistoryDTO `protobuf:"bytes,51,rep,name=Histories,proto3" json:"Histories,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CryptoBalanceDTO) Descriptor ¶
func (*CryptoBalanceDTO) Descriptor() ([]byte, []int)
func (*CryptoBalanceDTO) GetBalance ¶
func (m *CryptoBalanceDTO) GetBalance() float32
func (*CryptoBalanceDTO) GetEntityID ¶
func (m *CryptoBalanceDTO) GetEntityID() string
func (*CryptoBalanceDTO) GetHistories ¶
func (m *CryptoBalanceDTO) GetHistories() []*CryptoHistoryDTO
func (*CryptoBalanceDTO) GetType ¶
func (m *CryptoBalanceDTO) GetType() CryptoType
func (*CryptoBalanceDTO) Marshal ¶
func (m *CryptoBalanceDTO) Marshal() (dAtA []byte, err error)
func (*CryptoBalanceDTO) MarshalToSizedBuffer ¶
func (m *CryptoBalanceDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CryptoBalanceDTO) ProtoMessage ¶
func (*CryptoBalanceDTO) ProtoMessage()
func (*CryptoBalanceDTO) Reset ¶
func (m *CryptoBalanceDTO) Reset()
func (*CryptoBalanceDTO) Size ¶
func (m *CryptoBalanceDTO) Size() (n int)
func (*CryptoBalanceDTO) String ¶
func (m *CryptoBalanceDTO) String() string
func (*CryptoBalanceDTO) Unmarshal ¶
func (m *CryptoBalanceDTO) Unmarshal(dAtA []byte) error
func (*CryptoBalanceDTO) Validate ¶
func (this *CryptoBalanceDTO) Validate() error
func (*CryptoBalanceDTO) XXX_DiscardUnknown ¶
func (m *CryptoBalanceDTO) XXX_DiscardUnknown()
func (*CryptoBalanceDTO) XXX_Marshal ¶
func (m *CryptoBalanceDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CryptoBalanceDTO) XXX_Merge ¶
func (m *CryptoBalanceDTO) XXX_Merge(src proto.Message)
func (*CryptoBalanceDTO) XXX_MessageName ¶
func (*CryptoBalanceDTO) XXX_MessageName() string
func (*CryptoBalanceDTO) XXX_Size ¶
func (m *CryptoBalanceDTO) XXX_Size() int
func (*CryptoBalanceDTO) XXX_Unmarshal ¶
func (m *CryptoBalanceDTO) XXX_Unmarshal(b []byte) error
type CryptoCurrencyDTO ¶
type CryptoCurrencyDTO struct { EntityID string `protobuf:"bytes,1,opt,name=EntityID,proto3" json:"EntityID,omitempty"` Balance []*CryptoBalanceDTO `protobuf:"bytes,2,rep,name=Balance,proto3" json:"Balance,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CryptoCurrencyDTO) Descriptor ¶
func (*CryptoCurrencyDTO) Descriptor() ([]byte, []int)
func (*CryptoCurrencyDTO) GetBalance ¶
func (m *CryptoCurrencyDTO) GetBalance() []*CryptoBalanceDTO
func (*CryptoCurrencyDTO) GetEntityID ¶
func (m *CryptoCurrencyDTO) GetEntityID() string
func (*CryptoCurrencyDTO) Marshal ¶
func (m *CryptoCurrencyDTO) Marshal() (dAtA []byte, err error)
func (*CryptoCurrencyDTO) MarshalTo ¶
func (m *CryptoCurrencyDTO) MarshalTo(dAtA []byte) (int, error)
func (*CryptoCurrencyDTO) MarshalToSizedBuffer ¶
func (m *CryptoCurrencyDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CryptoCurrencyDTO) ProtoMessage ¶
func (*CryptoCurrencyDTO) ProtoMessage()
func (*CryptoCurrencyDTO) Reset ¶
func (m *CryptoCurrencyDTO) Reset()
func (*CryptoCurrencyDTO) Size ¶
func (m *CryptoCurrencyDTO) Size() (n int)
func (*CryptoCurrencyDTO) String ¶
func (m *CryptoCurrencyDTO) String() string
func (*CryptoCurrencyDTO) Unmarshal ¶
func (m *CryptoCurrencyDTO) Unmarshal(dAtA []byte) error
func (*CryptoCurrencyDTO) Validate ¶
func (this *CryptoCurrencyDTO) Validate() error
func (*CryptoCurrencyDTO) XXX_DiscardUnknown ¶
func (m *CryptoCurrencyDTO) XXX_DiscardUnknown()
func (*CryptoCurrencyDTO) XXX_Marshal ¶
func (m *CryptoCurrencyDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CryptoCurrencyDTO) XXX_Merge ¶
func (m *CryptoCurrencyDTO) XXX_Merge(src proto.Message)
func (*CryptoCurrencyDTO) XXX_MessageName ¶
func (*CryptoCurrencyDTO) XXX_MessageName() string
func (*CryptoCurrencyDTO) XXX_Size ¶
func (m *CryptoCurrencyDTO) XXX_Size() int
func (*CryptoCurrencyDTO) XXX_Unmarshal ¶
func (m *CryptoCurrencyDTO) XXX_Unmarshal(b []byte) error
type CryptoHistoryDTO ¶
type CryptoHistoryDTO struct { Amount float32 `protobuf:"fixed32,1,opt,name=Amount,proto3" json:"Amount,omitempty"` Reason string `protobuf:"bytes,2,opt,name=Reason,proto3" json:"Reason,omitempty"` WithdrawAddress string `protobuf:"bytes,3,opt,name=WithdrawAddress,proto3" json:"WithdrawAddress,omitempty"` Tx string `protobuf:"bytes,4,opt,name=Tx,proto3" json:"Tx,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*CryptoHistoryDTO) Descriptor ¶
func (*CryptoHistoryDTO) Descriptor() ([]byte, []int)
func (*CryptoHistoryDTO) GetAmount ¶
func (m *CryptoHistoryDTO) GetAmount() float32
func (*CryptoHistoryDTO) GetReason ¶
func (m *CryptoHistoryDTO) GetReason() string
func (*CryptoHistoryDTO) GetTx ¶
func (m *CryptoHistoryDTO) GetTx() string
func (*CryptoHistoryDTO) GetWithdrawAddress ¶
func (m *CryptoHistoryDTO) GetWithdrawAddress() string
func (*CryptoHistoryDTO) Marshal ¶
func (m *CryptoHistoryDTO) Marshal() (dAtA []byte, err error)
func (*CryptoHistoryDTO) MarshalToSizedBuffer ¶
func (m *CryptoHistoryDTO) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CryptoHistoryDTO) ProtoMessage ¶
func (*CryptoHistoryDTO) ProtoMessage()
func (*CryptoHistoryDTO) Reset ¶
func (m *CryptoHistoryDTO) Reset()
func (*CryptoHistoryDTO) Size ¶
func (m *CryptoHistoryDTO) Size() (n int)
func (*CryptoHistoryDTO) String ¶
func (m *CryptoHistoryDTO) String() string
func (*CryptoHistoryDTO) Unmarshal ¶
func (m *CryptoHistoryDTO) Unmarshal(dAtA []byte) error
func (*CryptoHistoryDTO) Validate ¶
func (this *CryptoHistoryDTO) Validate() error
func (*CryptoHistoryDTO) XXX_DiscardUnknown ¶
func (m *CryptoHistoryDTO) XXX_DiscardUnknown()
func (*CryptoHistoryDTO) XXX_Marshal ¶
func (m *CryptoHistoryDTO) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CryptoHistoryDTO) XXX_Merge ¶
func (m *CryptoHistoryDTO) XXX_Merge(src proto.Message)
func (*CryptoHistoryDTO) XXX_MessageName ¶
func (*CryptoHistoryDTO) XXX_MessageName() string
func (*CryptoHistoryDTO) XXX_Size ¶
func (m *CryptoHistoryDTO) XXX_Size() int
func (*CryptoHistoryDTO) XXX_Unmarshal ¶
func (m *CryptoHistoryDTO) XXX_Unmarshal(b []byte) error
type CryptoType ¶
type CryptoType int32
const ( CryptoType_BTC CryptoType = 0 CryptoType_LTC CryptoType = 1 CryptoType_ETH CryptoType = 2 CryptoType_DOGE CryptoType = 3 )
func (CryptoType) EnumDescriptor ¶
func (CryptoType) EnumDescriptor() ([]byte, []int)
func (CryptoType) String ¶
func (x CryptoType) String() string
type EmptyRequest ¶
type EmptyRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*EmptyRequest) Descriptor ¶
func (*EmptyRequest) Descriptor() ([]byte, []int)
func (*EmptyRequest) Marshal ¶
func (m *EmptyRequest) Marshal() (dAtA []byte, err error)
func (*EmptyRequest) MarshalToSizedBuffer ¶
func (m *EmptyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*EmptyRequest) ProtoMessage ¶
func (*EmptyRequest) ProtoMessage()
func (*EmptyRequest) Reset ¶
func (m *EmptyRequest) Reset()
func (*EmptyRequest) Size ¶
func (m *EmptyRequest) Size() (n int)
func (*EmptyRequest) String ¶
func (m *EmptyRequest) String() string
func (*EmptyRequest) Unmarshal ¶
func (m *EmptyRequest) Unmarshal(dAtA []byte) error
func (*EmptyRequest) Validate ¶
func (this *EmptyRequest) Validate() error
func (*EmptyRequest) XXX_DiscardUnknown ¶
func (m *EmptyRequest) XXX_DiscardUnknown()
func (*EmptyRequest) XXX_Marshal ¶
func (m *EmptyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*EmptyRequest) XXX_Merge ¶
func (m *EmptyRequest) XXX_Merge(src proto.Message)
func (*EmptyRequest) XXX_MessageName ¶
func (*EmptyRequest) XXX_MessageName() string
func (*EmptyRequest) XXX_Size ¶
func (m *EmptyRequest) XXX_Size() int
func (*EmptyRequest) XXX_Unmarshal ¶
func (m *EmptyRequest) XXX_Unmarshal(b []byte) error
type PaymentServiceClient ¶
type PaymentServiceClient interface { GetAllByEntity(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*CryptoCurrencyDTO, error) GetBalanceByEntity(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*CryptoBalanceDTO, error) CreateTx(ctx context.Context, in *CreateTxByEntityRequest, opts ...grpc.CallOption) (*CryptoBalanceDTO, error) Withdraw(ctx context.Context, in *WithdrawRequest, opts ...grpc.CallOption) (*CryptoBalanceDTO, error) }
PaymentServiceClient is the client API for PaymentService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewPaymentServiceClient ¶
func NewPaymentServiceClient(cc *grpc.ClientConn) PaymentServiceClient
type PaymentServiceServer ¶
type PaymentServiceServer interface { GetAllByEntity(context.Context, *EmptyRequest) (*CryptoCurrencyDTO, error) GetBalanceByEntity(context.Context, *EmptyRequest) (*CryptoBalanceDTO, error) CreateTx(context.Context, *CreateTxByEntityRequest) (*CryptoBalanceDTO, error) Withdraw(context.Context, *WithdrawRequest) (*CryptoBalanceDTO, error) }
PaymentServiceServer is the server API for PaymentService service.
type UnimplementedPaymentServiceServer ¶
type UnimplementedPaymentServiceServer struct { }
UnimplementedPaymentServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedPaymentServiceServer) CreateTx ¶
func (*UnimplementedPaymentServiceServer) CreateTx(ctx context.Context, req *CreateTxByEntityRequest) (*CryptoBalanceDTO, error)
func (*UnimplementedPaymentServiceServer) GetAllByEntity ¶
func (*UnimplementedPaymentServiceServer) GetAllByEntity(ctx context.Context, req *EmptyRequest) (*CryptoCurrencyDTO, error)
func (*UnimplementedPaymentServiceServer) GetBalanceByEntity ¶
func (*UnimplementedPaymentServiceServer) GetBalanceByEntity(ctx context.Context, req *EmptyRequest) (*CryptoBalanceDTO, error)
func (*UnimplementedPaymentServiceServer) Withdraw ¶
func (*UnimplementedPaymentServiceServer) Withdraw(ctx context.Context, req *WithdrawRequest) (*CryptoBalanceDTO, error)
type WithdrawRequest ¶
type WithdrawRequest struct { Type CryptoType `protobuf:"varint,1,opt,name=Type,proto3,enum=payment.CryptoType" json:"Type,omitempty"` Amount float32 `protobuf:"fixed32,2,opt,name=Amount,proto3" json:"Amount,omitempty"` Address string `protobuf:"bytes,3,opt,name=Address,proto3" json:"Address,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*WithdrawRequest) Descriptor ¶
func (*WithdrawRequest) Descriptor() ([]byte, []int)
func (*WithdrawRequest) GetAddress ¶
func (m *WithdrawRequest) GetAddress() string
func (*WithdrawRequest) GetAmount ¶
func (m *WithdrawRequest) GetAmount() float32
func (*WithdrawRequest) GetType ¶
func (m *WithdrawRequest) GetType() CryptoType
func (*WithdrawRequest) Marshal ¶
func (m *WithdrawRequest) Marshal() (dAtA []byte, err error)
func (*WithdrawRequest) MarshalToSizedBuffer ¶
func (m *WithdrawRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WithdrawRequest) ProtoMessage ¶
func (*WithdrawRequest) ProtoMessage()
func (*WithdrawRequest) Reset ¶
func (m *WithdrawRequest) Reset()
func (*WithdrawRequest) Size ¶
func (m *WithdrawRequest) Size() (n int)
func (*WithdrawRequest) String ¶
func (m *WithdrawRequest) String() string
func (*WithdrawRequest) Unmarshal ¶
func (m *WithdrawRequest) Unmarshal(dAtA []byte) error
func (*WithdrawRequest) Validate ¶
func (this *WithdrawRequest) Validate() error
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 (m *WithdrawRequest) XXX_Merge(src proto.Message)
func (*WithdrawRequest) XXX_MessageName ¶
func (*WithdrawRequest) XXX_MessageName() string
func (*WithdrawRequest) XXX_Size ¶
func (m *WithdrawRequest) XXX_Size() int
func (*WithdrawRequest) XXX_Unmarshal ¶
func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error