2.0.0 refactor

This commit is contained in:
Yami Odymel
2025-05-02 23:52:58 +08:00
parent cad4689a5c
commit f26602b49e
51 changed files with 2108 additions and 2989 deletions

5
server/config.go Normal file
View File

@@ -0,0 +1,5 @@
package server
import "github.com/teacat/chaturbate-dvr/entity"
var Config *entity.Config

21
server/manager.go Normal file
View File

@@ -0,0 +1,21 @@
package server
import (
"net/http"
"github.com/teacat/chaturbate-dvr/entity"
)
var Manager IManager
type IManager interface {
CreateChannel(conf *entity.ChannelConfig, shouldSave bool) error
StopChannel(username string) error
PauseChannel(username string) error
ResumeChannel(username string) error
ChannelInfo() []*entity.ChannelInfo
Publish(name string, ch *entity.ChannelInfo)
Subscriber(w http.ResponseWriter, r *http.Request)
LoadConfig() error
SaveConfig() error
}