gen

package
v0.0.0-...-36c55c0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package gen contains generated code for the hostname API.

Package gen 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

View Source
const (
	BearerAuthScopes = "BearerAuth.Scopes"
)

Variables

This section is empty.

Functions

func RegisterHandlers

func RegisterHandlers(router EchoRouter, si ServerInterface)

RegisterHandlers adds each server route to the EchoRouter.

func RegisterHandlersWithBaseURL

func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)

Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.

Types

type EchoRouter

type EchoRouter interface {
	CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
	TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route
}

This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration

type ErrorResponse

type ErrorResponse = externalRef0.ErrorResponse

ErrorResponse defines model for ErrorResponse.

type GetNodeHostname200JSONResponse

type GetNodeHostname200JSONResponse HostnameCollectionResponse

func (GetNodeHostname200JSONResponse) VisitGetNodeHostnameResponse

func (response GetNodeHostname200JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error

type GetNodeHostname400JSONResponse

type GetNodeHostname400JSONResponse externalRef0.ErrorResponse

func (GetNodeHostname400JSONResponse) VisitGetNodeHostnameResponse

func (response GetNodeHostname400JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error

type GetNodeHostname401JSONResponse

type GetNodeHostname401JSONResponse externalRef0.ErrorResponse

func (GetNodeHostname401JSONResponse) VisitGetNodeHostnameResponse

func (response GetNodeHostname401JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error

type GetNodeHostname403JSONResponse

type GetNodeHostname403JSONResponse externalRef0.ErrorResponse

func (GetNodeHostname403JSONResponse) VisitGetNodeHostnameResponse

func (response GetNodeHostname403JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error

type GetNodeHostname500JSONResponse

type GetNodeHostname500JSONResponse externalRef0.ErrorResponse

func (GetNodeHostname500JSONResponse) VisitGetNodeHostnameResponse

func (response GetNodeHostname500JSONResponse) VisitGetNodeHostnameResponse(w http.ResponseWriter) error

type GetNodeHostnameRequestObject

type GetNodeHostnameRequestObject struct {
	Hostname Hostname `json:"hostname"`
}

type GetNodeHostnameResponseObject

type GetNodeHostnameResponseObject interface {
	VisitGetNodeHostnameResponse(w http.ResponseWriter) error
}

type Hostname

type Hostname = string

Hostname defines model for Hostname.

type HostnameCollectionResponse

type HostnameCollectionResponse struct {
	// JobId The job ID used to process this request.
	JobId   *openapi_types.UUID `json:"job_id,omitempty"`
	Results []HostnameResponse  `json:"results"`
}

HostnameCollectionResponse defines model for HostnameCollectionResponse.

type HostnameResponse

type HostnameResponse struct {
	// Changed Whether the operation modified system state.
	Changed *bool `json:"changed,omitempty"`

	// Error Error message if the agent failed.
	Error *string `json:"error,omitempty"`

	// Hostname The system's hostname.
	Hostname string `json:"hostname"`

	// Labels Key-value labels configured on the agent.
	Labels *map[string]string `json:"labels,omitempty"`

	// Status The status of the operation for this host.
	Status HostnameResponseStatus `json:"status"`
}

HostnameResponse The hostname of the system.

type HostnameResponseStatus

type HostnameResponseStatus string

HostnameResponseStatus The status of the operation for this host.

const (
	HostnameResponseStatusFailed  HostnameResponseStatus = "failed"
	HostnameResponseStatusOk      HostnameResponseStatus = "ok"
	HostnameResponseStatusSkipped HostnameResponseStatus = "skipped"
)

Defines values for HostnameResponseStatus.

type HostnameUpdateCollectionResponse

type HostnameUpdateCollectionResponse struct {
	// JobId The job ID used to process this request.
	JobId   *openapi_types.UUID        `json:"job_id,omitempty"`
	Results []HostnameUpdateResultItem `json:"results"`
}

HostnameUpdateCollectionResponse defines model for HostnameUpdateCollectionResponse.

type HostnameUpdateRequest

type HostnameUpdateRequest struct {
	// Hostname The new hostname to set.
	Hostname string `json:"hostname" validate:"required,min=1,max=253"`
}

HostnameUpdateRequest defines model for HostnameUpdateRequest.

type HostnameUpdateResultItem

type HostnameUpdateResultItem struct {
	// Changed Whether the hostname was actually modified.
	Changed *bool   `json:"changed,omitempty"`
	Error   *string `json:"error,omitempty"`

	// Hostname The hostname of the agent.
	Hostname string                         `json:"hostname"`
	Status   HostnameUpdateResultItemStatus `json:"status"`
}

HostnameUpdateResultItem defines model for HostnameUpdateResultItem.

type HostnameUpdateResultItemStatus

type HostnameUpdateResultItemStatus string

HostnameUpdateResultItemStatus defines model for HostnameUpdateResultItem.Status.

const (
	HostnameUpdateResultItemStatusFailed  HostnameUpdateResultItemStatus = "failed"
	HostnameUpdateResultItemStatusOk      HostnameUpdateResultItemStatus = "ok"
	HostnameUpdateResultItemStatusSkipped HostnameUpdateResultItemStatus = "skipped"
)

Defines values for HostnameUpdateResultItemStatus.

type PutNodeHostname202JSONResponse

type PutNodeHostname202JSONResponse HostnameUpdateCollectionResponse

func (PutNodeHostname202JSONResponse) VisitPutNodeHostnameResponse

func (response PutNodeHostname202JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error

type PutNodeHostname400JSONResponse

type PutNodeHostname400JSONResponse externalRef0.ErrorResponse

func (PutNodeHostname400JSONResponse) VisitPutNodeHostnameResponse

func (response PutNodeHostname400JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error

type PutNodeHostname401JSONResponse

type PutNodeHostname401JSONResponse externalRef0.ErrorResponse

func (PutNodeHostname401JSONResponse) VisitPutNodeHostnameResponse

func (response PutNodeHostname401JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error

type PutNodeHostname403JSONResponse

type PutNodeHostname403JSONResponse externalRef0.ErrorResponse

func (PutNodeHostname403JSONResponse) VisitPutNodeHostnameResponse

func (response PutNodeHostname403JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error

type PutNodeHostname500JSONResponse

type PutNodeHostname500JSONResponse externalRef0.ErrorResponse

func (PutNodeHostname500JSONResponse) VisitPutNodeHostnameResponse

func (response PutNodeHostname500JSONResponse) VisitPutNodeHostnameResponse(w http.ResponseWriter) error

type PutNodeHostnameJSONRequestBody

type PutNodeHostnameJSONRequestBody = HostnameUpdateRequest

PutNodeHostnameJSONRequestBody defines body for PutNodeHostname for application/json ContentType.

type PutNodeHostnameRequestObject

type PutNodeHostnameRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Body     *PutNodeHostnameJSONRequestBody
}

type PutNodeHostnameResponseObject

type PutNodeHostnameResponseObject interface {
	VisitPutNodeHostnameResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// Retrieve node hostname
	// (GET /api/node/{hostname}/hostname)
	GetNodeHostname(ctx echo.Context, hostname Hostname) error
	// Update node hostname
	// (PUT /api/node/{hostname}/hostname)
	PutNodeHostname(ctx echo.Context, hostname Hostname) error
}

ServerInterface represents all server handlers.

func NewStrictHandler

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

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler ServerInterface
}

ServerInterfaceWrapper converts echo contexts to parameters.

func (*ServerInterfaceWrapper) GetNodeHostname

func (w *ServerInterfaceWrapper) GetNodeHostname(ctx echo.Context) error

GetNodeHostname converts echo context to params.

func (*ServerInterfaceWrapper) PutNodeHostname

func (w *ServerInterfaceWrapper) PutNodeHostname(ctx echo.Context) error

PutNodeHostname converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Retrieve node hostname
	// (GET /api/node/{hostname}/hostname)
	GetNodeHostname(ctx context.Context, request GetNodeHostnameRequestObject) (GetNodeHostnameResponseObject, error)
	// Update node hostname
	// (PUT /api/node/{hostname}/hostname)
	PutNodeHostname(ctx context.Context, request PutNodeHostnameRequestObject) (PutNodeHostnameResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

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