keeper

package
v0.7.21-doubletap.rc21 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 10 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
}

Keeper of the deployment store

func NewKeeper

func NewKeeper(cdc codec.BinaryMarshaler, skey sdk.StoreKey) Keeper

NewKeeper creates and returns an instance for deployment keeper

func (Keeper) Codec

func (k Keeper) Codec() codec.BinaryMarshaler

Codec returns keeper codec

func (Keeper) Create

func (k Keeper) Create(ctx sdk.Context, deployment types.Deployment, groups []types.Group) error

Create creates a new deployment with given deployment and group specifications

func (Keeper) GetDeployment

func (k Keeper) GetDeployment(ctx sdk.Context, id types.DeploymentID) (types.Deployment, bool)

GetDeployment returns deployment details with provided DeploymentID

func (Keeper) GetGroup

func (k Keeper) GetGroup(ctx sdk.Context, id types.GroupID) (types.Group, bool)

GetGroup returns group details with given GroupID from deployment store

func (Keeper) GetGroups

func (k Keeper) GetGroups(ctx sdk.Context, id types.DeploymentID) []types.Group

GetGroups returns all groups of a deployment with given DeploymentID from deployment store

func (Keeper) OnCloseGroup added in v0.7.5

func (k Keeper) OnCloseGroup(ctx sdk.Context, group types.Group) error

OnCloseGroup provides shutdown API for a Group

func (Keeper) OnDeploymentClosed

func (k Keeper) OnDeploymentClosed(ctx sdk.Context, group types.Group)

OnDeploymentClosed updates group state to group closed

func (Keeper) OnLeaseClosed

func (k Keeper) OnLeaseClosed(ctx sdk.Context, id types.GroupID)

OnLeaseClosed updates group state to group opened

func (Keeper) OnLeaseCreated

func (k Keeper) OnLeaseCreated(ctx sdk.Context, id types.GroupID)

OnLeaseCreated updates group state to group matched

func (Keeper) OnLeaseInsufficientFunds

func (k Keeper) OnLeaseInsufficientFunds(ctx sdk.Context, id types.GroupID)

OnLeaseInsufficientFunds updates group state to group insufficient funds

func (Keeper) OnOrderCreated

func (k Keeper) OnOrderCreated(ctx sdk.Context, group types.Group)

OnOrderCreated updates group state to group ordered

func (Keeper) UpdateDeployment

func (k Keeper) UpdateDeployment(ctx sdk.Context, deployment types.Deployment) error

UpdateDeployment updates deployment details

func (Keeper) WithDeployments

func (k Keeper) WithDeployments(ctx sdk.Context, fn func(types.Deployment) bool)

WithDeployments iterates all deployments in deployment store

func (Keeper) WithDeploymentsActive added in v0.7.5

func (k Keeper) WithDeploymentsActive(ctx sdk.Context, fn func(types.Deployment) bool)

WithDeploymentsActive filters to only those with State: Active

func (Keeper) WithOpenGroups added in v0.7.5

func (k Keeper) WithOpenGroups(ctx sdk.Context, fn func(types.Group) bool)

WithOpenGroups filters to only those with State: Open

type Querier added in v0.9.1

type Querier struct {
	Keeper
}

Querier is used as Keeper will have duplicate methods if used directly, and gRPC names take precedence over keeper

func (Querier) Deployment added in v0.9.1

Deployment returns deployment details based on DeploymentID

func (Querier) Deployments added in v0.9.1

Deployments returns deployments based on filters

func (Querier) Group added in v0.9.1

Group returns group details based on GroupID

Jump to

Keyboard shortcuts

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