cockroach: github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgnotice Index | Files

package pgnotice

import "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgnotice"

Index

Package Files

display_severity.go pgnotice.go

Constants

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
)

func NewWithSeverityf Uses

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

NewWithSeverityf generates a Notice with a format string and severity.

func Newf Uses

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

Newf generates a Notice with a format string.

func ValidDisplaySeverities Uses

func ValidDisplaySeverities() []string

ValidDisplaySeverities returns a list of all valid severities.

type DisplaySeverity Uses

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 Uses

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 Uses

func (ns DisplaySeverity) String() string

Package pgnotice imports 5 packages (graph) and is imported by 3 packages. Updated 2020-04-28. Refresh now. Tools for package owners.