metadata

package
v0.0.0-...-be3778f Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Kind = "pki"

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	Provenance        provenance.Contract `json:"provenance"`
	IdentitySignature []byte              `json:"identitySignature"`
	DataSignature     []byte              `json:"dataSignature"`
	PublicKey         []byte              `json:"publicKey"`
	SignerKind        string              `json:"signerType"`
	SignerMetadata    metadata.Contract   `json:"signerMetadata"`
	// contains filtered or unexported fields
}

Instance is the annotator-specific metadata.

func New

func New(
	provenance provenance.Contract,
	identitySignature []byte,
	dataSignature []byte,
	publicKey []byte,
	signerMetadata metadata.Contract) *Instance

New is a factory function that returns an initialized Instance.

func (*Instance) Kind

func (*Instance) Kind() string

Kind returns the type of concrete implementation.

func (*Instance) SetSignerFactories

func (i *Instance) SetSignerFactories(signerFactories []metadataFactory.Contract)

SetSignerFactories provides for method injection of required factory to unmarshal metadata JSON.

func (*Instance) UnmarshalJSON

func (i *Instance) UnmarshalJSON(data []byte) error

UnmarshalJSON converts JSON into appropriate contract implementations.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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