config

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Name    string
	Desc    string
	URL     string
	Author  string
	Version string
}

App holds application details

type Cli added in v1.0.0

type Cli struct {
	Version      kong.VersionFlag
	EditionIDs   []string `` /* 166-byte string literal not displayed */
	LicenseKey   string   `kong:"required,name='license-key',env='LICENSE_KEY',placeholder='0123456789',help='MaxMind License Key'"`
	DownloadPath string   `kong:"name='download-path',env='DOWNLOAD_PATH',placeholder='./',help='Directory where databases will be stored.'"`
	Schedule     string   `kong:"name='schedule',env='SCHEDULE',placeholder='0 0 * * 0',help='CRON expression format.'"`
	LogLevel     string   `kong:"name='log-level',env='LOG_LEVEL',default='info',help='Set log level.'"`
	LogJSON      bool     `kong:"name='log-json',env='LOG_JSON',default='false',help='Enable JSON logging output.'"`
	LogCaller    bool     `kong:"name='log-caller',env='LOG_CALLER',default='false',help='Add file:line of the caller to log output.'"`
}

Cli holds command line args, flags and cmds

type Configuration

type Configuration struct {
	Cli Cli
	App App
}

Configuration holds configuration details

func Load

func Load(cli Cli, version string) (*Configuration, error)

Load returns Configuration struct

Jump to

Keyboard shortcuts

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