config

package
v0.0.0-...-eb599cc Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LangGo         = "go"
	LangJavaScript = "javascript"
	SysDocker      = "docker"
	SysSystemd     = "systemd"
	ArchARMv6      = "ARMv6"
)

Service constants

Variables

This section is empty.

Functions

func Init

func Init(filename string) (err error)

Init reads and validates config

func Repository

func Repository() string

Repository returns the repo specified in config

Types

type Service

type Service struct {
	Name        string    `yaml:"-"`
	TargetNames []string  `yaml:"targets"`
	Targets     []*Target `yaml:"-"`
	Language    string    `yaml:"language"`
	EnvFiles    []string  `yaml:"env_files"`
}

Service is the microservice to be deployed

func FindService

func FindService(name string) *Service

FindService returns a service by name or nil if it doesn't exist

func (*Service) DashedName

func (s *Service) DashedName() string

DashedName returns home-automation-s-foo for service.foo

func (*Service) SyslogIdentifier

func (s *Service) SyslogIdentifier() string

SyslogIdentifier returns the value that can be used in a systemd unit file.

type Target

type Target struct {
	Name         string `yaml:"-"`
	Host         string `yaml:"host"`
	Username     string `yaml:"username"`
	Directory    string `yaml:"directory"`
	System       string `yaml:"system"`
	Architecture string `yaml:"architecture"`
}

Target is the destination server for the deployment

Jump to

Keyboard shortcuts

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