routes

package
v0.0.0-...-514e0f0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 23 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, srv *socketio.Server)

Types

type ArchivalRequest

type ArchivalRequest struct {
	UserID               int64
	Url                  string
	ArchivedVideos       uint64
	CurrentTotalVideos   uint64
	LastSynced           string
	BackoffFactor        uint32
	DownloadID           uint64
	UndownloadableVideos uint64
}

type ArchiveEventsData

type ArchiveEventsData struct {
	ArchivalEvents []*schedulerproto.ArchivalEvent
}

type ArchiveRequestsPageData

type ArchiveRequestsPageData struct {
	ArchivalRequests []ArchivalRequest
}

type AuditData

type AuditData struct {
	Length int
	Events []AuditEvent
}

type AuditEvent

type AuditEvent struct {
	ID        int64
	UserID    int64
	Message   string
	Timestamp string
}

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 HomePageData

type HomePageData struct {
	PaginationData PaginationData
	Videos         []Video
}

type LoggedInUserData

type LoggedInUserData struct {
	UserID            int64  `json:"userID"`
	Username          string `json:"username"`
	ProfilePictureURL string `json:"profile_picture_url"`
	Email             string `json:"email"`
	Rank              int32  `json:"rank"`
	Banned            bool   `json:"banned"`
}

type NewVideoMsg

type NewVideoMsg struct {
	Title    string
	ID       int
	Location string
}

type PaginationData

type PaginationData struct {
	NumberOfItems int
	CurrentPage   int
}

type ProfileData

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

type RouteHandler

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

type UnapprovedVideo

type UnapprovedVideo struct {
	URL      string
	VideoID  string
	Category string
}

type Video

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

type VideoDetail

type VideoDetail struct {
	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
	Tags              []string
	RecommendedVideos []Video
	L                 *LoggedInUserData
}

type VideoInProgress

type VideoInProgress struct {
	Website  string
	VideoID  string
	DlStatus string
}

Jump to

Keyboard shortcuts

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