config

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigPath string

Functions

func LoadConfig

func LoadConfig() error

func WatchConfig

func WatchConfig(configPath string)

Types

type ConfigStruct

type ConfigStruct struct {
	Untis struct {
		TodayURL    string
		TomorrowURL string
	}
	Advertisement struct {
		Path                     string
		SwitchingTime            uint
		RefetchTime              uint
		ReloadIframeOnSizeChange bool
		FixedHight               bool
		Fullscreen               bool
	}
	ScrollText struct {
		Path        string
		Texts       []string
		RefetchTime uint
	}
	WebServer struct {
		ServerAddress string
	}
}
var Config ConfigStruct = ConfigStruct{
	Untis: struct {
		TodayURL    string
		TomorrowURL string
	}{
		TodayURL:    "https://example.com/today",
		TomorrowURL: "https://example.com/tomorrow",
	},
	Advertisement: struct {
		Path                     string
		SwitchingTime            uint
		RefetchTime              uint
		ReloadIframeOnSizeChange bool
		FixedHight               bool
		Fullscreen               bool
	}{
		Path:                     "",
		SwitchingTime:            10,
		RefetchTime:              60,
		ReloadIframeOnSizeChange: false,
		FixedHight:               false,
		Fullscreen:               false,
	},
	ScrollText: struct {
		Path        string
		Texts       []string
		RefetchTime uint
	}{
		Path:        "",
		Texts:       []string{"Hello", "World"},
		RefetchTime: 60,
	},
	WebServer: struct {
		ServerAddress string
	}{
		ServerAddress: ":8080",
	},
}

Jump to

Keyboard shortcuts

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