config

package
v0.0.0-...-fecf105 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2014 License: MIT Imports: 6 Imported by: 22

Documentation

Index

Constants

View Source
const RCFILE = ".gobuild.yml"

Variables

View Source
var Config struct {
	Server struct {
		Domain  string `gcfg:"DOMAIN"`
		RootUrl string `gcfg:"ROOTURL"`
		Addr    string `gcfg:"ADDR"`
		Port    int    `gcfg:"PORT"`
	}
	Database struct {
		DbType   string `gcfg:"DBTYPE"`
		Host     string `gcfg:"HOST"`
		Port     string `gcfg:"PORT"`
		Name     string `gcfg:"NAME"`
		User     string `gcfg:"USER"`
		Password string `gcfg:"PASSWD"`
		SslMode  string `gcfg:"SSLMODE"`
	}
	Cdn struct {
		AccessKey string `gcfg:"ACCESSKEY"`
		SecretKey string `gcfg":SECRETKEY"`
		Bulket    string `gcfg:"BULKET"`
	}
	Social map[string]*struct {
		ClientId     string `gcfg:"ID"`
		ClientSecret string `gcfg:"SECRET"`
		AuthURL      string `gcfg:"AUTHURL"`
		TokenURL     string `gcfg:"TOKENURL"`
	}
}

Functions

func Load

func Load(cfgPath string) (err error)

Types

type PackageConfig

type PackageConfig struct {
	Filesets struct {
		Includes []string `yaml:"includes"`
		Excludes []string `yaml:"excludes"`
	} `yaml:"filesets"`
	Settings struct {
		TargetDir string `yaml:"targetdir"` // target dir
		Addopts   string `yaml:"addopts"`   // extra command line options
		CGOEnable *bool  `yaml"cgoenable"`
	} `yaml:"settings"`
}

.gobuild.yml file

var DefaultPcfg *PackageConfig

func ReadPkgConfig

func ReadPkgConfig(filepath string) (pcfg PackageConfig, err error)

parse yaml

Jump to

Keyboard shortcuts

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