config

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package config for configuration management

Index

Constants

View Source
const (
	ConfigPath    string = "config.yml" // Path to configuration file
	DefaultLimit  int    = 100          // Default maximum number of flags to retrieve in the view
	DefaultOffset int    = 0            // Default offset for pagination
)

Variables

View Source
var (
	Debug      bool                                                                 // Global debug flag
	ConfigFile bool                                                                 // Use configuration file instead of web config
	Password   string                                                               // Password for authentication
	ServerPort string                                                               // Port for server
	Secret     = make([]byte, 32)                                                   // JWT secret key
	Submit     func(string, string, []string) ([]protocols.ResponseProtocol, error) // Function to submit data
	Cache      = true                                                               // Cache static file like css/js/image (If cache is enable more ram is used [default:true])
)
View Source
var SharedConfig models.ConfigShared // Initialize the config struct

Functions

func GetEnv

func GetEnv(key, defaultValue string) string

func GetEnvAsInt

func GetEnvAsInt(key string, defaultValue int) int

func GetExecutableDir

func GetExecutableDir() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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