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 NTP 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 DeleteNodeNtp200JSONResponse

type DeleteNodeNtp200JSONResponse NtpDeleteResponse

func (DeleteNodeNtp200JSONResponse) VisitDeleteNodeNtpResponse

func (response DeleteNodeNtp200JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error

type DeleteNodeNtp400JSONResponse

type DeleteNodeNtp400JSONResponse externalRef0.ErrorResponse

func (DeleteNodeNtp400JSONResponse) VisitDeleteNodeNtpResponse

func (response DeleteNodeNtp400JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error

type DeleteNodeNtp401JSONResponse

type DeleteNodeNtp401JSONResponse externalRef0.ErrorResponse

func (DeleteNodeNtp401JSONResponse) VisitDeleteNodeNtpResponse

func (response DeleteNodeNtp401JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error

type DeleteNodeNtp403JSONResponse

type DeleteNodeNtp403JSONResponse externalRef0.ErrorResponse

func (DeleteNodeNtp403JSONResponse) VisitDeleteNodeNtpResponse

func (response DeleteNodeNtp403JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error

type DeleteNodeNtp404JSONResponse

type DeleteNodeNtp404JSONResponse externalRef0.ErrorResponse

func (DeleteNodeNtp404JSONResponse) VisitDeleteNodeNtpResponse

func (response DeleteNodeNtp404JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error

type DeleteNodeNtp500JSONResponse

type DeleteNodeNtp500JSONResponse externalRef0.ErrorResponse

func (DeleteNodeNtp500JSONResponse) VisitDeleteNodeNtpResponse

func (response DeleteNodeNtp500JSONResponse) VisitDeleteNodeNtpResponse(w http.ResponseWriter) error

type DeleteNodeNtpRequestObject

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

type DeleteNodeNtpResponseObject

type DeleteNodeNtpResponseObject interface {
	VisitDeleteNodeNtpResponse(w http.ResponseWriter) error
}

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 GetNodeNtp200JSONResponse

type GetNodeNtp200JSONResponse NtpCollectionResponse

func (GetNodeNtp200JSONResponse) VisitGetNodeNtpResponse

func (response GetNodeNtp200JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error

type GetNodeNtp400JSONResponse

type GetNodeNtp400JSONResponse externalRef0.ErrorResponse

func (GetNodeNtp400JSONResponse) VisitGetNodeNtpResponse

func (response GetNodeNtp400JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error

type GetNodeNtp401JSONResponse

type GetNodeNtp401JSONResponse externalRef0.ErrorResponse

func (GetNodeNtp401JSONResponse) VisitGetNodeNtpResponse

func (response GetNodeNtp401JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error

type GetNodeNtp403JSONResponse

type GetNodeNtp403JSONResponse externalRef0.ErrorResponse

func (GetNodeNtp403JSONResponse) VisitGetNodeNtpResponse

func (response GetNodeNtp403JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error

type GetNodeNtp500JSONResponse

type GetNodeNtp500JSONResponse externalRef0.ErrorResponse

func (GetNodeNtp500JSONResponse) VisitGetNodeNtpResponse

func (response GetNodeNtp500JSONResponse) VisitGetNodeNtpResponse(w http.ResponseWriter) error

type GetNodeNtpRequestObject

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

type GetNodeNtpResponseObject

type GetNodeNtpResponseObject interface {
	VisitGetNodeNtpResponse(w http.ResponseWriter) error
}

type Hostname

type Hostname = string

Hostname defines model for Hostname.

type NtpCollectionResponse

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

NtpCollectionResponse defines model for NtpCollectionResponse.

type NtpCreateRequest

type NtpCreateRequest struct {
	// Servers List of NTP server addresses to configure.
	Servers []string `json:"servers" validate:"required,min=1"`
}

NtpCreateRequest defines model for NtpCreateRequest.

type NtpCreateResponse

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

NtpCreateResponse defines model for NtpCreateResponse.

type NtpDeleteResponse

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

NtpDeleteResponse defines model for NtpDeleteResponse.

type NtpMutationResult

type NtpMutationResult 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 Hostname of the agent that processed this operation.
	Hostname string `json:"hostname"`

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

NtpMutationResult Result of an NTP create, update, or delete operation for one host.

type NtpMutationResultStatus

type NtpMutationResultStatus string

NtpMutationResultStatus The status of the operation for this host.

const (
	NtpMutationResultStatusFailed  NtpMutationResultStatus = "failed"
	NtpMutationResultStatusOk      NtpMutationResultStatus = "ok"
	NtpMutationResultStatusSkipped NtpMutationResultStatus = "skipped"
)

Defines values for NtpMutationResultStatus.

type NtpStatusEntry

type NtpStatusEntry struct {
	// CurrentSource The currently selected NTP source.
	CurrentSource *string `json:"current_source,omitempty"`

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

	// Hostname Hostname of the agent that reported this entry.
	Hostname string `json:"hostname"`

	// Offset Clock offset from the NTP source.
	Offset *string `json:"offset,omitempty"`

	// Servers Configured NTP server addresses.
	Servers *[]string `json:"servers,omitempty"`

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

	// Stratum NTP stratum level.
	Stratum *int `json:"stratum,omitempty"`

	// Synchronized Whether the system clock is synchronized.
	Synchronized *bool `json:"synchronized,omitempty"`
}

NtpStatusEntry NTP status for a single host.

type NtpStatusEntryStatus

type NtpStatusEntryStatus string

NtpStatusEntryStatus The status of the operation for this host.

const (
	NtpStatusEntryStatusFailed  NtpStatusEntryStatus = "failed"
	NtpStatusEntryStatusOk      NtpStatusEntryStatus = "ok"
	NtpStatusEntryStatusSkipped NtpStatusEntryStatus = "skipped"
)

Defines values for NtpStatusEntryStatus.

type NtpUpdateRequest

type NtpUpdateRequest struct {
	// Servers List of NTP server addresses to configure.
	Servers []string `json:"servers" validate:"required,min=1"`
}

NtpUpdateRequest defines model for NtpUpdateRequest.

type NtpUpdateResponse

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

NtpUpdateResponse defines model for NtpUpdateResponse.

type PostNodeNtp200JSONResponse

type PostNodeNtp200JSONResponse NtpCreateResponse

func (PostNodeNtp200JSONResponse) VisitPostNodeNtpResponse

func (response PostNodeNtp200JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error

type PostNodeNtp400JSONResponse

type PostNodeNtp400JSONResponse externalRef0.ErrorResponse

func (PostNodeNtp400JSONResponse) VisitPostNodeNtpResponse

func (response PostNodeNtp400JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error

type PostNodeNtp401JSONResponse

type PostNodeNtp401JSONResponse externalRef0.ErrorResponse

func (PostNodeNtp401JSONResponse) VisitPostNodeNtpResponse

func (response PostNodeNtp401JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error

type PostNodeNtp403JSONResponse

type PostNodeNtp403JSONResponse externalRef0.ErrorResponse

func (PostNodeNtp403JSONResponse) VisitPostNodeNtpResponse

func (response PostNodeNtp403JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error

type PostNodeNtp500JSONResponse

type PostNodeNtp500JSONResponse externalRef0.ErrorResponse

func (PostNodeNtp500JSONResponse) VisitPostNodeNtpResponse

func (response PostNodeNtp500JSONResponse) VisitPostNodeNtpResponse(w http.ResponseWriter) error

type PostNodeNtpJSONRequestBody

type PostNodeNtpJSONRequestBody = NtpCreateRequest

PostNodeNtpJSONRequestBody defines body for PostNodeNtp for application/json ContentType.

type PostNodeNtpRequestObject

type PostNodeNtpRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Body     *PostNodeNtpJSONRequestBody
}

type PostNodeNtpResponseObject

type PostNodeNtpResponseObject interface {
	VisitPostNodeNtpResponse(w http.ResponseWriter) error
}

type PutNodeNtp200JSONResponse

type PutNodeNtp200JSONResponse NtpUpdateResponse

func (PutNodeNtp200JSONResponse) VisitPutNodeNtpResponse

func (response PutNodeNtp200JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error

type PutNodeNtp400JSONResponse

type PutNodeNtp400JSONResponse externalRef0.ErrorResponse

func (PutNodeNtp400JSONResponse) VisitPutNodeNtpResponse

func (response PutNodeNtp400JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error

type PutNodeNtp401JSONResponse

type PutNodeNtp401JSONResponse externalRef0.ErrorResponse

func (PutNodeNtp401JSONResponse) VisitPutNodeNtpResponse

func (response PutNodeNtp401JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error

type PutNodeNtp403JSONResponse

type PutNodeNtp403JSONResponse externalRef0.ErrorResponse

func (PutNodeNtp403JSONResponse) VisitPutNodeNtpResponse

func (response PutNodeNtp403JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error

type PutNodeNtp404JSONResponse

type PutNodeNtp404JSONResponse externalRef0.ErrorResponse

func (PutNodeNtp404JSONResponse) VisitPutNodeNtpResponse

func (response PutNodeNtp404JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error

type PutNodeNtp500JSONResponse

type PutNodeNtp500JSONResponse externalRef0.ErrorResponse

func (PutNodeNtp500JSONResponse) VisitPutNodeNtpResponse

func (response PutNodeNtp500JSONResponse) VisitPutNodeNtpResponse(w http.ResponseWriter) error

type PutNodeNtpJSONRequestBody

type PutNodeNtpJSONRequestBody = NtpUpdateRequest

PutNodeNtpJSONRequestBody defines body for PutNodeNtp for application/json ContentType.

type PutNodeNtpRequestObject

type PutNodeNtpRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Body     *PutNodeNtpJSONRequestBody
}

type PutNodeNtpResponseObject

type PutNodeNtpResponseObject interface {
	VisitPutNodeNtpResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// Delete NTP configuration
	// (DELETE /api/node/{hostname}/ntp)
	DeleteNodeNtp(ctx echo.Context, hostname Hostname) error
	// Get NTP status
	// (GET /api/node/{hostname}/ntp)
	GetNodeNtp(ctx echo.Context, hostname Hostname) error
	// Create NTP configuration
	// (POST /api/node/{hostname}/ntp)
	PostNodeNtp(ctx echo.Context, hostname Hostname) error
	// Update NTP configuration
	// (PUT /api/node/{hostname}/ntp)
	PutNodeNtp(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) DeleteNodeNtp

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

DeleteNodeNtp converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeNtp

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

GetNodeNtp converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeNtp

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

PostNodeNtp converts echo context to params.

func (*ServerInterfaceWrapper) PutNodeNtp

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

PutNodeNtp converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Delete NTP configuration
	// (DELETE /api/node/{hostname}/ntp)
	DeleteNodeNtp(ctx context.Context, request DeleteNodeNtpRequestObject) (DeleteNodeNtpResponseObject, error)
	// Get NTP status
	// (GET /api/node/{hostname}/ntp)
	GetNodeNtp(ctx context.Context, request GetNodeNtpRequestObject) (GetNodeNtpResponseObject, error)
	// Create NTP configuration
	// (POST /api/node/{hostname}/ntp)
	PostNodeNtp(ctx context.Context, request PostNodeNtpRequestObject) (PostNodeNtpResponseObject, error)
	// Update NTP configuration
	// (PUT /api/node/{hostname}/ntp)
	PutNodeNtp(ctx context.Context, request PutNodeNtpRequestObject) (PutNodeNtpResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

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