starter

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	System = "system"
)

Variables

View Source
var (
	InstanceNameIsTakenError = errors.New("[factory] instance name is already taken")
)

Functions

func Add

func Add(params ...interface{})

func AddConfig added in v0.3.0

func AddConfig(params ...interface{})

func AddPostConfig added in v0.4.0

func AddPostConfig(params ...interface{})

func AddPreConfig added in v0.4.0

func AddPreConfig(params ...interface{})

Types

type App

type App struct {
	Project  string   `json:"project"`
	Name     string   `json:"name"`
	Profiles Profiles `json:"profiles"`
}

type Env

type Env struct {
	Name  string
	Value string
}

type Factory added in v0.3.0

type Factory interface {
	Build(configs ...interface{})
	Instantiate(configuration interface{})
	Configurations() cmap.ConcurrentMap
	Configuration(name string) interface{}
	Instances() cmap.ConcurrentMap
	Instance(name string) interface{}
	AddInstance(name string, instance interface{}) error
}

func GetFactory added in v0.3.0

func GetFactory() Factory

type Logging

type Logging struct {
	Level string `json:"level"`
}

type Profiles

type Profiles struct {
	Include []string `json:"include"`
	Active  string   `json:"active" value:"${APP_PROFILES_ACTIVE:dev}"`
}

type Properties added in v0.3.0

type Properties struct {
	Enabled   bool   `json:"enabled"`
	DependsOn string `json:"depends_on"`
	Before    string `json:"before"`
	After     string `json:"after"`
}

type Server

type Server struct {
	Port int32 `json:"port"`
}

type SystemConfiguration

type SystemConfiguration struct {
	App     App     `mapstructure:"app"`
	Server  Server  `mapstructure:"server"`
	Logging Logging `mapstructure:"logging"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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