Documentation ¶
Index ¶
- Constants
- func BilibiliAuthorizationCacheWithUserIDInitFunc(userID string) func(ctx context.Context, args ...struct{}) (*BilibiliUserCacheData, error)
- func BilibiliLiveCacheInitFunc(ctx context.Context, movie *model.Movie) ([]byte, error)
- func BilibiliMpdToString(mpdRaw *mpd.MPD, token string) (string, error)
- func BilibiliNoSharedMovieCacheInitFunc(ctx context.Context, movie *model.Movie, args ...*BilibiliUserCache) (string, error)
- func NewAlistMovieCacheInitFunc(movie *model.Movie, subPath string) ...
- func NewBilibiliLiveCacheInitFunc(movie *model.Movie) func(ctx context.Context) ([]byte, error)
- func NewBilibiliNoSharedMovieCacheInitFunc(movie *model.Movie) ...
- func NewBilibiliSharedMpdCacheInitFunc(movie *model.Movie) func(ctx context.Context, args *BilibiliUserCache) (*BilibiliMpdCache, error)
- func NewBilibiliSubtitleCacheInitFunc(movie *model.Movie) ...
- func NewEmbyMovieCacheInitFunc(movie *model.Movie, subPath string) func(ctx context.Context, args *EmbyUserCache) (*EmbyMovieCacheData, error)
- func NewEmbyMovieClearCacheFunc(movie *model.Movie, subPath string) func(ctx context.Context, args *EmbyUserCache) error
- type AlistAliCache
- type AlistMovieCache
- type AlistMovieCacheData
- type AlistMovieCacheFuncArgs
- type AlistProvider
- type AlistSubtitle
- type AlistUserCache
- type AlistUserCacheData
- type BilibiliLiveCache
- type BilibiliMovieCache
- type BilibiliMpdCache
- type BilibiliSubtitleCache
- type BilibiliSubtitleCacheItem
- type BilibiliUserCache
- type BilibiliUserCacheData
- type EmbyMovieCache
- type EmbyMovieCacheData
- type EmbySource
- type EmbySubtitleCache
- type EmbyUserCache
- type EmbyUserCacheData
- type MapCache
- func (b *MapCache[T, A]) Clear()
- func (b *MapCache[T, A]) Delete(key string)
- func (b *MapCache[T, A]) LoadCache(key string) (*refreshcache.RefreshCache[T, A], bool)
- func (b *MapCache[T, A]) LoadOrNewCache(key string) *refreshcache.RefreshCache[T, A]
- func (b *MapCache[T, A]) LoadOrStore(ctx context.Context, key string, args ...A) (T, error)
- func (b *MapCache[T, A]) LoadOrStoreWithDynamicFunc(ctx context.Context, key string, refreshFunc MapRefreshFunc[T, A], args ...A) (T, error)
- func (b *MapCache[T, A]) StoreOrRefresh(ctx context.Context, key string, args ...A) (T, error)
- func (b *MapCache[T, A]) StoreOrRefreshWithDynamicFunc(ctx context.Context, key string, refreshFunc MapRefreshFunc[T, A], args ...A) (T, error)
- type MapCache0
- func (b *MapCache0[T]) Clear()
- func (b *MapCache0[T]) Delete(key string)
- func (b *MapCache0[T]) LoadCache(key string) (*refreshcache0.RefreshCache[T], bool)
- func (b *MapCache0[T]) LoadOrNewCache(key string) *refreshcache0.RefreshCache[T]
- func (b *MapCache0[T]) LoadOrStore(ctx context.Context, key string) (T, error)
- func (b *MapCache0[T]) LoadOrStoreWithDynamicFunc(ctx context.Context, key string, refreshFunc MapRefreshFunc0[T]) (T, error)
- func (b *MapCache0[T]) StoreOrRefresh(ctx context.Context, key string) (T, error)
- func (b *MapCache0[T]) StoreOrRefreshWithDynamicFunc(ctx context.Context, key string, refreshFunc MapRefreshFunc0[T]) (T, error)
- type MapRefreshFunc
- type MapRefreshFunc0
- type SubtitleDataCache
Constants ¶
View Source
const ( AlistProviderAli = "AliyundriveOpen" AlistProvider115 = "115 Cloud" )
Variables ¶
This section is empty.
Functions ¶
func BilibiliAuthorizationCacheWithUserIDInitFunc ¶
func BilibiliAuthorizationCacheWithUserIDInitFunc(userID string) func(ctx context.Context, args ...struct{}) (*BilibiliUserCacheData, error)
func BilibiliLiveCacheInitFunc ¶ added in v0.5.0
func BilibiliMpdToString ¶ added in v0.5.3
func NewAlistMovieCacheInitFunc ¶
func NewAlistMovieCacheInitFunc(movie *model.Movie, subPath string) func(ctx context.Context, args *AlistMovieCacheFuncArgs) (*AlistMovieCacheData, error)
func NewBilibiliLiveCacheInitFunc ¶ added in v0.5.0
func NewBilibiliSharedMpdCacheInitFunc ¶
func NewBilibiliSharedMpdCacheInitFunc(movie *model.Movie) func(ctx context.Context, args *BilibiliUserCache) (*BilibiliMpdCache, error)
func NewBilibiliSubtitleCacheInitFunc ¶
func NewBilibiliSubtitleCacheInitFunc(movie *model.Movie) func(ctx context.Context, args *BilibiliUserCache) (BilibiliSubtitleCache, error)
func NewEmbyMovieCacheInitFunc ¶
func NewEmbyMovieCacheInitFunc(movie *model.Movie, subPath string) func(ctx context.Context, args *EmbyUserCache) (*EmbyMovieCacheData, error)
func NewEmbyMovieClearCacheFunc ¶ added in v0.5.2
Types ¶
type AlistAliCache ¶ added in v0.4.0
type AlistAliCache struct {
M3U8ListFile []byte
}
type AlistMovieCache ¶
type AlistMovieCache = refreshcache1.RefreshCache[*AlistMovieCacheData, *AlistMovieCacheFuncArgs]
func NewAlistMovieCache ¶
func NewAlistMovieCache(movie *model.Movie, subPath string) *AlistMovieCache
type AlistMovieCacheData ¶
type AlistMovieCacheData struct { Ali *AlistAliCache URL string Provider string Subtitles []*AlistSubtitle }
type AlistMovieCacheFuncArgs ¶ added in v0.5.0
type AlistMovieCacheFuncArgs struct { UserCache *AlistUserCache UserAgent string }
type AlistProvider ¶ added in v0.5.0
type AlistProvider = string
type AlistSubtitle ¶ added in v0.5.2
type AlistSubtitle struct { Cache *SubtitleDataCache Name string URL string Type string }
type AlistUserCache ¶
type AlistUserCache = MapCache[*AlistUserCacheData, struct{}]
func NewAlistUserCache ¶
func NewAlistUserCache(userID string) *AlistUserCache
type AlistUserCacheData ¶
func AlistAuthorizationCacheWithConfigInitFunc ¶
func AlistAuthorizationCacheWithConfigInitFunc(ctx context.Context, v *model.AlistVendor) (*AlistUserCacheData, error)
func AlistAuthorizationCacheWithUserIDInitFunc ¶
func AlistAuthorizationCacheWithUserIDInitFunc(ctx context.Context, userID, serverID string) (*AlistUserCacheData, error)
type BilibiliLiveCache ¶ added in v0.5.0
type BilibiliLiveCache struct{}
type BilibiliMovieCache ¶
type BilibiliMovieCache struct { Subtitle *refreshcache1.RefreshCache[BilibiliSubtitleCache, *BilibiliUserCache] Live *refreshcache0.RefreshCache[[]byte] }
func NewBilibiliMovieCache ¶
func NewBilibiliMovieCache(movie *model.Movie) *BilibiliMovieCache
type BilibiliMpdCache ¶
func BilibiliSharedMpdCacheInitFunc ¶
func BilibiliSharedMpdCacheInitFunc(ctx context.Context, movie *model.Movie, args *BilibiliUserCache) (*BilibiliMpdCache, error)
type BilibiliSubtitleCache ¶
type BilibiliSubtitleCache map[string]*BilibiliSubtitleCacheItem
func BilibiliSubtitleCacheInitFunc ¶
func BilibiliSubtitleCacheInitFunc(ctx context.Context, movie *model.Movie, args *BilibiliUserCache) (BilibiliSubtitleCache, error)
type BilibiliSubtitleCacheItem ¶ added in v0.7.6
type BilibiliSubtitleCacheItem struct { Srt *refreshcache0.RefreshCache[[]byte] Url string }
type BilibiliUserCache ¶
type BilibiliUserCache = refreshcache.RefreshCache[*BilibiliUserCacheData, struct{}]
func NewBilibiliUserCache ¶
func NewBilibiliUserCache(userID string) *BilibiliUserCache
type BilibiliUserCacheData ¶
type EmbyMovieCache ¶
type EmbyMovieCache = refreshcache1.RefreshCache[*EmbyMovieCacheData, *EmbyUserCache]
func NewEmbyMovieCache ¶
func NewEmbyMovieCache(movie *model.Movie, subPath string) *EmbyMovieCache
type EmbyMovieCacheData ¶
type EmbyMovieCacheData struct { TranscodeSessionID string Sources []EmbySource }
type EmbySource ¶
type EmbySource struct { URL string Name string Subtitles []*EmbySubtitleCache IsTranscode bool }
type EmbySubtitleCache ¶ added in v0.7.6
type EmbySubtitleCache struct { Cache *refreshcache0.RefreshCache[[]byte] URL string Type string Name string }
type EmbyUserCache ¶
type EmbyUserCache = MapCache0[*EmbyUserCacheData]
func NewEmbyUserCache ¶
func NewEmbyUserCache(userID string) *EmbyUserCache
type EmbyUserCacheData ¶
type EmbyUserCacheData struct { Host string ServerID string ApiKey string UserID string Backend string }
func EmbyAuthorizationCacheWithUserIDInitFunc ¶
func EmbyAuthorizationCacheWithUserIDInitFunc(userID, serverID string) (*EmbyUserCacheData, error)
type MapCache ¶
func (*MapCache[T, A]) LoadCache ¶ added in v0.3.2
func (b *MapCache[T, A]) LoadCache(key string) (*refreshcache.RefreshCache[T, A], bool)
func (*MapCache[T, A]) LoadOrNewCache ¶ added in v0.3.2
func (b *MapCache[T, A]) LoadOrNewCache(key string) *refreshcache.RefreshCache[T, A]
func (*MapCache[T, A]) LoadOrStore ¶
func (*MapCache[T, A]) LoadOrStoreWithDynamicFunc ¶
func (*MapCache[T, A]) StoreOrRefresh ¶
func (*MapCache[T, A]) StoreOrRefreshWithDynamicFunc ¶
type MapCache0 ¶ added in v0.7.0
type MapCache0[T any] struct { // contains filtered or unexported fields }
func (*MapCache0[T]) LoadCache ¶ added in v0.7.0
func (b *MapCache0[T]) LoadCache(key string) (*refreshcache0.RefreshCache[T], bool)
func (*MapCache0[T]) LoadOrNewCache ¶ added in v0.7.0
func (b *MapCache0[T]) LoadOrNewCache(key string) *refreshcache0.RefreshCache[T]
func (*MapCache0[T]) LoadOrStore ¶ added in v0.7.0
func (*MapCache0[T]) LoadOrStoreWithDynamicFunc ¶ added in v0.7.0
func (*MapCache0[T]) StoreOrRefresh ¶ added in v0.7.0
func (*MapCache0[T]) StoreOrRefreshWithDynamicFunc ¶ added in v0.7.0
type MapRefreshFunc ¶
type MapRefreshFunc0 ¶ added in v0.7.0
type SubtitleDataCache ¶ added in v0.5.2
type SubtitleDataCache = refreshcache0.RefreshCache[[]byte]
Click to show internal directories.
Click to hide internal directories.