context

package
v0.0.0-...-09eda65 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context is a struct that holds the context of the application

func New

func New(opts ...Option) (*Context, error)

func (*Context) CertificateStore

func (c *Context) CertificateStore() autocert.DirCache

func (*Context) CloudClient

func (c *Context) CloudClient() (*cloud.Client, error)

func (*Context) CloudCredentials

func (c *Context) CloudCredentials() (id, token string, err error)

func (*Context) Config

func (c *Context) Config() (*config.Config, error)

Config returns the cached nest config or loads it if it hasn't been loaded yet.

func (*Context) ConfigStoreDir

func (c *Context) ConfigStoreDir() string

func (*Context) Err

func (c *Context) Err() io.Writer

func (*Context) Home

func (c *Context) Home() string

func (*Context) In

func (c *Context) In() FileReader

func (*Context) Logger

func (c *Context) Logger() *log.Logger

func (*Context) ManifestManager

func (c *Context) ManifestManager() *deploy.Manager

func (*Context) NewConfig

func (c *Context) NewConfig(provider, repository, branch string) *config.Config

func (*Context) Out

func (c *Context) Out() FileWriter

func (*Context) ProxyLogger

func (c *Context) ProxyLogger() *log.Logger

func (*Context) ServicesConfig

func (c *Context) ServicesConfig() (*config.ServicesConfig, error)

ServicesConfig returns the cached services config or loads it if it hasn't been loaded yet.

func (*Context) SetCloudCredentials

func (c *Context) SetCloudCredentials(id string, token string) error

func (*Context) Subnetter

func (c *Context) Subnetter(CIDRs []string) *docker.Subnetter

func (*Context) UnvalidatedServicesConfig

func (c *Context) UnvalidatedServicesConfig() (*config.ServicesConfig, error)

type FileReader

type FileReader interface {
	io.Reader
	Fd() uintptr
}

FileReader provides a minimal interface for Stdout.

type FileWriter

type FileWriter interface {
	io.Writer
	Fd() uintptr
}

FileWriter provides a minimal interface for Stdin.

type Option

type Option func(*Context) error

func WithConfig

func WithConfig(config *config.Config) Option

func WithConfigHome

func WithConfigHome(home string) Option

func WithDefaultConfigHome

func WithDefaultConfigHome() Option

func WithDefaultInternalLogger

func WithDefaultInternalLogger() Option

func WithDefaultProxyLogger

func WithDefaultProxyLogger() Option

func WithLogger

func WithLogger(logger *log.Logger) Option

func WithServicesConfig

func WithServicesConfig(servicesConfig *config.ServicesConfig) Option

func WithStdio

func WithStdio(stdin FileReader, stdout FileWriter, stderr io.Writer) Option

Jump to

Keyboard shortcuts

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