-
Notifications
You must be signed in to change notification settings - Fork 1
/
status.go
102 lines (99 loc) · 4.66 KB
/
status.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
package rtsp
// RTSP response status codes
const (
StatusContinue = 100
StatusOK = 200
StatusCreated = 201
StatusLowOnStorageSpace = 250
StatusMultipleChoices = 300
StatusMovedPermanently = 301
StatusMovedTemporarily = 302
StatusSeeOther = 303
StatusNotModified = 304
StatusUseProxy = 305
StatusBadRequest = 400
StatusUnauthorized = 401
StatusPaymentRequired = 402
StatusForbidden = 403
StatusNotFound = 404
StatusMethodNotAllowed = 405
StatusNotAcceptable = 406
StatusProxyAuthenticationRequired = 407
StatusRequestTimeout = 408
StatusGone = 410
StatusLengthRequired = 411
StatusPreconditionFailed = 412
StatusRequestEntityTooLarge = 413
StatusRequestURITooLong = 414
StatusUnsupportedMediaType = 415
StatusInvalidparameter = 451
StatusIllegalConferenceIdentifier = 452
StatusNotEnoughBandwidth = 453
StatusSessionNotFound = 454
StatusMethodNotValidInThisState = 455
StatusHeaderFieldNotValid = 456
StatusInvalidRange = 457
StatusParameterIsReadOnly = 458
StatusAggregateOperationNotAllowed = 459
StatusOnlyAggregateOperationAllowed = 460
StatusUnsupportedTransport = 461
StatusDestinationUnreachable = 462
StatusInternalServerError = 500
StatusNotImplemented = 501
StatusBadGateway = 502
StatusServiceUnavailable = 503
StatusGatewayTimeout = 504
StatusRTSPVersionNotSupported = 505
StatusOptionNotsupport = 551
)
// StatusText returns a text of the RTSP status code. It returns the
// empty string if the code is unknown
func StatusText(code int) string {
return statusText[code]
}
var statusText = map[int]string{
StatusContinue: "Continue",
StatusOK: "OK",
StatusCreated: "Created",
StatusLowOnStorageSpace: "Low on Storage Space",
StatusMultipleChoices: "Multiple Choices",
StatusMovedPermanently: "Moved Permanently",
StatusMovedTemporarily: "Moved Temporarily",
StatusSeeOther: "See Other",
StatusNotModified: "Not Modified",
StatusUseProxy: "Use Proxy",
StatusBadRequest: "Bad Request",
StatusUnauthorized: "Unauthorized",
StatusPaymentRequired: "Payment Required",
StatusForbidden: "Forbidden",
StatusNotFound: "Not Found",
StatusMethodNotAllowed: "Method Not Allowed",
StatusNotAcceptable: "Not Acceptable",
StatusProxyAuthenticationRequired: "Proxy Authentication Required",
StatusRequestTimeout: "Request Time-out",
StatusGone: "Gone",
StatusLengthRequired: "Length Required",
StatusPreconditionFailed: "Precondition Failed",
StatusRequestEntityTooLarge: "Request Entity Too Large",
StatusRequestURITooLong: "Request-URI Too Large",
StatusUnsupportedMediaType: "Unsupported Media Type",
StatusInvalidparameter: "Parameter Not Understood",
StatusIllegalConferenceIdentifier: "Conference Not Found",
StatusNotEnoughBandwidth: "Not Enough Bandwidth",
StatusSessionNotFound: "Session Not Found",
StatusMethodNotValidInThisState: "Method Not Valid in This State",
StatusHeaderFieldNotValid: "Header Field Not Valid for Resource",
StatusInvalidRange: "Invalid Range",
StatusParameterIsReadOnly: "Parameter Is Read-Only",
StatusAggregateOperationNotAllowed: "Aggregate operation not allowed",
StatusOnlyAggregateOperationAllowed: "Only aggregate operation allowed",
StatusUnsupportedTransport: "Unsupported transport",
StatusDestinationUnreachable: "Destination unreachable",
StatusInternalServerError: "Internal Server Error",
StatusNotImplemented: "Not Implemented",
StatusBadGateway: "Bad Gateway",
StatusServiceUnavailable: "Service Unavailable",
StatusGatewayTimeout: "Gateway Time-out",
StatusRTSPVersionNotSupported: "RTSP Version not supported",
StatusOptionNotsupport: "Option not supported",
}