Documentation
¶
Index ¶
- Variables
- func GetType(msg OutgoingMessager) (string, error)
- func RegisterIncomingMessage(typeName string, obj interface{})
- func RegisterOutgoingMessage(typeName string, obj interface{})
- func SetType(msg OutgoingMessager) error
- type Account
- type ActionTrace
- type CommonIn
- type CommonOut
- type Error
- type FormattedTransaction
- type ForumPost
- type ForumProposition
- type ForumVote
- type GetAccount
- type GetAccountData
- type GetActionTraces
- type GetForumProposition
- type GetHeadInfo
- type GetPrice
- type GetTableRows
- type GetTableRowsData
- type GetTransaction
- type GetVoteTally
- type HeadInfo
- type HeadInfoData
- type IncomingMessage
- type IncomingMessager
- type Listening
- type M
- type OutgoingMessager
- type Ping
- type PriceResp
- type Progress
- type RAMOut
- type TableDelta
- type TableSnapshot
- type TicketDataQuote
- type TransactionLifecycle
- type Unlisten
- type Unlistened
- type Validator
- type VoteTally
- type VoteTallyData
Constants ¶
This section is empty.
Variables ¶
View Source
var IncomingMessageMap = map[string]reflect.Type{}
Message registration
View Source
var IncomingStructMap = map[reflect.Type]string{}
View Source
var OutgoingMessageMap = map[string]reflect.Type{}
View Source
var OutgoingStructMap = map[reflect.Type]string{}
Functions ¶
func GetType ¶
func GetType(msg OutgoingMessager) (string, error)
GetType retrieves the message `type` on a Common outgoing structure.
func RegisterIncomingMessage ¶
func RegisterIncomingMessage(typeName string, obj interface{})
func RegisterOutgoingMessage ¶
func RegisterOutgoingMessage(typeName string, obj interface{})
func SetType ¶
func SetType(msg OutgoingMessager) error
SetType sets the `type` on a Common outgoing structure.
Types ¶
type Account ¶
type ActionTrace ¶
type ActionTrace struct { CommonOut Data struct { BlockNum uint32 `json:"block_num"` BlockID string `json:"block_id"` BlockTime time.Time `json:"block_time"` TransactionID string `json:"trx_id"` ActionIndex int `json:"idx"` //ActionDepth int `json:"depth"` Trace json.RawMessage `json:"trace"` DBOps []*v0.DBOp `json:"dbops,omitempty"` RAMOps []*v0.RAMOp `json:"ramops,omitempty"` DTrxOps []*v0.DTrxOp `json:"dtrxops,omitempty"` TableOps []*v0.TableOp `json:"tableops,omitempty"` } `json:"data"` }
func NewActionTrace ¶
func NewActionTrace(trxid string, actionIndex int, trace json.RawMessage) *ActionTrace
type CommonIn ¶
type CommonIn struct { Type string `json:"type"` ReqID string `json:"req_id,omitempty"` Fetch bool `json:"fetch,omitempty"` Listen bool `json:"listen,omitempty"` StartBlock int64 `json:"start_block,omitempty"` IrreversibleOnly bool `json:"irreversible_only,omitempty"` WithProgress int64 `json:"with_progress,omitempty"` // send progress each X blocks }
func (CommonIn) GetWithProgress ¶
type Error ¶
type Error struct { CommonOut Data *derr.ErrorResponse `json:"data"` }
type FormattedTransaction ¶
type FormattedTransaction struct { CommonOut Data json.RawMessage `json:"data"` }
type ForumPost ¶
func NewForumPost ¶
type ForumProposition ¶
type ForumProposition struct { CommonOut Data *mdl.Proposition `json:"data"` }
func NewProposition ¶
func NewProposition(proposition *mdl.Proposition) *ForumProposition
type ForumVote ¶
func NewForumVote ¶
type GetAccount ¶
type GetAccount struct { CommonIn Data *GetAccountData `json:"data"` }
type GetActionTraces ¶
type GetActionTraces struct { CommonIn // TODO: Allow filtering by authorization accounts on DB ops Data struct { Receiver zsw.AccountName `json:"receiver"` // deprecated (keep plural form) Account zsw.AccountName `json:"account"` // deprecated (keep plural form) ActionName zsw.ActionName `json:"action_name"` // deprecated (keep plural form) Receivers string `json:"receivers"` Accounts string `json:"accounts"` ActionNames string `json:"action_names"` WithInlineTraces bool `json:"with_inline_traces"` WithDBOps bool `json:"with_dbops"` WithRAMOps bool `json:"with_ramops"` WithDTrxOps bool `json:"with_dtrxops"` WithTableOps bool `json:"with_tableops"` } `json:"data"` }
type GetForumProposition ¶
type GetHeadInfo ¶
type GetHeadInfo struct {
CommonIn
}
func (*GetHeadInfo) Validate ¶
func (m *GetHeadInfo) Validate() error
type GetTableRows ¶
type GetTableRows struct { CommonIn Data GetTableRowsData `json:"data"` }
type GetTableRowsData ¶
type GetTableRowsData struct { JSON bool `json:"json,omitempty"` Code zsw.AccountName `json:"code"` Scope *zsw.Name `json:"scope"` TableName zsw.TableName `json:"table"` }
INCOMING
type GetTransaction ¶
type GetVoteTally ¶
type GetVoteTally struct {
CommonIn
}
type HeadInfo ¶
type HeadInfo struct { CommonOut Data *HeadInfoData `json:"data"` }
type HeadInfoData ¶
type HeadInfoData struct { LastIrreversibleBlockNum uint32 `json:"last_irreversible_block_num"` LastIrreversibleBlockId string `json:"last_irreversible_block_id"` HeadBlockNum uint32 `json:"head_block_num"` HeadBlockId string `json:"head_block_id"` HeadBlockTime time.Time `json:"head_block_time"` HeadBlockProducer string `json:"head_block_producer"` }
type IncomingMessage ¶
type IncomingMessager ¶
type Listening ¶
type Listening struct { CommonOut Data struct { NextBlock uint32 `json:"next_block"` } `json:"data"` }
func NewListening ¶
type OutgoingMessager ¶
type PriceResp ¶
type PriceResp struct { CommonOut Data struct { //Title string `json:"title"` Symbol string `json:"symbol"` Price float64 `json:"price"` Variation float64 `json:"variation"` LastUpdated time.Time `json:"last_updated"` } `json:"data"` Metadata struct { Timestamp int `json:"timestamp"` Error error `json:"error"` } `json:"metadata"` }
type RAMOut ¶
type TableDelta ¶
type TableDelta struct { CommonOut Data struct { BlockNum uint32 `json:"block_num"` DBOp *v1.DBOp `json:"dbop"` Step string `json:"step"` } `json:"data"` }
func NewTableDelta ¶
type TableSnapshot ¶
type TableSnapshot struct { CommonOut Data struct { Rows []json.RawMessage `json:"rows"` } `json:"data"` }
type TicketDataQuote ¶
type TransactionLifecycle ¶
type TransactionLifecycle struct { CommonOut Data struct { Lifecycle *v1.TransactionLifecycle `json:"lifecycle"` } `json:"data"` }
func NewTransactionLifecycle ¶
func NewTransactionLifecycle(transaction *v1.TransactionLifecycle) *TransactionLifecycle
type Unlistened ¶
func NewUnlistened ¶
func NewUnlistened() *Unlistened
type VoteTally ¶
type VoteTally struct { CommonOut Data struct { VoteTally *VoteTallyData `json:"vote_tally"` } `json:"data"` }
func NewVoteTally ¶
func NewVoteTally(data *VoteTallyData) *VoteTally
Click to show internal directories.
Click to hide internal directories.