Documentation ¶
Index ¶
- Variables
- func AccountsWith(acct WeaveAccounts) orm.Object
- func RegisterQuery(qr weave.QueryRouter)
- func RegisterRoutes(r weave.Registry, auth x.Authenticator)
- type AccountBucket
- type Accounts
- func (m *Accounts) Copy() orm.CloneableData
- func (*Accounts) Descriptor() ([]byte, []int)
- func (m *Accounts) GetAddresses() [][]byte
- func (m *Accounts) GetMetadata() *weave.Metadata
- func (m *Accounts) Marshal() (dAtA []byte, err error)
- func (m *Accounts) MarshalTo(dAtA []byte) (int, error)
- func (*Accounts) ProtoMessage()
- func (m *Accounts) Reset()
- func (m *Accounts) Size() (n int)
- func (m *Accounts) String() string
- func (m *Accounts) Unmarshal(dAtA []byte) error
- func (m *Accounts) Validate() error
- func (m *Accounts) XXX_DiscardUnknown()
- func (m *Accounts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Accounts) XXX_Merge(src proto.Message)
- func (m *Accounts) XXX_Size() int
- func (m *Accounts) XXX_Unmarshal(b []byte) error
- type Initializer
- type Pubkey
- func (m Pubkey) AsABCI() abci.PubKey
- func (*Pubkey) Descriptor() ([]byte, []int)
- func (m *Pubkey) GetData() []byte
- func (m *Pubkey) GetType() string
- func (m *Pubkey) Marshal() (dAtA []byte, err error)
- func (m *Pubkey) MarshalTo(dAtA []byte) (int, error)
- func (*Pubkey) ProtoMessage()
- func (m *Pubkey) Reset()
- func (m *Pubkey) Size() (n int)
- func (m *Pubkey) String() string
- func (m *Pubkey) Unmarshal(dAtA []byte) error
- func (m *Pubkey) XXX_DiscardUnknown()
- func (m *Pubkey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Pubkey) XXX_Merge(src proto.Message)
- func (m *Pubkey) XXX_Size() int
- func (m *Pubkey) XXX_Unmarshal(b []byte) error
- type SetValidatorsMsg
- func (m *SetValidatorsMsg) AsABCI() []abci.ValidatorUpdate
- func (*SetValidatorsMsg) Descriptor() ([]byte, []int)
- func (m *SetValidatorsMsg) GetMetadata() *weave.Metadata
- func (m *SetValidatorsMsg) GetValidatorUpdates() []*ValidatorUpdate
- func (m *SetValidatorsMsg) Marshal() (dAtA []byte, err error)
- func (m *SetValidatorsMsg) MarshalTo(dAtA []byte) (int, error)
- func (*SetValidatorsMsg) Path() string
- func (*SetValidatorsMsg) ProtoMessage()
- func (m *SetValidatorsMsg) Reset()
- func (m *SetValidatorsMsg) Size() (n int)
- func (m *SetValidatorsMsg) String() string
- func (m *SetValidatorsMsg) Unmarshal(dAtA []byte) error
- func (m *SetValidatorsMsg) Validate() error
- func (m *SetValidatorsMsg) XXX_DiscardUnknown()
- func (m *SetValidatorsMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SetValidatorsMsg) XXX_Merge(src proto.Message)
- func (m *SetValidatorsMsg) XXX_Size() int
- func (m *SetValidatorsMsg) XXX_Unmarshal(b []byte) error
- type ValidatorUpdate
- func (m ValidatorUpdate) AsABCI() abci.ValidatorUpdate
- func (*ValidatorUpdate) Descriptor() ([]byte, []int)
- func (m *ValidatorUpdate) GetPower() int64
- func (m *ValidatorUpdate) GetPubkey() Pubkey
- func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error)
- func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error)
- func (*ValidatorUpdate) ProtoMessage()
- func (m *ValidatorUpdate) Reset()
- func (m *ValidatorUpdate) Size() (n int)
- func (m *ValidatorUpdate) String() string
- func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error
- func (m ValidatorUpdate) Validate() error
- func (m *ValidatorUpdate) XXX_DiscardUnknown()
- func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ValidatorUpdate) XXX_Merge(src proto.Message)
- func (m *ValidatorUpdate) XXX_Size() int
- func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error
- type WeaveAccounts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthCodec = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowCodec = fmt.Errorf("proto: integer overflow") )
Functions ¶
func AccountsWith ¶
func AccountsWith(acct WeaveAccounts) orm.Object
func RegisterQuery ¶
func RegisterQuery(qr weave.QueryRouter)
RegisterQuery will register this bucket as "/validators".
func RegisterRoutes ¶
func RegisterRoutes(r weave.Registry, auth x.Authenticator)
RegisterRoutes will instantiate and register all handlers in this package.
Types ¶
type AccountBucket ¶ added in v0.15.0
func NewAccountBucket ¶ added in v0.15.0
func NewAccountBucket() *AccountBucket
func (*AccountBucket) GetAccounts ¶ added in v0.15.0
func (b *AccountBucket) GetAccounts(kv weave.KVStore) (*Accounts, error)
type Accounts ¶
type Accounts struct { Metadata *weave.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` Addresses [][]byte `protobuf:"bytes,2,rep,name=addresses,proto3" json:"addresses,omitempty"` }
Accounts is a list of accounts allowed to update validators
func AsAccounts ¶
func AsAccounts(a WeaveAccounts) *Accounts
func (*Accounts) Copy ¶
func (m *Accounts) Copy() orm.CloneableData
Copy makes new accounts object with the same addresses
func (*Accounts) Descriptor ¶
func (*Accounts) GetAddresses ¶
func (*Accounts) GetMetadata ¶ added in v0.15.0
func (*Accounts) ProtoMessage ¶
func (*Accounts) ProtoMessage()
func (*Accounts) XXX_DiscardUnknown ¶ added in v0.12.0
func (m *Accounts) XXX_DiscardUnknown()
func (*Accounts) XXX_Marshal ¶ added in v0.12.0
func (*Accounts) XXX_Unmarshal ¶ added in v0.12.0
type Initializer ¶
type Initializer struct{}
Initializer fulfils the InitStater interface to load data from the genesis file
func (Initializer) FromGenesis ¶
FromGenesis will parse initial account info from genesis and save it to the database
type Pubkey ¶ added in v0.9.0
type Pubkey struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
func (*Pubkey) Descriptor ¶ added in v0.9.0
func (*Pubkey) ProtoMessage ¶ added in v0.9.0
func (*Pubkey) ProtoMessage()
func (*Pubkey) XXX_DiscardUnknown ¶ added in v0.12.0
func (m *Pubkey) XXX_DiscardUnknown()
func (*Pubkey) XXX_Marshal ¶ added in v0.12.0
func (*Pubkey) XXX_Unmarshal ¶ added in v0.12.0
type SetValidatorsMsg ¶ added in v0.8.0
type SetValidatorsMsg struct { Metadata *weave.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` ValidatorUpdates []*ValidatorUpdate `protobuf:"bytes,2,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates,omitempty"` }
This message is designed to update validator power
func (*SetValidatorsMsg) AsABCI ¶ added in v0.8.0
func (m *SetValidatorsMsg) AsABCI() []abci.ValidatorUpdate
func (*SetValidatorsMsg) Descriptor ¶ added in v0.8.0
func (*SetValidatorsMsg) Descriptor() ([]byte, []int)
func (*SetValidatorsMsg) GetMetadata ¶ added in v0.15.0
func (m *SetValidatorsMsg) GetMetadata() *weave.Metadata
func (*SetValidatorsMsg) GetValidatorUpdates ¶ added in v0.9.0
func (m *SetValidatorsMsg) GetValidatorUpdates() []*ValidatorUpdate
func (*SetValidatorsMsg) Marshal ¶ added in v0.8.0
func (m *SetValidatorsMsg) Marshal() (dAtA []byte, err error)
func (*SetValidatorsMsg) MarshalTo ¶ added in v0.8.0
func (m *SetValidatorsMsg) MarshalTo(dAtA []byte) (int, error)
func (*SetValidatorsMsg) Path ¶ added in v0.8.0
func (*SetValidatorsMsg) Path() string
Path returns the routing path for this message
func (*SetValidatorsMsg) ProtoMessage ¶ added in v0.8.0
func (*SetValidatorsMsg) ProtoMessage()
func (*SetValidatorsMsg) Reset ¶ added in v0.8.0
func (m *SetValidatorsMsg) Reset()
func (*SetValidatorsMsg) Size ¶ added in v0.8.0
func (m *SetValidatorsMsg) Size() (n int)
func (*SetValidatorsMsg) String ¶ added in v0.8.0
func (m *SetValidatorsMsg) String() string
func (*SetValidatorsMsg) Unmarshal ¶ added in v0.8.0
func (m *SetValidatorsMsg) Unmarshal(dAtA []byte) error
func (*SetValidatorsMsg) Validate ¶ added in v0.10.2
func (m *SetValidatorsMsg) Validate() error
func (*SetValidatorsMsg) XXX_DiscardUnknown ¶ added in v0.12.0
func (m *SetValidatorsMsg) XXX_DiscardUnknown()
func (*SetValidatorsMsg) XXX_Marshal ¶ added in v0.12.0
func (m *SetValidatorsMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SetValidatorsMsg) XXX_Merge ¶ added in v0.12.0
func (m *SetValidatorsMsg) XXX_Merge(src proto.Message)
func (*SetValidatorsMsg) XXX_Size ¶ added in v0.12.0
func (m *SetValidatorsMsg) XXX_Size() int
func (*SetValidatorsMsg) XXX_Unmarshal ¶ added in v0.12.0
func (m *SetValidatorsMsg) XXX_Unmarshal(b []byte) error
type ValidatorUpdate ¶ added in v0.9.0
type ValidatorUpdate struct { Pubkey Pubkey `protobuf:"bytes,1,opt,name=pubkey,proto3" json:"pubkey"` Power int64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"` }
ValidatorUpdate
func (ValidatorUpdate) AsABCI ¶ added in v0.9.0
func (m ValidatorUpdate) AsABCI() abci.ValidatorUpdate
func (*ValidatorUpdate) Descriptor ¶ added in v0.9.0
func (*ValidatorUpdate) Descriptor() ([]byte, []int)
func (*ValidatorUpdate) GetPower ¶ added in v0.9.0
func (m *ValidatorUpdate) GetPower() int64
func (*ValidatorUpdate) GetPubkey ¶ added in v0.9.0
func (m *ValidatorUpdate) GetPubkey() Pubkey
func (*ValidatorUpdate) Marshal ¶ added in v0.9.0
func (m *ValidatorUpdate) Marshal() (dAtA []byte, err error)
func (*ValidatorUpdate) MarshalTo ¶ added in v0.9.0
func (m *ValidatorUpdate) MarshalTo(dAtA []byte) (int, error)
func (*ValidatorUpdate) ProtoMessage ¶ added in v0.9.0
func (*ValidatorUpdate) ProtoMessage()
func (*ValidatorUpdate) Reset ¶ added in v0.9.0
func (m *ValidatorUpdate) Reset()
func (*ValidatorUpdate) Size ¶ added in v0.9.0
func (m *ValidatorUpdate) Size() (n int)
func (*ValidatorUpdate) String ¶ added in v0.9.0
func (m *ValidatorUpdate) String() string
func (*ValidatorUpdate) Unmarshal ¶ added in v0.9.0
func (m *ValidatorUpdate) Unmarshal(dAtA []byte) error
func (ValidatorUpdate) Validate ¶ added in v0.10.2
func (m ValidatorUpdate) Validate() error
func (*ValidatorUpdate) XXX_DiscardUnknown ¶ added in v0.12.0
func (m *ValidatorUpdate) XXX_DiscardUnknown()
func (*ValidatorUpdate) XXX_Marshal ¶ added in v0.12.0
func (m *ValidatorUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ValidatorUpdate) XXX_Merge ¶ added in v0.12.0
func (m *ValidatorUpdate) XXX_Merge(src proto.Message)
func (*ValidatorUpdate) XXX_Size ¶ added in v0.12.0
func (m *ValidatorUpdate) XXX_Size() int
func (*ValidatorUpdate) XXX_Unmarshal ¶ added in v0.12.0
func (m *ValidatorUpdate) XXX_Unmarshal(b []byte) error
type WeaveAccounts ¶
WeaveAccounts is used to parse the json from genesis file use weave.Address, so address in hex, not base64
func AsWeaveAccounts ¶
func AsWeaveAccounts(a *Accounts) WeaveAccounts
func (WeaveAccounts) Validate ¶
func (wa WeaveAccounts) Validate() error
Click to show internal directories.
Click to hide internal directories.