gfwproxyshadowsocksdocker-imagegogolanggvisornatnetworksocks4socks5tcpip-stacktortun-devicetun2sockstunneludpwireguard
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
379 B
22 lines
379 B
4 years ago
|
package stats
|
||
|
|
||
|
var (
|
||
|
ErrUnauthorized = newError("Unauthorized")
|
||
|
ErrBadRequest = newError("Body invalid")
|
||
|
)
|
||
|
|
||
|
var _ error = (*HTTPError)(nil)
|
||
|
|
||
|
// HTTPError is custom HTTP error for API
|
||
|
type HTTPError struct {
|
||
|
Message string `json:"message"`
|
||
|
}
|
||
|
|
||
|
func (e *HTTPError) Error() string {
|
||
|
return e.Message
|
||
|
}
|
||
|
|
||
|
func newError(msg string) *HTTPError {
|
||
|
return &HTTPError{Message: msg}
|
||
|
}
|