generator

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	ID() *url.URL
	Namespace() string
	Version() uint64
	CreateContentObject(payload *subject.Payload) (vocab.Document, error)
	CreatePayload(doc vocab.Document, coreIndexURI *url.URL, anchors []*url.URL) (*subject.Payload, error)
	ValidateAnchorCredential(vc *verifiable.Credential, originalContentBytes []byte) error
}

Generator defines the operations of a content object generator.

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry maintains a registry of content object generators.

func NewRegistry

func NewRegistry() *Registry

NewRegistry returns a new generator registry.

func (*Registry) Get

func (r *Registry) Get(id *url.URL) (Generator, error)

Get returns the generator for the given ID.

func (*Registry) GetByNamespaceAndVersion

func (r *Registry) GetByNamespaceAndVersion(ns string, ver uint64) (Generator, error)

GetByNamespaceAndVersion returns the generator for the given namespace and version.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL