config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ConfigFile string
	Config     *ConfigStruct
)

Functions

func GetLocalIP

func GetLocalIP() string

Types

type ConfigStruct

type ConfigStruct struct {
	Camera struct {
		DeviceID         int    `json:"deviceID"`
		Name             string `json:"name"`
		Rotate           int    `json:"rotate"`
		FlipHorizontal   bool   `json:"flipHorizontal"`
		FlipVertical     bool   `json:"flipVertical"`
		ShowDateTime     bool   `json:"showDateTime"`
		DateTimePosition string `json:"dateTimePosition"`
	} `json:"camera"`
	Server struct {
		ListenAddress string `json:"listenAddress"`
		ListenPort    int    `json:"listenPort"`
	} `json:"server"`
	API struct {
		APIURL    string `json:"APIURL"`
		CameraURL string `json:"cameraURL"`
	}
}

func LoadConfig

func LoadConfig(file string) (*ConfigStruct, error)

Jump to

Keyboard shortcuts

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