routes

package
v0.0.0-...-3293854 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumberOfPagesToDisplay = 5
	NumberOfVideosPerPage  = 50
)
View Source
const (
	MINIMUM_NUMBER_OF_TAGS = 5
)

Variables

This section is empty.

Functions

func SetupRoutes

func SetupRoutes(e *echo.Echo, cfg *config.Config)

func SetupTestRoutes

func SetupTestRoutes(e *echo.Echo)

Types

type ArchiveRequestsPageData

type ArchiveRequestsPageData struct {
	L                LoggedInUserData
	ArchivalRequests []*schedulerproto.ContentArchivalEntry
}

type Comment

type Comment struct {
	ProfilePicture string
	Username       string
	Comment        string
}

type CommentData

type CommentData struct {
	ID                 int64  `json:"id"`
	CreationDate       string `json:"created"`
	Content            string `json:"content"`
	Username           string `json:"fullname"`
	ProfileImage       string `json:"profile_picture_url"`
	VoteScore          int64  `json:"upvote_count"`
	CurrUserHasUpvoted bool   `json:"user_has_upvoted"`
	ParentID           int64  `json:"parent,omitempty"`
}

type HomeHandler

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

type HomePageData

type HomePageData struct {
	L              LoggedInUserData
	PaginationData PaginationData
	Videos         []Video
}

type LoggedInUserData

type LoggedInUserData struct {
	UserID            int64
	Username          string
	ProfilePictureURL string
}

type PaginationData

type PaginationData struct {
	PathsAndQueryStrings []string
	Pages                []int
	CurrentPage          int
}

type ProfileData

type ProfileData struct {
	L                 LoggedInUserData
	PaginationData    PaginationData
	UserID            int64
	Username          string
	ProfilePictureURL string
	Videos            []Video
}

type RouteHandler

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

type Video

type Video struct {
	Title        string
	VideoID      int64
	Views        uint64
	AuthorID     int64
	AuthorName   string
	ThumbnailLoc string
	Rating       float64
}

type VideoDetail

type VideoDetail struct {
	L                 LoggedInUserData
	Title             string
	MPDLoc            string
	Views             uint64
	Rating            float64
	VideoID           int64
	AuthorID          int64
	Username          string
	UserDescription   string
	VideoDescription  string
	UserSubscribers   uint64
	ProfilePicture    string
	UploadDate        string // should be a datetime
	Comments          []Comment
	Tags              []string
	RecommendedVideos []Video
	NextVideo         int64
}

Jump to

Keyboard shortcuts

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