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 Timezone 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 GetNodeTimezone200JSONResponse

type GetNodeTimezone200JSONResponse TimezoneCollectionResponse

func (GetNodeTimezone200JSONResponse) VisitGetNodeTimezoneResponse

func (response GetNodeTimezone200JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error

type GetNodeTimezone400JSONResponse

type GetNodeTimezone400JSONResponse externalRef0.ErrorResponse

func (GetNodeTimezone400JSONResponse) VisitGetNodeTimezoneResponse

func (response GetNodeTimezone400JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error

type GetNodeTimezone401JSONResponse

type GetNodeTimezone401JSONResponse externalRef0.ErrorResponse

func (GetNodeTimezone401JSONResponse) VisitGetNodeTimezoneResponse

func (response GetNodeTimezone401JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error

type GetNodeTimezone403JSONResponse

type GetNodeTimezone403JSONResponse externalRef0.ErrorResponse

func (GetNodeTimezone403JSONResponse) VisitGetNodeTimezoneResponse

func (response GetNodeTimezone403JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error

type GetNodeTimezone500JSONResponse

type GetNodeTimezone500JSONResponse externalRef0.ErrorResponse

func (GetNodeTimezone500JSONResponse) VisitGetNodeTimezoneResponse

func (response GetNodeTimezone500JSONResponse) VisitGetNodeTimezoneResponse(w http.ResponseWriter) error

type GetNodeTimezoneRequestObject

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

type GetNodeTimezoneResponseObject

type GetNodeTimezoneResponseObject interface {
	VisitGetNodeTimezoneResponse(w http.ResponseWriter) error
}

type Hostname

type Hostname = string

Hostname defines model for Hostname.

type PutNodeTimezone200JSONResponse

type PutNodeTimezone200JSONResponse TimezoneUpdateResponse

func (PutNodeTimezone200JSONResponse) VisitPutNodeTimezoneResponse

func (response PutNodeTimezone200JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error

type PutNodeTimezone400JSONResponse

type PutNodeTimezone400JSONResponse externalRef0.ErrorResponse

func (PutNodeTimezone400JSONResponse) VisitPutNodeTimezoneResponse

func (response PutNodeTimezone400JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error

type PutNodeTimezone401JSONResponse

type PutNodeTimezone401JSONResponse externalRef0.ErrorResponse

func (PutNodeTimezone401JSONResponse) VisitPutNodeTimezoneResponse

func (response PutNodeTimezone401JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error

type PutNodeTimezone403JSONResponse

type PutNodeTimezone403JSONResponse externalRef0.ErrorResponse

func (PutNodeTimezone403JSONResponse) VisitPutNodeTimezoneResponse

func (response PutNodeTimezone403JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error

type PutNodeTimezone500JSONResponse

type PutNodeTimezone500JSONResponse externalRef0.ErrorResponse

func (PutNodeTimezone500JSONResponse) VisitPutNodeTimezoneResponse

func (response PutNodeTimezone500JSONResponse) VisitPutNodeTimezoneResponse(w http.ResponseWriter) error

type PutNodeTimezoneJSONRequestBody

type PutNodeTimezoneJSONRequestBody = TimezoneUpdateRequest

PutNodeTimezoneJSONRequestBody defines body for PutNodeTimezone for application/json ContentType.

type PutNodeTimezoneRequestObject

type PutNodeTimezoneRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Body     *PutNodeTimezoneJSONRequestBody
}

type PutNodeTimezoneResponseObject

type PutNodeTimezoneResponseObject interface {
	VisitPutNodeTimezoneResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// Get system timezone
	// (GET /api/node/{hostname}/timezone)
	GetNodeTimezone(ctx echo.Context, hostname Hostname) error
	// Update system timezone
	// (PUT /api/node/{hostname}/timezone)
	PutNodeTimezone(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) GetNodeTimezone

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

GetNodeTimezone converts echo context to params.

func (*ServerInterfaceWrapper) PutNodeTimezone

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

PutNodeTimezone converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Get system timezone
	// (GET /api/node/{hostname}/timezone)
	GetNodeTimezone(ctx context.Context, request GetNodeTimezoneRequestObject) (GetNodeTimezoneResponseObject, error)
	// Update system timezone
	// (PUT /api/node/{hostname}/timezone)
	PutNodeTimezone(ctx context.Context, request PutNodeTimezoneRequestObject) (PutNodeTimezoneResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TimezoneCollectionResponse

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

TimezoneCollectionResponse defines model for TimezoneCollectionResponse.

type TimezoneEntry

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

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

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

	// Timezone Current timezone name.
	Timezone *string `json:"timezone,omitempty"`

	// UtcOffset Current UTC offset (e.g., "-05:00").
	UtcOffset *string `json:"utc_offset,omitempty"`
}

TimezoneEntry Timezone information for a single host.

type TimezoneEntryStatus

type TimezoneEntryStatus string

TimezoneEntryStatus The status of the operation for this host.

const (
	TimezoneEntryStatusFailed  TimezoneEntryStatus = "failed"
	TimezoneEntryStatusOk      TimezoneEntryStatus = "ok"
	TimezoneEntryStatusSkipped TimezoneEntryStatus = "skipped"
)

Defines values for TimezoneEntryStatus.

type TimezoneMutationResult

type TimezoneMutationResult 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 TimezoneMutationResultStatus `json:"status"`

	// Timezone Timezone that was set.
	Timezone *string `json:"timezone,omitempty"`
}

TimezoneMutationResult Result of a timezone update operation for one host.

type TimezoneMutationResultStatus

type TimezoneMutationResultStatus string

TimezoneMutationResultStatus The status of the operation for this host.

const (
	TimezoneMutationResultStatusFailed  TimezoneMutationResultStatus = "failed"
	TimezoneMutationResultStatusOk      TimezoneMutationResultStatus = "ok"
	TimezoneMutationResultStatusSkipped TimezoneMutationResultStatus = "skipped"
)

Defines values for TimezoneMutationResultStatus.

type TimezoneUpdateRequest

type TimezoneUpdateRequest struct {
	// Timezone IANA timezone name (e.g., "America/New_York", "UTC").
	Timezone string `json:"timezone" validate:"required,min=1"`
}

TimezoneUpdateRequest defines model for TimezoneUpdateRequest.

type TimezoneUpdateResponse

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

TimezoneUpdateResponse defines model for TimezoneUpdateResponse.

Jump to

Keyboard shortcuts

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