labels

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DEPENDENCY the dependencies tag
	DEPENDENCY = "DEPENDENCY"

	// ENVS the environment variables tag
	ENVS = "ENVS"

	// EXPOSED the exposed ports tag
	EXPOSED = "EXPOSED"

	// RESOURCES the used resources tag
	RESOURCES = "RESOURCES"

	// TAGS the extra tags used for our images
	TAGS = "TAGS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dependencies

type Dependencies []Dependency

Dependencies array of dependency objects

func GetDepenedencies

func GetDepenedencies(dockerfile string) (*Dependencies, error)

GetDepenedencies fetch the container dependencies from the Dockerfile

type Dependency

type Dependency struct {
	Name      string   `json:"name,omitempty"`
	Image     string   `json:"image,omitempty"`
	Ports     []string `json:"ports,omitempty"`
	About     string   `json:"about,omitempty"`
	Mandatory string   `json:"mandatory,omitempty"`
}

Dependency object for the Dockerfile

type Env

type Env struct {
	Name      string `json:"name,omitempty"`
	About     string `json:"about,omitempty"`
	Mandatory string `json:"mandatory,omitempty"`
}

Env is the Environment Variable object for the Dockerfile

type Envs

type Envs []Env

Envs array of environment variable objects

func GetEnvs

func GetEnvs(dockerfile string) (*Envs, error)

GetEnvs fetch cotnainer environment variables from the Dockerfile

type Others

type Others map[string]string

Other all other tags regardless of their type in the dockerfile

func GetOtherTags

func GetOtherTags(dockerfile string) (*Others, error)

GetOtherTags gets all the dockerfile labels

type Port

type Port struct {
	Name     string `json:"name,omitempty"`
	About    string `json:"about,omitempty"`
	Scheme   string `json:"scheme,omitempty"`
	Protocol string `json:"protocol,omitempty"`
}

Port is the exposed port object for the Dockerfile

type Ports

type Ports []Port

Ports that should be exposed by the container application

func GetExposedPorts

func GetExposedPorts(dockerfile string) (*Ports, error)

GetExposedPorts fetch the texposed ports from the Dockerfile

type Resources

type Resources struct {
	CPU    string `json:"cpu,omitempty"`
	Memory string `json:"memory,omitempty"`
}

Resources is the exposed port object for the Dockerfile (only one resource object per dockerfile )

func GetResources

func GetResources(dockerfile string) (*Resources, error)

GetResources fetch the container resources from the Dockerfile

type Tags

type Tags map[string]string

Tags tags from dockerfile

func GetTags

func GetTags(dockerfile string) (*Tags, error)

GetTags fetch the tags used in the Dockerfile

Jump to

Keyboard shortcuts

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