api

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 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