Documentation
¶
Index ¶
- Constants
- func NewMsgServer(keeper Keeper, cheqdKeeper didkeeper.Keeper) types.MsgServer
- func NewMsgServerImpl(keeper Keeper, didKeeper didkeeper.Keeper) types.MsgServer
- func NewQueryServer(keeper Keeper, cheqdKeeper didkeeper.Keeper) types.QueryServer
- type Keeper
- func (k Keeper) AddNewResourceVersion(ctx *sdk.Context, resource *types.ResourceWithMetadata) error
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) BindPort(ctx sdk.Context, portID string) error
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) GetAllResources(ctx *sdk.Context) (list []*types.ResourceWithMetadata, iterErr error)
- func (k Keeper) GetLastResourceVersionMetadata(ctx *sdk.Context, collectionID, name, resourceType string) (types.Metadata, bool)
- func (k Keeper) GetParams(ctx sdk.Context) (params types.FeeParams)
- func (k Keeper) GetPort(ctx sdk.Context) string
- func (k Keeper) GetResource(ctx *sdk.Context, collectionID string, id string) (types.ResourceWithMetadata, error)
- func (k Keeper) GetResourceCollection(ctx *sdk.Context, collectionID string) []*types.Metadata
- func (k Keeper) GetResourceCount(ctx *sdk.Context) uint64
- func (k Keeper) GetResourceMetadata(ctx *sdk.Context, collectionID string, id string) (types.Metadata, error)
- func (k Keeper) HasResource(ctx *sdk.Context, collectionID string, id string) bool
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) IterateAllResourceMetadatas(ctx *sdk.Context, callback func(metadata types.Metadata) (continue_ bool))
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) SetParams(ctx sdk.Context, params types.FeeParams)
- func (k Keeper) SetPort(ctx sdk.Context, portID string)
- func (k Keeper) SetResource(ctx *sdk.Context, resource *types.ResourceWithMetadata) error
- func (k Keeper) SetResourceCount(ctx *sdk.Context, count uint64)
- func (k Keeper) UpdateResourceMetadata(ctx *sdk.Context, metadata *types.Metadata) error
Constants ¶
const ( DefaultAlternativeURITemplate = "did:cheqd:%s:%s/resources/%s" DefaultAlternaticeURIDescription = "did-url" )
Variables ¶
This section is empty.
Functions ¶
func NewMsgServer ¶
NewMsgServer returns an implementation of the MsgServer interface for the provided Keeper.
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the x/auth MsgServer interface.
func NewQueryServer ¶
func NewQueryServer(keeper Keeper, cheqdKeeper didkeeper.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 NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, storeKey storetypes.StoreKey, paramSpace types.ParamSubspace, portKeeper types.PortKeeper, scopedKeeper exported.ScopedKeeper) *Keeper
func (Keeper) AddNewResourceVersion ¶ added in v0.8.0
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability attempts to authenticate a given capability and name from a caller. It allows for a caller to check that a capability does in fact correspond to a particular name.
func (Keeper) BindPort ¶
BindPort defines a wrapper function for the port Keeper's function in order to expose it to the module's InitGenesis function
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability allows the resource module to claim a capability that IBC module passes to it
func (Keeper) GetAllResources ¶
func (k Keeper) GetAllResources(ctx *sdk.Context) (list []*types.ResourceWithMetadata, iterErr error)
GetAllResources returns all resources as a list Loads everything in memory. Use only for genesis export!
func (Keeper) GetLastResourceVersionMetadata ¶ added in v0.8.0
func (Keeper) GetResource ¶
func (k Keeper) GetResource(ctx *sdk.Context, collectionID string, id string) (types.ResourceWithMetadata, error)
GetResource returns a resource from its id
func (Keeper) GetResourceCollection ¶
func (Keeper) GetResourceCount ¶
GetResourceCount get the total number of resource
func (Keeper) GetResourceMetadata ¶ added in v0.8.0
func (Keeper) HasResource ¶
HasResource checks if the resource exists in the store
func (Keeper) IterateAllResourceMetadatas ¶ added in v0.8.0
func (Keeper) SetResource ¶
SetResource create or update a specific resource in the store
func (Keeper) SetResourceCount ¶
SetResourceCount set the total number of resource