fileconf

package module
v0.0.0-...-52c217c Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: BSD-3-Clause Imports: 3 Imported by: 0

README

config

Experimental. In dev. Not ready.

  • YAML first
  • TOML later

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	ComposeBuild
	Cmd string `yaml:"command"` // path to build command that run in context
}

Build keeps configuration for build recipes. It based on docker-compose Build.

type Compose

type Compose struct {
	Services map[string]ComposeService
}

Compose keeps configuration for docker-compose.

func LoadComposeFile

func LoadComposeFile(path string) (*Compose, error)

type ComposeBuild

type ComposeBuild struct {
	Context    string `yaml:"context"`    // path to build context
	Dockerfile string `yaml:"dockerfile"` // path to alternate dockerfile, used when build command empty
}

ComposeBuild keeps configuration for the build recipes.

type ComposeService

type ComposeService struct {
	Repo    string       `yaml:"remote"`  // remote repository
	Image   string       `yaml:"image"`   // use docker image instead
	Ports   []string     `yaml:"ports"`   // bind network ports for docker
	Command string       `yaml:"command"` // path to a command with optional args for run a service
	Build   ComposeBuild `yaml:"build"`   // compatible with docker-compose
}

ComposeService keeps configuration for the single service.

type Extended

type Extended struct {
	Services map[string]Service
}

Extended keeps full configuration for MRT that includes fields for the docker-compose.

func LoadFile

func LoadFile(path string) (*Extended, error)

type Service

type Service struct {
	ComposeService
	Base string `yaml:"base"` // base path to the service
}

Service keeps configuration for the single service. It based on docker-compose Service.

Jump to

Keyboard shortcuts

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