pgnotice

package
v0.0.0-...-1dc08c0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DisplaySeverityError is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityError to display.
	DisplaySeverityError = iota
	// DisplaySeverityWarning is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityWarning to display.
	DisplaySeverityWarning
	// DisplaySeverityNotice is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityNotice to display.
	DisplaySeverityNotice
	// DisplaySeverityLog is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityLog.g to display.
	DisplaySeverityLog
	// DisplaySeverityDebug1 is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityDebug1 to display.
	DisplaySeverityDebug1
	// DisplaySeverityDebug2 is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityDebug2 to display.
	DisplaySeverityDebug2
	// DisplaySeverityDebug3 is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityDebug3 to display.
	DisplaySeverityDebug3
	// DisplaySeverityDebug4 is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityDebug4 to display.
	DisplaySeverityDebug4
	// DisplaySeverityDebug5 is a DisplaySeverity value allowing all notices
	// of value <= DisplaySeverityDebug5 to display.
	DisplaySeverityDebug5
)

Variables

This section is empty.

Functions

func NewWithSeverityf

func NewWithSeverityf(severity string, format string, args ...interface{}) error

NewWithSeverityf generates a Notice with a format string and severity.

func Newf

func Newf(format string, args ...interface{}) error

Newf generates a Notice with a format string.

func ValidDisplaySeverities

func ValidDisplaySeverities() []string

ValidDisplaySeverities returns a list of all valid severities.

Types

type DisplaySeverity

type DisplaySeverity int

DisplaySeverity indicates the severity of a given error for the purposes of displaying notices. This corresponds to the allowed values for the `client_min_messages` variable in postgres.

func ParseDisplaySeverity

func ParseDisplaySeverity(k string) (DisplaySeverity, bool)

ParseDisplaySeverity translates a string to a DisplaySeverity. Returns the severity, and a bool indicating whether the severity exists.

func (DisplaySeverity) String

func (ns DisplaySeverity) String() string

Jump to

Keyboard shortcuts

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