Documentation ¶
Index ¶
- Constants
- type Generator
- func (g *Generator) CreateContentObject(payload *subject.Payload) (vocab.Document, error)
- func (g *Generator) CreatePayload(doc vocab.Document, coreIndexURI *url.URL, anchors []*url.URL) (*subject.Payload, error)
- func (g *Generator) ID() *url.URL
- func (g *Generator) Namespace() string
- func (g *Generator) Version() uint64
- type Opt
Constants ¶
View Source
const ( // ID specifies the ID of the generator. ID = "https://w3id.org/orb#v0" // Namespace specifies the namespace of the generator. Namespace = "did:orb" // Version specifies the version of the generator. Version = uint64(0) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates a content object for did:orb anchor events.
func (*Generator) CreateContentObject ¶
CreateContentObject creates a content object from the given payload.
func (*Generator) CreatePayload ¶
func (g *Generator) CreatePayload(doc vocab.Document, coreIndexURI *url.URL, anchors []*url.URL) (*subject.Payload, error)
CreatePayload creates a payload from the given document.
type Opt ¶
type Opt func(opts *options)
Opt defines an option for the generator.
func WithNamespace ¶
WithNamespace sets the namespace of the generator.
func WithVersion ¶
WithVersion sets the version of the generator.
Click to show internal directories.
Click to hide internal directories.