models

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

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

Go to latest
Published: Dec 29, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddComment

func AddComment(data map[string]interface{}) (*defs.Comment, error)

AddComment 添加评论

func AddSession

func AddSession(data map[string]interface{}) error

AddSession 添加session

func AddUser

func AddUser(data map[string]interface{}) error

AddUser 新增用户

func AddVideoInfo

func AddVideoInfo(data map[string]interface{}) (*defs.Videoinfo, error)

AddVideoInfo 新增视频信息

func CheckUser

func CheckUser(uname string) (bool, error)

CheckUser 查看用户是否存在

func CloseDB

func CloseDB()

func DelUserInfo

func DelUserInfo(data map[string]interface{}) error

DelUserInfo 删除用户

func DeleteSession

func DeleteSession(sid string) error

DeleteSession 删除session信息

func DeleteVideoInfo

func DeleteVideoInfo(vid string) error

DeleteVideoInfo 删除视频

func ExistVideoInfoByVID

func ExistVideoInfoByVID(maps interface{}) (bool, error)

ExistVideoInfoByVID 查看视频信息是否存在

func ForTestSetUp

func ForTestSetUp()

func GetComment

func GetComment(vid string) (*defs.Comment, error)

GetComment 获取某个评论

func GetCommentTotal

func GetCommentTotal(maps interface{}) (int, error)

GetCommentTotal 获取此用户的所有视频数

func GetComments

func GetComments(vid string, from, to int64) ([]defs.Comment, error)

GetComments 获取指定时间段的评论

func GetCommentsByPage

func GetCommentsByPage(pageNum int, pageSize int, maps interface{}) ([]defs.Comment, error)

GetCommentsByPage 获取指定页的评论

func GetSession

func GetSession(sid string) (*defs.Session, error)

GetSession 根据sid获取session的信息

func GetSessions

func GetSessions() ([]defs.Session, error)

GetSessions 获取所有session信息,用于程序初始化

func GetUserInfo

func GetUserInfo(uname string) (*defs.User, error)

GetUserInfo 获取用户信息

func GetVideoInfo

func GetVideoInfo(vid string) (*defs.Videoinfo, error)

GetVideoInfo 获取视频信息

func GetVideoInfoTotal

func GetVideoInfoTotal(maps interface{}) (int, error)

GetVideoInfoTotal 获取此用户的所有视频数

func GetVideoInfos

func GetVideoInfos(uname string, from, to int) ([]defs.Videoinfo, error)

GetVideoInfos 获取某段时间内用户的视频

func GetVideoInfosByPage

func GetVideoInfosByPage(pageNum int, pageSize int, maps interface{}) ([]defs.Videoinfo, error)

GetVideoInfosByPage 按照分页获取视频信息

func SetUp

func SetUp()

Types

This section is empty.

Jump to

Keyboard shortcuts

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