This section is empty.


View Source
var (
	// Not Found Error
	ErrNotFound = errors.New("not found")
	// User Not Provided Error
	ErrNoUserProvided = errors.New("user not provided")
	// Database Connection Error
	ErrDBConnection = errors.New("database connection error")
	// Password Not Equal Error
	ErrPasswordsNotEqual = errors.New("password not equal to confirmed password")
	// User Already Exists Error
	ErrUserAlreadyExists = errors.New("user already exists")
	// No User Name Provided Error
	ErrNoUsernameProvided = errors.New("no user name provided")
	// No Password Provided Error
	ErrNoPasswordProvided = errors.New("no password provided")
	// Invalid Username Provided Error
	ErrInvalidUsernameProvided = errors.New("invalid username provided")
	// Invalid Password Provided Error
	ErrInvalidPasswordProvided = errors.New("invalid password provided")
	// Invalid Arguments Provided Error
	ErrInvalidArgumentProvided = errors.New("invalid argument/s provided")
	// Inconsistent IDs Error
	ErrInconsistentIDs = errors.New("inconsistent IDs")
	// Already Exists Error
	ErrAlreadyExists = errors.New("already exists")
	// Inconsistent Mapping Between Route and Handler Error
	ErrBadRouting = errors.New("inconsistent mapping between route and handler (programmer error)")


func WelcomeMessage

func WelcomeMessage(firstname, lastname string) string


type ErrorHandlerFunc

type ErrorHandlerFunc func(ctx context.Context, err error)

The ErrorHandlerFunc type is an adapter to allow the use of ordinary function as ErrorHandler. If f is a function with the appropriate signature, ErrorHandlerFunc(f) is a ErrorHandler that calls f.

func (ErrorHandlerFunc) Handle

func (f ErrorHandlerFunc) Handle(ctx context.Context, err error)

Handle calls f(ctx, err).

type Handler

type Handler struct {
	// contains filtered or unexported fields

func NewTransportHandler

func NewTransportHandler(logger *zap.Logger) Handler

NewTransportHandler defines a new transport handler

func (Handler) Handle

func (handler Handler) Handle(ctx context.Context, err error)

Handle Logs errors if present