common

package
v0.0.0-...-7555876 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTypeUnknown       = ErrorType{"unknown"}       //nolint:gochecknoglobals
	ErrTypeInvalidInput  = ErrorType{"invalid-input"} //nolint:gochecknoglobals
	ErrTypeAuthorization = ErrorType{"authorization"} //nolint:gochecknoglobals
)

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Key       string
	Msg       string
	Cause     error
	ErrorType ErrorType
}

func NewAuthorizationError

func NewAuthorizationError(err error, key string) AppError

func NewInvalidInputError

func NewInvalidInputError(err error, key string, msg string) AppError

func NewInvalidInputMsg

func NewInvalidInputMsg(key string, msg string) AppError

func NewUnknownError

func NewUnknownError(err error, key string) AppError

func (AppError) Error

func (e AppError) Error() string

func (AppError) Unwrap

func (e AppError) Unwrap() error

type ErrorType

type ErrorType struct {
	// contains filtered or unexported fields
}

type TimeService

type TimeService interface {
	Now() time.Time
}

func NewFakeTimeService

func NewFakeTimeService(time time.Time) TimeService

func NewTimeService

func NewTimeService() TimeService

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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