api

package
v0.2.20 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorCanceled     errorType = "canceled"     //
	ErrorExec         errorType = "execution"    //
	ErrorUnauthorized errorType = "unauthorized" // 401 Unauthorized
	ErrorNotFound     errorType = "not_found"    // 404 Not Found
	ErrorBadData      errorType = "bad_data"     // 405 StatusMethodNotAllowed
	ErrorTimeout      errorType = "timeout"      // 408 Request Timeout
	ErrorInternal     errorType = "internal"     // 500 Internal Server Error
	ErrorUnavailable  errorType = "unavailable"  // 503 Service Unavailable
)

Variables

This section is empty.

Functions

func ResponseError

func ResponseError(c *gin.Context, typ errorType, err error)

Types

type Error

type Error struct {
	Type errorType
	Err  error
}

Jump to

Keyboard shortcuts

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