Documentation
¶
Index ¶
Constants ¶
View Source
const ( // HTTPCodeInvalidAuth is used when the authentication is invalid. HTTPCodeInvalidAuth = HTTPCode("invalid_auth") // HTTPCodeInternalServerError is used when there is an internal server error. HTTPCodeInternalServerError = HTTPCode("internal_server_error") // HTTPCodeSameNode is an error that is used when the user is on the same node for a cross-node specific request. HTTPCodeSameNode = HTTPCode("same_node") // HTTPCodeHalfAuthenticated is used when the user is half authenticated. HTTPCodeHalfAuthenticated = HTTPCode("half_authenticated") // HTTPCodeNoPasswordAuthSupport is used when the user does not support password authentication. HTTPCodeNoPasswordAuthSupport = HTTPCode("no_password_auth_support") // HTTPCodeInvalidBody is used when the body is invalid. HTTPCodeInvalidBody = HTTPCode("invalid_body") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HTTPError ¶
type HTTPError interface {
// contains filtered or unexported methods
}
HTTPError is used to define a interface that represents an HTTP error.
type HalfAuthentication ¶
type HalfAuthentication struct { // SupportedMethods is the supported authentication methods. SupportedMethods []string `json:"supported_methods" xml:"supported_methods" msgpack:"supported_methods"` // HalfToken is the half token that can be used to complete the authentication. HalfToken string `json:"half_token" xml:"half_token" msgpack:"half_token"` }
HalfAuthentication is thrown when the user is only partially authenticated. This is used for 2FA.
func (HalfAuthentication) Error ¶
func (h HalfAuthentication) Error() string
Error implements the error interface.
type InternalServerError ¶
type InternalServerError struct{}
InternalServerError is used to define an internal server error.
func (InternalServerError) EncodeMsgpack ¶
func (i InternalServerError) EncodeMsgpack(e *msgpack.Encoder) error
EncodeMsgpack is used to marshal the error to Msgpack.
func (InternalServerError) MarshalJSON ¶
func (i InternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON is used to marshal the error to JSON.
func (InternalServerError) MarshalXML ¶
func (i InternalServerError) MarshalXML(e *xml.Encoder, start xml.StartElement) error
MarshalXML is used to marshal the error to XML.
type InvalidAuth ¶
type InvalidAuth struct {
Message string `json:"message" xml:"message" msgpack:"message"`
}
InvalidAuth is used to define an invalid authentication error.
type InvalidBody ¶
type InvalidBody struct {
Message string `json:"message" xml:"message" msgpack:"message"`
}
InvalidBody is thrown when the body is invalid.
type NoPasswordAuthSupport ¶
type NoPasswordAuthSupport struct {
Message string `json:"message" xml:"message" msgpack:"message"`
}
NoPasswordAuthSupport is thrown when the user does not support password authentication.
Click to show internal directories.
Click to hide internal directories.