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 MsgBuy
- func (*MsgBuy) Descriptor() ([]byte, []int)
- func (m *MsgBuy) GetConsumer() string
- func (m *MsgBuy) GetCreator() string
- func (m *MsgBuy) GetDuration() uint64
- func (m *MsgBuy) GetIndex() string
- func (msg *MsgBuy) GetSignBytes() []byte
- func (msg *MsgBuy) GetSigners() []sdk.AccAddress
- func (m *MsgBuy) GetVrfpk() string
- func (m *MsgBuy) Marshal() (dAtA []byte, err error)
- func (m *MsgBuy) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBuy) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBuy) ProtoMessage()
- func (m *MsgBuy) Reset()
- func (msg *MsgBuy) Route() string
- func (m *MsgBuy) Size() (n int)
- func (m *MsgBuy) String() string
- func (msg *MsgBuy) Type() string
- func (m *MsgBuy) Unmarshal(dAtA []byte) error
- func (msg *MsgBuy) ValidateBasic() error
- func (m *MsgBuy) XXX_DiscardUnknown()
- func (m *MsgBuy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBuy) XXX_Merge(src proto.Message)
- func (m *MsgBuy) XXX_Size() int
- func (m *MsgBuy) XXX_Unmarshal(b []byte) error
- type MsgBuyResponse
- func (*MsgBuyResponse) Descriptor() ([]byte, []int)
- func (m *MsgBuyResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgBuyResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBuyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBuyResponse) ProtoMessage()
- func (m *MsgBuyResponse) Reset()
- func (m *MsgBuyResponse) Size() (n int)
- func (m *MsgBuyResponse) String() string
- func (m *MsgBuyResponse) Unmarshal(dAtA []byte) error
- func (m *MsgBuyResponse) XXX_DiscardUnknown()
- func (m *MsgBuyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBuyResponse) XXX_Merge(src proto.Message)
- func (m *MsgBuyResponse) XXX_Size() int
- func (m *MsgBuyResponse) 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 PlansKeeper
- type ProjectsKeeper
- type QueryClient
- type QueryCurrentRequest
- func (*QueryCurrentRequest) Descriptor() ([]byte, []int)
- func (m *QueryCurrentRequest) GetConsumer() string
- func (m *QueryCurrentRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentRequest) ProtoMessage()
- func (m *QueryCurrentRequest) Reset()
- func (m *QueryCurrentRequest) Size() (n int)
- func (m *QueryCurrentRequest) String() string
- func (m *QueryCurrentRequest) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentRequest) XXX_DiscardUnknown()
- func (m *QueryCurrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentRequest) XXX_Merge(src proto.Message)
- func (m *QueryCurrentRequest) XXX_Size() int
- func (m *QueryCurrentRequest) XXX_Unmarshal(b []byte) error
- type QueryCurrentResponse
- func (*QueryCurrentResponse) Descriptor() ([]byte, []int)
- func (m *QueryCurrentResponse) GetSub() Subscription
- func (m *QueryCurrentResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryCurrentResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryCurrentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryCurrentResponse) ProtoMessage()
- func (m *QueryCurrentResponse) Reset()
- func (m *QueryCurrentResponse) Size() (n int)
- func (m *QueryCurrentResponse) String() string
- func (m *QueryCurrentResponse) Unmarshal(dAtA []byte) error
- func (m *QueryCurrentResponse) XXX_DiscardUnknown()
- func (m *QueryCurrentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryCurrentResponse) XXX_Merge(src proto.Message)
- func (m *QueryCurrentResponse) XXX_Size() int
- func (m *QueryCurrentResponse) 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) GetDurationLeft() uint64
- func (m *Subscription) GetDurationTotal() uint64
- func (m *Subscription) GetMonthCuLeft() uint64
- func (m *Subscription) GetMonthCuTotal() uint64
- func (m *Subscription) GetMonthExpiryTime() uint64
- func (m *Subscription) GetPlanBlock() uint64
- func (m *Subscription) GetPlanIndex() string
- func (m *Subscription) GetPrevCuLeft() uint64
- func (m *Subscription) GetPrevExpiryBlock() uint64
- func (sub Subscription) IsMonthExpired(date time.Time) bool
- func (sub Subscription) IsStale(block uint64) 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 (
BuySubscriptionEventName = "buy_subscription_event"
)
const DefaultIndex uint64 = 1
DefaultIndex is the default capability global index
const (
MAX_SUBSCRIPTION_DURATION = 12 // max duration of subscription in months
)
const (
// SubscriptionKeyPrefix is the prefix to retrieve all Subscription
SubscriptionKeyPrefix = "Subscribe/value/"
)
const TypeMsgBuy = "buy"
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") ErrInvalidParameter = sdkerrors.New(ModuleName, 102, "required parameter is invalid") )
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 MsgBuy ¶
type MsgBuy 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"` Duration uint64 `protobuf:"varint,4,opt,name=duration,proto3" json:"duration,omitempty"` Vrfpk string `protobuf:"bytes,5,opt,name=vrfpk,proto3" json:"vrfpk,omitempty"` }
func (*MsgBuy) Descriptor ¶
func (*MsgBuy) GetConsumer ¶
func (*MsgBuy) GetCreator ¶
func (*MsgBuy) GetDuration ¶
func (*MsgBuy) GetSignBytes ¶
func (*MsgBuy) GetSigners ¶
func (msg *MsgBuy) GetSigners() []sdk.AccAddress
func (*MsgBuy) MarshalToSizedBuffer ¶
func (*MsgBuy) ProtoMessage ¶
func (*MsgBuy) ProtoMessage()
func (*MsgBuy) ValidateBasic ¶
func (*MsgBuy) XXX_DiscardUnknown ¶
func (m *MsgBuy) XXX_DiscardUnknown()
func (*MsgBuy) XXX_Marshal ¶
func (*MsgBuy) XXX_Unmarshal ¶
type MsgBuyResponse ¶
type MsgBuyResponse struct { }
func (*MsgBuyResponse) Descriptor ¶
func (*MsgBuyResponse) Descriptor() ([]byte, []int)
func (*MsgBuyResponse) Marshal ¶
func (m *MsgBuyResponse) Marshal() (dAtA []byte, err error)
func (*MsgBuyResponse) MarshalToSizedBuffer ¶
func (m *MsgBuyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBuyResponse) ProtoMessage ¶
func (*MsgBuyResponse) ProtoMessage()
func (*MsgBuyResponse) Reset ¶
func (m *MsgBuyResponse) Reset()
func (*MsgBuyResponse) Size ¶
func (m *MsgBuyResponse) Size() (n int)
func (*MsgBuyResponse) String ¶
func (m *MsgBuyResponse) String() string
func (*MsgBuyResponse) Unmarshal ¶
func (m *MsgBuyResponse) Unmarshal(dAtA []byte) error
func (*MsgBuyResponse) XXX_DiscardUnknown ¶
func (m *MsgBuyResponse) XXX_DiscardUnknown()
func (*MsgBuyResponse) XXX_Marshal ¶
func (m *MsgBuyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBuyResponse) XXX_Merge ¶
func (m *MsgBuyResponse) XXX_Merge(src proto.Message)
func (*MsgBuyResponse) XXX_Size ¶
func (m *MsgBuyResponse) XXX_Size() int
func (*MsgBuyResponse) XXX_Unmarshal ¶
func (m *MsgBuyResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface {
Buy(ctx context.Context, in *MsgBuy, opts ...grpc.CallOption) (*MsgBuyResponse, 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 {
Buy(context.Context, *MsgBuy) (*MsgBuyResponse, error)
}
MsgServer is the server API for Msg service.
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 Current items. Current(ctx context.Context, in *QueryCurrentRequest, opts ...grpc.CallOption) (*QueryCurrentResponse, 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 QueryCurrentRequest ¶
type QueryCurrentRequest struct {
Consumer string `protobuf:"bytes,1,opt,name=consumer,proto3" json:"consumer,omitempty"`
}
func (*QueryCurrentRequest) Descriptor ¶
func (*QueryCurrentRequest) Descriptor() ([]byte, []int)
func (*QueryCurrentRequest) GetConsumer ¶
func (m *QueryCurrentRequest) GetConsumer() string
func (*QueryCurrentRequest) Marshal ¶
func (m *QueryCurrentRequest) Marshal() (dAtA []byte, err error)
func (*QueryCurrentRequest) MarshalTo ¶
func (m *QueryCurrentRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentRequest) MarshalToSizedBuffer ¶
func (m *QueryCurrentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentRequest) ProtoMessage ¶
func (*QueryCurrentRequest) ProtoMessage()
func (*QueryCurrentRequest) Reset ¶
func (m *QueryCurrentRequest) Reset()
func (*QueryCurrentRequest) Size ¶
func (m *QueryCurrentRequest) Size() (n int)
func (*QueryCurrentRequest) String ¶
func (m *QueryCurrentRequest) String() string
func (*QueryCurrentRequest) Unmarshal ¶
func (m *QueryCurrentRequest) Unmarshal(dAtA []byte) error
func (*QueryCurrentRequest) XXX_DiscardUnknown ¶
func (m *QueryCurrentRequest) XXX_DiscardUnknown()
func (*QueryCurrentRequest) XXX_Marshal ¶
func (m *QueryCurrentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentRequest) XXX_Merge ¶
func (m *QueryCurrentRequest) XXX_Merge(src proto.Message)
func (*QueryCurrentRequest) XXX_Size ¶
func (m *QueryCurrentRequest) XXX_Size() int
func (*QueryCurrentRequest) XXX_Unmarshal ¶
func (m *QueryCurrentRequest) XXX_Unmarshal(b []byte) error
type QueryCurrentResponse ¶
type QueryCurrentResponse struct {
Sub Subscription `protobuf:"bytes,1,opt,name=sub,proto3" json:"sub"`
}
func (*QueryCurrentResponse) Descriptor ¶
func (*QueryCurrentResponse) Descriptor() ([]byte, []int)
func (*QueryCurrentResponse) GetSub ¶
func (m *QueryCurrentResponse) GetSub() Subscription
func (*QueryCurrentResponse) Marshal ¶
func (m *QueryCurrentResponse) Marshal() (dAtA []byte, err error)
func (*QueryCurrentResponse) MarshalTo ¶
func (m *QueryCurrentResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryCurrentResponse) MarshalToSizedBuffer ¶
func (m *QueryCurrentResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryCurrentResponse) ProtoMessage ¶
func (*QueryCurrentResponse) ProtoMessage()
func (*QueryCurrentResponse) Reset ¶
func (m *QueryCurrentResponse) Reset()
func (*QueryCurrentResponse) Size ¶
func (m *QueryCurrentResponse) Size() (n int)
func (*QueryCurrentResponse) String ¶
func (m *QueryCurrentResponse) String() string
func (*QueryCurrentResponse) Unmarshal ¶
func (m *QueryCurrentResponse) Unmarshal(dAtA []byte) error
func (*QueryCurrentResponse) XXX_DiscardUnknown ¶
func (m *QueryCurrentResponse) XXX_DiscardUnknown()
func (*QueryCurrentResponse) XXX_Marshal ¶
func (m *QueryCurrentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryCurrentResponse) XXX_Merge ¶
func (m *QueryCurrentResponse) XXX_Merge(src proto.Message)
func (*QueryCurrentResponse) XXX_Size ¶
func (m *QueryCurrentResponse) XXX_Size() int
func (*QueryCurrentResponse) XXX_Unmarshal ¶
func (m *QueryCurrentResponse) 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 Current items. Current(context.Context, *QueryCurrentRequest) (*QueryCurrentResponse, 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"` DurationTotal uint64 `protobuf:"varint,6,opt,name=duration_total,json=durationTotal,proto3" json:"duration_total,omitempty"` DurationLeft uint64 `protobuf:"varint,7,opt,name=duration_left,json=durationLeft,proto3" json:"duration_left,omitempty"` MonthExpiryTime uint64 `protobuf:"varint,8,opt,name=month_expiry_time,json=monthExpiryTime,proto3" json:"month_expiry_time,omitempty"` PrevExpiryBlock uint64 `protobuf:"varint,9,opt,name=prev_expiry_block,json=prevExpiryBlock,proto3" json:"prev_expiry_block,omitempty"` MonthCuTotal uint64 `protobuf:"varint,10,opt,name=month_cu_total,json=monthCuTotal,proto3" json:"month_cu_total,omitempty"` MonthCuLeft uint64 `protobuf:"varint,11,opt,name=month_cu_left,json=monthCuLeft,proto3" json:"month_cu_left,omitempty"` PrevCuLeft uint64 `protobuf:"varint,12,opt,name=prev_cu_left,json=prevCuLeft,proto3" json:"prev_cu_left,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) GetDurationLeft ¶
func (m *Subscription) GetDurationLeft() uint64
func (*Subscription) GetDurationTotal ¶
func (m *Subscription) GetDurationTotal() uint64
func (*Subscription) GetMonthCuLeft ¶
func (m *Subscription) GetMonthCuLeft() uint64
func (*Subscription) GetMonthCuTotal ¶
func (m *Subscription) GetMonthCuTotal() uint64
func (*Subscription) GetMonthExpiryTime ¶
func (m *Subscription) GetMonthExpiryTime() uint64
func (*Subscription) GetPlanBlock ¶
func (m *Subscription) GetPlanBlock() uint64
func (*Subscription) GetPlanIndex ¶
func (m *Subscription) GetPlanIndex() string
func (*Subscription) GetPrevCuLeft ¶ added in v0.8.1
func (m *Subscription) GetPrevCuLeft() uint64
func (*Subscription) GetPrevExpiryBlock ¶ added in v0.8.1
func (m *Subscription) GetPrevExpiryBlock() uint64
func (Subscription) IsMonthExpired ¶ added in v0.8.1
func (sub Subscription) IsMonthExpired(date time.Time) bool
func (Subscription) IsStale ¶ added in v0.8.1
func (sub Subscription) IsStale(block uint64) 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) Buy ¶
func (*UnimplementedMsgServer) Buy(ctx context.Context, req *MsgBuy) (*MsgBuyResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Current ¶
func (*UnimplementedQueryServer) Current(ctx context.Context, req *QueryCurrentRequest) (*QueryCurrentResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)