server

package
v0.0.0-...-37f5ccb Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(code int, err error, op string) error

func WrapHandler

func WrapHandler(handler HandlerFunc) gin.HandlerFunc

Types

type Error

type Error struct {
	// Machine-readable error code.
	HTTPStatusCode int `json:"http_status_code,omitempty"`

	// Human-readable message.
	Message string `json:"message,omitempty"`
	Request string `json:"request,omitempty"`

	// Logical operation and nested error.
	Op  string `json:"op,omitempty"`
	Err error  `json:"error,omitempty"`
}

Error defines a standard application error.

func (*Error) Error

func (e *Error) Error() string

Error returns the string representation of the error message.

type HandlerFunc

type HandlerFunc func(c *gin.Context) error

type Server

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

func New

func New(c config.Config) (Server, error)

func (*Server) Run

func (s *Server) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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