config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageByRegistry

func ImageByRegistry(registry string, images []string) (string, error)

func Registry

func Registry(imageName string) (string, error)

Types

type Config

type Config struct {
	Stacks         []Stack `toml:"stacks"`
	DefaultStackID string  `toml:"default-stack-id"`
	DefaultBuilder string  `toml:"default-builder"`
	// contains filtered or unexported fields
}

func New

func New(path string) (*Config, error)

func NewDefault added in v0.0.5

func NewDefault() (*Config, error)

func (*Config) Add

func (c *Config) Add(stack Stack) error

func (*Config) Delete

func (c *Config) Delete(stackID string) error

func (*Config) Get

func (c *Config) Get(stackID string) (*Stack, error)

func (*Config) Path added in v0.0.5

func (c *Config) Path() string

Path returns the directory path where the config is stored as a toml file. That directory may also contain other `pack` related files.

func (*Config) SetDefaultBuilder added in v0.0.6

func (c *Config) SetDefaultBuilder(builder string) error

func (*Config) SetDefaultStack added in v0.0.5

func (c *Config) SetDefaultStack(stackID string) error

func (*Config) Update

func (c *Config) Update(stackID string, stack Stack) error

type Stack

type Stack struct {
	ID          string   `toml:"id"`
	BuildImages []string `toml:"build-images"`
	RunImages   []string `toml:"run-images"`
}

Jump to

Keyboard shortcuts

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