keeper

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 13 Imported by: 0

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 {

	// Params key: ParamsKeyPrefix | value: Params
	Params       collections.Item[types.Params]
	SpecRegistry collections.Map[string, types.DataSpec]
	Schema       collections.Schema
	// contains filtered or unexported fields
}

func NewKeeper

func NewKeeper(
	cdc codec.BinaryCodec,
	storeService store.KVStoreService,
	authority string,
) Keeper

func (Keeper) GetAuthority

func (k Keeper) GetAuthority() string

GetAuthority returns the module's authority.

func (Keeper) GetParams

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

GetParams sets the x/registry module parameters.

func (Keeper) GetSpec

func (k Keeper) GetSpec(ctx context.Context, querytype string) (types.DataSpec, error)

GetSpec retrieves a DataSpec from the registry based on the provided query type. It converts the query type to lowercase before performing the retrieval. If the DataSpec is found, it is returned along with a nil error. If the DataSpec is not found, an empty DataSpec and an error are returned.

func (Keeper) HasSpec

func (k Keeper) HasSpec(ctx context.Context, querytype string) (bool, error)

HasSpec checks if a data specification with the given query type exists in the registry. It returns true if the data specification exists, otherwise false. It converts the query type parameter to lower case before, for keeping things consistent. Returns an error if there was an issue checking the registry.

func (*Keeper) Hooks

func (k *Keeper) Hooks() types.RegistryHooks

func (Keeper) Logger

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

func (Keeper) MaxReportBufferWindow

func (k Keeper) MaxReportBufferWindow(ctx context.Context) (uint64, error)

get max report buffer window

func (Keeper) SetDataSpec

func (k Keeper) SetDataSpec(ctx sdk.Context, querytype string, dataspec types.DataSpec) error

SetDataSpec sets the data specification for a given query type. It converts the query type to lowercase and then calls the Set method of the SpecRegistry to store the data specification.

func (*Keeper) SetHooks

func (k *Keeper) SetHooks(rh types.RegistryHooks)

func (Keeper) SetParams

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

SetParams sets the x/registry module parameters.

type Querier

type Querier struct {
	Keeper
}

func NewQuerier

func NewQuerier(keeper Keeper) Querier

func (Querier) GetDataSpec

func (Querier) Params

Jump to

Keyboard shortcuts

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