config

package
v0.0.0-...-c937b9e Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2015 License: MIT Imports: 1 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Name string `desc:"Unique agent name, set to fqdn if empty"`
}

func NewAgent

func NewAgent() *Agent

type Api

type Api struct {
	BindAddr string   `desc:"http address for binding api server"`
	Host     string   `desc:"host for website, required for building urls"`
	Admins   []string `desc:"email list of users with admin permissions"`

	ResetPasswordSecret   string `flag:"-" desc:"secret required for reset token generation"`
	ResetPasswordDuration int    `desc:"lifetime for reset token in seconds"`

	SystemEmail  string `desc:"for sending system emails, like password reseting"`
	ContactEmail string `desc:"for show in templates, like contact with us"`

	Raven  string `desc:"sentry addr for frontend logging"`
	GA     string `desc:"google analytics id"`
	Signup Signup
	Cookie Cookie
}
type Cookie struct {
	Name     string   `desc:"name for secure cookie"`
	KeyPairs []string `desc:"key pairs for cookie"` // read more http://www.gorillatoolkit.org/pkg/securecookie
	Secure   bool     `desc:"set cookie only for https"`
}

type Dispatcher

type Dispatcher struct {
	Debug bool `flag:"-"`

	Frontend Frontend
	Agent    InternalAgent
	Worker   InternalWorker
	Swagger  Swagger
	Mongo    Mongo
	Email    Email
	Api      Api
	//	Log      Log
	Template Template
}

func NewDispatcher

func NewDispatcher() *Dispatcher

type Email

type Email struct {
	Backend string `desc:"one of: [console|smtp]"`
	Smtp    Smtp
}

type Frontend

type Frontend struct {
	Disable bool   `desc:"disable serving frontend files"`
	Path    string `desc:"path to frontend to serve static"`
}

type InternalAgent

type InternalAgent struct {
	Enable bool `desc:"run agent inside the dispatcher" env:"-"`
	Agent
}

type InternalWorker

type InternalWorker struct {
	Enable bool `desc:"run worker inside the dispatcher" env:"-"`
	Worker
}

type Mongo

type Mongo struct {
	// The seed servers must be provided in the following format:
	// [mongodb://][user:pass@]host1[:port1][,host2[:port2],...][/database][?options].
	// Read more: http://docs.mongodb.org/manual/reference/connection-string/
	Addr     string `desc:"[mongodb://][user:pass@]host1[:port1][,host2[:port2],...][/database][?options]"`
	Database string `desc:"database name"`

	// to remove text search index in mongodb, you must do it manually
	TextSearchEnable bool `desc:"enable search with mongo test search index"`
}

type Signup

type Signup struct {
	Disable bool `desc:"disable signup"`
}

type Smtp

type Smtp struct {
	Addr     string `desc:"smtp server addr"`
	Port     int    `desc:"smpt server port"`
	User     string `desc:"username"`
	Password string `desc:"password"`
}

type Swagger

type Swagger struct {
	Enable   bool   `desc:"enable swagger api"`
	Path     string `desc:"path where the swagger UI will be served, e.g. /swagger"`
	ApiPath  string `desc:"path where the JSON api is avaiable , e.g. /apidocs"`
	FilePath string `desc:"path to Swagger index.html"`
}

type Template

type Template struct {
	Path string `desc:"path to template files"`
}

type Worker

type Worker struct {
	Broker          string
	ResultBackend   string
	ResultsExpireIn int
	Exchange        string
	ExchangeType    string
	DefaultQueue    string
	BindingKey      string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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