config

package
v0.0.0-...-c162711 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Env            string // Environment (local, dev, prod).
	Migrations     string // Path to migration files.
	Dsn            string // PostgreSQL Data Source Name for database connection.
	Port           int    // Port for the API server.
	JWTSecret      string // Secret password for creating JWT tokens.
	TelegramSecret string // Secret password for checking verification token
)

Functions

func ParseFlags

func ParseFlags(args []string) error

ParseFlags parses command-line flags and sets the corresponding global configuration variables. It uses the ff package to handle flag parsing and environment variable overrides.

Supported flags include:

  • -p, --port: The port number for the API server (default: 8001).
  • -e, --env: The environment setting (local, dev, prod) (default: local).
  • -m, --migrations: Path to the folder containing database migration files.
  • -s, --secret: The secret password for creating JWT tokens.
  • -t, --telegram: The secret password for checking verification token

Types

This section is empty.

Jump to

Keyboard shortcuts

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