keeper

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProviderKey

func ProviderKey(id sdk.Address) []byte

Types

type IKeeper

type IKeeper interface {
	Codec() codec.BinaryCodec
	StoreKey() storetypes.StoreKey
	Get(ctx sdk.Context, id sdk.Address) (types.Provider, bool)
	Create(ctx sdk.Context, provider types.Provider) error
	WithProviders(ctx sdk.Context, fn func(types.Provider) bool)
	Update(ctx sdk.Context, provider types.Provider) error
	Delete(ctx sdk.Context, id sdk.Address)
	NewQuerier() Querier
}

func NewKeeper

func NewKeeper(cdc codec.BinaryCodec, skey storetypes.StoreKey) IKeeper

NewKeeper creates and returns an instance for Provider keeper

type Keeper

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

Keeper of the provider store

func (Keeper) Codec

func (k Keeper) Codec() codec.BinaryCodec

Codec returns keeper codec

func (Keeper) Create

func (k Keeper) Create(ctx sdk.Context, provider types.Provider) error

Create creates a new provider or returns an error if the provider exists already

func (Keeper) Delete

func (k Keeper) Delete(_ sdk.Context, _ sdk.Address)

Delete delete a provider

func (Keeper) Get

func (k Keeper) Get(ctx sdk.Context, id sdk.Address) (types.Provider, bool)

Get returns a provider with given provider id

func (Keeper) NewQuerier

func (k Keeper) NewQuerier() Querier

func (Keeper) StoreKey

func (k Keeper) StoreKey() storetypes.StoreKey

StoreKey returns store key

func (Keeper) Update

func (k Keeper) Update(ctx sdk.Context, provider types.Provider) error

Update updates a provider details

func (Keeper) WithProviders

func (k Keeper) WithProviders(ctx sdk.Context, fn func(types.Provider) bool)

WithProviders iterates all providers

type Querier

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) Provider

Provider returns provider details based on owner address

func (Querier) Providers

Providers returns providers list

Jump to

Keyboard shortcuts

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