mirror of
https://github.com/weyne85/chaturbate-dvr.git
synced 2025-10-29 16:58:56 +00:00
2.0.0 refactor
This commit is contained in:
56
entity/entity.go
Normal file
56
entity/entity.go
Normal file
@@ -0,0 +1,56 @@
|
||||
package entity
|
||||
|
||||
// Event represents the type of event for the channel.
|
||||
type Event = string
|
||||
|
||||
const (
|
||||
EventUpdate Event = "update"
|
||||
EventLog Event = "log"
|
||||
)
|
||||
|
||||
// ChannelConfig represents the configuration for a channel.
|
||||
type ChannelConfig struct {
|
||||
IsPaused bool `json:"is_paused"`
|
||||
Username string `json:"username"`
|
||||
Framerate int `json:"framerate"`
|
||||
Resolution int `json:"resolution"`
|
||||
Pattern string `json:"pattern"`
|
||||
MaxDuration int `json:"max_duration"`
|
||||
MaxFilesize int `json:"max_filesize"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
}
|
||||
|
||||
// ChannelInfo represents the information about a channel,
|
||||
// mostly used for the template rendering.
|
||||
type ChannelInfo struct {
|
||||
IsOnline bool
|
||||
IsPaused bool
|
||||
Username string
|
||||
Duration string
|
||||
Filesize string
|
||||
Filename string
|
||||
StreamedAt string
|
||||
MaxDuration string
|
||||
MaxFilesize string
|
||||
CreatedAt int64
|
||||
Logs []string
|
||||
GlobalConfig *Config // for nested template to access $.Config
|
||||
}
|
||||
|
||||
// Config holds the configuration for the application.
|
||||
type Config struct {
|
||||
Version string
|
||||
Username string
|
||||
AdminUsername string
|
||||
AdminPassword string
|
||||
Framerate int
|
||||
Resolution int
|
||||
Pattern string
|
||||
MaxDuration int
|
||||
MaxFilesize int
|
||||
Port string
|
||||
Interval int
|
||||
Cookies string
|
||||
UserAgent string
|
||||
Domain string
|
||||
}
|
||||
Reference in New Issue
Block a user