Documentation ¶
Overview ¶
package network holds core protocol types and constants
Index ¶
- type GlobalValues
- func (v *GlobalValues) Copy() *GlobalValues
- func (v *GlobalValues) CopyAsInterface() interface{}
- func (v *GlobalValues) Equal(u *GlobalValues) bool
- func (g *GlobalValues) FormatGlobals() protocol.DataEntry
- func (g *GlobalValues) FormatNetwork() protocol.DataEntry
- func (g *GlobalValues) FormatOracle() protocol.DataEntry
- func (g *GlobalValues) FormatRouting() protocol.DataEntry
- func (g *GlobalValues) InitializeDataAccounts(net *url.URL, getState getStateFunc, putState putStateFunc) error
- func (v *GlobalValues) IsValid() error
- func (g *GlobalValues) Load(net *url.URL, getState getStateFunc) error
- func (v *GlobalValues) MarshalBinary() ([]byte, error)
- func (v *GlobalValues) MarshalJSON() ([]byte, error)
- func (g *GlobalValues) ParseGlobals(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseNetwork(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseOracle(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseRouting(entry protocol.DataEntry) error
- func (v *GlobalValues) UnmarshalBinary(data []byte) error
- func (v *GlobalValues) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *GlobalValues) UnmarshalJSON(b []byte) error
- func (g *GlobalValues) ValidatorThreshold(partition string) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GlobalValues ¶
type GlobalValues struct { Oracle *protocol.AcmeOracle `json:"oracle,omitempty" form:"oracle" query:"oracle" validate:"required"` Globals *protocol.NetworkGlobals `json:"globals,omitempty" form:"globals" query:"globals" validate:"required"` Network *protocol.NetworkDefinition `json:"network,omitempty" form:"network" query:"network" validate:"required"` Routing *protocol.RoutingTable `json:"routing,omitempty" form:"routing" query:"routing" validate:"required"` // ExecutorVersion is the active executor version. ExecutorVersion protocol.ExecutorVersion `json:"executorVersion,omitempty" form:"executorVersion" query:"executorVersion"` // contains filtered or unexported fields }
func NewGlobals ¶
func NewGlobals(g *GlobalValues) *GlobalValues
NewGlobals returns GlobalValues with uninitialized values set to the default.
func (*GlobalValues) Copy ¶
func (v *GlobalValues) Copy() *GlobalValues
func (*GlobalValues) CopyAsInterface ¶
func (v *GlobalValues) CopyAsInterface() interface{}
func (*GlobalValues) Equal ¶
func (v *GlobalValues) Equal(u *GlobalValues) bool
func (*GlobalValues) FormatGlobals ¶
func (g *GlobalValues) FormatGlobals() protocol.DataEntry
func (*GlobalValues) FormatNetwork ¶
func (g *GlobalValues) FormatNetwork() protocol.DataEntry
func (*GlobalValues) FormatOracle ¶
func (g *GlobalValues) FormatOracle() protocol.DataEntry
func (*GlobalValues) FormatRouting ¶
func (g *GlobalValues) FormatRouting() protocol.DataEntry
func (*GlobalValues) InitializeDataAccounts ¶
func (g *GlobalValues) InitializeDataAccounts(net *url.URL, getState getStateFunc, putState putStateFunc) error
InitializeDataAccounts sets the initial state of the network data accounts for genesis.
func (*GlobalValues) IsValid ¶
func (v *GlobalValues) IsValid() error
func (*GlobalValues) MarshalBinary ¶
func (v *GlobalValues) MarshalBinary() ([]byte, error)
func (*GlobalValues) MarshalJSON ¶
func (v *GlobalValues) MarshalJSON() ([]byte, error)
func (*GlobalValues) ParseGlobals ¶
func (g *GlobalValues) ParseGlobals(entry protocol.DataEntry) error
func (*GlobalValues) ParseNetwork ¶
func (g *GlobalValues) ParseNetwork(entry protocol.DataEntry) error
func (*GlobalValues) ParseOracle ¶
func (g *GlobalValues) ParseOracle(entry protocol.DataEntry) error
func (*GlobalValues) ParseRouting ¶
func (g *GlobalValues) ParseRouting(entry protocol.DataEntry) error
func (*GlobalValues) UnmarshalBinary ¶
func (v *GlobalValues) UnmarshalBinary(data []byte) error
func (*GlobalValues) UnmarshalBinaryFrom ¶
func (v *GlobalValues) UnmarshalBinaryFrom(rd io.Reader) error
func (*GlobalValues) UnmarshalJSON ¶
func (v *GlobalValues) UnmarshalJSON(b []byte) error
func (*GlobalValues) ValidatorThreshold ¶
func (g *GlobalValues) ValidatorThreshold(partition string) uint64
Click to show internal directories.
Click to hide internal directories.