apipb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package apipb is a generated protocol buffer package.

Plutos API Service

It is generated from these files:

api_service.proto

It has these top-level messages:

Status
TransferItem
TransferRequest
TransferResponse
GetPrevHashRequest
GetPrevHashResponse
GetBalanceRequest
GetBalanceResponse
SettingsRequest
SettingsResponse
GetLastSettingsRequest
GetLastSettingsResponse
GetHistoryRequest
GetHistoryResponse
Txn
Meta
GetByMetaKeyRequest
GetByMetaKeyResponse
SearchMetaRequest
SearchMetaResponse
PutMetaRequest
PutMetaResponse

Index

Constants

This section is empty.

Variables

View Source
var TransferCode_name = map[int32]string{
	0: "OK",
	1: "INVALID_PREV_HASH",
	2: "INVALID_SIGN",
	3: "BAD_REQUEST",
	4: "NO_BALANCE",
	5: "INTERNAL_ERROR",
	7: "RETRY",
	8: "METADATA_ERROR",
}
View Source
var TransferCode_value = map[string]int32{
	"OK":                0,
	"INVALID_PREV_HASH": 1,
	"INVALID_SIGN":      2,
	"BAD_REQUEST":       3,
	"NO_BALANCE":        4,
	"INTERNAL_ERROR":    5,
	"RETRY":             7,
	"METADATA_ERROR":    8,
}

Functions

func RegisterAPIServiceHandlers

func RegisterAPIServiceHandlers(s *tcprpc.Server, prefix string, srv APIServiceInterface)

Types

type APIServiceHTTPClient

type APIServiceHTTPClient struct {
	*graceful.Client
}

func NewAPIServiceHTTPClient

func NewAPIServiceHTTPClient(cl *graceful.Client) APIServiceHTTPClient

func (APIServiceHTTPClient) GetBalance

func (APIServiceHTTPClient) GetByMetaKey

func (APIServiceHTTPClient) GetHistory

func (APIServiceHTTPClient) GetLastSettings

func (APIServiceHTTPClient) GetPrevHash

func (APIServiceHTTPClient) ProcessTransfer

func (cl APIServiceHTTPClient) ProcessTransfer(ctx context.Context, args *TransferRequest) (*TransferResponse, error)

func (APIServiceHTTPClient) PutMeta

func (APIServiceHTTPClient) SearchMeta

func (APIServiceHTTPClient) UpdateSettings

func (cl APIServiceHTTPClient) UpdateSettings(ctx context.Context, args *SettingsRequest) (*SettingsResponse, error)

type GetBalanceRequest

type GetBalanceRequest struct {
	// Account ID
	Account uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"`
}

Request for account balance

func (*GetBalanceRequest) Descriptor

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

func (*GetBalanceRequest) GetAccount

func (m *GetBalanceRequest) GetAccount() uint64

func (*GetBalanceRequest) ProtoMessage

func (*GetBalanceRequest) ProtoMessage()

func (*GetBalanceRequest) Reset

func (m *GetBalanceRequest) Reset()

func (*GetBalanceRequest) String

func (m *GetBalanceRequest) String() string

type GetBalanceResponse

type GetBalanceResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Account balance
	Balance int64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
}

Response on GetBalanceRequest

func (*GetBalanceResponse) Descriptor

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

func (*GetBalanceResponse) GetBalance

func (m *GetBalanceResponse) GetBalance() int64

func (*GetBalanceResponse) GetStatus

func (m *GetBalanceResponse) GetStatus() *Status

func (*GetBalanceResponse) ProtoMessage

func (*GetBalanceResponse) ProtoMessage()

func (*GetBalanceResponse) Reset

func (m *GetBalanceResponse) Reset()

func (*GetBalanceResponse) String

func (m *GetBalanceResponse) String() string

type GetByMetaKeyRequest

type GetByMetaKeyRequest struct {
	// Metadata keys
	Keys [][]byte `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"`
}

Request transactions by metadata keys

func (*GetByMetaKeyRequest) Descriptor

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

func (*GetByMetaKeyRequest) GetKeys

func (m *GetByMetaKeyRequest) GetKeys() [][]byte

func (*GetByMetaKeyRequest) ProtoMessage

func (*GetByMetaKeyRequest) ProtoMessage()

func (*GetByMetaKeyRequest) Reset

func (m *GetByMetaKeyRequest) Reset()

func (*GetByMetaKeyRequest) String

func (m *GetByMetaKeyRequest) String() string

type GetByMetaKeyResponse

type GetByMetaKeyResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// List of matching transactions
	Txns []*Txn `protobuf:"bytes,2,rep,name=txns" json:"txns,omitempty"`
}

Response on GetByMetaKeyRequest

func (*GetByMetaKeyResponse) Descriptor

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

func (*GetByMetaKeyResponse) GetStatus

func (m *GetByMetaKeyResponse) GetStatus() *Status

func (*GetByMetaKeyResponse) GetTxns

func (m *GetByMetaKeyResponse) GetTxns() []*Txn

func (*GetByMetaKeyResponse) ProtoMessage

func (*GetByMetaKeyResponse) ProtoMessage()

func (*GetByMetaKeyResponse) Reset

func (m *GetByMetaKeyResponse) Reset()

func (*GetByMetaKeyResponse) String

func (m *GetByMetaKeyResponse) String() string

type GetHistoryRequest

type GetHistoryRequest struct {
	// Account ID
	Account uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"`
	// Max number of transactions to return at page
	Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	// Next page token
	Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
}

Request for account transactions History

func (*GetHistoryRequest) Descriptor

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

func (*GetHistoryRequest) GetAccount

func (m *GetHistoryRequest) GetAccount() uint64

func (*GetHistoryRequest) GetLimit

func (m *GetHistoryRequest) GetLimit() uint32

func (*GetHistoryRequest) GetToken

func (m *GetHistoryRequest) GetToken() string

func (*GetHistoryRequest) ProtoMessage

func (*GetHistoryRequest) ProtoMessage()

func (*GetHistoryRequest) Reset

func (m *GetHistoryRequest) Reset()

func (*GetHistoryRequest) String

func (m *GetHistoryRequest) String() string

type GetHistoryResponse

type GetHistoryResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Transactions list
	Txns []*Txn `protobuf:"bytes,2,rep,name=txns" json:"txns,omitempty"`
	// Next page token
	Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
}

Response of GetHistoryRequest

func (*GetHistoryResponse) Descriptor

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

func (*GetHistoryResponse) GetStatus

func (m *GetHistoryResponse) GetStatus() *Status

func (*GetHistoryResponse) GetToken

func (m *GetHistoryResponse) GetToken() string

func (*GetHistoryResponse) GetTxns

func (m *GetHistoryResponse) GetTxns() []*Txn

func (*GetHistoryResponse) ProtoMessage

func (*GetHistoryResponse) ProtoMessage()

func (*GetHistoryResponse) Reset

func (m *GetHistoryResponse) Reset()

func (*GetHistoryResponse) String

func (m *GetHistoryResponse) String() string

type GetLastSettingsRequest

type GetLastSettingsRequest struct {
	// Account ID
	Account uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"`
}

Request for last account Settings

func (*GetLastSettingsRequest) Descriptor

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

func (*GetLastSettingsRequest) GetAccount

func (m *GetLastSettingsRequest) GetAccount() uint64

func (*GetLastSettingsRequest) ProtoMessage

func (*GetLastSettingsRequest) ProtoMessage()

func (*GetLastSettingsRequest) Reset

func (m *GetLastSettingsRequest) Reset()

func (*GetLastSettingsRequest) String

func (m *GetLastSettingsRequest) String() string

type GetLastSettingsResponse

type GetLastSettingsResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Last Settings ID
	Id uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
	// Last Settings Hash
	Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
	// Acccount ID
	Account uint64 `protobuf:"varint,6,opt,name=account,proto3" json:"account,omitempty"`
	// User Public Key
	PublicKey string `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Hash of Previous settings
	// None of empty if first
	PrevHash string `protobuf:"bytes,8,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	// User defined Data Hash
	DataHash string `protobuf:"bytes,9,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
	// Request Sign
	Sign string `protobuf:"bytes,10,opt,name=sign,proto3" json:"sign,omitempty"`
	// True if sign checking for requests is enabled
	VerifyTransferSign bool `protobuf:"varint,11,opt,name=verify_transfer_sign,json=verifyTransferSign,proto3" json:"verify_transfer_sign,omitempty"`
}

Response on GetLastSettingsRequest

func (*GetLastSettingsResponse) Descriptor

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

func (*GetLastSettingsResponse) GetAccount

func (m *GetLastSettingsResponse) GetAccount() uint64

func (*GetLastSettingsResponse) GetDataHash

func (m *GetLastSettingsResponse) GetDataHash() string

func (*GetLastSettingsResponse) GetHash

func (m *GetLastSettingsResponse) GetHash() string

func (*GetLastSettingsResponse) GetId

func (m *GetLastSettingsResponse) GetId() uint64

func (*GetLastSettingsResponse) GetPrevHash

func (m *GetLastSettingsResponse) GetPrevHash() string

func (*GetLastSettingsResponse) GetPublicKey

func (m *GetLastSettingsResponse) GetPublicKey() string

func (*GetLastSettingsResponse) GetSign

func (m *GetLastSettingsResponse) GetSign() string

func (*GetLastSettingsResponse) GetStatus

func (m *GetLastSettingsResponse) GetStatus() *Status

func (*GetLastSettingsResponse) GetVerifyTransferSign

func (m *GetLastSettingsResponse) GetVerifyTransferSign() bool

func (*GetLastSettingsResponse) ProtoMessage

func (*GetLastSettingsResponse) ProtoMessage()

func (*GetLastSettingsResponse) Reset

func (m *GetLastSettingsResponse) Reset()

func (*GetLastSettingsResponse) String

func (m *GetLastSettingsResponse) String() string

type GetPrevHashRequest

type GetPrevHashRequest struct {
	Account uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"`
}

Request for last transaction Hash for the Account

func (*GetPrevHashRequest) Descriptor

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

func (*GetPrevHashRequest) GetAccount

func (m *GetPrevHashRequest) GetAccount() uint64

func (*GetPrevHashRequest) ProtoMessage

func (*GetPrevHashRequest) ProtoMessage()

func (*GetPrevHashRequest) Reset

func (m *GetPrevHashRequest) Reset()

func (*GetPrevHashRequest) String

func (m *GetPrevHashRequest) String() string

type GetPrevHashResponse

type GetPrevHashResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Hash of last transaction.
	Hash string `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
}

Response on GetPrevHashRequest

func (*GetPrevHashResponse) Descriptor

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

func (*GetPrevHashResponse) GetHash

func (m *GetPrevHashResponse) GetHash() string

func (*GetPrevHashResponse) GetStatus

func (m *GetPrevHashResponse) GetStatus() *Status

func (*GetPrevHashResponse) ProtoMessage

func (*GetPrevHashResponse) ProtoMessage()

func (*GetPrevHashResponse) Reset

func (m *GetPrevHashResponse) Reset()

func (*GetPrevHashResponse) String

func (m *GetPrevHashResponse) String() string

type Meta

type Meta struct {
	// Unique key
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// Fields and values to use for indexation
	Index map[string][]byte `` /* 144-byte string literal not displayed */
	// Other fields and values
	Data map[string][]byte `` /* 142-byte string literal not displayed */
}

Metadata that could be attached to transactions

func (*Meta) Descriptor

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

func (*Meta) GetData

func (m *Meta) GetData() map[string][]byte

func (*Meta) GetIndex

func (m *Meta) GetIndex() map[string][]byte

func (*Meta) GetKey

func (m *Meta) GetKey() []byte

func (*Meta) ProtoMessage

func (*Meta) ProtoMessage()

func (*Meta) Reset

func (m *Meta) Reset()

func (*Meta) String

func (m *Meta) String() string

type PutMetaRequest

type PutMetaRequest struct {
	// Metadata to write
	Meta *Meta `protobuf:"bytes,1,opt,name=meta" json:"meta,omitempty"`
}

Request to write new metadata (or rewrite)

func (*PutMetaRequest) Descriptor

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

func (*PutMetaRequest) GetMeta

func (m *PutMetaRequest) GetMeta() *Meta

func (*PutMetaRequest) ProtoMessage

func (*PutMetaRequest) ProtoMessage()

func (*PutMetaRequest) Reset

func (m *PutMetaRequest) Reset()

func (*PutMetaRequest) String

func (m *PutMetaRequest) String() string

type PutMetaResponse

type PutMetaResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}

Response on PutMetaRequest

func (*PutMetaResponse) Descriptor

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

func (*PutMetaResponse) GetStatus

func (m *PutMetaResponse) GetStatus() *Status

func (*PutMetaResponse) ProtoMessage

func (*PutMetaResponse) ProtoMessage()

func (*PutMetaResponse) Reset

func (m *PutMetaResponse) Reset()

func (*PutMetaResponse) String

func (m *PutMetaResponse) String() string

type SearchMetaRequest

type SearchMetaRequest struct {
	// Fields and values to match
	// Only indexed fields are matched
	Index map[string][]byte `` /* 144-byte string literal not displayed */
	// Next page token
	Token []byte `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
	// Max number of items to return at page
	Limit int32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"`
}

Request for metadata by query

func (*SearchMetaRequest) Descriptor

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

func (*SearchMetaRequest) GetIndex

func (m *SearchMetaRequest) GetIndex() map[string][]byte

func (*SearchMetaRequest) GetLimit

func (m *SearchMetaRequest) GetLimit() int32

func (*SearchMetaRequest) GetToken

func (m *SearchMetaRequest) GetToken() []byte

func (*SearchMetaRequest) ProtoMessage

func (*SearchMetaRequest) ProtoMessage()

func (*SearchMetaRequest) Reset

func (m *SearchMetaRequest) Reset()

func (*SearchMetaRequest) String

func (m *SearchMetaRequest) String() string

type SearchMetaResponse

type SearchMetaResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Metadata item
	Items []*Meta `protobuf:"bytes,2,rep,name=items" json:"items,omitempty"`
	// Next page token
	NextToken []byte `protobuf:"bytes,3,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"`
}

Response on SearchMetaRequest

func (*SearchMetaResponse) Descriptor

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

func (*SearchMetaResponse) GetItems

func (m *SearchMetaResponse) GetItems() []*Meta

func (*SearchMetaResponse) GetNextToken

func (m *SearchMetaResponse) GetNextToken() []byte

func (*SearchMetaResponse) GetStatus

func (m *SearchMetaResponse) GetStatus() *Status

func (*SearchMetaResponse) ProtoMessage

func (*SearchMetaResponse) ProtoMessage()

func (*SearchMetaResponse) Reset

func (m *SearchMetaResponse) Reset()

func (*SearchMetaResponse) String

func (m *SearchMetaResponse) String() string

type SettingsRequest

type SettingsRequest struct {
	// Account ID
	Account uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"`
	// New Public Key
	PublicKey string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// Hash of last Account Settings, omit or empty if first
	PrevHash string `protobuf:"bytes,3,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	// User defined Data Hash
	DataHash string `protobuf:"bytes,4,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
	// Transaction Sign
	Sign string `protobuf:"bytes,5,opt,name=sign,proto3" json:"sign,omitempty"`
	// Enables sign checking for following requests
	VerifyTransferSign bool `protobuf:"varint,6,opt,name=verify_transfer_sign,json=verifyTransferSign,proto3" json:"verify_transfer_sign,omitempty"`
}

Request to change account settings

func (*SettingsRequest) Descriptor

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

func (*SettingsRequest) GetAccount

func (m *SettingsRequest) GetAccount() uint64

func (*SettingsRequest) GetDataHash

func (m *SettingsRequest) GetDataHash() string

func (*SettingsRequest) GetPrevHash

func (m *SettingsRequest) GetPrevHash() string

func (*SettingsRequest) GetPublicKey

func (m *SettingsRequest) GetPublicKey() string

func (*SettingsRequest) GetSign

func (m *SettingsRequest) GetSign() string

func (*SettingsRequest) GetVerifyTransferSign

func (m *SettingsRequest) GetVerifyTransferSign() bool

func (*SettingsRequest) ProtoMessage

func (*SettingsRequest) ProtoMessage()

func (*SettingsRequest) Reset

func (m *SettingsRequest) Reset()

func (*SettingsRequest) String

func (m *SettingsRequest) String() string

type SettingsResponse

type SettingsResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Last account Settings ID
	SettingsId string `protobuf:"bytes,2,opt,name=settings_id,json=settingsId,proto3" json:"settings_id,omitempty"`
	// Last account Settings Hash
	Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
}

Response on SettingsRequest

func (*SettingsResponse) Descriptor

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

func (*SettingsResponse) GetHash

func (m *SettingsResponse) GetHash() string

func (*SettingsResponse) GetSettingsId

func (m *SettingsResponse) GetSettingsId() string

func (*SettingsResponse) GetStatus

func (m *SettingsResponse) GetStatus() *Status

func (*SettingsResponse) ProtoMessage

func (*SettingsResponse) ProtoMessage()

func (*SettingsResponse) Reset

func (m *SettingsResponse) Reset()

func (*SettingsResponse) String

func (m *SettingsResponse) String() string

type Status

type Status struct {
	// A simple error code that can be easily handled by the client.
	Code TransferCode `protobuf:"varint,1,opt,name=code,proto3,enum=api.TransferCode" json:"code,omitempty"`
	// A developer-facing human-readable error message in English. It should
	// both explain the error and offer an actionable resolution to it.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// Additional error information that the client code can use to handle
	// the error, such as retry delay or a help link.
	Details []*google_protobuf.Any `protobuf:"bytes,3,rep,name=details" json:"details,omitempty"`
}

Status field. It's a part of every response.

func (*Status) Descriptor

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

func (*Status) GetCode

func (m *Status) GetCode() TransferCode

func (*Status) GetDetails

func (m *Status) GetDetails() []*google_protobuf.Any

func (*Status) GetMessage

func (m *Status) GetMessage() string

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) Reset

func (m *Status) Reset()

func (*Status) String

func (m *Status) String() string

type TCPRPCAPIServiceClient

type TCPRPCAPIServiceClient struct {
	// contains filtered or unexported fields
}

func NewTCPRPCAPIServiceClient

func NewTCPRPCAPIServiceClient(cl *tcprpc.Client, pref string) TCPRPCAPIServiceClient

func (TCPRPCAPIServiceClient) GetBalance

func (TCPRPCAPIServiceClient) GetByMetaKey

func (TCPRPCAPIServiceClient) GetHistory

func (TCPRPCAPIServiceClient) GetLastSettings

func (TCPRPCAPIServiceClient) GetPrevHash

func (TCPRPCAPIServiceClient) ProcessTransfer

func (cl TCPRPCAPIServiceClient) ProcessTransfer(ctx context.Context, args *TransferRequest) (*TransferResponse, error)

func (TCPRPCAPIServiceClient) PutMeta

func (TCPRPCAPIServiceClient) SearchMeta

func (TCPRPCAPIServiceClient) UpdateSettings

func (cl TCPRPCAPIServiceClient) UpdateSettings(ctx context.Context, args *SettingsRequest) (*SettingsResponse, error)

type TransferCode

type TransferCode int32

Response Status code

const (
	TransferCode_OK                TransferCode = 0
	TransferCode_INVALID_PREV_HASH TransferCode = 1
	TransferCode_INVALID_SIGN      TransferCode = 2
	TransferCode_BAD_REQUEST       TransferCode = 3
	TransferCode_NO_BALANCE        TransferCode = 4
	TransferCode_INTERNAL_ERROR    TransferCode = 5
	TransferCode_RETRY             TransferCode = 7
	TransferCode_METADATA_ERROR    TransferCode = 8
)

func (TransferCode) EnumDescriptor

func (TransferCode) EnumDescriptor() ([]byte, []int)

func (TransferCode) String

func (x TransferCode) String() string

type TransferItem

type TransferItem struct {
	// Receiver ID
	Receiver uint64 `protobuf:"varint,1,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Amount to send to that Receiver
	Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
}

Receiver and amount item for TransferRequest.

func (*TransferItem) Descriptor

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

func (*TransferItem) GetAmount

func (m *TransferItem) GetAmount() int64

func (*TransferItem) GetReceiver

func (m *TransferItem) GetReceiver() uint64

func (*TransferItem) ProtoMessage

func (*TransferItem) ProtoMessage()

func (*TransferItem) Reset

func (m *TransferItem) Reset()

func (*TransferItem) String

func (m *TransferItem) String() string

type TransferRequest

type TransferRequest struct {
	// Value Sender
	Sender uint64 `protobuf:"varint,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// List of receiver IDs and amounts
	Batch []*TransferItem `protobuf:"bytes,2,rep,name=batch" json:"batch,omitempty"`
	// ID of actual account settings
	SettingsId uint64 `protobuf:"varint,3,opt,name=settings_id,json=settingsId,proto3" json:"settings_id,omitempty"`
	// Hash sum of the previous transaction (omit or "" if first)
	PrevHash string `protobuf:"bytes,4,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	// Request Sign
	Sign string `protobuf:"bytes,5,opt,name=sign,proto3" json:"sign,omitempty"`
	// Optional metadata to save in metadb if enabled
	Metadata *Meta `protobuf:"bytes,6,opt,name=metadata" json:"metadata,omitempty"`
}

Request to transfer value to one or more receivers

func (*TransferRequest) Descriptor

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

func (*TransferRequest) GetBatch

func (m *TransferRequest) GetBatch() []*TransferItem

func (*TransferRequest) GetMetadata

func (m *TransferRequest) GetMetadata() *Meta

func (*TransferRequest) GetPrevHash

func (m *TransferRequest) GetPrevHash() string

func (*TransferRequest) GetSender

func (m *TransferRequest) GetSender() uint64

func (*TransferRequest) GetSettingsId

func (m *TransferRequest) GetSettingsId() uint64

func (*TransferRequest) GetSign

func (m *TransferRequest) GetSign() string

func (*TransferRequest) ProtoMessage

func (*TransferRequest) ProtoMessage()

func (*TransferRequest) Reset

func (m *TransferRequest) Reset()

func (*TransferRequest) String

func (m *TransferRequest) String() string

type TransferResponse

type TransferResponse struct {
	// Operation Status
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	// Last transaction BatchID
	TxnId string `protobuf:"bytes,2,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"`
	// Last transaction Hash
	// To use it in the next request
	Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	// Last Settings ID
	SettingsId uint64 `protobuf:"varint,4,opt,name=settings_id,json=settingsId,proto3" json:"settings_id,omitempty"`
}

Response on TransferRequest

func (*TransferResponse) Descriptor

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

func (*TransferResponse) GetHash

func (m *TransferResponse) GetHash() string

func (*TransferResponse) GetSettingsId

func (m *TransferResponse) GetSettingsId() uint64

func (*TransferResponse) GetStatus

func (m *TransferResponse) GetStatus() *Status

func (*TransferResponse) GetTxnId

func (m *TransferResponse) GetTxnId() string

func (*TransferResponse) ProtoMessage

func (*TransferResponse) ProtoMessage()

func (*TransferResponse) Reset

func (m *TransferResponse) Reset()

func (*TransferResponse) String

func (m *TransferResponse) String() string

type Txn

type Txn struct {
	// Transaction ID
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// Sender
	Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"`
	// Receiver
	Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// Amount
	Amount string `protobuf:"bytes,6,opt,name=amount,proto3" json:"amount,omitempty"`
	// Sender balance just after that transaction processed
	Balance string `protobuf:"bytes,7,opt,name=balance,proto3" json:"balance,omitempty"`
	// Receiver transaction ID which is taken into accout value of current
	// transaction
	SpentBy string `protobuf:"bytes,9,opt,name=spent_by,json=spentBy,proto3" json:"spent_by,omitempty"`
	// Hash of previous transaction
	PrevHash string `protobuf:"bytes,10,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	// Actual settings ID at moment of transaction processing
	SettingsId string `protobuf:"bytes,12,opt,name=settings_id,json=settingsId,proto3" json:"settings_id,omitempty"`
	// Request Sign
	Sign string `protobuf:"bytes,13,opt,name=sign,proto3" json:"sign,omitempty"`
	// Request Hash
	Hash string `protobuf:"bytes,21,opt,name=hash,proto3" json:"hash,omitempty"`
	// Metadata attached
	Meta *Meta `protobuf:"bytes,14,opt,name=meta" json:"meta,omitempty"`
}

Human-friendly representation of Txn

func (*Txn) Descriptor

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

func (*Txn) GetAmount

func (m *Txn) GetAmount() string

func (*Txn) GetBalance

func (m *Txn) GetBalance() string

func (*Txn) GetHash

func (m *Txn) GetHash() string

func (*Txn) GetId

func (m *Txn) GetId() string

func (*Txn) GetMeta

func (m *Txn) GetMeta() *Meta

func (*Txn) GetPrevHash

func (m *Txn) GetPrevHash() string

func (*Txn) GetReceiver

func (m *Txn) GetReceiver() string

func (*Txn) GetSender

func (m *Txn) GetSender() string

func (*Txn) GetSettingsId

func (m *Txn) GetSettingsId() string

func (*Txn) GetSign

func (m *Txn) GetSign() string

func (*Txn) GetSpentBy

func (m *Txn) GetSpentBy() string

func (*Txn) ProtoMessage

func (*Txn) ProtoMessage()

func (*Txn) Reset

func (m *Txn) Reset()

func (*Txn) String

func (m *Txn) String() string

Jump to

Keyboard shortcuts

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