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 node file API.
Index ¶
- Constants
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type EchoRouter
- type ErrorResponse
- type FileDeployCollectionResponse
- type FileDeployRequest
- type FileDeployRequestContentType
- type FileDeployResult
- type FileDeployResultStatus
- type FileStatusCollectionResponse
- type FileStatusRequest
- type FileStatusResult
- type FileUndeployCollectionResponse
- type FileUndeployRequest
- type FileUndeployResult
- type FileUndeployResultStatus
- type Hostname
- type PostNodeFileDeploy202JSONResponse
- type PostNodeFileDeploy400JSONResponse
- type PostNodeFileDeploy401JSONResponse
- type PostNodeFileDeploy403JSONResponse
- type PostNodeFileDeploy500JSONResponse
- type PostNodeFileDeployJSONRequestBody
- type PostNodeFileDeployRequestObject
- type PostNodeFileDeployResponseObject
- type PostNodeFileStatus200JSONResponse
- type PostNodeFileStatus400JSONResponse
- type PostNodeFileStatus401JSONResponse
- type PostNodeFileStatus403JSONResponse
- type PostNodeFileStatus500JSONResponse
- type PostNodeFileStatusJSONRequestBody
- type PostNodeFileStatusRequestObject
- type PostNodeFileStatusResponseObject
- type PostNodeFileUndeploy202JSONResponse
- type PostNodeFileUndeploy400JSONResponse
- type PostNodeFileUndeploy401JSONResponse
- type PostNodeFileUndeploy403JSONResponse
- type PostNodeFileUndeploy500JSONResponse
- type PostNodeFileUndeployJSONRequestBody
- type PostNodeFileUndeployRequestObject
- type PostNodeFileUndeployResponseObject
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
Constants ¶
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 FileDeployCollectionResponse ¶
type FileDeployCollectionResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []FileDeployResult `json:"results"`
}
FileDeployCollectionResponse defines model for FileDeployCollectionResponse.
type FileDeployRequest ¶
type FileDeployRequest struct {
// ContentType Content type — "raw" or "template".
ContentType FileDeployRequestContentType `json:"content_type" validate:"required,oneof=raw template"`
// Group File owner group.
Group *string `json:"group,omitempty"`
// Mode File permission mode (e.g., "0644").
Mode *string `json:"mode,omitempty"`
// ObjectName Name of the file in the Object Store.
ObjectName string `json:"object_name" validate:"required,min=1,max=255"`
// Owner File owner user.
Owner *string `json:"owner,omitempty"`
// Path Destination path on the target filesystem.
Path string `json:"path" validate:"required,min=1"`
// Vars Template variables when content_type is "template".
Vars *map[string]interface{} `json:"vars,omitempty"`
}
FileDeployRequest defines model for FileDeployRequest.
type FileDeployRequestContentType ¶
type FileDeployRequestContentType string
FileDeployRequestContentType Content type — "raw" or "template".
const ( Raw FileDeployRequestContentType = "raw" Template FileDeployRequestContentType = "template" )
Defines values for FileDeployRequestContentType.
type FileDeployResult ¶
type FileDeployResult struct {
// Changed Whether the file was actually written.
Changed *bool `json:"changed,omitempty"`
// Error Error message if the agent failed.
Error *string `json:"error,omitempty"`
// Hostname The agent that processed the job.
Hostname string `json:"hostname"`
// Status The status of the operation for this host.
Status FileDeployResultStatus `json:"status"`
}
FileDeployResult defines model for FileDeployResult.
type FileDeployResultStatus ¶
type FileDeployResultStatus string
FileDeployResultStatus The status of the operation for this host.
const ( FileDeployResultStatusFailed FileDeployResultStatus = "failed" FileDeployResultStatusOk FileDeployResultStatus = "ok" FileDeployResultStatusSkipped FileDeployResultStatus = "skipped" )
Defines values for FileDeployResultStatus.
type FileStatusCollectionResponse ¶
type FileStatusCollectionResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []FileStatusResult `json:"results"`
}
FileStatusCollectionResponse defines model for FileStatusCollectionResponse.
type FileStatusRequest ¶
type FileStatusRequest struct {
// Path Filesystem path to check.
Path string `json:"path" validate:"required,min=1"`
}
FileStatusRequest defines model for FileStatusRequest.
type FileStatusResult ¶
type FileStatusResult 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 agent that processed the job.
Hostname string `json:"hostname"`
// Path The filesystem path.
Path *string `json:"path,omitempty"`
// Sha256 Current SHA-256 of the file on disk.
Sha256 *string `json:"sha256,omitempty"`
// Status File state — "in-sync", "drifted", or "missing".
Status *string `json:"status,omitempty"`
}
FileStatusResult defines model for FileStatusResult.
type FileUndeployCollectionResponse ¶
type FileUndeployCollectionResponse struct {
// JobId The job ID used to process this request.
JobId *openapi_types.UUID `json:"job_id,omitempty"`
Results []FileUndeployResult `json:"results"`
}
FileUndeployCollectionResponse defines model for FileUndeployCollectionResponse.
type FileUndeployRequest ¶
type FileUndeployRequest struct {
// Path Filesystem path to undeploy.
Path string `json:"path" validate:"required,min=1"`
}
FileUndeployRequest defines model for FileUndeployRequest.
type FileUndeployResult ¶
type FileUndeployResult struct {
// Changed Whether the file was actually removed.
Changed *bool `json:"changed,omitempty"`
// Error Error message if the agent failed.
Error *string `json:"error,omitempty"`
// Hostname The agent that processed the job.
Hostname string `json:"hostname"`
// Status The status of the operation for this host.
Status FileUndeployResultStatus `json:"status"`
}
FileUndeployResult defines model for FileUndeployResult.
type FileUndeployResultStatus ¶
type FileUndeployResultStatus string
FileUndeployResultStatus The status of the operation for this host.
const ( FileUndeployResultStatusFailed FileUndeployResultStatus = "failed" FileUndeployResultStatusOk FileUndeployResultStatus = "ok" FileUndeployResultStatusSkipped FileUndeployResultStatus = "skipped" )
Defines values for FileUndeployResultStatus.
type PostNodeFileDeploy202JSONResponse ¶
type PostNodeFileDeploy202JSONResponse FileDeployCollectionResponse
func (PostNodeFileDeploy202JSONResponse) VisitPostNodeFileDeployResponse ¶
func (response PostNodeFileDeploy202JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error
type PostNodeFileDeploy400JSONResponse ¶
type PostNodeFileDeploy400JSONResponse externalRef0.ErrorResponse
func (PostNodeFileDeploy400JSONResponse) VisitPostNodeFileDeployResponse ¶
func (response PostNodeFileDeploy400JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error
type PostNodeFileDeploy401JSONResponse ¶
type PostNodeFileDeploy401JSONResponse externalRef0.ErrorResponse
func (PostNodeFileDeploy401JSONResponse) VisitPostNodeFileDeployResponse ¶
func (response PostNodeFileDeploy401JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error
type PostNodeFileDeploy403JSONResponse ¶
type PostNodeFileDeploy403JSONResponse externalRef0.ErrorResponse
func (PostNodeFileDeploy403JSONResponse) VisitPostNodeFileDeployResponse ¶
func (response PostNodeFileDeploy403JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error
type PostNodeFileDeploy500JSONResponse ¶
type PostNodeFileDeploy500JSONResponse externalRef0.ErrorResponse
func (PostNodeFileDeploy500JSONResponse) VisitPostNodeFileDeployResponse ¶
func (response PostNodeFileDeploy500JSONResponse) VisitPostNodeFileDeployResponse(w http.ResponseWriter) error
type PostNodeFileDeployJSONRequestBody ¶
type PostNodeFileDeployJSONRequestBody = FileDeployRequest
PostNodeFileDeployJSONRequestBody defines body for PostNodeFileDeploy for application/json ContentType.
type PostNodeFileDeployRequestObject ¶
type PostNodeFileDeployRequestObject struct {
Hostname Hostname `json:"hostname"`
Body *PostNodeFileDeployJSONRequestBody
}
type PostNodeFileDeployResponseObject ¶
type PostNodeFileDeployResponseObject interface {
VisitPostNodeFileDeployResponse(w http.ResponseWriter) error
}
type PostNodeFileStatus200JSONResponse ¶
type PostNodeFileStatus200JSONResponse FileStatusCollectionResponse
func (PostNodeFileStatus200JSONResponse) VisitPostNodeFileStatusResponse ¶
func (response PostNodeFileStatus200JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error
type PostNodeFileStatus400JSONResponse ¶
type PostNodeFileStatus400JSONResponse externalRef0.ErrorResponse
func (PostNodeFileStatus400JSONResponse) VisitPostNodeFileStatusResponse ¶
func (response PostNodeFileStatus400JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error
type PostNodeFileStatus401JSONResponse ¶
type PostNodeFileStatus401JSONResponse externalRef0.ErrorResponse
func (PostNodeFileStatus401JSONResponse) VisitPostNodeFileStatusResponse ¶
func (response PostNodeFileStatus401JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error
type PostNodeFileStatus403JSONResponse ¶
type PostNodeFileStatus403JSONResponse externalRef0.ErrorResponse
func (PostNodeFileStatus403JSONResponse) VisitPostNodeFileStatusResponse ¶
func (response PostNodeFileStatus403JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error
type PostNodeFileStatus500JSONResponse ¶
type PostNodeFileStatus500JSONResponse externalRef0.ErrorResponse
func (PostNodeFileStatus500JSONResponse) VisitPostNodeFileStatusResponse ¶
func (response PostNodeFileStatus500JSONResponse) VisitPostNodeFileStatusResponse(w http.ResponseWriter) error
type PostNodeFileStatusJSONRequestBody ¶
type PostNodeFileStatusJSONRequestBody = FileStatusRequest
PostNodeFileStatusJSONRequestBody defines body for PostNodeFileStatus for application/json ContentType.
type PostNodeFileStatusRequestObject ¶
type PostNodeFileStatusRequestObject struct {
Hostname Hostname `json:"hostname"`
Body *PostNodeFileStatusJSONRequestBody
}
type PostNodeFileStatusResponseObject ¶
type PostNodeFileStatusResponseObject interface {
VisitPostNodeFileStatusResponse(w http.ResponseWriter) error
}
type PostNodeFileUndeploy202JSONResponse ¶
type PostNodeFileUndeploy202JSONResponse FileUndeployCollectionResponse
func (PostNodeFileUndeploy202JSONResponse) VisitPostNodeFileUndeployResponse ¶
func (response PostNodeFileUndeploy202JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error
type PostNodeFileUndeploy400JSONResponse ¶
type PostNodeFileUndeploy400JSONResponse externalRef0.ErrorResponse
func (PostNodeFileUndeploy400JSONResponse) VisitPostNodeFileUndeployResponse ¶
func (response PostNodeFileUndeploy400JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error
type PostNodeFileUndeploy401JSONResponse ¶
type PostNodeFileUndeploy401JSONResponse externalRef0.ErrorResponse
func (PostNodeFileUndeploy401JSONResponse) VisitPostNodeFileUndeployResponse ¶
func (response PostNodeFileUndeploy401JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error
type PostNodeFileUndeploy403JSONResponse ¶
type PostNodeFileUndeploy403JSONResponse externalRef0.ErrorResponse
func (PostNodeFileUndeploy403JSONResponse) VisitPostNodeFileUndeployResponse ¶
func (response PostNodeFileUndeploy403JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error
type PostNodeFileUndeploy500JSONResponse ¶
type PostNodeFileUndeploy500JSONResponse externalRef0.ErrorResponse
func (PostNodeFileUndeploy500JSONResponse) VisitPostNodeFileUndeployResponse ¶
func (response PostNodeFileUndeploy500JSONResponse) VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error
type PostNodeFileUndeployJSONRequestBody ¶
type PostNodeFileUndeployJSONRequestBody = FileUndeployRequest
PostNodeFileUndeployJSONRequestBody defines body for PostNodeFileUndeploy for application/json ContentType.
type PostNodeFileUndeployRequestObject ¶
type PostNodeFileUndeployRequestObject struct {
Hostname Hostname `json:"hostname"`
Body *PostNodeFileUndeployJSONRequestBody
}
type PostNodeFileUndeployResponseObject ¶
type PostNodeFileUndeployResponseObject interface {
VisitPostNodeFileUndeployResponse(w http.ResponseWriter) error
}
type ServerInterface ¶
type ServerInterface interface {
// Deploy a file from Object Store to the host
// (POST /api/node/{hostname}/file/deploy)
PostNodeFileDeploy(ctx echo.Context, hostname Hostname) error
// Check deployment status of a file on the host
// (POST /api/node/{hostname}/file/status)
PostNodeFileStatus(ctx echo.Context, hostname Hostname) error
// Remove a deployed file from the host filesystem
// (POST /api/node/{hostname}/file/undeploy)
PostNodeFileUndeploy(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) PostNodeFileDeploy ¶
func (w *ServerInterfaceWrapper) PostNodeFileDeploy(ctx echo.Context) error
PostNodeFileDeploy converts echo context to params.
func (*ServerInterfaceWrapper) PostNodeFileStatus ¶
func (w *ServerInterfaceWrapper) PostNodeFileStatus(ctx echo.Context) error
PostNodeFileStatus converts echo context to params.
func (*ServerInterfaceWrapper) PostNodeFileUndeploy ¶
func (w *ServerInterfaceWrapper) PostNodeFileUndeploy(ctx echo.Context) error
PostNodeFileUndeploy converts echo context to params.
type StrictHandlerFunc ¶
type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc
type StrictServerInterface ¶
type StrictServerInterface interface {
// Deploy a file from Object Store to the host
// (POST /api/node/{hostname}/file/deploy)
PostNodeFileDeploy(ctx context.Context, request PostNodeFileDeployRequestObject) (PostNodeFileDeployResponseObject, error)
// Check deployment status of a file on the host
// (POST /api/node/{hostname}/file/status)
PostNodeFileStatus(ctx context.Context, request PostNodeFileStatusRequestObject) (PostNodeFileStatusResponseObject, error)
// Remove a deployed file from the host filesystem
// (POST /api/node/{hostname}/file/undeploy)
PostNodeFileUndeploy(ctx context.Context, request PostNodeFileUndeployRequestObject) (PostNodeFileUndeployResponseObject, error)
}
StrictServerInterface represents all server handlers.