keeper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier

NewQuerier Return a querier instance

Types

type Keeper

type Keeper struct {
	AuthKeeper authkeeper.AccountKeeper
	BankKeeper bankkeeper.Keeper
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, storeKey, memKey sdk.StoreKey, auth authkeeper.AccountKeeper, bank bankkeeper.Keeper) *Keeper

NewKeeper Create a new keeper instance and return the pointer

func (Keeper) BeamsIterator

func (k Keeper) BeamsIterator(ctx sdk.Context) sdk.Iterator

BeamsIterator Return a ready to use iterator for the whole beams queue

func (Keeper) ClaimBeam

func (k Keeper) ClaimBeam(ctx sdk.Context, msg types.MsgClaimBeam) error

ClaimBeam Final user endpoint to claim and acquire the money

func (Keeper) ClosedBeamsQueueIterator

func (k Keeper) ClosedBeamsQueueIterator(ctx sdk.Context) sdk.Iterator

ClosedBeamsQueueIterator Return a ready to use iterator for the closed only beams queue

func (Keeper) GetBeam

func (k Keeper) GetBeam(ctx sdk.Context, key string) (types.Beam, error)

GetBeam Return a beam instance for the given key

func (Keeper) GetBeamAccount

func (k Keeper) GetBeamAccount(ctx sdk.Context) authtypes.ModuleAccountI

GetBeamAccount Return the beam module account interface

func (Keeper) HasBeam

func (k Keeper) HasBeam(ctx sdk.Context, beamID string) bool

HasBeam Check if a beam instance exists or not (by its key)

func (Keeper) InsertClosedBeamQueue

func (k Keeper) InsertClosedBeamQueue(ctx sdk.Context, beamID string)

InsertClosedBeamQueue Insert a beam ID inside the closed beam queue

func (Keeper) InsertOpenBeamQueue

func (k Keeper) InsertOpenBeamQueue(ctx sdk.Context, beamID string)

InsertOpenBeamQueue Insert a beam ID inside the active beam queue

func (Keeper) IterateBeams

func (k Keeper) IterateBeams(ctx sdk.Context, cb func(beam types.Beam) (stop bool))

IterateBeams Iterate over the whole beam queue

func (Keeper) IterateClosedBeamsQueue

func (k Keeper) IterateClosedBeamsQueue(ctx sdk.Context, cb func(beam types.Beam) (stop bool))

IterateClosedBeamsQueue Iterate over the closed only beams queue

func (Keeper) IterateOpenBeamsQueue

func (k Keeper) IterateOpenBeamsQueue(ctx sdk.Context, cb func(beam types.Beam) (stop bool))

IterateOpenBeamsQueue Iterate over the open only beams queue

func (Keeper) ListBeams

func (k Keeper) ListBeams(ctx sdk.Context) (beams []types.Beam)

ListBeams Return a list of in store beams

func (Keeper) Logger

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

Logger Return a keeper logger instance

func (Keeper) OpenBeam

func (k Keeper) OpenBeam(ctx sdk.Context, msg types.MsgOpenBeam) error

OpenBeam Create a new beam instance

func (Keeper) OpenBeamsQueueIterator

func (k Keeper) OpenBeamsQueueIterator(ctx sdk.Context) sdk.Iterator

OpenBeamsQueueIterator Return a ready to use iterator for the open only beams queue

func (Keeper) RemoveFromClosedBeamQueue

func (k Keeper) RemoveFromClosedBeamQueue(ctx sdk.Context, beamID string)

RemoveFromClosedBeamQueue Remove a beam ID from the closed beam queue

func (Keeper) RemoveFromOpenBeamQueue

func (k Keeper) RemoveFromOpenBeamQueue(ctx sdk.Context, beamID string)

RemoveFromOpenBeamQueue Remove a beam ID from the active beam queue

func (Keeper) SetBeam

func (k Keeper) SetBeam(ctx sdk.Context, beamID string, beam *types.Beam)

SetBeam Replace the beam at the specified "id" position

func (Keeper) UpdateBeam

func (k Keeper) UpdateBeam(ctx sdk.Context, msg types.MsgUpdateBeam) error

UpdateBeam Update a beam instance and proceeds any require state machine update

func (Keeper) UpdateBeamStatus

func (k Keeper) UpdateBeamStatus(ctx sdk.Context, beamID string, newStatus types.BeamState) error

UpdateBeamStatus This process a beam close request, but its also pass over checks. You should not use this directly but rather prefer the UpdateBeam method.

Jump to

Keyboard shortcuts

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