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

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