annotation

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: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instance

type Instance struct {
	Unique               string            `json:"unique"`
	Created              string            `json:"created"`
	CurrentIdentityKind  string            `json:"identityCurrentType"`
	CurrentIdentity      identity.Contract `json:"identityCurrent"`
	PreviousIdentityKind string            `json:"identityPreviousType"`
	PreviousIdentity     identity.Contract `json:"identityPrevious"`
	MetadataKind         string            `json:"metadataType"`
	Metadata             metadata.Contract `json:"metadata"`
	// contains filtered or unexported fields
}

Instance is the standard metadata returned by all Annotate() methods.

func New

func New(
	unique string,
	currentIdentity identity.Contract,
	previousIdentity identity.Contract,
	metadata metadata.Contract) *Instance

New is a factory function that returns an initialized Instance.

func (*Instance) SetIdentityFactory

func (i *Instance) SetIdentityFactory(identityFactory identityFactory.Contract)

SetIdentityFactory provides for method injection of required factory to unmarshal identity JSON.

func (*Instance) SetMetadataFactory

func (i *Instance) SetMetadataFactory(metadataFactory metadataFactory.Contract)

SetMetadataFactory 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