compose

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find(pwd string) string

Find finds the first compose* file according the default file names of docker-compose.

func LoadPorts

func LoadPorts(file string) ([]int, error)

Types

type Compose

type Compose struct {
	// contains filtered or unexported fields
}

func New

func New(user, directory, file string, ports []PortRange) *Compose

New returns a pointer to an intialized Compose.

func (*Compose) AllowedPorts

func (c *Compose) AllowedPorts() (int, error)

AllowedPorts checks if ports are allowed in the compose file. It returns the first port that is denied, or 0 if they are all OK. Any other error is reported via the returned error.

func (*Compose) Build

func (c *Compose) Build(args []string) ([]byte, error)

func (*Compose) Down

func (c *Compose) Down(args []string) ([]byte, error)

func (*Compose) Exec added in v0.0.6

func (c *Compose) Exec(args []string) ([]byte, error)

func (*Compose) Logs

func (c *Compose) Logs(args []string) ([]byte, error)

func (*Compose) Ps

func (c *Compose) Ps(args []string) ([]byte, error)

func (*Compose) Pull

func (c *Compose) Pull(args []string) ([]byte, error)

func (*Compose) ReStart added in v0.0.6

func (c *Compose) ReStart(args []string) ([]byte, error)

func (*Compose) Start added in v0.0.6

func (c *Compose) Start(args []string) ([]byte, error)

func (*Compose) Stop added in v0.0.6

func (c *Compose) Stop(args []string) ([]byte, error)

func (*Compose) Up

func (c *Compose) Up(args []string) ([]byte, error)

type PortRange

type PortRange struct {
	Lo int
	Hi int
}

Jump to

Keyboard shortcuts

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