Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper Keeper) didmod.MsgServer
- type Keeper
- func (k Keeper) Delete(ctx sdk.Context, key []byte, prefix []byte)
- func (k Keeper) DidDocument(c context.Context, req *did.QueryDidDocumentRequest) (*did.QueryDidDocumentResponse, error)
- func (k Keeper) ExportGenesis(ctx types.Context, cdc codec.JSONCodec) *did.GenesisState
- func (k Keeper) Get(ctx sdk.Context, key []byte, prefix []byte, unmarshal UnmarshalFn) (i interface{}, found bool)
- func (k Keeper) GetAll(ctx sdk.Context, prefix []byte) sdk.Iterator
- func (k Keeper) GetAllDidDocuments(ctx sdk.Context) []*did.DidDocument
- func (k Keeper) GetAllDidDocumentsWithCondition(ctx sdk.Context, key []byte, didSelector func(did *did.DidDocument) bool) (didDocs []*did.DidDocument)
- func (k Keeper) GetDidDocument(ctx sdk.Context, key []byte) (did.DidDocument, bool)
- func (k Keeper) Has(ctx sdk.Context, key []byte, prefix []byte) (found bool)
- func (k Keeper) HasDidDocument(ctx sdk.Context, key []byte) bool
- func (k Keeper) InitGenesis(ctx types.Context, cdc codec.JSONCodec, data json.RawMessage) []abci.ValidatorUpdate
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ResolveDid(ctx sdk.Context, didDoc did.DID) (doc did.DidDocument, err error)
- func (k Keeper) Set(ctx sdk.Context, key []byte, prefix []byte, i codec.ProtoMarshaler, ...)
- func (k Keeper) SetDidDocument(ctx sdk.Context, key []byte, document did.DidDocument)
- func (k Keeper) UnmarshalDidDocument(value []byte) (interface{}, bool)
- type MarshalFn
- type Migrator
- type UnmarshalFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
NewMsgServerImpl returns an implementation of the identity MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the Keeper for the did module
func (Keeper) DidDocument ¶
func (k Keeper) DidDocument( c context.Context, req *did.QueryDidDocumentRequest, ) (*did.QueryDidDocumentResponse, error)
DidDocument implements the DidDocument gRPC method, it querys the store and returns a did document to a gRPC client
func (Keeper) ExportGenesis ¶
ExportGenesis exports the did state to a genesis.json file
func (Keeper) Get ¶
func (k Keeper) Get( ctx sdk.Context, key []byte, prefix []byte, unmarshal UnmarshalFn, ) (i interface{}, found bool)
Get gets an item from the store by bytes
func (Keeper) GetAllDidDocuments ¶
func (k Keeper) GetAllDidDocuments(ctx sdk.Context) []*did.DidDocument
GetAllDidDocuments returns all the DidDocuments
func (Keeper) GetAllDidDocumentsWithCondition ¶
func (k Keeper) GetAllDidDocumentsWithCondition( ctx sdk.Context, key []byte, didSelector func(did *did.DidDocument) bool, ) (didDocs []*did.DidDocument)
GetAllDidDocumentsWithCondition retrieve a list of did document by some arbitrary criteria. The selector filter has access to both the did and its metadata
func (Keeper) GetDidDocument ¶
GetDidDocument retrieve a DID document by its key. The boolean return will be false if the DID document is not found
func (Keeper) HasDidDocument ¶
HasDidDocument checks if a DID document is in the store by its key. The boolean return will be false if the DID document is not found
func (Keeper) InitGenesis ¶
func (k Keeper) InitGenesis( ctx types.Context, cdc codec.JSONCodec, data json.RawMessage, ) []abci.ValidatorUpdate
InitGenesis initializes the genesis state for the did module
func (Keeper) ResolveDid ¶
ResolveDid returns the did document if its a did;key or did;cosmos this function is used to resolve ephemeral dids
func (Keeper) Set ¶
func (k Keeper) Set(ctx sdk.Context, key []byte, prefix []byte, i codec.ProtoMarshaler, marshal MarshalFn, )
Set sets a value in the db with a prefixed key
func (Keeper) SetDidDocument ¶
SetDidDocument store a did document in the keeper, existing DID document with the same key will be overwritten
func (Keeper) UnmarshalDidDocument ¶
UnmarshalDidDocument unmarshall a did document and check if it is empty ad DID document is empty if contains no context
type MarshalFn ¶
type MarshalFn func(o codec.ProtoMarshaler) []byte
MarshalFn is a generic function to marshal bytes
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
Migrator is a struct for handling in-place store migrations.
type UnmarshalFn ¶
UnmarshalFn is a generic function to unmarshal bytes