config

package module
v0.0.0-...-f646e76 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2020 License: MIT Imports: 10 Imported by: 6

README

config

Build Status GoDoc Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load()

Load configuration

func Parse

func Parse(cfg *Prest) (err error)

Parse pREST config

Types

type AccessConf

type AccessConf struct {
	Restrict bool
	Tables   []TablesConf
}

AccessConf informations

type Prest

type Prest struct {
	AuthEnabled      bool
	AuthTable        string
	AuthUsername     string
	AuthPassword     string
	AuthEncrypt      string
	AuthMetadata     []string
	AuthType         string
	HTTPHost         string // HTTPHost Declare which http address the PREST used
	HTTPPort         int    // HTTPPort Declare which http port the PREST used
	PGHost           string
	PGPort           int
	PGUser           string
	PGPass           string
	PGDatabase       string
	PGURL            string
	ContextPath      string
	SSLMode          string
	SSLCert          string
	SSLKey           string
	SSLRootCert      string
	PGMaxIdleConn    int
	PGMAxOpenConn    int
	PGConnTimeout    int
	JWTKey           string
	JWTAlgo          string
	JWTWhiteList     string
	MigrationsPath   string
	QueriesPath      string
	AccessConf       AccessConf
	CORSAllowOrigin  []string
	CORSAllowHeaders []string
	Debug            bool
	Adapter          adapters.Adapter
	EnableDefaultJWT bool
	EnableCache      bool
	HTTPSMode        bool
	HTTPSCert        string
	HTTPSKey         string
}

Prest basic config

var (
	// PrestConf config variable
	PrestConf *Prest
)

type TablesConf

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

TablesConf informations

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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