config

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigDir

func GetConfigDir() (string, error)

func GetProjectRoot added in v0.0.3

func GetProjectRoot() (string, error)

Types

type Config

type Config struct {
	Version string          `json:"version"`
	Envs    map[string]*Env `json:"envs"`
}

func NewConfig

func NewConfig() (Config, error)

func NewConfigFor added in v0.0.14

func NewConfigFor(name string) (Config, error)

func (*Config) EnvFor

func (c *Config) EnvFor(envName string) (*Env, error)

func (*Config) EnvNames added in v0.0.14

func (c *Config) EnvNames() []string

func (*Config) Read

func (c *Config) Read() error

func (*Config) WriteIfNotExist

func (c *Config) WriteIfNotExist() error

type Env

type Env struct {
	// contains filtered or unexported fields
}

func NewEnv added in v0.0.14

func NewEnv(name string) *Env

func (*Env) ContainerArgs

func (e *Env) ContainerArgs() []string

func (*Env) ContainerName

func (e *Env) ContainerName() string

func (*Env) DockerBuildDir added in v0.0.2

func (e *Env) DockerBuildDir() (string, error)

func (*Env) ImageNameAndTag

func (e *Env) ImageNameAndTag() string

func (*Env) Name

func (e *Env) Name() string

func (*Env) Options added in v0.0.12

func (e *Env) Options() map[string]string

func (*Env) WithContainerArgs

func (e *Env) WithContainerArgs(containerArgs []string) *Env

func (*Env) WithName

func (e *Env) WithName(name string) *Env

Jump to

Keyboard shortcuts

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