config

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: GPL-3.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SvcToMap

func SvcToMap(s *Service) map[string]interface{}

Types

type Config

type Config struct {
	System   System            `toml:"system"`
	Defaults map[string]string `toml:"defaults"`
	Services []Service         `toml:"service"`
}

func LoadWorkloadContractFromFile

func LoadWorkloadContractFromFile(filePath string) (*Config, error)

func (*Config) EmplaceDefaults

func (c *Config) EmplaceDefaults()

func (*Config) PanicIsKeep

func (c *Config) PanicIsKeep() bool

func (*Config) PanicIsUnwind

func (c *Config) PanicIsUnwind() bool

func (*Config) Show

func (c *Config) Show()

func (*Config) ShowDefaults

func (c *Config) ShowDefaults()

func (*Config) ShowServices

func (c *Config) ShowServices()

func (*Config) ShowSystem

func (c *Config) ShowSystem()

type Service

type Service struct {
	Name         string `toml:"name"`
	Github       string `toml:"github"`
	RunContext   string `toml:"run-ctx" json:"run-ctx"`
	Cmd          string `toml:"cmd"`
	Profile      string `toml:"profile,omitempty"`
	EnvBootstrap string `toml:"env-bootstrap,omitempty"`
	Sync         string `toml:"sync"`
}

func DefaultSvcMap

func DefaultSvcMap() []Service

type System

type System struct {
	Panic string `toml:"panic"`
}

Jump to

Keyboard shortcuts

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