keeper

package
v0.9.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoordinatorIDBytes

func GetCoordinatorIDBytes(id uint64) []byte

GetCoordinatorIDBytes returns the byte representation of the ID

func GetCoordinatorIDFromBytes

func GetCoordinatorIDFromBytes(bz []byte) uint64

GetCoordinatorIDFromBytes returns ID in uint64 format from a byte array

func NewMsgServerImpl

func NewMsgServerImpl(keeper Keeper) types.MsgServer

NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.

Types

type Keeper

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

func NewKeeper

func NewKeeper(
	cdc codec.Marshaler,
	storeKey,
	memKey sdk.StoreKey,

) *Keeper

func (Keeper) AppendCoordinator

func (k Keeper) AppendCoordinator(
	ctx sdk.Context,
	coordinator types.Coordinator,
) uint64

AppendCoordinator appends a coordinator in the store with a new id and update the count

func (Keeper) CoordinatorIDFromAddress

func (k Keeper) CoordinatorIDFromAddress(
	ctx sdk.Context,
	address string,
) (id uint64, found bool)

CoordinatorIDFromAddress returns the coordinator id associated to an address

func (Keeper) GetAllCoordinator

func (k Keeper) GetAllCoordinator(ctx sdk.Context) (list []types.Coordinator)

GetAllCoordinator returns all coordinator

func (Keeper) GetAllCoordinatorByAddress

func (k Keeper) GetAllCoordinatorByAddress(ctx sdk.Context) (list []types.CoordinatorByAddress)

GetAllCoordinatorByAddress returns all coordinatorByAddress

func (Keeper) GetAllValidator

func (k Keeper) GetAllValidator(ctx sdk.Context) (list []types.Validator)

GetAllValidator returns all validator

func (Keeper) GetCoordinator

func (k Keeper) GetCoordinator(ctx sdk.Context, id uint64) types.Coordinator

GetCoordinator returns a coordinator from its id

func (Keeper) GetCoordinatorAddressFromID

func (k Keeper) GetCoordinatorAddressFromID(ctx sdk.Context, id uint64) (string, bool)

GetCoordinatorAddressFromID returns a coordinator address from its id

func (Keeper) GetCoordinatorByAddress

func (k Keeper) GetCoordinatorByAddress(
	ctx sdk.Context,
	address string,
) (val types.CoordinatorByAddress, found bool)

GetCoordinatorByAddress returns a coordinatorByAddress from its index

func (Keeper) GetCoordinatorCount

func (k Keeper) GetCoordinatorCount(ctx sdk.Context) uint64

GetCoordinatorCount get the total number of Coordinators

func (Keeper) GetValidator

func (k Keeper) GetValidator(ctx sdk.Context, address string) (val types.Validator, found bool)

GetValidator returns a validator from its index

func (Keeper) HasCoordinator

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

HasCoordinator checks if the coordinator exists in the store

func (Keeper) Logger

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

func (Keeper) RemoveCoordinator

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

RemoveCoordinator removes a coordinator from the store

func (Keeper) RemoveCoordinatorByAddress

func (k Keeper) RemoveCoordinatorByAddress(
	ctx sdk.Context,
	address string,
)

RemoveCoordinatorByAddress removes a coordinatorByAddress from the store

func (Keeper) RemoveValidator

func (k Keeper) RemoveValidator(ctx sdk.Context, address string)

RemoveValidator removes a validator from the store

func (Keeper) SetCoordinator

func (k Keeper) SetCoordinator(ctx sdk.Context, coordinator types.Coordinator)

SetCoordinator set a specific coordinator in the store

func (Keeper) SetCoordinatorByAddress

func (k Keeper) SetCoordinatorByAddress(ctx sdk.Context, coordinatorByAddress types.CoordinatorByAddress)

SetCoordinatorByAddress set a specific coordinatorByAddress in the store from its index

func (Keeper) SetCoordinatorCount

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

SetCoordinatorCount set the total number of coordinator

func (Keeper) SetValidator

func (k Keeper) SetValidator(ctx sdk.Context, validator types.Validator)

SetValidator set a specific validator in the store from its index

Jump to

Keyboard shortcuts

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