infocache

package
v0.0.0-...-1b9946f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCacheUnavailable = errors.New("cache unavailable")
	ErrCacheExpired     = errors.New("cache expired")
	CacheRecency        = 96 * time.Hour
)

Functions

This section is empty.

Types

type InfoCache

type InfoCache interface {
	GetBulkVideos(ctx context.Context, videoIDs []string) ([]*api.VideoDetails, error)
	GetBulkPlaylists(ctx context.Context, playlistIDs []string) ([]*api.PlaylistDetails, error)
	GetBulkChannels(ctx context.Context, channelIDs []string) ([]*api.ChannelDetails, error)

	GetVideo(ctx context.Context, videoID string) (*api.VideoDetails, error)
	SetVideo(video *api.VideoDetails) error
	IsVideoRecent(videoID string) (bool, error)

	GetChannel(ctx context.Context, channelID string) (*api.ChannelDetails, error)
	SetChannel(*api.ChannelDetails) error
	GetChannelVideoIDs(ctx context.Context, channelID string) (videoIDs []string, timestamp time.Time, err error)
	SetChannelVideoIDs(channelID string, videoIDs []string, timestamp time.Time) error
	IsChannelRecent(channelID string) (bool, error)

	GetPlaylist(ctx context.Context, playlistID string) (*api.PlaylistDetails, error)
	SetPlaylist(*api.PlaylistDetails) error
	GetPlaylistVideoIDs(ctx context.Context, channelID string) (videoIDs []string, timestamp time.Time, err error)
	SetPlaylistVideoIDs(channelID string, videoIDs []string, timestamp time.Time) error
	IsPlaylistRecent(playlistID string) (bool, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL