youtube_player_backend

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashPassword

func HashPassword(password []byte) (string, error)

Types

type SearchHistory

type SearchHistory struct {
	ID    int64
	User  *User
	Query string
	Time  time.Time
}

type SearchHistoryService

type SearchHistoryService interface {
	SearchHistory(u *User) (*SearchHistory, error)
}

type User

type User struct {
	ID       int64
	Login    string
	Password string
}

func (*User) CheckPassword

func (u *User) CheckPassword(password []byte) bool

type UserService

type UserService interface {
	UserByID(id int) (*User, error)
	UserByLogin(login string) (*User, error)
	CreateUser(u User) (*User, error)
}

type UserSession

type UserSession interface {
	Login(login string) (*User, string, error)
	Logout(token string)
	Authenticate(token string) (*User, error)
}

type Video

type Video struct {
	ID          string
	Title       string
	PubDate     time.Time
	Description string
	Thumbnail   string
	Player      string
}

type VideoFinder

type VideoFinder interface {
	Search(query string) (*VideoList, error)
}

type VideoItem

type VideoItem struct {
	Video
	Liked bool
}

type VideoList

type VideoList []VideoItem

type VideoListService

type VideoListService interface {
	VideoFinder
	SearchByUser(query string, user *User) (*VideoList, error)
	Likes(user *User) (*VideoList, error)
}

type VideoService

type VideoService interface {
	Video(id string) (*Video, error)
	Like(u *User, v *Video) error
	Dislike(u *User, v *Video) error
	IsLiked(u *User, v *Video) (bool, error)
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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