summaryrefslogtreecommitdiff
path: root/recording/config.go
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-09-07 02:48:46 +0800
committerKeuin <[email protected]>2022-09-07 02:48:46 +0800
commit8e15d802865ed57db0018c15ea5559c8bd44c01f (patch)
tree48f4632a1ad044bd7f7f8da3ebe2bb03ab4ca6fe /recording/config.go
parent88234ca8fffc4e120adbe0d38071b625ad2f43c7 (diff)
First working version. Just a POC.
Diffstat (limited to 'recording/config.go')
-rw-r--r--recording/config.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/recording/config.go b/recording/config.go
new file mode 100644
index 0000000..1a24508
--- /dev/null
+++ b/recording/config.go
@@ -0,0 +1,20 @@
+package recording
+
+import "bilibili-livestream-archiver/common"
+
+type TaskConfig struct {
+ RoomId common.RoomId `mapstructure:"room_id"`
+ Transport TransportConfig `mapstructure:"transport"`
+ Download DownloadConfig `mapstructure:"download"`
+}
+
+type TransportConfig struct {
+ SocketTimeoutSeconds int `mapstructure:"socket_timeout_seconds"`
+ RetryIntervalSeconds int `mapstructure:"retry_interval_seconds"`
+ MaxRetryTimes int `mapstructure:"max_retry_times"`
+}
+
+type DownloadConfig struct {
+ SaveDirectory string `mapstructure:"save_directory"`
+ FileNameTemplate string `mapstructure:"file_name_template"`
+}