config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2013 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Presentation         string
	UpdatePath           string
	StandardTimeSettings TimeConfig
	OverrideDays         map[int64]TimeConfig
	OverrideOn           bool
	OverrideOff          bool
	PowerPoint           string
	UpdateURL            string
	UpdateInterval       time.Duration
	Name                 string
	CentralPath          string
	Weekends             bool
	BroadcastDir         string
	*logging.Logger
}

The real configuration struct.

func ColdStart

func ColdStart(path string) (conf *Config, err error)

func Get

func Get(path string) (conf *Config, err error)

func (Config) Broadcast

func (c Config) Broadcast() bool

Returns whether there should be broadcast at the current time.

func (Config) BroadcastingTime

func (c Config) BroadcastingTime(t time.Time) bool

Tests if according to the config there should be a broadcast on specified time.

func (Config) IsOverridenDay

func (c Config) IsOverridenDay(t time.Time) bool

Tests if submitted time is during an overriden day.

type TimeConfig

type TimeConfig struct {
	TurnOn  time.Time
	TurnOff time.Time
}

Struct representing time when the TV should be running.

func (TimeConfig) IsBroadcastingTime

func (tc TimeConfig) IsBroadcastingTime(t time.Time) bool

Tests if it should broadcast on time with timeconfig.

Jump to

Keyboard shortcuts

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