Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultDateFormat = "2006-01-02 15:04:05"
Variables ¶
View Source
var ErrRecordNotFound = errors.New("record not found")
Functions ¶
func ErrIsUserError ¶
func RoleFromString ¶
Types ¶
type AppError ¶ added in v1.0.0
type AppError struct {
Type ErrorType
Message string
Errors []FieldError // Optional validation errors
}
AppError represents a unified error type with additional context
func NewSystemError ¶ added in v1.0.0
NewSystemError creates an error for internal system failures
func NewUserError ¶ added in v1.0.0
NewUserError creates an error that represents a user mistake
func NewValidationError ¶ added in v1.0.0
func NewValidationError(message string, errors []FieldError) *AppError
NewValidationError creates an error for request validation failures
type AppSettings ¶
type DatabaseType ¶
type DatabaseType int
const ( DatabasePostgres DatabaseType = iota GoogleCloudsqlPostgres DatabaseSqlite )
type DateTime ¶
type DateTime struct {
// contains filtered or unexported fields
}
func NowDateTime ¶
func NowDateTime() DateTime
func ParseDateTime ¶
func (DateTime) MarshalJSON ¶
func (*DateTime) UnmarshalJSON ¶
type EventClient ¶
type EventClient string
const ( GcloudPubSubClient EventClient = "GcloudPubSub" AWSEventBridgeClient EventClient = "AWSEventBridgeClient" AWSSQSClient EventClient = "AWSSQSClient" )
type FieldError ¶
type Role ¶
type Role int
func (Role) MarshalJSON ¶
MarshalJSON converts the Role to its corresponding string representation for JSON serialization.
func (*Role) UnmarshalJSON ¶
UnmarshalJSON converts a JSON string to the corresponding Role value.
Click to show internal directories.
Click to hide internal directories.