util

package
v1.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const MinOrbIdentifierParts = 4

MinOrbIdentifierParts is minimum number of parts in Orb identifier.

Variables

This section is empty.

Functions

func BetweenStrings

func BetweenStrings(value, first, second string) (string, error)

BetweenStrings returns string between first and second string.

func GetAnchorOrigin added in v1.0.0

func GetAnchorOrigin(metadata document.Metadata) (string, error)

GetAnchorOrigin returns anchor origin from document metadata.

func GetHint added in v1.0.0

func GetHint(id, namespace, suffix string) (string, error)

GetHint returns hint from id.

func GetMethodMetadata added in v1.0.0

func GetMethodMetadata(metadata document.Metadata) (map[string]interface{}, error)

GetMethodMetadata retrieves method metadata from document metadata.

func GetOperationsAfterCanonicalReference added in v1.0.0

func GetOperationsAfterCanonicalReference(ref string, anchorOps []*operation.AnchoredOperation) []*operation.AnchoredOperation

GetOperationsAfterCanonicalReference retrieves operations after canonical references. assumption: operations are sorted by transaction time

func GetPublishedOperationsFromMetadata added in v1.0.0

func GetPublishedOperationsFromMetadata(metadata document.Metadata) ([]*operation.AnchoredOperation, error)

GetPublishedOperationsFromMetadata will retrieve published operations from metadata.

func GetSuffix

func GetSuffix(id string) (string, error)

GetSuffix returns suffix from id.

func GetUnpublishedOperationsFromMetadata added in v1.0.0

func GetUnpublishedOperationsFromMetadata(metadata document.Metadata) ([]*operation.AnchoredOperation, error)

GetUnpublishedOperationsFromMetadata will retrieve unpublished operations from metadata.

Types

This section is empty.

Jump to

Keyboard shortcuts

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