Documentation ¶
Index ¶
- Constants
- func AddClipToDB(ClipID string, CreatedAt time.Time, ImageUrl string, ClipUrl string, ...)
- func AddThumbToDB(roundTime time.Time, ChannelName string, ChannelDisplayName string, ...)
- func DeleteImage(filepath string)
- func InitDB()
- func PruneOldStreams(roundTime time.Time)
- func UpdateFilter(filterId uint, roundTime time.Time)
- type Clip
- type Filter
- type Follow
- type Stream
- type Thumb
Constants ¶
View Source
const ( QueryTypeStreams int = 1 QueryTypeFollows int = 2 )
Variables ¶
This section is empty.
Functions ¶
func AddClipToDB ¶
func AddClipToDB(ClipID string, CreatedAt time.Time, ImageUrl string, ClipUrl string, ChannelName string)
AddClipToDB inserts a clip into the database if it does not already exist.
func AddThumbToDB ¶
func AddThumbToDB(roundTime time.Time, ChannelName string, ChannelDisplayName string, VODSeconds int, VOD string, ImagePath string, StartTime time.Time, Title string, viewers int, FilterIds []uint)
AddThumbToDB adds a new Thumb to the DB, possibly creating a new Stream.
func PruneOldStreams ¶
PruneOldStreams removes old streams along with their thumbs, follows, and image files.
func UpdateFilter ¶
Types ¶
type Clip ¶
type Clip struct { gorm.Model ClipID string StreamID uint ClipCreatedAt time.Time ImageUrl string ClipUrl string }
func GetStreamClips ¶
type Filter ¶
type Filter struct { gorm.Model Name string `gorm:"size:50"` Subpath string `gorm:"size:50"` QueryType int QueryParam string `gorm:"size:150"` LastUpdateTime time.Time }
func GetFilterWithSubpath ¶
type Stream ¶
type Stream struct { gorm.Model ChannelName string `gorm:"size:50"` ChannelDisplayName string `gorm:"size:50"` Title string `gorm:"size:150"` StartTime time.Time LastUpdateTime time.Time AverageViewers float32 NumThumbs uint }
func GetAllStreams ¶
func GetAllStreams() []Stream
func GetStreamByID ¶
func GetStreamsOfFilter ¶
Click to show internal directories.
Click to hide internal directories.