add (unfinished, untested!) /api/v1/streaming endpoint
This commit is contained in:
parent
0a94e2bf93
commit
6f17b59a47
8 changed files with 291 additions and 0 deletions
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue