cosmos-sdk: github.com/cosmos/cosmos-sdk/x/params/types/proposal Index | Files

package proposal

import "github.com/cosmos/cosmos-sdk/x/params/types/proposal"

Index

Package Files

codec.go errors.go keys.go params.pb.go proposal.go query.pb.go

Constants

const (
    // ModuleName defines the name of the module
    ModuleName = "params"

    // RouterKey defines the routing key for a ParameterChangeProposal
    RouterKey = "params"
)
const (
    // ProposalTypeChange defines the type for a ParameterChangeProposal
    ProposalTypeChange = "ParameterChange"
)

Variables

var (
    ErrUnknownSubspace  = sdkerrors.Register(ModuleName, 2, "unknown subspace")
    ErrSettingParameter = sdkerrors.Register(ModuleName, 3, "failed to set parameter")
    ErrEmptyChanges     = sdkerrors.Register(ModuleName, 4, "submitted parameter changes are empty")
    ErrEmptySubspace    = sdkerrors.Register(ModuleName, 5, "parameter subspace is empty")
    ErrEmptyKey         = sdkerrors.Register(ModuleName, 6, "parameter key is empty")
    ErrEmptyValue       = sdkerrors.Register(ModuleName, 7, "parameter value is empty")
)

x/params module sentinel errors

var (
    ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
var (
    ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)

func RegisterCodec Uses

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers all necessary param module types with a given codec.

func RegisterInterfaces Uses

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterQueryServer Uses

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateChanges Uses

func ValidateChanges(changes []ParamChange) error

ValidateChanges performs basic validation checks over a set of ParamChange. It returns an error if any ParamChange is invalid.

type ParamChange Uses

type ParamChange struct {
    Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"`
    Key      string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
    Value    string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
}

ParamChange defines a parameter change.

func NewParamChange Uses

func NewParamChange(subspace, key, value string) ParamChange

func (*ParamChange) Descriptor Uses

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

func (*ParamChange) Equal Uses

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

func (*ParamChange) GetKey Uses

func (m *ParamChange) GetKey() string

func (*ParamChange) GetSubspace Uses

func (m *ParamChange) GetSubspace() string

func (*ParamChange) GetValue Uses

func (m *ParamChange) GetValue() string

func (*ParamChange) Marshal Uses

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

func (*ParamChange) MarshalTo Uses

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

func (*ParamChange) MarshalToSizedBuffer Uses

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

func (*ParamChange) ProtoMessage Uses

func (*ParamChange) ProtoMessage()

func (*ParamChange) Reset Uses

func (m *ParamChange) Reset()

func (*ParamChange) Size Uses

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

func (ParamChange) String Uses

func (pc ParamChange) String() string

String implements the Stringer interface.

func (*ParamChange) Unmarshal Uses

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

func (*ParamChange) XXX_DiscardUnknown Uses

func (m *ParamChange) XXX_DiscardUnknown()

func (*ParamChange) XXX_Marshal Uses

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

func (*ParamChange) XXX_Merge Uses

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

func (*ParamChange) XXX_Size Uses

func (m *ParamChange) XXX_Size() int

func (*ParamChange) XXX_Unmarshal Uses

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

type ParameterChangeProposal Uses

type ParameterChangeProposal struct {
    Title       string        `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
    Description string        `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
    Changes     []ParamChange `protobuf:"bytes,3,rep,name=changes,proto3" json:"changes"`
}

ParameterChangeProposal defines a proposal which contains multiple parameter changes.

func NewParameterChangeProposal Uses

func NewParameterChangeProposal(title, description string, changes []ParamChange) *ParameterChangeProposal

func (*ParameterChangeProposal) Descriptor Uses

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

func (*ParameterChangeProposal) Equal Uses

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

func (*ParameterChangeProposal) GetDescription Uses

func (pcp *ParameterChangeProposal) GetDescription() string

GetDescription returns the description of a parameter change proposal.

func (*ParameterChangeProposal) GetTitle Uses

func (pcp *ParameterChangeProposal) GetTitle() string

GetTitle returns the title of a parameter change proposal.

func (*ParameterChangeProposal) Marshal Uses

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

func (*ParameterChangeProposal) MarshalTo Uses

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

func (*ParameterChangeProposal) MarshalToSizedBuffer Uses

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

func (*ParameterChangeProposal) ProposalRoute Uses

func (pcp *ParameterChangeProposal) ProposalRoute() string

ProposalRoute returns the routing key of a parameter change proposal.

func (*ParameterChangeProposal) ProposalType Uses

func (pcp *ParameterChangeProposal) ProposalType() string

ProposalType returns the type of a parameter change proposal.

func (*ParameterChangeProposal) ProtoMessage Uses

func (*ParameterChangeProposal) ProtoMessage()

func (*ParameterChangeProposal) Reset Uses

func (m *ParameterChangeProposal) Reset()

func (*ParameterChangeProposal) Size Uses

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

func (ParameterChangeProposal) String Uses

func (pcp ParameterChangeProposal) String() string

String implements the Stringer interface.

func (*ParameterChangeProposal) Unmarshal Uses

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

func (*ParameterChangeProposal) ValidateBasic Uses

func (pcp *ParameterChangeProposal) ValidateBasic() error

ValidateBasic validates the parameter change proposal

func (*ParameterChangeProposal) XXX_DiscardUnknown Uses

func (m *ParameterChangeProposal) XXX_DiscardUnknown()

func (*ParameterChangeProposal) XXX_Marshal Uses

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

func (*ParameterChangeProposal) XXX_Merge Uses

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

func (*ParameterChangeProposal) XXX_Size Uses

func (m *ParameterChangeProposal) XXX_Size() int

func (*ParameterChangeProposal) XXX_Unmarshal Uses

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

type QueryClient Uses

type QueryClient interface {
    // Params queries a specific parameter of a module, given its subspace and key.
    Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 Uses

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest Uses

type QueryParamsRequest struct {
    // subspace defines the module to query the parameter for.
    Subspace string `protobuf:"bytes,1,opt,name=subspace,proto3" json:"subspace,omitempty"`
    // key defines the key of the parameter in the subspace.
    Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}

QueryParamsRequest is request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor Uses

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

func (*QueryParamsRequest) GetKey Uses

func (m *QueryParamsRequest) GetKey() string

func (*QueryParamsRequest) GetSubspace Uses

func (m *QueryParamsRequest) GetSubspace() string

func (*QueryParamsRequest) Marshal Uses

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

func (*QueryParamsRequest) MarshalTo Uses

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

func (*QueryParamsRequest) MarshalToSizedBuffer Uses

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

func (*QueryParamsRequest) ProtoMessage Uses

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset Uses

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size Uses

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

func (*QueryParamsRequest) String Uses

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal Uses

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

func (*QueryParamsRequest) XXX_DiscardUnknown Uses

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal Uses

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

func (*QueryParamsRequest) XXX_Merge Uses

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

func (*QueryParamsRequest) XXX_Size Uses

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal Uses

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

type QueryParamsResponse Uses

type QueryParamsResponse struct {
    // param defines the queried parameter.
    Param ParamChange `protobuf:"bytes,1,opt,name=param,proto3" json:"param"`
}

QueryParamsResponse is response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor Uses

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

func (*QueryParamsResponse) GetParam Uses

func (m *QueryParamsResponse) GetParam() ParamChange

func (*QueryParamsResponse) Marshal Uses

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

func (*QueryParamsResponse) MarshalTo Uses

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

func (*QueryParamsResponse) MarshalToSizedBuffer Uses

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

func (*QueryParamsResponse) ProtoMessage Uses

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset Uses

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size Uses

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

func (*QueryParamsResponse) String Uses

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal Uses

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

func (*QueryParamsResponse) XXX_DiscardUnknown Uses

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal Uses

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

func (*QueryParamsResponse) XXX_Merge Uses

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

func (*QueryParamsResponse) XXX_Size Uses

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal Uses

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

type QueryServer Uses

type QueryServer interface {
    // Params queries a specific parameter of a module, given its subspace and key.
    Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer Uses

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params Uses

func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)

Package proposal imports 17 packages (graph) and is imported by 7 packages. Updated 2020-08-13. Refresh now. Tools for package owners.