config: github.com/prest/config Index | Files | Directories

package config

import "github.com/prest/config"

Index

Package Files

config.go

func Load Uses

func Load()

Load configuration

func Parse Uses

func Parse(cfg *Prest) (err error)

Parse pREST config

type AccessConf Uses

type AccessConf struct {
    Restrict bool
    Tables   []TablesConf
}

AccessConf informations

type Prest Uses

type Prest struct {
    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
    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 Uses

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

TablesConf informations

Directories

PathSynopsis
router

Package config imports 10 packages (graph) and is imported by 11 packages. Updated 2019-04-23. Refresh now. Tools for package owners.