errors

package
v0.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Yellow color code
	WARN = "\033[0;33m"
	// Red color code
	ERROR = "\033[0;31m"
	// Green color code
	OK = "\033[0;32m"
	// Blue color code
	INFO = "\033[0;34m"
	// Reset color code
	RESET = "\033[0m"
	// No color code
	NONE = "\033[0m"
)

Error color codes

View Source
const (
	// ErrBadRequest is returned when something fails due to client error.
	ErrBadRequest = "bad request"

	// ErrUnauthorized is returned when something fails due to client not being authorized.
	ErrUnauthorized = "unauthorized"

	// ErrInvalidConfig is returned when the config is invalid.
	ErrInvalidConfig = "invalid config"

	// ErrInvalidBucket is returned when the bucket is invalid.
	ErrInvalidBucket = "invalid bucket"

	// ErrInvalidProvider is returned when the provider is invalid.
	ErrInvalidProvider = "invalid provider"

	// ErrInvalidCredentials is returned when the authentication credentials are invalid.
	ErrInvalidCredentials = "invalid credentials"

	// ErrFileOperationFailed is returned when a file operation fails.
	ErrFileOperationFailed = "file operation failed"

	// ErrIncompleteMultiFileUpload is returned when a multifile upload fails on some files.
	ErrIncompleteMultiFileUpload = "incomplete files upload"

	// ErrClientError is returned when the client returns an error.
	ErrClientError = "client error"

	// ErrInvalidParameters is returned when the parameters are invalid.
	ErrInvalidParameters = "invalid parameters"
)

Error constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type BifrostError

type BifrostError struct {
	// Error is the error message
	Err error
	// Code is the error code
	ErrorCode string
}

BifrostError is the error struct.

func (*BifrostError) Code

func (e *BifrostError) Code() string

Code returns the error code.

func (*BifrostError) Error

func (e *BifrostError) Error() string

Error returns the error message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL