config

package
v0.0.0-...-871cb95 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConf

func InitConf()

func Parse

func Parse(cfg *Prest) (err error)

Parse pREST config

Types

type AccessConf

type AccessConf struct {
	Restrict bool
	Tables   []TablesConf
}

type Prest

type Prest struct {
	// HTTPPort Declare which http port the PREST used
	HTTPPort       int
	PGHost         string
	PGPort         int
	PGUser         string
	PGPass         string
	PGDatabase     string
	PGMaxIdleConn  int
	PGMAxOpenConn  int
	JWTKey         string
	MigrationsPath string
	QueriesPath    string
	AccessConf     AccessConf
}

Prest basic config

var PREST_CONF *Prest

type TablesConf

type TablesConf struct {
	Name        string   `mapstructure:"name"`
	Permissions []string `mapstructure:"permissions"`
	Fields      []string `mapstructure:"fields"`
}

Jump to

Keyboard shortcuts

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