config

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package config stores config type.

Index

Constants

View Source
const CoreConfigKey = "core_config"

Variables

View Source
var DefaultConfig = Config{
	PortalUsername: "olive",
	PortalPassword: "olive",

	LogDir:                   "",
	SaveDir:                  "",
	OutTmpl:                  `[{{ .StreamerName }}][{{ .RoomName }}][{{ now | date "2006-01-02 15-04-05"}}].flv`,
	LogLevel:                 5,
	SnapRestSeconds:          15,
	SplitRestSeconds:         60,
	CommanderPoolSize:        1,
	ParserMonitorRestSeconds: 300,

	DouyinCookie:   "default:__ac_nonce=06245c89100e7ab2dd536; __ac_signature=_02B4Z6wo00f01LjBMSAAAIDBwA.aJ.c4z1C44TWAAEx696;",
	KuaishouCookie: "did=web_d86297aa2f579589b8abc2594b0ea985",
}

Functions

This section is empty.

Types

type Bout

type Bout interface {
	IsConfigValid() bool
	// show settings
	GetID() ID
	GetPlatform() string
	GetRoomID() string
	GetStreamerName() string
	GetOutFilename() string
	GetOutTmpl() string
	GetSaveDir() string
	GetParser() string
	GetPostCmds() []*exec.Cmd
	SatisfySplitRule(time.Time, string) bool

	// show events
	AddMonitor() error
	RemoveMonitor() error
	AddRecorder() error
	RemoveRecorder() error
	RestartRecorder()

	// tv
	Snap() error
	StreamURL() (string, bool)
	RoomName() (string, bool)
	StreamerName() (string, bool)
	SiteName() string
}

type Config

type Config struct {
	// portal
	PortalUsername string
	PortalPassword string

	// core
	LogDir                   string
	SaveDir                  string
	OutTmpl                  string
	LogLevel                 uint32
	SnapRestSeconds          uint
	SplitRestSeconds         uint
	CommanderPoolSize        uint
	ParserMonitorRestSeconds uint

	// tv
	DouyinCookie   string
	KuaishouCookie string

	// biliup
	BiliupEnable      bool
	CookieFilepath    string
	Threads           int64
	MaxBytesPerSecond float64
}

func (*Config) CheckAndFix

func (cfg *Config) CheckAndFix()

type ID

type ID string

Jump to

Keyboard shortcuts

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