dao

package
v0.0.0-...-ffbc075 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConn

func GetConn() *pgx.Conn

func GetKV

func GetKV() *redis.Client

Types

type Comment

type Comment struct {
	Mid      int       `json:"mid"`
	Vid      int       `json:"vid"`
	UserName string    `json:"user_name"`
	Text     string    `json:"text"`
	Time     time.Time `json:"time"`
}

func ListCommentsByVideo

func ListCommentsByVideo(vid int) ([]Comment, error)

type CommentAdd

type CommentAdd struct {
	Mid  int
	Vid  int
	Uid  int
	Text string
	Time time.Time
}

func (*CommentAdd) Add

func (m *CommentAdd) Add() error

type Source

type Source struct {
	Sid  int    `json:"sid"`
	Name string `json:"name"`
}

func ListSources

func ListSources() ([]Source, error)

type User

type User struct {
	Uid   int
	Token string
	Name  string
}

func (*User) AddOrUpdateToken

func (u *User) AddOrUpdateToken() error

func (*User) Get

func (u *User) Get(uid int) error

type VideoAdd

type VideoAdd struct {
	Vid         int
	Sid         int
	Uid         int
	Title       string
	Description string
	File        io.ReadCloser
}

func (*VideoAdd) Add

func (v *VideoAdd) Add() error

type VideoMeta

type VideoMeta struct {
	Vid         int    `json:"vid"`
	Source      string `json:"source"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

func ListVideoMetaByUid

func ListVideoMetaByUid(uid int) ([]VideoMeta, error)

func (*VideoMeta) Get

func (v *VideoMeta) Get(vid int) error

func (VideoMeta) Put

func (v VideoMeta) Put() error

type VideoStream

type VideoStream struct {
	// contains filtered or unexported fields
}

func (VideoStream) Close

func (v VideoStream) Close() error

func (*VideoStream) Get

func (v *VideoStream) Get(vid int) (io.ReadSeekCloser, error)

Jump to

Keyboard shortcuts

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