Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnyConverter ¶
type AnyConverter struct{}
func (AnyConverter) Convert ¶
func (a AnyConverter) Convert(err error) *unidb.Error
type GORMConverter ¶
type GORMConverter struct {
// contains filtered or unexported fields
}
GORMConverter defines error converter for multiple databases drivers used by the 'gorm' package. Implements 'Converter' interface.
func New ¶
func New(dialectName string) (conv *GORMConverter, err error)
New creates new *GORMConverter. On the base of the *gorm.DB argument it recognise given gorm.Dialect on the base of the dialect the function recognise the appropiate error converter. returns error if the nil pointer provided or unsupported db.Dialect
func (*GORMConverter) Convert ¶
func (g *GORMConverter) Convert(err error) (dbErr *unidb.Error)
Convert implements unidb.Converter Converts provided argument error into *unidb.Error type
Click to show internal directories.
Click to hide internal directories.