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 sysctl 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 DeleteNodeSysctl200JSONResponse

type DeleteNodeSysctl200JSONResponse SysctlDeleteResponse

func (DeleteNodeSysctl200JSONResponse) VisitDeleteNodeSysctlResponse

func (response DeleteNodeSysctl200JSONResponse) VisitDeleteNodeSysctlResponse(w http.ResponseWriter) error

type DeleteNodeSysctl400JSONResponse

type DeleteNodeSysctl400JSONResponse externalRef0.ErrorResponse

func (DeleteNodeSysctl400JSONResponse) VisitDeleteNodeSysctlResponse

func (response DeleteNodeSysctl400JSONResponse) VisitDeleteNodeSysctlResponse(w http.ResponseWriter) error

type DeleteNodeSysctl401JSONResponse

type DeleteNodeSysctl401JSONResponse externalRef0.ErrorResponse

func (DeleteNodeSysctl401JSONResponse) VisitDeleteNodeSysctlResponse

func (response DeleteNodeSysctl401JSONResponse) VisitDeleteNodeSysctlResponse(w http.ResponseWriter) error

type DeleteNodeSysctl403JSONResponse

type DeleteNodeSysctl403JSONResponse externalRef0.ErrorResponse

func (DeleteNodeSysctl403JSONResponse) VisitDeleteNodeSysctlResponse

func (response DeleteNodeSysctl403JSONResponse) VisitDeleteNodeSysctlResponse(w http.ResponseWriter) error

type DeleteNodeSysctl404JSONResponse

type DeleteNodeSysctl404JSONResponse externalRef0.ErrorResponse

func (DeleteNodeSysctl404JSONResponse) VisitDeleteNodeSysctlResponse

func (response DeleteNodeSysctl404JSONResponse) VisitDeleteNodeSysctlResponse(w http.ResponseWriter) error

type DeleteNodeSysctl500JSONResponse

type DeleteNodeSysctl500JSONResponse externalRef0.ErrorResponse

func (DeleteNodeSysctl500JSONResponse) VisitDeleteNodeSysctlResponse

func (response DeleteNodeSysctl500JSONResponse) VisitDeleteNodeSysctlResponse(w http.ResponseWriter) error

type DeleteNodeSysctlRequestObject

type DeleteNodeSysctlRequestObject struct {
	Hostname Hostname  `json:"hostname"`
	Key      SysctlKey `json:"key"`
}

type DeleteNodeSysctlResponseObject

type DeleteNodeSysctlResponseObject interface {
	VisitDeleteNodeSysctlResponse(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 GetNodeSysctl200JSONResponse

type GetNodeSysctl200JSONResponse SysctlCollectionResponse

func (GetNodeSysctl200JSONResponse) VisitGetNodeSysctlResponse

func (response GetNodeSysctl200JSONResponse) VisitGetNodeSysctlResponse(w http.ResponseWriter) error

type GetNodeSysctl400JSONResponse

type GetNodeSysctl400JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctl400JSONResponse) VisitGetNodeSysctlResponse

func (response GetNodeSysctl400JSONResponse) VisitGetNodeSysctlResponse(w http.ResponseWriter) error

type GetNodeSysctl401JSONResponse

type GetNodeSysctl401JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctl401JSONResponse) VisitGetNodeSysctlResponse

func (response GetNodeSysctl401JSONResponse) VisitGetNodeSysctlResponse(w http.ResponseWriter) error

type GetNodeSysctl403JSONResponse

type GetNodeSysctl403JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctl403JSONResponse) VisitGetNodeSysctlResponse

func (response GetNodeSysctl403JSONResponse) VisitGetNodeSysctlResponse(w http.ResponseWriter) error

type GetNodeSysctl500JSONResponse

type GetNodeSysctl500JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctl500JSONResponse) VisitGetNodeSysctlResponse

func (response GetNodeSysctl500JSONResponse) VisitGetNodeSysctlResponse(w http.ResponseWriter) error

type GetNodeSysctlByKey200JSONResponse

type GetNodeSysctlByKey200JSONResponse SysctlGetResponse

func (GetNodeSysctlByKey200JSONResponse) VisitGetNodeSysctlByKeyResponse

func (response GetNodeSysctlByKey200JSONResponse) VisitGetNodeSysctlByKeyResponse(w http.ResponseWriter) error

type GetNodeSysctlByKey400JSONResponse

type GetNodeSysctlByKey400JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctlByKey400JSONResponse) VisitGetNodeSysctlByKeyResponse

func (response GetNodeSysctlByKey400JSONResponse) VisitGetNodeSysctlByKeyResponse(w http.ResponseWriter) error

type GetNodeSysctlByKey401JSONResponse

type GetNodeSysctlByKey401JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctlByKey401JSONResponse) VisitGetNodeSysctlByKeyResponse

func (response GetNodeSysctlByKey401JSONResponse) VisitGetNodeSysctlByKeyResponse(w http.ResponseWriter) error

type GetNodeSysctlByKey403JSONResponse

type GetNodeSysctlByKey403JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctlByKey403JSONResponse) VisitGetNodeSysctlByKeyResponse

func (response GetNodeSysctlByKey403JSONResponse) VisitGetNodeSysctlByKeyResponse(w http.ResponseWriter) error

type GetNodeSysctlByKey404JSONResponse

type GetNodeSysctlByKey404JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctlByKey404JSONResponse) VisitGetNodeSysctlByKeyResponse

func (response GetNodeSysctlByKey404JSONResponse) VisitGetNodeSysctlByKeyResponse(w http.ResponseWriter) error

type GetNodeSysctlByKey500JSONResponse

type GetNodeSysctlByKey500JSONResponse externalRef0.ErrorResponse

func (GetNodeSysctlByKey500JSONResponse) VisitGetNodeSysctlByKeyResponse

func (response GetNodeSysctlByKey500JSONResponse) VisitGetNodeSysctlByKeyResponse(w http.ResponseWriter) error

type GetNodeSysctlByKeyRequestObject

type GetNodeSysctlByKeyRequestObject struct {
	Hostname Hostname  `json:"hostname"`
	Key      SysctlKey `json:"key"`
}

type GetNodeSysctlByKeyResponseObject

type GetNodeSysctlByKeyResponseObject interface {
	VisitGetNodeSysctlByKeyResponse(w http.ResponseWriter) error
}

type GetNodeSysctlRequestObject

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

type GetNodeSysctlResponseObject

type GetNodeSysctlResponseObject interface {
	VisitGetNodeSysctlResponse(w http.ResponseWriter) error
}

type Hostname

type Hostname = string

Hostname defines model for Hostname.

type PostNodeSysctl200JSONResponse

type PostNodeSysctl200JSONResponse SysctlCreateResponse

func (PostNodeSysctl200JSONResponse) VisitPostNodeSysctlResponse

func (response PostNodeSysctl200JSONResponse) VisitPostNodeSysctlResponse(w http.ResponseWriter) error

type PostNodeSysctl400JSONResponse

type PostNodeSysctl400JSONResponse externalRef0.ErrorResponse

func (PostNodeSysctl400JSONResponse) VisitPostNodeSysctlResponse

func (response PostNodeSysctl400JSONResponse) VisitPostNodeSysctlResponse(w http.ResponseWriter) error

type PostNodeSysctl401JSONResponse

type PostNodeSysctl401JSONResponse externalRef0.ErrorResponse

func (PostNodeSysctl401JSONResponse) VisitPostNodeSysctlResponse

func (response PostNodeSysctl401JSONResponse) VisitPostNodeSysctlResponse(w http.ResponseWriter) error

type PostNodeSysctl403JSONResponse

type PostNodeSysctl403JSONResponse externalRef0.ErrorResponse

func (PostNodeSysctl403JSONResponse) VisitPostNodeSysctlResponse

func (response PostNodeSysctl403JSONResponse) VisitPostNodeSysctlResponse(w http.ResponseWriter) error

type PostNodeSysctl500JSONResponse

type PostNodeSysctl500JSONResponse externalRef0.ErrorResponse

func (PostNodeSysctl500JSONResponse) VisitPostNodeSysctlResponse

func (response PostNodeSysctl500JSONResponse) VisitPostNodeSysctlResponse(w http.ResponseWriter) error

type PostNodeSysctlJSONRequestBody

type PostNodeSysctlJSONRequestBody = SysctlCreateRequest

PostNodeSysctlJSONRequestBody defines body for PostNodeSysctl for application/json ContentType.

type PostNodeSysctlRequestObject

type PostNodeSysctlRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Body     *PostNodeSysctlJSONRequestBody
}

type PostNodeSysctlResponseObject

type PostNodeSysctlResponseObject interface {
	VisitPostNodeSysctlResponse(w http.ResponseWriter) error
}

type PutNodeSysctl200JSONResponse

type PutNodeSysctl200JSONResponse SysctlUpdateResponse

func (PutNodeSysctl200JSONResponse) VisitPutNodeSysctlResponse

func (response PutNodeSysctl200JSONResponse) VisitPutNodeSysctlResponse(w http.ResponseWriter) error

type PutNodeSysctl400JSONResponse

type PutNodeSysctl400JSONResponse externalRef0.ErrorResponse

func (PutNodeSysctl400JSONResponse) VisitPutNodeSysctlResponse

func (response PutNodeSysctl400JSONResponse) VisitPutNodeSysctlResponse(w http.ResponseWriter) error

type PutNodeSysctl401JSONResponse

type PutNodeSysctl401JSONResponse externalRef0.ErrorResponse

func (PutNodeSysctl401JSONResponse) VisitPutNodeSysctlResponse

func (response PutNodeSysctl401JSONResponse) VisitPutNodeSysctlResponse(w http.ResponseWriter) error

type PutNodeSysctl403JSONResponse

type PutNodeSysctl403JSONResponse externalRef0.ErrorResponse

func (PutNodeSysctl403JSONResponse) VisitPutNodeSysctlResponse

func (response PutNodeSysctl403JSONResponse) VisitPutNodeSysctlResponse(w http.ResponseWriter) error

type PutNodeSysctl404JSONResponse

type PutNodeSysctl404JSONResponse externalRef0.ErrorResponse

func (PutNodeSysctl404JSONResponse) VisitPutNodeSysctlResponse

func (response PutNodeSysctl404JSONResponse) VisitPutNodeSysctlResponse(w http.ResponseWriter) error

type PutNodeSysctl500JSONResponse

type PutNodeSysctl500JSONResponse externalRef0.ErrorResponse

func (PutNodeSysctl500JSONResponse) VisitPutNodeSysctlResponse

func (response PutNodeSysctl500JSONResponse) VisitPutNodeSysctlResponse(w http.ResponseWriter) error

type PutNodeSysctlJSONRequestBody

type PutNodeSysctlJSONRequestBody = SysctlUpdateRequest

PutNodeSysctlJSONRequestBody defines body for PutNodeSysctl for application/json ContentType.

type PutNodeSysctlRequestObject

type PutNodeSysctlRequestObject struct {
	Hostname Hostname  `json:"hostname"`
	Key      SysctlKey `json:"key"`
	Body     *PutNodeSysctlJSONRequestBody
}

type PutNodeSysctlResponseObject

type PutNodeSysctlResponseObject interface {
	VisitPutNodeSysctlResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// List all managed sysctl entries
	// (GET /api/node/{hostname}/sysctl)
	GetNodeSysctl(ctx echo.Context, hostname Hostname) error
	// Create a sysctl parameter
	// (POST /api/node/{hostname}/sysctl)
	PostNodeSysctl(ctx echo.Context, hostname Hostname) error
	// Delete a managed sysctl entry
	// (DELETE /api/node/{hostname}/sysctl/{key})
	DeleteNodeSysctl(ctx echo.Context, hostname Hostname, key SysctlKey) error
	// Get a sysctl entry
	// (GET /api/node/{hostname}/sysctl/{key})
	GetNodeSysctlByKey(ctx echo.Context, hostname Hostname, key SysctlKey) error
	// Update a sysctl parameter
	// (PUT /api/node/{hostname}/sysctl/{key})
	PutNodeSysctl(ctx echo.Context, hostname Hostname, key SysctlKey) 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) DeleteNodeSysctl

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

DeleteNodeSysctl converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeSysctl

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

GetNodeSysctl converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeSysctlByKey

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

GetNodeSysctlByKey converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeSysctl

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

PostNodeSysctl converts echo context to params.

func (*ServerInterfaceWrapper) PutNodeSysctl

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

PutNodeSysctl converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// List all managed sysctl entries
	// (GET /api/node/{hostname}/sysctl)
	GetNodeSysctl(ctx context.Context, request GetNodeSysctlRequestObject) (GetNodeSysctlResponseObject, error)
	// Create a sysctl parameter
	// (POST /api/node/{hostname}/sysctl)
	PostNodeSysctl(ctx context.Context, request PostNodeSysctlRequestObject) (PostNodeSysctlResponseObject, error)
	// Delete a managed sysctl entry
	// (DELETE /api/node/{hostname}/sysctl/{key})
	DeleteNodeSysctl(ctx context.Context, request DeleteNodeSysctlRequestObject) (DeleteNodeSysctlResponseObject, error)
	// Get a sysctl entry
	// (GET /api/node/{hostname}/sysctl/{key})
	GetNodeSysctlByKey(ctx context.Context, request GetNodeSysctlByKeyRequestObject) (GetNodeSysctlByKeyResponseObject, error)
	// Update a sysctl parameter
	// (PUT /api/node/{hostname}/sysctl/{key})
	PutNodeSysctl(ctx context.Context, request PutNodeSysctlRequestObject) (PutNodeSysctlResponseObject, error)
}

StrictServerInterface represents all server handlers.

type SysctlCollectionResponse

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

SysctlCollectionResponse defines model for SysctlCollectionResponse.

type SysctlCreateRequest

type SysctlCreateRequest struct {
	// Key Sysctl parameter key (e.g., net.ipv4.ip_forward).
	Key string `json:"key" validate:"required,min=1"`

	// Value Value to set for the sysctl parameter.
	Value string `json:"value" validate:"required"`
}

SysctlCreateRequest defines model for SysctlCreateRequest.

type SysctlCreateResponse

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

SysctlCreateResponse defines model for SysctlCreateResponse.

type SysctlDeleteResponse

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

SysctlDeleteResponse defines model for SysctlDeleteResponse.

type SysctlEntry

type SysctlEntry struct {
	// Error Error message if the agent failed to retrieve this entry.
	Error *string `json:"error,omitempty"`

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

	// Key Sysctl parameter key.
	Key *string `json:"key,omitempty"`

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

	// Value Current value of the sysctl parameter.
	Value *string `json:"value,omitempty"`
}

SysctlEntry A managed sysctl entry.

type SysctlEntryStatus

type SysctlEntryStatus string

SysctlEntryStatus The status of the operation for this host.

const (
	SysctlEntryStatusFailed  SysctlEntryStatus = "failed"
	SysctlEntryStatusOk      SysctlEntryStatus = "ok"
	SysctlEntryStatusSkipped SysctlEntryStatus = "skipped"
)

Defines values for SysctlEntryStatus.

type SysctlGetResponse

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

SysctlGetResponse Collection response for a single sysctl entry get operation.

type SysctlKey

type SysctlKey = string

SysctlKey defines model for SysctlKey.

type SysctlMutationResult

type SysctlMutationResult 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"`

	// Key Sysctl parameter key.
	Key *string `json:"key,omitempty"`

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

SysctlMutationResult Result of a sysctl create, update, or delete operation for one host.

type SysctlMutationResultStatus

type SysctlMutationResultStatus string

SysctlMutationResultStatus The status of the operation for this host.

const (
	SysctlMutationResultStatusFailed  SysctlMutationResultStatus = "failed"
	SysctlMutationResultStatusOk      SysctlMutationResultStatus = "ok"
	SysctlMutationResultStatusSkipped SysctlMutationResultStatus = "skipped"
)

Defines values for SysctlMutationResultStatus.

type SysctlUpdateRequest

type SysctlUpdateRequest struct {
	// Value New value for the sysctl parameter.
	Value string `json:"value" validate:"required"`
}

SysctlUpdateRequest defines model for SysctlUpdateRequest.

type SysctlUpdateResponse

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

SysctlUpdateResponse defines model for SysctlUpdateResponse.

Jump to

Keyboard shortcuts

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