Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func KeyPrefix(p string) []byte
- func ParamKeyTable() paramtypes.KeyTable
- func PlanKey(planIndex string) []byte
- func RegisterCodec(cdc *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func UniqueIndexKeyPrefix() string
- 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 ListInfoStruct
- func (*ListInfoStruct) Descriptor() ([]byte, []int)
- func (m *ListInfoStruct) GetDescription() string
- func (m *ListInfoStruct) GetIndex() string
- func (m *ListInfoStruct) GetPrice() types.Coin
- func (m *ListInfoStruct) Marshal() (dAtA []byte, err error)
- func (m *ListInfoStruct) MarshalTo(dAtA []byte) (int, error)
- func (m *ListInfoStruct) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ListInfoStruct) ProtoMessage()
- func (m *ListInfoStruct) Reset()
- func (m *ListInfoStruct) Size() (n int)
- func (m *ListInfoStruct) String() string
- func (m *ListInfoStruct) Unmarshal(dAtA []byte) error
- func (m *ListInfoStruct) XXX_DiscardUnknown()
- func (m *ListInfoStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ListInfoStruct) XXX_Merge(src proto.Message)
- func (m *ListInfoStruct) XXX_Size() int
- func (m *ListInfoStruct) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- 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 (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p 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 Plan
- func (*Plan) Descriptor() ([]byte, []int)
- func (this *Plan) Equal(that interface{}) bool
- func (m *Plan) GetAllowOveruse() bool
- func (m *Plan) GetAnnualDiscountPercentage() uint64
- func (m *Plan) GetBlock() uint64
- func (m *Plan) GetDescription() string
- func (m *Plan) GetIndex() string
- func (m *Plan) GetOveruseRate() uint64
- func (m *Plan) GetPlanPolicy() types1.Policy
- func (m *Plan) GetPrice() types.Coin
- func (m *Plan) GetType() string
- func (m *Plan) Marshal() (dAtA []byte, err error)
- func (m *Plan) MarshalTo(dAtA []byte) (int, error)
- func (m *Plan) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Plan) ProtoMessage()
- func (m *Plan) Reset()
- func (m *Plan) Size() (n int)
- func (m *Plan) String() string
- func (m *Plan) Unmarshal(dAtA []byte) error
- func (p Plan) ValidatePlan() error
- func (m *Plan) XXX_DiscardUnknown()
- func (m *Plan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Plan) XXX_Merge(src proto.Message)
- func (m *Plan) XXX_Size() int
- func (m *Plan) XXX_Unmarshal(b []byte) error
- type PlansAddProposal
- func (*PlansAddProposal) Descriptor() ([]byte, []int)
- func (this *PlansAddProposal) Equal(that interface{}) bool
- func (pcp *PlansAddProposal) GetDescription() string
- func (pcp *PlansAddProposal) GetTitle() string
- func (m *PlansAddProposal) Marshal() (dAtA []byte, err error)
- func (m *PlansAddProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *PlansAddProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (pcp *PlansAddProposal) ProposalRoute() string
- func (pcp *PlansAddProposal) ProposalType() string
- func (*PlansAddProposal) ProtoMessage()
- func (m *PlansAddProposal) Reset()
- func (m *PlansAddProposal) Size() (n int)
- func (pcp PlansAddProposal) String() string
- func (m *PlansAddProposal) Unmarshal(dAtA []byte) error
- func (pcp *PlansAddProposal) ValidateBasic() error
- func (m *PlansAddProposal) XXX_DiscardUnknown()
- func (m *PlansAddProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PlansAddProposal) XXX_Merge(src proto.Message)
- func (m *PlansAddProposal) XXX_Size() int
- func (m *PlansAddProposal) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryInfoRequest
- func (*QueryInfoRequest) Descriptor() ([]byte, []int)
- func (m *QueryInfoRequest) GetPlanIndex() string
- func (m *QueryInfoRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryInfoRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryInfoRequest) ProtoMessage()
- func (m *QueryInfoRequest) Reset()
- func (m *QueryInfoRequest) Size() (n int)
- func (m *QueryInfoRequest) String() string
- func (m *QueryInfoRequest) Unmarshal(dAtA []byte) error
- func (m *QueryInfoRequest) XXX_DiscardUnknown()
- func (m *QueryInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryInfoRequest) XXX_Merge(src proto.Message)
- func (m *QueryInfoRequest) XXX_Size() int
- func (m *QueryInfoRequest) XXX_Unmarshal(b []byte) error
- type QueryInfoResponse
- func (*QueryInfoResponse) Descriptor() ([]byte, []int)
- func (m *QueryInfoResponse) GetPlanInfo() Plan
- func (m *QueryInfoResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryInfoResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryInfoResponse) ProtoMessage()
- func (m *QueryInfoResponse) Reset()
- func (m *QueryInfoResponse) Size() (n int)
- func (m *QueryInfoResponse) String() string
- func (m *QueryInfoResponse) Unmarshal(dAtA []byte) error
- func (m *QueryInfoResponse) XXX_DiscardUnknown()
- func (m *QueryInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryInfoResponse) XXX_Merge(src proto.Message)
- func (m *QueryInfoResponse) XXX_Size() int
- func (m *QueryInfoResponse) XXX_Unmarshal(b []byte) error
- type QueryListRequest
- func (*QueryListRequest) Descriptor() ([]byte, []int)
- func (m *QueryListRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryListRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryListRequest) ProtoMessage()
- func (m *QueryListRequest) Reset()
- func (m *QueryListRequest) Size() (n int)
- func (m *QueryListRequest) String() string
- func (m *QueryListRequest) Unmarshal(dAtA []byte) error
- func (m *QueryListRequest) XXX_DiscardUnknown()
- func (m *QueryListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryListRequest) XXX_Merge(src proto.Message)
- func (m *QueryListRequest) XXX_Size() int
- func (m *QueryListRequest) XXX_Unmarshal(b []byte) error
- type QueryListResponse
- func (*QueryListResponse) Descriptor() ([]byte, []int)
- func (m *QueryListResponse) GetPlansInfo() []ListInfoStruct
- func (m *QueryListResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryListResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryListResponse) ProtoMessage()
- func (m *QueryListResponse) Reset()
- func (m *QueryListResponse) Size() (n int)
- func (m *QueryListResponse) String() string
- func (m *QueryListResponse) Unmarshal(dAtA []byte) error
- func (m *QueryListResponse) XXX_DiscardUnknown()
- func (m *QueryListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryListResponse) XXX_Merge(src proto.Message)
- func (m *QueryListResponse) XXX_Size() int
- func (m *QueryListResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Info(ctx context.Context, req *QueryInfoRequest) (*QueryInfoResponse, error)
- func (*UnimplementedQueryServer) List(ctx context.Context, req *QueryListRequest) (*QueryListResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
Constants ¶
const ( // ModuleName defines the module name ModuleName = "plan" // 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_plan" // Proposals router keys ProposalsRouterKey = "planproposals" PlanFixationStorePrefix = "plan-fs" )
const ( MAX_LEN_PACKAGE_NAME = 50 MAX_LEN_PACKAGE_DESCRIPTION = 500 MAX_LEN_PACKAGE_TYPE = 20 )
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
const (
// PlanKeyPrefix is the prefix to retrieve all Plan
PlanKeyPrefix = "Plan/value/"
)
const (
ProposalPlansAdd = "PlansAdd"
)
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrEmptyPlans = sdkerrors.Register(ModuleName, 1, "plans list is empty") ErrInvalidPlanPrice = sdkerrors.Register(ModuleName, 3, "plan's price field is invalid") ErrInvalidPlanOveruse = sdkerrors.Register(ModuleName, 4, "plan's CU overuse fields are invalid") ErrInvalidPlanServicersToPair = sdkerrors.Register(ModuleName, 5, "plan's servicersToPair field is invalid") ErrInvalidPlanName = sdkerrors.Register(ModuleName, 6, "plan's name field is invalid") ErrInvalidPlanType = sdkerrors.Register(ModuleName, 7, "plan's type field is invalid") ErrInvalidPlanDescription = sdkerrors.Register(ModuleName, 8, "plan's description field is invalid") ErrInvalidPlanComputeUnits = sdkerrors.Register(ModuleName, 9, "plan's compute units fields are invalid") ErrInvalidPlanAnnualDiscount = sdkerrors.Register(ModuleName, 10, "plan's annual discount field is invalid") )
x/plan module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
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 ( ErrInvalidLengthPlan = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowPlan = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupPlan = fmt.Errorf("proto: unexpected end of group") )
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
func RegisterCodec ¶
func RegisterCodec(cdc *codec.LegacyAmino)
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
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 UniqueIndexKeyPrefix ¶
func UniqueIndexKeyPrefix() string
Types ¶
type GenesisState ¶
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
GenesisState defines the plan 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) 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 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 ListInfoStruct ¶
type ListInfoStruct struct { Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Price types.Coin `protobuf:"bytes,3,opt,name=price,proto3" json:"price"` }
func (*ListInfoStruct) Descriptor ¶
func (*ListInfoStruct) Descriptor() ([]byte, []int)
func (*ListInfoStruct) GetDescription ¶
func (m *ListInfoStruct) GetDescription() string
func (*ListInfoStruct) GetIndex ¶
func (m *ListInfoStruct) GetIndex() string
func (*ListInfoStruct) GetPrice ¶
func (m *ListInfoStruct) GetPrice() types.Coin
func (*ListInfoStruct) Marshal ¶
func (m *ListInfoStruct) Marshal() (dAtA []byte, err error)
func (*ListInfoStruct) MarshalToSizedBuffer ¶
func (m *ListInfoStruct) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ListInfoStruct) ProtoMessage ¶
func (*ListInfoStruct) ProtoMessage()
func (*ListInfoStruct) Reset ¶
func (m *ListInfoStruct) Reset()
func (*ListInfoStruct) Size ¶
func (m *ListInfoStruct) Size() (n int)
func (*ListInfoStruct) String ¶
func (m *ListInfoStruct) String() string
func (*ListInfoStruct) Unmarshal ¶
func (m *ListInfoStruct) Unmarshal(dAtA []byte) error
func (*ListInfoStruct) XXX_DiscardUnknown ¶
func (m *ListInfoStruct) XXX_DiscardUnknown()
func (*ListInfoStruct) XXX_Marshal ¶
func (m *ListInfoStruct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ListInfoStruct) XXX_Merge ¶
func (m *ListInfoStruct) XXX_Merge(src proto.Message)
func (*ListInfoStruct) XXX_Size ¶
func (m *ListInfoStruct) XXX_Size() int
func (*ListInfoStruct) XXX_Unmarshal ¶
func (m *ListInfoStruct) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { }
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 Params ¶
type Params struct { }
Params defines the parameters for the module.
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type Plan ¶
type Plan struct { Index string `protobuf:"bytes,1,opt,name=index,proto3" json:"index,omitempty"` Block uint64 `protobuf:"varint,3,opt,name=block,proto3" json:"block,omitempty"` Price types.Coin `protobuf:"bytes,4,opt,name=price,proto3" json:"price"` AllowOveruse bool `protobuf:"varint,8,opt,name=allow_overuse,json=allowOveruse,proto3" json:"allow_overuse,omitempty"` OveruseRate uint64 `protobuf:"varint,9,opt,name=overuse_rate,json=overuseRate,proto3" json:"overuse_rate,omitempty"` Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"` Type string `protobuf:"bytes,12,opt,name=type,proto3" json:"type,omitempty"` AnnualDiscountPercentage uint64 `` /* 137-byte string literal not displayed */ PlanPolicy types1.Policy `protobuf:"bytes,14,opt,name=plan_policy,json=planPolicy,proto3" json:"plan_policy"` }
func (*Plan) Descriptor ¶
func (*Plan) GetAllowOveruse ¶
func (*Plan) GetAnnualDiscountPercentage ¶
func (*Plan) GetDescription ¶
func (*Plan) GetOveruseRate ¶
func (*Plan) GetPlanPolicy ¶
func (*Plan) ProtoMessage ¶
func (*Plan) ProtoMessage()
func (Plan) ValidatePlan ¶
Function to validate a plan object fields
func (*Plan) XXX_DiscardUnknown ¶
func (m *Plan) XXX_DiscardUnknown()
func (*Plan) XXX_Unmarshal ¶
type PlansAddProposal ¶
type PlansAddProposal 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"` Plans []Plan `protobuf:"bytes,3,rep,name=plans,proto3" json:"plans"` }
func NewPlansAddProposal ¶
func NewPlansAddProposal(title, description string, plans []Plan) *PlansAddProposal
func (*PlansAddProposal) Descriptor ¶
func (*PlansAddProposal) Descriptor() ([]byte, []int)
func (*PlansAddProposal) Equal ¶
func (this *PlansAddProposal) Equal(that interface{}) bool
func (*PlansAddProposal) GetDescription ¶
func (pcp *PlansAddProposal) GetDescription() string
GetDescription returns the description of a proposal.
func (*PlansAddProposal) GetTitle ¶
func (pcp *PlansAddProposal) GetTitle() string
GetTitle returns the title of a proposal.
func (*PlansAddProposal) Marshal ¶
func (m *PlansAddProposal) Marshal() (dAtA []byte, err error)
func (*PlansAddProposal) MarshalToSizedBuffer ¶
func (m *PlansAddProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PlansAddProposal) ProposalRoute ¶
func (pcp *PlansAddProposal) ProposalRoute() string
ProposalRoute returns the routing key of a proposal.
func (*PlansAddProposal) ProposalType ¶
func (pcp *PlansAddProposal) ProposalType() string
ProposalType returns the type of a proposal.
func (*PlansAddProposal) ProtoMessage ¶
func (*PlansAddProposal) ProtoMessage()
func (*PlansAddProposal) Reset ¶
func (m *PlansAddProposal) Reset()
func (*PlansAddProposal) Size ¶
func (m *PlansAddProposal) Size() (n int)
func (PlansAddProposal) String ¶
func (pcp PlansAddProposal) String() string
String implements the Stringer interface.
func (*PlansAddProposal) Unmarshal ¶
func (m *PlansAddProposal) Unmarshal(dAtA []byte) error
func (*PlansAddProposal) ValidateBasic ¶
func (pcp *PlansAddProposal) ValidateBasic() error
ValidateBasic validates the proposal
func (*PlansAddProposal) XXX_DiscardUnknown ¶
func (m *PlansAddProposal) XXX_DiscardUnknown()
func (*PlansAddProposal) XXX_Marshal ¶
func (m *PlansAddProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PlansAddProposal) XXX_Merge ¶
func (m *PlansAddProposal) XXX_Merge(src proto.Message)
func (*PlansAddProposal) XXX_Size ¶
func (m *PlansAddProposal) XXX_Size() int
func (*PlansAddProposal) XXX_Unmarshal ¶
func (m *PlansAddProposal) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Queries a list of List items. List(ctx context.Context, in *QueryListRequest, opts ...grpc.CallOption) (*QueryListResponse, error) // Queries an Info item. Info(ctx context.Context, in *QueryInfoRequest, opts ...grpc.CallOption) (*QueryInfoResponse, 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 QueryInfoRequest ¶
type QueryInfoRequest struct {
PlanIndex string `protobuf:"bytes,1,opt,name=plan_index,json=planIndex,proto3" json:"plan_index,omitempty"`
}
func (*QueryInfoRequest) Descriptor ¶
func (*QueryInfoRequest) Descriptor() ([]byte, []int)
func (*QueryInfoRequest) GetPlanIndex ¶
func (m *QueryInfoRequest) GetPlanIndex() string
func (*QueryInfoRequest) Marshal ¶
func (m *QueryInfoRequest) Marshal() (dAtA []byte, err error)
func (*QueryInfoRequest) MarshalToSizedBuffer ¶
func (m *QueryInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryInfoRequest) ProtoMessage ¶
func (*QueryInfoRequest) ProtoMessage()
func (*QueryInfoRequest) Reset ¶
func (m *QueryInfoRequest) Reset()
func (*QueryInfoRequest) Size ¶
func (m *QueryInfoRequest) Size() (n int)
func (*QueryInfoRequest) String ¶
func (m *QueryInfoRequest) String() string
func (*QueryInfoRequest) Unmarshal ¶
func (m *QueryInfoRequest) Unmarshal(dAtA []byte) error
func (*QueryInfoRequest) XXX_DiscardUnknown ¶
func (m *QueryInfoRequest) XXX_DiscardUnknown()
func (*QueryInfoRequest) XXX_Marshal ¶
func (m *QueryInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryInfoRequest) XXX_Merge ¶
func (m *QueryInfoRequest) XXX_Merge(src proto.Message)
func (*QueryInfoRequest) XXX_Size ¶
func (m *QueryInfoRequest) XXX_Size() int
func (*QueryInfoRequest) XXX_Unmarshal ¶
func (m *QueryInfoRequest) XXX_Unmarshal(b []byte) error
type QueryInfoResponse ¶
type QueryInfoResponse struct {
PlanInfo Plan `protobuf:"bytes,1,opt,name=plan_info,json=planInfo,proto3" json:"plan_info"`
}
func (*QueryInfoResponse) Descriptor ¶
func (*QueryInfoResponse) Descriptor() ([]byte, []int)
func (*QueryInfoResponse) GetPlanInfo ¶
func (m *QueryInfoResponse) GetPlanInfo() Plan
func (*QueryInfoResponse) Marshal ¶
func (m *QueryInfoResponse) Marshal() (dAtA []byte, err error)
func (*QueryInfoResponse) MarshalTo ¶
func (m *QueryInfoResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryInfoResponse) MarshalToSizedBuffer ¶
func (m *QueryInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryInfoResponse) ProtoMessage ¶
func (*QueryInfoResponse) ProtoMessage()
func (*QueryInfoResponse) Reset ¶
func (m *QueryInfoResponse) Reset()
func (*QueryInfoResponse) Size ¶
func (m *QueryInfoResponse) Size() (n int)
func (*QueryInfoResponse) String ¶
func (m *QueryInfoResponse) String() string
func (*QueryInfoResponse) Unmarshal ¶
func (m *QueryInfoResponse) Unmarshal(dAtA []byte) error
func (*QueryInfoResponse) XXX_DiscardUnknown ¶
func (m *QueryInfoResponse) XXX_DiscardUnknown()
func (*QueryInfoResponse) XXX_Marshal ¶
func (m *QueryInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryInfoResponse) XXX_Merge ¶
func (m *QueryInfoResponse) XXX_Merge(src proto.Message)
func (*QueryInfoResponse) XXX_Size ¶
func (m *QueryInfoResponse) XXX_Size() int
func (*QueryInfoResponse) XXX_Unmarshal ¶
func (m *QueryInfoResponse) XXX_Unmarshal(b []byte) error
type QueryListRequest ¶
type QueryListRequest struct { }
func (*QueryListRequest) Descriptor ¶
func (*QueryListRequest) Descriptor() ([]byte, []int)
func (*QueryListRequest) Marshal ¶
func (m *QueryListRequest) Marshal() (dAtA []byte, err error)
func (*QueryListRequest) MarshalToSizedBuffer ¶
func (m *QueryListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryListRequest) ProtoMessage ¶
func (*QueryListRequest) ProtoMessage()
func (*QueryListRequest) Reset ¶
func (m *QueryListRequest) Reset()
func (*QueryListRequest) Size ¶
func (m *QueryListRequest) Size() (n int)
func (*QueryListRequest) String ¶
func (m *QueryListRequest) String() string
func (*QueryListRequest) Unmarshal ¶
func (m *QueryListRequest) Unmarshal(dAtA []byte) error
func (*QueryListRequest) XXX_DiscardUnknown ¶
func (m *QueryListRequest) XXX_DiscardUnknown()
func (*QueryListRequest) XXX_Marshal ¶
func (m *QueryListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryListRequest) XXX_Merge ¶
func (m *QueryListRequest) XXX_Merge(src proto.Message)
func (*QueryListRequest) XXX_Size ¶
func (m *QueryListRequest) XXX_Size() int
func (*QueryListRequest) XXX_Unmarshal ¶
func (m *QueryListRequest) XXX_Unmarshal(b []byte) error
type QueryListResponse ¶
type QueryListResponse struct {
PlansInfo []ListInfoStruct `protobuf:"bytes,1,rep,name=plans_info,json=plansInfo,proto3" json:"plans_info"`
}
func (*QueryListResponse) Descriptor ¶
func (*QueryListResponse) Descriptor() ([]byte, []int)
func (*QueryListResponse) GetPlansInfo ¶
func (m *QueryListResponse) GetPlansInfo() []ListInfoStruct
func (*QueryListResponse) Marshal ¶
func (m *QueryListResponse) Marshal() (dAtA []byte, err error)
func (*QueryListResponse) MarshalTo ¶
func (m *QueryListResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryListResponse) MarshalToSizedBuffer ¶
func (m *QueryListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryListResponse) ProtoMessage ¶
func (*QueryListResponse) ProtoMessage()
func (*QueryListResponse) Reset ¶
func (m *QueryListResponse) Reset()
func (*QueryListResponse) Size ¶
func (m *QueryListResponse) Size() (n int)
func (*QueryListResponse) String ¶
func (m *QueryListResponse) String() string
func (*QueryListResponse) Unmarshal ¶
func (m *QueryListResponse) Unmarshal(dAtA []byte) error
func (*QueryListResponse) XXX_DiscardUnknown ¶
func (m *QueryListResponse) XXX_DiscardUnknown()
func (*QueryListResponse) XXX_Marshal ¶
func (m *QueryListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryListResponse) XXX_Merge ¶
func (m *QueryListResponse) XXX_Merge(src proto.Message)
func (*QueryListResponse) XXX_Size ¶
func (m *QueryListResponse) XXX_Size() int
func (*QueryListResponse) XXX_Unmarshal ¶
func (m *QueryListResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct { // params holds all the parameters of this module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Queries a list of List items. List(context.Context, *QueryListRequest) (*QueryListResponse, error) // Queries an Info item. Info(context.Context, *QueryInfoRequest) (*QueryInfoResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Info ¶
func (*UnimplementedQueryServer) Info(ctx context.Context, req *QueryInfoRequest) (*QueryInfoResponse, error)
func (*UnimplementedQueryServer) List ¶
func (*UnimplementedQueryServer) List(ctx context.Context, req *QueryListRequest) (*QueryListResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)