status

package
v0.0.0-...-47b83b8 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OK        = Status{Code: codes.OK}
	Created   = Status{Code: codes.Created}
	NoContent = Status{Code: codes.NoContent}
	NotFound  = Status{Code: codes.NotFound}
)

convenience vars for common response.

Functions

This section is empty.

Types

type Status

type Status struct {
	codes.Code
	Message string
}

func New

func New(code codes.Code, v any) Status

func Newf

func Newf(code codes.Code, format string, v ...any) Status

func Pg

func Pg(e *pq.Error) Status

Pg converts an pq.Error into a Status.

func (Status) Error

func (s Status) Error() string

Jump to

Keyboard shortcuts

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