configs

package
v0.0.0-...-99ae320 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2015 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

This is the top level configuration loading for Server Config, Site Aliases, and Site Configurations.

Index

Constants

This section is empty.

Variables

View Source
var ServerConfigDirectory string

Functions

func NewSiteFiles

func NewSiteFiles() []string

The builder for site files

Types

type Aliases

type Aliases map[string]string

Simple map for the aliases

func NewAliases

func NewAliases(sm SitesMap) Aliases

Builder function takes a SiteMap and returns the Aliases Map

type Configs

type Configs struct {
	SitesMap SitesMap
	Aliases  Aliases
}

Wrapper structure for SitesMap and Aliases

func New

func New() (*Configs, string)

Bootstrap all configurations

type Server

type Server struct {
	Port           string
	SitesDirectory string
	LogDirectory   string
}

Server Config, Includes some base configurations for the Server

Port: Which port should be served
SitesDirectory: Where the individual sites folder is located
Log Directory: The directory where logs are stored
var ServerConfig *Server

Where the server configuration directory is set

func NewServer

func NewServer() *Server

Constructor for server config

type SiteConfig

type SiteConfig struct {
	MongoDb            map[string]string
	Directory          string
	Aliases            []string
	SessionExpiration  time.Duration
	TemplateEndpoint   string
	ForeignDomains     []string
	AngularModules     []string
	PublicValues       map[string]string
	FourOFour          string
	APIEndPoint        string
	Controllers        []string
	ElementControllers []string
	Logger             *logrus.Logger
	DbSession          *mgo.Session
	RawConfig          *viper.Viper
}

func NewSiteConfig

func NewSiteConfig(f string) *SiteConfig

Constructor for SiteConfig, takes config filename as an argument.

type SitesMap

type SitesMap map[string]*SiteConfig

The definision of the sitemap

func NewSitesMap

func NewSitesMap() SitesMap

Constructor that builds the sitemap.

Jump to

Keyboard shortcuts

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