server

package
v1.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package server provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.1 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {

	// (GET /api/v1/imagebuilds)
	ListImageBuilds(w http.ResponseWriter, r *http.Request, params ListImageBuildsParams)

	// (POST /api/v1/imagebuilds)
	CreateImageBuild(w http.ResponseWriter, r *http.Request)

	// (DELETE /api/v1/imagebuilds/{name})
	DeleteImageBuild(w http.ResponseWriter, r *http.Request, name string)

	// (GET /api/v1/imagebuilds/{name})
	GetImageBuild(w http.ResponseWriter, r *http.Request, name string, params GetImageBuildParams)

	// (POST /api/v1/imagebuilds/{name}/cancel)
	CancelImageBuild(w http.ResponseWriter, r *http.Request, name string)

	// (GET /api/v1/imagebuilds/{name}/log)
	GetImageBuildLog(w http.ResponseWriter, r *http.Request, name string, params GetImageBuildLogParams)

	// (GET /api/v1/imageexports)
	ListImageExports(w http.ResponseWriter, r *http.Request, params ListImageExportsParams)

	// (POST /api/v1/imageexports)
	CreateImageExport(w http.ResponseWriter, r *http.Request)

	// (DELETE /api/v1/imageexports/{name})
	DeleteImageExport(w http.ResponseWriter, r *http.Request, name string)

	// (GET /api/v1/imageexports/{name})
	GetImageExport(w http.ResponseWriter, r *http.Request, name string)

	// (POST /api/v1/imageexports/{name}/cancel)
	CancelImageExport(w http.ResponseWriter, r *http.Request, name string)

	// (GET /api/v1/imageexports/{name}/download)
	DownloadImageExport(w http.ResponseWriter, r *http.Request, name string)

	// (GET /api/v1/imageexports/{name}/log)
	GetImageExportLog(w http.ResponseWriter, r *http.Request, name string, params GetImageExportLogParams)
}

ServerInterface represents all server handlers.

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CancelImageBuild

func (siw *ServerInterfaceWrapper) CancelImageBuild(w http.ResponseWriter, r *http.Request)

CancelImageBuild operation middleware

func (*ServerInterfaceWrapper) CancelImageExport

func (siw *ServerInterfaceWrapper) CancelImageExport(w http.ResponseWriter, r *http.Request)

CancelImageExport operation middleware

func (*ServerInterfaceWrapper) CreateImageBuild

func (siw *ServerInterfaceWrapper) CreateImageBuild(w http.ResponseWriter, r *http.Request)

CreateImageBuild operation middleware

func (*ServerInterfaceWrapper) CreateImageExport

func (siw *ServerInterfaceWrapper) CreateImageExport(w http.ResponseWriter, r *http.Request)

CreateImageExport operation middleware

func (*ServerInterfaceWrapper) DeleteImageBuild

func (siw *ServerInterfaceWrapper) DeleteImageBuild(w http.ResponseWriter, r *http.Request)

DeleteImageBuild operation middleware

func (*ServerInterfaceWrapper) DeleteImageExport

func (siw *ServerInterfaceWrapper) DeleteImageExport(w http.ResponseWriter, r *http.Request)

DeleteImageExport operation middleware

func (*ServerInterfaceWrapper) DownloadImageExport

func (siw *ServerInterfaceWrapper) DownloadImageExport(w http.ResponseWriter, r *http.Request)

DownloadImageExport operation middleware

func (*ServerInterfaceWrapper) GetImageBuild

func (siw *ServerInterfaceWrapper) GetImageBuild(w http.ResponseWriter, r *http.Request)

GetImageBuild operation middleware

func (*ServerInterfaceWrapper) GetImageBuildLog

func (siw *ServerInterfaceWrapper) GetImageBuildLog(w http.ResponseWriter, r *http.Request)

GetImageBuildLog operation middleware

func (*ServerInterfaceWrapper) GetImageExport

func (siw *ServerInterfaceWrapper) GetImageExport(w http.ResponseWriter, r *http.Request)

GetImageExport operation middleware

func (*ServerInterfaceWrapper) GetImageExportLog

func (siw *ServerInterfaceWrapper) GetImageExportLog(w http.ResponseWriter, r *http.Request)

GetImageExportLog operation middleware

func (*ServerInterfaceWrapper) ListImageBuilds

func (siw *ServerInterfaceWrapper) ListImageBuilds(w http.ResponseWriter, r *http.Request)

ListImageBuilds operation middleware

func (*ServerInterfaceWrapper) ListImageExports

func (siw *ServerInterfaceWrapper) ListImageExports(w http.ResponseWriter, r *http.Request)

ListImageExports operation middleware

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) CancelImageBuild

func (_ Unimplemented) CancelImageBuild(w http.ResponseWriter, r *http.Request, name string)

(POST /api/v1/imagebuilds/{name}/cancel)

func (Unimplemented) CancelImageExport

func (_ Unimplemented) CancelImageExport(w http.ResponseWriter, r *http.Request, name string)

(POST /api/v1/imageexports/{name}/cancel)

func (Unimplemented) CreateImageBuild

func (_ Unimplemented) CreateImageBuild(w http.ResponseWriter, r *http.Request)

(POST /api/v1/imagebuilds)

func (Unimplemented) CreateImageExport

func (_ Unimplemented) CreateImageExport(w http.ResponseWriter, r *http.Request)

(POST /api/v1/imageexports)

func (Unimplemented) DeleteImageBuild

func (_ Unimplemented) DeleteImageBuild(w http.ResponseWriter, r *http.Request, name string)

(DELETE /api/v1/imagebuilds/{name})

func (Unimplemented) DeleteImageExport

func (_ Unimplemented) DeleteImageExport(w http.ResponseWriter, r *http.Request, name string)

(DELETE /api/v1/imageexports/{name})

func (Unimplemented) DownloadImageExport

func (_ Unimplemented) DownloadImageExport(w http.ResponseWriter, r *http.Request, name string)

(GET /api/v1/imageexports/{name}/download)

func (Unimplemented) GetImageBuild

func (_ Unimplemented) GetImageBuild(w http.ResponseWriter, r *http.Request, name string, params GetImageBuildParams)

(GET /api/v1/imagebuilds/{name})

func (Unimplemented) GetImageBuildLog

func (_ Unimplemented) GetImageBuildLog(w http.ResponseWriter, r *http.Request, name string, params GetImageBuildLogParams)

(GET /api/v1/imagebuilds/{name}/log)

func (Unimplemented) GetImageExport

func (_ Unimplemented) GetImageExport(w http.ResponseWriter, r *http.Request, name string)

(GET /api/v1/imageexports/{name})

func (Unimplemented) GetImageExportLog

func (_ Unimplemented) GetImageExportLog(w http.ResponseWriter, r *http.Request, name string, params GetImageExportLogParams)

(GET /api/v1/imageexports/{name}/log)

func (Unimplemented) ListImageBuilds

func (_ Unimplemented) ListImageBuilds(w http.ResponseWriter, r *http.Request, params ListImageBuildsParams)

(GET /api/v1/imagebuilds)

func (Unimplemented) ListImageExports

func (_ Unimplemented) ListImageExports(w http.ResponseWriter, r *http.Request, params ListImageExportsParams)

(GET /api/v1/imageexports)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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