models

package
v0.0.0-...-614e11e Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerCompose

type DockerCompose struct {
	Version  string             `json:"version" yaml:"version" mapstructure:"version,omitempty"`
	Services map[string]Service `json:"services" yaml:"services" mapstructure:"services,omitempty"`
	Networks map[string]Network `json:"networks" yaml:"networks,omitempty" mapstructure:"networks,omitempty"`
}

type Elephant

type Elephant struct {
	Name       string
	Containers []string
}

Elephant defines an elephant in the db

func NewElephantArmy

func NewElephantArmy(elephantsMapList map[string]string) []Elephant

NewElephantArmy outputs an array of elephants from a map[ElephantName]="ContainerA,ContainerB"

func (*Elephant) DelFromDB

func (elephant *Elephant) DelFromDB(db *bolt.DB) error

DelFromDB deletes elephant from db

func (*Elephant) RemContainerByID

func (elephant *Elephant) RemContainerByID(containerID string)

RemContainerByID removes a container from the elephant obj

func (*Elephant) WriteToDB

func (elephant *Elephant) WriteToDB(db *bolt.DB) error

WriteToDB writes elephant to db

type Network

type Network struct{}

type RunningContainer

type RunningContainer struct {
	ID       string
	Name     string
	Elephant string
}

type Service

type Service struct {
	Image         string   `json:"image,omitempty" yaml:"image,omitempty" mapstructure:"image,omitempty"`
	Command       string   `json:"command,omitempty" yaml:"command,omitempty" mapstructure:"command,omitempty"`
	Build         string   `json:"build,omitempty" yaml:"build,omitempty" mapstructure:"build,omitempty"`
	ContainerName string   `json:"container_name,omitempty" yaml:"container_name,omitempty" mapstructure:"container_name,omitempty"`
	Ports         []string `json:"ports,omitempty" yaml:"ports,omitempty" mapstructure:"ports,omitempty"`
	Networks      []string `json:"networks,omitempty" yaml:"networks,omitempty" mapstructure:"networks,omitempty"`
}

Jump to

Keyboard shortcuts

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