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 service 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 DeleteNodeService200JSONResponse

type DeleteNodeService200JSONResponse ServiceMutationResponse

func (DeleteNodeService200JSONResponse) VisitDeleteNodeServiceResponse

func (response DeleteNodeService200JSONResponse) VisitDeleteNodeServiceResponse(w http.ResponseWriter) error

type DeleteNodeService400JSONResponse

type DeleteNodeService400JSONResponse externalRef0.ErrorResponse

func (DeleteNodeService400JSONResponse) VisitDeleteNodeServiceResponse

func (response DeleteNodeService400JSONResponse) VisitDeleteNodeServiceResponse(w http.ResponseWriter) error

type DeleteNodeService401JSONResponse

type DeleteNodeService401JSONResponse externalRef0.ErrorResponse

func (DeleteNodeService401JSONResponse) VisitDeleteNodeServiceResponse

func (response DeleteNodeService401JSONResponse) VisitDeleteNodeServiceResponse(w http.ResponseWriter) error

type DeleteNodeService403JSONResponse

type DeleteNodeService403JSONResponse externalRef0.ErrorResponse

func (DeleteNodeService403JSONResponse) VisitDeleteNodeServiceResponse

func (response DeleteNodeService403JSONResponse) VisitDeleteNodeServiceResponse(w http.ResponseWriter) error

type DeleteNodeService500JSONResponse

type DeleteNodeService500JSONResponse externalRef0.ErrorResponse

func (DeleteNodeService500JSONResponse) VisitDeleteNodeServiceResponse

func (response DeleteNodeService500JSONResponse) VisitDeleteNodeServiceResponse(w http.ResponseWriter) error

type DeleteNodeServiceRequestObject

type DeleteNodeServiceRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
}

type DeleteNodeServiceResponseObject

type DeleteNodeServiceResponseObject interface {
	VisitDeleteNodeServiceResponse(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 GetNodeService200JSONResponse

type GetNodeService200JSONResponse ServiceListResponse

func (GetNodeService200JSONResponse) VisitGetNodeServiceResponse

func (response GetNodeService200JSONResponse) VisitGetNodeServiceResponse(w http.ResponseWriter) error

type GetNodeService400JSONResponse

type GetNodeService400JSONResponse externalRef0.ErrorResponse

func (GetNodeService400JSONResponse) VisitGetNodeServiceResponse

func (response GetNodeService400JSONResponse) VisitGetNodeServiceResponse(w http.ResponseWriter) error

type GetNodeService401JSONResponse

type GetNodeService401JSONResponse externalRef0.ErrorResponse

func (GetNodeService401JSONResponse) VisitGetNodeServiceResponse

func (response GetNodeService401JSONResponse) VisitGetNodeServiceResponse(w http.ResponseWriter) error

type GetNodeService403JSONResponse

type GetNodeService403JSONResponse externalRef0.ErrorResponse

func (GetNodeService403JSONResponse) VisitGetNodeServiceResponse

func (response GetNodeService403JSONResponse) VisitGetNodeServiceResponse(w http.ResponseWriter) error

type GetNodeService500JSONResponse

type GetNodeService500JSONResponse externalRef0.ErrorResponse

func (GetNodeService500JSONResponse) VisitGetNodeServiceResponse

func (response GetNodeService500JSONResponse) VisitGetNodeServiceResponse(w http.ResponseWriter) error

type GetNodeServiceByName200JSONResponse

type GetNodeServiceByName200JSONResponse ServiceGetResponse

func (GetNodeServiceByName200JSONResponse) VisitGetNodeServiceByNameResponse

func (response GetNodeServiceByName200JSONResponse) VisitGetNodeServiceByNameResponse(w http.ResponseWriter) error

type GetNodeServiceByName400JSONResponse

type GetNodeServiceByName400JSONResponse externalRef0.ErrorResponse

func (GetNodeServiceByName400JSONResponse) VisitGetNodeServiceByNameResponse

func (response GetNodeServiceByName400JSONResponse) VisitGetNodeServiceByNameResponse(w http.ResponseWriter) error

type GetNodeServiceByName401JSONResponse

type GetNodeServiceByName401JSONResponse externalRef0.ErrorResponse

func (GetNodeServiceByName401JSONResponse) VisitGetNodeServiceByNameResponse

func (response GetNodeServiceByName401JSONResponse) VisitGetNodeServiceByNameResponse(w http.ResponseWriter) error

type GetNodeServiceByName403JSONResponse

type GetNodeServiceByName403JSONResponse externalRef0.ErrorResponse

func (GetNodeServiceByName403JSONResponse) VisitGetNodeServiceByNameResponse

func (response GetNodeServiceByName403JSONResponse) VisitGetNodeServiceByNameResponse(w http.ResponseWriter) error

type GetNodeServiceByName404JSONResponse

type GetNodeServiceByName404JSONResponse externalRef0.ErrorResponse

func (GetNodeServiceByName404JSONResponse) VisitGetNodeServiceByNameResponse

func (response GetNodeServiceByName404JSONResponse) VisitGetNodeServiceByNameResponse(w http.ResponseWriter) error

type GetNodeServiceByName500JSONResponse

type GetNodeServiceByName500JSONResponse externalRef0.ErrorResponse

func (GetNodeServiceByName500JSONResponse) VisitGetNodeServiceByNameResponse

func (response GetNodeServiceByName500JSONResponse) VisitGetNodeServiceByNameResponse(w http.ResponseWriter) error

type GetNodeServiceByNameRequestObject

type GetNodeServiceByNameRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
}

type GetNodeServiceByNameResponseObject

type GetNodeServiceByNameResponseObject interface {
	VisitGetNodeServiceByNameResponse(w http.ResponseWriter) error
}

type GetNodeServiceRequestObject

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

type GetNodeServiceResponseObject

type GetNodeServiceResponseObject interface {
	VisitGetNodeServiceResponse(w http.ResponseWriter) error
}

type Hostname

type Hostname = string

Hostname defines model for Hostname.

type PostNodeService200JSONResponse

type PostNodeService200JSONResponse ServiceMutationResponse

func (PostNodeService200JSONResponse) VisitPostNodeServiceResponse

func (response PostNodeService200JSONResponse) VisitPostNodeServiceResponse(w http.ResponseWriter) error

type PostNodeService400JSONResponse

type PostNodeService400JSONResponse externalRef0.ErrorResponse

func (PostNodeService400JSONResponse) VisitPostNodeServiceResponse

func (response PostNodeService400JSONResponse) VisitPostNodeServiceResponse(w http.ResponseWriter) error

type PostNodeService401JSONResponse

type PostNodeService401JSONResponse externalRef0.ErrorResponse

func (PostNodeService401JSONResponse) VisitPostNodeServiceResponse

func (response PostNodeService401JSONResponse) VisitPostNodeServiceResponse(w http.ResponseWriter) error

type PostNodeService403JSONResponse

type PostNodeService403JSONResponse externalRef0.ErrorResponse

func (PostNodeService403JSONResponse) VisitPostNodeServiceResponse

func (response PostNodeService403JSONResponse) VisitPostNodeServiceResponse(w http.ResponseWriter) error

type PostNodeService500JSONResponse

type PostNodeService500JSONResponse externalRef0.ErrorResponse

func (PostNodeService500JSONResponse) VisitPostNodeServiceResponse

func (response PostNodeService500JSONResponse) VisitPostNodeServiceResponse(w http.ResponseWriter) error

type PostNodeServiceDisable200JSONResponse

type PostNodeServiceDisable200JSONResponse ServiceMutationResponse

func (PostNodeServiceDisable200JSONResponse) VisitPostNodeServiceDisableResponse

func (response PostNodeServiceDisable200JSONResponse) VisitPostNodeServiceDisableResponse(w http.ResponseWriter) error

type PostNodeServiceDisable400JSONResponse

type PostNodeServiceDisable400JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceDisable400JSONResponse) VisitPostNodeServiceDisableResponse

func (response PostNodeServiceDisable400JSONResponse) VisitPostNodeServiceDisableResponse(w http.ResponseWriter) error

type PostNodeServiceDisable401JSONResponse

type PostNodeServiceDisable401JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceDisable401JSONResponse) VisitPostNodeServiceDisableResponse

func (response PostNodeServiceDisable401JSONResponse) VisitPostNodeServiceDisableResponse(w http.ResponseWriter) error

type PostNodeServiceDisable403JSONResponse

type PostNodeServiceDisable403JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceDisable403JSONResponse) VisitPostNodeServiceDisableResponse

func (response PostNodeServiceDisable403JSONResponse) VisitPostNodeServiceDisableResponse(w http.ResponseWriter) error

type PostNodeServiceDisable500JSONResponse

type PostNodeServiceDisable500JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceDisable500JSONResponse) VisitPostNodeServiceDisableResponse

func (response PostNodeServiceDisable500JSONResponse) VisitPostNodeServiceDisableResponse(w http.ResponseWriter) error

type PostNodeServiceDisableRequestObject

type PostNodeServiceDisableRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
}

type PostNodeServiceDisableResponseObject

type PostNodeServiceDisableResponseObject interface {
	VisitPostNodeServiceDisableResponse(w http.ResponseWriter) error
}

type PostNodeServiceEnable200JSONResponse

type PostNodeServiceEnable200JSONResponse ServiceMutationResponse

func (PostNodeServiceEnable200JSONResponse) VisitPostNodeServiceEnableResponse

func (response PostNodeServiceEnable200JSONResponse) VisitPostNodeServiceEnableResponse(w http.ResponseWriter) error

type PostNodeServiceEnable400JSONResponse

type PostNodeServiceEnable400JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceEnable400JSONResponse) VisitPostNodeServiceEnableResponse

func (response PostNodeServiceEnable400JSONResponse) VisitPostNodeServiceEnableResponse(w http.ResponseWriter) error

type PostNodeServiceEnable401JSONResponse

type PostNodeServiceEnable401JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceEnable401JSONResponse) VisitPostNodeServiceEnableResponse

func (response PostNodeServiceEnable401JSONResponse) VisitPostNodeServiceEnableResponse(w http.ResponseWriter) error

type PostNodeServiceEnable403JSONResponse

type PostNodeServiceEnable403JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceEnable403JSONResponse) VisitPostNodeServiceEnableResponse

func (response PostNodeServiceEnable403JSONResponse) VisitPostNodeServiceEnableResponse(w http.ResponseWriter) error

type PostNodeServiceEnable500JSONResponse

type PostNodeServiceEnable500JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceEnable500JSONResponse) VisitPostNodeServiceEnableResponse

func (response PostNodeServiceEnable500JSONResponse) VisitPostNodeServiceEnableResponse(w http.ResponseWriter) error

type PostNodeServiceEnableRequestObject

type PostNodeServiceEnableRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
}

type PostNodeServiceEnableResponseObject

type PostNodeServiceEnableResponseObject interface {
	VisitPostNodeServiceEnableResponse(w http.ResponseWriter) error
}

type PostNodeServiceJSONRequestBody

type PostNodeServiceJSONRequestBody = ServiceCreateRequest

PostNodeServiceJSONRequestBody defines body for PostNodeService for application/json ContentType.

type PostNodeServiceRequestObject

type PostNodeServiceRequestObject struct {
	Hostname Hostname `json:"hostname"`
	Body     *PostNodeServiceJSONRequestBody
}

type PostNodeServiceResponseObject

type PostNodeServiceResponseObject interface {
	VisitPostNodeServiceResponse(w http.ResponseWriter) error
}

type PostNodeServiceRestart200JSONResponse

type PostNodeServiceRestart200JSONResponse ServiceMutationResponse

func (PostNodeServiceRestart200JSONResponse) VisitPostNodeServiceRestartResponse

func (response PostNodeServiceRestart200JSONResponse) VisitPostNodeServiceRestartResponse(w http.ResponseWriter) error

type PostNodeServiceRestart400JSONResponse

type PostNodeServiceRestart400JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceRestart400JSONResponse) VisitPostNodeServiceRestartResponse

func (response PostNodeServiceRestart400JSONResponse) VisitPostNodeServiceRestartResponse(w http.ResponseWriter) error

type PostNodeServiceRestart401JSONResponse

type PostNodeServiceRestart401JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceRestart401JSONResponse) VisitPostNodeServiceRestartResponse

func (response PostNodeServiceRestart401JSONResponse) VisitPostNodeServiceRestartResponse(w http.ResponseWriter) error

type PostNodeServiceRestart403JSONResponse

type PostNodeServiceRestart403JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceRestart403JSONResponse) VisitPostNodeServiceRestartResponse

func (response PostNodeServiceRestart403JSONResponse) VisitPostNodeServiceRestartResponse(w http.ResponseWriter) error

type PostNodeServiceRestart500JSONResponse

type PostNodeServiceRestart500JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceRestart500JSONResponse) VisitPostNodeServiceRestartResponse

func (response PostNodeServiceRestart500JSONResponse) VisitPostNodeServiceRestartResponse(w http.ResponseWriter) error

type PostNodeServiceRestartRequestObject

type PostNodeServiceRestartRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
}

type PostNodeServiceRestartResponseObject

type PostNodeServiceRestartResponseObject interface {
	VisitPostNodeServiceRestartResponse(w http.ResponseWriter) error
}

type PostNodeServiceStart200JSONResponse

type PostNodeServiceStart200JSONResponse ServiceMutationResponse

func (PostNodeServiceStart200JSONResponse) VisitPostNodeServiceStartResponse

func (response PostNodeServiceStart200JSONResponse) VisitPostNodeServiceStartResponse(w http.ResponseWriter) error

type PostNodeServiceStart400JSONResponse

type PostNodeServiceStart400JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStart400JSONResponse) VisitPostNodeServiceStartResponse

func (response PostNodeServiceStart400JSONResponse) VisitPostNodeServiceStartResponse(w http.ResponseWriter) error

type PostNodeServiceStart401JSONResponse

type PostNodeServiceStart401JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStart401JSONResponse) VisitPostNodeServiceStartResponse

func (response PostNodeServiceStart401JSONResponse) VisitPostNodeServiceStartResponse(w http.ResponseWriter) error

type PostNodeServiceStart403JSONResponse

type PostNodeServiceStart403JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStart403JSONResponse) VisitPostNodeServiceStartResponse

func (response PostNodeServiceStart403JSONResponse) VisitPostNodeServiceStartResponse(w http.ResponseWriter) error

type PostNodeServiceStart500JSONResponse

type PostNodeServiceStart500JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStart500JSONResponse) VisitPostNodeServiceStartResponse

func (response PostNodeServiceStart500JSONResponse) VisitPostNodeServiceStartResponse(w http.ResponseWriter) error

type PostNodeServiceStartRequestObject

type PostNodeServiceStartRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
}

type PostNodeServiceStartResponseObject

type PostNodeServiceStartResponseObject interface {
	VisitPostNodeServiceStartResponse(w http.ResponseWriter) error
}

type PostNodeServiceStop200JSONResponse

type PostNodeServiceStop200JSONResponse ServiceMutationResponse

func (PostNodeServiceStop200JSONResponse) VisitPostNodeServiceStopResponse

func (response PostNodeServiceStop200JSONResponse) VisitPostNodeServiceStopResponse(w http.ResponseWriter) error

type PostNodeServiceStop400JSONResponse

type PostNodeServiceStop400JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStop400JSONResponse) VisitPostNodeServiceStopResponse

func (response PostNodeServiceStop400JSONResponse) VisitPostNodeServiceStopResponse(w http.ResponseWriter) error

type PostNodeServiceStop401JSONResponse

type PostNodeServiceStop401JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStop401JSONResponse) VisitPostNodeServiceStopResponse

func (response PostNodeServiceStop401JSONResponse) VisitPostNodeServiceStopResponse(w http.ResponseWriter) error

type PostNodeServiceStop403JSONResponse

type PostNodeServiceStop403JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStop403JSONResponse) VisitPostNodeServiceStopResponse

func (response PostNodeServiceStop403JSONResponse) VisitPostNodeServiceStopResponse(w http.ResponseWriter) error

type PostNodeServiceStop500JSONResponse

type PostNodeServiceStop500JSONResponse externalRef0.ErrorResponse

func (PostNodeServiceStop500JSONResponse) VisitPostNodeServiceStopResponse

func (response PostNodeServiceStop500JSONResponse) VisitPostNodeServiceStopResponse(w http.ResponseWriter) error

type PostNodeServiceStopRequestObject

type PostNodeServiceStopRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
}

type PostNodeServiceStopResponseObject

type PostNodeServiceStopResponseObject interface {
	VisitPostNodeServiceStopResponse(w http.ResponseWriter) error
}

type PutNodeService200JSONResponse

type PutNodeService200JSONResponse ServiceMutationResponse

func (PutNodeService200JSONResponse) VisitPutNodeServiceResponse

func (response PutNodeService200JSONResponse) VisitPutNodeServiceResponse(w http.ResponseWriter) error

type PutNodeService400JSONResponse

type PutNodeService400JSONResponse externalRef0.ErrorResponse

func (PutNodeService400JSONResponse) VisitPutNodeServiceResponse

func (response PutNodeService400JSONResponse) VisitPutNodeServiceResponse(w http.ResponseWriter) error

type PutNodeService401JSONResponse

type PutNodeService401JSONResponse externalRef0.ErrorResponse

func (PutNodeService401JSONResponse) VisitPutNodeServiceResponse

func (response PutNodeService401JSONResponse) VisitPutNodeServiceResponse(w http.ResponseWriter) error

type PutNodeService403JSONResponse

type PutNodeService403JSONResponse externalRef0.ErrorResponse

func (PutNodeService403JSONResponse) VisitPutNodeServiceResponse

func (response PutNodeService403JSONResponse) VisitPutNodeServiceResponse(w http.ResponseWriter) error

type PutNodeService404JSONResponse

type PutNodeService404JSONResponse externalRef0.ErrorResponse

func (PutNodeService404JSONResponse) VisitPutNodeServiceResponse

func (response PutNodeService404JSONResponse) VisitPutNodeServiceResponse(w http.ResponseWriter) error

type PutNodeService500JSONResponse

type PutNodeService500JSONResponse externalRef0.ErrorResponse

func (PutNodeService500JSONResponse) VisitPutNodeServiceResponse

func (response PutNodeService500JSONResponse) VisitPutNodeServiceResponse(w http.ResponseWriter) error

type PutNodeServiceJSONRequestBody

type PutNodeServiceJSONRequestBody = ServiceUpdateRequest

PutNodeServiceJSONRequestBody defines body for PutNodeService for application/json ContentType.

type PutNodeServiceRequestObject

type PutNodeServiceRequestObject struct {
	Hostname Hostname    `json:"hostname"`
	Name     ServiceName `json:"name"`
	Body     *PutNodeServiceJSONRequestBody
}

type PutNodeServiceResponseObject

type PutNodeServiceResponseObject interface {
	VisitPutNodeServiceResponse(w http.ResponseWriter) error
}

type ServerInterface

type ServerInterface interface {
	// List all services
	// (GET /api/node/{hostname}/service)
	GetNodeService(ctx echo.Context, hostname Hostname) error
	// Create a service unit file
	// (POST /api/node/{hostname}/service)
	PostNodeService(ctx echo.Context, hostname Hostname) error
	// Delete a service unit file
	// (DELETE /api/node/{hostname}/service/{name})
	DeleteNodeService(ctx echo.Context, hostname Hostname, name ServiceName) error
	// Get service details
	// (GET /api/node/{hostname}/service/{name})
	GetNodeServiceByName(ctx echo.Context, hostname Hostname, name ServiceName) error
	// Update a service unit file
	// (PUT /api/node/{hostname}/service/{name})
	PutNodeService(ctx echo.Context, hostname Hostname, name ServiceName) error
	// Disable a service
	// (POST /api/node/{hostname}/service/{name}/disable)
	PostNodeServiceDisable(ctx echo.Context, hostname Hostname, name ServiceName) error
	// Enable a service
	// (POST /api/node/{hostname}/service/{name}/enable)
	PostNodeServiceEnable(ctx echo.Context, hostname Hostname, name ServiceName) error
	// Restart a service
	// (POST /api/node/{hostname}/service/{name}/restart)
	PostNodeServiceRestart(ctx echo.Context, hostname Hostname, name ServiceName) error
	// Start a service
	// (POST /api/node/{hostname}/service/{name}/start)
	PostNodeServiceStart(ctx echo.Context, hostname Hostname, name ServiceName) error
	// Stop a service
	// (POST /api/node/{hostname}/service/{name}/stop)
	PostNodeServiceStop(ctx echo.Context, hostname Hostname, name ServiceName) 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) DeleteNodeService

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

DeleteNodeService converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeService

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

GetNodeService converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeServiceByName

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

GetNodeServiceByName converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeService

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

PostNodeService converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeServiceDisable

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

PostNodeServiceDisable converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeServiceEnable

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

PostNodeServiceEnable converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeServiceRestart

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

PostNodeServiceRestart converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeServiceStart

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

PostNodeServiceStart converts echo context to params.

func (*ServerInterfaceWrapper) PostNodeServiceStop

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

PostNodeServiceStop converts echo context to params.

func (*ServerInterfaceWrapper) PutNodeService

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

PutNodeService converts echo context to params.

type ServiceCreateRequest

type ServiceCreateRequest struct {
	// Name Service unit name.
	Name string `json:"name" validate:"required,min=1"`

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

ServiceCreateRequest defines model for ServiceCreateRequest.

type ServiceGetEntry

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

	// Service Information about a systemd service.
	Service *ServiceInfo `json:"service,omitempty"`

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

ServiceGetEntry Service get result for a single agent.

type ServiceGetEntryStatus

type ServiceGetEntryStatus string

ServiceGetEntryStatus The status of the operation for this host.

const (
	ServiceGetEntryStatusFailed  ServiceGetEntryStatus = "failed"
	ServiceGetEntryStatusOk      ServiceGetEntryStatus = "ok"
	ServiceGetEntryStatusSkipped ServiceGetEntryStatus = "skipped"
)

Defines values for ServiceGetEntryStatus.

type ServiceGetResponse

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

ServiceGetResponse defines model for ServiceGetResponse.

type ServiceInfo

type ServiceInfo struct {
	// Description Service description from the unit file.
	Description *string `json:"description,omitempty"`

	// Enabled Whether the service is enabled to start on boot.
	Enabled *bool `json:"enabled,omitempty"`

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

	// Pid Main process ID of the service.
	Pid *int `json:"pid,omitempty"`

	// Status Active status of the service.
	Status *string `json:"status,omitempty"`
}

ServiceInfo Information about a systemd service.

type ServiceListEntry

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

	// Services List of services on this host.
	Services *[]ServiceInfo `json:"services,omitempty"`

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

ServiceListEntry Service list result for a single agent.

type ServiceListEntryStatus

type ServiceListEntryStatus string

ServiceListEntryStatus The status of the operation for this host.

const (
	ServiceListEntryStatusFailed  ServiceListEntryStatus = "failed"
	ServiceListEntryStatusOk      ServiceListEntryStatus = "ok"
	ServiceListEntryStatusSkipped ServiceListEntryStatus = "skipped"
)

Defines values for ServiceListEntryStatus.

type ServiceListResponse

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

ServiceListResponse defines model for ServiceListResponse.

type ServiceMutationEntry

type ServiceMutationEntry 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 Service unit name.
	Name *string `json:"name,omitempty"`

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

ServiceMutationEntry Result of a service mutation or action operation for one host.

type ServiceMutationEntryStatus

type ServiceMutationEntryStatus string

ServiceMutationEntryStatus The status of the operation for this host.

const (
	Failed  ServiceMutationEntryStatus = "failed"
	Ok      ServiceMutationEntryStatus = "ok"
	Skipped ServiceMutationEntryStatus = "skipped"
)

Defines values for ServiceMutationEntryStatus.

type ServiceMutationResponse

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

ServiceMutationResponse defines model for ServiceMutationResponse.

type ServiceName

type ServiceName = string

ServiceName defines model for ServiceName.

type ServiceUpdateRequest

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

ServiceUpdateRequest defines model for ServiceUpdateRequest.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// List all services
	// (GET /api/node/{hostname}/service)
	GetNodeService(ctx context.Context, request GetNodeServiceRequestObject) (GetNodeServiceResponseObject, error)
	// Create a service unit file
	// (POST /api/node/{hostname}/service)
	PostNodeService(ctx context.Context, request PostNodeServiceRequestObject) (PostNodeServiceResponseObject, error)
	// Delete a service unit file
	// (DELETE /api/node/{hostname}/service/{name})
	DeleteNodeService(ctx context.Context, request DeleteNodeServiceRequestObject) (DeleteNodeServiceResponseObject, error)
	// Get service details
	// (GET /api/node/{hostname}/service/{name})
	GetNodeServiceByName(ctx context.Context, request GetNodeServiceByNameRequestObject) (GetNodeServiceByNameResponseObject, error)
	// Update a service unit file
	// (PUT /api/node/{hostname}/service/{name})
	PutNodeService(ctx context.Context, request PutNodeServiceRequestObject) (PutNodeServiceResponseObject, error)
	// Disable a service
	// (POST /api/node/{hostname}/service/{name}/disable)
	PostNodeServiceDisable(ctx context.Context, request PostNodeServiceDisableRequestObject) (PostNodeServiceDisableResponseObject, error)
	// Enable a service
	// (POST /api/node/{hostname}/service/{name}/enable)
	PostNodeServiceEnable(ctx context.Context, request PostNodeServiceEnableRequestObject) (PostNodeServiceEnableResponseObject, error)
	// Restart a service
	// (POST /api/node/{hostname}/service/{name}/restart)
	PostNodeServiceRestart(ctx context.Context, request PostNodeServiceRestartRequestObject) (PostNodeServiceRestartResponseObject, error)
	// Start a service
	// (POST /api/node/{hostname}/service/{name}/start)
	PostNodeServiceStart(ctx context.Context, request PostNodeServiceStartRequestObject) (PostNodeServiceStartResponseObject, error)
	// Stop a service
	// (POST /api/node/{hostname}/service/{name}/stop)
	PostNodeServiceStop(ctx context.Context, request PostNodeServiceStopRequestObject) (PostNodeServiceStopResponseObject, error)
}

StrictServerInterface represents all server handlers.

Jump to

Keyboard shortcuts

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