dberror

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractStr

func ExtractStr(s, left, right string) string

ExtractStr is used to extract error message

Types

type CheckConstraint

type CheckConstraint struct {
	Message string `json:"message"`
	Field   string `json:"field"`
	Err     error  `json:"err"`
}

CheckConstraint error is for handling for check constrait errors

func (CheckConstraint) Error

func (e CheckConstraint) Error() string

type ForeignKeyConstraint

type ForeignKeyConstraint struct {
	Message string `json:"message"`
	Field   string `json:"field"`
	Err     error  `json:"err"`
}

ForeignKeyConstraint error is for handling for check constrait errors

func (ForeignKeyConstraint) Error

func (e ForeignKeyConstraint) Error() string

type UniqueConstraint

type UniqueConstraint struct {
	Message string `json:"message"`
	Field   string `json:"field"`
	Err     error  `json:"err"`
}

UniqueConstraint error is for handling for unique constrait errors

func (UniqueConstraint) Error

func (e UniqueConstraint) Error() string

Jump to

Keyboard shortcuts

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