Documentation ¶
Index ¶
- Constants
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AddProjectToSubscription(ctx sdk.Context, subscription string, projectData projectstypes.ProjectData) error
- func (k Keeper) BeginBlock(ctx sdk.Context)
- func (k Keeper) ChargeComputeUnitsToSubscription(ctx sdk.Context, subscription string, cuAmount uint64) error
- func (k Keeper) CreateSubscription(ctx sdk.Context, creator string, consumer string, planIndex string, ...) error
- func (k Keeper) Current(goCtx context.Context, req *types.QueryCurrentRequest) (*types.QueryCurrentResponse, error)
- func (k Keeper) DelProjectFromSubscription(ctx sdk.Context, subscription string, name string) error
- func (k Keeper) EpochStart(ctx sdk.Context)
- func (k Keeper) GetAllSubscription(ctx sdk.Context) []types.Subscription
- func (k Keeper) GetCondSubscription(ctx sdk.Context, cond func(sub types.Subscription) bool) (list []types.Subscription)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) GetPlanFromSubscription(ctx sdk.Context, consumer string) (planstypes.Plan, error)
- func (k Keeper) GetSubscription(ctx sdk.Context, consumer string) (val types.Subscription, found bool)
- func (k Keeper) ListProjects(goCtx context.Context, req *types.QueryListProjectsRequest) (*types.QueryListProjectsResponse, error)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RemoveSubscription(ctx sdk.Context, consumer string)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
- func (k Keeper) SetSubscription(ctx sdk.Context, sub types.Subscription)
Constants ¶
View Source
const MONTHS_IN_YEAR = 12
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, ps paramtypes.Subspace, bankKeeper types.BankKeeper, accountKeeper types.AccountKeeper, epochstorageKeeper types.EpochstorageKeeper, projectsKeeper types.ProjectsKeeper, plansKeeper types.PlansKeeper, ) *Keeper
func (Keeper) AddProjectToSubscription ¶
func (k Keeper) AddProjectToSubscription(ctx sdk.Context, subscription string, projectData projectstypes.ProjectData) error
func (Keeper) BeginBlock ¶ added in v0.12.0
func (Keeper) ChargeComputeUnitsToSubscription ¶
func (Keeper) CreateSubscription ¶
func (k Keeper) CreateSubscription( ctx sdk.Context, creator string, consumer string, planIndex string, duration uint64, ) error
CreateSubscription creates a subscription for a consumer
func (Keeper) Current ¶
func (k Keeper) Current(goCtx context.Context, req *types.QueryCurrentRequest) (*types.QueryCurrentResponse, error)
func (Keeper) DelProjectFromSubscription ¶
func (Keeper) EpochStart ¶ added in v0.7.0
EpochStart runs the functions that are supposed to run in epoch start
func (Keeper) GetAllSubscription ¶ added in v0.7.0
func (k Keeper) GetAllSubscription(ctx sdk.Context) []types.Subscription
GetAllSubscription returns all subscription (of all consumers)
func (Keeper) GetCondSubscription ¶ added in v0.7.0
func (k Keeper) GetCondSubscription(ctx sdk.Context, cond func(sub types.Subscription) bool) (list []types.Subscription)
GetAllSubscription returns all subscriptions that satisfy the condition
func (Keeper) GetPlanFromSubscription ¶
func (Keeper) GetSubscription ¶
func (k Keeper) GetSubscription(ctx sdk.Context, consumer string) (val types.Subscription, found bool)
GetSubscription returns the subscription of a given consumer
func (Keeper) ListProjects ¶
func (k Keeper) ListProjects(goCtx context.Context, req *types.QueryListProjectsRequest) (*types.QueryListProjectsResponse, error)
func (Keeper) Params ¶
func (k Keeper) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
func (Keeper) RemoveSubscription ¶ added in v0.7.0
RemoveSubscription removes the subscription (of a consumer) from the store
func (Keeper) SetSubscription ¶ added in v0.7.0
func (k Keeper) SetSubscription(ctx sdk.Context, sub types.Subscription)
SetSubscription sets a subscription (of a consumer) in the store
Click to show internal directories.
Click to hide internal directories.