config

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package config is a service for handling configuration items.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandlerOptions

func HandlerOptions(id string) map[string]string

HandlerOptions retrieves the map of options for a given Handler Id.

Types

type Beacon

type Beacon struct {
	Enabled  bool
	Call     string `yaml:"call-sign"`
	Interval time.Duration
	Comment  string
}

Beacon represents the periodic beacon packet config.

type Config

type Config struct {
	Rtl      Rtl
	Multimon Multimon
	Beacon   Beacon
	Handlers []Handler
}

Config represents the full, unmarshalled YAML config.

func Load

func Load() *Config

Load unmarshals and caches the YAML config.

type Handler

type Handler struct {
	ID      string
	Name    string
	Options map[string]string
}

Handler represents an individual handler's config.

type Multimon

type Multimon struct {
	Path            string
	AdditionalFlags string `yaml:"additional-flags"`
}

Multimon represents the multimon-ng config.

type Rtl

type Rtl struct {
	Path            string
	Frequency       string
	Gain            string
	PpmError        string `yaml:"ppm-error"`
	SquelchLevel    string `yaml:"squelch-level"`
	SampleRate      string `yaml:"sample-rate"`
	AdditionalFlags string `yaml:"additional-flags"`
}

Rtl represents the RTL-SDR config.

Jump to

Keyboard shortcuts

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