Documentation ¶
Index ¶
- Constants
- func IsCredentialValidForSchema(cred credential.VerifiableCredential, s string) error
- func IsCredentialValidForVCJSONSchema(cred credential.VerifiableCredential, vcJSONSchema VCJSONSchema) error
- func IsValidCredentialSchema(maybeCredentialSchema string) error
- type JSONSchema
- type VCJSONSchema
Constants ¶
View Source
const ( // VCJSONSchemaType https://w3c-ccg.github.io/vc-json-schemas/v2/index.html#credential_schema_definition_metadata VCJSONSchemaType string = "https://w3c-ccg.github.io/vc-json-schemas/schema/2.0/schema.json" )
Variables ¶
This section is empty.
Functions ¶
func IsCredentialValidForSchema ¶
func IsCredentialValidForSchema(cred credential.VerifiableCredential, s string) error
IsCredentialValidForSchema determines whether a given Verifiable Credential is valid against a specified credential schema
func IsCredentialValidForVCJSONSchema ¶
func IsCredentialValidForVCJSONSchema(cred credential.VerifiableCredential, vcJSONSchema VCJSONSchema) error
func IsValidCredentialSchema ¶
IsValidCredentialSchema determines if a given credential schema is compliant with the specification's JSON Schema https://w3c-ccg.github.io/vc-json-schemas/v2/index.html#credential_schema_definition
Types ¶
type JSONSchema ¶
type VCJSONSchema ¶
type VCJSONSchema struct { Type string `json:"type"` Version string `json:"version"` ID string `json:"id"` Name string `json:"name"` Author string `json:"author"` Authored string `json:"authored"` Schema JSONSchema `json:"schema"` }
VCJSONSchema is the model representing the credential json schema specification https://w3c-ccg.github.io/vc-json-schemas/v2/index.html#credential_schema_definition
func StringToVCJSONCredentialSchema ¶
func StringToVCJSONCredentialSchema(maybeVCJSONCredentialSchema string) (*VCJSONSchema, error)
StringToVCJSONCredentialSchema marshals a string into a credential json credential schema
func (VCJSONSchema) GetProperty ¶
func (vcs VCJSONSchema) GetProperty(propertyName string) (any, error)
Click to show internal directories.
Click to hide internal directories.