Files
fasten-onprem/backend/pkg/errors/errors.go
Jason Kulatunga 504cd4264c [WIP] adding factory pattern support to Database package.
Users can select database type using database.type configuration when calling NewRepository()
2023-10-12 14:19:12 -07:00

27 lines
648 B
Go

package errors
import (
"fmt"
)
// Raised when config file is missing
type ConfigFileMissingError string
func (str ConfigFileMissingError) Error() string {
return fmt.Sprintf("ConfigFileMissingError: %q", string(str))
}
// Raised when the config file doesnt match schema
type ConfigValidationError string
func (str ConfigValidationError) Error() string {
return fmt.Sprintf("ConfigValidationError: %q", string(str))
}
// Raised when the database type is unsupported
type DatabaseTypeNotSupportedError string
func (str DatabaseTypeNotSupportedError) Error() string {
return fmt.Sprintf("DatabaseTypeNotSupportedError: %q", string(str))
}