server

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0 Imports: 10 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.3.0 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 DeleteSourceSubset204Response added in v0.15.0

type DeleteSourceSubset204Response struct {
}

func (DeleteSourceSubset204Response) VisitDeleteSourceSubsetResponse added in v0.15.0

func (response DeleteSourceSubset204Response) VisitDeleteSourceSubsetResponse(w http.ResponseWriter) error

type DeleteSourceSubset400JSONResponse added in v0.15.0

type DeleteSourceSubset400JSONResponse externalRef0.Error

func (DeleteSourceSubset400JSONResponse) VisitDeleteSourceSubsetResponse added in v0.15.0

func (response DeleteSourceSubset400JSONResponse) VisitDeleteSourceSubsetResponse(w http.ResponseWriter) error

type DeleteSourceSubset401JSONResponse added in v0.15.0

type DeleteSourceSubset401JSONResponse externalRef0.Error

func (DeleteSourceSubset401JSONResponse) VisitDeleteSourceSubsetResponse added in v0.15.0

func (response DeleteSourceSubset401JSONResponse) VisitDeleteSourceSubsetResponse(w http.ResponseWriter) error

type DeleteSourceSubset403JSONResponse added in v0.15.0

type DeleteSourceSubset403JSONResponse externalRef0.Error

func (DeleteSourceSubset403JSONResponse) VisitDeleteSourceSubsetResponse added in v0.15.0

func (response DeleteSourceSubset403JSONResponse) VisitDeleteSourceSubsetResponse(w http.ResponseWriter) error

type DeleteSourceSubset404JSONResponse added in v0.15.0

type DeleteSourceSubset404JSONResponse externalRef0.Error

func (DeleteSourceSubset404JSONResponse) VisitDeleteSourceSubsetResponse added in v0.15.0

func (response DeleteSourceSubset404JSONResponse) VisitDeleteSourceSubsetResponse(w http.ResponseWriter) error

type DeleteSourceSubset500JSONResponse added in v0.15.0

type DeleteSourceSubset500JSONResponse externalRef0.Error

func (DeleteSourceSubset500JSONResponse) VisitDeleteSourceSubsetResponse added in v0.15.0

func (response DeleteSourceSubset500JSONResponse) VisitDeleteSourceSubsetResponse(w http.ResponseWriter) error

type DeleteSourceSubsetRequestObject added in v0.15.0

type DeleteSourceSubsetRequestObject struct {
	Id       openapi_types.UUID `json:"id"`
	SubsetId openapi_types.UUID `json:"subsetId"`
}

type DeleteSourceSubsetResponseObject added in v0.15.0

type DeleteSourceSubsetResponseObject interface {
	VisitDeleteSourceSubsetResponse(w http.ResponseWriter) 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 {

	// (PUT /api/v1/agents/{id}/status)
	UpdateAgentStatus(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

	// (PUT /api/v1/sources/{id})
	UpdateSource(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

	// (PUT /api/v1/sources/{id}/status)
	UpdateSourceInventory(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

	// (DELETE /api/v1/sources/{id}/subset/{subsetId})
	DeleteSourceSubset(w http.ResponseWriter, r *http.Request, id openapi_types.UUID, subsetId openapi_types.UUID)

	// (PUT /api/v1/sources/{id}/subset/{subsetId})
	UpdateSourceSubset(w http.ResponseWriter, r *http.Request, id openapi_types.UUID, subsetId openapi_types.UUID)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

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) DeleteSourceSubset added in v0.15.0

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

DeleteSourceSubset operation middleware

func (*ServerInterfaceWrapper) UpdateAgentStatus

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

UpdateAgentStatus operation middleware

func (*ServerInterfaceWrapper) UpdateSource added in v0.15.0

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

UpdateSource operation middleware

func (*ServerInterfaceWrapper) UpdateSourceInventory

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

UpdateSourceInventory operation middleware

func (*ServerInterfaceWrapper) UpdateSourceSubset added in v0.15.0

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

UpdateSourceSubset operation middleware

type Service

type Service interface {
	StrictServerInterface
}

Service is a wrapper around the generated server interface.

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {

	// (PUT /api/v1/agents/{id}/status)
	UpdateAgentStatus(ctx context.Context, request UpdateAgentStatusRequestObject) (UpdateAgentStatusResponseObject, error)

	// (PUT /api/v1/sources/{id})
	UpdateSource(ctx context.Context, request UpdateSourceRequestObject) (UpdateSourceResponseObject, error)

	// (PUT /api/v1/sources/{id}/status)
	UpdateSourceInventory(ctx context.Context, request UpdateSourceInventoryRequestObject) (UpdateSourceInventoryResponseObject, error)

	// (DELETE /api/v1/sources/{id}/subset/{subsetId})
	DeleteSourceSubset(ctx context.Context, request DeleteSourceSubsetRequestObject) (DeleteSourceSubsetResponseObject, error)

	// (PUT /api/v1/sources/{id}/subset/{subsetId})
	UpdateSourceSubset(ctx context.Context, request UpdateSourceSubsetRequestObject) (UpdateSourceSubsetResponseObject, error)
}

StrictServerInterface represents all server handlers.

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) DeleteSourceSubset added in v0.15.0

func (_ Unimplemented) DeleteSourceSubset(w http.ResponseWriter, r *http.Request, id openapi_types.UUID, subsetId openapi_types.UUID)

(DELETE /api/v1/sources/{id}/subset/{subsetId})

func (Unimplemented) UpdateAgentStatus

func (_ Unimplemented) UpdateAgentStatus(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

(PUT /api/v1/agents/{id}/status)

func (Unimplemented) UpdateSource added in v0.15.0

func (_ Unimplemented) UpdateSource(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

(PUT /api/v1/sources/{id})

func (Unimplemented) UpdateSourceInventory

func (_ Unimplemented) UpdateSourceInventory(w http.ResponseWriter, r *http.Request, id openapi_types.UUID)

(PUT /api/v1/sources/{id}/status)

func (Unimplemented) UpdateSourceSubset added in v0.15.0

func (_ Unimplemented) UpdateSourceSubset(w http.ResponseWriter, r *http.Request, id openapi_types.UUID, subsetId openapi_types.UUID)

(PUT /api/v1/sources/{id}/subset/{subsetId})

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

type UpdateAgentStatus200Response

type UpdateAgentStatus200Response struct {
}

func (UpdateAgentStatus200Response) VisitUpdateAgentStatusResponse

func (response UpdateAgentStatus200Response) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error

type UpdateAgentStatus201Response

type UpdateAgentStatus201Response struct {
}

func (UpdateAgentStatus201Response) VisitUpdateAgentStatusResponse

func (response UpdateAgentStatus201Response) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error

type UpdateAgentStatus400JSONResponse

type UpdateAgentStatus400JSONResponse externalRef0.Error

func (UpdateAgentStatus400JSONResponse) VisitUpdateAgentStatusResponse

func (response UpdateAgentStatus400JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error

type UpdateAgentStatus401JSONResponse

type UpdateAgentStatus401JSONResponse externalRef0.Error

func (UpdateAgentStatus401JSONResponse) VisitUpdateAgentStatusResponse

func (response UpdateAgentStatus401JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error

type UpdateAgentStatus403JSONResponse

type UpdateAgentStatus403JSONResponse externalRef0.Error

func (UpdateAgentStatus403JSONResponse) VisitUpdateAgentStatusResponse

func (response UpdateAgentStatus403JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error

type UpdateAgentStatus404JSONResponse

type UpdateAgentStatus404JSONResponse externalRef0.Error

func (UpdateAgentStatus404JSONResponse) VisitUpdateAgentStatusResponse

func (response UpdateAgentStatus404JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error

type UpdateAgentStatus500JSONResponse

type UpdateAgentStatus500JSONResponse externalRef0.Error

func (UpdateAgentStatus500JSONResponse) VisitUpdateAgentStatusResponse

func (response UpdateAgentStatus500JSONResponse) VisitUpdateAgentStatusResponse(w http.ResponseWriter) error

type UpdateAgentStatusRequestObject

type UpdateAgentStatusRequestObject struct {
	Id   openapi_types.UUID `json:"id"`
	Body *UpdateAgentStatusJSONRequestBody
}

type UpdateAgentStatusResponseObject

type UpdateAgentStatusResponseObject interface {
	VisitUpdateAgentStatusResponse(w http.ResponseWriter) error
}

type UpdateSource200JSONResponse added in v0.15.0

type UpdateSource200JSONResponse externalRef0.Source

func (UpdateSource200JSONResponse) VisitUpdateSourceResponse added in v0.15.0

func (response UpdateSource200JSONResponse) VisitUpdateSourceResponse(w http.ResponseWriter) error

type UpdateSource400JSONResponse added in v0.15.0

type UpdateSource400JSONResponse externalRef0.Error

func (UpdateSource400JSONResponse) VisitUpdateSourceResponse added in v0.15.0

func (response UpdateSource400JSONResponse) VisitUpdateSourceResponse(w http.ResponseWriter) error

type UpdateSource401JSONResponse added in v0.15.0

type UpdateSource401JSONResponse externalRef0.Error

func (UpdateSource401JSONResponse) VisitUpdateSourceResponse added in v0.15.0

func (response UpdateSource401JSONResponse) VisitUpdateSourceResponse(w http.ResponseWriter) error

type UpdateSource403JSONResponse added in v0.15.0

type UpdateSource403JSONResponse externalRef0.Error

func (UpdateSource403JSONResponse) VisitUpdateSourceResponse added in v0.15.0

func (response UpdateSource403JSONResponse) VisitUpdateSourceResponse(w http.ResponseWriter) error

type UpdateSource404JSONResponse added in v0.15.0

type UpdateSource404JSONResponse externalRef0.Error

func (UpdateSource404JSONResponse) VisitUpdateSourceResponse added in v0.15.0

func (response UpdateSource404JSONResponse) VisitUpdateSourceResponse(w http.ResponseWriter) error

type UpdateSource500JSONResponse added in v0.15.0

type UpdateSource500JSONResponse externalRef0.Error

func (UpdateSource500JSONResponse) VisitUpdateSourceResponse added in v0.15.0

func (response UpdateSource500JSONResponse) VisitUpdateSourceResponse(w http.ResponseWriter) error

type UpdateSourceInventory200JSONResponse

type UpdateSourceInventory200JSONResponse externalRef0.Source

func (UpdateSourceInventory200JSONResponse) VisitUpdateSourceInventoryResponse

func (response UpdateSourceInventory200JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error

type UpdateSourceInventory400JSONResponse

type UpdateSourceInventory400JSONResponse externalRef0.Error

func (UpdateSourceInventory400JSONResponse) VisitUpdateSourceInventoryResponse

func (response UpdateSourceInventory400JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error

type UpdateSourceInventory401JSONResponse

type UpdateSourceInventory401JSONResponse externalRef0.Error

func (UpdateSourceInventory401JSONResponse) VisitUpdateSourceInventoryResponse

func (response UpdateSourceInventory401JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error

type UpdateSourceInventory403JSONResponse

type UpdateSourceInventory403JSONResponse externalRef0.Error

func (UpdateSourceInventory403JSONResponse) VisitUpdateSourceInventoryResponse

func (response UpdateSourceInventory403JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error

type UpdateSourceInventory404JSONResponse

type UpdateSourceInventory404JSONResponse externalRef0.Error

func (UpdateSourceInventory404JSONResponse) VisitUpdateSourceInventoryResponse

func (response UpdateSourceInventory404JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error

type UpdateSourceInventory500JSONResponse

type UpdateSourceInventory500JSONResponse externalRef0.Error

func (UpdateSourceInventory500JSONResponse) VisitUpdateSourceInventoryResponse

func (response UpdateSourceInventory500JSONResponse) VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error

type UpdateSourceInventoryRequestObject

type UpdateSourceInventoryRequestObject struct {
	Id   openapi_types.UUID `json:"id"`
	Body *UpdateSourceInventoryJSONRequestBody
}

type UpdateSourceInventoryResponseObject

type UpdateSourceInventoryResponseObject interface {
	VisitUpdateSourceInventoryResponse(w http.ResponseWriter) error
}

type UpdateSourceRequestObject added in v0.15.0

type UpdateSourceRequestObject struct {
	Id   openapi_types.UUID `json:"id"`
	Body *UpdateSourceJSONRequestBody
}

type UpdateSourceResponseObject added in v0.15.0

type UpdateSourceResponseObject interface {
	VisitUpdateSourceResponse(w http.ResponseWriter) error
}

type UpdateSourceSubset200JSONResponse added in v0.15.0

type UpdateSourceSubset200JSONResponse SourceSubset

func (UpdateSourceSubset200JSONResponse) VisitUpdateSourceSubsetResponse added in v0.15.0

func (response UpdateSourceSubset200JSONResponse) VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error

type UpdateSourceSubset201JSONResponse added in v0.15.0

type UpdateSourceSubset201JSONResponse SourceSubset

func (UpdateSourceSubset201JSONResponse) VisitUpdateSourceSubsetResponse added in v0.15.0

func (response UpdateSourceSubset201JSONResponse) VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error

type UpdateSourceSubset400JSONResponse added in v0.15.0

type UpdateSourceSubset400JSONResponse externalRef0.Error

func (UpdateSourceSubset400JSONResponse) VisitUpdateSourceSubsetResponse added in v0.15.0

func (response UpdateSourceSubset400JSONResponse) VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error

type UpdateSourceSubset401JSONResponse added in v0.15.0

type UpdateSourceSubset401JSONResponse externalRef0.Error

func (UpdateSourceSubset401JSONResponse) VisitUpdateSourceSubsetResponse added in v0.15.0

func (response UpdateSourceSubset401JSONResponse) VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error

type UpdateSourceSubset403JSONResponse added in v0.15.0

type UpdateSourceSubset403JSONResponse externalRef0.Error

func (UpdateSourceSubset403JSONResponse) VisitUpdateSourceSubsetResponse added in v0.15.0

func (response UpdateSourceSubset403JSONResponse) VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error

type UpdateSourceSubset404JSONResponse added in v0.15.0

type UpdateSourceSubset404JSONResponse externalRef0.Error

func (UpdateSourceSubset404JSONResponse) VisitUpdateSourceSubsetResponse added in v0.15.0

func (response UpdateSourceSubset404JSONResponse) VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error

type UpdateSourceSubset500JSONResponse added in v0.15.0

type UpdateSourceSubset500JSONResponse externalRef0.Error

func (UpdateSourceSubset500JSONResponse) VisitUpdateSourceSubsetResponse added in v0.15.0

func (response UpdateSourceSubset500JSONResponse) VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error

type UpdateSourceSubsetRequestObject added in v0.15.0

type UpdateSourceSubsetRequestObject struct {
	Id       openapi_types.UUID `json:"id"`
	SubsetId openapi_types.UUID `json:"subsetId"`
	Body     *UpdateSourceSubsetJSONRequestBody
}

type UpdateSourceSubsetResponseObject added in v0.15.0

type UpdateSourceSubsetResponseObject interface {
	VisitUpdateSourceSubsetResponse(w http.ResponseWriter) error
}

Jump to

Keyboard shortcuts

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