utils

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDatabaseURL

func BuildDatabaseURL(driver, dbURL string) string

func CreateContent added in v1.1.1

func CreateContent() string

func GetCurrentPath

func GetCurrentPath() string

func GetFrameworkPath

func GetFrameworkPath() string

func GetMigrationsPath

func GetMigrationsPath() string

func GetMigrationsURL

func GetMigrationsURL(pathM string) string

func LoadDbUrl added in v1.0.8

func LoadDbUrl(cfg *Config)

func LoadModule added in v1.1.1

func LoadModule(modulePath string, cfg *Config)

Types

type Config added in v1.0.8

type Config struct {
	Port               int64
	Host               string
	Env                string
	MetrictPort        int64
	UIDBits            int64
	RequestKey         contextKey
	LogPath            string
	CorsAllowOrigins   string
	CorsAllowMethods   string
	CorsAllowHeaders   string
	Timezone           string
	SupportedLanguages []string
	DBDriver           string
	DBHost             string
	DBPort             int64
	DBUser             string
	DBName             string
	DBPassword         string
	DBUrl              string
	MaxOpenConns       int64
	MaxIdleConns       int64
	ConnMaxLifetime    int64
	ConnMaxIdleTime    int64
	SlowThreshold      int64
	RedisHost          string
	RedisPort          int64
	RedisPassword      string
	RateLimitPeriod    int64
	RateLimitMax       int64
	Others             map[string]string            // cfg.Others["CUSTOM_KEY"] in witches expan
	Modules            map[string]map[string]string // cfg.Modules["book"]["KEY"] in module.env
}

func DefaultConfig added in v1.0.8

func DefaultConfig() *Config

func Load added in v1.1.1

func Load() *Config

func PreloadNotDBURL added in v1.0.8

func PreloadNotDBURL() *Config

Jump to

Keyboard shortcuts

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