internal

package
v6.6.9+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2017 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMultiRows = errors.New("pg: multiple rows in result set")
View Source
var ErrNoRows = errors.New("pg: no rows in result set")
View Source
var Logger *log.Logger

Functions

func AssertOneRow

func AssertOneRow(l int) error

func BytesToString

func BytesToString(b []byte) string

func Logf

func Logf(s string, args ...interface{})

func MakeSliceNextElemFunc

func MakeSliceNextElemFunc(v reflect.Value) func() reflect.Value

func RetryBackoff

func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration

Retry backoff with jitter sleep to prevent overloaded conditions during intervals https://www.awsarchitectureblog.com/2015/03/backoff.html

func StringToBytes

func StringToBytes(s string) []byte

func ToExported

func ToExported(s string) string

func ToUpper

func ToUpper(s string) string

func Underscore

func Underscore(s string) string

Underscore converts "CamelCasedString" to "camel_cased_string".

Types

type Error

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

func Errorf

func Errorf(s string, args ...interface{}) Error

func (Error) Error

func (err Error) Error() string

type PGError

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

func NewPGError

func NewPGError(m map[byte]string) PGError

func (PGError) Error

func (err PGError) Error() string

func (PGError) Field

func (err PGError) Field(k byte) string

func (PGError) IntegrityViolation

func (err PGError) IntegrityViolation() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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