config

package
v0.0.0-...-19fc164 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RELEASE        string        `default:"0.0.1"`
	LOG_LEVEL      zerolog.Level `default:"1"`
	IS_DEVELOPMENT bool          `default:"false"`

	DB_DSN             string `required:"True"`
	RUN_IN_TRANSACTION bool   `default:"false"`
	SECRET_KEY         string `required:"True"`
	API_KEY            string

	// Telegram
	TELEGRAM_BOT_API_KEY string `required:"True"`
	TELEGRAM_BOT_CHAT_ID int64  `required:"True"`

	// mailing
	MAILERSEND_API_KEY string `required:"True"`

	// GOOGLE RECAPTCHA
	GOOGLE_RECAPTCHA_SECRET_KEY string `required:"True"`

	// Static assets, it should not be necessary to change these defaults.
	STATIC_DIRECTORY           string `default:"static"`
	TEMPLATES_DIRECTORY        string `default:"templates"`
	HOT_RELOAD_TEMPLATE_FOLDER bool

	FORMS_CONFIG_BASE64    string
	FORMS_CONFIG_FILE_PATH string
	// contains filtered or unexported fields
}

func New

func New() *Config

func (*Config) GenerateOrSetApiKey

func (c *Config) GenerateOrSetApiKey()

TODO: <25-09-25, Sebastiaan Van Hoecke> // These functions should be moved to somewhere else, not be here

func (*Config) VerifyApiKey

func (c *Config) VerifyApiKey(apiKey string) bool

TODO: <25-09-25, Sebastiaan Van Hoecke> // These functions should be moved to somewhere else, not be here

Jump to

Keyboard shortcuts

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