registry

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AnchorOriginProperty is anchor origin key.
	AnchorOriginProperty = "anchorOrigin"

	// AnchorURIProperty is anchor URI key.
	AnchorURIProperty = "anchorURI"

	// CanonicalReferenceProperty is the canonical reference key.
	CanonicalReferenceProperty = "canonicalReference"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata map[string]interface{}

Metadata can contains various metadata for resource.

type Option

type Option func(opts *Registry)

Option is a registry instance option.

func WithResourceInfoProvider

func WithResourceInfoProvider(p ResourceInfoProvider) Option

WithResourceInfoProvider adds resource info provider to the list of available providers.

type Registry

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

Registry contains providers for resource information.

func New

func New(opts ...Option) *Registry

New return new instance of resource info providers registry.

func (*Registry) GetResourceInfo

func (r *Registry) GetResourceInfo(id string) (Metadata, error)

GetResourceInfo provides information about resource.

type ResourceInfoProvider

type ResourceInfoProvider interface {
	GetResourceInfo(id string) (Metadata, error)
	Accept(id string) bool
}

ResourceInfoProvider defines interface for resource info providers.

Directories

Path Synopsis
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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