types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 27 Imported by: 3

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "rvote"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_rvote"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

View Source
const (
	PropIdLength = 64
)

Constants pertaining to a Content object

Variables

View Source
var (
	ErrInvalidProposalContent  = sdkerrors.Register(ModuleName, 1, "invalid proposal content error")
	ErrInvalidProposalType     = sdkerrors.Register(ModuleName, 2, "invalid proposal type error")
	ErrNoProposalHandlerExists = sdkerrors.Register(ModuleName, 3, "no handler exists for proposal type error")
	ErrInvalidProposer         = sdkerrors.Register(ModuleName, 4, "invalid proposer error")
	ErrProposalAlreadyApproved = sdkerrors.Register(ModuleName, 5, "proposal already approved error")
	ErrProposalAlreadyExpired  = sdkerrors.Register(ModuleName, 6, "invalid already expired error")
)

x/rvote module sentinel errors

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 (
	ProposalLifePrefix = []byte{0x01}
	ProposalPrefix     = []byte{0x02}
)
View Source
var (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = 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 ProposalStatus_name = map[int32]string{
	0: "PROPOSAL_STATUS_INITIATED",
	1: "PROPOSAL_STATUS_APPROVED",
	2: "PROPOSAL_STATUS_EXPIRED",
}
View Source
var ProposalStatus_value = map[string]int32{
	"PROPOSAL_STATUS_INITIATED": 0,
	"PROPOSAL_STATUS_APPROVED":  1,
	"PROPOSAL_STATUS_EXPIRED":   2,
}

Functions

func IsValidProposalType

func IsValidProposalType(ty string) bool

IsValidProposalType returns a boolean determining if the proposal type is valid.

NOTE: Modules with their own proposal types must register them.

func KeyPrefix

func KeyPrefix(p string) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterProposalType

func RegisterProposalType(ty string)

RegisterProposalType registers a proposal type. It will panic if the type is already registered.

func RegisterProposalTypeCodec

func RegisterProposalTypeCodec(o interface{}, name string)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer 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 to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateAbstract

func ValidateAbstract(c Content) error

ValidateAbstract validates a proposal's abstract contents returning an error if invalid.

Types

type Content

type Content interface {
	GetPropId() string
	GetDenom() string
	ProposalRoute() string
	ProposalType() string
	ValidateBasic() error
	String() string
}

Content defines an interface that a proposal must implement. It contains information such as the title and description along with the type and routing information for the appropriate handler to process the proposal. Content can have additional fields, which will handled by a proposal's Handler. TODO Try to unify this interface with types/module/simulation https://github.com/cosmos/cosmos-sdk/issues/5853

type GenesisState

type GenesisState struct {
	ProposalLife int64 `protobuf:"varint,1,opt,name=proposal_life,json=proposalLife,proto3" json:"proposal_life,omitempty" yaml:"proposal_life"`
}

GenesisState defines the rvote module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetProposalLife

func (m *GenesisState) GetProposalLife() int64

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 (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 Handler

type Handler func(ctx sdk.Context, content Content) error

Handler defines a function that handles a proposal after it has passed the governance process.

type MsgClient

type MsgClient interface {
	SetProposalLife(ctx context.Context, in *MsgSetProposalLife, opts ...grpc.CallOption) (*MsgSetProposalLifeResponse, error)
	SubmitProposal(ctx context.Context, in *MsgSubmitProposal, opts ...grpc.CallOption) (*MsgSubmitProposalResponse, 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 MsgServer

type MsgServer interface {
	SetProposalLife(context.Context, *MsgSetProposalLife) (*MsgSetProposalLifeResponse, error)
	SubmitProposal(context.Context, *MsgSubmitProposal) (*MsgSubmitProposalResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSetProposalLife

type MsgSetProposalLife struct {
	Creator      string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	ProposalLife int64  `protobuf:"varint,2,opt,name=proposalLife,proto3" json:"proposalLife,omitempty"`
}

func NewMsgSetProposalLife

func NewMsgSetProposalLife(creator sdk.AccAddress, proposalLife int64) *MsgSetProposalLife

func (*MsgSetProposalLife) Descriptor

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

func (*MsgSetProposalLife) GetCreator

func (m *MsgSetProposalLife) GetCreator() string

func (*MsgSetProposalLife) GetProposalLife

func (m *MsgSetProposalLife) GetProposalLife() int64

func (*MsgSetProposalLife) GetSignBytes

func (msg *MsgSetProposalLife) GetSignBytes() []byte

func (*MsgSetProposalLife) GetSigners

func (msg *MsgSetProposalLife) GetSigners() []sdk.AccAddress

func (*MsgSetProposalLife) Marshal

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

func (*MsgSetProposalLife) MarshalTo

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

func (*MsgSetProposalLife) MarshalToSizedBuffer

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

func (*MsgSetProposalLife) ProtoMessage

func (*MsgSetProposalLife) ProtoMessage()

func (*MsgSetProposalLife) Reset

func (m *MsgSetProposalLife) Reset()

func (*MsgSetProposalLife) Route

func (msg *MsgSetProposalLife) Route() string

func (*MsgSetProposalLife) Size

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

func (*MsgSetProposalLife) String

func (m *MsgSetProposalLife) String() string

func (*MsgSetProposalLife) Type

func (msg *MsgSetProposalLife) Type() string

func (*MsgSetProposalLife) Unmarshal

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

func (*MsgSetProposalLife) ValidateBasic

func (msg *MsgSetProposalLife) ValidateBasic() error

func (*MsgSetProposalLife) XXX_DiscardUnknown

func (m *MsgSetProposalLife) XXX_DiscardUnknown()

func (*MsgSetProposalLife) XXX_Marshal

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

func (*MsgSetProposalLife) XXX_Merge

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

func (*MsgSetProposalLife) XXX_Size

func (m *MsgSetProposalLife) XXX_Size() int

func (*MsgSetProposalLife) XXX_Unmarshal

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

type MsgSetProposalLifeResponse

type MsgSetProposalLifeResponse struct {
}

func (*MsgSetProposalLifeResponse) Descriptor

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

func (*MsgSetProposalLifeResponse) Marshal

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

func (*MsgSetProposalLifeResponse) MarshalTo

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

func (*MsgSetProposalLifeResponse) MarshalToSizedBuffer

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

func (*MsgSetProposalLifeResponse) ProtoMessage

func (*MsgSetProposalLifeResponse) ProtoMessage()

func (*MsgSetProposalLifeResponse) Reset

func (m *MsgSetProposalLifeResponse) Reset()

func (*MsgSetProposalLifeResponse) Size

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

func (*MsgSetProposalLifeResponse) String

func (m *MsgSetProposalLifeResponse) String() string

func (*MsgSetProposalLifeResponse) Unmarshal

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

func (*MsgSetProposalLifeResponse) XXX_DiscardUnknown

func (m *MsgSetProposalLifeResponse) XXX_DiscardUnknown()

func (*MsgSetProposalLifeResponse) XXX_Marshal

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

func (*MsgSetProposalLifeResponse) XXX_Merge

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

func (*MsgSetProposalLifeResponse) XXX_Size

func (m *MsgSetProposalLifeResponse) XXX_Size() int

func (*MsgSetProposalLifeResponse) XXX_Unmarshal

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

type MsgSubmitProposal

type MsgSubmitProposal struct {
	Proposer string     `protobuf:"bytes,1,opt,name=proposer,proto3" json:"proposer,omitempty"`
	Content  *types.Any `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
}

func NewMsgSubmitProposal

func NewMsgSubmitProposal(proposer sdk.AccAddress, content Content) (*MsgSubmitProposal, error)

func (*MsgSubmitProposal) Descriptor

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

func (*MsgSubmitProposal) GetContent

func (m *MsgSubmitProposal) GetContent() Content

func (*MsgSubmitProposal) GetSignBytes

func (msg *MsgSubmitProposal) GetSignBytes() []byte

func (*MsgSubmitProposal) GetSigners

func (msg *MsgSubmitProposal) GetSigners() []sdk.AccAddress

func (*MsgSubmitProposal) Marshal

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

func (*MsgSubmitProposal) MarshalTo

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

func (*MsgSubmitProposal) MarshalToSizedBuffer

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

func (*MsgSubmitProposal) ProtoMessage

func (*MsgSubmitProposal) ProtoMessage()

func (*MsgSubmitProposal) Reset

func (m *MsgSubmitProposal) Reset()

func (*MsgSubmitProposal) Route

func (msg *MsgSubmitProposal) Route() string

func (*MsgSubmitProposal) SetContent

func (m *MsgSubmitProposal) SetContent(content Content) error

func (*MsgSubmitProposal) Size

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

func (MsgSubmitProposal) String

func (m MsgSubmitProposal) String() string

String implements the Stringer interface

func (*MsgSubmitProposal) Type

func (msg *MsgSubmitProposal) Type() string

func (*MsgSubmitProposal) Unmarshal

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

func (MsgSubmitProposal) UnpackInterfaces

func (m MsgSubmitProposal) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*MsgSubmitProposal) ValidateBasic

func (msg *MsgSubmitProposal) ValidateBasic() error

func (*MsgSubmitProposal) XXX_DiscardUnknown

func (m *MsgSubmitProposal) XXX_DiscardUnknown()

func (*MsgSubmitProposal) XXX_Marshal

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

func (*MsgSubmitProposal) XXX_Merge

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

func (*MsgSubmitProposal) XXX_Size

func (m *MsgSubmitProposal) XXX_Size() int

func (*MsgSubmitProposal) XXX_Unmarshal

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

type MsgSubmitProposalResponse

type MsgSubmitProposalResponse struct {
	PropId string         `protobuf:"bytes,1,opt,name=propId,proto3" json:"propId,omitempty"`
	Status ProposalStatus `protobuf:"varint,2,opt,name=status,proto3,enum=stafihub.stafihub.rvote.ProposalStatus" json:"status,omitempty"`
}

func (*MsgSubmitProposalResponse) Descriptor

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

func (*MsgSubmitProposalResponse) GetPropId

func (m *MsgSubmitProposalResponse) GetPropId() string

func (*MsgSubmitProposalResponse) GetStatus

func (*MsgSubmitProposalResponse) Marshal

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

func (*MsgSubmitProposalResponse) MarshalTo

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

func (*MsgSubmitProposalResponse) MarshalToSizedBuffer

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

func (*MsgSubmitProposalResponse) ProtoMessage

func (*MsgSubmitProposalResponse) ProtoMessage()

func (*MsgSubmitProposalResponse) Reset

func (m *MsgSubmitProposalResponse) Reset()

func (*MsgSubmitProposalResponse) Size

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

func (*MsgSubmitProposalResponse) String

func (m *MsgSubmitProposalResponse) String() string

func (*MsgSubmitProposalResponse) Unmarshal

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

func (*MsgSubmitProposalResponse) XXX_DiscardUnknown

func (m *MsgSubmitProposalResponse) XXX_DiscardUnknown()

func (*MsgSubmitProposalResponse) XXX_Marshal

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

func (*MsgSubmitProposalResponse) XXX_Merge

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

func (*MsgSubmitProposalResponse) XXX_Size

func (m *MsgSubmitProposalResponse) XXX_Size() int

func (*MsgSubmitProposalResponse) XXX_Unmarshal

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

type Proposal

type Proposal struct {
	Content     *types.Any     `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	Status      ProposalStatus `` /* 129-byte string literal not displayed */
	Voted       []string       `protobuf:"bytes,3,rep,name=voted,proto3" json:"voted,omitempty" yaml:"voted"`
	StartBlock  int64          `protobuf:"varint,4,opt,name=startBlock,proto3" json:"startBlock,omitempty" yaml:"start_block"`
	ExpireBlock int64          `protobuf:"varint,5,opt,name=expireBlock,proto3" json:"expireBlock,omitempty" yaml:"expire_block"`
}

func (*Proposal) Descriptor

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

func (*Proposal) Equal

func (this *Proposal) Equal(that interface{}) bool

func (*Proposal) GetContent

func (p *Proposal) GetContent() Content

GetContent returns the proposal Content

func (*Proposal) HasVoted

func (p *Proposal) HasVoted(proposer string) bool

func (*Proposal) IsExpired

func (p *Proposal) IsExpired(block int64) bool

func (*Proposal) Marshal

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

func (*Proposal) MarshalTo

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

func (*Proposal) MarshalToSizedBuffer

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

func (*Proposal) PropId

func (p *Proposal) PropId() string

func (*Proposal) ProposalRoute

func (p *Proposal) ProposalRoute() string

func (*Proposal) ProposalType

func (p *Proposal) ProposalType() string

func (*Proposal) ProtoMessage

func (*Proposal) ProtoMessage()

func (*Proposal) Reset

func (m *Proposal) Reset()

func (*Proposal) SetContent

func (p *Proposal) SetContent(content Content) error

func (*Proposal) Size

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

func (*Proposal) String

func (p *Proposal) String() string

String implements stringer interface

func (*Proposal) Unmarshal

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

func (*Proposal) UnpackInterfaces

func (p *Proposal) UnpackInterfaces(unpacker types.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*Proposal) XXX_DiscardUnknown

func (m *Proposal) XXX_DiscardUnknown()

func (*Proposal) XXX_Marshal

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

func (*Proposal) XXX_Merge

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

func (*Proposal) XXX_Size

func (m *Proposal) XXX_Size() int

func (*Proposal) XXX_Unmarshal

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

type ProposalStatus

type ProposalStatus int32

ProposalStatus enumerates the valid statuses of a proposal.

const (
	StatusInitiated ProposalStatus = 0
	StatusApproved  ProposalStatus = 1
	StatusExpired   ProposalStatus = 2
)

func (ProposalStatus) EnumDescriptor

func (ProposalStatus) EnumDescriptor() ([]byte, []int)

func (ProposalStatus) String

func (x ProposalStatus) String() string

type QueryClient

type QueryClient interface {
	// Queries a list of getProposal items.
	GetProposal(ctx context.Context, in *QueryGetProposalRequest, opts ...grpc.CallOption) (*QueryGetProposalResponse, error)
	// Queries a list of getProposalLife items.
	GetProposalLife(ctx context.Context, in *QueryGetProposalLifeRequest, opts ...grpc.CallOption) (*QueryGetProposalLifeResponse, error)
}

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 QueryGetProposalLifeRequest

type QueryGetProposalLifeRequest struct {
}

func (*QueryGetProposalLifeRequest) Descriptor

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

func (*QueryGetProposalLifeRequest) Marshal

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

func (*QueryGetProposalLifeRequest) MarshalTo

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

func (*QueryGetProposalLifeRequest) MarshalToSizedBuffer

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

func (*QueryGetProposalLifeRequest) ProtoMessage

func (*QueryGetProposalLifeRequest) ProtoMessage()

func (*QueryGetProposalLifeRequest) Reset

func (m *QueryGetProposalLifeRequest) Reset()

func (*QueryGetProposalLifeRequest) Size

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

func (*QueryGetProposalLifeRequest) String

func (m *QueryGetProposalLifeRequest) String() string

func (*QueryGetProposalLifeRequest) Unmarshal

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

func (*QueryGetProposalLifeRequest) XXX_DiscardUnknown

func (m *QueryGetProposalLifeRequest) XXX_DiscardUnknown()

func (*QueryGetProposalLifeRequest) XXX_Marshal

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

func (*QueryGetProposalLifeRequest) XXX_Merge

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

func (*QueryGetProposalLifeRequest) XXX_Size

func (m *QueryGetProposalLifeRequest) XXX_Size() int

func (*QueryGetProposalLifeRequest) XXX_Unmarshal

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

type QueryGetProposalLifeResponse

type QueryGetProposalLifeResponse struct {
	ProposalLife int64 `protobuf:"varint,1,opt,name=proposalLife,proto3" json:"proposalLife,omitempty"`
}

func (*QueryGetProposalLifeResponse) Descriptor

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

func (*QueryGetProposalLifeResponse) GetProposalLife

func (m *QueryGetProposalLifeResponse) GetProposalLife() int64

func (*QueryGetProposalLifeResponse) Marshal

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

func (*QueryGetProposalLifeResponse) MarshalTo

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

func (*QueryGetProposalLifeResponse) MarshalToSizedBuffer

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

func (*QueryGetProposalLifeResponse) ProtoMessage

func (*QueryGetProposalLifeResponse) ProtoMessage()

func (*QueryGetProposalLifeResponse) Reset

func (m *QueryGetProposalLifeResponse) Reset()

func (*QueryGetProposalLifeResponse) Size

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

func (*QueryGetProposalLifeResponse) String

func (*QueryGetProposalLifeResponse) Unmarshal

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

func (*QueryGetProposalLifeResponse) XXX_DiscardUnknown

func (m *QueryGetProposalLifeResponse) XXX_DiscardUnknown()

func (*QueryGetProposalLifeResponse) XXX_Marshal

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

func (*QueryGetProposalLifeResponse) XXX_Merge

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

func (*QueryGetProposalLifeResponse) XXX_Size

func (m *QueryGetProposalLifeResponse) XXX_Size() int

func (*QueryGetProposalLifeResponse) XXX_Unmarshal

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

type QueryGetProposalRequest

type QueryGetProposalRequest struct {
	PropId string `protobuf:"bytes,1,opt,name=propId,proto3" json:"propId,omitempty"`
}

func (*QueryGetProposalRequest) Descriptor

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

func (*QueryGetProposalRequest) GetPropId

func (m *QueryGetProposalRequest) GetPropId() string

func (*QueryGetProposalRequest) Marshal

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

func (*QueryGetProposalRequest) MarshalTo

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

func (*QueryGetProposalRequest) MarshalToSizedBuffer

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

func (*QueryGetProposalRequest) ProtoMessage

func (*QueryGetProposalRequest) ProtoMessage()

func (*QueryGetProposalRequest) Reset

func (m *QueryGetProposalRequest) Reset()

func (*QueryGetProposalRequest) Size

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

func (*QueryGetProposalRequest) String

func (m *QueryGetProposalRequest) String() string

func (*QueryGetProposalRequest) Unmarshal

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

func (*QueryGetProposalRequest) XXX_DiscardUnknown

func (m *QueryGetProposalRequest) XXX_DiscardUnknown()

func (*QueryGetProposalRequest) XXX_Marshal

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

func (*QueryGetProposalRequest) XXX_Merge

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

func (*QueryGetProposalRequest) XXX_Size

func (m *QueryGetProposalRequest) XXX_Size() int

func (*QueryGetProposalRequest) XXX_Unmarshal

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

type QueryGetProposalResponse

type QueryGetProposalResponse struct {
	Proposal string `protobuf:"bytes,1,opt,name=proposal,proto3" json:"proposal,omitempty"`
}

func (*QueryGetProposalResponse) Descriptor

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

func (*QueryGetProposalResponse) GetProposal

func (m *QueryGetProposalResponse) GetProposal() string

func (*QueryGetProposalResponse) Marshal

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

func (*QueryGetProposalResponse) MarshalTo

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

func (*QueryGetProposalResponse) MarshalToSizedBuffer

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

func (*QueryGetProposalResponse) ProtoMessage

func (*QueryGetProposalResponse) ProtoMessage()

func (*QueryGetProposalResponse) Reset

func (m *QueryGetProposalResponse) Reset()

func (*QueryGetProposalResponse) Size

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

func (*QueryGetProposalResponse) String

func (m *QueryGetProposalResponse) String() string

func (*QueryGetProposalResponse) Unmarshal

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

func (*QueryGetProposalResponse) XXX_DiscardUnknown

func (m *QueryGetProposalResponse) XXX_DiscardUnknown()

func (*QueryGetProposalResponse) XXX_Marshal

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

func (*QueryGetProposalResponse) XXX_Merge

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

func (*QueryGetProposalResponse) XXX_Size

func (m *QueryGetProposalResponse) XXX_Size() int

func (*QueryGetProposalResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Queries a list of getProposal items.
	GetProposal(context.Context, *QueryGetProposalRequest) (*QueryGetProposalResponse, error)
	// Queries a list of getProposalLife items.
	GetProposalLife(context.Context, *QueryGetProposalLifeRequest) (*QueryGetProposalLifeResponse, error)
}

QueryServer is the server API for Query service.

type RelayerKeeper

type RelayerKeeper interface {
	HasRelayer(ctx sdk.Context, arena, denom, address string) bool
	GetThreshold(ctx sdk.Context, arena, denom string) (relayertypes.Threshold, bool)
}

type Router

type Router interface {
	AddRoute(r string, h Handler) (rtr Router)
	HasRoute(r string) bool
	GetRoute(path string) (h Handler)
	Seal()
}

Router implements a Handler router.

func NewRouter

func NewRouter() Router

NewRouter creates a new Router interface instance

type SudoKeeper

type SudoKeeper interface {
	IsAdmin(ctx sdk.Context, address string) bool
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) SetProposalLife

func (*UnimplementedMsgServer) SubmitProposal

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) GetProposal

func (*UnimplementedQueryServer) GetProposalLife

Jump to

Keyboard shortcuts

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