system

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2018 License: Apache-2.0 Imports: 8 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Project  string   `json:"project" default:"hidevopsio"`
	Name     string   `json:"name" default:"hiboot-app"`
	Profiles Profiles `json:"profiles"`
}

type Builder

type Builder struct {
	Path       string
	Name       string
	FileType   string
	Profile    string
	ConfigType interface{}
}

func (*Builder) Build

func (b *Builder) Build(profiles ...string) (interface{}, error)

build config file

func (*Builder) BuildWithProfile added in v0.2.0

func (b *Builder) BuildWithProfile() (interface{}, error)

build config file

func (*Builder) Init

func (b *Builder) Init() error

create file if it's not exist

func (*Builder) New

func (b *Builder) New(name string) *viper.Viper

create new viper instance

func (*Builder) Read

func (b *Builder) Read(name string) (interface{}, error)

Read single file

func (*Builder) Save

func (b *Builder) Save(p interface{}) error

Save configurations to file

type Configuration

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

type Env

type Env struct {
	Name  string
	Value string
}

type InvalidControllerError

type InvalidControllerError struct {
	Name string
}

func (*InvalidControllerError) Error

func (e *InvalidControllerError) Error() string

type Logging

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

type NotFoundError

type NotFoundError struct {
	Name string
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type Profiles

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

type Server

type Server struct {
	Port string `json:"port" default:"8080"`
}

Jump to

Keyboard shortcuts

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