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 ¶
NewWithSeverityf generates a Notice with a format string and severity.
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
Click to show internal directories.
Click to hide internal directories.