keeper

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasEditAccess

func HasEditAccess(file types.Files, user string) (bool, error)

func HasViewingAccess

func HasViewingAccess(file types.Files, user string) (bool, error)

func IsOwner

func IsOwner(file types.Files, user string) bool

func MakeEditorAddress

func MakeEditorAddress(trackingNumber string, user string) string

func MakeOwnerAddress

func MakeOwnerAddress(merklePath string, user string) string

Owner address is whoever owns this file/folder

func MakeViewerAddress

func MakeViewerAddress(trackingNumber string, user string) string

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

func (Keeper) Encrypt

func (Keeper) Files

func (Keeper) FilesAll

To remove

func (Keeper) FilesAllByOwner added in v3.0.3

func (Keeper) GetAllFiles

func (k Keeper) GetAllFiles(ctx sdk.Context) (list []types.Files)

GetAllFiles returns all files

func (Keeper) GetAllPubkey

func (k Keeper) GetAllPubkey(ctx sdk.Context) (list []types.Pubkey)

GetAllPubkey returns all pubkey

func (Keeper) GetFiles

func (k Keeper) GetFiles(
	ctx sdk.Context,
	address string,
	ownerAddress string,
) (val types.Files, found bool)

GetFiles returns a files from its index

func (Keeper) GetParams

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

GetParams get all parameters as types.Params

func (Keeper) GetPubkey

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

GetPubkey returns a pubkey from its index

func (Keeper) Logger

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

func (Keeper) Params

func (Keeper) Pubkey

func (Keeper) RemoveFiles

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

RemoveFiles removes a files from the store

func (Keeper) RemovePubkey

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

RemovePubkey removes a pubkey from the store

func (Keeper) SetFiles

func (k Keeper) SetFiles(ctx sdk.Context, files types.Files)

SetFiles set a specific files 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) SetPubkey

func (k Keeper) SetPubkey(ctx sdk.Context, pubkey types.Pubkey)

SetPubkey set a specific pubkey in the store from its index

type Migrator

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

Migrator is a struct for handling in-place store migrations.

func NewMigrator

func NewMigrator(keeper Keeper) Migrator

NewMigrator returns a new Migrator

func (Migrator) Migrate1to2

func (m Migrator) Migrate1to2(ctx sdk.Context) error

Migrate1to2 migrates from version 1 to 2.

Jump to

Keyboard shortcuts

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