Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type Election
- func (*Election) Descriptor() ([]byte, []int)
- func (m *Election) GetEndTime() *timestamppb.Timestamp
- func (m *Election) GetNewDecisionId() uint64
- func (m *Election) GetOptions() []string
- func (m *Election) GetStartTime() *timestamppb.Timestamp
- func (m *Election) Marshal() (dAtA []byte, err error)
- func (m *Election) MarshalTo(dAtA []byte) (int, error)
- func (m *Election) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Election) ProtoMessage()
- func (m *Election) Reset()
- func (m *Election) Size() (n int)
- func (m *Election) String() string
- func (m *Election) Unmarshal(dAtA []byte) error
- func (m *Election) XXX_DiscardUnknown()
- func (m *Election) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Election) XXX_Merge(src proto.Message)
- func (m *Election) XXX_Size() int
- func (m *Election) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs *GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgNewElection
- func (*MsgNewElection) Descriptor() ([]byte, []int)
- func (m *MsgNewElection) GetOptions() []string
- func (m *MsgNewElection) GetSender() string
- func (m *MsgNewElection) Marshal() (dAtA []byte, err error)
- func (m *MsgNewElection) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgNewElection) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgNewElection) ProtoMessage()
- func (m *MsgNewElection) Reset()
- func (m *MsgNewElection) Size() (n int)
- func (m *MsgNewElection) String() string
- func (m *MsgNewElection) Unmarshal(dAtA []byte) error
- func (m *MsgNewElection) XXX_DiscardUnknown()
- func (m *MsgNewElection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgNewElection) XXX_Merge(src proto.Message)
- func (m *MsgNewElection) XXX_Size() int
- func (m *MsgNewElection) XXX_Unmarshal(b []byte) error
- type MsgNewElectionResponse
- func (*MsgNewElectionResponse) Descriptor() ([]byte, []int)
- func (m *MsgNewElectionResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgNewElectionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgNewElectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgNewElectionResponse) ProtoMessage()
- func (m *MsgNewElectionResponse) Reset()
- func (m *MsgNewElectionResponse) Size() (n int)
- func (m *MsgNewElectionResponse) String() string
- func (m *MsgNewElectionResponse) Unmarshal(dAtA []byte) error
- func (m *MsgNewElectionResponse) XXX_DiscardUnknown()
- func (m *MsgNewElectionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgNewElectionResponse) XXX_Merge(src proto.Message)
- func (m *MsgNewElectionResponse) XXX_Size() int
- func (m *MsgNewElectionResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetCommitTimeout() uint64
- func (m *Params) GetRevealTimeout() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ModuleName = "election"
Variables ¶
var ( ParamsKey = collections.NewPrefix(0) CounterKey = collections.NewPrefix(1) )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var ( // ErrDuplicateAddress error if there is a duplicate address ErrDuplicateAddress = errors.Register(ModuleName, 2, "duplicate address") )
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the interfaces types with the interface registry.
func RegisterMsgServer ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type Election ¶
type Election struct { NewDecisionId uint64 `protobuf:"varint,1,opt,name=new_decision_id,json=newDecisionId,proto3" json:"new_decision_id,omitempty"` Options []string `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` }
func (*Election) Descriptor ¶
func (*Election) GetEndTime ¶
func (m *Election) GetEndTime() *timestamppb.Timestamp
func (*Election) GetNewDecisionId ¶
func (*Election) GetOptions ¶
func (*Election) GetStartTime ¶
func (m *Election) GetStartTime() *timestamppb.Timestamp
func (*Election) MarshalToSizedBuffer ¶
func (*Election) ProtoMessage ¶
func (*Election) ProtoMessage()
func (*Election) XXX_DiscardUnknown ¶
func (m *Election) XXX_DiscardUnknown()
func (*Election) XXX_Marshal ¶
func (*Election) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct { // params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
GenesisState is the state that must be provided at genesis.
func NewGenesisState ¶
func NewGenesisState() *GenesisState
NewGenesisState creates a new genesis state with default values.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (*GenesisState) Validate ¶
func (gs *GenesisState) Validate() error
Validate performs basic genesis state validation returning an error upon any
func (*GenesisState) XXX_DiscardUnknown ¶
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { NewElection(ctx context.Context, in *MsgNewElection, opts ...grpc.CallOption) (*MsgNewElectionResponse, error) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) }
MsgClient is the client API for Msg service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewMsgClient ¶
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgNewElection ¶
type MsgNewElection struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` Options []string `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"` }
func (*MsgNewElection) Descriptor ¶
func (*MsgNewElection) Descriptor() ([]byte, []int)
func (*MsgNewElection) GetOptions ¶
func (m *MsgNewElection) GetOptions() []string
func (*MsgNewElection) GetSender ¶
func (m *MsgNewElection) GetSender() string
func (*MsgNewElection) Marshal ¶
func (m *MsgNewElection) Marshal() (dAtA []byte, err error)
func (*MsgNewElection) MarshalToSizedBuffer ¶
func (m *MsgNewElection) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgNewElection) ProtoMessage ¶
func (*MsgNewElection) ProtoMessage()
func (*MsgNewElection) Reset ¶
func (m *MsgNewElection) Reset()
func (*MsgNewElection) Size ¶
func (m *MsgNewElection) Size() (n int)
func (*MsgNewElection) String ¶
func (m *MsgNewElection) String() string
func (*MsgNewElection) Unmarshal ¶
func (m *MsgNewElection) Unmarshal(dAtA []byte) error
func (*MsgNewElection) XXX_DiscardUnknown ¶
func (m *MsgNewElection) XXX_DiscardUnknown()
func (*MsgNewElection) XXX_Marshal ¶
func (m *MsgNewElection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgNewElection) XXX_Merge ¶
func (m *MsgNewElection) XXX_Merge(src proto.Message)
func (*MsgNewElection) XXX_Size ¶
func (m *MsgNewElection) XXX_Size() int
func (*MsgNewElection) XXX_Unmarshal ¶
func (m *MsgNewElection) XXX_Unmarshal(b []byte) error
type MsgNewElectionResponse ¶
type MsgNewElectionResponse struct { }
func (*MsgNewElectionResponse) Descriptor ¶
func (*MsgNewElectionResponse) Descriptor() ([]byte, []int)
func (*MsgNewElectionResponse) Marshal ¶
func (m *MsgNewElectionResponse) Marshal() (dAtA []byte, err error)
func (*MsgNewElectionResponse) MarshalTo ¶
func (m *MsgNewElectionResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgNewElectionResponse) MarshalToSizedBuffer ¶
func (m *MsgNewElectionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgNewElectionResponse) ProtoMessage ¶
func (*MsgNewElectionResponse) ProtoMessage()
func (*MsgNewElectionResponse) Reset ¶
func (m *MsgNewElectionResponse) Reset()
func (*MsgNewElectionResponse) Size ¶
func (m *MsgNewElectionResponse) Size() (n int)
func (*MsgNewElectionResponse) String ¶
func (m *MsgNewElectionResponse) String() string
func (*MsgNewElectionResponse) Unmarshal ¶
func (m *MsgNewElectionResponse) Unmarshal(dAtA []byte) error
func (*MsgNewElectionResponse) XXX_DiscardUnknown ¶
func (m *MsgNewElectionResponse) XXX_DiscardUnknown()
func (*MsgNewElectionResponse) XXX_Marshal ¶
func (m *MsgNewElectionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgNewElectionResponse) XXX_Merge ¶
func (m *MsgNewElectionResponse) XXX_Merge(src proto.Message)
func (*MsgNewElectionResponse) XXX_Size ¶
func (m *MsgNewElectionResponse) XXX_Size() int
func (*MsgNewElectionResponse) XXX_Unmarshal ¶
func (m *MsgNewElectionResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { NewElection(context.Context, *MsgNewElection) (*MsgNewElectionResponse, error) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶
type MsgUpdateParams struct { // authority is the address that controls the module // NOTE: Defaults to the governance module unless overwritten. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the module parameters to update. // NOTE: All parameters must be supplied. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgUpdateParams is the Msg/UpdateParams request type.
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetAuthority ¶
func (m *MsgUpdateParams) GetAuthority() string
func (*MsgUpdateParams) GetParams ¶
func (m *MsgUpdateParams) GetParams() Params
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct { }
MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { CommitTimeout uint64 `protobuf:"varint,1,opt,name=commit_timeout,json=commitTimeout,proto3" json:"commit_timeout,omitempty"` RevealTimeout uint64 `protobuf:"varint,2,opt,name=reveal_timeout,json=revealTimeout,proto3" json:"reveal_timeout,omitempty"` }
Params defines the parameters of the module.
func (*Params) Descriptor ¶
func (*Params) GetCommitTimeout ¶
func (*Params) GetRevealTimeout ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) NewElection ¶
func (*UnimplementedMsgServer) NewElection(ctx context.Context, req *MsgNewElection) (*MsgNewElectionResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.