config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	Username, Password string
}

type CORSConfig

type CORSConfig struct {
	AllowCredentials bool
	AllowedHeaders   []string
	AllowedOrigins   []string
	IgnoreOptions    bool
}

func CORSConfigFromMap

func CORSConfigFromMap(m map[interface{}]interface{}) *CORSConfig

func CORSConfigFromViper

func CORSConfigFromViper() *CORSConfig

type Conf

type Conf struct {
	Hostname        string
	Addr            string
	RootDir         string
	HotReload       bool
	ResolverDir     string
	Graphiql        bool
	User            *User
	UID, GID        uint32
	MaxBodyReadSize int64

	CORS      *CORSConfig
	BasicAuth *BasicAuth
	TLS       *TLS
	Context   *Context
	Log       *Log

	Graphs []GraphConf
}
var Config Conf

type Context

type Context struct {
	ExecPath string
	TmpDir   string
	Context  interface{}
}

type GraphConf

type GraphConf struct {
	ServerName   string
	DocumentRoot string
	HotReload    bool

	ResolverDir string
	Graphiql    bool

	User            *User
	MaxBodyReadSize int64

	CORS      *CORSConfig
	BasicAuth *BasicAuth
	Context   *Context
	// contains filtered or unexported fields
}

type Log

type Log struct {
	Path  string
	JSON  bool
	Color bool
	Level zerolog.Level
}

type TLS

type TLS struct {
	CertFile, KeyFile string
}

type User

type User struct {
	Name    string
	HomeDir string
	Uid     uint32
	Gid     uint32
}

Jump to

Keyboard shortcuts

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