lookup

package
v0.14.17 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCatalogConfig added in v0.13.0

func ParseCatalogConfig(contents []byte) (*model.RancherCompose, error)

func ParseQuestions added in v0.13.0

func ParseQuestions(contents []byte) (map[string]model.Question, error)

Types

type FileEnvLookup added in v0.13.0

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

func NewFileEnvLookup added in v0.13.0

func NewFileEnvLookup(file string, parent config.EnvironmentLookup) (*FileEnvLookup, error)

func (*FileEnvLookup) Lookup added in v0.13.0

func (f *FileEnvLookup) Lookup(key string, config *config.ServiceConfig) []string

func (*FileEnvLookup) Variables added in v0.13.0

func (f *FileEnvLookup) Variables() map[string]string

type FileResourceLookup added in v0.13.0

type FileResourceLookup struct {
}

FileResourceLookup is a "bare" structure that implements the project.ResourceLookup interface

func (*FileResourceLookup) Lookup added in v0.13.0

func (f *FileResourceLookup) Lookup(file, relativeTo string) ([]byte, string, error)

Lookup returns the content and the actual filename of the file that is "built" using the specified file and relativeTo string. file and relativeTo are supposed to be file path. If file starts with a slash ('/'), it tries to load it, otherwise it will build a filename using the folder part of relativeTo joined with file.

func (*FileResourceLookup) ResolvePath added in v0.13.0

func (f *FileResourceLookup) ResolvePath(path, relativeTo string) string

ResolvePath returns the path to be used for the given path volume. This function already takes care of relative paths.

type MapEnvLookup

type MapEnvLookup struct {
	Env map[string]interface{}
}

func (*MapEnvLookup) Lookup

func (m *MapEnvLookup) Lookup(key string, config *config.ServiceConfig) []string

func (*MapEnvLookup) Variables added in v0.13.0

func (m *MapEnvLookup) Variables() map[string]string

type OsEnvLookup added in v0.13.0

type OsEnvLookup struct {
}

OsEnvLookup is a "bare" structure that implements the project.EnvironmentLookup interface

func (*OsEnvLookup) Lookup added in v0.13.0

func (o *OsEnvLookup) Lookup(key string, config *config.ServiceConfig) []string

Lookup creates a string slice of string containing a "docker-friendly" environment string in the form of 'key=value'. It gets environment values using os.Getenv. If the os environment variable does not exists, the slice is empty. serviceName and config are not used at all in this implementation.

func (*OsEnvLookup) Variables added in v0.13.0

func (o *OsEnvLookup) Variables() map[string]string

type QuestionLookup added in v0.13.0

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

func NewQuestionLookup added in v0.13.0

func NewQuestionLookup(file string, parent config.EnvironmentLookup) (*QuestionLookup, error)

func (*QuestionLookup) Lookup added in v0.13.0

func (f *QuestionLookup) Lookup(key string, config *config.ServiceConfig) []string

func (*QuestionLookup) Variables added in v0.13.0

func (f *QuestionLookup) Variables() map[string]string

Jump to

Keyboard shortcuts

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