add (unfinished, untested!) /api/v1/streaming endpoint

This commit is contained in:
sam 2023-09-16 04:33:52 +02:00
parent 0a94e2bf93
commit 6f17b59a47
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
8 changed files with 291 additions and 0 deletions

View file

@ -134,6 +134,9 @@ const (
// Post related
ErrPostNotFound = 4001
// Streaming related
ErrTooManyStreams = 5001
)
func ErrCodeMessage(code int) string {
@ -157,6 +160,8 @@ var errCodeMessages = map[int]string{
ErrBlogNotFound: "Blog not found",
ErrPostNotFound: "Post not found",
ErrTooManyStreams: "Too many streams open",
}
func ErrCodeStatus(code int) int {
@ -180,4 +185,6 @@ var errCodeStatuses = map[int]int{
ErrBlogNotFound: http.StatusNotFound,
ErrPostNotFound: http.StatusNotFound,
ErrTooManyStreams: http.StatusBadRequest,
}