Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InterfaceSpec = spi.InterfaceSpec{
Name: "Metadata",
Version: "0.1.0",
}
InterfaceSpec is the current name and version of the Metadata API.
View Source
var ( // NullPath means no path NullPath = Path([]string{}) )
Functions ¶
This section is empty.
Types ¶
type Path ¶
type Path []string
Path is used to identify a particle of metadata. The path can be strings separated by / as in a URL.
func (Path) Clean ¶
Clean scrubs the path to remove any empty string or . or .. and collapse the path into a concise form. It's similar to path/filepath.Clean in the standard lib.
func (Path) Rel ¶
Rel returns a new path that is a child of the input from this path. e.g. For a path a/b/c/d Rel(a/b/) returns c/d. NullPath is returned if the two are not relative to one another.
type Plugin ¶
type Plugin interface { // List returns a list of *child nodes* given a path, which is specified as a slice // where for i > j path[i] is the parent of path[j] List(path Path) (child []string, err error) // Get retrieves the value at path given. Get(path Path) (value *types.Any, err error) }
Plugin is the interface for metadata-related operations.
Click to show internal directories.
Click to hide internal directories.