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 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.

Package gen contains generated code for the certificate API.

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 CertName

type CertName = string

CertName defines model for CertName.

type CertificateCACollectionResponse

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

CertificateCACollectionResponse defines model for CertificateCACollectionResponse.

type CertificateCACreateRequest

type CertificateCACreateRequest struct {
	// Name Certificate name (used as filename).
	Name string `json:"name" validate:"required,min=1"`

	// Object Object Store reference for the PEM file.
	Object string `json:"object" validate:"required,min=1"`
}

CertificateCACreateRequest defines model for CertificateCACreateRequest.

type CertificateCAEntry

type CertificateCAEntry struct {
	// Certificates List of CA certificates on this host.
	Certificates *[]CertificateCAInfo `json:"certificates,omitempty"`

	// Error Error message if the agent failed to retrieve certificates.
	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 CertificateCAEntryStatus `json:"status"`
}

CertificateCAEntry List result for CA certificates on one host.

type CertificateCAEntryStatus

type CertificateCAEntryStatus string

CertificateCAEntryStatus The status of the operation for this host.

const (
	CertificateCAEntryStatusFailed  CertificateCAEntryStatus = "failed"
	CertificateCAEntryStatusOk      CertificateCAEntryStatus = "ok"
	CertificateCAEntryStatusSkipped CertificateCAEntryStatus = "skipped"
)

Defines values for CertificateCAEntryStatus.

type CertificateCAInfo

type CertificateCAInfo struct {
	// Name Certificate name.
	Name *string `json:"name,omitempty"`

	// Object Object store name for the deployed content.
	Object *string `json:"object,omitempty"`

	// Source Where the certificate originated: "system" for distribution-provided, "custom" for user-installed.
	Source *CertificateCAInfoSource `json:"source,omitempty"`
}

CertificateCAInfo A CA certificate entry.

type CertificateCAInfoSource

type CertificateCAInfoSource string

CertificateCAInfoSource Where the certificate originated: "system" for distribution-provided, "custom" for user-installed.

const (
	Custom CertificateCAInfoSource = "custom"
	System CertificateCAInfoSource = "system"
)

Defines values for CertificateCAInfoSource.

type CertificateCAMutationEntry

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

	// Name Certificate name.
	Name *string `json:"name,omitempty"`

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

CertificateCAMutationEntry Result of a CA certificate create, update, or delete operation for one host.

type CertificateCAMutationEntryStatus

type CertificateCAMutationEntryStatus string

CertificateCAMutationEntryStatus The status of the operation for this host.

const (
	CertificateCAMutationEntryStatusFailed  CertificateCAMutationEntryStatus = "failed"
	CertificateCAMutationEntryStatusOk      CertificateCAMutationEntryStatus = "ok"
	CertificateCAMutationEntryStatusSkipped CertificateCAMutationEntryStatus = "skipped"
)

Defines values for CertificateCAMutationEntryStatus.

type CertificateCAMutationResponse

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

CertificateCAMutationResponse defines model for CertificateCAMutationResponse.

type CertificateCAUpdateRequest

type CertificateCAUpdateRequest struct {
	// Object Object Store reference for the new PEM file.
	Object string `json:"object" validate:"required,min=1"`
}

CertificateCAUpdateRequest defines model for CertificateCAUpdateRequest.

type DeleteNodeCertificateCa200JSONResponse

type DeleteNodeCertificateCa200JSONResponse CertificateCAMutationResponse

func (DeleteNodeCertificateCa200JSONResponse) VisitDeleteNodeCertificateCaResponse

func (response DeleteNodeCertificateCa200JSONResponse) VisitDeleteNodeCertificateCaResponse(w http.ResponseWriter) error

type DeleteNodeCertificateCa400JSONResponse

type DeleteNodeCertificateCa400JSONResponse externalRef0.ErrorResponse

func (DeleteNodeCertificateCa400JSONResponse) VisitDeleteNodeCertificateCaResponse

func (response DeleteNodeCertificateCa400JSONResponse) VisitDeleteNodeCertificateCaResponse(w http.ResponseWriter) error

type DeleteNodeCertificateCa401JSONResponse

type DeleteNodeCertificateCa401JSONResponse externalRef0.ErrorResponse

func (DeleteNodeCertificateCa401JSONResponse) VisitDeleteNodeCertificateCaResponse

func (response DeleteNodeCertificateCa401JSONResponse) VisitDeleteNodeCertificateCaResponse(w http.ResponseWriter) error

type DeleteNodeCertificateCa403JSONResponse

type DeleteNodeCertificateCa403JSONResponse externalRef0.ErrorResponse

func (DeleteNodeCertificateCa403JSONResponse) VisitDeleteNodeCertificateCaResponse

func (response DeleteNodeCertificateCa403JSONResponse) VisitDeleteNodeCertificateCaResponse(w http.ResponseWriter) error

type DeleteNodeCertificateCa500JSONResponse

type DeleteNodeCertificateCa500JSONResponse externalRef0.ErrorResponse

func (DeleteNodeCertificateCa500JSONResponse) VisitDeleteNodeCertificateCaResponse

func (response DeleteNodeCertificateCa500JSONResponse) VisitDeleteNodeCertificateCaResponse(w http.ResponseWriter) error

type DeleteNodeCertificateCaRequestObject

type DeleteNodeCertificateCaRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Name     CertName `json:"name"`
}

type DeleteNodeCertificateCaResponseObject

type DeleteNodeCertificateCaResponseObject interface {
	VisitDeleteNodeCertificateCaResponse(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 GetNodeCertificateCa200JSONResponse

type GetNodeCertificateCa200JSONResponse CertificateCACollectionResponse

func (GetNodeCertificateCa200JSONResponse) VisitGetNodeCertificateCaResponse

func (response GetNodeCertificateCa200JSONResponse) VisitGetNodeCertificateCaResponse(w http.ResponseWriter) error

type GetNodeCertificateCa400JSONResponse

type GetNodeCertificateCa400JSONResponse externalRef0.ErrorResponse

func (GetNodeCertificateCa400JSONResponse) VisitGetNodeCertificateCaResponse

func (response GetNodeCertificateCa400JSONResponse) VisitGetNodeCertificateCaResponse(w http.ResponseWriter) error

type GetNodeCertificateCa401JSONResponse

type GetNodeCertificateCa401JSONResponse externalRef0.ErrorResponse

func (GetNodeCertificateCa401JSONResponse) VisitGetNodeCertificateCaResponse

func (response GetNodeCertificateCa401JSONResponse) VisitGetNodeCertificateCaResponse(w http.ResponseWriter) error

type GetNodeCertificateCa403JSONResponse

type GetNodeCertificateCa403JSONResponse externalRef0.ErrorResponse

func (GetNodeCertificateCa403JSONResponse) VisitGetNodeCertificateCaResponse

func (response GetNodeCertificateCa403JSONResponse) VisitGetNodeCertificateCaResponse(w http.ResponseWriter) error

type GetNodeCertificateCa500JSONResponse

type GetNodeCertificateCa500JSONResponse externalRef0.ErrorResponse

func (GetNodeCertificateCa500JSONResponse) VisitGetNodeCertificateCaResponse

func (response GetNodeCertificateCa500JSONResponse) VisitGetNodeCertificateCaResponse(w http.ResponseWriter) error

type GetNodeCertificateCaRequestObject

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

type GetNodeCertificateCaResponseObject

type GetNodeCertificateCaResponseObject interface {
	VisitGetNodeCertificateCaResponse(w http.ResponseWriter) error
}

type Hostname

type Hostname = string

Hostname defines model for Hostname.

type PostNodeCertificateCa200JSONResponse

type PostNodeCertificateCa200JSONResponse CertificateCAMutationResponse

func (PostNodeCertificateCa200JSONResponse) VisitPostNodeCertificateCaResponse

func (response PostNodeCertificateCa200JSONResponse) VisitPostNodeCertificateCaResponse(w http.ResponseWriter) error

type PostNodeCertificateCa400JSONResponse

type PostNodeCertificateCa400JSONResponse externalRef0.ErrorResponse

func (PostNodeCertificateCa400JSONResponse) VisitPostNodeCertificateCaResponse

func (response PostNodeCertificateCa400JSONResponse) VisitPostNodeCertificateCaResponse(w http.ResponseWriter) error

type PostNodeCertificateCa401JSONResponse

type PostNodeCertificateCa401JSONResponse externalRef0.ErrorResponse

func (PostNodeCertificateCa401JSONResponse) VisitPostNodeCertificateCaResponse

func (response PostNodeCertificateCa401JSONResponse) VisitPostNodeCertificateCaResponse(w http.ResponseWriter) error

type PostNodeCertificateCa403JSONResponse

type PostNodeCertificateCa403JSONResponse externalRef0.ErrorResponse

func (PostNodeCertificateCa403JSONResponse) VisitPostNodeCertificateCaResponse

func (response PostNodeCertificateCa403JSONResponse) VisitPostNodeCertificateCaResponse(w http.ResponseWriter) error

type PostNodeCertificateCa500JSONResponse

type PostNodeCertificateCa500JSONResponse externalRef0.ErrorResponse

func (PostNodeCertificateCa500JSONResponse) VisitPostNodeCertificateCaResponse

func (response PostNodeCertificateCa500JSONResponse) VisitPostNodeCertificateCaResponse(w http.ResponseWriter) error

type PostNodeCertificateCaJSONRequestBody

type PostNodeCertificateCaJSONRequestBody = CertificateCACreateRequest

PostNodeCertificateCaJSONRequestBody defines body for PostNodeCertificateCa for application/json ContentType.

type PostNodeCertificateCaRequestObject

type PostNodeCertificateCaRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Body     *PostNodeCertificateCaJSONRequestBody
}

type PostNodeCertificateCaResponseObject

type PostNodeCertificateCaResponseObject interface {
	VisitPostNodeCertificateCaResponse(w http.ResponseWriter) error
}

type PutNodeCertificateCa200JSONResponse

type PutNodeCertificateCa200JSONResponse CertificateCAMutationResponse

func (PutNodeCertificateCa200JSONResponse) VisitPutNodeCertificateCaResponse

func (response PutNodeCertificateCa200JSONResponse) VisitPutNodeCertificateCaResponse(w http.ResponseWriter) error

type PutNodeCertificateCa400JSONResponse

type PutNodeCertificateCa400JSONResponse externalRef0.ErrorResponse

func (PutNodeCertificateCa400JSONResponse) VisitPutNodeCertificateCaResponse

func (response PutNodeCertificateCa400JSONResponse) VisitPutNodeCertificateCaResponse(w http.ResponseWriter) error

type PutNodeCertificateCa401JSONResponse

type PutNodeCertificateCa401JSONResponse externalRef0.ErrorResponse

func (PutNodeCertificateCa401JSONResponse) VisitPutNodeCertificateCaResponse

func (response PutNodeCertificateCa401JSONResponse) VisitPutNodeCertificateCaResponse(w http.ResponseWriter) error

type PutNodeCertificateCa403JSONResponse

type PutNodeCertificateCa403JSONResponse externalRef0.ErrorResponse

func (PutNodeCertificateCa403JSONResponse) VisitPutNodeCertificateCaResponse

func (response PutNodeCertificateCa403JSONResponse) VisitPutNodeCertificateCaResponse(w http.ResponseWriter) error

type PutNodeCertificateCa404JSONResponse

type PutNodeCertificateCa404JSONResponse externalRef0.ErrorResponse

func (PutNodeCertificateCa404JSONResponse) VisitPutNodeCertificateCaResponse

func (response PutNodeCertificateCa404JSONResponse) VisitPutNodeCertificateCaResponse(w http.ResponseWriter) error

type PutNodeCertificateCa500JSONResponse

type PutNodeCertificateCa500JSONResponse externalRef0.ErrorResponse

func (PutNodeCertificateCa500JSONResponse) VisitPutNodeCertificateCaResponse

func (response PutNodeCertificateCa500JSONResponse) VisitPutNodeCertificateCaResponse(w http.ResponseWriter) error

type PutNodeCertificateCaJSONRequestBody

type PutNodeCertificateCaJSONRequestBody = CertificateCAUpdateRequest

PutNodeCertificateCaJSONRequestBody defines body for PutNodeCertificateCa for application/json ContentType.

type PutNodeCertificateCaRequestObject

type PutNodeCertificateCaRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Name     CertName `json:"name"`
	Body     *PutNodeCertificateCaJSONRequestBody
}

type PutNodeCertificateCaResponseObject

type PutNodeCertificateCaResponseObject interface {
	VisitPutNodeCertificateCaResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// List all CA certificates
	// (GET /api/node/{hostname}/certificate/ca)
	GetNodeCertificateCa(ctx echo.Context, hostname Hostname) error
	// Create a CA certificate
	// (POST /api/node/{hostname}/certificate/ca)
	PostNodeCertificateCa(ctx echo.Context, hostname Hostname) error
	// Delete a CA certificate
	// (DELETE /api/node/{hostname}/certificate/ca/{name})
	DeleteNodeCertificateCa(ctx echo.Context, hostname Hostname, name CertName) error
	// Update a CA certificate
	// (PUT /api/node/{hostname}/certificate/ca/{name})
	PutNodeCertificateCa(ctx echo.Context, hostname Hostname, name CertName) 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) DeleteNodeCertificateCa

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

DeleteNodeCertificateCa converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeCertificateCa

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

GetNodeCertificateCa converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeCertificateCa

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

PostNodeCertificateCa converts echo context to params.

func (*ServerInterfaceWrapper) PutNodeCertificateCa

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

PutNodeCertificateCa converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// List all CA certificates
	// (GET /api/node/{hostname}/certificate/ca)
	GetNodeCertificateCa(ctx context.Context, request GetNodeCertificateCaRequestObject) (GetNodeCertificateCaResponseObject, error)
	// Create a CA certificate
	// (POST /api/node/{hostname}/certificate/ca)
	PostNodeCertificateCa(ctx context.Context, request PostNodeCertificateCaRequestObject) (PostNodeCertificateCaResponseObject, error)
	// Delete a CA certificate
	// (DELETE /api/node/{hostname}/certificate/ca/{name})
	DeleteNodeCertificateCa(ctx context.Context, request DeleteNodeCertificateCaRequestObject) (DeleteNodeCertificateCaResponseObject, error)
	// Update a CA certificate
	// (PUT /api/node/{hostname}/certificate/ca/{name})
	PutNodeCertificateCa(ctx context.Context, request PutNodeCertificateCaRequestObject) (PutNodeCertificateCaResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

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