config

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigService

type ConfigService struct {
	Config         *ConfigV3
	Changed        chan bool
	ConfigFilename string
}

func DefaultConfigService

func DefaultConfigService() *ConfigService

func (*ConfigService) Load

func (c *ConfigService) Load() error

Load will load the configuration from a known-to-exist config file.

func (*ConfigService) LoadOrInit

func (c *ConfigService) LoadOrInit() error

LoadOrInit loads the current configuration from the config file, or creates a new config file if none exists.

func (*ConfigService) Save

func (c *ConfigService) Save() error

type ConfigV1

type ConfigV1 struct {
	WebHookURL  string
	Path        string
	Watch       int
	Username    string
	NoWatermark bool
	Exclude     string
}

Config for the application

type ConfigV2

type ConfigV2 struct {
	WatchInterval int
	Version       int
	Port          int
	Watchers      []Watcher
}

type ConfigV3 added in v0.12.2

type ConfigV3 struct {
	WatchInterval      int
	Version            int
	Port               int
	OpenBrowserOnStart bool
	Watchers           []Watcher
}

func DefaultConfig

func DefaultConfig() *ConfigV3

type Watcher

type Watcher struct {
	WebHookURL  string
	Path        string
	Username    string
	NoWatermark bool
	HoldUploads bool
	Exclude     []string
}

Jump to

Keyboard shortcuts

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