Documentation ¶
Index ¶
- Constants
- Variables
- func IsDidUrl(didUrl string) bool
- func IsValidResourceId(u string) bool
- func IsValidV1ID(id string) bool
- func LoadConfig() (types.Config, error)
- func MigrateIndyStyleDid(did string) string
- func MigrateIndyStyleId(id string) string
- func MigrateUUIDDid(did string) string
- func MigrateUUIDId(id string) string
- func MustLoadConfig() types.Config
- func NewConfig(rawConfig types.RawConfig) (types.Config, error)
- func ParseGRPCEndpoint(configEndpoint string, networkName string) (*types.Network, error)
- func ValidDIDDoc() didTypes.DidDoc
- func ValidMetadata() didTypes.Metadata
- func ValidResource() resource.ResourceWithMetadata
- func ValidService() didTypes.Service
- func ValidVerificationMethod() didTypes.VerificationMethod
- func ValidateV1ID(id string) error
- type MockLedgerService
- func (ls MockLedgerService) GetNamespaces() []string
- func (ls MockLedgerService) QueryCollectionResources(did string) ([]*resource.Metadata, *types.IdentityError)
- func (ls MockLedgerService) QueryDIDDoc(did string, version string) (*didTypes.DidDocWithMetadata, *types.IdentityError)
- func (ls MockLedgerService) QueryResource(did string, resourceId string) (*resource.ResourceWithMetadata, *types.IdentityError)
Constants ¶
View Source
const ( ValidIdentifier = "fb53dd05-329b-4614-a3f2-c0a8c7554ee3" 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 IsValidV1ID ¶ added in v1.3.0
func LoadConfig ¶
func MigrateIndyStyleDid ¶ added in v1.3.0
func MigrateIndyStyleId ¶ added in v1.3.0
func MigrateUUIDDid ¶ added in v1.3.0
func MigrateUUIDId ¶ added in v1.3.0
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 ValidResource() resource.ResourceWithMetadata
func ValidService ¶ added in v1.2.0
func ValidVerificationMethod ¶ added in v1.2.0
func ValidVerificationMethod() didTypes.VerificationMethod
func ValidateV1ID ¶ added in v1.3.0
Types ¶
type MockLedgerService ¶ added in v1.2.0
type MockLedgerService struct { Did didTypes.DidDoc Metadata didTypes.Metadata Resource resource.ResourceWithMetadata }
func NewMockLedgerService ¶ added in v1.2.0
func NewMockLedgerService(did didTypes.DidDoc, metadata didTypes.Metadata, resource resource.ResourceWithMetadata) MockLedgerService
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.Metadata, *types.IdentityError)
func (MockLedgerService) QueryDIDDoc ¶ added in v1.2.0
func (ls MockLedgerService) QueryDIDDoc(did string, version string) (*didTypes.DidDocWithMetadata, *types.IdentityError)
func (MockLedgerService) QueryResource ¶ added in v1.2.0
func (ls MockLedgerService) QueryResource(did string, resourceId string) (*resource.ResourceWithMetadata, *types.IdentityError)
Click to show internal directories.
Click to hide internal directories.