config

package
v0.0.0-...-5837768 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides global configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug bool
	DDS   DDSConfig  `yaml:"dds"`
	Mux   mux.Config `yaml:"mux"`
}

Config combines different device configs into a single type.

func (*Config) Ensure

func (c *Config) Ensure()

Ensure ensures configurations consistency.

In particular we just pass on the top level debug flag into the nested configs.

func (*Config) ReadFromBox

func (c *Config) ReadFromBox(filename string) error

ReadFromBox reads a configuration from a box container.

At this point we only support YAML formatted files.

func (*Config) ReadFromFile

func (c *Config) ReadFromFile(filename string) error

ReadFromFile reads a configuration from file.

At this point we only support YAML formatted files.

type DDSConfig

type DDSConfig struct {
	dds.Config `yaml:",inline"`
	SPI        SPIConfig  `yaml:"spi"`
	GPIO       GPIOConfig `yaml:"gpio"`
}

type GPIOConfig

type GPIOConfig struct {
	Reset  string `yaml:"reset"`
	Update string `yaml:"update"`
}

type SPIConfig

type SPIConfig struct {
	Device string `yaml:"device"`
}

Jump to

Keyboard shortcuts

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