config

package
v0.0.0-...-b79f7e2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigArray

func GetConfigArray(key string) []string

func GetConfigInt

func GetConfigInt(key string) int

func GetConfigStr

func GetConfigStr(key string) string

func InitConfig

func InitConfig(location string) error

Types

type Config

type Config struct {
	HTTP struct {
		Listen           string   `yaml:"listen"`
		TimeoutMin       int      `yaml:"timeout_min"`
		BodyLimit        string   `yaml:"body_limit"`
		CorsAllowOrigins []string `yaml:"cors_allow_origins"`
		Key              string   `yaml:"key"`
		Cert             string   `yaml:"cert"`
		UI
	} `yaml:"http"`
	DB struct {
		EncryptKey      string    `yaml:"encrypt_key"`
		AuthHeader      string    `yaml:"auth_header"`
		ResponseHeaders []Headers `yaml:"response_headers"`
		Path            string    `yaml:"path"`
	} `yaml:"db"`
}

type Headers

type Headers struct {
	Header string `yaml:"header"`
	Value  string `yaml:"value"`
}

func GetConfigResponseHeaders

func GetConfigResponseHeaders() []Headers

type UI

type UI struct {
	UploadDir string `yaml:"upload_dir"`
	BasicAuth string `yaml:"basic_auth"`
}

func GetConfigUI

func GetConfigUI() UI

Jump to

Keyboard shortcuts

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