Documentation
¶
Index ¶
Constants ¶
View Source
const (
// X-Auth-Token error code.
AuthErrorCode = "X-Auth-Token is unauthorized"
)
Variables ¶
View Source
var ( // Errors for Auth. ErrClientNoAuthOpts = errors.New("CLIENT_NO_AUTH_METHOD") ErrAuthTokenUnathorized = errors.New("AUTH_TOKEN_UNAUTHORIZED") // Errors for Secrets Service. ErrEmptySecretName = errors.New("EMPTY_SECRET_NAME") ErrEmptySecretValue = errors.New("EMPTY_SECRET_DESC") ErrCannotMarshalSecretBody = errors.New("CANNOT_MARSHAL_SECRET") // Errors for Certificates Service. ErrEmptyCertificateID = errors.New("EMPTY_CERT_ID") ErrEmptyCertificateName = errors.New("EMPTY_CERT_NAME") ErrEmptyPEMCertificate = errors.New("EMPTY_CERT_PEM_CERT") ErrEmptyPEMPrivateKey = errors.New("EMPTY_CERT_PEM_PK") ErrCannotMarshalCertificateBody = errors.New("CANNOT_MARSHAL_CERT") // SDK Common Errors. ErrInternalAppError = errors.New("INTERNAL_APP_ERROR") ErrCannotDoRequest = errors.New("CANNOT_DO_REQUEST") ErrCannotFormatEndpoint = errors.New("CANNOT_FORMAT_ENDPOINT") ErrCannotReadBody = errors.New("CANNOT_READ_RESPONSE_BODY") ErrCannotUnmarshalBody = errors.New("CANNOT_UNMARSHAL_JSON") // Errors from Backend. ErrBadRequestStatusText = errors.New("INCORRECT_REQUEST") ErrInternalErrorStatusText = errors.New("INTERNAL_SERVER_ERROR") ErrForbiddenStatusText = errors.New("FORBIDDEN") ErrOverQuotasStatusText = errors.New("OVER_QUOTAS") ErrNotFoundStatusText = errors.New("NOT_FOUND") ErrConflictStatusText = errors.New("CONFLICT") ErrTooManyRequestsText = errors.New("TOO_MANY_REQUESTS") ErrMethodNotAllowed = errors.New("NOT_ALLOWED") ErrUnknown = errors.New("UNKNOWN_ERROR") )
Functions ¶
Types ¶
type ErrResponse ¶
type ErrResponse struct {
HTTPStatusCode int `json:"-"`
ErrorText string `json:"error_text,omitempty"`
StatusText string `json:"status_text"`
}
ErrResponse — represents error returned from Backend responsible for Secrets & Certs services.
Click to show internal directories.
Click to hide internal directories.