appinit

package
v0.0.0-...-218c583 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateManifest

func GenerateManifest(pf Procfile, af Appfile, r Release) manifest.Manifest

GenerateManifest generates a Manifest from the union of a Procfile, Appfile and Release data

func ParseAddons

func ParseAddons(addons []string, m *manifest.Manifest)

ParseAddons iterates through an apps addons and edits the manifest accordingly

Types

type AddonHandler

type AddonHandler func(m *manifest.Manifest)

AddonHandler is a func type to handle addons

type AppFramework

type AppFramework interface {
	GenerateDockerfile() ([]byte, error)
	GenerateDockerIgnore() ([]byte, error)
	GenerateLocalEnv() ([]byte, error)
	GenerateGitIgnore() ([]byte, error)
	GenerateManifest() ([]byte, error)
	Setup(string) error
}

type Appfile

type Appfile struct {
	Addons []string
	Env    map[string]EnvEntry
}

Appfile represent specific fields of an app.json file

func ReadAppfile

func ReadAppfile(path string) (Appfile, error)

ReadAppfile reads a file and returns an Appfile

func ReadAppfileData

func ReadAppfileData(data []byte) (Appfile, error)

ReadAppfileData reads data that follows the app.json manifest format

type Boilerplate

type Boilerplate struct{}

Boilerplate contains data representing a generic app

func (*Boilerplate) GenerateDockerIgnore

func (bp *Boilerplate) GenerateDockerIgnore() ([]byte, error)

GenerateDockerIgnore generates a .dockerignore file

func (*Boilerplate) GenerateDockerfile

func (bp *Boilerplate) GenerateDockerfile() ([]byte, error)

GenerateDockerfile generates a Dockerfile

func (*Boilerplate) GenerateGitIgnore

func (bp *Boilerplate) GenerateGitIgnore() ([]byte, error)

GenerateGitIgnore generates a .gitignore file

func (*Boilerplate) GenerateLocalEnv

func (bp *Boilerplate) GenerateLocalEnv() ([]byte, error)

GenerateLocalEnv generates a .env file

func (*Boilerplate) GenerateManifest

func (bp *Boilerplate) GenerateManifest() ([]byte, error)

GenerateManifest generates a docker-compose.yml file

func (*Boilerplate) Setup

func (bp *Boilerplate) Setup(dir string) error

Setup runs the buildpacks and collects metadata Must be called before other Generate* methods

type EnvEntry

type EnvEntry struct {
	Value string
}

EnvEntry is an environment entry from an app.json file

type Procfile

type Procfile []ProcfileEntry

Procfile represents a Procfile used in Heroku-based apps

func ReadProcfile

func ReadProcfile(path string) (Procfile, error)

ReadProcfile reads a file and returns an Procfile

func ReadProcfileData

func ReadProcfileData(data []byte) Procfile

ReadProcfileData reads data that follows the Procfile format

type ProcfileEntry

type ProcfileEntry struct {
	Name    string
	Command string
}

ProcfileEntry is an entry in a Procfile

type Release

type Release struct {
	Addons       []string
	ConfigVars   map[string]string `yaml:"config_vars"`
	ProcessTypes map[string]string `yaml:"default_process_types"`
}

Release is type representing output buildback release script

type RubyApp

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

RubyApp contains data representing a ruby app

func (*RubyApp) GenerateDockerIgnore

func (ra *RubyApp) GenerateDockerIgnore() ([]byte, error)

GenerateDockerIgnore generates a .dockerignore file

func (*RubyApp) GenerateDockerfile

func (ra *RubyApp) GenerateDockerfile() ([]byte, error)

GenerateDockerfile generates a Dockerfile specifically for ruby

func (*RubyApp) GenerateGitIgnore

func (ra *RubyApp) GenerateGitIgnore() ([]byte, error)

GenerateGitIgnore generates a .gitignore file

func (*RubyApp) GenerateLocalEnv

func (ra *RubyApp) GenerateLocalEnv() ([]byte, error)

GenerateLocalEnv generates a .env file

func (*RubyApp) GenerateManifest

func (ra *RubyApp) GenerateManifest() ([]byte, error)

GenerateManifest generates a docker-compose.yml file

func (*RubyApp) Setup

func (ra *RubyApp) Setup(dir string) error

Setup runs the buildpacks and collects metadata Must be called before other Generate* methods

type SimpleApp

type SimpleApp struct {
	Kind string
	// contains filtered or unexported fields
}

SimpleApp contains data representing a generic app

func (*SimpleApp) GenerateDockerIgnore

func (sa *SimpleApp) GenerateDockerIgnore() ([]byte, error)

GenerateDockerIgnore generates a .dockerignore file

func (*SimpleApp) GenerateDockerfile

func (sa *SimpleApp) GenerateDockerfile() ([]byte, error)

GenerateDockerfile generates a Dockerfile

func (*SimpleApp) GenerateGitIgnore

func (sa *SimpleApp) GenerateGitIgnore() ([]byte, error)

GenerateGitIgnore generates a .gitignore file

func (*SimpleApp) GenerateLocalEnv

func (sa *SimpleApp) GenerateLocalEnv() ([]byte, error)

GenerateLocalEnv generates a .env file

func (*SimpleApp) GenerateManifest

func (sa *SimpleApp) GenerateManifest() ([]byte, error)

GenerateManifest generates a docker-compose.yml file

func (*SimpleApp) Setup

func (sa *SimpleApp) Setup(dir string) error

Setup runs the buildpacks and collects metadata Must be called before other Generate* methods

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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