config

package
v0.0.0-...-407183c Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: CC0-1.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CustomConfigKeyAfterStreamStart = "after_start_stream"
View Source
const CustomConfigKeyAfterStreamStop = "after_stop_stream"
View Source
const CustomConfigKeyBeforeStreamStart = "before_start_stream"
View Source
const CustomConfigKeyBeforeStreamStop = "before_stop_stream"

Variables

This section is empty.

Functions

func ReadConfigFromPath

func ReadConfigFromPath[CFG Config](
	cfgPath string,
	cfg *Config,
) error

func WriteConfigToPath

func WriteConfigToPath(
	ctx context.Context,
	cfgPath string,
	cfg Config,
) error

Types

type BrowserConfig

type BrowserConfig struct {
	Command string `yaml:"command"`
}

type ChatConfig

type ChatConfig struct {
	CommandOnReceiveMessage        string `yaml:"command_on_receive_message,omitempty"`
	EnableNotifications            *bool  `yaml:"enable_notifications,omitempty"`
	EnableReceiveMessageSoundAlarm *bool  `yaml:"enable_receive_message_sound_alarm,omitempty"`
}

func (ChatConfig) NotificationsEnabled

func (cfg ChatConfig) NotificationsEnabled() bool

func (ChatConfig) ReceiveMessageSoundAlarmEnabled

func (cfg ChatConfig) ReceiveMessageSoundAlarmEnabled() bool

type Config

type Config struct {
	RemoteStreamDAddr string           `yaml:"streamd_remote"`
	BuiltinStreamD    streamd.Config   `yaml:"streamd_builtin"`
	Screenshot        ScreenshotConfig `yaml:"screenshot"`
	Browser           BrowserConfig    `yaml:"browser"`
	OAuth             OAuthConfig      `yaml:"oauth"`
	Chat              ChatConfig       `yaml:"chat"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Read

func (cfg *Config) Read(
	b []byte,
) (int, error)

func (*Config) ReadFrom

func (cfg *Config) ReadFrom(
	r io.Reader,
) (int64, error)

func (Config) Write

func (cfg Config) Write(b []byte) (int, error)

func (Config) WriteTo

func (cfg Config) WriteTo(
	w io.Writer,
) (int64, error)

type OAuthConfig

type OAuthConfig struct {
	ListenPorts struct {
		Twitch  uint16 `yaml:"twitch"`
		YouTube uint16 `yaml:"youtube"`
	} `yaml:"listen_ports"`
}

type ScreenshotConfig

type ScreenshotConfig struct {
	Enabled           *bool `yaml:"enabled"`
	screenshot.Config `yaml:"screenshot,inline"`
}

Jump to

Keyboard shortcuts

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