Documentation ¶
Overview ¶
utils
Index ¶
- Variables
- func ClearSecretToken()
- func GetAllCategories() []string
- func GetBaseURL(rawURL string) string
- func GetConfig(key string) (string, error)
- func GetLiveToken() string
- func GetSecretToken() string
- func InitDB(filepath string) (err error)
- func IsValidURL(u string) bool
- func MergeUrl(baseUrl string, partialUrl string) string
- func SetConfig(key, value string) error
- func TransportWithProxy(proxyUrl string) *http.Transport
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HttpClientTimeout = 10 * time.Second ConfigCache syncx.Map[string, string] URLCache syncx.Map[string, *model.LiveInfo] ChannelCache syncx.Map[uint, model.Channel] M3U8Cache = cache.New(3*time.Second, 10*time.Second) )
View Source
var ( ErrConfigNotFound = errors.New("config key not found") ErrYoutubeDlNotFound = errors.New("Youtube-dl not found") )
View Source
var DB *gorm.DB
Functions ¶
func ClearSecretToken ¶
func ClearSecretToken()
func GetAllCategories ¶
func GetAllCategories() []string
func GetBaseURL ¶
func GetLiveToken ¶
func GetLiveToken() string
func GetSecretToken ¶
func GetSecretToken() string
func IsValidURL ¶
func TransportWithProxy ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.