Documentation ¶
Index ¶
- func GetResourceDataKeyBytes(collectionId string, id string) []byte
- func GetResourceHeaderCollectionPrefixBytes(collectionId string) []byte
- func GetResourceHeaderKeyBytes(collectionId string, id string) []byte
- func NewMsgServer(keeper Keeper, cheqdKeeper cheqdkeeper.Keeper) types.MsgServer
- func NewQuerier(k Keeper, cheqdKeeper cheqdkeeper.Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
- func NewQueryServer(keeper Keeper, cheqdKeeper cheqdkeeper.Keeper) types.QueryServer
- type Keeper
- func (k Keeper) GetAllResourceVersions(ctx *sdk.Context, collectionId, name string) []*types.ResourceHeader
- func (k Keeper) GetAllResources(ctx *sdk.Context) (list []types.Resource)
- func (k Keeper) GetLastResourceVersionHeader(ctx *sdk.Context, collectionId, name, resourceType, mediaType string) (types.ResourceHeader, bool)
- func (k Keeper) GetResource(ctx *sdk.Context, collectionId string, id string) (types.Resource, error)
- func (k Keeper) GetResourceCollection(ctx *sdk.Context, collectionId string) []*types.ResourceHeader
- func (k Keeper) GetResourceCount(ctx *sdk.Context) uint64
- func (k Keeper) HasResource(ctx *sdk.Context, collectionId string, id string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetResource(ctx *sdk.Context, resource *types.Resource) error
- func (k Keeper) SetResourceCount(ctx *sdk.Context, count uint64)
- func (k Keeper) UpdateResourceHeader(ctx *sdk.Context, header *types.ResourceHeader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetResourceDataKeyBytes ¶
GetResourceDataKeyBytes returns the byte representation of resource key
func GetResourceHeaderCollectionPrefixBytes ¶
GetResourceHeaderCollectionPrefixBytes used to iterate over all resource headers in a collection
func GetResourceHeaderKeyBytes ¶
GetResourceHeaderKeyBytes returns the byte representation of resource key
func NewMsgServer ¶
func NewMsgServer(keeper Keeper, cheqdKeeper cheqdkeeper.Keeper) types.MsgServer
NewMsgServer returns an implementation of the MsgServer interface for the provided Keeper.
func NewQuerier ¶
func NewQuerier(k Keeper, cheqdKeeper cheqdkeeper.Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier
func NewQueryServer ¶
func NewQueryServer(keeper Keeper, cheqdKeeper cheqdkeeper.Keeper) types.QueryServer
NewQueryServer returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func (Keeper) GetAllResourceVersions ¶
func (Keeper) GetAllResources ¶
GetAllResources returns all resources as a list Loads everything in memory. Use only for genesis export!
func (Keeper) GetLastResourceVersionHeader ¶
func (Keeper) GetResource ¶
func (k Keeper) GetResource(ctx *sdk.Context, collectionId string, id string) (types.Resource, error)
GetResource returns a resource from its id
func (Keeper) GetResourceCollection ¶
func (Keeper) GetResourceCount ¶
GetResourceCount get the total number of resource
func (Keeper) HasResource ¶
HasResource checks if the resource exists in the store
func (Keeper) SetResource ¶
SetResource create or update a specific resource in the store
func (Keeper) SetResourceCount ¶
SetResourceCount set the total number of resource
func (Keeper) UpdateResourceHeader ¶
UpdateResourceHeader update the header of a resource. Returns an error if the resource doesn't exist