types

package
v0.36.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "vote"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName

	// QuerierRoute to be used for legacy query routing
	QuerierRoute = ModuleName
)
View Source
const (
	AttributeValueVote = "vote"
)

Event attribute values

Variables

View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeyDefaultVotingThreshold = []byte("DefaultVotingThreshold")
	KeyEndBlockerLimit        = []byte("endBlockerLimit")
)

Parameter store keys

View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrVote = sdkerrors.Register(ModuleName, 2, "vote error")
)

module errors

View Source
var ModuleCdc = codec.NewAminoCodec(amino)

ModuleCdc defines the module codec

Functions

func KeyTable added in v0.9.0

func KeyTable() paramtypes.KeyTable

KeyTable retrieves a subspace table for the module

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers types and interfaces with the given registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on codec

func RegisterMsgServiceHandler added in v0.17.0

func RegisterMsgServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgServiceHandler registers the http handlers for service MsgService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgServiceHandlerClient added in v0.17.0

func RegisterMsgServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgServiceClient) error

RegisterMsgServiceHandlerClient registers the http handlers for service MsgService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgServiceClient" to call the correct interceptors.

func RegisterMsgServiceHandlerFromEndpoint added in v0.17.0

func RegisterMsgServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgServiceHandlerFromEndpoint is same as RegisterMsgServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgServiceHandlerServer added in v0.17.0

func RegisterMsgServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServiceServer) error

RegisterMsgServiceHandlerServer registers the http handlers for service MsgService to "mux". UnaryRPC :call MsgServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgServiceHandlerFromEndpoint instead.

func RegisterMsgServiceServer added in v0.17.0

func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer)

func RegisterQueryServiceHandler added in v0.34.0

func RegisterQueryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryServiceHandler registers the http handlers for service QueryService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryServiceHandlerClient added in v0.34.0

func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error

RegisterQueryServiceHandlerClient registers the http handlers for service QueryService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryServiceClient" to call the correct interceptors.

func RegisterQueryServiceHandlerFromEndpoint added in v0.34.0

func RegisterQueryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryServiceHandlerFromEndpoint is same as RegisterQueryServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryServiceHandlerServer added in v0.34.0

func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error

RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". UnaryRPC :call QueryServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryServiceHandlerFromEndpoint instead.

func RegisterQueryServiceServer added in v0.34.0

func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer)

Types

type GenesisState

type GenesisState struct {
	Params        Params                  `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	PollMetadatas []exported.PollMetadata `protobuf:"bytes,2,rep,name=poll_metadatas,json=pollMetadatas,proto3" json:"poll_metadatas"`
}

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState represents the default genesis state

func NewGenesisState added in v0.9.0

func NewGenesisState(params Params, pollMetadatas []exported.PollMetadata) *GenesisState

NewGenesisState is the constructor for GenesisState

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, 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 (m GenesisState) Validate() error

Validate validates the genesis state

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 MsgServiceClient added in v0.17.0

type MsgServiceClient interface {
	Vote(ctx context.Context, in *VoteRequest, opts ...grpc.CallOption) (*VoteResponse, error)
}

MsgServiceClient is the client API for MsgService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgServiceClient added in v0.17.0

func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient

type MsgServiceServer added in v0.17.0

type MsgServiceServer interface {
	Vote(context.Context, *VoteRequest) (*VoteResponse, error)
}

MsgServiceServer is the server API for MsgService service.

type Params added in v0.9.0

type Params struct {
	DefaultVotingThreshold utils.Threshold `protobuf:"bytes,1,opt,name=default_voting_threshold,json=defaultVotingThreshold,proto3" json:"default_voting_threshold"`
	EndBlockerLimit        int64           `protobuf:"varint,2,opt,name=end_blocker_limit,json=endBlockerLimit,proto3" json:"end_blocker_limit,omitempty"`
}

Params represent the genesis parameters for the module

func DefaultParams added in v0.9.0

func DefaultParams() Params

DefaultParams - the module's default parameters

func (*Params) Descriptor added in v0.9.0

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Marshal added in v0.9.0

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo added in v0.9.0

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer added in v0.9.0

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs added in v0.9.0

func (m *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of vote module's parameters.

func (*Params) ProtoMessage added in v0.9.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.9.0

func (m *Params) Reset()

func (*Params) Size added in v0.9.0

func (m *Params) Size() (n int)

func (*Params) String added in v0.9.0

func (m *Params) String() string

func (*Params) Unmarshal added in v0.9.0

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate added in v0.9.0

func (m Params) Validate() error

Validate performs a validation check on the parameters

func (*Params) XXX_DiscardUnknown added in v0.9.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.9.0

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge added in v0.9.0

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size added in v0.9.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.9.0

func (m *Params) XXX_Unmarshal(b []byte) error

type ParamsRequest added in v0.34.0

type ParamsRequest struct {
}

ParamsRequest represents a message that queries the params

func (*ParamsRequest) Descriptor added in v0.34.0

func (*ParamsRequest) Descriptor() ([]byte, []int)

func (*ParamsRequest) Marshal added in v0.34.0

func (m *ParamsRequest) Marshal() (dAtA []byte, err error)

func (*ParamsRequest) MarshalTo added in v0.34.0

func (m *ParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*ParamsRequest) MarshalToSizedBuffer added in v0.34.0

func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ParamsRequest) ProtoMessage added in v0.34.0

func (*ParamsRequest) ProtoMessage()

func (*ParamsRequest) Reset added in v0.34.0

func (m *ParamsRequest) Reset()

func (*ParamsRequest) Size added in v0.34.0

func (m *ParamsRequest) Size() (n int)

func (*ParamsRequest) String added in v0.34.0

func (m *ParamsRequest) String() string

func (*ParamsRequest) Unmarshal added in v0.34.0

func (m *ParamsRequest) Unmarshal(dAtA []byte) error

func (*ParamsRequest) XXX_DiscardUnknown added in v0.34.0

func (m *ParamsRequest) XXX_DiscardUnknown()

func (*ParamsRequest) XXX_Marshal added in v0.34.0

func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParamsRequest) XXX_Merge added in v0.34.0

func (m *ParamsRequest) XXX_Merge(src proto.Message)

func (*ParamsRequest) XXX_Size added in v0.34.0

func (m *ParamsRequest) XXX_Size() int

func (*ParamsRequest) XXX_Unmarshal added in v0.34.0

func (m *ParamsRequest) XXX_Unmarshal(b []byte) error

type ParamsResponse added in v0.34.0

type ParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

func (*ParamsResponse) Descriptor added in v0.34.0

func (*ParamsResponse) Descriptor() ([]byte, []int)

func (*ParamsResponse) Marshal added in v0.34.0

func (m *ParamsResponse) Marshal() (dAtA []byte, err error)

func (*ParamsResponse) MarshalTo added in v0.34.0

func (m *ParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*ParamsResponse) MarshalToSizedBuffer added in v0.34.0

func (m *ParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ParamsResponse) ProtoMessage added in v0.34.0

func (*ParamsResponse) ProtoMessage()

func (*ParamsResponse) Reset added in v0.34.0

func (m *ParamsResponse) Reset()

func (*ParamsResponse) Size added in v0.34.0

func (m *ParamsResponse) Size() (n int)

func (*ParamsResponse) String added in v0.34.0

func (m *ParamsResponse) String() string

func (*ParamsResponse) Unmarshal added in v0.34.0

func (m *ParamsResponse) Unmarshal(dAtA []byte) error

func (*ParamsResponse) XXX_DiscardUnknown added in v0.34.0

func (m *ParamsResponse) XXX_DiscardUnknown()

func (*ParamsResponse) XXX_Marshal added in v0.34.0

func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ParamsResponse) XXX_Merge added in v0.34.0

func (m *ParamsResponse) XXX_Merge(src proto.Message)

func (*ParamsResponse) XXX_Size added in v0.34.0

func (m *ParamsResponse) XXX_Size() int

func (*ParamsResponse) XXX_Unmarshal added in v0.34.0

func (m *ParamsResponse) XXX_Unmarshal(b []byte) error

type QueryServiceClient added in v0.34.0

type QueryServiceClient interface {
	Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error)
}

QueryServiceClient is the client API for QueryService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryServiceClient added in v0.34.0

func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient

type QueryServiceServer added in v0.34.0

type QueryServiceServer interface {
	Params(context.Context, *ParamsRequest) (*ParamsResponse, error)
}

QueryServiceServer is the server API for QueryService service.

type Rewarder

type Rewarder interface {
	GetPool(ctx sdk.Context, name string) reward.RewardPool
}

Rewarder provides reward functionality

type Snapshotter

type Snapshotter interface {
	GetOperator(ctx sdk.Context, proxy sdk.AccAddress) sdk.ValAddress
}

Snapshotter provides snapshot functionality

type StakingKeeper

type StakingKeeper interface {
	Validator(ctx sdk.Context, addr sdk.ValAddress) stakingtypes.ValidatorI
	PowerReduction(sdk.Context) sdk.Int
	GetLastTotalPower(sdk.Context) sdk.Int
}

StakingKeeper provides functionality of the staking module

type TalliedVote

type TalliedVote struct {
	Tally       github_com_cosmos_cosmos_sdk_types.Uint                     `protobuf:"bytes,1,opt,name=tally,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Uint" json:"tally"`
	Data        *types.Any                                                  `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	PollID      github_com_axelarnetwork_axelar_core_x_vote_exported.PollID `` /* 141-byte string literal not displayed */
	IsVoterLate map[string]bool                                             `` /* 185-byte string literal not displayed */
}

TalliedVote represents a vote for a poll with the accumulated stake of all validators voting for the same data

func NewTalliedVote

func NewTalliedVote(pollID exported.PollID, data codec.ProtoMarshaler) TalliedVote

NewTalliedVote is the constructor for TalliedVote

func (*TalliedVote) Descriptor

func (*TalliedVote) Descriptor() ([]byte, []int)

func (*TalliedVote) Marshal

func (m *TalliedVote) Marshal() (dAtA []byte, err error)

func (*TalliedVote) MarshalTo

func (m *TalliedVote) MarshalTo(dAtA []byte) (int, error)

func (*TalliedVote) MarshalToSizedBuffer

func (m *TalliedVote) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TalliedVote) ProtoMessage

func (*TalliedVote) ProtoMessage()

func (*TalliedVote) Reset

func (m *TalliedVote) Reset()

func (*TalliedVote) Size

func (m *TalliedVote) Size() (n int)

func (*TalliedVote) String

func (m *TalliedVote) String() string

func (*TalliedVote) TallyVote added in v0.21.0

func (m *TalliedVote) TallyVote(voter sdk.ValAddress, votingPower sdk.Uint, isLate bool)

TallyVote adds the given voting power to the tallied vote

func (*TalliedVote) Unmarshal

func (m *TalliedVote) Unmarshal(dAtA []byte) error

func (TalliedVote) UnpackInterfaces

func (m TalliedVote) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage

func (TalliedVote) ValidateBasic added in v0.27.0

func (m TalliedVote) ValidateBasic() error

ValidateBasic returns an error if the TalliedVote is not valid

func (*TalliedVote) XXX_DiscardUnknown

func (m *TalliedVote) XXX_DiscardUnknown()

func (*TalliedVote) XXX_Marshal

func (m *TalliedVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TalliedVote) XXX_Merge

func (m *TalliedVote) XXX_Merge(src proto.Message)

func (*TalliedVote) XXX_Size

func (m *TalliedVote) XXX_Size() int

func (*TalliedVote) XXX_Unmarshal

func (m *TalliedVote) XXX_Unmarshal(b []byte) error

type UnimplementedMsgServiceServer added in v0.17.0

type UnimplementedMsgServiceServer struct {
}

UnimplementedMsgServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServiceServer) Vote added in v0.17.0

type UnimplementedQueryServiceServer added in v0.34.0

type UnimplementedQueryServiceServer struct {
}

UnimplementedQueryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServiceServer) Params added in v0.34.0

type VoteRequest added in v0.17.0

type VoteRequest struct {
	Sender github_com_cosmos_cosmos_sdk_types.AccAddress               `protobuf:"bytes,1,opt,name=sender,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"sender,omitempty"`
	PollID github_com_axelarnetwork_axelar_core_x_vote_exported.PollID `` /* 141-byte string literal not displayed */
	Vote   *types.Any                                                  `protobuf:"bytes,5,opt,name=vote,proto3" json:"vote,omitempty"`
}

func NewVoteRequest added in v0.17.0

func NewVoteRequest(sender sdk.AccAddress, id vote.PollID, vote codec.ProtoMarshaler) *VoteRequest

NewVoteRequest creates a message of type VoteMsgRequest

func (*VoteRequest) Descriptor added in v0.17.0

func (*VoteRequest) Descriptor() ([]byte, []int)

func (VoteRequest) GetSignBytes added in v0.17.0

func (m VoteRequest) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (VoteRequest) GetSigners added in v0.17.0

func (m VoteRequest) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*VoteRequest) Marshal added in v0.17.0

func (m *VoteRequest) Marshal() (dAtA []byte, err error)

func (*VoteRequest) MarshalTo added in v0.17.0

func (m *VoteRequest) MarshalTo(dAtA []byte) (int, error)

func (*VoteRequest) MarshalToSizedBuffer added in v0.17.0

func (m *VoteRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VoteRequest) ProtoMessage added in v0.17.0

func (*VoteRequest) ProtoMessage()

func (*VoteRequest) Reset added in v0.17.0

func (m *VoteRequest) Reset()

func (VoteRequest) Route added in v0.17.0

func (m VoteRequest) Route() string

Route implements sdk.Msg

func (*VoteRequest) Size added in v0.17.0

func (m *VoteRequest) Size() (n int)

func (*VoteRequest) String added in v0.17.0

func (m *VoteRequest) String() string

func (VoteRequest) Type added in v0.17.0

func (m VoteRequest) Type() string

Type implements sdk.Msg

func (*VoteRequest) Unmarshal added in v0.17.0

func (m *VoteRequest) Unmarshal(dAtA []byte) error

func (VoteRequest) UnpackInterfaces added in v0.21.0

func (m VoteRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage

func (VoteRequest) ValidateBasic added in v0.17.0

func (m VoteRequest) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*VoteRequest) XXX_DiscardUnknown added in v0.17.0

func (m *VoteRequest) XXX_DiscardUnknown()

func (*VoteRequest) XXX_Marshal added in v0.17.0

func (m *VoteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VoteRequest) XXX_Merge added in v0.17.0

func (m *VoteRequest) XXX_Merge(src proto.Message)

func (*VoteRequest) XXX_Size added in v0.17.0

func (m *VoteRequest) XXX_Size() int

func (*VoteRequest) XXX_Unmarshal added in v0.17.0

func (m *VoteRequest) XXX_Unmarshal(b []byte) error

type VoteResponse added in v0.17.0

type VoteResponse struct {
	Log string `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"`
}

func (*VoteResponse) Descriptor added in v0.17.0

func (*VoteResponse) Descriptor() ([]byte, []int)

func (*VoteResponse) Marshal added in v0.17.0

func (m *VoteResponse) Marshal() (dAtA []byte, err error)

func (*VoteResponse) MarshalTo added in v0.17.0

func (m *VoteResponse) MarshalTo(dAtA []byte) (int, error)

func (*VoteResponse) MarshalToSizedBuffer added in v0.17.0

func (m *VoteResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*VoteResponse) ProtoMessage added in v0.17.0

func (*VoteResponse) ProtoMessage()

func (*VoteResponse) Reset added in v0.17.0

func (m *VoteResponse) Reset()

func (*VoteResponse) Size added in v0.17.0

func (m *VoteResponse) Size() (n int)

func (*VoteResponse) String added in v0.17.0

func (m *VoteResponse) String() string

func (*VoteResponse) Unmarshal added in v0.17.0

func (m *VoteResponse) Unmarshal(dAtA []byte) error

func (*VoteResponse) XXX_DiscardUnknown added in v0.17.0

func (m *VoteResponse) XXX_DiscardUnknown()

func (*VoteResponse) XXX_Marshal added in v0.17.0

func (m *VoteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*VoteResponse) XXX_Merge added in v0.17.0

func (m *VoteResponse) XXX_Merge(src proto.Message)

func (*VoteResponse) XXX_Size added in v0.17.0

func (m *VoteResponse) XXX_Size() int

func (*VoteResponse) XXX_Unmarshal added in v0.17.0

func (m *VoteResponse) XXX_Unmarshal(b []byte) error

type VoteRouter added in v0.17.0

type VoteRouter interface {
	AddHandler(module string, handler exported.VoteHandler) VoteRouter
	HasHandler(module string) bool
	GetHandler(module string) exported.VoteHandler
	Seal()
}

VoteRouter implements a Vote router based on module name.

func NewRouter added in v0.17.0

func NewRouter() VoteRouter

NewRouter creates a new Router interface instance

type Voted added in v0.21.0

type Voted struct {
	Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	Poll   string `protobuf:"bytes,3,opt,name=poll,proto3" json:"poll,omitempty"`
	Voter  string `protobuf:"bytes,4,opt,name=voter,proto3" json:"voter,omitempty"`
	State  string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"`
}

func (*Voted) Descriptor added in v0.21.0

func (*Voted) Descriptor() ([]byte, []int)

func (*Voted) Marshal added in v0.21.0

func (m *Voted) Marshal() (dAtA []byte, err error)

func (*Voted) MarshalTo added in v0.21.0

func (m *Voted) MarshalTo(dAtA []byte) (int, error)

func (*Voted) MarshalToSizedBuffer added in v0.21.0

func (m *Voted) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Voted) ProtoMessage added in v0.21.0

func (*Voted) ProtoMessage()

func (*Voted) Reset added in v0.21.0

func (m *Voted) Reset()

func (*Voted) Size added in v0.21.0

func (m *Voted) Size() (n int)

func (*Voted) String added in v0.21.0

func (m *Voted) String() string

func (*Voted) Unmarshal added in v0.21.0

func (m *Voted) Unmarshal(dAtA []byte) error

func (*Voted) XXX_DiscardUnknown added in v0.21.0

func (m *Voted) XXX_DiscardUnknown()

func (*Voted) XXX_Marshal added in v0.21.0

func (m *Voted) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Voted) XXX_Merge added in v0.21.0

func (m *Voted) XXX_Merge(src proto.Message)

func (*Voted) XXX_Size added in v0.21.0

func (m *Voted) XXX_Size() int

func (*Voted) XXX_Unmarshal added in v0.21.0

func (m *Voted) XXX_Unmarshal(b []byte) error

type Voter added in v0.18.0

type Voter interface {
	Logger(ctx sdk.Context) log.Logger
	GetVoteRouter() VoteRouter
	GetPoll(ctx sdk.Context, id exported.PollID) (exported.Poll, bool)
	GetPollQueue(ctx sdk.Context) utils.KVQueue
	DeletePoll(ctx sdk.Context, pollID exported.PollID)
	GetParams(ctx sdk.Context) (params Params)
}

Voter provides vote keeper functionality

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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