query

package
v0.5.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Type

func Type(data []byte) (qt types.QueryType)

Types

type MultiResponse

type MultiResponse struct {
	Type  string   `json:"type,omitempty" form:"type" query:"type" validate:"required"`
	Items []string `json:"items,omitempty" form:"items" query:"items" validate:"required"`
	Start uint64   `json:"start" form:"start" query:"start" validate:"required"`
	Count uint64   `json:"count" form:"count" query:"count" validate:"required"`
	Total uint64   `json:"total" form:"total" query:"total" validate:"required"`
	// contains filtered or unexported fields
}

func (*MultiResponse) IsValid

func (v *MultiResponse) IsValid() error

func (*MultiResponse) MarshalBinary

func (v *MultiResponse) MarshalBinary() ([]byte, error)

func (*MultiResponse) UnmarshalBinary

func (v *MultiResponse) UnmarshalBinary(data []byte) error

func (*MultiResponse) UnmarshalBinaryFrom

func (v *MultiResponse) UnmarshalBinaryFrom(rd io.Reader) error

type Query

type Query struct {
	Type    types.QueryType
	RouteId uint64
	Content []byte //currently this is a transaction hash, but will make it more focused to the chain it is querying, so this will probably act more like general transaction does for transactions.
}

Query will route a query message to a chain state

func (*Query) MarshalBinary

func (t *Query) MarshalBinary() (data []byte, err error)

func (*Query) UnmarshalBinary

func (t *Query) UnmarshalBinary(data []byte) (err error)

type RequestByChainId

type RequestByChainId struct {
	ChainId types.Bytes32
}

func (*RequestByChainId) MarshalBinary

func (r *RequestByChainId) MarshalBinary() ([]byte, error)

func (*RequestByChainId) Type

func (*RequestByChainId) UnmarshalBinary

func (r *RequestByChainId) UnmarshalBinary(data []byte) (err error)

type RequestByTxId

type RequestByTxId struct {
	TxId types.Bytes32
}

func (*RequestByTxId) MarshalBinary

func (t *RequestByTxId) MarshalBinary() (data []byte, err error)

func (*RequestByTxId) Type

func (*RequestByTxId) Type() types.QueryType

func (*RequestByTxId) UnmarshalBinary

func (t *RequestByTxId) UnmarshalBinary(data []byte) (err error)

type RequestByUrl

type RequestByUrl struct {
	Url types.String
}

func (*RequestByUrl) MarshalBinary

func (r *RequestByUrl) MarshalBinary() ([]byte, error)

func (*RequestByUrl) Type

func (*RequestByUrl) Type() types.QueryType

func (*RequestByUrl) UnmarshalBinary

func (r *RequestByUrl) UnmarshalBinary(data []byte) (err error)

type RequestDataEntry

type RequestDataEntry struct {
	protocol.RequestDataEntry
}

func (*RequestDataEntry) Type

type RequestDataEntrySet

type RequestDataEntrySet struct {
	protocol.RequestDataEntrySet
}

func (*RequestDataEntrySet) Type

type RequestDirectory

type RequestDirectory struct {
	RequestByUrl
	Start        uint64
	Limit        uint64
	ExpandChains bool
}

func (*RequestDirectory) MarshalBinary

func (r *RequestDirectory) MarshalBinary() ([]byte, error)

func (*RequestDirectory) Type

func (*RequestDirectory) UnmarshalBinary

func (r *RequestDirectory) UnmarshalBinary(data []byte) (err error)

type RequestKeyPageIndex

type RequestKeyPageIndex struct {
	Url *url.URL `json:"url,omitempty" form:"url" query:"url" validate:"required"`
	Key []byte   `json:"key,omitempty" form:"key" query:"key" validate:"required"`
	// contains filtered or unexported fields
}

func (*RequestKeyPageIndex) Equal

func (*RequestKeyPageIndex) IsValid

func (v *RequestKeyPageIndex) IsValid() error

func (*RequestKeyPageIndex) MarshalBinary

func (v *RequestKeyPageIndex) MarshalBinary() ([]byte, error)

func (*RequestKeyPageIndex) MarshalJSON

func (v *RequestKeyPageIndex) MarshalJSON() ([]byte, error)

func (*RequestKeyPageIndex) Type

func (*RequestKeyPageIndex) UnmarshalBinary

func (v *RequestKeyPageIndex) UnmarshalBinary(data []byte) error

func (*RequestKeyPageIndex) UnmarshalBinaryFrom

func (v *RequestKeyPageIndex) UnmarshalBinaryFrom(rd io.Reader) error

func (*RequestKeyPageIndex) UnmarshalJSON

func (v *RequestKeyPageIndex) UnmarshalJSON(data []byte) error

type RequestTxHistory

type RequestTxHistory struct {
	ChainId types.Bytes32
	Start   int64
	Limit   int64
}

func (*RequestTxHistory) MarshalBinary

func (t *RequestTxHistory) MarshalBinary() (data []byte, err error)

func (*RequestTxHistory) Type

func (*RequestTxHistory) UnmarshalBinary

func (t *RequestTxHistory) UnmarshalBinary(data []byte) (err error)

type ResponseByChainId

type ResponseByChainId struct {
	state.Object
}

func (*ResponseByChainId) MarshalBinary

func (r *ResponseByChainId) MarshalBinary() ([]byte, error)

func (*ResponseByChainId) UnmarshalBinary

func (r *ResponseByChainId) UnmarshalBinary(data []byte) (err error)

type ResponseByTxId

type ResponseByTxId struct {
	TxId               [32]byte     `json:"txId,omitempty" form:"txId" query:"txId" validate:"required"`
	TxState            []byte       `json:"txState,omitempty" form:"txState" query:"txState" validate:"required"`
	TxPendingState     []byte       `json:"txPendingState,omitempty" form:"txPendingState" query:"txPendingState" validate:"required"`
	TxSynthTxIds       []byte       `json:"txSynthTxIds,omitempty" form:"txSynthTxIds" query:"txSynthTxIds" validate:"required"`
	Height             int64        `json:"height" form:"height" query:"height" validate:"required"`
	ChainState         [][]byte     `json:"chainState,omitempty" form:"chainState" query:"chainState" validate:"required"`
	Receipts           []*TxReceipt `json:"receipts,omitempty" form:"receipts" query:"receipts" validate:"required"`
	SignatureThreshold uint64       `json:"signatureThreshold,omitempty" form:"signatureThreshold" query:"signatureThreshold" validate:"required"`
	Invalidated        bool         `json:"invalidated,omitempty" form:"invalidated" query:"invalidated" validate:"required"`
	// contains filtered or unexported fields
}

func (*ResponseByTxId) Equal

func (v *ResponseByTxId) Equal(u *ResponseByTxId) bool

func (*ResponseByTxId) IsValid

func (v *ResponseByTxId) IsValid() error

func (*ResponseByTxId) MarshalBinary

func (v *ResponseByTxId) MarshalBinary() ([]byte, error)

func (*ResponseByTxId) MarshalJSON

func (v *ResponseByTxId) MarshalJSON() ([]byte, error)

func (*ResponseByTxId) Size

func (t *ResponseByTxId) Size() int

func (*ResponseByTxId) UnmarshalBinary

func (v *ResponseByTxId) UnmarshalBinary(data []byte) error

func (*ResponseByTxId) UnmarshalBinaryFrom

func (v *ResponseByTxId) UnmarshalBinaryFrom(rd io.Reader) error

func (*ResponseByTxId) UnmarshalJSON

func (v *ResponseByTxId) UnmarshalJSON(data []byte) error

type ResponseChainEntry

type ResponseChainEntry struct {
	Height int64    `json:"height" form:"height" query:"height" validate:"required"`
	Entry  []byte   `json:"entry,omitempty" form:"entry" query:"entry" validate:"required"`
	State  [][]byte `json:"state,omitempty" form:"state" query:"state" validate:"required"`
	// contains filtered or unexported fields
}

func (*ResponseChainEntry) Equal

func (*ResponseChainEntry) IsValid

func (v *ResponseChainEntry) IsValid() error

func (*ResponseChainEntry) MarshalBinary

func (v *ResponseChainEntry) MarshalBinary() ([]byte, error)

func (*ResponseChainEntry) MarshalJSON

func (v *ResponseChainEntry) MarshalJSON() ([]byte, error)

func (*ResponseChainEntry) UnmarshalBinary

func (v *ResponseChainEntry) UnmarshalBinary(data []byte) error

func (*ResponseChainEntry) UnmarshalBinaryFrom

func (v *ResponseChainEntry) UnmarshalBinaryFrom(rd io.Reader) error

func (*ResponseChainEntry) UnmarshalJSON

func (v *ResponseChainEntry) UnmarshalJSON(data []byte) error

type ResponseChainRange

type ResponseChainRange struct {
	Start   int64    `json:"start" form:"start" query:"start" validate:"required"`
	End     int64    `json:"end" form:"end" query:"end" validate:"required"`
	Total   int64    `json:"total" form:"total" query:"total" validate:"required"`
	Entries [][]byte `json:"entries,omitempty" form:"entries" query:"entries" validate:"required"`
	// contains filtered or unexported fields
}

func (*ResponseChainRange) Equal

func (*ResponseChainRange) IsValid

func (v *ResponseChainRange) IsValid() error

func (*ResponseChainRange) MarshalBinary

func (v *ResponseChainRange) MarshalBinary() ([]byte, error)

func (*ResponseChainRange) MarshalJSON

func (v *ResponseChainRange) MarshalJSON() ([]byte, error)

func (*ResponseChainRange) UnmarshalBinary

func (v *ResponseChainRange) UnmarshalBinary(data []byte) error

func (*ResponseChainRange) UnmarshalBinaryFrom

func (v *ResponseChainRange) UnmarshalBinaryFrom(rd io.Reader) error

func (*ResponseChainRange) UnmarshalJSON

func (v *ResponseChainRange) UnmarshalJSON(data []byte) error

type ResponseKeyPageIndex

type ResponseKeyPageIndex struct {
	KeyBook *url.URL `json:"keyBook,omitempty" form:"keyBook" query:"keyBook" validate:"required"`
	KeyPage *url.URL `json:"keyPage,omitempty" form:"keyPage" query:"keyPage" validate:"required"`
	Index   uint64   `json:"index" form:"index" query:"index" validate:"required"`
	// contains filtered or unexported fields
}

func (*ResponseKeyPageIndex) Equal

func (*ResponseKeyPageIndex) IsValid

func (v *ResponseKeyPageIndex) IsValid() error

func (*ResponseKeyPageIndex) MarshalBinary

func (v *ResponseKeyPageIndex) MarshalBinary() ([]byte, error)

func (*ResponseKeyPageIndex) UnmarshalBinary

func (v *ResponseKeyPageIndex) UnmarshalBinary(data []byte) error

func (*ResponseKeyPageIndex) UnmarshalBinaryFrom

func (v *ResponseKeyPageIndex) UnmarshalBinaryFrom(rd io.Reader) error

type ResponsePending

type ResponsePending struct {
	Transactions [][32]byte `json:"transactions,omitempty" form:"transactions" query:"transactions" validate:"required"`
	// contains filtered or unexported fields
}

func (*ResponsePending) Equal

func (v *ResponsePending) Equal(u *ResponsePending) bool

func (*ResponsePending) IsValid

func (v *ResponsePending) IsValid() error

func (*ResponsePending) MarshalBinary

func (v *ResponsePending) MarshalBinary() ([]byte, error)

func (*ResponsePending) MarshalJSON

func (v *ResponsePending) MarshalJSON() ([]byte, error)

func (*ResponsePending) UnmarshalBinary

func (v *ResponsePending) UnmarshalBinary(data []byte) error

func (*ResponsePending) UnmarshalBinaryFrom

func (v *ResponsePending) UnmarshalBinaryFrom(rd io.Reader) error

func (*ResponsePending) UnmarshalJSON

func (v *ResponsePending) UnmarshalJSON(data []byte) error

type ResponseTxHistory

type ResponseTxHistory struct {
	Start        int64            `json:"start" form:"start" query:"start" validate:"required"`
	End          int64            `json:"end" form:"end" query:"end" validate:"required"`
	Total        int64            `json:"total" form:"total" query:"total" validate:"required"`
	Transactions []ResponseByTxId `json:"transactions,omitempty" form:"transactions" query:"transactions" validate:"required"`
	// contains filtered or unexported fields
}

func (*ResponseTxHistory) Equal

func (*ResponseTxHistory) IsValid

func (v *ResponseTxHistory) IsValid() error

func (*ResponseTxHistory) MarshalBinary

func (v *ResponseTxHistory) MarshalBinary() ([]byte, error)

func (*ResponseTxHistory) UnmarshalBinary

func (v *ResponseTxHistory) UnmarshalBinary(data []byte) error

func (*ResponseTxHistory) UnmarshalBinaryFrom

func (v *ResponseTxHistory) UnmarshalBinaryFrom(rd io.Reader) error

type TxReceipt

type TxReceipt struct {
	Account        *url.URL         `json:"account,omitempty" form:"account" query:"account" validate:"required"`
	Chain          string           `json:"chain,omitempty" form:"chain" query:"chain" validate:"required"`
	DirectoryBlock uint64           `json:"directoryBlock,omitempty" form:"directoryBlock" query:"directoryBlock" validate:"required"`
	Receipt        protocol.Receipt `json:"receipt,omitempty" form:"receipt" query:"receipt" validate:"required"`
	Error          string           `json:"error,omitempty" form:"error" query:"error" validate:"required"`
	// contains filtered or unexported fields
}

func (*TxReceipt) Equal

func (v *TxReceipt) Equal(u *TxReceipt) bool

func (*TxReceipt) IsValid

func (v *TxReceipt) IsValid() error

func (*TxReceipt) MarshalBinary

func (v *TxReceipt) MarshalBinary() ([]byte, error)

func (*TxReceipt) UnmarshalBinary

func (v *TxReceipt) UnmarshalBinary(data []byte) error

func (*TxReceipt) UnmarshalBinaryFrom

func (v *TxReceipt) UnmarshalBinaryFrom(rd io.Reader) error

Jump to

Keyboard shortcuts

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