dt

package
v0.0.0-...-4404711 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

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 AggMethod

type AggMethod int
const (
	Median AggMethod = iota
	Majority
	Custom
)

func (AggMethod) String

func (met AggMethod) String() string

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

Jump to

Keyboard shortcuts

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