keeper

package
v0.0.0-...-df6cd37 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDocumentsIDBytes

func GetDocumentsIDBytes(id uint64) []byte

GetDocumentsIDBytes returns the byte representation of the ID

func GetDocumentsIDFromBytes

func GetDocumentsIDFromBytes(bz []byte) uint64

GetDocumentsIDFromBytes returns ID in uint64 format from a byte array

func GetFileCIDBytes

func GetFileCIDBytes(cid string) []byte

GetFileCIDBytes returns the byte representation of the CID

func GetFileIDBytes

func GetFileIDBytes(id uint64) []byte

GetFileIDBytes returns the byte representation of the ID

func GetFileIDFromBytes

func GetFileIDFromBytes(bz []byte) uint64

GetFileIDFromBytes returns ID in uint64 format from a byte array

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.Marshaler,
	storeKey,
	memKey sdk.StoreKey,

	accountKeeper authkeeper.AccountKeeper,
	bankKeeper bankkeeper.Keeper,
) *Keeper

func (Keeper) AppendDocuments

func (k Keeper) AppendDocuments(
	ctx sdk.Context,
	documents types.Documents,
) uint64

AppendDocuments appends a documents in the store with a new id and update the count

func (Keeper) AppendFile

func (k Keeper) AppendFile(
	ctx sdk.Context,
	file types.File,
) (ipld.Link, uint64)

AppendFile appends a file in the store with a new id and update the count

func (Keeper) AppendFileBlock

func (k Keeper) AppendFileBlock(
	ctx sdk.Context,
	file types.File,
) (ipld.Link, uint64)

AppendFile appends a file in the store with a new id and update the count

func (Keeper) AppendIPLD

func (k Keeper) AppendIPLD(
	ctx sdk.Context,
	documents types.Documents,
) (ipld.Link, uint64)

func (Keeper) GetAllDocuments

func (k Keeper) GetAllDocuments(ctx sdk.Context) (list []types.Documents)

GetAllDocuments returns all documents

func (Keeper) GetAllFile

func (k Keeper) GetAllFile(ctx sdk.Context) (list []types.File)

GetAllFile returns all file

func (Keeper) GetDocuments

func (k Keeper) GetDocuments(ctx sdk.Context, id uint64) types.Documents

GetDocuments returns a documents from its id

func (Keeper) GetDocumentsCount

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

GetDocumentsCount get the total number of documents

func (Keeper) GetDocumentsOwner

func (k Keeper) GetDocumentsOwner(ctx sdk.Context, id uint64) string

GetDocumentsOwner returns the creator of the documents

func (Keeper) GetFile

func (k Keeper) GetFile(ctx sdk.Context, cid string) types.File

GetFile returns a file from its id

func (Keeper) GetFileCount

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

GetFileCount get the total number of file

func (Keeper) GetFileOwner

func (k Keeper) GetFileOwner(ctx sdk.Context, cid string) string

GetFileOwner returns the creator of the file

func (*Keeper) GetObject

func (k *Keeper) GetObject(ctx sdk.Context, cid cid.Cid) ipld.Node

func (Keeper) HasDocuments

func (k Keeper) HasDocuments(ctx sdk.Context, id uint64) bool

HasDocuments checks if the documents exists in the store

func (Keeper) HasFile

func (k Keeper) HasFile(ctx sdk.Context, cid string) bool

HasFile checks if the file exists in the store

func (Keeper) Logger

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

func (Keeper) RemoveDocuments

func (k Keeper) RemoveDocuments(ctx sdk.Context, id uint64)

RemoveDocuments removes a documents from the store

func (Keeper) RemoveFile

func (k Keeper) RemoveFile(ctx sdk.Context, cid string)

RemoveFile removes a file from the store

func (Keeper) SetDocuments

func (k Keeper) SetDocuments(ctx sdk.Context, documents types.Documents)

SetDocuments set a specific documents in the store

func (Keeper) SetDocumentsCount

func (k Keeper) SetDocumentsCount(ctx sdk.Context, count uint64)

SetDocumentsCount set the total number of documents

func (Keeper) SetFile

func (k Keeper) SetFile(ctx sdk.Context, file types.File)

SetFile set a specific file in the store

func (Keeper) SetFileCount

func (k Keeper) SetFileCount(ctx sdk.Context, count uint64)

SetFileCount set the total number of file

func (Keeper) StoreAsIPFS

func (k Keeper) StoreAsIPFS(
	ctx sdk.Context,
	file types.File,
) ipld.Link

func (Keeper) StoreAsXDV

func (k Keeper) StoreAsXDV(
	ctx sdk.Context,
	file types.File,
) ipld.Link

StoreAsXDV

func (Keeper) StoreAsXDVBlock

func (k Keeper) StoreAsXDVBlock(
	ctx sdk.Context,
	file types.File,
) ipld.Link

StoreAsXDVBlock

Jump to

Keyboard shortcuts

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