utils

package
v0.0.0-...-62a8130 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logrus.New()

Functions

func DocGen

func DocGen(r chi.Router)

func ErrCustomError

func ErrCustomError(errCode int, errMsg string) render.Renderer

func ErrInvalidRequest

func ErrInvalidRequest(errMsg string) render.Renderer

func ErrNotFoundError

func ErrNotFoundError(errMsg string) render.Renderer

func ErrServerError

func ErrServerError(errMsg string) render.Renderer

func InitLogger

func InitLogger()

func LoadEnv

func LoadEnv()

Types

type ErrResponse

type ErrResponse struct {
	Err            error `json:"-"` // low-level runtime error
	HTTPStatusCode int   `json:"-"` // http response status code

	ErrMsg string `json:"errorMsg,omitempty"`
}

func (*ErrResponse) Render

func (e *ErrResponse) Render(w http.ResponseWriter, r *http.Request) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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