config

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   string
	BuildTime string
	Revision  string
	OS        string
)

Automatically set at build time

Functions

func GetBuildTime added in v1.1.1

func GetBuildTime() string

func GetOS added in v1.1.1

func GetOS() string

func GetRevision added in v1.1.1

func GetRevision() string

func GetVersion added in v1.1.1

func GetVersion() string

Types

type Config

type Config interface {
	// Reload config
	Reload() error
	// Get work day start time
	GetWorkDayStart() time.Time
	// Get work day end time
	GetWorkDayEnd(rest bool) time.Time
	// Get work day duration as duration
	GetWorkDayDuration() time.Duration
	// Get refresh interval
	GetRefreshInterval() time.Duration
	// Get truncate duration
	GetTruncateDuration() time.Duration
}

func NewConfig

func NewConfig(path string) Config

type Duration

type Duration time.Duration

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(value *yaml.Node) error

Jump to

Keyboard shortcuts

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