config

package
Version: v0.0.0-...-a7a9960 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2015 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(path string) error

Types

type Config

type Config struct {
	Home string

	Server struct {
		IP   string
		Port int
		TLS  struct {
			PrivKey string
			Cert    string
		}
	}

	Database struct {
		Host     string
		Port     int
		User     string
		Password string
		Name     string
	}

	Log struct {
		Host string
		Port int
	}

	Paths struct {
		ProtocolTranslations string
		WebTranslations      string
		HTMLTemplates        string
		WebAssets            string
	}

	URLs      URLs
	Files     map[string][]string
	Languages []string

	Session struct {
		Secret  string
		Timeout Duration
	}

	ClassValue float64
}
var (
	DrunsConfig Config
)

func (Config) HTMLTemplates

func (c Config) HTMLTemplates(language, handlerName string) []string

func (Config) TLS

func (c Config) TLS() (string, string)

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) MarshalJSON

func (d *Duration) MarshalJSON() ([]byte, error)

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(data []byte) error

type URLs

type URLs map[string]string

func (URLs) GetHTTP

func (u URLs) GetHTTP(name string, params ...string) string

func (URLs) GetHTTPS

func (u URLs) GetHTTPS(name string, params ...string) string

Source Files

Jump to

Keyboard shortcuts

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