compose

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 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 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() ([]byte, error)

func (*Compose) Down

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

func (*Compose) Logs

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

func (*Compose) Ps

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

func (*Compose) Pull

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

func (*Compose) Up

func (c *Compose) Up() ([]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