config

package
v0.0.0-...-396d2c0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Types

type Config

type Config struct {
	Cors          CorsConfig
	TaosConfigDir string
	Debug         bool
	Port          int
	LogLevel      string
	SSl           SSl
	Log           Log
	Pool          Pool
}
var (
	Conf *Config
)

type CorsConfig

type CorsConfig struct {
	AllowAllOrigins  bool
	AllowOrigins     []string
	AllowHeaders     []string
	ExposeHeaders    []string
	AllowCredentials bool
	AllowWebSockets  bool
}

func (*CorsConfig) GetConfig

func (conf *CorsConfig) GetConfig() cors.Config

type Log

type Log struct {
	Path          string
	RotationCount uint
	RotationTime  time.Duration
	RotationSize  uint
}

type Pool

type Pool struct {
	MaxConnect  int
	MaxIdle     int
	IdleTimeout time.Duration
}

type SSl

type SSl struct {
	Enable   bool
	CertFile string
	KeyFile  string
}

Jump to

Keyboard shortcuts

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