config

package
v0.0.0-...-5ae482c Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Shell string
	Dir   string
	Envs  []Env
}

type Container

type Container struct {
	Name     string
	Abstract bool
	Extends  string
	Image    string
	Resource Resource
	Envs     []Env
	Mounts   []Mount
}

type Context

type Context struct {
	Name  string
	Image string
}

type Data

type Data struct {
	DB  string `yaml:"db"`
	Dir string
}

type Env

type Env struct {
	Key   string
	Value string
}

type Mount

type Mount struct {
	Src string
	Dst string
}

TODO: only bind mount is supported

type Parameter

type Parameter struct {
	Name    string
	Default int
}

type Resource

type Resource struct {
	CPU int
	RAM string
}

type Root

type Root struct {
	Data       Data
	Contexts   []Context
	Score      Score
	Parameters []Parameter
	Containers []Container
}

Root is top level config.

func Read

func Read(p string) (Root, error)

type Score

type Score struct {
	Command Command
	Timeout string
	Capture string // The regex that capture the score
}

Jump to

Keyboard shortcuts

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