keeper

package
v0.5.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 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) DeleteActiveSessionAt

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

func (Keeper) DeleteActiveSessionForAddress added in v0.5.0

func (k Keeper) DeleteActiveSessionForAddress(ctx sdk.Context, address sdk.AccAddress, id uint64, node hub.NodeAddress)

func (Keeper) GetAccount added in v0.5.0

func (k Keeper) GetAccount(ctx sdk.Context, address sdk.AccAddress) exported.Account

func (Keeper) GetActiveSessionForAddress added in v0.5.0

func (k Keeper) GetActiveSessionForAddress(ctx sdk.Context, address sdk.AccAddress, id uint64, node hub.NodeAddress) (session types.Session, found bool)

func (Keeper) GetActiveSessionsForAddress added in v0.5.0

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

func (Keeper) GetChannel added in v0.5.0

func (k Keeper) GetChannel(ctx sdk.Context, address sdk.AccAddress, subscription uint64, node hub.NodeAddress) (channel uint64)

func (Keeper) GetCount added in v0.4.0

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

func (Keeper) GetParams

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

func (Keeper) GetQuota

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

func (Keeper) GetSession

func (k Keeper) GetSession(ctx sdk.Context, id uint64) (session types.Session, found bool)

func (Keeper) GetSessions

func (k Keeper) GetSessions(ctx sdk.Context, skip, limit int) (items types.Sessions)

func (Keeper) GetSessionsForAddress

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

func (Keeper) GetSessionsForNode

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

func (Keeper) GetSessionsForSubscription

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

func (Keeper) GetSubscription

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

func (Keeper) HasNodeForPlan

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

func (Keeper) HasQuota added in v0.3.2

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

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

func (Keeper) IterateActiveSessionsAt added in v0.5.0

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

func (Keeper) IterateSessions

func (k Keeper) IterateSessions(ctx sdk.Context, fn func(index int, item types.Session) (stop bool))

func (Keeper) Logger

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

func (Keeper) ProofVerificationEnabled added in v0.5.0

func (k Keeper) ProofVerificationEnabled(ctx sdk.Context) (yes bool)

func (Keeper) SendCoinsFromDepositToAccount added in v0.3.1

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

func (Keeper) SetActiveSessionAt

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

func (Keeper) SetActiveSessionForAddress added in v0.5.0

func (k Keeper) SetActiveSessionForAddress(ctx sdk.Context, address sdk.AccAddress, subscription uint64, node hub.NodeAddress, id uint64)

func (Keeper) SetChannel added in v0.5.0

func (k Keeper) SetChannel(ctx sdk.Context, address sdk.AccAddress, subscription uint64, node hub.NodeAddress, channel uint64)

func (Keeper) SetCount added in v0.4.0

func (k Keeper) SetCount(ctx sdk.Context, count 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 subscription.Quota)

func (Keeper) SetSession

func (k Keeper) SetSession(ctx sdk.Context, session types.Session)

func (Keeper) SetSessionForAddress

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

func (Keeper) SetSessionForNode

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

func (Keeper) SetSessionForSubscription

func (k Keeper) SetSessionForSubscription(ctx sdk.Context, subscription, id uint64)

func (Keeper) Store

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

func (Keeper) VerifyProof added in v0.5.0

func (k Keeper) VerifyProof(ctx sdk.Context, address sdk.AccAddress, proof types.Proof, signature []byte) error

func (*Keeper) WithAccountKeeper added in v0.5.0

func (k *Keeper) WithAccountKeeper(keeper expected.AccountKeeper)

func (*Keeper) WithDepositKeeper added in v0.3.1

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

func (*Keeper) WithPlanKeeper

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

func (*Keeper) WithSubscriptionKeeper

func (k *Keeper) WithSubscriptionKeeper(keeper expected.SubscriptionKeeper)

Jump to

Keyboard shortcuts

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