pkg

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TellerFileTemplate = `` /* 3019-byte string literal not displayed */

Functions

This section is empty.

Types

type BuiltinProviders

type BuiltinProviders struct {
}

func (*BuiltinProviders) GetProvider

func (p *BuiltinProviders) GetProvider(name string) (core.Provider, error)

func (*BuiltinProviders) ProviderHumanToMachine

func (p *BuiltinProviders) ProviderHumanToMachine() map[string]string

type MappingConfig

type MappingConfig struct {
	EnvMapping *core.KeyPath            `yaml:"env_sync,omitempty"`
	Env        *map[string]core.KeyPath `yaml:"env,omitempty"`
}

type Porcelain

type Porcelain struct {
	Out io.Writer
}

func (*Porcelain) AskForConfirmation

func (p *Porcelain) AskForConfirmation(msg string) bool

func (*Porcelain) DidCreateNewFile

func (p *Porcelain) DidCreateNewFile(fname string)

func (*Porcelain) PrintContext

func (p *Porcelain) PrintContext(projectName, loadedFrom string)

func (*Porcelain) PrintEntries

func (p *Porcelain) PrintEntries(entries []core.EnvEntry)

func (*Porcelain) StartWizard

func (p *Porcelain) StartWizard() (*core.WizardAnswers, error)

func (*Porcelain) VSpace

func (p *Porcelain) VSpace(size int)

type Providers

type Providers interface {
	GetProvider(name string) (core.Provider, error)
	ProviderHumanToMachine() map[string]string
}

type Teller

type Teller struct {
	Cmd        []string
	Config     *TellerFile
	Porcelain  *Porcelain
	Populate   *core.Populate
	Providers  Providers
	Entries    []core.EnvEntry
	Templating *Templating
}

func NewTeller

func NewTeller(tlrfile *TellerFile, cmd []string) *Teller

func (*Teller) Collect

func (tl *Teller) Collect() error

func (*Teller) Exec

func (tl *Teller) Exec()

func (*Teller) ExportDotenv

func (tl *Teller) ExportDotenv() string

func (*Teller) ExportEnv

func (tl *Teller) ExportEnv() string

func (*Teller) PrintEnvKeys

func (tl *Teller) PrintEnvKeys()

func (*Teller) SetupNewProject

func (tl *Teller) SetupNewProject(fname string) error

func (*Teller) TemplateFile

func (tl *Teller) TemplateFile(from, to string) error

type TellerFile

type TellerFile struct {
	Opts       map[string]string        `yaml:"opts,omitempty"`
	Confirm    string                   `yaml:"confirm,omitempty"`
	Project    string                   `yaml:"project,omitempty"`
	CarryEnv   bool                     `yaml:"carry_env,omitempty"`
	Providers  map[string]MappingConfig `yaml:"providers,omitempty"`
	LoadedFrom string
}

func NewTellerFile

func NewTellerFile(s string) (*TellerFile, error)

type Templating

type Templating struct {
}

func (*Templating) ForGlob

func (t *Templating) ForGlob() *Templating

func (*Templating) ForTemplate

func (t *Templating) ForTemplate(tmpl string, entries []core.EnvEntry) (string, error)

func (*Templating) New

func (t *Templating) New() *Templating

Directories

Path Synopsis
mock_providers
Package mock_providers is a generated GoMock package.
Package mock_providers is a generated GoMock package.

Jump to

Keyboard shortcuts

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