generation

package
v2.0.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2017 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultFileHelper

type DefaultFileHelper struct{}

DefaultFileHelper using real filesystem

func (DefaultFileHelper) Exists

func (fh DefaultFileHelper) Exists(path string) bool

Exists checks if file at path exists

func (DefaultFileHelper) Write

func (fh DefaultFileHelper) Write(path string, data string) error

type DefaultTemplateLoader

type DefaultTemplateLoader struct{}

func (DefaultTemplateLoader) Load

func (tl DefaultTemplateLoader) Load(path string) (map[string]interface{}, error)

Load loads data from path into dictionary

type FileHelper

type FileHelper interface {
	Exists(path string) bool
	Write(path, data string) error
}

FileHelper interface to provide utility-funcations for common file-operations

type Generator

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

Generator capsulates generation-functionality with its dependencies

func CreateGenerator

func CreateGenerator() Generator

CreateGenerator constructs Generator

func (Generator) Generate

func (g Generator) Generate(scenario string) error

Generate generates docker-compose.yml based on scenario-config

type IPDetector

type IPDetector interface {
	Detect() net.IP
}

IPDetector interface to detect local outbound-ip-address

type TemplateLoader

type TemplateLoader interface {
	Load(path string) (map[string]interface{}, error)
}

TemplateLoader interface to provide data from file at path as dictionary

type UplinkIPDetector

type UplinkIPDetector struct{}

func (UplinkIPDetector) Detect

func (ipd UplinkIPDetector) Detect() net.IP

Detect detects local-outbound ip-address

Jump to

Keyboard shortcuts

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