db

package
v0.0.0-...-839337a Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: BSD-2-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserInformation

func AddUserInformation(loginName string, pwd string) error

func AddcommentInformation

func AddcommentInformation(vid string, aid int, content string) error

func AddvideoInformation

func AddvideoInformation(aid int, name string) (*model.VideoInfo, error)

func DeleteSession

func DeleteSession(sid string) error

从数据库中删除 session

func DeleteUser

func DeleteUser(loginName string, pwd string) error

func Deletevideo

func Deletevideo(vid string) error

func GetUserInformation

func GetUserInformation(loginName string) (string, error)

func GetvideoInformation

func GetvideoInformation(vid string) (*model.VideoInfo, error)

func InsertSession

func InsertSession(sid string, ttl int64, uname string) error

func ListComments

func ListComments(vid string, from, to int) ([]*model.Comment, error)

func RetrieveAllSessions

func RetrieveAllSessions() (*sync.Map, error)

RetrieveAllSessions 检索所有会话 *

@*sync.Map 把session 放到 map队列中返回
map 充当了 Catce

func RetrieveSession

func RetrieveSession(sid string) (*model.SimpleSession, error)

从数据库中检索某个会话

Types

This section is empty.

Jump to

Keyboard shortcuts

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