keeper

package
v0.5.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc *codec.Codec, key sdk.StoreKey, params params.Subspace) Keeper

func (Keeper) AddDeposit

func (k Keeper) AddDeposit(ctx sdk.Context, address sdk.AccAddress, coin sdk.Coin) error

func (Keeper) DeleteActiveSubscriptionForAddress added in v0.4.0

func (k Keeper) DeleteActiveSubscriptionForAddress(ctx sdk.Context, address sdk.AccAddress, id uint64)

func (Keeper) DeleteInactiveSubscriptionAt added in v0.4.0

func (k Keeper) DeleteInactiveSubscriptionAt(ctx sdk.Context, at time.Time, id uint64)

func (Keeper) DeleteInactiveSubscriptionForAddress added in v0.4.0

func (k Keeper) DeleteInactiveSubscriptionForAddress(ctx sdk.Context, address sdk.AccAddress, id uint64)

func (Keeper) DeleteQuota

func (k Keeper) DeleteQuota(ctx sdk.Context, id uint64, address sdk.AccAddress)

func (Keeper) GetActiveSubscriptionsForAddress added in v0.4.0

func (k Keeper) GetActiveSubscriptionsForAddress(ctx sdk.Context, address sdk.AccAddress, skip, limit int) (items types.Subscriptions)

func (Keeper) GetCount added in v0.4.0

func (k Keeper) GetCount(ctx sdk.Context) (count uint64)

func (Keeper) GetInactiveSubscriptionsForAddress added in v0.4.0

func (k Keeper) GetInactiveSubscriptionsForAddress(ctx sdk.Context, address sdk.AccAddress, skip, limit int) (items types.Subscriptions)

func (Keeper) GetNode

func (k Keeper) GetNode(ctx sdk.Context, address hub.NodeAddress) (node.Node, bool)

func (Keeper) GetParams

func (k Keeper) GetParams(ctx sdk.Context) types.Params

func (Keeper) GetPlan

func (k Keeper) GetPlan(ctx sdk.Context, id uint64) (plan.Plan, bool)

func (Keeper) GetQuota

func (k Keeper) GetQuota(ctx sdk.Context, id uint64, address sdk.AccAddress) (quota types.Quota, found bool)

func (Keeper) GetQuotas

func (k Keeper) GetQuotas(ctx sdk.Context, id uint64, skip, limit int) (items types.Quotas)

func (Keeper) GetSubscription

func (k Keeper) GetSubscription(ctx sdk.Context, id uint64) (subscription types.Subscription, found bool)

func (Keeper) GetSubscriptions

func (k Keeper) GetSubscriptions(ctx sdk.Context, skip, limit int) (items types.Subscriptions)

func (Keeper) GetSubscriptionsForAddress

func (k Keeper) GetSubscriptionsForAddress(ctx sdk.Context, address sdk.AccAddress, skip, limit int) (items types.Subscriptions)

func (Keeper) GetSubscriptionsForNode

func (k Keeper) GetSubscriptionsForNode(ctx sdk.Context, address hub.NodeAddress, skip, limit int) (items types.Subscriptions)

func (Keeper) GetSubscriptionsForPlan

func (k Keeper) GetSubscriptionsForPlan(ctx sdk.Context, plan uint64, skip, limit int) (items types.Subscriptions)

func (Keeper) HasQuota

func (k Keeper) HasQuota(ctx sdk.Context, id uint64, address sdk.AccAddress) bool

func (Keeper) HasSubscriptionForNode

func (k Keeper) HasSubscriptionForNode(ctx sdk.Context, address hub.NodeAddress, id uint64) bool

func (Keeper) HasSubscriptionForPlan

func (k Keeper) HasSubscriptionForPlan(ctx sdk.Context, plan, id uint64) bool

func (Keeper) InactiveDuration added in v0.4.0

func (k Keeper) InactiveDuration(ctx sdk.Context) (duration time.Duration)

func (Keeper) IterateInactiveSubscriptions added in v0.4.0

func (k Keeper) IterateInactiveSubscriptions(ctx sdk.Context, end time.Time, fn func(index int, item types.Subscription) (stop bool))

func (Keeper) IterateQuotas

func (k Keeper) IterateQuotas(ctx sdk.Context, id uint64, fn func(index int, item types.Quota) (stop bool))

func (Keeper) Logger

func (k Keeper) Logger(ctx sdk.Context) log.Logger

func (Keeper) SendCoin

func (k Keeper) SendCoin(ctx sdk.Context, from sdk.AccAddress, to sdk.AccAddress, coin sdk.Coin) error

func (Keeper) SetActiveSubscriptionForAddress added in v0.4.0

func (k Keeper) SetActiveSubscriptionForAddress(ctx sdk.Context, address sdk.AccAddress, id uint64)

func (Keeper) SetCount added in v0.4.0

func (k Keeper) SetCount(ctx sdk.Context, count uint64)

func (Keeper) SetInactiveSubscriptionAt added in v0.4.0

func (k Keeper) SetInactiveSubscriptionAt(ctx sdk.Context, at time.Time, id uint64)

func (Keeper) SetInactiveSubscriptionForAddress added in v0.4.0

func (k Keeper) SetInactiveSubscriptionForAddress(ctx sdk.Context, address sdk.AccAddress, id uint64)

func (Keeper) SetParams

func (k Keeper) SetParams(ctx sdk.Context, params types.Params)

func (Keeper) SetQuota

func (k Keeper) SetQuota(ctx sdk.Context, id uint64, quota types.Quota)

func (Keeper) SetSubscription

func (k Keeper) SetSubscription(ctx sdk.Context, subscription types.Subscription)

func (Keeper) SetSubscriptionForNode

func (k Keeper) SetSubscriptionForNode(ctx sdk.Context, address hub.NodeAddress, id uint64)

func (Keeper) SetSubscriptionForPlan

func (k Keeper) SetSubscriptionForPlan(ctx sdk.Context, plan, id uint64)

func (Keeper) Store

func (k Keeper) Store(ctx sdk.Context) sdk.KVStore

func (Keeper) SubtractDeposit

func (k Keeper) SubtractDeposit(ctx sdk.Context, address sdk.AccAddress, coin sdk.Coin) error

func (*Keeper) WithBankKeeper

func (k *Keeper) WithBankKeeper(keeper expected.BankKeeper)

func (*Keeper) WithDepositKeeper

func (k *Keeper) WithDepositKeeper(keeper expected.DepositKeeper)

func (*Keeper) WithNodeKeeper

func (k *Keeper) WithNodeKeeper(keeper expected.NodeKeeper)

func (*Keeper) WithPlanKeeper

func (k *Keeper) WithPlanKeeper(keeper expected.PlanKeeper)

Jump to

Keyboard shortcuts

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