attrs

package
v0.0.0-...-c5655c4 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: Apache-2.0 Imports: 1 Imported by: 20

Documentation

Index

Constants

View Source
const (

	// Description is the key for descriptions used by volume set and snapshot
	Description = "$$$CHQ$$$DESC"

	// Name is the key for names used by volume set and snapshot
	Name = "$$$CHQ$$$NAME"

	// Prefix is the key for prefix used by volume set
	Prefix = "$$$CHQ$$$PREFIX"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attrs

type Attrs map[string]string

Attrs is collection of non-semantic metadata about an object

func (Attrs) Contains

func (a Attrs) Contains(s string) bool

Contains return if the attributes, key or value, contains a substring s.

func (Attrs) Copy

func (a Attrs) Copy() Attrs

Copy ...

func (Attrs) GetKey

func (a Attrs) GetKey(k string) string

GetKey returns the value of the given key if it exists; returns "" if the key doesn't exist Note: The given key is removed from Attrs

func (Attrs) Matches

func (a Attrs) Matches(b Attrs) bool

Matches return whether if attributes a contains all attribut pair in b.

func (Attrs) SetKey

func (a Attrs) SetKey(k string, v string)

SetKey sets the value of the given key if the value is not emoty; do nothing otherwise

Jump to

Keyboard shortcuts

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