presets

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: Apache-2.0 Imports: 9 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                 `yaml:"version"`
	Services map[string]*Service    `yaml:"services,omitempty"`
	Volumes  map[string]interface{} `yaml:"volumes,omitempty"`
	Networks map[string]string      `yaml:"networks,omitempty"`
}

DockerCompose -

func NewDockerCompose

func NewDockerCompose() (*DockerCompose, bool)

func (*DockerCompose) CreateVolumes

func (d *DockerCompose) CreateVolumes(volumes []string)

type LocalServiceSpec

type LocalServiceSpec struct {
	Hostname     string
	Context      string
	Dockerfile   string
	Target       string
	Restart      string
	DependsOn    []string
	Links        []string
	Ports        []string
	Volumes      []string
	Environments []string
	Command      []string
}

func NewLocalServiceSpec

func NewLocalServiceSpec(serviceName, buildContext string) (*LocalServiceSpec, []string, []string)

func (*LocalServiceSpec) Generate

func (l *LocalServiceSpec) Generate() *Service

type NewServiceOutputs

type NewServiceOutputs struct {
	Service  *Service
	Volumes  []string
	Networks []string
}

func NewService

func NewService(image, serviceName string, withDefaults bool) *NewServiceOutputs

type PostgresServiceSpec

type PostgresServiceSpec struct {
	Tag           string
	LocalPort     string
	User          string
	Password      string
	DB            string
	ContainerName string
	HostName      string
	VolumeName    string
}

func NewPostgresServiceSpec

func NewPostgresServiceSpec(serviceName, version string) (*PostgresServiceSpec, []string, []string)

func NewPostgresServiceSpecWithDefaults

func NewPostgresServiceSpecWithDefaults(serviceName, version string) (*PostgresServiceSpec, []string, []string)

func (*PostgresServiceSpec) Generate

func (p *PostgresServiceSpec) Generate() *Service

type RabbitMQServiceSpec

type RabbitMQServiceSpec struct {
	Image            string
	Tag              string
	LocalPort        string
	ContainerName    string
	HostName         string
	WithManagementUI bool
}

func NewRabbitMQServiceSpec

func NewRabbitMQServiceSpec(serviceName, version string) (*RabbitMQServiceSpec, []string, []string)

func NewRabbitMQServiceSpecWithDefaults

func NewRabbitMQServiceSpecWithDefaults(serviceName, version string) (*RabbitMQServiceSpec, []string, []string)

func (*RabbitMQServiceSpec) Generate

func (r *RabbitMQServiceSpec) Generate() *Service

type RedisServiceSpec

type RedisServiceSpec struct {
	Image         string
	Tag           string
	LocalPort     string
	ContainerName string
	HostName      string
	VolumeName    string
}

func NewRedisServiceSpec

func NewRedisServiceSpec(serviceName, version string) (*RedisServiceSpec, []string, []string)

func NewRedisServiceSpecWithDefaults

func NewRedisServiceSpecWithDefaults(serviceName, version string) (*RedisServiceSpec, []string, []string)

func (*RedisServiceSpec) Generate

func (r *RedisServiceSpec) Generate() *Service

type RemoteServiceSpec

type RemoteServiceSpec struct {
	Image        string
	ServiceName  string
	Restart      string
	Ports        []string
	Volumes      []string
	Environments []string
}

func NewRemoteServiceSpec

func NewRemoteServiceSpec(serviceName, imageName string) (*RemoteServiceSpec, []string, []string)

func (*RemoteServiceSpec) Generate

func (r *RemoteServiceSpec) Generate() *Service

type Service

type Service struct {
	Image         string            `yaml:"image,omitempty"`
	Build         *ServiceBuild     `yaml:"build,omitempty"`
	Command       []string          `yaml:"command,omitempty,flow"`
	ContainerName string            `yaml:"container_name,omitempty"`
	HostName      string            `yaml:"hostname,omitempty"`
	Restart       string            `yaml:"restart,omitempty"`
	Environment   map[string]string `yaml:"environment,omitempty"`
	Volumes       []string          `yaml:"volumes,omitempty"`
	Ports         []string          `yaml:"ports,omitempty"`
	Links         []string          `yaml:"links,omitempty"`
	DependsOn     []string          `yaml:"depends_on,omitempty"`
}

Service - representation of docker-compose service options

type ServiceBuild

type ServiceBuild struct {
	Context    string `yaml:"context,omitempty"`
	Dockerfile string `yaml:"dockerfile,omitempty"`
	Target     string `yaml:"target,omitempty"`
}

type ServiceSpec

type ServiceSpec interface {
	Generate() *Service
}

Jump to

Keyboard shortcuts

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