config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 5 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 {
	Debug     DebugConfig     `json:"debug"`
	WsProxy   WsProxyConfig   `json:"wsProxy" validate:"required"`
	Metrics   MetricsConfig   `json:"metrics"`
	Dreamkast DreamkastConfig `json:"dreamkast" validate:"required"`
	Redis     RedisConfig     `json:"redis" validate:"required"`
	Tracks    []TrackConfig   `json:"tracks" validate:"required"`
	Watcher   WatcherConfig   `json:"watcher" validate:"required"`
}

func LoadConf

func LoadConf(filename string) (*Config, error)

type DebugConfig

type DebugConfig struct {
	Development       bool `json:"development" default:"true"`
	Debug             bool `json:"debug"`
	DisableObsWatcher bool `json:"disableObsWatcher"`
	DisableDkWatcher  bool `json:"disableDkWatcher"`
	DisableNotifier   bool `json:"disableNotifier"`
	DisableWsProxy    bool `json:"disableWsProxy"`
}

type DkWatcherConfig

type DkWatcherConfig struct {
	SyncPeriodSeconds                int `json:"syncPeriodSeconds" default:"10"`
	HowManyMinutesBeforeNotification int `json:"howManyMinutesUntilNotify" default:"5"`
}

type DreamkastConfig

type DreamkastConfig struct {
	EventAbbr           string `json:"eventAbbr" validate:"required"`
	EndpointUrl         string `json:"endpointUrl" validate:"required"`
	Auth0Domain         string `json:"auth0Domain"`
	Auth0ClientId       string `json:"auth0ClientId"`
	Auth0ClientSecret   string `json:"auth0ClientSecret"`
	Auth0ClientAudience string `json:"auth0ClientAudience" default:"https://event.cloudnativedays.jp/"`
}

type MetricsConfig

type MetricsConfig struct {
	BindAddr string `json:"bindAddr" default:":20081"`
}

type ObsConfig

type ObsConfig struct {
	Host     string `json:"host" validate:"required"`
	Password string `json:"password"`
}

type ObsWatcherConfig

type ObsWatcherConfig struct {
	SyncPeriodSeconds             int `json:"syncPeriodSeconds" default:"5"`
	StartPreparationPeriodSeconds int `json:"startPreparationPeriodSeconds" default:"30"`
}

type RedisConfig

type RedisConfig struct {
	Host string `json:"host" validate:"required"`
}

type SlackConfig

type SlackConfig struct {
	BotToken  string `json:"botToken" validate:"required"`
	ChannelId string `json:"channelId" validate:"required"`
}

type TrackConfig

type TrackConfig struct {
	DkTrackId int32       `json:"dkTrackId" validate:"required"`
	Obs       ObsConfig   `json:"obs" validate:"required"`
	Slack     SlackConfig `json:"slack" validate:"required"`
}

type WatcherConfig

type WatcherConfig struct {
	ObsWatcher ObsWatcherConfig `json:"obsWatcher"`
	DkWatcher  DkWatcherConfig  `json:"dkWatcher"`
}

type WsProxyConfig

type WsProxyConfig struct {
	BindAddr string `json:"bindAddr" default:":20080"`
}

Jump to

Keyboard shortcuts

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