exchange

package
v0.0.0-...-25cadc1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package exchange is a generated protocol buffer package.

It is generated from these files:

exchange.proto

It has these top-level messages:

PushRequest
BuyAssetResponse
QueryRequest
GetTxListResponse
QueryTxData
TxRow
TransferRequest
TransferResponse
QueryTransferRequest
QueryTransferResponse
IsBuyAssetRequest
IsBuyAssetResponse

Package exchange is a generated protocol buffer package.

It is generated from these files:

exchange.proto

It has these top-level messages:

PushRequest
BuyAssetResponse
QueryRequest
GetTxListResponse
QueryTxData
TxRow
TransferRequest
TransferResponse
QueryTransferRequest
QueryTransferResponse
IsBuyAssetRequest
IsBuyAssetResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterExchangeHandler

func RegisterExchangeHandler(s server.Server, hdlr ExchangeHandler, opts ...server.HandlerOption)

Types

type BuyAssetResponse

type BuyAssetResponse struct {
	Code uint32 `protobuf:"varint,1,opt,name=code" json:"code"`
	Data string `protobuf:"bytes,2,opt,name=data" json:"data"`
	Msg  string `protobuf:"bytes,3,opt,name=msg" json:"msg"`
}

func (*BuyAssetResponse) Descriptor

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

func (*BuyAssetResponse) GetCode

func (m *BuyAssetResponse) GetCode() uint32

func (*BuyAssetResponse) GetData

func (m *BuyAssetResponse) GetData() string

func (*BuyAssetResponse) GetMsg

func (m *BuyAssetResponse) GetMsg() string

func (*BuyAssetResponse) ProtoMessage

func (*BuyAssetResponse) ProtoMessage()

func (*BuyAssetResponse) Reset

func (m *BuyAssetResponse) Reset()

func (*BuyAssetResponse) String

func (m *BuyAssetResponse) String() string

type Exchange

type Exchange struct {
	ExchangeHandler
}

func (*Exchange) BuyAsset

func (h *Exchange) BuyAsset(ctx context.Context, in *PushRequest, out *BuyAssetResponse) error

func (*Exchange) CancelCredit

func (h *Exchange) CancelCredit(ctx context.Context, in *PushRequest, out *BuyAssetResponse) error

func (*Exchange) GrantCredit

func (h *Exchange) GrantCredit(ctx context.Context, in *PushRequest, out *BuyAssetResponse) error

func (*Exchange) IsBuyAsset

func (h *Exchange) IsBuyAsset(ctx context.Context, in *IsBuyAssetRequest, out *IsBuyAssetResponse) error

type ExchangeClient

type ExchangeClient interface {
	BuyAsset(ctx context.Context, in *PushRequest, opts ...client.CallOption) (*BuyAssetResponse, error)
	IsBuyAsset(ctx context.Context, in *IsBuyAssetRequest, opts ...client.CallOption) (*IsBuyAssetResponse, error)
	GrantCredit(ctx context.Context, in *PushRequest, opts ...client.CallOption) (*BuyAssetResponse, error)
	CancelCredit(ctx context.Context, in *PushRequest, opts ...client.CallOption) (*BuyAssetResponse, error)
}

func NewExchangeClient

func NewExchangeClient(serviceName string, c client.Client) ExchangeClient

type GetTxListResponse

type GetTxListResponse struct {
	Code uint32       `protobuf:"varint,1,opt,name=code" json:"code"`
	Data *QueryTxData `protobuf:"bytes,2,opt,name=data" json:"data"`
	Msg  string       `protobuf:"bytes,3,opt,name=msg" json:"msg"`
}

func (*GetTxListResponse) Descriptor

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

func (*GetTxListResponse) GetCode

func (m *GetTxListResponse) GetCode() uint32

func (*GetTxListResponse) GetData

func (m *GetTxListResponse) GetData() *QueryTxData

func (*GetTxListResponse) GetMsg

func (m *GetTxListResponse) GetMsg() string

func (*GetTxListResponse) ProtoMessage

func (*GetTxListResponse) ProtoMessage()

func (*GetTxListResponse) Reset

func (m *GetTxListResponse) Reset()

func (*GetTxListResponse) String

func (m *GetTxListResponse) String() string

type IsBuyAssetRequest

type IsBuyAssetRequest struct {
	PageSize  uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size"`
	PageNum   uint32 `protobuf:"varint,2,opt,name=page_num,json=pageNum" json:"page_num"`
	Username  string `protobuf:"bytes,3,opt,name=username" json:"username"`
	Random    string `protobuf:"bytes,4,opt,name=random" json:"random"`
	Signature string `protobuf:"bytes,5,opt,name=signature" json:"signature"`
	AssetId   string `protobuf:"bytes,6,opt,name=asset_id,json=assetId" json:"asset_id"`
}

func (*IsBuyAssetRequest) Descriptor

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

func (*IsBuyAssetRequest) GetAssetId

func (m *IsBuyAssetRequest) GetAssetId() string

func (*IsBuyAssetRequest) GetPageNum

func (m *IsBuyAssetRequest) GetPageNum() uint32

func (*IsBuyAssetRequest) GetPageSize

func (m *IsBuyAssetRequest) GetPageSize() uint32

func (*IsBuyAssetRequest) GetRandom

func (m *IsBuyAssetRequest) GetRandom() string

func (*IsBuyAssetRequest) GetSignature

func (m *IsBuyAssetRequest) GetSignature() string

func (*IsBuyAssetRequest) GetUsername

func (m *IsBuyAssetRequest) GetUsername() string

func (*IsBuyAssetRequest) ProtoMessage

func (*IsBuyAssetRequest) ProtoMessage()

func (*IsBuyAssetRequest) Reset

func (m *IsBuyAssetRequest) Reset()

func (*IsBuyAssetRequest) String

func (m *IsBuyAssetRequest) String() string

type IsBuyAssetResponse

type IsBuyAssetResponse struct {
	Code uint32 `protobuf:"varint,1,opt,name=code" json:"code"`
	Data string `protobuf:"bytes,2,opt,name=data" json:"data"`
	Msg  string `protobuf:"bytes,3,opt,name=msg" json:"msg"`
}

func (*IsBuyAssetResponse) Descriptor

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

func (*IsBuyAssetResponse) GetCode

func (m *IsBuyAssetResponse) GetCode() uint32

func (*IsBuyAssetResponse) GetData

func (m *IsBuyAssetResponse) GetData() string

func (*IsBuyAssetResponse) GetMsg

func (m *IsBuyAssetResponse) GetMsg() string

func (*IsBuyAssetResponse) ProtoMessage

func (*IsBuyAssetResponse) ProtoMessage()

func (*IsBuyAssetResponse) Reset

func (m *IsBuyAssetResponse) Reset()

func (*IsBuyAssetResponse) String

func (m *IsBuyAssetResponse) String() string

type PushRequest

type PushRequest struct {
	Version     uint32 `protobuf:"varint,1,opt,name=version" json:"version"`
	CursorNum   uint32 `protobuf:"varint,2,opt,name=cursor_num,json=cursorNum" json:"cursor_num"`
	CursorLabel uint32 `protobuf:"varint,3,opt,name=cursor_label,json=cursorLabel" json:"cursor_label"`
	Lifetime    uint64 `protobuf:"varint,4,opt,name=lifetime" json:"lifetime"`
	Sender      string `protobuf:"bytes,5,opt,name=sender" json:"sender"`
	Contract    string `protobuf:"bytes,6,opt,name=contract" json:"contract"`
	Method      string `protobuf:"bytes,7,opt,name=method" json:"method"`
	Param       string `protobuf:"bytes,8,opt,name=param" json:"param"`
	SigAlg      uint32 `protobuf:"varint,9,opt,name=sig_alg,json=sigAlg" json:"sig_alg"`
	Signature   string `protobuf:"bytes,10,opt,name=signature" json:"signature"`
}

func (*PushRequest) Descriptor

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

func (*PushRequest) GetContract

func (m *PushRequest) GetContract() string

func (*PushRequest) GetCursorLabel

func (m *PushRequest) GetCursorLabel() uint32

func (*PushRequest) GetCursorNum

func (m *PushRequest) GetCursorNum() uint32

func (*PushRequest) GetLifetime

func (m *PushRequest) GetLifetime() uint64

func (*PushRequest) GetMethod

func (m *PushRequest) GetMethod() string

func (*PushRequest) GetParam

func (m *PushRequest) GetParam() string

func (*PushRequest) GetSender

func (m *PushRequest) GetSender() string

func (*PushRequest) GetSigAlg

func (m *PushRequest) GetSigAlg() uint32

func (*PushRequest) GetSignature

func (m *PushRequest) GetSignature() string

func (*PushRequest) GetVersion

func (m *PushRequest) GetVersion() uint32

func (*PushRequest) ProtoMessage

func (*PushRequest) ProtoMessage()

func (*PushRequest) Reset

func (m *PushRequest) Reset()

func (*PushRequest) String

func (m *PushRequest) String() string

type QueryRequest

type QueryRequest struct {
	PageSize  uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size"`
	PageNum   uint32 `protobuf:"varint,2,opt,name=page_num,json=pageNum" json:"page_num"`
	Username  string `protobuf:"bytes,3,opt,name=username" json:"username"`
	Random    string `protobuf:"bytes,4,opt,name=random" json:"random"`
	Signature string `protobuf:"bytes,5,opt,name=signature" json:"signature"`
}

func (*QueryRequest) Descriptor

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

func (*QueryRequest) GetPageNum

func (m *QueryRequest) GetPageNum() uint32

func (*QueryRequest) GetPageSize

func (m *QueryRequest) GetPageSize() uint32

func (*QueryRequest) GetRandom

func (m *QueryRequest) GetRandom() string

func (*QueryRequest) GetSignature

func (m *QueryRequest) GetSignature() string

func (*QueryRequest) GetUsername

func (m *QueryRequest) GetUsername() string

func (*QueryRequest) ProtoMessage

func (*QueryRequest) ProtoMessage()

func (*QueryRequest) Reset

func (m *QueryRequest) Reset()

func (*QueryRequest) String

func (m *QueryRequest) String() string

type QueryTransferRequest

type QueryTransferRequest struct {
	Username  string `protobuf:"bytes,1,opt,name=username" json:"username"`
	SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId" json:"session_id"`
	Random    string `protobuf:"bytes,3,opt,name=random" json:"random"`
	Signature string `protobuf:"bytes,4,opt,name=signature" json:"signature"`
}

func (*QueryTransferRequest) Descriptor

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

func (*QueryTransferRequest) GetRandom

func (m *QueryTransferRequest) GetRandom() string

func (*QueryTransferRequest) GetSessionId

func (m *QueryTransferRequest) GetSessionId() string

func (*QueryTransferRequest) GetSignature

func (m *QueryTransferRequest) GetSignature() string

func (*QueryTransferRequest) GetUsername

func (m *QueryTransferRequest) GetUsername() string

func (*QueryTransferRequest) ProtoMessage

func (*QueryTransferRequest) ProtoMessage()

func (*QueryTransferRequest) Reset

func (m *QueryTransferRequest) Reset()

func (*QueryTransferRequest) String

func (m *QueryTransferRequest) String() string

type QueryTransferResponse

type QueryTransferResponse struct {
	Code uint32 `protobuf:"varint,1,opt,name=code" json:"code"`
	Data string `protobuf:"bytes,2,opt,name=data" json:"data"`
	Msg  string `protobuf:"bytes,3,opt,name=msg" json:"msg"`
}

func (*QueryTransferResponse) Descriptor

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

func (*QueryTransferResponse) GetCode

func (m *QueryTransferResponse) GetCode() uint32

func (*QueryTransferResponse) GetData

func (m *QueryTransferResponse) GetData() string

func (*QueryTransferResponse) GetMsg

func (m *QueryTransferResponse) GetMsg() string

func (*QueryTransferResponse) ProtoMessage

func (*QueryTransferResponse) ProtoMessage()

func (*QueryTransferResponse) Reset

func (m *QueryTransferResponse) Reset()

func (*QueryTransferResponse) String

func (m *QueryTransferResponse) String() string

type QueryTxData

type QueryTxData struct {
	PageNum  uint64   `protobuf:"varint,1,opt,name=pageNum" json:"pageNum"`
	RowCount uint64   `protobuf:"varint,2,opt,name=rowCount" json:"rowCount"`
	Row      []*TxRow `protobuf:"bytes,3,rep,name=row" json:"row"`
}

func (*QueryTxData) Descriptor

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

func (*QueryTxData) GetPageNum

func (m *QueryTxData) GetPageNum() uint64

func (*QueryTxData) GetRow

func (m *QueryTxData) GetRow() []*TxRow

func (*QueryTxData) GetRowCount

func (m *QueryTxData) GetRowCount() uint64

func (*QueryTxData) ProtoMessage

func (*QueryTxData) ProtoMessage()

func (*QueryTxData) Reset

func (m *QueryTxData) Reset()

func (*QueryTxData) String

func (m *QueryTxData) String() string

type TransferRequest

type TransferRequest struct {
	PostBody string `protobuf:"bytes,1,opt,name=postBody" json:"postBody"`
}

func (*TransferRequest) Descriptor

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

func (*TransferRequest) GetPostBody

func (m *TransferRequest) GetPostBody() 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 {
	Code uint32 `protobuf:"varint,1,opt,name=code" json:"code"`
	Data string `protobuf:"bytes,2,opt,name=data" json:"data"`
	Msg  string `protobuf:"bytes,3,opt,name=msg" json:"msg"`
}

func (*TransferResponse) Descriptor

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

func (*TransferResponse) GetCode

func (m *TransferResponse) GetCode() uint32

func (*TransferResponse) GetData

func (m *TransferResponse) GetData() string

func (*TransferResponse) GetMsg

func (m *TransferResponse) GetMsg() string

func (*TransferResponse) ProtoMessage

func (*TransferResponse) ProtoMessage()

func (*TransferResponse) Reset

func (m *TransferResponse) Reset()

func (*TransferResponse) String

func (m *TransferResponse) String() string

type TxRow

type TxRow struct {
	TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId" json:"transaction_id"`
	From          string `protobuf:"bytes,2,opt,name=from" json:"from"`
	To            string `protobuf:"bytes,3,opt,name=to" json:"to"`
	Price         uint64 `protobuf:"varint,4,opt,name=price" json:"price"`
	Type          string `protobuf:"bytes,5,opt,name=type" json:"type"`
	Date          string `protobuf:"bytes,6,opt,name=date" json:"date"`
	BlockId       uint64 `protobuf:"varint,7,opt,name=block_id,json=blockId" json:"block_id"`
}

func (*TxRow) Descriptor

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

func (*TxRow) GetBlockId

func (m *TxRow) GetBlockId() uint64

func (*TxRow) GetDate

func (m *TxRow) GetDate() string

func (*TxRow) GetFrom

func (m *TxRow) GetFrom() string

func (*TxRow) GetPrice

func (m *TxRow) GetPrice() uint64

func (*TxRow) GetTo

func (m *TxRow) GetTo() string

func (*TxRow) GetTransactionId

func (m *TxRow) GetTransactionId() string

func (*TxRow) GetType

func (m *TxRow) GetType() string

func (*TxRow) ProtoMessage

func (*TxRow) ProtoMessage()

func (*TxRow) Reset

func (m *TxRow) Reset()

func (*TxRow) String

func (m *TxRow) String() string

Jump to

Keyboard shortcuts

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