gen

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 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.7.1 DO NOT EDIT.

Package gen contains generated code for the agent API.

Index

Constants

View Source
const (
	BearerAuthScopes bearerAuthContextKey = "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)

RegisterHandlersWithBaseURL registers handlers and prepends BaseURL to the paths so the API can be served under a prefix.

func RegisterHandlersWithOptions

func RegisterHandlersWithOptions(router EchoRouter, si ServerInterface, options RegisterHandlersOptions)

RegisterHandlersWithOptions registers handlers using the supplied options, including any per-operation middleware.

Types

type AcceptAgent200JSONResponse

type AcceptAgent200JSONResponse struct {
	Message string `json:"message"`
}

func (AcceptAgent200JSONResponse) VisitAcceptAgentResponse

func (response AcceptAgent200JSONResponse) VisitAcceptAgentResponse(w http.ResponseWriter) error

type AcceptAgent400JSONResponse

type AcceptAgent400JSONResponse externalRef0.ErrorResponse

func (AcceptAgent400JSONResponse) VisitAcceptAgentResponse

func (response AcceptAgent400JSONResponse) VisitAcceptAgentResponse(w http.ResponseWriter) error

type AcceptAgent401JSONResponse

type AcceptAgent401JSONResponse externalRef0.ErrorResponse

func (AcceptAgent401JSONResponse) VisitAcceptAgentResponse

func (response AcceptAgent401JSONResponse) VisitAcceptAgentResponse(w http.ResponseWriter) error

type AcceptAgent403JSONResponse

type AcceptAgent403JSONResponse externalRef0.ErrorResponse

func (AcceptAgent403JSONResponse) VisitAcceptAgentResponse

func (response AcceptAgent403JSONResponse) VisitAcceptAgentResponse(w http.ResponseWriter) error

type AcceptAgent404JSONResponse

type AcceptAgent404JSONResponse externalRef0.ErrorResponse

func (AcceptAgent404JSONResponse) VisitAcceptAgentResponse

func (response AcceptAgent404JSONResponse) VisitAcceptAgentResponse(w http.ResponseWriter) error

type AcceptAgent500JSONResponse

type AcceptAgent500JSONResponse externalRef0.ErrorResponse

func (AcceptAgent500JSONResponse) VisitAcceptAgentResponse

func (response AcceptAgent500JSONResponse) VisitAcceptAgentResponse(w http.ResponseWriter) error

type AcceptAgentParams

type AcceptAgentParams struct {
	// Fingerprint Accept by fingerprint instead of hostname.
	Fingerprint *string `form:"fingerprint,omitempty" json:"fingerprint,omitempty" validate:"omitempty,min=1,max=255"`
}

AcceptAgentParams defines parameters for AcceptAgent.

type AcceptAgentRequestObject

type AcceptAgentRequestObject struct {
	Hostname string `json:"hostname" validate:"required,min=1,max=255"`
	Params   AcceptAgentParams
}

type AcceptAgentResponseObject

type AcceptAgentResponseObject interface {
	VisitAcceptAgentResponse(w http.ResponseWriter) error
}

type AgentInfo

type AgentInfo struct {
	// Architecture CPU architecture.
	Architecture *string `json:"architecture,omitempty"`

	// Conditions Evaluated node conditions.
	Conditions *[]NodeCondition `json:"conditions,omitempty"`

	// CpuCount Number of logical CPUs.
	CpuCount *int `json:"cpu_count,omitempty"`

	// Facts Extended facts from additional providers.
	Facts *map[string]interface{} `json:"facts,omitempty"`

	// Fingerprint The SHA256 fingerprint of the agent's PKI public key. Empty when PKI is disabled.
	Fingerprint *string `json:"fingerprint,omitempty"`

	// Fqdn Fully qualified domain name.
	Fqdn *string `json:"fqdn,omitempty"`

	// Hostname The hostname of the agent.
	Hostname   string                      `json:"hostname"`
	Interfaces *[]NetworkInterfaceResponse `json:"interfaces,omitempty"`

	// KernelVersion OS kernel version.
	KernelVersion *string `json:"kernel_version,omitempty"`

	// KeyStored Whether the controller holds this agent's public key, recorded when its enrollment was accepted. False for an agent that has not enrolled since the key store existed, which is what to re-enrol before enabling enforcement.
	KeyStored *bool `json:"key_stored,omitempty"`

	// Labels Key-value labels configured on the agent.
	Labels *map[string]string `json:"labels,omitempty"`

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

	// MachineId The permanent machine identifier.
	MachineId *string `json:"machine_id,omitempty"`

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

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

	// PackageMgr Package manager.
	PackageMgr *string `json:"package_mgr,omitempty"`

	// PrimaryInterface Name of the interface used for the default route.
	PrimaryInterface *string `json:"primary_interface,omitempty"`

	// RegisteredAt When the agent last refreshed its heartbeat.
	RegisteredAt *time.Time `json:"registered_at,omitempty"`

	// Routes Network routing table entries.
	Routes *[]RouteResponse `json:"routes,omitempty"`

	// ServiceMgr Init system.
	ServiceMgr *string `json:"service_mgr,omitempty"`

	// StartedAt When the agent process started.
	StartedAt *time.Time `json:"started_at,omitempty"`

	// State Agent scheduling state.
	State *AgentInfoState `json:"state,omitempty"`

	// Status The current status of the agent.
	Status AgentInfoStatus `json:"status"`

	// Timeline Agent state transition history.
	Timeline *[]TimelineEvent `json:"timeline,omitempty"`

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

	// Verified Whether this agent's registration was signed by its stored key and claims the hostname it enrolled under. Only a verified registration decides where work is routed. True when the controller is not enforcing verification.
	Verified *bool `json:"verified,omitempty"`
}

AgentInfo defines model for AgentInfo.

type AgentInfoState

type AgentInfoState string

AgentInfoState Agent scheduling state.

const (
	AgentInfoStateCordoned AgentInfoState = "Cordoned"
	AgentInfoStateDraining AgentInfoState = "Draining"
	AgentInfoStatePending  AgentInfoState = "Pending"
	AgentInfoStateReady    AgentInfoState = "Ready"
)

Defines values for AgentInfoState.

func (AgentInfoState) Valid

func (e AgentInfoState) Valid() bool

Valid indicates whether the value is a known member of the AgentInfoState enum.

type AgentInfoStatus

type AgentInfoStatus string

AgentInfoStatus The current status of the agent.

const (
	AgentInfoStatusNotReady AgentInfoStatus = "NotReady"
	AgentInfoStatusReady    AgentInfoStatus = "Ready"
)

Defines values for AgentInfoStatus.

func (AgentInfoStatus) Valid

func (e AgentInfoStatus) Valid() bool

Valid indicates whether the value is a known member of the AgentInfoStatus enum.

type DrainAgent200JSONResponse

type DrainAgent200JSONResponse struct {
	Message string `json:"message"`
}

func (DrainAgent200JSONResponse) VisitDrainAgentResponse

func (response DrainAgent200JSONResponse) VisitDrainAgentResponse(w http.ResponseWriter) error

type DrainAgent400JSONResponse

type DrainAgent400JSONResponse externalRef0.ErrorResponse

func (DrainAgent400JSONResponse) VisitDrainAgentResponse

func (response DrainAgent400JSONResponse) VisitDrainAgentResponse(w http.ResponseWriter) error

type DrainAgent401JSONResponse

type DrainAgent401JSONResponse externalRef0.ErrorResponse

func (DrainAgent401JSONResponse) VisitDrainAgentResponse

func (response DrainAgent401JSONResponse) VisitDrainAgentResponse(w http.ResponseWriter) error

type DrainAgent403JSONResponse

type DrainAgent403JSONResponse externalRef0.ErrorResponse

func (DrainAgent403JSONResponse) VisitDrainAgentResponse

func (response DrainAgent403JSONResponse) VisitDrainAgentResponse(w http.ResponseWriter) error

type DrainAgent404JSONResponse

type DrainAgent404JSONResponse externalRef0.ErrorResponse

func (DrainAgent404JSONResponse) VisitDrainAgentResponse

func (response DrainAgent404JSONResponse) VisitDrainAgentResponse(w http.ResponseWriter) error

type DrainAgent409JSONResponse

type DrainAgent409JSONResponse externalRef0.ErrorResponse

func (DrainAgent409JSONResponse) VisitDrainAgentResponse

func (response DrainAgent409JSONResponse) VisitDrainAgentResponse(w http.ResponseWriter) error

type DrainAgentRequestObject

type DrainAgentRequestObject struct {
	Hostname string `json:"hostname" validate:"required,min=1,max=255"`
}

type DrainAgentResponseObject

type DrainAgentResponseObject interface {
	VisitDrainAgentResponse(w http.ResponseWriter) error
}

type EchoRouter

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 GetAgentDetails200JSONResponse

type GetAgentDetails200JSONResponse AgentInfo

func (GetAgentDetails200JSONResponse) VisitGetAgentDetailsResponse

func (response GetAgentDetails200JSONResponse) VisitGetAgentDetailsResponse(w http.ResponseWriter) error

type GetAgentDetails400JSONResponse

type GetAgentDetails400JSONResponse externalRef0.ErrorResponse

func (GetAgentDetails400JSONResponse) VisitGetAgentDetailsResponse

func (response GetAgentDetails400JSONResponse) VisitGetAgentDetailsResponse(w http.ResponseWriter) error

type GetAgentDetails401JSONResponse

type GetAgentDetails401JSONResponse externalRef0.ErrorResponse

func (GetAgentDetails401JSONResponse) VisitGetAgentDetailsResponse

func (response GetAgentDetails401JSONResponse) VisitGetAgentDetailsResponse(w http.ResponseWriter) error

type GetAgentDetails403JSONResponse

type GetAgentDetails403JSONResponse externalRef0.ErrorResponse

func (GetAgentDetails403JSONResponse) VisitGetAgentDetailsResponse

func (response GetAgentDetails403JSONResponse) VisitGetAgentDetailsResponse(w http.ResponseWriter) error

type GetAgentDetails404JSONResponse

type GetAgentDetails404JSONResponse externalRef0.ErrorResponse

func (GetAgentDetails404JSONResponse) VisitGetAgentDetailsResponse

func (response GetAgentDetails404JSONResponse) VisitGetAgentDetailsResponse(w http.ResponseWriter) error

type GetAgentDetails500JSONResponse

type GetAgentDetails500JSONResponse externalRef0.ErrorResponse

func (GetAgentDetails500JSONResponse) VisitGetAgentDetailsResponse

func (response GetAgentDetails500JSONResponse) VisitGetAgentDetailsResponse(w http.ResponseWriter) error

type GetAgentDetailsRequestObject

type GetAgentDetailsRequestObject struct {
	Hostname string `json:"hostname" validate:"required,min=1,max=255"`
}

type GetAgentDetailsResponseObject

type GetAgentDetailsResponseObject interface {
	VisitGetAgentDetailsResponse(w http.ResponseWriter) error
}

type GetAgents200JSONResponse

type GetAgents200JSONResponse ListAgentsResponse

func (GetAgents200JSONResponse) VisitGetAgentsResponse

func (response GetAgents200JSONResponse) VisitGetAgentsResponse(w http.ResponseWriter) error

type GetAgents401JSONResponse

type GetAgents401JSONResponse externalRef0.ErrorResponse

func (GetAgents401JSONResponse) VisitGetAgentsResponse

func (response GetAgents401JSONResponse) VisitGetAgentsResponse(w http.ResponseWriter) error

type GetAgents403JSONResponse

type GetAgents403JSONResponse externalRef0.ErrorResponse

func (GetAgents403JSONResponse) VisitGetAgentsResponse

func (response GetAgents403JSONResponse) VisitGetAgentsResponse(w http.ResponseWriter) error

type GetAgents500JSONResponse

type GetAgents500JSONResponse externalRef0.ErrorResponse

func (GetAgents500JSONResponse) VisitGetAgentsResponse

func (response GetAgents500JSONResponse) VisitGetAgentsResponse(w http.ResponseWriter) error

type GetAgentsPending200JSONResponse

type GetAgentsPending200JSONResponse ListPendingAgentsResponse

func (GetAgentsPending200JSONResponse) VisitGetAgentsPendingResponse

func (response GetAgentsPending200JSONResponse) VisitGetAgentsPendingResponse(w http.ResponseWriter) error

type GetAgentsPending401JSONResponse

type GetAgentsPending401JSONResponse externalRef0.ErrorResponse

func (GetAgentsPending401JSONResponse) VisitGetAgentsPendingResponse

func (response GetAgentsPending401JSONResponse) VisitGetAgentsPendingResponse(w http.ResponseWriter) error

type GetAgentsPending403JSONResponse

type GetAgentsPending403JSONResponse externalRef0.ErrorResponse

func (GetAgentsPending403JSONResponse) VisitGetAgentsPendingResponse

func (response GetAgentsPending403JSONResponse) VisitGetAgentsPendingResponse(w http.ResponseWriter) error

type GetAgentsPending500JSONResponse

type GetAgentsPending500JSONResponse externalRef0.ErrorResponse

func (GetAgentsPending500JSONResponse) VisitGetAgentsPendingResponse

func (response GetAgentsPending500JSONResponse) VisitGetAgentsPendingResponse(w http.ResponseWriter) error

type GetAgentsPendingRequestObject

type GetAgentsPendingRequestObject struct {
}

type GetAgentsPendingResponseObject

type GetAgentsPendingResponseObject interface {
	VisitGetAgentsPendingResponse(w http.ResponseWriter) error
}

type GetAgentsRequestObject

type GetAgentsRequestObject struct {
}

type GetAgentsResponseObject

type GetAgentsResponseObject interface {
	VisitGetAgentsResponse(w http.ResponseWriter) error
}

type ListAgentsResponse

type ListAgentsResponse struct {
	Agents []AgentInfo `json:"agents"`

	// Total Total number of active agents.
	Total int `json:"total"`
}

ListAgentsResponse defines model for ListAgentsResponse.

type ListPendingAgentsResponse

type ListPendingAgentsResponse struct {
	Agents []PendingAgentInfo `json:"agents"`

	// Total Total number of pending agents.
	Total int `json:"total"`
}

ListPendingAgentsResponse defines model for ListPendingAgentsResponse.

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

type NetworkInterfaceResponse struct {
	// Family IP address family.
	Family *NetworkInterfaceResponseFamily `json:"family,omitempty"`
	Ipv4   *string                         `json:"ipv4,omitempty"`
	Ipv6   *string                         `json:"ipv6,omitempty"`
	Mac    *string                         `json:"mac,omitempty"`
	Name   string                          `json:"name"`
}

NetworkInterfaceResponse defines model for NetworkInterfaceResponse.

type NetworkInterfaceResponseFamily

type NetworkInterfaceResponseFamily string

NetworkInterfaceResponseFamily IP address family.

Defines values for NetworkInterfaceResponseFamily.

func (NetworkInterfaceResponseFamily) Valid

Valid indicates whether the value is a known member of the NetworkInterfaceResponseFamily enum.

type NodeCondition

type NodeCondition struct {
	LastTransitionTime time.Time         `json:"last_transition_time"`
	Reason             *string           `json:"reason,omitempty"`
	Status             bool              `json:"status"`
	Type               NodeConditionType `json:"type"`
}

NodeCondition defines model for NodeCondition.

type NodeConditionType

type NodeConditionType string

NodeConditionType defines model for NodeCondition.Type.

const (
	DiskPressure   NodeConditionType = "DiskPressure"
	HighLoad       NodeConditionType = "HighLoad"
	MemoryPressure NodeConditionType = "MemoryPressure"
)

Defines values for NodeConditionType.

func (NodeConditionType) Valid

func (e NodeConditionType) Valid() bool

Valid indicates whether the value is a known member of the NodeConditionType enum.

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 PendingAgentInfo

type PendingAgentInfo struct {
	// Fingerprint The SHA256 fingerprint of the agent's public key.
	Fingerprint string `json:"fingerprint"`

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

	// MachineId The permanent machine identifier.
	MachineId string `json:"machine_id"`

	// RequestedAt When the enrollment request was received.
	RequestedAt time.Time `json:"requested_at"`
}

PendingAgentInfo defines model for PendingAgentInfo.

type RegisterHandlersOptions

type RegisterHandlersOptions struct {
	// BaseURL is prepended to every registered path so the API can be served
	// under a prefix.
	BaseURL string
	// OperationMiddlewares lets the caller attach per-operation middleware at
	// registration time. The map key is the OpenAPI `operationId` value as it
	// appears in the spec (the raw, un-normalized form). Operations that have
	// no entry are registered with no extra middleware. A nil map disables
	// per-operation middleware entirely.
	OperationMiddlewares map[string][]echo.MiddlewareFunc
}

RegisterHandlersOptions configures RegisterHandlersWithOptions.

type RejectAgent200JSONResponse

type RejectAgent200JSONResponse struct {
	Message string `json:"message"`
}

func (RejectAgent200JSONResponse) VisitRejectAgentResponse

func (response RejectAgent200JSONResponse) VisitRejectAgentResponse(w http.ResponseWriter) error

type RejectAgent400JSONResponse

type RejectAgent400JSONResponse externalRef0.ErrorResponse

func (RejectAgent400JSONResponse) VisitRejectAgentResponse

func (response RejectAgent400JSONResponse) VisitRejectAgentResponse(w http.ResponseWriter) error

type RejectAgent401JSONResponse

type RejectAgent401JSONResponse externalRef0.ErrorResponse

func (RejectAgent401JSONResponse) VisitRejectAgentResponse

func (response RejectAgent401JSONResponse) VisitRejectAgentResponse(w http.ResponseWriter) error

type RejectAgent403JSONResponse

type RejectAgent403JSONResponse externalRef0.ErrorResponse

func (RejectAgent403JSONResponse) VisitRejectAgentResponse

func (response RejectAgent403JSONResponse) VisitRejectAgentResponse(w http.ResponseWriter) error

type RejectAgent404JSONResponse

type RejectAgent404JSONResponse externalRef0.ErrorResponse

func (RejectAgent404JSONResponse) VisitRejectAgentResponse

func (response RejectAgent404JSONResponse) VisitRejectAgentResponse(w http.ResponseWriter) error

type RejectAgent500JSONResponse

type RejectAgent500JSONResponse externalRef0.ErrorResponse

func (RejectAgent500JSONResponse) VisitRejectAgentResponse

func (response RejectAgent500JSONResponse) VisitRejectAgentResponse(w http.ResponseWriter) error

type RejectAgentRequestObject

type RejectAgentRequestObject struct {
	Hostname string `json:"hostname" validate:"required,min=1,max=255"`
}

type RejectAgentResponseObject

type RejectAgentResponseObject interface {
	VisitRejectAgentResponse(w http.ResponseWriter) error
}

type RouteResponse

type RouteResponse struct {
	// Destination Destination network address.
	Destination string `json:"destination"`

	// Flags Route flags.
	Flags *string `json:"flags,omitempty"`

	// Gateway Gateway address.
	Gateway string `json:"gateway"`

	// Interface Network interface name.
	Interface string `json:"interface"`

	// Mask Network mask in CIDR notation.
	Mask *string `json:"mask,omitempty"`

	// Metric Route metric.
	Metric *int `json:"metric,omitempty"`
}

RouteResponse A network routing table entry.

type ServerInterface

type ServerInterface interface {
	// List active agents
	// (GET /api/agent)
	GetAgents(ctx *echo.Context) error
	// List agents awaiting enrollment
	// (GET /api/agent/pending)
	GetAgentsPending(ctx *echo.Context) error
	// Get agent details
	// (GET /api/agent/{hostname})
	GetAgentDetails(ctx *echo.Context, hostname string) error
	// Accept a pending agent
	// (POST /api/agent/{hostname}/accept)
	AcceptAgent(ctx *echo.Context, hostname string, params AcceptAgentParams) error
	// Drain an agent
	// (POST /api/agent/{hostname}/drain)
	DrainAgent(ctx *echo.Context, hostname string) error
	// Reject a pending agent
	// (POST /api/agent/{hostname}/reject)
	RejectAgent(ctx *echo.Context, hostname string) error
	// Undrain an agent
	// (POST /api/agent/{hostname}/undrain)
	UndrainAgent(ctx *echo.Context, hostname string) 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) AcceptAgent

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

AcceptAgent converts echo context to params.

func (*ServerInterfaceWrapper) DrainAgent

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

DrainAgent converts echo context to params.

func (*ServerInterfaceWrapper) GetAgentDetails

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

GetAgentDetails converts echo context to params.

func (*ServerInterfaceWrapper) GetAgents

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

GetAgents converts echo context to params.

func (*ServerInterfaceWrapper) GetAgentsPending

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

GetAgentsPending converts echo context to params.

func (*ServerInterfaceWrapper) RejectAgent

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

RejectAgent converts echo context to params.

func (*ServerInterfaceWrapper) UndrainAgent

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

UndrainAgent converts echo context to params.

type StrictHandlerFunc

type StrictHandlerFunc func(ctx *echo.Context, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// List active agents
	// (GET /api/agent)
	GetAgents(ctx context.Context, request GetAgentsRequestObject) (GetAgentsResponseObject, error)
	// List agents awaiting enrollment
	// (GET /api/agent/pending)
	GetAgentsPending(ctx context.Context, request GetAgentsPendingRequestObject) (GetAgentsPendingResponseObject, error)
	// Get agent details
	// (GET /api/agent/{hostname})
	GetAgentDetails(ctx context.Context, request GetAgentDetailsRequestObject) (GetAgentDetailsResponseObject, error)
	// Accept a pending agent
	// (POST /api/agent/{hostname}/accept)
	AcceptAgent(ctx context.Context, request AcceptAgentRequestObject) (AcceptAgentResponseObject, error)
	// Drain an agent
	// (POST /api/agent/{hostname}/drain)
	DrainAgent(ctx context.Context, request DrainAgentRequestObject) (DrainAgentResponseObject, error)
	// Reject a pending agent
	// (POST /api/agent/{hostname}/reject)
	RejectAgent(ctx context.Context, request RejectAgentRequestObject) (RejectAgentResponseObject, error)
	// Undrain an agent
	// (POST /api/agent/{hostname}/undrain)
	UndrainAgent(ctx context.Context, request UndrainAgentRequestObject) (UndrainAgentResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TimelineEvent

type TimelineEvent struct {
	Error     *string   `json:"error,omitempty"`
	Event     string    `json:"event"`
	Hostname  *string   `json:"hostname,omitempty"`
	Message   *string   `json:"message,omitempty"`
	Timestamp time.Time `json:"timestamp"`
}

TimelineEvent defines model for TimelineEvent.

type UndrainAgent200JSONResponse

type UndrainAgent200JSONResponse struct {
	Message string `json:"message"`
}

func (UndrainAgent200JSONResponse) VisitUndrainAgentResponse

func (response UndrainAgent200JSONResponse) VisitUndrainAgentResponse(w http.ResponseWriter) error

type UndrainAgent400JSONResponse

type UndrainAgent400JSONResponse externalRef0.ErrorResponse

func (UndrainAgent400JSONResponse) VisitUndrainAgentResponse

func (response UndrainAgent400JSONResponse) VisitUndrainAgentResponse(w http.ResponseWriter) error

type UndrainAgent401JSONResponse

type UndrainAgent401JSONResponse externalRef0.ErrorResponse

func (UndrainAgent401JSONResponse) VisitUndrainAgentResponse

func (response UndrainAgent401JSONResponse) VisitUndrainAgentResponse(w http.ResponseWriter) error

type UndrainAgent403JSONResponse

type UndrainAgent403JSONResponse externalRef0.ErrorResponse

func (UndrainAgent403JSONResponse) VisitUndrainAgentResponse

func (response UndrainAgent403JSONResponse) VisitUndrainAgentResponse(w http.ResponseWriter) error

type UndrainAgent404JSONResponse

type UndrainAgent404JSONResponse externalRef0.ErrorResponse

func (UndrainAgent404JSONResponse) VisitUndrainAgentResponse

func (response UndrainAgent404JSONResponse) VisitUndrainAgentResponse(w http.ResponseWriter) error

type UndrainAgent409JSONResponse

type UndrainAgent409JSONResponse externalRef0.ErrorResponse

func (UndrainAgent409JSONResponse) VisitUndrainAgentResponse

func (response UndrainAgent409JSONResponse) VisitUndrainAgentResponse(w http.ResponseWriter) error

type UndrainAgentRequestObject

type UndrainAgentRequestObject struct {
	Hostname string `json:"hostname" validate:"required,min=1,max=255"`
}

type UndrainAgentResponseObject

type UndrainAgentResponseObject interface {
	VisitUndrainAgentResponse(w http.ResponseWriter) error
}

Jump to

Keyboard shortcuts

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