config

package
v1.0.4-0...-ab2c781 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagPublic = "public"

	FlagMapToken = "mapbox-token"

	FlagTurnstileSecret = "turnstile-secret"

	FlagStatsInterval    = "stats-interval"
	FlagStatsSource      = "stats-source"
	FlagStatsUserParams  = "stats-user-params"
	FlagStatsLangsParams = "stats-langs-params"
)

Variables

This section is empty.

Functions

func EnvName

func EnvName(name string) string

Types

type Config

type Config struct {
	PublicDir   string
	Map         Map
	Turnstile   Turnstile
	GitHubStats GitHubStats
}

func New

func New() *Config

func (*Config) Load

func (c *Config) Load(cmd *cobra.Command) error

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(cmd *cobra.Command)

type GitHubStats

type GitHubStats struct {
	Interval    time.Duration
	SourceURL   string
	UserParams  map[string]string
	LangsParams map[string]string
}

type Map

type Map struct {
	Token string
	Lat   float64
	Lon   float64
}

type Turnstile

type Turnstile struct {
	Secret string
}

Jump to

Keyboard shortcuts

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