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 node 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 DiskCollectionResponse

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

DiskCollectionResponse defines model for DiskCollectionResponse.

type DiskResponse

type DiskResponse struct {
	// Free Free disk space in bytes.
	Free int `json:"free"`

	// Name Disk identifier, e.g., "/dev/sda1".
	Name string `json:"name"`

	// Total Total disk space in bytes.
	Total int `json:"total"`

	// Used Used disk space in bytes.
	Used int `json:"used"`
}

DiskResponse Local disk usage information.

type DiskResultItem

type DiskResultItem struct {
	// Changed Whether the operation modified system state.
	Changed *bool `json:"changed,omitempty"`

	// Disks List of local disk usage information.
	Disks *DisksResponse `json:"disks,omitempty"`

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

	// Hostname The hostname of the agent.
	Hostname string `json:"hostname"`

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

DiskResultItem defines model for DiskResultItem.

type DiskResultItemStatus

type DiskResultItemStatus string

DiskResultItemStatus The status of the operation for this host.

const (
	DiskResultItemStatusFailed  DiskResultItemStatus = "failed"
	DiskResultItemStatusOk      DiskResultItemStatus = "ok"
	DiskResultItemStatusSkipped DiskResultItemStatus = "skipped"
)

Defines values for DiskResultItemStatus.

type DisksResponse

type DisksResponse = []DiskResponse

DisksResponse List of local disk usage information.

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 GetNodeDisk200JSONResponse

type GetNodeDisk200JSONResponse DiskCollectionResponse

func (GetNodeDisk200JSONResponse) VisitGetNodeDiskResponse

func (response GetNodeDisk200JSONResponse) VisitGetNodeDiskResponse(w http.ResponseWriter) error

type GetNodeDisk400JSONResponse

type GetNodeDisk400JSONResponse externalRef0.ErrorResponse

func (GetNodeDisk400JSONResponse) VisitGetNodeDiskResponse

func (response GetNodeDisk400JSONResponse) VisitGetNodeDiskResponse(w http.ResponseWriter) error

type GetNodeDisk401JSONResponse

type GetNodeDisk401JSONResponse externalRef0.ErrorResponse

func (GetNodeDisk401JSONResponse) VisitGetNodeDiskResponse

func (response GetNodeDisk401JSONResponse) VisitGetNodeDiskResponse(w http.ResponseWriter) error

type GetNodeDisk403JSONResponse

type GetNodeDisk403JSONResponse externalRef0.ErrorResponse

func (GetNodeDisk403JSONResponse) VisitGetNodeDiskResponse

func (response GetNodeDisk403JSONResponse) VisitGetNodeDiskResponse(w http.ResponseWriter) error

type GetNodeDisk500JSONResponse

type GetNodeDisk500JSONResponse externalRef0.ErrorResponse

func (GetNodeDisk500JSONResponse) VisitGetNodeDiskResponse

func (response GetNodeDisk500JSONResponse) VisitGetNodeDiskResponse(w http.ResponseWriter) error

type GetNodeDiskRequestObject

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

type GetNodeDiskResponseObject

type GetNodeDiskResponseObject interface {
	VisitGetNodeDiskResponse(w http.ResponseWriter) error
}

type GetNodeLoad200JSONResponse

type GetNodeLoad200JSONResponse LoadCollectionResponse

func (GetNodeLoad200JSONResponse) VisitGetNodeLoadResponse

func (response GetNodeLoad200JSONResponse) VisitGetNodeLoadResponse(w http.ResponseWriter) error

type GetNodeLoad400JSONResponse

type GetNodeLoad400JSONResponse externalRef0.ErrorResponse

func (GetNodeLoad400JSONResponse) VisitGetNodeLoadResponse

func (response GetNodeLoad400JSONResponse) VisitGetNodeLoadResponse(w http.ResponseWriter) error

type GetNodeLoad401JSONResponse

type GetNodeLoad401JSONResponse externalRef0.ErrorResponse

func (GetNodeLoad401JSONResponse) VisitGetNodeLoadResponse

func (response GetNodeLoad401JSONResponse) VisitGetNodeLoadResponse(w http.ResponseWriter) error

type GetNodeLoad403JSONResponse

type GetNodeLoad403JSONResponse externalRef0.ErrorResponse

func (GetNodeLoad403JSONResponse) VisitGetNodeLoadResponse

func (response GetNodeLoad403JSONResponse) VisitGetNodeLoadResponse(w http.ResponseWriter) error

type GetNodeLoad500JSONResponse

type GetNodeLoad500JSONResponse externalRef0.ErrorResponse

func (GetNodeLoad500JSONResponse) VisitGetNodeLoadResponse

func (response GetNodeLoad500JSONResponse) VisitGetNodeLoadResponse(w http.ResponseWriter) error

type GetNodeLoadRequestObject

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

type GetNodeLoadResponseObject

type GetNodeLoadResponseObject interface {
	VisitGetNodeLoadResponse(w http.ResponseWriter) error
}

type GetNodeMemory200JSONResponse

type GetNodeMemory200JSONResponse MemoryCollectionResponse

func (GetNodeMemory200JSONResponse) VisitGetNodeMemoryResponse

func (response GetNodeMemory200JSONResponse) VisitGetNodeMemoryResponse(w http.ResponseWriter) error

type GetNodeMemory400JSONResponse

type GetNodeMemory400JSONResponse externalRef0.ErrorResponse

func (GetNodeMemory400JSONResponse) VisitGetNodeMemoryResponse

func (response GetNodeMemory400JSONResponse) VisitGetNodeMemoryResponse(w http.ResponseWriter) error

type GetNodeMemory401JSONResponse

type GetNodeMemory401JSONResponse externalRef0.ErrorResponse

func (GetNodeMemory401JSONResponse) VisitGetNodeMemoryResponse

func (response GetNodeMemory401JSONResponse) VisitGetNodeMemoryResponse(w http.ResponseWriter) error

type GetNodeMemory403JSONResponse

type GetNodeMemory403JSONResponse externalRef0.ErrorResponse

func (GetNodeMemory403JSONResponse) VisitGetNodeMemoryResponse

func (response GetNodeMemory403JSONResponse) VisitGetNodeMemoryResponse(w http.ResponseWriter) error

type GetNodeMemory500JSONResponse

type GetNodeMemory500JSONResponse externalRef0.ErrorResponse

func (GetNodeMemory500JSONResponse) VisitGetNodeMemoryResponse

func (response GetNodeMemory500JSONResponse) VisitGetNodeMemoryResponse(w http.ResponseWriter) error

type GetNodeMemoryRequestObject

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

type GetNodeMemoryResponseObject

type GetNodeMemoryResponseObject interface {
	VisitGetNodeMemoryResponse(w http.ResponseWriter) error
}

type GetNodeOS200JSONResponse

type GetNodeOS200JSONResponse OSInfoCollectionResponse

func (GetNodeOS200JSONResponse) VisitGetNodeOSResponse

func (response GetNodeOS200JSONResponse) VisitGetNodeOSResponse(w http.ResponseWriter) error

type GetNodeOS400JSONResponse

type GetNodeOS400JSONResponse externalRef0.ErrorResponse

func (GetNodeOS400JSONResponse) VisitGetNodeOSResponse

func (response GetNodeOS400JSONResponse) VisitGetNodeOSResponse(w http.ResponseWriter) error

type GetNodeOS401JSONResponse

type GetNodeOS401JSONResponse externalRef0.ErrorResponse

func (GetNodeOS401JSONResponse) VisitGetNodeOSResponse

func (response GetNodeOS401JSONResponse) VisitGetNodeOSResponse(w http.ResponseWriter) error

type GetNodeOS403JSONResponse

type GetNodeOS403JSONResponse externalRef0.ErrorResponse

func (GetNodeOS403JSONResponse) VisitGetNodeOSResponse

func (response GetNodeOS403JSONResponse) VisitGetNodeOSResponse(w http.ResponseWriter) error

type GetNodeOS500JSONResponse

type GetNodeOS500JSONResponse externalRef0.ErrorResponse

func (GetNodeOS500JSONResponse) VisitGetNodeOSResponse

func (response GetNodeOS500JSONResponse) VisitGetNodeOSResponse(w http.ResponseWriter) error

type GetNodeOSRequestObject

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

type GetNodeOSResponseObject

type GetNodeOSResponseObject interface {
	VisitGetNodeOSResponse(w http.ResponseWriter) error
}

type GetNodeStatus200JSONResponse

type GetNodeStatus200JSONResponse NodeStatusCollectionResponse

func (GetNodeStatus200JSONResponse) VisitGetNodeStatusResponse

func (response GetNodeStatus200JSONResponse) VisitGetNodeStatusResponse(w http.ResponseWriter) error

type GetNodeStatus400JSONResponse

type GetNodeStatus400JSONResponse externalRef0.ErrorResponse

func (GetNodeStatus400JSONResponse) VisitGetNodeStatusResponse

func (response GetNodeStatus400JSONResponse) VisitGetNodeStatusResponse(w http.ResponseWriter) error

type GetNodeStatus401JSONResponse

type GetNodeStatus401JSONResponse externalRef0.ErrorResponse

func (GetNodeStatus401JSONResponse) VisitGetNodeStatusResponse

func (response GetNodeStatus401JSONResponse) VisitGetNodeStatusResponse(w http.ResponseWriter) error

type GetNodeStatus403JSONResponse

type GetNodeStatus403JSONResponse externalRef0.ErrorResponse

func (GetNodeStatus403JSONResponse) VisitGetNodeStatusResponse

func (response GetNodeStatus403JSONResponse) VisitGetNodeStatusResponse(w http.ResponseWriter) error

type GetNodeStatus500JSONResponse

type GetNodeStatus500JSONResponse externalRef0.ErrorResponse

func (GetNodeStatus500JSONResponse) VisitGetNodeStatusResponse

func (response GetNodeStatus500JSONResponse) VisitGetNodeStatusResponse(w http.ResponseWriter) error

type GetNodeStatusRequestObject

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

type GetNodeStatusResponseObject

type GetNodeStatusResponseObject interface {
	VisitGetNodeStatusResponse(w http.ResponseWriter) error
}

type GetNodeUptime200JSONResponse

type GetNodeUptime200JSONResponse UptimeCollectionResponse

func (GetNodeUptime200JSONResponse) VisitGetNodeUptimeResponse

func (response GetNodeUptime200JSONResponse) VisitGetNodeUptimeResponse(w http.ResponseWriter) error

type GetNodeUptime400JSONResponse

type GetNodeUptime400JSONResponse externalRef0.ErrorResponse

func (GetNodeUptime400JSONResponse) VisitGetNodeUptimeResponse

func (response GetNodeUptime400JSONResponse) VisitGetNodeUptimeResponse(w http.ResponseWriter) error

type GetNodeUptime401JSONResponse

type GetNodeUptime401JSONResponse externalRef0.ErrorResponse

func (GetNodeUptime401JSONResponse) VisitGetNodeUptimeResponse

func (response GetNodeUptime401JSONResponse) VisitGetNodeUptimeResponse(w http.ResponseWriter) error

type GetNodeUptime403JSONResponse

type GetNodeUptime403JSONResponse externalRef0.ErrorResponse

func (GetNodeUptime403JSONResponse) VisitGetNodeUptimeResponse

func (response GetNodeUptime403JSONResponse) VisitGetNodeUptimeResponse(w http.ResponseWriter) error

type GetNodeUptime500JSONResponse

type GetNodeUptime500JSONResponse externalRef0.ErrorResponse

func (GetNodeUptime500JSONResponse) VisitGetNodeUptimeResponse

func (response GetNodeUptime500JSONResponse) VisitGetNodeUptimeResponse(w http.ResponseWriter) error

type GetNodeUptimeRequestObject

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

type GetNodeUptimeResponseObject

type GetNodeUptimeResponseObject interface {
	VisitGetNodeUptimeResponse(w http.ResponseWriter) error
}

type Hostname

type Hostname = string

Hostname defines model for Hostname.

type LoadAverageResponse

type LoadAverageResponse struct {
	// N15min Load average for the last 15 minutes.
	N15min float32 `json:"15min"`

	// N1min Load average for the last 1 minute.
	N1min float32 `json:"1min"`

	// N5min Load average for the last 5 minutes.
	N5min float32 `json:"5min"`
}

LoadAverageResponse The system load averages for 1, 5, and 15 minutes.

type LoadCollectionResponse

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

LoadCollectionResponse defines model for LoadCollectionResponse.

type LoadResultItem

type LoadResultItem 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 hostname of the agent.
	Hostname string `json:"hostname"`

	// LoadAverage The system load averages for 1, 5, and 15 minutes.
	LoadAverage *LoadAverageResponse `json:"load_average,omitempty"`

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

LoadResultItem defines model for LoadResultItem.

type LoadResultItemStatus

type LoadResultItemStatus string

LoadResultItemStatus The status of the operation for this host.

const (
	LoadResultItemStatusFailed  LoadResultItemStatus = "failed"
	LoadResultItemStatusOk      LoadResultItemStatus = "ok"
	LoadResultItemStatusSkipped LoadResultItemStatus = "skipped"
)

Defines values for LoadResultItemStatus.

type MemoryCollectionResponse

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

MemoryCollectionResponse defines model for MemoryCollectionResponse.

type MemoryResponse

type MemoryResponse struct {
	// Free Free memory in bytes.
	Free int `json:"free"`

	// Total Total memory in bytes.
	Total int `json:"total"`

	// Used Used memory in bytes.
	Used int `json:"used"`
}

MemoryResponse Memory usage information.

type MemoryResultItem

type MemoryResultItem 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 hostname of the agent.
	Hostname string `json:"hostname"`

	// Memory Memory usage information.
	Memory *MemoryResponse `json:"memory,omitempty"`

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

MemoryResultItem defines model for MemoryResultItem.

type MemoryResultItemStatus

type MemoryResultItemStatus string

MemoryResultItemStatus The status of the operation for this host.

const (
	MemoryResultItemStatusFailed  MemoryResultItemStatus = "failed"
	MemoryResultItemStatusOk      MemoryResultItemStatus = "ok"
	MemoryResultItemStatusSkipped MemoryResultItemStatus = "skipped"
)

Defines values for MemoryResultItemStatus.

type NodeStatusCollectionResponse

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

NodeStatusCollectionResponse defines model for NodeStatusCollectionResponse.

type NodeStatusResponse

type NodeStatusResponse struct {
	// Changed Whether the operation modified system state.
	Changed *bool `json:"changed,omitempty"`

	// Disks List of local disk usage information.
	Disks *DisksResponse `json:"disks,omitempty"`

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

	// Hostname The hostname of the system.
	Hostname string `json:"hostname"`

	// LoadAverage The system load averages for 1, 5, and 15 minutes.
	LoadAverage *LoadAverageResponse `json:"load_average,omitempty"`

	// Memory Memory usage information.
	Memory *MemoryResponse `json:"memory,omitempty"`

	// OsInfo Operating system information.
	OsInfo *OSInfoResponse `json:"os_info,omitempty"`

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

	// Uptime The uptime of the system.
	Uptime *string `json:"uptime,omitempty"`
}

NodeStatusResponse defines model for NodeStatusResponse.

type NodeStatusResponseStatus

type NodeStatusResponseStatus string

NodeStatusResponseStatus The status of the operation for this host.

const (
	NodeStatusResponseStatusFailed  NodeStatusResponseStatus = "failed"
	NodeStatusResponseStatusOk      NodeStatusResponseStatus = "ok"
	NodeStatusResponseStatusSkipped NodeStatusResponseStatus = "skipped"
)

Defines values for NodeStatusResponseStatus.

type OSInfoCollectionResponse

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

OSInfoCollectionResponse defines model for OSInfoCollectionResponse.

type OSInfoResponse

type OSInfoResponse struct {
	// Distribution The name of the Linux distribution.
	Distribution string `json:"distribution"`

	// Version The version of the Linux distribution.
	Version string `json:"version"`
}

OSInfoResponse Operating system information.

type OSInfoResultItem

type OSInfoResultItem 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 hostname of the agent.
	Hostname string `json:"hostname"`

	// OsInfo Operating system information.
	OsInfo *OSInfoResponse `json:"os_info,omitempty"`

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

OSInfoResultItem defines model for OSInfoResultItem.

type OSInfoResultItemStatus

type OSInfoResultItemStatus string

OSInfoResultItemStatus The status of the operation for this host.

const (
	OSInfoResultItemStatusFailed  OSInfoResultItemStatus = "failed"
	OSInfoResultItemStatusOk      OSInfoResultItemStatus = "ok"
	OSInfoResultItemStatusSkipped OSInfoResultItemStatus = "skipped"
)

Defines values for OSInfoResultItemStatus.

type ServerInterface

type ServerInterface interface {
	// Retrieve node status
	// (GET /api/node/{hostname})
	GetNodeStatus(ctx echo.Context, hostname Hostname) error
	// Retrieve disk usage
	// (GET /api/node/{hostname}/disk)
	GetNodeDisk(ctx echo.Context, hostname Hostname) error
	// Retrieve load averages
	// (GET /api/node/{hostname}/load)
	GetNodeLoad(ctx echo.Context, hostname Hostname) error
	// Retrieve memory stats
	// (GET /api/node/{hostname}/memory)
	GetNodeMemory(ctx echo.Context, hostname Hostname) error
	// Retrieve OS info
	// (GET /api/node/{hostname}/os)
	GetNodeOS(ctx echo.Context, hostname Hostname) error
	// Retrieve uptime
	// (GET /api/node/{hostname}/uptime)
	GetNodeUptime(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) GetNodeDisk

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

GetNodeDisk converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeLoad

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

GetNodeLoad converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeMemory

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

GetNodeMemory converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeOS

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

GetNodeOS converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeStatus

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

GetNodeStatus converts echo context to params.

func (*ServerInterfaceWrapper) GetNodeUptime

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

GetNodeUptime converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc = strictecho.StrictEchoHandlerFunc

type StrictMiddlewareFunc

type StrictMiddlewareFunc = strictecho.StrictEchoMiddlewareFunc

type StrictServerInterface

type StrictServerInterface interface {
	// Retrieve node status
	// (GET /api/node/{hostname})
	GetNodeStatus(ctx context.Context, request GetNodeStatusRequestObject) (GetNodeStatusResponseObject, error)
	// Retrieve disk usage
	// (GET /api/node/{hostname}/disk)
	GetNodeDisk(ctx context.Context, request GetNodeDiskRequestObject) (GetNodeDiskResponseObject, error)
	// Retrieve load averages
	// (GET /api/node/{hostname}/load)
	GetNodeLoad(ctx context.Context, request GetNodeLoadRequestObject) (GetNodeLoadResponseObject, error)
	// Retrieve memory stats
	// (GET /api/node/{hostname}/memory)
	GetNodeMemory(ctx context.Context, request GetNodeMemoryRequestObject) (GetNodeMemoryResponseObject, error)
	// Retrieve OS info
	// (GET /api/node/{hostname}/os)
	GetNodeOS(ctx context.Context, request GetNodeOSRequestObject) (GetNodeOSResponseObject, error)
	// Retrieve uptime
	// (GET /api/node/{hostname}/uptime)
	GetNodeUptime(ctx context.Context, request GetNodeUptimeRequestObject) (GetNodeUptimeResponseObject, error)
}

StrictServerInterface represents all server handlers.

type UptimeCollectionResponse

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

UptimeCollectionResponse defines model for UptimeCollectionResponse.

type UptimeResponse

type UptimeResponse 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 hostname of the agent.
	Hostname string `json:"hostname"`

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

	// Uptime The uptime of the system.
	Uptime *string `json:"uptime,omitempty"`
}

UptimeResponse System uptime information.

type UptimeResponseStatus

type UptimeResponseStatus string

UptimeResponseStatus The status of the operation for this host.

const (
	UptimeResponseStatusFailed  UptimeResponseStatus = "failed"
	UptimeResponseStatusOk      UptimeResponseStatus = "ok"
	UptimeResponseStatusSkipped UptimeResponseStatus = "skipped"
)

Defines values for UptimeResponseStatus.

Jump to

Keyboard shortcuts

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