openapi

package
v0.0.0-...-1d14c1d Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const JobAPIPrefix = "/api/v1/jobs/"

JobAPIPrefix is the prefix of the job API.

View Source
const JobDetailAPIFormat = JobAPIPrefix + "%s/status"

JobDetailAPIFormat is the path format for job detail status the entire path is: /api/v1/jobs/${jobID}/status

Variables

This section is empty.

Functions

func SwaggerAPIv1

func SwaggerAPIv1(
	writer http.ResponseWriter,
	_ *http.Request,
)

SwaggerAPIv1 serves the apiv1 swagger json file.

func SwaggerUI

func SwaggerUI(
	writer http.ResponseWriter,
	_ *http.Request,
)

SwaggerUI renders the swagger ui.

func WriteHTTPError

func WriteHTTPError(w http.ResponseWriter, err error)

WriteHTTPError writes error to http response with normalized error format.

Types

type HTTPError

type HTTPError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

HTTPError is the error format for http response.

func NewHTTPError

func NewHTTPError(err error) *HTTPError

NewHTTPError creates a new HTTPError.

Jump to

Keyboard shortcuts

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