config

package
v0.0.0-...-f1366d8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInterfaceIP       = "0.0.0.0"
	DefaultInterfaceDevice   = ""
	DefaultPort              = "8888"
	DefaultDocRoot           = "./static"
	DefaultIndexTemplate     = "index.html"
	DefaultFactoryReset      = false
	DefaultSnapControl       = false
	DefaultUseNetworkManager = false
)

Default settings

Variables

This section is empty.

Functions

func GetPath

func GetPath(filename string) string

GetPath returns the full path to the data file

func StoreParameters

func StoreParameters(c *Settings) error

StoreParameters stores the configuration parameters on the filesystem

Types

type Custom

type Custom struct {
	Title    string `yaml:"title" json:"title"`
	SubTitle string `yaml:"subtitle" json:"subtitle"`

	Copyright string `yaml:"copyright" json:"copyright"`
	Bullets   []struct {
		Text string `yaml:"text" json:"text"`
		URL  string `yaml:"url" json:"url"`
	} `yaml:"bullets" json:"bullets"`
}

Custom holds the custom settings from the content interface

type Settings

type Settings struct {
	HideInterfaces         []string
	NetworkInterfaceDevice string
	NetworkInterfaceIP     string
	Port                   string
	DocRoot                string
	IndexTemplate          string
	FactoryReset           bool
	SnapControl            bool
	UseNetworkManager      bool
	Custom                 Custom
}

Settings defines the application configuration

func DefaultArgs

func DefaultArgs() *Settings

DefaultArgs checks the environment variables

func ReadParameters

func ReadParameters() *Settings

ReadParameters fetches the store config parameters

Jump to

Keyboard shortcuts

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