config

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(filename string)

func Write

func Write(filename string, cfg Config) error

Types

type APPConfig added in v1.4.3

type APPConfig struct {
	DeployLimit     int32         `toml:"deployLimit"`
	ShutdownTimeout time.Duration `toml:"shutdownTimeout"`
	RepositoryPath  string        `toml:"repositoryPath"`
}

type Config

type Config struct {
	Env    string       `toml:"env"`
	APP    APPConfig    `toml:"app"`
	Cookie CookieConfig `toml:"cookie"`
	JWT    JWTConfig    `toml:"jwt"`
	DB     DBConfig     `toml:"db"`
	Log    LogConfig    `toml:"log"`
	Web    WebConfig    `toml:"web"`
	LDAP   LDAPConfig   `toml:"ldap"`
}
var Toml Config

type CookieConfig

type CookieConfig struct {
	Name   string `toml:"name"`
	Expire int    `toml:"expire"` // second
}

type DBConfig

type DBConfig struct {
	Type     string `toml:"type"`
	User     string `toml:"user"`
	Password string `toml:"password"`
	Host     string `toml:"host"`
	Port     string `toml:"port"`
	Database string `toml:"database"`
}

type JWTConfig

type JWTConfig struct {
	Key string `toml:"key"`
}

type LDAPConfig

type LDAPConfig struct {
	Enabled    bool   `toml:"enabled"`
	URL        string `toml:"url"`
	BindDN     string `toml:"bindDN"`
	Password   string `toml:"password"`
	BaseDN     string `toml:"baseDN"`
	UID        string `toml:"uid"`
	UserFilter string `toml:"userFilter"`
}

type LogConfig

type LogConfig struct {
	Path  string `toml:"path"`
	Split bool   `toml:"split"`
}

type WebConfig

type WebConfig struct {
	Port string `toml:"port"`
}

Jump to

Keyboard shortcuts

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