keeper

package
v1.2.0-alpha.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 14 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) 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) 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) GetTracker

func (k Keeper) GetTracker(ctx sdk.Context) (val types.Tracker, found bool)

GetTracker returns tracker

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

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

RemoveTracker removes tracker 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

func (Keeper) SetTracker

func (k Keeper) SetTracker(ctx sdk.Context, tracker types.Tracker)

SetTracker set tracker in the store

Jump to

Keyboard shortcuts

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