config

package
v0.0.0-...-b2889d6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CONFIG_PATH = "/etc/xdg/card_reader/config.yml"

Variables

This section is empty.

Functions

func InitConfig

func InitConfig() error

Types

type AppConfig

type AppConfig struct {
	InitLocked bool `envconfig:"HAL_INIT_LOCKED"`

	Network struct {
		Interface string `envconfig:"HAL_NET_INTERFACE"`
		Hostname  string `envconfig:"HAL_API_HOST"`
		Id        string `envconfig:"HAL_SYSTEM_ID"`
	}

	Periph struct {
		Leds struct {
			RedLedName   string `yaml:"red_name" envconfig:"HAL_RED_LED_NAME"`
			GreenLedName string `yaml:"green_name" envconfig:"HAL_GREEN_LED_NAME"`
		}
		Reader struct {
			AntennaStrength int8          `yaml:"strength" envconfig:"HAL_ANTENNA_STRENGTH"`
			ReaderTimeout   time.Duration `yaml:"timeout" envconfig:"HAL_READER_TIMEOUT"`
		}

		Movement struct {
			MoveTimeout time.Duration `yaml:"timeout" envconfig:"HAL_MOVEMENT_TIMEOUT"`
		}
	}
}
var Config AppConfig

Jump to

Keyboard shortcuts

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