Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AggMethodToID = map[string]AggMethod{ "Median": Median, "Majority": Majority, "Custom": Custom, }
View Source
var AggMethodToString = map[AggMethod]string{ Median: "Median", Majority: "Majority", Custom: "Custom", }
View Source
var NotFoundAnswer = Answer{ Option: NotFound, Value: common.Hash{}, }
Functions ¶
This section is empty.
Types ¶
type Answer ¶
type Answer struct { Option AnswerOption `json:"option"` Value common.Hash `json:"value"` }
type AnswerOption ¶
type AnswerOption uint8
const ( Missing AnswerOption = iota NotFound Answered Delegated )
func (AnswerOption) MarshalJSON ¶
func (o AnswerOption) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (AnswerOption) String ¶
func (o AnswerOption) String() string
func (*AnswerOption) UnmarshalJSON ¶
func (o *AnswerOption) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to the enum value
type QueryStatus ¶
type QueryStatus uint8
const ( Invalid QueryStatus = iota OK NotAvailable Disagreement )
func (QueryStatus) MarshalJSON ¶
func (q QueryStatus) MarshalJSON() ([]byte, error)
MarshalJSON marshals the enum as a quoted json string
func (QueryStatus) String ¶
func (q QueryStatus) String() string
func (*QueryStatus) UnmarshalJSON ¶
func (q *QueryStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON unmashals a quoted json string to the enum value
Click to show internal directories.
Click to hide internal directories.