config

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 2 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 {
	SwitchBotOpenToken  string   `env:"SWITCHBOT_OPEN_TOKEN" long:"open-token" short:"t" description:"SwitchBot Open Token" required:"true"`
	SwitchBotSecretKey  string   `env:"SWITCHBOT_SECRET_KEY" long:"secret-key" short:"k" description:"SwitchBot Secret Key" required:"true"`
	DeviceIDs           []string `env:"SWITCHBOT_DEVICE_IDS" env-delim:"," long:"device-id" short:"d" description:"Device ID(s) to collect metrics"`
	Prefix              string   `env:"PREFIX" long:"prefix" description:"Metric Key Prefix" default:"switchbot"`
	Tempfile            string   `env:"TEMPFILE" long:"tempfile" description:"Temp Filename"`
	MackerelAPIKey      string   `env:"MACKEREL_API_KEY" long:"mackerel-api-key" description:"Mackerel API Key"`
	MackerelServiceName string   `env:"MACKEREL_SERVICE_NAME" long:"mackerel-service-name" description:"Mackerel Service Name"`
}

func LoadConfig

func LoadConfig() (*Config, error)

Jump to

Keyboard shortcuts

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