db

package
v0.0.0-...-441fb9e Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_RECENT_LIVE_ROOM = 8
)

Variables

This section is empty.

Functions

func InitDB

func InitDB(file string) error

func QueryHightlight

func QueryHightlight(roomId int, liveId int64) ([]bs.TimelineEntry, error)

func QueryLiveInfo

func QueryLiveInfo(roomId int, until int64, limit int) ([]*bs.BasicLiveInfo, error)

func SaveHightlight

func SaveHightlight(req *bs.CommitHighlightRequest) error

func SaveLiveInfo

func SaveLiveInfo(roomId int, info *bs.BasicLiveInfo) error

func SaveRecentLiveRoom

func SaveRecentLiveRoom(uid int64, roomId int, name, icon string) error

Types

type LiveRoomInfo

type LiveRoomInfo struct {
	UID            int64  `json:"uid"`
	RoomID         int    `json:"room_id"`
	StreamerName   string `json:"name"`
	StreamerIcon   string `json:"icon"`
	LastAccessTime int64  `json:"lat"`
}

func GetRecentRooms

func GetRecentRooms() ([]*LiveRoomInfo, error)

Jump to

Keyboard shortcuts

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