xpq

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is an implementation of the xservice.Driver for the go-pg.

func DefaultDriver

func DefaultDriver() *Driver

DefaultDriver gets the default lib/pq driver.

func NewDriver

func NewDriver() *Driver

NewDriver creates a new driver implementation for the go-pg.

func (*Driver) CanRetry

func (d *Driver) CanRetry(err error) bool

CanRetry implements xservice.Driver interface.

func (*Driver) CustomErrorCode

func (d *Driver) CustomErrorCode(class string, code cgerrors.ErrorCode)

CustomErrorCode overwrites default error map for given class, which would result in given code.

func (*Driver) DriverName added in v0.0.16

func (d *Driver) DriverName() string

DriverName gets the name of the driver.

func (*Driver) Err

func (d *Driver) Err(err error) *cgerrors.Error

Err converts given error into a cgerrors.Error.

func (*Driver) ErrorCode

func (d *Driver) ErrorCode(err error) cgerrors.ErrorCode

ErrorCode implements xservice.Driver interface.

Jump to

Keyboard shortcuts

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