Documentation
¶
Index ¶
- type CoreClaimOptions
- type Opt
- type Parser
- type Processor
- func (s *Processor) GetFieldSlotIndex(field string, typeName string, schema []byte) (int, error)
- func (s *Processor) Load(ctx context.Context, url string) (schema []byte, err error)
- func (s *Processor) ParseClaim(ctx context.Context, credential verifiable.W3CCredential, ...) (*core.Claim, error)
- func (s *Processor) ValidateData(data, schema []byte) error
- type Validator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoreClaimOptions ¶
type CoreClaimOptions verifiable.CoreClaimOptions
CoreClaimOptions is params for core claim parsing Deprecated: use verifiable.CoreClaimOptions instead
type Opt ¶
type Opt func(opts *Processor)
Opt returns configuration options for processor suite
func WithDocumentLoader ¶
func WithDocumentLoader(s ld.DocumentLoader) Opt
WithDocumentLoader return new options
type Parser ¶
type Parser interface { // Deprecated: use credential.ToCoreClaim instead ParseClaim(ctx context.Context, credential verifiable.W3CCredential, options *CoreClaimOptions) (*core.Claim, error) GetFieldSlotIndex(field string, typeName string, schema []byte) (int, error) }
Parser is an interface to parse claim slots
type Processor ¶
type Processor struct { Validator Validator DocumentLoader ld.DocumentLoader Parser Parser }
Processor is set of tool for claim processing
func InitProcessorOptions ¶
InitProcessorOptions initializes processor with options.
func (*Processor) GetFieldSlotIndex ¶
GetFieldSlotIndex returns index of slot for specified field according to schema
func (*Processor) ParseClaim ¶
func (s *Processor) ParseClaim(ctx context.Context, credential verifiable.W3CCredential, opts *CoreClaimOptions) (*core.Claim, error)
ParseClaim will serialize input data to index and value fields.
func (*Processor) ValidateData ¶
ValidateData will validate a claim content by given schema.
Click to show internal directories.
Click to hide internal directories.