shared

package
v0.15.1-beta6 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BadRequestBody = "bad request body format"

Variables

This section is empty.

Functions

func ApiOutputAbort added in v0.14.0

func ApiOutputAbort(c *gin.Context, err error)

ApiOutputAbort writes the HTTP response code header and saves the error internally, but doesn't push it to the response

func ApiOutputError

func ApiOutputError(c *gin.Context, err error)

ApiOutputError writes a JSON error message to the HTTP response body

func ApiOutputSuccess

func ApiOutputSuccess(c *gin.Context, body interface{}, status int)

ApiOutputSuccess writes a JSON success message to the HTTP response body

Types

type ApiBody

type ApiBody struct {
	Success bool     `json:"success"`
	Message string   `json:"message"`
	Causes  []string `json:"causes"`
}

type ResponsePipelines added in v0.13.0

type ResponsePipelines struct {
	Count     int64              `json:"count"`
	Pipelines []*models.Pipeline `json:"pipelines"`
}

Jump to

Keyboard shortcuts

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