config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENV_PREFIX                  = "FINALRIP"
	FINALRIP_REMOTE_CONFIG_HOST = "FINALRIP_REMOTE_CONFIG_HOST"
	FINALRIP_REMOTE_CONFIG_KEY  = "FINALRIP_REMOTE_CONFIG_KEY"
	FINALRIP_EASYTIER_HOST      = "FINALRIP_EASYTIER_HOST"
)

Variables

View Source
var (
	ServerConfig Server
	LogConfig    Log
	DBConfig     DB
	RedisConfig  Redis
	OSSConfig    OSS
)

Functions

func Init

func Init()

Types

type DB

type DB struct {
	Type     string `yaml:"type"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	SSL      bool   `yaml:"ssl"`
}

type Log

type Log struct {
	Level string   `yaml:"level"`
	Mode  []string `yaml:"mode"`
}

type OSS

type OSS struct {
	Type              string `yaml:"type"`
	Endpoint          string `yaml:"endpoint"`
	AccessKey         string `yaml:"accessKey"`
	SecretKey         string `yaml:"secretKey"`
	Region            string `yaml:"region"`
	Bucket            string `yaml:"bucket"`
	UseSSL            bool   `yaml:"ssl"`
	HostnameImmutable bool   `yaml:"hostnameImmutable"`
}

type Redis

type Redis struct {
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
	Password string `yaml:"password"`
	PoolSize int    `yaml:"poolSize"`
}

type Server

type Server struct {
	Token string `yaml:"token"`
	Name  string `yaml:"name"`
	Port  int    `yaml:"port"`
	Mode  string `yaml:"mode"`
}

Jump to

Keyboard shortcuts

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