commands

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2016 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APP_NAME = "Talk2Docker"
)

Variables

This section is empty.

Functions

func ErrorExit

func ErrorExit(ctx *cobra.Command, message string)

func Execute

func Execute()

func FormatBool

func FormatBool(b bool, strTrue, strFalse string) string

func FormatDateTime

func FormatDateTime(t time.Time) string

func FormatFloat

func FormatFloat(n float64) string

func FormatInt

func FormatInt(n int64) string

func FormatNonBreakingString

func FormatNonBreakingString(str string) string

func FormatNumber

func FormatNumber(n float64, prec int) string

func FormatPrint

func FormatPrint(out io.Writer, value interface{}) error

func Initialize

func Initialize()

func PrintInJSON

func PrintInJSON(out io.Writer, value interface{}) error

func PrintInTable

func PrintInTable(out io.Writer, header []string, items [][]string, width, align int)

func PrintInYAML

func PrintInYAML(out io.Writer, value interface{}) error

func Truncate

func Truncate(s string, maxlen int) string

Types

type Composer

type Composer struct {
	Name string

	Build string `yaml:"build"`

	Ports   []string `yaml:"ports"`
	Volumes []string `yaml:"volumes"`

	// api.Config
	Hostname     string   `yaml:"hostname"`
	Domainname   string   `yaml:"domainname"`
	User         string   `yaml:"user"`
	Memory       int64    `yaml:"mem_limit"`
	MemorySwap   int64    `yaml:"mem_swap"`
	CpuShares    int64    `yaml:"cpu_shares"`
	Cpuset       string   `yaml:"cpuset"`
	ExposedPorts []string `yaml:"expose"`
	Tty          bool     `yaml:"tty"`
	OpenStdin    bool     `yaml:"stdin_open"`
	Env          []string `yaml:"environment"`
	Cmd          []string `yaml:"command"`
	Image        string   `yaml:"image"`
	WorkingDir   string   `yaml:"working_dir"`
	Entrypoint   string   `yaml:"entrypoint"`
	MacAddress   string   `yaml:"mac_address"`

	// api.HostConfig
	Privileged      bool     `yaml:"privileged"`
	Links           []string `yaml:"links"`
	ExternalLinks   []string `yaml:"external_links"`
	PublishAllPorts bool     `yaml:"publish_all"`
	Dns             []string `yaml:"dns"`
	DnsSearch       []string `yaml:"dns_search"`
	ExtraHosts      []string `yaml:"add_host"`
	VolumesFrom     []string `yaml:"volumes_from"`
	Devices         []string `yaml:"device"`
	NetworkMode     string   `yaml:"net"`
	IpcMode         string   `yaml:"ipc"`
	PidMode         string   `yaml:"pid"`
	CapAdd          []string `yaml:"cap_add"`
	CapDrop         []string `yaml:"cap_drop"`
	RestartPolicy   string   `yaml:"restart"`
	SecurityOpt     []string `yaml:"security_opt"`
	ReadonlyRootfs  bool     `yaml:"read_only"`
}

type LogFormatter

type LogFormatter struct{}

func (*LogFormatter) Format

func (f *LogFormatter) Format(entry *log.Entry) ([]byte, error)

type Mount

type Mount struct {
	MountToPath   string
	ContainerId   string
	ContainerName string
	Writable      bool
	// contains filtered or unexported fields
}

https://github.com/docker/docker/blob/master/daemon%2Fvolumes.go#L21

type Volume

type Volume struct {
	ID          string
	Path        string
	IsBindMount bool
	Writable    bool
	Created     time.Time

	MountedOn []*Mount
	// contains filtered or unexported fields
}

https://github.com/docker/docker/blob/master/volumes%2Fvolume.go#L16

type Volumes

type Volumes []*Volume

func (Volumes) Find

func (volumes Volumes) Find(vol string) *Volume

func (Volumes) FindById

func (volumes Volumes) FindById(id string) *Volume

func (Volumes) FindByName

func (volumes Volumes) FindByName(name string) *Volume

func (Volumes) Len

func (volumes Volumes) Len() int

func (Volumes) Less

func (volumes Volumes) Less(i, j int) bool

func (Volumes) Swap

func (volumes Volumes) Swap(i, j int)

Jump to

Keyboard shortcuts

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