go-errhttp/networkauthenticationrequir...

45 lines
1.1 KiB
Go
Raw Normal View History

2017-02-06 21:14:15 +00:00
package errhttp
var _ Error = internalNetworkAuthenticationRequired{}
var _ ServerError = internalNetworkAuthenticationRequired{}
var _ NetworkAuthenticationRequired = internalNetworkAuthenticationRequired{}
var ErrNetworkAuthenticationRequired error = NetworkAuthenticationRequiredWrap(nil)
2017-02-06 21:14:15 +00:00
type NetworkAuthenticationRequired interface {
ServerError
NetworkAuthenticationRequired()
}
var _ NetworkAuthenticationRequired = internalNetworkAuthenticationRequired{}
2017-02-06 21:14:15 +00:00
type internalNetworkAuthenticationRequired struct {
err error
}
func NetworkAuthenticationRequiredWrap(err error) error {
return internalNetworkAuthenticationRequired{
err:err,
}
}
func (receiver internalNetworkAuthenticationRequired) Error() string {
return receiver.err.Error()
}
func (internalNetworkAuthenticationRequired) ErrHTTP() {
// Nothing here.
}
2017-02-06 21:14:15 +00:00
func (internalNetworkAuthenticationRequired) ServerError() {
// Nothing here.
}
func (internalNetworkAuthenticationRequired) NetworkAuthenticationRequired() {
// Nothing here.
}
func (receiver internalNetworkAuthenticationRequired) Unwrap() error {
return receiver.err
}