Documentation ¶
Index ¶
- type CommonJSONSerializationSchema
- type Parser
- func (s Parser) AssignSlots(content []byte, indexFields, valueFields []string) (processor.ParsedSlots, error)
- func (s Parser) GetFieldSlotIndex(field string, schema []byte) (int, error)
- func (s Parser) ParseClaim(credential *verifiable.Iden3Credential, schemaBytes []byte) (*core.Claim, error)
- func (s Parser) ParseSlots(data, schema []byte) (processor.ParsedSlots, error)
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonJSONSerializationSchema ¶
type CommonJSONSerializationSchema struct { Index struct { Type string `json:"type"` Default []string `json:"default"` } `json:"index"` Value struct { Type string `json:"type"` Default []string `json:"default"` } `json:"value"` }
CommonJSONSerializationSchema Common JSON
type Parser ¶
type Parser struct {
ParsingStrategy processor.ParsingStrategy
}
Parser can parse claim data according to specification
func (Parser) AssignSlots ¶
func (s Parser) AssignSlots(content []byte, indexFields, valueFields []string) (processor.ParsedSlots, error)
AssignSlots assigns index and value fields to specific slot according array order
func (Parser) GetFieldSlotIndex ¶
GetFieldSlotIndex return index of slot from 0 to 7 (each claim has by default 8 slots)
func (Parser) ParseClaim ¶
func (s Parser) ParseClaim(credential *verifiable.Iden3Credential, schemaBytes []byte) (*core.Claim, error)
ParseClaim creates Claim object from Iden3Credential
func (Parser) ParseSlots ¶
func (s Parser) ParseSlots(data, schema []byte) (processor.ParsedSlots, error)
ParseSlots converts payload to claim slots using provided schema
type Validator ¶
type Validator struct { }
Validator validate json data
func (Validator) ValidateData ¶
ValidateData validate JSON data by JSON Schema
func (Validator) ValidateDocument ¶
ValidateDocument validate json document by json schema
Click to show internal directories.
Click to hide internal directories.