metadata

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2017 License: Apache-2.0 Imports: 10 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(path []string, object interface{}) interface{}

Get returns the attribute of the object at path

func GetValue

func GetValue(path []string, object interface{}) (*types.Any, error)

GetValue returns the attribute of the object at path, as serialized blob

func List

func List(path []string, object interface{}) []string

List lists the members at the path

func NewPluginFromChannel

func NewPluginFromChannel(writes <-chan func(map[string]interface{})) metadata.Plugin

NewPluginFromChannel returns a plugin implementation where reads and writes are serialized via channel of functions that have a view to the metadata. Closing the write channel stops the serialized read/writes and falls back to unserialized reads.

func NewPluginFromData

func NewPluginFromData(data map[string]interface{}) metadata.Plugin

NewPluginFromData creates a plugin out of a simple data map. Note the updates to the map is not guarded and synchronized with the reads.

func Path

func Path(path string) metadata.Path

Path returns the path compoments of a / separated path

func PathFromStrings

func PathFromStrings(a string, b ...string) metadata.Path

PathFromStrings returns the path from a list of strings

func Put

func Put(path []string, value interface{}, object map[string]interface{}) bool

Put sets the attribute of an object at path to the given value

func String

func String(p metadata.Path) string

String returns the string representation of path

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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