keeper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	DefaultParamspace = types.ModuleName
)

Variables

This section is empty.

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

func TestMakeCodec

func TestMakeCodec() *codec.Codec

Types

type Keeper

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

func NewKeeper

func NewKeeper(cdc *codec.Codec, nodeKey, subscriptionStoreKey, sessionKey sdk.StoreKey,
	paramStore params.Subspace, depositKeeper deposit.Keeper) Keeper

func TestCreateInput

func TestCreateInput() (sdk.Context, deposit.Keeper, Keeper, bank.BaseKeeper)

func (Keeper) AddDeposit

func (k Keeper) AddDeposit(ctx sdk.Context, address sdk.AccAddress,
	coin sdk.Coin) (tags sdk.Tags, err sdk.Error)

func (Keeper) AddNodeIDToActiveList

func (k Keeper) AddNodeIDToActiveList(ctx sdk.Context, height int64, id hub.ID)

func (Keeper) AddSessionIDToActiveList

func (k Keeper) AddSessionIDToActiveList(ctx sdk.Context, height int64, id hub.ID)

func (Keeper) DeleteActiveNodeIDs

func (k Keeper) DeleteActiveNodeIDs(ctx sdk.Context, height int64)

func (Keeper) DeleteActiveSessionIDs

func (k Keeper) DeleteActiveSessionIDs(ctx sdk.Context, height int64)

func (Keeper) Deposit

func (k Keeper) Deposit(ctx sdk.Context) (res sdk.Coin)

func (Keeper) FreeNodesCount

func (k Keeper) FreeNodesCount(ctx sdk.Context) (res uint64)

func (Keeper) GetActiveNodeIDs

func (k Keeper) GetActiveNodeIDs(ctx sdk.Context, height int64) (ids hub.IDs)

func (Keeper) GetActiveSessionIDs

func (k Keeper) GetActiveSessionIDs(ctx sdk.Context, height int64) (ids hub.IDs)

func (Keeper) GetAllNodes

func (k Keeper) GetAllNodes(ctx sdk.Context) (nodes []types.Node)

func (Keeper) GetAllSessions

func (k Keeper) GetAllSessions(ctx sdk.Context) (sessions []types.Session)

func (Keeper) GetAllSubscriptions

func (k Keeper) GetAllSubscriptions(ctx sdk.Context) (subscriptions []types.Subscription)

func (Keeper) GetNode

func (k Keeper) GetNode(ctx sdk.Context, id hub.ID) (node types.Node, found bool)

func (Keeper) GetNodeIDByAddress

func (k Keeper) GetNodeIDByAddress(ctx sdk.Context, address sdk.AccAddress, i uint64) (id hub.ID, found bool)

func (Keeper) GetNodesCount

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

func (Keeper) GetNodesCountOfAddress

func (k Keeper) GetNodesCountOfAddress(ctx sdk.Context, address sdk.AccAddress) (count uint64)

func (Keeper) GetNodesOfAddress

func (k Keeper) GetNodesOfAddress(ctx sdk.Context, address sdk.AccAddress) (nodes []types.Node)

func (Keeper) GetParams

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

func (Keeper) GetSession

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

func (Keeper) GetSessionIDBySubscriptionID

func (k Keeper) GetSessionIDBySubscriptionID(ctx sdk.Context, i hub.ID, j uint64) (id hub.ID, found bool)

func (Keeper) GetSessionsCount

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

func (Keeper) GetSessionsCountOfSubscription

func (k Keeper) GetSessionsCountOfSubscription(ctx sdk.Context, id hub.ID) (count uint64)

func (Keeper) GetSessionsOfSubscription

func (k Keeper) GetSessionsOfSubscription(ctx sdk.Context, id hub.ID) (sessions []types.Session)

func (Keeper) GetSubscription

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

func (Keeper) GetSubscriptionIDByAddress

func (k Keeper) GetSubscriptionIDByAddress(ctx sdk.Context,
	address sdk.AccAddress, i uint64) (id hub.ID, found bool)

func (Keeper) GetSubscriptionIDByNodeID

func (k Keeper) GetSubscriptionIDByNodeID(ctx sdk.Context, i hub.ID, j uint64) (id hub.ID, found bool)

func (Keeper) GetSubscriptionsCount

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

func (Keeper) GetSubscriptionsCountOfAddress

func (k Keeper) GetSubscriptionsCountOfAddress(ctx sdk.Context, address sdk.AccAddress) (count uint64)

func (Keeper) GetSubscriptionsCountOfNode

func (k Keeper) GetSubscriptionsCountOfNode(ctx sdk.Context, id hub.ID) (count uint64)

func (Keeper) GetSubscriptionsOfAddress

func (k Keeper) GetSubscriptionsOfAddress(ctx sdk.Context,
	address sdk.AccAddress) (subscriptions []types.Subscription)

func (Keeper) GetSubscriptionsOfNode

func (k Keeper) GetSubscriptionsOfNode(ctx sdk.Context, id hub.ID) (subscriptions []types.Subscription)

func (Keeper) IterateNodes

func (k Keeper) IterateNodes(ctx sdk.Context, fn func(index int64, node types.Node) (stop bool))

nolint: dupl

func (Keeper) IterateSubscriptions

func (k Keeper) IterateSubscriptions(ctx sdk.Context,
	fn func(index int64, subscription types.Subscription) (stop bool))

nolint

func (Keeper) NodeInactiveInterval

func (k Keeper) NodeInactiveInterval(ctx sdk.Context) (res int64)

func (Keeper) RemoveNodeIDFromActiveList

func (k Keeper) RemoveNodeIDFromActiveList(ctx sdk.Context, height int64, id hub.ID)

func (Keeper) RemoveSessionIDFromActiveList

func (k Keeper) RemoveSessionIDFromActiveList(ctx sdk.Context, height int64, id hub.ID)

func (Keeper) SendDeposit

func (k Keeper) SendDeposit(ctx sdk.Context, from, toAddress sdk.AccAddress,
	coin sdk.Coin) (tags sdk.Tags, err sdk.Error)

func (Keeper) SessionInactiveInterval

func (k Keeper) SessionInactiveInterval(ctx sdk.Context) (res int64)

func (Keeper) SetActiveNodeIDs

func (k Keeper) SetActiveNodeIDs(ctx sdk.Context, height int64, ids hub.IDs)

func (Keeper) SetActiveSessionIDs

func (k Keeper) SetActiveSessionIDs(ctx sdk.Context, height int64, ids hub.IDs)

func (Keeper) SetNode

func (k Keeper) SetNode(ctx sdk.Context, node types.Node)

func (Keeper) SetNodeIDByAddress

func (k Keeper) SetNodeIDByAddress(ctx sdk.Context, address sdk.AccAddress, i uint64, id hub.ID)

func (Keeper) SetNodesCount

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

func (Keeper) SetNodesCountOfAddress

func (k Keeper) SetNodesCountOfAddress(ctx sdk.Context, address sdk.AccAddress, count uint64)

func (Keeper) SetParams

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

func (Keeper) SetSession

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

func (Keeper) SetSessionIDBySubscriptionID

func (k Keeper) SetSessionIDBySubscriptionID(ctx sdk.Context, i hub.ID, j uint64, id hub.ID)

func (Keeper) SetSessionsCount

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

func (Keeper) SetSessionsCountOfSubscription

func (k Keeper) SetSessionsCountOfSubscription(ctx sdk.Context, id hub.ID, count uint64)

func (Keeper) SetSubscription

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

func (Keeper) SetSubscriptionIDByAddress

func (k Keeper) SetSubscriptionIDByAddress(ctx sdk.Context, address sdk.AccAddress, i uint64, id hub.ID)

func (Keeper) SetSubscriptionIDByNodeID

func (k Keeper) SetSubscriptionIDByNodeID(ctx sdk.Context, i hub.ID, j uint64, id hub.ID)

func (Keeper) SetSubscriptionsCount

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

func (Keeper) SetSubscriptionsCountOfAddress

func (k Keeper) SetSubscriptionsCountOfAddress(ctx sdk.Context, address sdk.AccAddress, count uint64)

func (Keeper) SetSubscriptionsCountOfNode

func (k Keeper) SetSubscriptionsCountOfNode(ctx sdk.Context, id hub.ID, count uint64)

func (Keeper) SubtractDeposit

func (k Keeper) SubtractDeposit(ctx sdk.Context, address sdk.AccAddress,
	coin sdk.Coin) (tags sdk.Tags, err sdk.Error)

Jump to

Keyboard shortcuts

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