gatepb

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: 6 Imported by: 5

Documentation

Overview

Package gatepb is a generated protocol buffer package.

Gate Service

Gate API consists of a single service which operate accounts, account settings and funds.

It is generated from these files:

gate_service.proto

It has these top-level messages:

Status
RouteMap
TestRouteMapAnotherType
TransferItem
TransferRequest
TransferResponse
GetPrevHashRequest
GetPrevHashResponse
GetBalanceRequest
GetBalanceResponse
SettingsRequest
SettingsResponse
GetLastSettingsRequest
GetLastSettingsResponse

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",
	6: "SEE_OTHER",
	7: "RETRY",
}
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,
	"SEE_OTHER":         6,
	"RETRY":             7,
}

Functions

func RegisterProcessorServiceHandlers

func RegisterProcessorServiceHandlers(s *tcprpc.Server, prefix string, srv ProcessorServiceInterface)

Types

type GetBalanceRequest

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

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 {
	Status  *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Balance int64   `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"`
}

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 GetLastSettingsRequest

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

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 {
	Status             *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Id                 uint64  `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
	Hash               string  `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"`
	Account            uint64  `protobuf:"varint,6,opt,name=account,proto3" json:"account,omitempty"`
	PublicKey          string  `protobuf:"bytes,7,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	PrevHash           string  `protobuf:"bytes,8,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	DataHash           string  `protobuf:"bytes,9,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
	Sign               string  `protobuf:"bytes,10,opt,name=sign,proto3" json:"sign,omitempty"`
	VerifyTransferSign bool    `protobuf:"varint,11,opt,name=verify_transfer_sign,json=verifyTransferSign,proto3" json:"verify_transfer_sign,omitempty"`
}

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"`
}

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 {
	Status *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	Hash   string  `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
}

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 RouteMap

type RouteMap struct {
	// TODO: type switch - ketama,gossip,etc...
	Type    uint32   `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	Version uint32   `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	Target  string   `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
	Nodes   []string `protobuf:"bytes,4,rep,name=nodes" json:"nodes,omitempty"`
}

func (*RouteMap) Descriptor

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

func (*RouteMap) GetNodes

func (m *RouteMap) GetNodes() []string

func (*RouteMap) GetTarget

func (m *RouteMap) GetTarget() string

func (*RouteMap) GetType

func (m *RouteMap) GetType() uint32

func (*RouteMap) GetVersion

func (m *RouteMap) GetVersion() uint32

func (*RouteMap) ProtoMessage

func (*RouteMap) ProtoMessage()

func (*RouteMap) Reset

func (m *RouteMap) Reset()

func (*RouteMap) String

func (m *RouteMap) String() string

type SettingsRequest

type SettingsRequest struct {
	Account            uint64 `protobuf:"varint,1,opt,name=account,proto3" json:"account,omitempty"`
	PublicKey          string `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	PrevHash           string `protobuf:"bytes,3,opt,name=prev_hash,json=prevHash,proto3" json:"prev_hash,omitempty"`
	DataHash           string `protobuf:"bytes,4,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
	Sign               string `protobuf:"bytes,5,opt,name=sign,proto3" json:"sign,omitempty"`
	VerifyTransferSign bool   `protobuf:"varint,6,opt,name=verify_transfer_sign,json=verifyTransferSign,proto3" json:"verify_transfer_sign,omitempty"`
}

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 {
	Status     *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	SettingsId string  `protobuf:"bytes,2,opt,name=settings_id,json=settingsId,proto3" json:"settings_id,omitempty"`
	Hash       string  `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
}

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=gate.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"`
}

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 TCPRPCProcessorServiceClient

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

func NewTCPRPCProcessorServiceClient

func NewTCPRPCProcessorServiceClient(cl *tcprpc.Client, pref string) TCPRPCProcessorServiceClient

func (TCPRPCProcessorServiceClient) GetBalance

func (TCPRPCProcessorServiceClient) GetLastSettings

func (TCPRPCProcessorServiceClient) GetPrevHash

func (TCPRPCProcessorServiceClient) ProcessTransfer

func (TCPRPCProcessorServiceClient) UpdateSettings

type TestRouteMapAnotherType

type TestRouteMapAnotherType struct {
	Type    uint32   `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	Version uint32   `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	Target  string   `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
	Nodes   []string `protobuf:"bytes,4,rep,name=nodes" json:"nodes,omitempty"`
}

func (*TestRouteMapAnotherType) Descriptor

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

func (*TestRouteMapAnotherType) GetNodes

func (m *TestRouteMapAnotherType) GetNodes() []string

func (*TestRouteMapAnotherType) GetTarget

func (m *TestRouteMapAnotherType) GetTarget() string

func (*TestRouteMapAnotherType) GetType

func (m *TestRouteMapAnotherType) GetType() uint32

func (*TestRouteMapAnotherType) GetVersion

func (m *TestRouteMapAnotherType) GetVersion() uint32

func (*TestRouteMapAnotherType) ProtoMessage

func (*TestRouteMapAnotherType) ProtoMessage()

func (*TestRouteMapAnotherType) Reset

func (m *TestRouteMapAnotherType) Reset()

func (*TestRouteMapAnotherType) String

func (m *TestRouteMapAnotherType) String() string

type TransferCode

type TransferCode int32
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_SEE_OTHER         TransferCode = 6
	TransferCode_RETRY             TransferCode = 7
)

func (TransferCode) EnumDescriptor

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

func (TransferCode) String

func (x TransferCode) String() string

type TransferItem

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

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 {
	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"`
	Sign     string `protobuf:"bytes,5,opt,name=sign,proto3" json:"sign,omitempty"`
}

func (*TransferRequest) Descriptor

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

func (*TransferRequest) GetBatch

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

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 {
	Status     *Status `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
	TxnId      string  `protobuf:"bytes,2,opt,name=txn_id,json=txnId,proto3" json:"txn_id,omitempty"`
	Hash       string  `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	Account    uint64  `protobuf:"varint,4,opt,name=account,proto3" json:"account,omitempty"`
	Id         uint64  `protobuf:"varint,5,opt,name=id,proto3" json:"id,omitempty"`
	SettingsId uint64  `protobuf:"varint,6,opt,name=settings_id,json=settingsId,proto3" json:"settings_id,omitempty"`
}

func (*TransferResponse) Descriptor

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

func (*TransferResponse) GetAccount

func (m *TransferResponse) GetAccount() uint64

func (*TransferResponse) GetHash

func (m *TransferResponse) GetHash() string

func (*TransferResponse) GetId

func (m *TransferResponse) GetId() uint64

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

Jump to

Keyboard shortcuts

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