Documentation
¶
Index ¶
- Constants
- Variables
- func IsDidUrl(didUrl string) bool
- func IsValidResourceId(u string) bool
- func LoadConfig() (types.Config, error)
- func MustLoadConfig() types.Config
- func NewConfig(rawConfig types.RawConfig) (types.Config, error)
- func ParseGRPCEndpoint(configEndpoint string, networkName string) (*types.Network, error)
- func ValidDIDDoc() cheqd.Did
- func ValidMetadata() cheqd.Metadata
- func ValidResource() resource.Resource
- func ValidService() cheqd.Service
- func ValidVerificationMethod() cheqd.VerificationMethod
- type MockLedgerService
- func (ls MockLedgerService) GetNamespaces() []string
- func (ls MockLedgerService) QueryCollectionResources(did string) ([]*resource.ResourceHeader, *types.IdentityError)
- func (ls MockLedgerService) QueryDIDDoc(did string) (*cheqd.Did, *cheqd.Metadata, *types.IdentityError)
- func (ls MockLedgerService) QueryResource(did string, resourceId string) (*resource.Resource, *types.IdentityError)
Constants ¶
View Source
const ( ValidIdentifier = "N22KY2Dyvmuu2Pyy" ValidMethod = "cheqd" ValidNamespace = "mainnet" ValidDid = "did:" + ValidMethod + ":" + ValidNamespace + ":" + ValidIdentifier ValidResourceId = "a09abea0-22e0-4b35-8f70-9cc3a6d0b5fd" ValidPubKeyJWK = "{" + "\"crv\":\"Ed25519\"," + "\"kid\":\"_Qq0UL2Fq651Q0Fjd6TvnYE-faHiOpRlPVQcY_-tA4A\"," + "\"kty\":\"OKP\"," + "\"x\":\"VCpo2LMLhn6iWku8MKvSLg2ZAoC-nlOyPVQaO3FxVeQ\"" + "}" )
Variables ¶
View Source
var ResourceId, _ = regexp.Compile(`[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}`)
Functions ¶
func IsValidResourceId ¶ added in v1.2.0
func LoadConfig ¶
func MustLoadConfig ¶
func ParseGRPCEndpoint ¶ added in v1.2.0
func ValidDIDDoc ¶ added in v1.2.0
func ValidMetadata ¶ added in v1.2.0
func ValidResource ¶ added in v1.2.0
func ValidService ¶ added in v1.2.0
func ValidVerificationMethod ¶ added in v1.2.0
func ValidVerificationMethod() cheqd.VerificationMethod
Types ¶
type MockLedgerService ¶ added in v1.2.0
func NewMockLedgerService ¶ added in v1.2.0
func (MockLedgerService) GetNamespaces ¶ added in v1.2.0
func (ls MockLedgerService) GetNamespaces() []string
func (MockLedgerService) QueryCollectionResources ¶ added in v1.2.0
func (ls MockLedgerService) QueryCollectionResources(did string) ([]*resource.ResourceHeader, *types.IdentityError)
func (MockLedgerService) QueryDIDDoc ¶ added in v1.2.0
func (ls MockLedgerService) QueryDIDDoc(did string) (*cheqd.Did, *cheqd.Metadata, *types.IdentityError)
func (MockLedgerService) QueryResource ¶ added in v1.2.0
func (ls MockLedgerService) QueryResource(did string, resourceId string) (*resource.Resource, *types.IdentityError)
Click to show internal directories.
Click to hide internal directories.