errors

package
v0.6.103 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 12 Imported by: 7

Documentation

Overview

Generic errors used across files in repositories/

Postgres-specific implementation of an ErrorTransformer. This errors utility translates postgres application error codes into internal error types. The go postgres driver defines possible error codes here: https://github.com/lib/pq/blob/master/error.go And the postgres standard defines error responses here:

https://www.postgresql.org/docs/current/static/protocol-error-fields.html

Inspired by https://www.codementor.io/tamizhvendan/managing-data-in-golang-using-gorm-part-1-a9cdjb8nb

Implementation of an error transformer for test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInvalidInputError

func GetInvalidInputError(input string) errors.FlyteAdminError

func GetMissingEntityByIDError

func GetMissingEntityByIDError(entityType string) errors.FlyteAdminError

func GetMissingEntityError

func GetMissingEntityError(entityType string, identifier proto.Message) errors.FlyteAdminError

func GetSingletonMissingEntityError added in v0.6.23

func GetSingletonMissingEntityError(entityType string) errors.FlyteAdminError

Types

type ErrorTransformer

type ErrorTransformer interface {
	ToFlyteAdminError(err error) admin_errors.FlyteAdminError
}

Defines the basic error transformer interface that all database types must implement.

func NewPostgresErrorTransformer

func NewPostgresErrorTransformer(scope promutils.Scope) ErrorTransformer

func NewTestErrorTransformer

func NewTestErrorTransformer() ErrorTransformer

Jump to

Keyboard shortcuts

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