Versions in this module Expand all Collapse all v0 v0.1.0 Feb 28, 2019 Changes in this version + var TransferCode_name = map[int32]string + var TransferCode_value = map[string]int32 + func AddAPIServiceHandlers(mux graceful.Handlerer, srv APIServiceInterface, c graceful.Codec) graceful.Handlerer + func NewAPIServiceHandler(srv APIServiceInterface, c graceful.Codec) graceful.Handlerer + func RegisterAPIServiceHandlers(s *tcprpc.Server, prefix string, srv APIServiceInterface) + type APIServiceHTTPClient struct + func NewAPIServiceHTTPClient(cl *graceful.Client) APIServiceHTTPClient + func (cl APIServiceHTTPClient) GetBalance(ctx context.Context, args *GetBalanceRequest) (*GetBalanceResponse, error) + func (cl APIServiceHTTPClient) GetByMetaKey(ctx context.Context, args *GetByMetaKeyRequest) (*GetByMetaKeyResponse, error) + func (cl APIServiceHTTPClient) GetHistory(ctx context.Context, args *GetHistoryRequest) (*GetHistoryResponse, error) + func (cl APIServiceHTTPClient) GetLastSettings(ctx context.Context, args *GetLastSettingsRequest) (*GetLastSettingsResponse, error) + func (cl APIServiceHTTPClient) GetPrevHash(ctx context.Context, args *GetPrevHashRequest) (*GetPrevHashResponse, error) + func (cl APIServiceHTTPClient) ProcessTransfer(ctx context.Context, args *TransferRequest) (*TransferResponse, error) + func (cl APIServiceHTTPClient) PutMeta(ctx context.Context, args *PutMetaRequest) (*PutMetaResponse, error) + func (cl APIServiceHTTPClient) SearchMeta(ctx context.Context, args *SearchMetaRequest) (*SearchMetaResponse, error) + func (cl APIServiceHTTPClient) UpdateSettings(ctx context.Context, args *SettingsRequest) (*SettingsResponse, error) + type APIServiceInterface interface + GetBalance func(context.Context, *GetBalanceRequest) (*GetBalanceResponse, error) + GetByMetaKey func(context.Context, *GetByMetaKeyRequest) (*GetByMetaKeyResponse, error) + GetHistory func(context.Context, *GetHistoryRequest) (*GetHistoryResponse, error) + GetLastSettings func(context.Context, *GetLastSettingsRequest) (*GetLastSettingsResponse, error) + GetPrevHash func(context.Context, *GetPrevHashRequest) (*GetPrevHashResponse, error) + ProcessTransfer func(context.Context, *TransferRequest) (*TransferResponse, error) + PutMeta func(context.Context, *PutMetaRequest) (*PutMetaResponse, error) + SearchMeta func(context.Context, *SearchMetaRequest) (*SearchMetaResponse, error) + UpdateSettings func(context.Context, *SettingsRequest) (*SettingsResponse, error) + type GetBalanceRequest struct + Account uint64 + func (*GetBalanceRequest) Descriptor() ([]byte, []int) + func (*GetBalanceRequest) ProtoMessage() + func (m *GetBalanceRequest) GetAccount() uint64 + func (m *GetBalanceRequest) Reset() + func (m *GetBalanceRequest) String() string + type GetBalanceResponse struct + Balance int64 + Status *Status + func (*GetBalanceResponse) Descriptor() ([]byte, []int) + func (*GetBalanceResponse) ProtoMessage() + func (m *GetBalanceResponse) GetBalance() int64 + func (m *GetBalanceResponse) GetStatus() *Status + func (m *GetBalanceResponse) Reset() + func (m *GetBalanceResponse) String() string + type GetByMetaKeyRequest struct + Keys [][]byte + func (*GetByMetaKeyRequest) Descriptor() ([]byte, []int) + func (*GetByMetaKeyRequest) ProtoMessage() + func (m *GetByMetaKeyRequest) GetKeys() [][]byte + func (m *GetByMetaKeyRequest) Reset() + func (m *GetByMetaKeyRequest) String() string + type GetByMetaKeyResponse struct + Status *Status + Txns []*Txn + func (*GetByMetaKeyResponse) Descriptor() ([]byte, []int) + func (*GetByMetaKeyResponse) ProtoMessage() + func (m *GetByMetaKeyResponse) GetStatus() *Status + func (m *GetByMetaKeyResponse) GetTxns() []*Txn + func (m *GetByMetaKeyResponse) Reset() + func (m *GetByMetaKeyResponse) String() string + type GetHistoryRequest struct + Account uint64 + Limit uint32 + Token string + func (*GetHistoryRequest) Descriptor() ([]byte, []int) + func (*GetHistoryRequest) ProtoMessage() + func (m *GetHistoryRequest) GetAccount() uint64 + func (m *GetHistoryRequest) GetLimit() uint32 + func (m *GetHistoryRequest) GetToken() string + func (m *GetHistoryRequest) Reset() + func (m *GetHistoryRequest) String() string + type GetHistoryResponse struct + Status *Status + Token string + Txns []*Txn + func (*GetHistoryResponse) Descriptor() ([]byte, []int) + func (*GetHistoryResponse) ProtoMessage() + func (m *GetHistoryResponse) GetStatus() *Status + func (m *GetHistoryResponse) GetToken() string + func (m *GetHistoryResponse) GetTxns() []*Txn + func (m *GetHistoryResponse) Reset() + func (m *GetHistoryResponse) String() string + type GetLastSettingsRequest struct + Account uint64 + func (*GetLastSettingsRequest) Descriptor() ([]byte, []int) + func (*GetLastSettingsRequest) ProtoMessage() + func (m *GetLastSettingsRequest) GetAccount() uint64 + func (m *GetLastSettingsRequest) Reset() + func (m *GetLastSettingsRequest) String() string + type GetLastSettingsResponse struct + Account uint64 + DataHash string + Hash string + Id uint64 + PrevHash string + PublicKey string + Sign string + Status *Status + VerifyTransferSign bool + func (*GetLastSettingsResponse) Descriptor() ([]byte, []int) + func (*GetLastSettingsResponse) ProtoMessage() + func (m *GetLastSettingsResponse) GetAccount() uint64 + func (m *GetLastSettingsResponse) GetDataHash() string + func (m *GetLastSettingsResponse) GetHash() string + func (m *GetLastSettingsResponse) GetId() uint64 + func (m *GetLastSettingsResponse) GetPrevHash() string + func (m *GetLastSettingsResponse) GetPublicKey() string + func (m *GetLastSettingsResponse) GetSign() string + func (m *GetLastSettingsResponse) GetStatus() *Status + func (m *GetLastSettingsResponse) GetVerifyTransferSign() bool + func (m *GetLastSettingsResponse) Reset() + func (m *GetLastSettingsResponse) String() string + type GetPrevHashRequest struct + Account uint64 + func (*GetPrevHashRequest) Descriptor() ([]byte, []int) + func (*GetPrevHashRequest) ProtoMessage() + func (m *GetPrevHashRequest) GetAccount() uint64 + func (m *GetPrevHashRequest) Reset() + func (m *GetPrevHashRequest) String() string + type GetPrevHashResponse struct + Hash string + Status *Status + func (*GetPrevHashResponse) Descriptor() ([]byte, []int) + func (*GetPrevHashResponse) ProtoMessage() + func (m *GetPrevHashResponse) GetHash() string + func (m *GetPrevHashResponse) GetStatus() *Status + func (m *GetPrevHashResponse) Reset() + func (m *GetPrevHashResponse) String() string + type Meta struct + Data map[string][]byte + Index map[string][]byte + Key []byte + func (*Meta) Descriptor() ([]byte, []int) + func (*Meta) ProtoMessage() + func (m *Meta) GetData() map[string][]byte + func (m *Meta) GetIndex() map[string][]byte + func (m *Meta) GetKey() []byte + func (m *Meta) Reset() + func (m *Meta) String() string + type PutMetaRequest struct + Meta *Meta + func (*PutMetaRequest) Descriptor() ([]byte, []int) + func (*PutMetaRequest) ProtoMessage() + func (m *PutMetaRequest) GetMeta() *Meta + func (m *PutMetaRequest) Reset() + func (m *PutMetaRequest) String() string + type PutMetaResponse struct + Status *Status + func (*PutMetaResponse) Descriptor() ([]byte, []int) + func (*PutMetaResponse) ProtoMessage() + func (m *PutMetaResponse) GetStatus() *Status + func (m *PutMetaResponse) Reset() + func (m *PutMetaResponse) String() string + type SearchMetaRequest struct + Index map[string][]byte + Limit int32 + Token []byte + func (*SearchMetaRequest) Descriptor() ([]byte, []int) + func (*SearchMetaRequest) ProtoMessage() + func (m *SearchMetaRequest) GetIndex() map[string][]byte + func (m *SearchMetaRequest) GetLimit() int32 + func (m *SearchMetaRequest) GetToken() []byte + func (m *SearchMetaRequest) Reset() + func (m *SearchMetaRequest) String() string + type SearchMetaResponse struct + Items []*Meta + NextToken []byte + Status *Status + func (*SearchMetaResponse) Descriptor() ([]byte, []int) + func (*SearchMetaResponse) ProtoMessage() + func (m *SearchMetaResponse) GetItems() []*Meta + func (m *SearchMetaResponse) GetNextToken() []byte + func (m *SearchMetaResponse) GetStatus() *Status + func (m *SearchMetaResponse) Reset() + func (m *SearchMetaResponse) String() string + type SettingsRequest struct + Account uint64 + DataHash string + PrevHash string + PublicKey string + Sign string + VerifyTransferSign bool + func (*SettingsRequest) Descriptor() ([]byte, []int) + func (*SettingsRequest) ProtoMessage() + func (m *SettingsRequest) GetAccount() uint64 + func (m *SettingsRequest) GetDataHash() string + func (m *SettingsRequest) GetPrevHash() string + func (m *SettingsRequest) GetPublicKey() string + func (m *SettingsRequest) GetSign() string + func (m *SettingsRequest) GetVerifyTransferSign() bool + func (m *SettingsRequest) Reset() + func (m *SettingsRequest) String() string + type SettingsResponse struct + Hash string + SettingsId string + Status *Status + func (*SettingsResponse) Descriptor() ([]byte, []int) + func (*SettingsResponse) ProtoMessage() + func (m *SettingsResponse) GetHash() string + func (m *SettingsResponse) GetSettingsId() string + func (m *SettingsResponse) GetStatus() *Status + func (m *SettingsResponse) Reset() + func (m *SettingsResponse) String() string + type Status struct + Code TransferCode + Details []*google_protobuf.Any + Message string + func (*Status) Descriptor() ([]byte, []int) + func (*Status) ProtoMessage() + func (m *Status) GetCode() TransferCode + func (m *Status) GetDetails() []*google_protobuf.Any + func (m *Status) GetMessage() string + func (m *Status) Reset() + func (m *Status) String() string + type TCPRPCAPIServiceClient struct + func NewTCPRPCAPIServiceClient(cl *tcprpc.Client, pref string) TCPRPCAPIServiceClient + func (cl TCPRPCAPIServiceClient) GetBalance(ctx context.Context, args *GetBalanceRequest) (*GetBalanceResponse, error) + func (cl TCPRPCAPIServiceClient) GetByMetaKey(ctx context.Context, args *GetByMetaKeyRequest) (*GetByMetaKeyResponse, error) + func (cl TCPRPCAPIServiceClient) GetHistory(ctx context.Context, args *GetHistoryRequest) (*GetHistoryResponse, error) + func (cl TCPRPCAPIServiceClient) GetLastSettings(ctx context.Context, args *GetLastSettingsRequest) (*GetLastSettingsResponse, error) + func (cl TCPRPCAPIServiceClient) GetPrevHash(ctx context.Context, args *GetPrevHashRequest) (*GetPrevHashResponse, error) + func (cl TCPRPCAPIServiceClient) ProcessTransfer(ctx context.Context, args *TransferRequest) (*TransferResponse, error) + func (cl TCPRPCAPIServiceClient) PutMeta(ctx context.Context, args *PutMetaRequest) (*PutMetaResponse, error) + func (cl TCPRPCAPIServiceClient) SearchMeta(ctx context.Context, args *SearchMetaRequest) (*SearchMetaResponse, error) + func (cl TCPRPCAPIServiceClient) UpdateSettings(ctx context.Context, args *SettingsRequest) (*SettingsResponse, error) + type TransferCode int32 + const TransferCode_BAD_REQUEST + const TransferCode_INTERNAL_ERROR + const TransferCode_INVALID_PREV_HASH + const TransferCode_INVALID_SIGN + const TransferCode_METADATA_ERROR + const TransferCode_NO_BALANCE + const TransferCode_OK + const TransferCode_RETRY + func (TransferCode) EnumDescriptor() ([]byte, []int) + func (x TransferCode) String() string + type TransferItem struct + Amount int64 + Receiver uint64 + func (*TransferItem) Descriptor() ([]byte, []int) + func (*TransferItem) ProtoMessage() + func (m *TransferItem) GetAmount() int64 + func (m *TransferItem) GetReceiver() uint64 + func (m *TransferItem) Reset() + func (m *TransferItem) String() string + type TransferRequest struct + Batch []*TransferItem + Metadata *Meta + PrevHash string + Sender uint64 + SettingsId uint64 + Sign string + func (*TransferRequest) Descriptor() ([]byte, []int) + func (*TransferRequest) ProtoMessage() + func (m *TransferRequest) GetBatch() []*TransferItem + func (m *TransferRequest) GetMetadata() *Meta + func (m *TransferRequest) GetPrevHash() string + func (m *TransferRequest) GetSender() uint64 + func (m *TransferRequest) GetSettingsId() uint64 + func (m *TransferRequest) GetSign() string + func (m *TransferRequest) Reset() + func (m *TransferRequest) String() string + type TransferResponse struct + Hash string + SettingsId uint64 + Status *Status + TxnId string + func (*TransferResponse) Descriptor() ([]byte, []int) + func (*TransferResponse) ProtoMessage() + func (m *TransferResponse) GetHash() string + func (m *TransferResponse) GetSettingsId() uint64 + func (m *TransferResponse) GetStatus() *Status + func (m *TransferResponse) GetTxnId() string + func (m *TransferResponse) Reset() + func (m *TransferResponse) String() string + type Txn struct + Amount string + Balance string + Hash string + Id string + Meta *Meta + PrevHash string + Receiver string + Sender string + SettingsId string + Sign string + SpentBy string + func (*Txn) Descriptor() ([]byte, []int) + func (*Txn) ProtoMessage() + func (m *Txn) GetAmount() string + func (m *Txn) GetBalance() string + func (m *Txn) GetHash() string + func (m *Txn) GetId() string + func (m *Txn) GetMeta() *Meta + func (m *Txn) GetPrevHash() string + func (m *Txn) GetReceiver() string + func (m *Txn) GetSender() string + func (m *Txn) GetSettingsId() string + func (m *Txn) GetSign() string + func (m *Txn) GetSpentBy() string + func (m *Txn) Reset() + func (m *Txn) String() string