types

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName defines the module name
	ModuleName = "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"
)
View Source
const (
	BuySubscriptionEventName = "buy_subscription_event"
)
View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

View Source
const (
	MAX_SUBSCRIPTION_DURATION = 12 // max duration of subscription in months
)
View Source
const (
	// SubscriptionKeyPrefix is the prefix to retrieve all Subscription
	SubscriptionKeyPrefix = "Subscribe/value/"
)
View Source
const TypeMsgBuy = "buy"

Variables

View Source
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

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthSubscription        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSubscription          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSubscription = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func KeyPrefix

func KeyPrefix(p string) []byte

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 RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func SubscriptionKey added in v0.7.0

func SubscriptionKey(consumer string) []byte

SubscriptionKey returns the store key to retrieve a Subscription from the consumer field

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

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 EpochstorageKeeper interface {
	BlocksToSave(ctx sdk.Context, block uint64) (uint64, error)
	GetEpochStart(ctx sdk.Context) uint64
}

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) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type 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 NewMsgBuy

func NewMsgBuy(creator string, consumer string, index string, duration uint64, vrfpk string) *MsgBuy

func (*MsgBuy) Descriptor

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

func (*MsgBuy) GetConsumer

func (m *MsgBuy) GetConsumer() string

func (*MsgBuy) GetCreator

func (m *MsgBuy) GetCreator() string

func (*MsgBuy) GetDuration

func (m *MsgBuy) GetDuration() uint64

func (*MsgBuy) GetIndex

func (m *MsgBuy) GetIndex() string

func (*MsgBuy) GetSignBytes

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

func (*MsgBuy) GetSigners

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

func (*MsgBuy) GetVrfpk added in v0.8.1

func (m *MsgBuy) GetVrfpk() string

func (*MsgBuy) Marshal

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

func (*MsgBuy) MarshalTo

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

func (*MsgBuy) MarshalToSizedBuffer

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

func (*MsgBuy) ProtoMessage

func (*MsgBuy) ProtoMessage()

func (*MsgBuy) Reset

func (m *MsgBuy) Reset()

func (*MsgBuy) Route

func (msg *MsgBuy) Route() string

func (*MsgBuy) Size

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

func (*MsgBuy) String

func (m *MsgBuy) String() string

func (*MsgBuy) Type

func (msg *MsgBuy) Type() string

func (*MsgBuy) Unmarshal

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

func (*MsgBuy) ValidateBasic

func (msg *MsgBuy) ValidateBasic() error

func (*MsgBuy) XXX_DiscardUnknown

func (m *MsgBuy) XXX_DiscardUnknown()

func (*MsgBuy) XXX_Marshal

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

func (*MsgBuy) XXX_Merge

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

func (*MsgBuy) XXX_Size

func (m *MsgBuy) XXX_Size() int

func (*MsgBuy) XXX_Unmarshal

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

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) MarshalTo

func (m *MsgBuyResponse) MarshalTo(dAtA []byte) (int, 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 DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PlansKeeper

type PlansKeeper interface {
	GetPlan(ctx sdk.Context, index string) (planstypes.Plan, bool)
	PutPlan(ctx sdk.Context, index string, block uint64) bool
}

type ProjectsKeeper

type ProjectsKeeper interface {
	CreateAdminProject(ctx sdk.Context, subscriptionAddress string, totalCU uint64, cuPerEpoch uint64, providers uint64, vrfpk string) error
	DeleteProject(ctx sdk.Context, index string) 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 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) MarshalTo

func (m *Subscription) MarshalTo(dAtA []byte) (int, 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

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Current

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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