settings

package
v0.0.0-...-bb4fd4e Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LoadErr  error
	SaveErr  error
	DirName  = ".tiny_fabb"
	FileName = "settings.json"
)
View Source
var CurrentProfile = &Profile{
	Help: Help{
		DataSource:      "location of data folder",
		DocsSource:      "location of documentation file",
		WebPort:         "web server port",
		UDPPort:         "udp port",
		Cameras:         "attached camera addresses",
		ServoController: "servo controller address",
		AssetsPath:      "location of static assets",
		Include:         "device prefixes to include",
		Exclude:         "devices to exclude",
	},
	AssetsPath:      "assets",
	DataSource:      "assets/data/",
	DocsSource:      "assets/data/docs.json",
	WebPort:         ":8080",
	UDPPort:         ":44444",
	Cameras:         []string{""},
	ServoController: "http://192.168.0.44:80/action",
	Include:         []string{"ttyUSB"},
	Exclude:         []string{},
}

Functions

func DefaultProfile

func DefaultProfile() string

Types

type Help

type Help struct {
	AssetsPath      string `json:"assetsPath"`
	DataSource      string `json:"dataSource"`
	DocsSource      string `json:"docsSource"`
	ControllerCount string `json:"controllerCount"`
	WebPort         string `json:"webPort"`
	UDPPort         string `json:"udpPort"`
	Cameras         string `json:"cameras"`
	ServoController string `json:"servoController"`
	Include         string `json:"include"`
	Exclude         string `json:"exclude"`
}

type Profile

type Profile struct {
	Help            Help     `json:"help"`
	AssetsPath      string   `json:"assetsPath"`
	DataSource      string   `json:"dataSource"`
	DocsSource      string   `json:"docsSource"`
	WebPort         string   `json:"webPort"`
	UDPPort         string   `json:"udpPort"`
	Cameras         []string `json:"cameras"`
	ServoController string   `json:"servoController"`
	Include         []string `json:"include"`
	Exclude         []string `json:"exclude"`
}

func (*Profile) Load

func (s *Profile) Load() (err error)

func (*Profile) Print

func (s *Profile) Print() (r []string)

func (*Profile) Save

func (s *Profile) Save() (err error)

func (*Profile) Setup

func (s *Profile) Setup() (controllers []monitor.Controller, ports []string, layout *template.Template, documents docs.Docs, camConn *camera.Connector)

Jump to

Keyboard shortcuts

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