Documentation ¶
Index ¶
- Constants
- Variables
- func LogAndRetErr(fmtStr string, err error) error
- func NewGRPCServer(bucketName string, db *sqlx.DB, port int, originFQDN string, local bool, ...) error
- type GRPCServer
- func (g GRPCServer) ApproveVideo(ctx context.Context, req *proto.VideoApproval) (*proto.Nothing, error)
- func (g GRPCServer) DeleteVideo(ctx context.Context, deleteReq *proto.VideoDeletionReq) (*proto.Nothing, error)
- func (g GRPCServer) DownloadVideo(req *proto.VideoRequest, outputStream proto.VideoService_DownloadVideoServer) error
- func (g GRPCServer) ForeignVideoExists(ctx context.Context, foreignVideoCheck *proto.ForeignVideoCheck) (*proto.VideoExistenceResponse, error)
- func (g GRPCServer) GetCommentsForVideo(ctx context.Context, commentListReq *proto.CommentRequest) (*proto.CommentListResponse, error)
- func (g GRPCServer) GetVideo(ctx context.Context, req *proto.VideoRequest) (*proto.VideoMetadata, error)
- func (g GRPCServer) GetVideoList(ctx context.Context, queryConfig *proto.VideoQueryConfig) (*proto.VideoList, error)
- func (g GRPCServer) GetVideoRecommendations(ctx context.Context, req *proto.RecReq) (*proto.RecResp, error)
- func (g GRPCServer) MakeComment(ctx context.Context, commentReq *proto.VideoComment) (*proto.Nothing, error)
- func (g GRPCServer) MakeCommentUpvote(ctx context.Context, upvoteReq *proto.CommentUpvote) (*proto.Nothing, error)
- func (g GRPCServer) RateVideo(ctx context.Context, rating *proto.VideoRating) (*proto.Nothing, error)
- func (g GRPCServer) UploadMPDSet(d *dashutils.DASHVideo) error
- func (g GRPCServer) UploadVideo(inpStream proto.VideoService_UploadVideoServer) error
- func (g GRPCServer) ViewVideo(ctx context.Context, videoInp *proto.VideoViewing) (*proto.Nothing, error)
- type VideoUpload
Constants ¶
View Source
const NUM_TRANSCODING_WORKERS = 1
Variables ¶
View Source
var DailyUploadLimitError error = errors.New("the daily upload limit has been exceeded")
Functions ¶
func LogAndRetErr ¶
func NewGRPCServer ¶
func NewGRPCServer(bucketName string, db *sqlx.DB, port int, originFQDN string, local bool, client userproto.UserServiceClient, tracer opentracing.Tracer, storageBackend, apiID, apiKey string, approvalThreshold int, storageEndpoint string, MaxDLFileSize int64, redisConn *redis.Client, maxDailyUploadMB int) error
TODO: API is getting bloated
Types ¶
type GRPCServer ¶
type GRPCServer struct { VideoModel *models.VideoModel Local bool OriginFQDN string Storage storage.Storage RedisConn *redis.Client proto.UnsafeVideoServiceServer MaxDailyUploadMB int }
func (GRPCServer) ApproveVideo ¶
func (g GRPCServer) ApproveVideo(ctx context.Context, req *proto.VideoApproval) (*proto.Nothing, error)
func (GRPCServer) DeleteVideo ¶
func (g GRPCServer) DeleteVideo(ctx context.Context, deleteReq *proto.VideoDeletionReq) (*proto.Nothing, error)
TODO: note that this method only works for the basic method of encoding, and not for any form of transcoding
func (GRPCServer) DownloadVideo ¶
func (g GRPCServer) DownloadVideo(req *proto.VideoRequest, outputStream proto.VideoService_DownloadVideoServer) error
Do we need this?
func (GRPCServer) ForeignVideoExists ¶
func (g GRPCServer) ForeignVideoExists(ctx context.Context, foreignVideoCheck *proto.ForeignVideoCheck) (*proto.VideoExistenceResponse, error)
func (GRPCServer) GetCommentsForVideo ¶
func (g GRPCServer) GetCommentsForVideo(ctx context.Context, commentListReq *proto.CommentRequest) (*proto.CommentListResponse, error)
func (GRPCServer) GetVideo ¶
func (g GRPCServer) GetVideo(ctx context.Context, req *proto.VideoRequest) (*proto.VideoMetadata, error)
func (GRPCServer) GetVideoList ¶
func (g GRPCServer) GetVideoList(ctx context.Context, queryConfig *proto.VideoQueryConfig) (*proto.VideoList, error)
func (GRPCServer) GetVideoRecommendations ¶
func (GRPCServer) MakeComment ¶
func (g GRPCServer) MakeComment(ctx context.Context, commentReq *proto.VideoComment) (*proto.Nothing, error)
func (GRPCServer) MakeCommentUpvote ¶
func (g GRPCServer) MakeCommentUpvote(ctx context.Context, upvoteReq *proto.CommentUpvote) (*proto.Nothing, error)
func (GRPCServer) RateVideo ¶
func (g GRPCServer) RateVideo(ctx context.Context, rating *proto.VideoRating) (*proto.Nothing, error)
func (GRPCServer) UploadMPDSet ¶
func (g GRPCServer) UploadMPDSet(d *dashutils.DASHVideo) error
UploadMPDSet uploads the files to S3. Files may be overwritten (but they're versioned so they're safe). Need to ensure as a precondition that the video hasn't been uploaded before and the temp file ID hasn't been used.
func (GRPCServer) UploadVideo ¶
func (g GRPCServer) UploadVideo(inpStream proto.VideoService_UploadVideoServer) error
func (GRPCServer) ViewVideo ¶
func (g GRPCServer) ViewVideo(ctx context.Context, videoInp *proto.VideoViewing) (*proto.Nothing, error)
type VideoUpload ¶
Click to show internal directories.
Click to hide internal directories.