config

package
v1.0.57 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DataDir string
)

Functions

func InitConfig

func InitConfig() error

Types

type Config

type Config struct {
	ConfigBaseDir  string
	ConfigFileName string
	ConfigFilePath string
	Loaded         bool
	ConfigData     ConfigData
}

func GetConfig

func GetConfig() *Config

func (*Config) LoadConfigData

func (config *Config) LoadConfigData() error

func (*Config) SaveConfigData

func (config *Config) SaveConfigData() error

func (*Config) SetDefaultValues

func (config *Config) SetDefaultValues()

type ConfigData

type ConfigData struct {
	Version  string `json:"version"`
	HTTPBind string `json:"http_bind"`
	Database struct {
		Host string `json:"host"`
		Port int    `json:"port"`
		DB   string `json:"database"`
		User string `json:"username"`
		Pass string `json:"password"`
	} `json:"db"`
	Storage struct {
		Minio struct {
			Endpoint    string `json:"endpoint"`
			AccessKeyId string `json:"accessKeyId"`
			SecretKey   string `json:"secretKey"`
			UseSSL      bool   `json:"useSSL"`
		} `json:"minio"`
	} `json:"storage"`
	Flags struct {
		DisablePurgeAccountData bool `json:"disablePurgeAccountData"`
		UseMinioStorage         bool `json:"useMinioStorage"`
	}
}

func GetConfigData

func GetConfigData() (*ConfigData, error)

Jump to

Keyboard shortcuts

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