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 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 SubscriptionKey(consumer string) []byte
- type AccountKeeper
- type BankKeeper
- type EpochstorageKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgSubscribe
- func (*MsgSubscribe) Descriptor() ([]byte, []int)
- func (m *MsgSubscribe) GetConsumer() string
- func (m *MsgSubscribe) GetCreator() string
- func (m *MsgSubscribe) GetIndex() string
- func (m *MsgSubscribe) GetIsYearly() bool
- func (msg *MsgSubscribe) GetSignBytes() []byte
- func (msg *MsgSubscribe) GetSigners() []sdk.AccAddress
- func (m *MsgSubscribe) Marshal() (dAtA []byte, err error)
- func (m *MsgSubscribe) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSubscribe) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSubscribe) ProtoMessage()
- func (m *MsgSubscribe) Reset()
- func (msg *MsgSubscribe) Route() string
- func (m *MsgSubscribe) Size() (n int)
- func (m *MsgSubscribe) String() string
- func (msg *MsgSubscribe) Type() string
- func (m *MsgSubscribe) Unmarshal(dAtA []byte) error
- func (msg *MsgSubscribe) ValidateBasic() error
- func (m *MsgSubscribe) XXX_DiscardUnknown()
- func (m *MsgSubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSubscribe) XXX_Merge(src proto.Message)
- func (m *MsgSubscribe) XXX_Size() int
- func (m *MsgSubscribe) XXX_Unmarshal(b []byte) error
- type MsgSubscribeResponse
- func (*MsgSubscribeResponse) Descriptor() ([]byte, []int)
- func (m *MsgSubscribeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgSubscribeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSubscribeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgSubscribeResponse) ProtoMessage()
- func (m *MsgSubscribeResponse) Reset()
- func (m *MsgSubscribeResponse) Size() (n int)
- func (m *MsgSubscribeResponse) String() string
- func (m *MsgSubscribeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgSubscribeResponse) XXX_DiscardUnknown()
- func (m *MsgSubscribeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgSubscribeResponse) XXX_Merge(src proto.Message)
- func (m *MsgSubscribeResponse) XXX_Size() int
- func (m *MsgSubscribeResponse) XXX_Unmarshal(b []byte) error
- 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 PlansKeeper
- type ProjectsKeeper
- type QueryClient
- type QueryCurrentSubscriptionRequest
- func (*QueryCurrentSubscriptionRequest) Descriptor() ([]byte, []int)
- func (m *QueryCurrentSubscriptionRequest) GetConsumer() string
- func (m *QueryCurrentSubscriptionRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentSubscriptionRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentSubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentSubscriptionRequest) ProtoMessage()
- func (m *QueryCurrentSubscriptionRequest) Reset()
- func (m *QueryCurrentSubscriptionRequest) Size() (n int)
- func (m *QueryCurrentSubscriptionRequest) String() string
- func (m *QueryCurrentSubscriptionRequest) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentSubscriptionRequest) XXX_DiscardUnknown()
- func (m *QueryCurrentSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentSubscriptionRequest) XXX_Merge(src proto.Message)
- func (m *QueryCurrentSubscriptionRequest) XXX_Size() int
- func (m *QueryCurrentSubscriptionRequest) XXX_Unmarshal(b []byte) error
- type QueryCurrentSubscriptionResponse
- func (*QueryCurrentSubscriptionResponse) Descriptor() ([]byte, []int)
- func (m *QueryCurrentSubscriptionResponse) GetSub() Subscription
- func (m *QueryCurrentSubscriptionResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentSubscriptionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentSubscriptionResponse) ProtoMessage()
- func (m *QueryCurrentSubscriptionResponse) Reset()
- func (m *QueryCurrentSubscriptionResponse) Size() (n int)
- func (m *QueryCurrentSubscriptionResponse) String() string
- func (m *QueryCurrentSubscriptionResponse) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentSubscriptionResponse) XXX_DiscardUnknown()
- func (m *QueryCurrentSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentSubscriptionResponse) XXX_Merge(src proto.Message)
- func (m *QueryCurrentSubscriptionResponse) XXX_Size() int
- func (m *QueryCurrentSubscriptionResponse) 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 Subscription
- func (*Subscription) Descriptor() ([]byte, []int)
- func (m *Subscription) GetBlock() uint64
- func (m *Subscription) GetConsumer() string
- func (m *Subscription) GetCreator() string
- func (m *Subscription) GetExpiryTime() uint64
- func (m *Subscription) GetIsYearly() bool
- func (m *Subscription) GetPlanBlock() uint64
- func (m *Subscription) GetPlanIndex() string
- func (m *Subscription) GetRemainingCU() uint64
- func (m *Subscription) GetUsedCU() uint64
- func (sub Subscription) IsExpired(date time.Time) bool
- func (m *Subscription) Marshal() (dAtA []byte, err error)
- func (m *Subscription) MarshalTo(dAtA []byte) (int, error)
- func (m *Subscription) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Subscription) ProtoMessage()
- func (m *Subscription) Reset()
- func (m *Subscription) Size() (n int)
- func (m *Subscription) String() string
- func (m *Subscription) Unmarshal(dAtA []byte) error
- func (sub Subscription) ValidateSubscription() error
- func (m *Subscription) XXX_DiscardUnknown()
- func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Subscription) XXX_Merge(src proto.Message)
- func (m *Subscription) XXX_Size() int
- func (m *Subscription) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName defines the module name ModuleName = "subscription" // 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_subscription" )
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
const (
// SubscriptionKeyPrefix is the prefix to retrieve all Subscription
SubscriptionKeyPrefix = "Subscribe/value/"
)
const TypeMsgSubscribe = "subscribe"
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrSample = sdkerrors.Register(ModuleName, 1100, "sample error") ErrBlankParameter = sdkerrors.New(ModuleName, 101, "required parameter is empty") )
x/subscription 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 ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = 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 SubscriptionKey ¶ added in v0.7.0
SubscriptionKey returns the store key to retrieve a Subscription from the consumer field
Types ¶
type AccountKeeper ¶
AccountKeeper defines the expected account keeper used for simulations (noalias)
type BankKeeper ¶
type BankKeeper interface { GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error }
BankKeeper defines the expected interface needed to retrieve account balances.
type EpochstorageKeeper ¶
type GenesisState ¶
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
GenesisState defines the subscription 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 MsgClient ¶
type MsgClient interface {
Subscribe(ctx context.Context, in *MsgSubscribe, opts ...grpc.CallOption) (*MsgSubscribeResponse, 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 {
Subscribe(context.Context, *MsgSubscribe) (*MsgSubscribeResponse, error)
}
MsgServer is the server API for Msg service.
type MsgSubscribe ¶ added in v0.7.0
type MsgSubscribe struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Consumer string `protobuf:"bytes,2,opt,name=consumer,proto3" json:"consumer,omitempty"` Index string `protobuf:"bytes,3,opt,name=index,proto3" json:"index,omitempty"` IsYearly bool `protobuf:"varint,4,opt,name=isYearly,proto3" json:"isYearly,omitempty"` }
func NewMsgSubscribe ¶ added in v0.7.0
func NewMsgSubscribe(creator string, consumer string, index string, isYearly bool) *MsgSubscribe
func (*MsgSubscribe) Descriptor ¶ added in v0.7.0
func (*MsgSubscribe) Descriptor() ([]byte, []int)
func (*MsgSubscribe) GetConsumer ¶ added in v0.7.0
func (m *MsgSubscribe) GetConsumer() string
func (*MsgSubscribe) GetCreator ¶ added in v0.7.0
func (m *MsgSubscribe) GetCreator() string
func (*MsgSubscribe) GetIndex ¶ added in v0.7.0
func (m *MsgSubscribe) GetIndex() string
func (*MsgSubscribe) GetIsYearly ¶ added in v0.7.0
func (m *MsgSubscribe) GetIsYearly() bool
func (*MsgSubscribe) GetSignBytes ¶ added in v0.7.0
func (msg *MsgSubscribe) GetSignBytes() []byte
func (*MsgSubscribe) GetSigners ¶ added in v0.7.0
func (msg *MsgSubscribe) GetSigners() []sdk.AccAddress
func (*MsgSubscribe) Marshal ¶ added in v0.7.0
func (m *MsgSubscribe) Marshal() (dAtA []byte, err error)
func (*MsgSubscribe) MarshalTo ¶ added in v0.7.0
func (m *MsgSubscribe) MarshalTo(dAtA []byte) (int, error)
func (*MsgSubscribe) MarshalToSizedBuffer ¶ added in v0.7.0
func (m *MsgSubscribe) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSubscribe) ProtoMessage ¶ added in v0.7.0
func (*MsgSubscribe) ProtoMessage()
func (*MsgSubscribe) Reset ¶ added in v0.7.0
func (m *MsgSubscribe) Reset()
func (*MsgSubscribe) Route ¶ added in v0.7.0
func (msg *MsgSubscribe) Route() string
func (*MsgSubscribe) Size ¶ added in v0.7.0
func (m *MsgSubscribe) Size() (n int)
func (*MsgSubscribe) String ¶ added in v0.7.0
func (m *MsgSubscribe) String() string
func (*MsgSubscribe) Type ¶ added in v0.7.0
func (msg *MsgSubscribe) Type() string
func (*MsgSubscribe) Unmarshal ¶ added in v0.7.0
func (m *MsgSubscribe) Unmarshal(dAtA []byte) error
func (*MsgSubscribe) ValidateBasic ¶ added in v0.7.0
func (msg *MsgSubscribe) ValidateBasic() error
func (*MsgSubscribe) XXX_DiscardUnknown ¶ added in v0.7.0
func (m *MsgSubscribe) XXX_DiscardUnknown()
func (*MsgSubscribe) XXX_Marshal ¶ added in v0.7.0
func (m *MsgSubscribe) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSubscribe) XXX_Merge ¶ added in v0.7.0
func (m *MsgSubscribe) XXX_Merge(src proto.Message)
func (*MsgSubscribe) XXX_Size ¶ added in v0.7.0
func (m *MsgSubscribe) XXX_Size() int
func (*MsgSubscribe) XXX_Unmarshal ¶ added in v0.7.0
func (m *MsgSubscribe) XXX_Unmarshal(b []byte) error
type MsgSubscribeResponse ¶ added in v0.7.0
type MsgSubscribeResponse struct { }
func (*MsgSubscribeResponse) Descriptor ¶ added in v0.7.0
func (*MsgSubscribeResponse) Descriptor() ([]byte, []int)
func (*MsgSubscribeResponse) Marshal ¶ added in v0.7.0
func (m *MsgSubscribeResponse) Marshal() (dAtA []byte, err error)
func (*MsgSubscribeResponse) MarshalTo ¶ added in v0.7.0
func (m *MsgSubscribeResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgSubscribeResponse) MarshalToSizedBuffer ¶ added in v0.7.0
func (m *MsgSubscribeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSubscribeResponse) ProtoMessage ¶ added in v0.7.0
func (*MsgSubscribeResponse) ProtoMessage()
func (*MsgSubscribeResponse) Reset ¶ added in v0.7.0
func (m *MsgSubscribeResponse) Reset()
func (*MsgSubscribeResponse) Size ¶ added in v0.7.0
func (m *MsgSubscribeResponse) Size() (n int)
func (*MsgSubscribeResponse) String ¶ added in v0.7.0
func (m *MsgSubscribeResponse) String() string
func (*MsgSubscribeResponse) Unmarshal ¶ added in v0.7.0
func (m *MsgSubscribeResponse) Unmarshal(dAtA []byte) error
func (*MsgSubscribeResponse) XXX_DiscardUnknown ¶ added in v0.7.0
func (m *MsgSubscribeResponse) XXX_DiscardUnknown()
func (*MsgSubscribeResponse) XXX_Marshal ¶ added in v0.7.0
func (m *MsgSubscribeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgSubscribeResponse) XXX_Merge ¶ added in v0.7.0
func (m *MsgSubscribeResponse) XXX_Merge(src proto.Message)
func (*MsgSubscribeResponse) XXX_Size ¶ added in v0.7.0
func (m *MsgSubscribeResponse) XXX_Size() int
func (*MsgSubscribeResponse) XXX_Unmarshal ¶ added in v0.7.0
func (m *MsgSubscribeResponse) XXX_Unmarshal(b []byte) error
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 PlansKeeper ¶
type ProjectsKeeper ¶
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 CurrentSubscription items. CurrentSubscription(ctx context.Context, in *QueryCurrentSubscriptionRequest, opts ...grpc.CallOption) (*QueryCurrentSubscriptionResponse, 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 QueryCurrentSubscriptionRequest ¶ added in v0.7.0
type QueryCurrentSubscriptionRequest struct {
Consumer string `protobuf:"bytes,1,opt,name=consumer,proto3" json:"consumer,omitempty"`
}
func (*QueryCurrentSubscriptionRequest) Descriptor ¶ added in v0.7.0
func (*QueryCurrentSubscriptionRequest) Descriptor() ([]byte, []int)
func (*QueryCurrentSubscriptionRequest) GetConsumer ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) GetConsumer() string
func (*QueryCurrentSubscriptionRequest) Marshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) Marshal() (dAtA []byte, err error)
func (*QueryCurrentSubscriptionRequest) MarshalTo ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentSubscriptionRequest) MarshalToSizedBuffer ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentSubscriptionRequest) ProtoMessage ¶ added in v0.7.0
func (*QueryCurrentSubscriptionRequest) ProtoMessage()
func (*QueryCurrentSubscriptionRequest) Reset ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) Reset()
func (*QueryCurrentSubscriptionRequest) Size ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) Size() (n int)
func (*QueryCurrentSubscriptionRequest) String ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) String() string
func (*QueryCurrentSubscriptionRequest) Unmarshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) Unmarshal(dAtA []byte) error
func (*QueryCurrentSubscriptionRequest) XXX_DiscardUnknown ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) XXX_DiscardUnknown()
func (*QueryCurrentSubscriptionRequest) XXX_Marshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentSubscriptionRequest) XXX_Merge ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) XXX_Merge(src proto.Message)
func (*QueryCurrentSubscriptionRequest) XXX_Size ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) XXX_Size() int
func (*QueryCurrentSubscriptionRequest) XXX_Unmarshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionRequest) XXX_Unmarshal(b []byte) error
type QueryCurrentSubscriptionResponse ¶ added in v0.7.0
type QueryCurrentSubscriptionResponse struct {
Sub Subscription `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub"`
}
func (*QueryCurrentSubscriptionResponse) Descriptor ¶ added in v0.7.0
func (*QueryCurrentSubscriptionResponse) Descriptor() ([]byte, []int)
func (*QueryCurrentSubscriptionResponse) GetSub ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) GetSub() Subscription
func (*QueryCurrentSubscriptionResponse) Marshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) Marshal() (dAtA []byte, err error)
func (*QueryCurrentSubscriptionResponse) MarshalTo ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentSubscriptionResponse) MarshalToSizedBuffer ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentSubscriptionResponse) ProtoMessage ¶ added in v0.7.0
func (*QueryCurrentSubscriptionResponse) ProtoMessage()
func (*QueryCurrentSubscriptionResponse) Reset ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) Reset()
func (*QueryCurrentSubscriptionResponse) Size ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) Size() (n int)
func (*QueryCurrentSubscriptionResponse) String ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) String() string
func (*QueryCurrentSubscriptionResponse) Unmarshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) Unmarshal(dAtA []byte) error
func (*QueryCurrentSubscriptionResponse) XXX_DiscardUnknown ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) XXX_DiscardUnknown()
func (*QueryCurrentSubscriptionResponse) XXX_Marshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentSubscriptionResponse) XXX_Merge ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) XXX_Merge(src proto.Message)
func (*QueryCurrentSubscriptionResponse) XXX_Size ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) XXX_Size() int
func (*QueryCurrentSubscriptionResponse) XXX_Unmarshal ¶ added in v0.7.0
func (m *QueryCurrentSubscriptionResponse) 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 CurrentSubscription items. CurrentSubscription(context.Context, *QueryCurrentSubscriptionRequest) (*QueryCurrentSubscriptionResponse, error) }
QueryServer is the server API for Query service.
type Subscription ¶
type Subscription struct { Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` Consumer string `protobuf:"bytes,2,opt,name=consumer,proto3" json:"consumer,omitempty"` Block uint64 `protobuf:"varint,3,opt,name=block,proto3" json:"block,omitempty"` PlanIndex string `protobuf:"bytes,4,opt,name=plan_index,json=planIndex,proto3" json:"plan_index,omitempty"` PlanBlock uint64 `protobuf:"varint,5,opt,name=plan_block,json=planBlock,proto3" json:"plan_block,omitempty"` IsYearly bool `protobuf:"varint,6,opt,name=is_yearly,json=isYearly,proto3" json:"is_yearly,omitempty"` ExpiryTime uint64 `protobuf:"varint,7,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty"` UsedCU uint64 `protobuf:"varint,8,opt,name=usedCU,proto3" json:"usedCU,omitempty"` RemainingCU uint64 `protobuf:"varint,9,opt,name=remainingCU,proto3" json:"remainingCU,omitempty"` }
func (*Subscription) Descriptor ¶
func (*Subscription) Descriptor() ([]byte, []int)
func (*Subscription) GetBlock ¶
func (m *Subscription) GetBlock() uint64
func (*Subscription) GetConsumer ¶
func (m *Subscription) GetConsumer() string
func (*Subscription) GetCreator ¶
func (m *Subscription) GetCreator() string
func (*Subscription) GetExpiryTime ¶ added in v0.7.0
func (m *Subscription) GetExpiryTime() uint64
func (*Subscription) GetIsYearly ¶ added in v0.7.0
func (m *Subscription) GetIsYearly() bool
func (*Subscription) GetPlanBlock ¶
func (m *Subscription) GetPlanBlock() uint64
func (*Subscription) GetPlanIndex ¶
func (m *Subscription) GetPlanIndex() string
func (*Subscription) GetRemainingCU ¶ added in v0.7.0
func (m *Subscription) GetRemainingCU() uint64
func (*Subscription) GetUsedCU ¶ added in v0.7.0
func (m *Subscription) GetUsedCU() uint64
func (Subscription) IsExpired ¶ added in v0.7.0
func (sub Subscription) IsExpired(date time.Time) bool
func (*Subscription) Marshal ¶
func (m *Subscription) Marshal() (dAtA []byte, err error)
func (*Subscription) MarshalToSizedBuffer ¶
func (m *Subscription) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Subscription) ProtoMessage ¶
func (*Subscription) ProtoMessage()
func (*Subscription) Reset ¶
func (m *Subscription) Reset()
func (*Subscription) Size ¶
func (m *Subscription) Size() (n int)
func (*Subscription) String ¶
func (m *Subscription) String() string
func (*Subscription) Unmarshal ¶
func (m *Subscription) Unmarshal(dAtA []byte) error
func (Subscription) ValidateSubscription ¶
func (sub Subscription) ValidateSubscription() error
ValidateSubscription validates a subscription object fields
func (*Subscription) XXX_DiscardUnknown ¶
func (m *Subscription) XXX_DiscardUnknown()
func (*Subscription) XXX_Marshal ¶
func (m *Subscription) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Subscription) XXX_Merge ¶
func (m *Subscription) XXX_Merge(src proto.Message)
func (*Subscription) XXX_Size ¶
func (m *Subscription) XXX_Size() int
func (*Subscription) XXX_Unmarshal ¶
func (m *Subscription) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Subscribe ¶ added in v0.7.0
func (*UnimplementedMsgServer) Subscribe(ctx context.Context, req *MsgSubscribe) (*MsgSubscribeResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) CurrentSubscription ¶ added in v0.7.0
func (*UnimplementedQueryServer) CurrentSubscription(ctx context.Context, req *QueryCurrentSubscriptionRequest) (*QueryCurrentSubscriptionResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)