config

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfig

func NewConfig()

Types

type Conf

type Conf struct {
	Debug               bool `json:"debug"`
	LiveCheckInterval   int  `json:"live_check_interval_seconds"`
	VideoCheckInterval  int  `json:"video_check_interval_minutes"`
	ActiveQueueItems    int  `json:"active_queue_items"`
	OAuthEnabled        bool `json:"oauth_enabled"`
	RegistrationEnabled bool `json:"registration_enabled"`
	DBSeeded            bool `json:"db_seeded"`
	Parameters          struct {
		TwitchToken    string `json:"twitch_token"`
		VideoConvert   string `json:"video_convert"`
		ChatRender     string `json:"chat_render"`
		StreamlinkLive string `json:"streamlink_live"`
	} `json:"parameters"`
	Archive struct {
		SaveAsHls bool `json:"save_as_hls"`
	} `json:"archive"`
	Notifications    Notification    `json:"notifications"`
	StorageTemplates StorageTemplate `json:"storage_templates"`
	Livestream       struct {
		Proxies         []ProxyListItem `json:"proxies"`
		ProxyEnabled    bool            `json:"proxy_enabled"`
		ProxyParameters string          `json:"proxy_parameters"`
		ProxyWhitelist  []string        `json:"proxy_whitelist"`
	} `json:"livestream"`
}

type Notification added in v1.1.1

type Notification struct {
	VideoSuccessWebhookUrl string `json:"video_success_webhook_url"`
	VideoSuccessTemplate   string `json:"video_success_template"`
	VideoSuccessEnabled    bool   `json:"video_success_enabled"`
	LiveSuccessWebhookUrl  string `json:"live_success_webhook_url"`
	LiveSuccessTemplate    string `json:"live_success_template"`
	LiveSuccessEnabled     bool   `json:"live_success_enabled"`
	ErrorWebhookUrl        string `json:"error_webhook_url"`
	ErrorTemplate          string `json:"error_template"`
	ErrorEnabled           bool   `json:"error_enabled"`
	IsLiveWebhookUrl       string `json:"is_live_webhook_url"`
	IsLiveTemplate         string `json:"is_live_template"`
	IsLiveEnabled          bool   `json:"is_live_enabled"`
}

type ProxyListItem added in v1.4.0

type ProxyListItem struct {
	URL    string `json:"url"`
	Header string `json:"header"`
}

type Service

type Service struct {
	Store *database.Database
}

func NewService

func NewService(store *database.Database) *Service

func (*Service) GetConfig

func (s *Service) GetConfig(c echo.Context) (*Conf, error)

func (*Service) GetNotificationConfig added in v1.1.1

func (s *Service) GetNotificationConfig(c echo.Context) (*Notification, error)

func (*Service) GetStorageTemplateConfig added in v1.1.7

func (s *Service) GetStorageTemplateConfig(c echo.Context) (*StorageTemplate, error)

func (*Service) UpdateConfig

func (s *Service) UpdateConfig(c echo.Context, cDto *Conf) error

func (*Service) UpdateNotificationConfig added in v1.1.1

func (s *Service) UpdateNotificationConfig(c echo.Context, nDto *Notification) error

func (*Service) UpdateStorageTemplateConfig added in v1.1.7

func (s *Service) UpdateStorageTemplateConfig(c echo.Context, stDto *StorageTemplate) error

type StorageTemplate added in v1.1.7

type StorageTemplate struct {
	FolderTemplate string `json:"folder_template"`
	FileTemplate   string `json:"file_template"`
}

Jump to

Keyboard shortcuts

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