def

package
v0.0.0-...-f9573de Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultNames = []string{
	"service.yml", "service.json", ".service.yml", ".service.json",
	"svc.yml", "svc.json", ".svc.yml", ".svc.json",
}

DefaultNames is a list of default service.yml filenames

Functions

func ResolveSource

func ResolveSource(source string) (name string, b []byte, err error)

ResolveSource loads a source path

Types

type Config

type Config struct {
	Desc string `yaml:"desc"`
	Env  string `yaml:"env"`
	Flag string `yaml:"flag"`
	Type string `yaml:"type"`
}

Config ...

type Dep

type Dep struct {
	Source  string `yaml:"source"`
	Version string `yaml:"version"`
}

Dep ...

type Service

type Service struct {
	Name    string `yaml:"name"`
	Source  string `yaml:"source"`
	Version string `yaml:"version"`

	Targets map[string]string `yaml:"targets"`
	Tags    []string          `yaml:"tags"`

	Config []Config `yaml:"config"`
	Deps   []Dep    `yaml:"deps"`
}

Service ...

func Load

func Load(filename string) (svc Service, err error)

Load loads the service definition file

func LoadBytes

func LoadBytes(filename string, b []byte) (svc Service, err error)

LoadBytes loads the service definition bytes

func LoadOne

func LoadOne(filenames ...string) (svc Service, err error)

LoadOne ...

func MustLoad

func MustLoad(filename string) Service

MustLoad loads the service definition file, but panics on error

func MustLoadOne

func MustLoadOne(filenames ...string) Service

MustLoadOne ...

func (Service) Resolve

func (s Service) Resolve() (res *ServiceWithResolvedDeps, err error)

Resolve resolves service dependencies

type ServiceWithResolvedDeps

type ServiceWithResolvedDeps struct {
	Service
	Deps []ServiceWithResolvedDeps `yaml:"-"`
}

ServiceWithResolvedDeps ...

Jump to

Keyboard shortcuts

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