keeper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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.BinaryCodec,
	storeKey,
	memKey sdk.StoreKey,
	ps paramtypes.Subspace,
) *Keeper

func (Keeper) GetAllHaven

func (k Keeper) GetAllHaven(ctx sdk.Context) (list []types.Haven)

GetAllHaven returns all haven

func (Keeper) GetAllPost

func (k Keeper) GetAllPost(ctx sdk.Context) (list []types.Post)

GetAllPost returns all post

func (Keeper) GetHaven

func (k Keeper) GetHaven(
	ctx sdk.Context,
	uid uint64,
) (val types.Haven, found bool)

GetHaven returns a haven from uid

func (Keeper) GetHavenUid

func (k Keeper) GetHavenUid(
	ctx sdk.Context,
	name string,
) uint64

GetHaven returns a haven from uid

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetPost

func (k Keeper) GetPost(
	ctx sdk.Context,
	uid uint64,
) (val types.Post, found bool)

GetPost returns a post from its index

func (Keeper) GetUidCount

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

Get UID Count

func (Keeper) IncUidCount

func (k Keeper) IncUidCount(ctx sdk.Context)

Increment UID Count

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) RemoveHaven

func (k Keeper) RemoveHaven(
	ctx sdk.Context,
	uid uint64,
)

RemoveHaven removes a haven from the store

func (Keeper) RemovePost

func (k Keeper) RemovePost(
	ctx sdk.Context,
	uid uint64,
)

RemovePost removes a post from the store

func (Keeper) SetHaven

func (k Keeper) SetHaven(ctx sdk.Context, haven types.Haven)

SetHaven set a specific haven in the store from its index

func (Keeper) SetParams

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

SetParams set the params

func (Keeper) SetPost

func (k Keeper) SetPost(ctx sdk.Context, post types.Post)

SetPost set a specific post in the store from its index

Jump to

Keyboard shortcuts

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