Documentation ¶
Index ¶
- func GetDocumentsIDBytes(id uint64) []byte
- func GetDocumentsIDFromBytes(bz []byte) uint64
- func GetFileCIDBytes(cid string) []byte
- func GetFileIDBytes(id uint64) []byte
- func GetFileIDFromBytes(bz []byte) uint64
- func NewMsgServerImpl(keeper Keeper) types.MsgServer
- type Keeper
- func (k Keeper) AppendDocuments(ctx sdk.Context, documents types.Documents) uint64
- func (k Keeper) AppendFile(ctx sdk.Context, file types.File) (ipld.Link, uint64)
- func (k Keeper) AppendFileBlock(ctx sdk.Context, file types.File) (ipld.Link, uint64)
- func (k Keeper) AppendIPLD(ctx sdk.Context, documents types.Documents) (ipld.Link, uint64)
- func (k Keeper) Documents(c context.Context, req *types.QueryGetDocumentsRequest) (*types.QueryGetDocumentsResponse, error)
- func (k Keeper) DocumentsAll(c context.Context, req *types.QueryAllDocumentsRequest) (*types.QueryAllDocumentsResponse, error)
- func (k Keeper) File(c context.Context, req *types.QueryGetFileRequest) (*types.QueryGetFileResponse, error)
- func (k Keeper) FileAll(c context.Context, req *types.QueryAllFileRequest) (*types.QueryAllFileResponse, error)
- func (k Keeper) GetAllDocuments(ctx sdk.Context) (list []types.Documents)
- func (k Keeper) GetAllFile(ctx sdk.Context) (list []types.File)
- func (k Keeper) GetDocuments(ctx sdk.Context, id uint64) types.Documents
- func (k Keeper) GetDocumentsCount(ctx sdk.Context) uint64
- func (k Keeper) GetDocumentsOwner(ctx sdk.Context, id uint64) string
- func (k Keeper) GetFile(ctx sdk.Context, cid string) types.File
- func (k Keeper) GetFileCount(ctx sdk.Context) uint64
- func (k Keeper) GetFileOwner(ctx sdk.Context, cid string) string
- func (k *Keeper) GetObject(ctx sdk.Context, cid cid.Cid) ipld.Node
- func (k Keeper) HasDocuments(ctx sdk.Context, id uint64) bool
- func (k Keeper) HasFile(ctx sdk.Context, cid string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) RemoveDocuments(ctx sdk.Context, id uint64)
- func (k Keeper) RemoveFile(ctx sdk.Context, cid string)
- func (k Keeper) SetDocuments(ctx sdk.Context, documents types.Documents)
- func (k Keeper) SetDocumentsCount(ctx sdk.Context, count uint64)
- func (k Keeper) SetFile(ctx sdk.Context, file types.File)
- func (k Keeper) SetFileCount(ctx sdk.Context, count uint64)
- func (k Keeper) StoreAsIPFS(ctx sdk.Context, file types.File) ipld.Link
- func (k Keeper) StoreAsXDV(ctx sdk.Context, file types.File) ipld.Link
- func (k Keeper) StoreAsXDVBlock(ctx sdk.Context, file types.File) ipld.Link
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDocumentsIDBytes ¶
GetDocumentsIDBytes returns the byte representation of the ID
func GetDocumentsIDFromBytes ¶
GetDocumentsIDFromBytes returns ID in uint64 format from a byte array
func GetFileCIDBytes ¶
GetFileCIDBytes returns the byte representation of the CID
func GetFileIDBytes ¶
GetFileIDBytes returns the byte representation of the ID
func GetFileIDFromBytes ¶
GetFileIDFromBytes returns ID in uint64 format from a byte array
func NewMsgServerImpl ¶
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 ¶
AppendDocuments appends a documents in the store with a new id and update the count
func (Keeper) AppendFile ¶
AppendFile appends a file in the store with a new id and update the count
func (Keeper) AppendFileBlock ¶
AppendFile appends a file in the store with a new id and update the count
func (Keeper) AppendIPLD ¶
func (Keeper) Documents ¶
func (k Keeper) Documents(c context.Context, req *types.QueryGetDocumentsRequest) (*types.QueryGetDocumentsResponse, error)
func (Keeper) DocumentsAll ¶
func (k Keeper) DocumentsAll(c context.Context, req *types.QueryAllDocumentsRequest) (*types.QueryAllDocumentsResponse, error)
func (Keeper) File ¶
func (k Keeper) File(c context.Context, req *types.QueryGetFileRequest) (*types.QueryGetFileResponse, error)
func (Keeper) FileAll ¶
func (k Keeper) FileAll(c context.Context, req *types.QueryAllFileRequest) (*types.QueryAllFileResponse, error)
func (Keeper) GetAllDocuments ¶
GetAllDocuments returns all documents
func (Keeper) GetAllFile ¶
GetAllFile returns all file
func (Keeper) GetDocuments ¶
GetDocuments returns a documents from its id
func (Keeper) GetDocumentsCount ¶
GetDocumentsCount get the total number of documents
func (Keeper) GetDocumentsOwner ¶
GetDocumentsOwner returns the creator of the documents
func (Keeper) GetFileCount ¶
GetFileCount get the total number of file
func (Keeper) GetFileOwner ¶
GetFileOwner returns the creator of the file
func (Keeper) HasDocuments ¶
HasDocuments checks if the documents exists in the store
func (Keeper) RemoveDocuments ¶
RemoveDocuments removes a documents from the store
func (Keeper) RemoveFile ¶
RemoveFile removes a file from the store
func (Keeper) SetDocuments ¶
SetDocuments set a specific documents in the store
func (Keeper) SetDocumentsCount ¶
SetDocumentsCount set the total number of documents
func (Keeper) SetFileCount ¶
SetFileCount set the total number of file
func (Keeper) StoreAsIPFS ¶
func (Keeper) StoreAsXDV ¶
StoreAsXDV