labels

package
v0.0.0-...-7676619 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NUMBER  = Label("com.docker.compose.container-number")
	ONEOFF  = Label("com.docker.compose.oneoff")
	PROJECT = Label("com.docker.compose.project")
	SERVICE = Label("com.docker.compose.service")
	HASH    = Label("com.docker.compose.config-hash")
	VERSION = Label("com.docker.compose.version")

	PROJECT_LEGACY = Label("io.docker.compose.project")
	SERVICE_LEGACY = Label("io.docker.compose.service")
	HASH_LEGACY    = Label("io.docker.compose.config-hash")
)

Libcompose default labels.

Variables

This section is empty.

Functions

func And

func And(left, right map[string][]string) map[string][]string

And returns a map of labels by merging the two specified values (left and right).

func AndString

func AndString(left, right string) string

AndString returns a json list of labels by merging the two specified values (left and right) serialized as string.

func LabelFilter

func LabelFilter(key, value string) map[string][]string

LabelFilter returns a label map representation of the specifed couple (key,value) that is used as filter for docker.

func LabelFilterString

func LabelFilterString(key, value string) string

LabelFilterString returns a label json string representation of the specifed couple (key,value) that is used as filter for docker.

Types

type Label

type Label string

Label represents a docker label.

func (Label) Eq

func (f Label) Eq(value string) map[string][]string

Eq returns a label map representation with the specified value.

func (Label) EqString

func (f Label) EqString(value string) string

EqString returns a label json string representation with the specified value.

func (Label) Str

func (f Label) Str() string

Str returns the label name.

Jump to

Keyboard shortcuts

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