config

package
v0.0.0-...-9ff4ced Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 4 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 {
	Station   Station   `json:"station_settings"`
	Location  location  `json:"location_settings"`
	Explorer  explorer  `json:"explorer_settings"`
	Sensor    Sensor    `json:"sensor_settings"`
	Stream    Stream    `json:"stream_settings"`
	NtpClient ntpclient `json:"ntpclient_settings"`
	Database  database  `json:"database_settings"`
	Server    server    `json:"server_settings"`
	Logger    logger    `json:"logger_settings"`
	Services  services  `json:"services_settings"`
}

func (*Config) Read

func (c *Config) Read(path string) error

func (*Config) Validate

func (c *Config) Validate() error

type Sensor

type Sensor struct {
	Frequency   float64 `json:"frequency"`
	Sensitivity float64 `json:"sensitivity"`
	Velocity    bool    `json:"velocity"`
	Vref        float64 `json:"vref"`
	FullScale   float64 `json:"fullscale"`
	Resolution  int     `json:"resolution"`
}

type Station

type Station struct {
	Name    string `json:"name"`
	Owner   string `json:"owner"`
	Region  string `json:"region"`
	Country string `json:"country"`
	City    string `json:"city"`
}

type Stream

type Stream struct {
	Station  string `json:"station" validate:"max=5"`
	Network  string `json:"network" validate:"max=2"`
	Location string `json:"location" validate:"max=2"`
	Channel  string `json:"channel" validate:"max=3"`
}

Jump to

Keyboard shortcuts

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