openapi

package
v0.0.0-...-76fe550 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package openapi provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.7.0 DO NOT EDIT.

Index

Constants

View Source
const (
	SessionCookieScopes sessionCookieContextKey = "sessionCookie.Scopes"
)

Variables

This section is empty.

Functions

func GetSpec

func GetSpec() (swagger *openapi3.T, err error)

GetSpec returns the OpenAPI specification corresponding to the generated code in this file. External references in the spec are resolved through PathToRawSpec; externally-referenced files must be embedded in their corresponding Go packages (via the import-mapping feature). URL-based external refs are not supported.

func GetSpecJSON

func GetSpecJSON() ([]byte, error)

GetSpecJSON returns the raw JSON bytes of the embedded OpenAPI specification: decompressed but not unmarshaled. External references are not resolved here; the bytes are the spec exactly as embedded by codegen. The result is cached at package init time, so repeated calls are cheap.

func GetSwagger deprecated

func GetSwagger() (*openapi3.T, error)

GetSwagger returns the OpenAPI specification corresponding to the generated code in this file.

Deprecated: GetSwagger predates kin-openapi renaming openapi3.Swagger to openapi3.T. Use GetSpec instead. This wrapper is retained for backwards compatibility.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type Agent

type Agent struct {
	// CertExpiresAt Expiry timestamp of the agent's current certificate.
	CertExpiresAt *time.Time `json:"cert_expires_at,omitempty"`

	// CertIssuedAt Issuance timestamp of the agent's current certificate.
	CertIssuedAt *time.Time `json:"cert_issued_at,omitempty"`

	// CertificateRecovery Optional snapshot of any active certificate-recovery grant
	// for the agent. Absent when no grant has been issued.
	CertificateRecovery *AgentCertificateRecoveryGrant `json:"certificate_recovery,omitempty"`

	// FleetGroupId UUID of the fleet group the agent belongs to.
	FleetGroupId string `json:"fleet_group_id"`

	// Id Agent UUID.
	Id string `json:"id"`

	// LastSeenAt Last successful heartbeat timestamp.
	LastSeenAt time.Time `json:"last_seen_at"`

	// NodeName Operator-facing display name.
	NodeName string `json:"node_name"`

	// PresenceState Live presence evaluation — `online`, `flapping`, `offline`, etc.
	// Computed at request time from session + heartbeat data.
	PresenceState string `json:"presence_state"`

	// ReadOnly True when the agent serves read-only Telemt instances.
	ReadOnly bool `json:"read_only"`

	// Runtime Telemt operator overview reported by the agent. The set of
	// fields is defensive on the Zod side because backends can ship
	// new counters without an immediate web release; on the spec
	// side we list every field the panel currently consumes.
	Runtime AgentRuntime `json:"runtime"`

	// TransportReconnectPending True when the agent was switched to outbound transport but the
	// panel has not accepted a session from/to it since the switch
	// ("switched but never reconnected"). Cleared on the next accepted
	// agent stream.
	TransportReconnectPending *bool `json:"transport_reconnect_pending,omitempty"`

	// Version Agent binary semver as last reported.
	Version string `json:"version"`
}

Agent Control-plane snapshot of one enrolled agent. Mirrors the Go `server.Agent` struct (`internal/controlplane/server/types.go`).

type AgentCertificateRecoveryGrant

type AgentCertificateRecoveryGrant struct {
	AgentId       string                              `json:"agent_id"`
	ExpiresAtUnix int64                               `json:"expires_at_unix"`
	IssuedAtUnix  int64                               `json:"issued_at_unix"`
	RevokedAtUnix *int64                              `json:"revoked_at_unix,omitempty"`
	Status        AgentCertificateRecoveryGrantStatus `json:"status"`
	UsedAtUnix    *int64                              `json:"used_at_unix,omitempty"`
}

AgentCertificateRecoveryGrant Lifecycle snapshot of a single recovery grant.

type AgentCertificateRecoveryGrantStatus

type AgentCertificateRecoveryGrantStatus string

AgentCertificateRecoveryGrantStatus defines model for AgentCertificateRecoveryGrant.Status.

const (
	AgentCertificateRecoveryGrantStatusAllowed AgentCertificateRecoveryGrantStatus = "allowed"
	AgentCertificateRecoveryGrantStatusExpired AgentCertificateRecoveryGrantStatus = "expired"
	AgentCertificateRecoveryGrantStatusRevoked AgentCertificateRecoveryGrantStatus = "revoked"
	AgentCertificateRecoveryGrantStatusUsed    AgentCertificateRecoveryGrantStatus = "used"
)

Defines values for AgentCertificateRecoveryGrantStatus.

func (AgentCertificateRecoveryGrantStatus) Valid

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

type AgentList

type AgentList = []Agent

AgentList List response from `GET /api/agents`.

type AgentRuntime

type AgentRuntime struct {
	AcceptingNewConnections bool  `json:"accepting_new_connections"`
	ActiveUsers             int   `json:"active_users"`
	ConfiguredUsers         int   `json:"configured_users"`
	ConnectAttemptTotal     int64 `json:"connect_attempt_total"`
	ConnectFailTotal        int64 `json:"connect_fail_total"`
	ConnectFailfastTotal    int64 `json:"connect_failfast_total"`
	ConnectSuccessTotal     int64 `json:"connect_success_total"`

	// ConnectionsBadByClass Per-class breakdown of bad connections (Telemt 3.4.10+). The
	// class set is open-ended. Backend emits `null` (not `[]`) when
	// no breakdown has been observed yet — absence means "unknown".
	ConnectionsBadByClass    *[]ConnectionClassCount `json:"connections_bad_by_class,omitempty"`
	ConnectionsBadTotal      int64                   `json:"connections_bad_total"`
	ConnectionsTotal         int64                   `json:"connections_total"`
	CurrentConnections       int                     `json:"current_connections"`
	CurrentConnectionsDirect int                     `json:"current_connections_direct"`
	CurrentConnectionsMe     int                     `json:"current_connections_me"`
	DcCoveragePct            float64                 `json:"dc_coverage_pct"`
	Dcs                      []RuntimeDC             `json:"dcs"`
	Degraded                 bool                    `json:"degraded"`
	DirectUpstreams          *int                    `json:"direct_upstreams,omitempty"`
	FailRateKnown            bool                    `json:"fail_rate_known"`

	// FailRatePct5m 5-minute upstream connect fail-rate. Read together with
	// `fail_rate_known`: `false` means "unknown", not "0%".
	FailRatePct5m float64 `json:"fail_rate_pct_5m"`

	// FallbackEnteredAtUnix Unix timestamp the panel observed this agent enter
	// ME→DC fallback. Absent when not in fallback.
	FallbackEnteredAtUnix *int64 `json:"fallback_entered_at_unix,omitempty"`

	// HandshakeFailuresByClass Per-class breakdown of handshake failures (Telemt 3.4.10+).
	// Same null-vs-empty semantics as connections_bad_by_class.
	HandshakeFailuresByClass   *[]ConnectionClassCount    `json:"handshake_failures_by_class,omitempty"`
	HandshakeTimeoutsTotal     int64                      `json:"handshake_timeouts_total"`
	HealthyUpstreams           int                        `json:"healthy_upstreams"`
	InitializationProgressPct  float64                    `json:"initialization_progress_pct"`
	InitializationStage        string                     `json:"initialization_stage"`
	InitializationStatus       string                     `json:"initialization_status"`
	LifecycleState             *string                    `json:"lifecycle_state,omitempty"`
	Me2dcFallbackEnabled       bool                       `json:"me2dc_fallback_enabled"`
	Me2dcFastEnabled           *bool                      `json:"me2dc_fast_enabled,omitempty"`
	MeRuntimeReady             bool                       `json:"me_runtime_ready"`
	MeWritersSummary           *RuntimeMeWritersSummary   `json:"me_writers_summary,omitempty"`
	RecentEvents               []RuntimeEvent             `json:"recent_events"`
	RerouteActive              *bool                      `json:"reroute_active,omitempty"`
	RouteMode                  *string                    `json:"route_mode,omitempty"`
	ShadowsocksUpstreams       *int                       `json:"shadowsocks_upstreams,omitempty"`
	Socks4Upstreams            *int                       `json:"socks4_upstreams,omitempty"`
	Socks5Upstreams            *int                       `json:"socks5_upstreams,omitempty"`
	StaleCacheUsed             *bool                      `json:"stale_cache_used,omitempty"`
	StartupProgressPct         float64                    `json:"startup_progress_pct"`
	StartupStage               string                     `json:"startup_stage"`
	StartupStatus              string                     `json:"startup_status"`
	SystemLoad                 RuntimeSystemLoad          `json:"system_load"`
	TelemtUnreachable          bool                       `json:"telemt_unreachable"`
	TelemtUnreachableSinceUnix int64                      `json:"telemt_unreachable_since_unix"`
	TopByConnections           *[]RuntimeTopByConnections `json:"top_by_connections,omitempty"`
	TopByThroughput            *[]RuntimeTopByThroughput  `json:"top_by_throughput,omitempty"`
	TotalUpstreams             int                        `json:"total_upstreams"`
	TransportMode              string                     `json:"transport_mode"`
	UnhealthyUpstreams         *int                       `json:"unhealthy_upstreams,omitempty"`
	UpdatedAt                  time.Time                  `json:"updated_at"`
	Upstreams                  []RuntimeUpstream          `json:"upstreams"`
	UptimeSeconds              float64                    `json:"uptime_seconds"`
	UseMiddleProxy             bool                       `json:"use_middle_proxy"`
}

AgentRuntime Telemt operator overview reported by the agent. The set of fields is defensive on the Zod side because backends can ship new counters without an immediate web release; on the spec side we list every field the panel currently consumes.

type BadRequest

type BadRequest = Error

BadRequest Standard error envelope used by every 4xx / 5xx response.

type BadRequestJSONResponse

type BadRequestJSONResponse Error

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type ConnectionClassCount

type ConnectionClassCount struct {
	Class string `json:"class"`
	Total int64  `json:"total"`
}

ConnectionClassCount One (class, total) pair from Telemt's classified bad-connection and handshake-failure counters. Mirrors the Go `ConnectionClassCount` presentation type.

type CreateAgentCertificateRecoveryGrant201JSONResponse

type CreateAgentCertificateRecoveryGrant201JSONResponse AgentCertificateRecoveryGrant

func (CreateAgentCertificateRecoveryGrant201JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse

func (response CreateAgentCertificateRecoveryGrant201JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type CreateAgentCertificateRecoveryGrant400JSONResponse

type CreateAgentCertificateRecoveryGrant400JSONResponse struct{ BadRequestJSONResponse }

func (CreateAgentCertificateRecoveryGrant400JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse

func (response CreateAgentCertificateRecoveryGrant400JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type CreateAgentCertificateRecoveryGrant401JSONResponse

type CreateAgentCertificateRecoveryGrant401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateAgentCertificateRecoveryGrant401JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse

func (response CreateAgentCertificateRecoveryGrant401JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type CreateAgentCertificateRecoveryGrant403JSONResponse

type CreateAgentCertificateRecoveryGrant403JSONResponse struct{ ForbiddenJSONResponse }

func (CreateAgentCertificateRecoveryGrant403JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse

func (response CreateAgentCertificateRecoveryGrant403JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type CreateAgentCertificateRecoveryGrant404JSONResponse

type CreateAgentCertificateRecoveryGrant404JSONResponse struct{ NotFoundJSONResponse }

func (CreateAgentCertificateRecoveryGrant404JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse

func (response CreateAgentCertificateRecoveryGrant404JSONResponse) VisitCreateAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type CreateAgentCertificateRecoveryGrantJSONRequestBody

type CreateAgentCertificateRecoveryGrantJSONRequestBody = CreateCertificateRecoveryGrantRequest

CreateAgentCertificateRecoveryGrantJSONRequestBody defines body for CreateAgentCertificateRecoveryGrant for application/json ContentType.

type CreateAgentCertificateRecoveryGrantRequestObject

type CreateAgentCertificateRecoveryGrantRequestObject struct {
	Id   string `json:"id"`
	Body *CreateAgentCertificateRecoveryGrantJSONRequestBody
}

type CreateAgentCertificateRecoveryGrantResponseObject

type CreateAgentCertificateRecoveryGrantResponseObject interface {
	VisitCreateAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error
}

type CreateAgentInstallCommand200JSONResponse

type CreateAgentInstallCommand200JSONResponse InstallCommandResponse

func (CreateAgentInstallCommand200JSONResponse) VisitCreateAgentInstallCommandResponse

func (response CreateAgentInstallCommand200JSONResponse) VisitCreateAgentInstallCommandResponse(w http.ResponseWriter) error

type CreateAgentInstallCommand400JSONResponse

type CreateAgentInstallCommand400JSONResponse struct{ BadRequestJSONResponse }

func (CreateAgentInstallCommand400JSONResponse) VisitCreateAgentInstallCommandResponse

func (response CreateAgentInstallCommand400JSONResponse) VisitCreateAgentInstallCommandResponse(w http.ResponseWriter) error

type CreateAgentInstallCommand401JSONResponse

type CreateAgentInstallCommand401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateAgentInstallCommand401JSONResponse) VisitCreateAgentInstallCommandResponse

func (response CreateAgentInstallCommand401JSONResponse) VisitCreateAgentInstallCommandResponse(w http.ResponseWriter) error

type CreateAgentInstallCommand404JSONResponse

type CreateAgentInstallCommand404JSONResponse struct{ NotFoundJSONResponse }

func (CreateAgentInstallCommand404JSONResponse) VisitCreateAgentInstallCommandResponse

func (response CreateAgentInstallCommand404JSONResponse) VisitCreateAgentInstallCommandResponse(w http.ResponseWriter) error

type CreateAgentInstallCommand503TextResponse

type CreateAgentInstallCommand503TextResponse string

func (CreateAgentInstallCommand503TextResponse) VisitCreateAgentInstallCommandResponse

func (response CreateAgentInstallCommand503TextResponse) VisitCreateAgentInstallCommandResponse(w http.ResponseWriter) error

type CreateAgentInstallCommandRequestObject

type CreateAgentInstallCommandRequestObject struct {
	Id string `json:"id"`
}

type CreateAgentInstallCommandResponseObject

type CreateAgentInstallCommandResponseObject interface {
	VisitCreateAgentInstallCommandResponse(w http.ResponseWriter) error
}

type CreateCertificateRecoveryGrantRequest

type CreateCertificateRecoveryGrantRequest struct {
	// TtlSeconds Grant lifetime in seconds. Zero or omitted yields the
	// server's default TTL (15m, capped at 1h).
	TtlSeconds *int `json:"ttl_seconds,omitempty"`
}

CreateCertificateRecoveryGrantRequest defines model for CreateCertificateRecoveryGrantRequest.

type CreateEnrollmentToken201JSONResponse

type CreateEnrollmentToken201JSONResponse CreateEnrollmentTokenResponse

func (CreateEnrollmentToken201JSONResponse) VisitCreateEnrollmentTokenResponse

func (response CreateEnrollmentToken201JSONResponse) VisitCreateEnrollmentTokenResponse(w http.ResponseWriter) error

type CreateEnrollmentToken400JSONResponse

type CreateEnrollmentToken400JSONResponse struct{ BadRequestJSONResponse }

func (CreateEnrollmentToken400JSONResponse) VisitCreateEnrollmentTokenResponse

func (response CreateEnrollmentToken400JSONResponse) VisitCreateEnrollmentTokenResponse(w http.ResponseWriter) error

type CreateEnrollmentToken401JSONResponse

type CreateEnrollmentToken401JSONResponse struct{ UnauthorizedJSONResponse }

func (CreateEnrollmentToken401JSONResponse) VisitCreateEnrollmentTokenResponse

func (response CreateEnrollmentToken401JSONResponse) VisitCreateEnrollmentTokenResponse(w http.ResponseWriter) error

type CreateEnrollmentToken403JSONResponse

type CreateEnrollmentToken403JSONResponse struct{ ForbiddenJSONResponse }

func (CreateEnrollmentToken403JSONResponse) VisitCreateEnrollmentTokenResponse

func (response CreateEnrollmentToken403JSONResponse) VisitCreateEnrollmentTokenResponse(w http.ResponseWriter) error

type CreateEnrollmentTokenJSONRequestBody

type CreateEnrollmentTokenJSONRequestBody = CreateEnrollmentTokenRequest

CreateEnrollmentTokenJSONRequestBody defines body for CreateEnrollmentToken for application/json ContentType.

type CreateEnrollmentTokenRequest

type CreateEnrollmentTokenRequest struct {
	// FleetGroupId Either the canonical UUID or the friendly slug; empty
	// string falls back to the default fleet group.
	FleetGroupId *string `json:"fleet_group_id,omitempty"`

	// TtlSeconds Token lifetime in seconds.
	TtlSeconds int `json:"ttl_seconds"`
}

CreateEnrollmentTokenRequest defines model for CreateEnrollmentTokenRequest.

type CreateEnrollmentTokenRequestObject

type CreateEnrollmentTokenRequestObject struct {
	Body *CreateEnrollmentTokenJSONRequestBody
}

type CreateEnrollmentTokenResponse

type CreateEnrollmentTokenResponse struct {
	// CaPem PEM-encoded panel CA certificate.
	CaPem         string `json:"ca_pem"`
	ExpiresAtUnix int64  `json:"expires_at_unix"`
	FleetGroupId  string `json:"fleet_group_id"`
	IssuedAtUnix  int64  `json:"issued_at_unix"`
	PanelUrl      string `json:"panel_url"`

	// ScriptSources The two canonical sources from which an agent host can fetch
	// the install script. Operators choose between them in the
	// Add-Server wizard — Panel for the default inbound case (panel
	// is reachable, integrity-checked), GitHub for outbound (panel
	// is firewalled from the agent host) or cold-bootstrap.
	ScriptSources ScriptSources `json:"script_sources"`

	// Value The raw bootstrap token. Returned only at creation.
	Value string `json:"value"`
}

CreateEnrollmentTokenResponse Response to a successful `POST /api/agents/enrollment-tokens`. The raw `value` is exposed once at this moment; subsequent listings only carry the masked form.

type CreateEnrollmentTokenResponseObject

type CreateEnrollmentTokenResponseObject interface {
	VisitCreateEnrollmentTokenResponse(w http.ResponseWriter) error
}

type DeregisterAgent204Response

type DeregisterAgent204Response struct {
}

func (DeregisterAgent204Response) VisitDeregisterAgentResponse

func (response DeregisterAgent204Response) VisitDeregisterAgentResponse(w http.ResponseWriter) error

type DeregisterAgent401JSONResponse

type DeregisterAgent401JSONResponse struct{ UnauthorizedJSONResponse }

func (DeregisterAgent401JSONResponse) VisitDeregisterAgentResponse

func (response DeregisterAgent401JSONResponse) VisitDeregisterAgentResponse(w http.ResponseWriter) error

type DeregisterAgent403JSONResponse

type DeregisterAgent403JSONResponse struct{ ForbiddenJSONResponse }

func (DeregisterAgent403JSONResponse) VisitDeregisterAgentResponse

func (response DeregisterAgent403JSONResponse) VisitDeregisterAgentResponse(w http.ResponseWriter) error

type DeregisterAgent404JSONResponse

type DeregisterAgent404JSONResponse struct{ NotFoundJSONResponse }

func (DeregisterAgent404JSONResponse) VisitDeregisterAgentResponse

func (response DeregisterAgent404JSONResponse) VisitDeregisterAgentResponse(w http.ResponseWriter) error

type DeregisterAgentRequestObject

type DeregisterAgentRequestObject struct {
	Id string `json:"id"`
}

type DeregisterAgentResponseObject

type DeregisterAgentResponseObject interface {
	VisitDeregisterAgentResponse(w http.ResponseWriter) error
}

type DispatchAgentUpdate200JSONResponse

type DispatchAgentUpdate200JSONResponse DispatchAgentUpdateResponse

func (DispatchAgentUpdate200JSONResponse) VisitDispatchAgentUpdateResponse

func (response DispatchAgentUpdate200JSONResponse) VisitDispatchAgentUpdateResponse(w http.ResponseWriter) error

type DispatchAgentUpdate400JSONResponse

type DispatchAgentUpdate400JSONResponse struct{ BadRequestJSONResponse }

func (DispatchAgentUpdate400JSONResponse) VisitDispatchAgentUpdateResponse

func (response DispatchAgentUpdate400JSONResponse) VisitDispatchAgentUpdateResponse(w http.ResponseWriter) error

type DispatchAgentUpdate401JSONResponse

type DispatchAgentUpdate401JSONResponse struct{ UnauthorizedJSONResponse }

func (DispatchAgentUpdate401JSONResponse) VisitDispatchAgentUpdateResponse

func (response DispatchAgentUpdate401JSONResponse) VisitDispatchAgentUpdateResponse(w http.ResponseWriter) error

type DispatchAgentUpdate404JSONResponse

type DispatchAgentUpdate404JSONResponse struct{ NotFoundJSONResponse }

func (DispatchAgentUpdate404JSONResponse) VisitDispatchAgentUpdateResponse

func (response DispatchAgentUpdate404JSONResponse) VisitDispatchAgentUpdateResponse(w http.ResponseWriter) error

type DispatchAgentUpdateJSONRequestBody

type DispatchAgentUpdateJSONRequestBody = DispatchAgentUpdateRequest

DispatchAgentUpdateJSONRequestBody defines body for DispatchAgentUpdate for application/json ContentType.

type DispatchAgentUpdateRequest

type DispatchAgentUpdateRequest struct {
	// Version Target agent binary version.
	Version string `json:"version"`
}

DispatchAgentUpdateRequest defines model for DispatchAgentUpdateRequest.

type DispatchAgentUpdateRequestObject

type DispatchAgentUpdateRequestObject struct {
	Id   string `json:"id"`
	Body *DispatchAgentUpdateJSONRequestBody
}

type DispatchAgentUpdateResponse

type DispatchAgentUpdateResponse struct {
	JobId   string `json:"job_id"`
	Status  string `json:"status"`
	Version string `json:"version"`
}

DispatchAgentUpdateResponse defines model for DispatchAgentUpdateResponse.

type DispatchAgentUpdateResponseObject

type DispatchAgentUpdateResponseObject interface {
	VisitDispatchAgentUpdateResponse(w http.ResponseWriter) error
}

type EnrollmentTokenList

type EnrollmentTokenList = []EnrollmentTokenListItem

EnrollmentTokenList defines model for EnrollmentTokenList.

type EnrollmentTokenListItem

type EnrollmentTokenListItem struct {
	ConsumedAtUnix *int64 `json:"consumed_at_unix,omitempty"`
	ExpiresAtUnix  int64  `json:"expires_at_unix"`
	FleetGroupId   string `json:"fleet_group_id"`

	// Handle SHA-256 prefix of the raw value, hex-encoded.
	Handle       *string `json:"handle,omitempty"`
	IssuedAtUnix int64   `json:"issued_at_unix"`

	// MaskedValue Truncated form of the raw value, ellipsis-suffixed.
	MaskedValue   *string                       `json:"masked_value,omitempty"`
	PanelUrl      string                        `json:"panel_url"`
	RevokedAtUnix *int64                        `json:"revoked_at_unix,omitempty"`
	Status        EnrollmentTokenListItemStatus `json:"status"`
}

EnrollmentTokenListItem Listing-safe view of an enrollment token. The raw `value` is intentionally absent — only the creation response surfaces the bearer secret. Use `handle` (SHA-256 prefix) to revoke.

type EnrollmentTokenListItemStatus

type EnrollmentTokenListItemStatus string

EnrollmentTokenListItemStatus defines model for EnrollmentTokenListItem.Status.

const (
	EnrollmentTokenListItemStatusActive   EnrollmentTokenListItemStatus = "active"
	EnrollmentTokenListItemStatusConsumed EnrollmentTokenListItemStatus = "consumed"
	EnrollmentTokenListItemStatusExpired  EnrollmentTokenListItemStatus = "expired"
	EnrollmentTokenListItemStatusRevoked  EnrollmentTokenListItemStatus = "revoked"
)

Defines values for EnrollmentTokenListItemStatus.

func (EnrollmentTokenListItemStatus) Valid

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

type Error

type Error struct {
	// Details Optional structured context. Shape varies per error code.
	Details *map[string]interface{} `json:"details,omitempty"`

	// Error Machine-readable error code (e.g. `not_found`, `forbidden`).
	Error string `json:"error"`

	// Message Human-readable message; safe to display to operators.
	Message *string `json:"message,omitempty"`
}

Error Standard error envelope used by every 4xx / 5xx response.

type Forbidden

type Forbidden = Error

Forbidden Standard error envelope used by every 4xx / 5xx response.

type ForbiddenJSONResponse

type ForbiddenJSONResponse Error

type GetHealthz200TextResponse

type GetHealthz200TextResponse string

func (GetHealthz200TextResponse) VisitGetHealthzResponse

func (response GetHealthz200TextResponse) VisitGetHealthzResponse(w http.ResponseWriter) error

type GetHealthzRequestObject

type GetHealthzRequestObject struct {
}

type GetHealthzResponseObject

type GetHealthzResponseObject interface {
	VisitGetHealthzResponse(w http.ResponseWriter) error
}

type GetVersion200JSONResponse

type GetVersion200JSONResponse VersionResponse

func (GetVersion200JSONResponse) VisitGetVersionResponse

func (response GetVersion200JSONResponse) VisitGetVersionResponse(w http.ResponseWriter) error

type GetVersion401JSONResponse

type GetVersion401JSONResponse struct{ UnauthorizedJSONResponse }

func (GetVersion401JSONResponse) VisitGetVersionResponse

func (response GetVersion401JSONResponse) VisitGetVersionResponse(w http.ResponseWriter) error

type GetVersionRequestObject

type GetVersionRequestObject struct {
}

type GetVersionResponseObject

type GetVersionResponseObject interface {
	VisitGetVersionResponse(w http.ResponseWriter) error
}

type InstallCommandAdvancedOptions

type InstallCommandAdvancedOptions struct {
	// InsecureTransport Opt-in: allow plain-HTTP panel URLs on non-loopback hosts.
	// Intended for VPN-only / private-network deploys where the
	// bootstrap-key handshake transits in cleartext.
	InsecureTransport *bool `json:"insecure_transport,omitempty"`

	// TelemtAuth Authorization header value (e.g. "Bearer xxx") the agent
	// forwards to Telemt. Empty / omitted = no auth header.
	TelemtAuth *string `json:"telemt_auth,omitempty"`

	// TelemtMetricsUrl Override the agent's Telemt metrics URL.
	TelemtMetricsUrl *string `json:"telemt_metrics_url,omitempty"`

	// TelemtUrl Override the agent's Telemt API URL.
	TelemtUrl *string `json:"telemt_url,omitempty"`
}

InstallCommandAdvancedOptions Optional per-install overrides — the wizard's "Advanced" section. All fields nullable / omittable so the default install (with the agent's built-in Telemt defaults) needs none of these.

type InstallCommandResponse

type InstallCommandResponse struct {
	Command       string `json:"command"`
	ExpiresAtUnix int64  `json:"expires_at_unix"`
}

InstallCommandResponse Pre-baked `curl ... | sudo bash -s -- ...` one-liner the operator runs on the host to install or re-bootstrap a reverse-mode agent.

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type ListAgents200JSONResponse

type ListAgents200JSONResponse AgentList

func (ListAgents200JSONResponse) VisitListAgentsResponse

func (response ListAgents200JSONResponse) VisitListAgentsResponse(w http.ResponseWriter) error

type ListAgents401JSONResponse

type ListAgents401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListAgents401JSONResponse) VisitListAgentsResponse

func (response ListAgents401JSONResponse) VisitListAgentsResponse(w http.ResponseWriter) error

type ListAgents403JSONResponse

type ListAgents403JSONResponse struct{ ForbiddenJSONResponse }

func (ListAgents403JSONResponse) VisitListAgentsResponse

func (response ListAgents403JSONResponse) VisitListAgentsResponse(w http.ResponseWriter) error

type ListAgentsRequestObject

type ListAgentsRequestObject struct {
}

type ListAgentsResponseObject

type ListAgentsResponseObject interface {
	VisitListAgentsResponse(w http.ResponseWriter) error
}

type ListEnrollmentTokens200JSONResponse

type ListEnrollmentTokens200JSONResponse EnrollmentTokenList

func (ListEnrollmentTokens200JSONResponse) VisitListEnrollmentTokensResponse

func (response ListEnrollmentTokens200JSONResponse) VisitListEnrollmentTokensResponse(w http.ResponseWriter) error

type ListEnrollmentTokens401JSONResponse

type ListEnrollmentTokens401JSONResponse struct{ UnauthorizedJSONResponse }

func (ListEnrollmentTokens401JSONResponse) VisitListEnrollmentTokensResponse

func (response ListEnrollmentTokens401JSONResponse) VisitListEnrollmentTokensResponse(w http.ResponseWriter) error

type ListEnrollmentTokens403JSONResponse

type ListEnrollmentTokens403JSONResponse struct{ ForbiddenJSONResponse }

func (ListEnrollmentTokens403JSONResponse) VisitListEnrollmentTokensResponse

func (response ListEnrollmentTokens403JSONResponse) VisitListEnrollmentTokensResponse(w http.ResponseWriter) error

type ListEnrollmentTokensRequestObject

type ListEnrollmentTokensRequestObject struct {
}

type ListEnrollmentTokensResponseObject

type ListEnrollmentTokensResponseObject interface {
	VisitListEnrollmentTokensResponse(w http.ResponseWriter) error
}

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type NotFound

type NotFound = Error

NotFound Standard error envelope used by every 4xx / 5xx response.

type NotFoundJSONResponse

type NotFoundJSONResponse Error

type ProvisionOutboundAgent201JSONResponse

type ProvisionOutboundAgent201JSONResponse ProvisionOutboundAgentResponse

func (ProvisionOutboundAgent201JSONResponse) VisitProvisionOutboundAgentResponse

func (response ProvisionOutboundAgent201JSONResponse) VisitProvisionOutboundAgentResponse(w http.ResponseWriter) error

type ProvisionOutboundAgent400JSONResponse

type ProvisionOutboundAgent400JSONResponse struct{ BadRequestJSONResponse }

func (ProvisionOutboundAgent400JSONResponse) VisitProvisionOutboundAgentResponse

func (response ProvisionOutboundAgent400JSONResponse) VisitProvisionOutboundAgentResponse(w http.ResponseWriter) error

type ProvisionOutboundAgent401JSONResponse

type ProvisionOutboundAgent401JSONResponse struct{ UnauthorizedJSONResponse }

func (ProvisionOutboundAgent401JSONResponse) VisitProvisionOutboundAgentResponse

func (response ProvisionOutboundAgent401JSONResponse) VisitProvisionOutboundAgentResponse(w http.ResponseWriter) error

type ProvisionOutboundAgent403JSONResponse

type ProvisionOutboundAgent403JSONResponse struct{ ForbiddenJSONResponse }

func (ProvisionOutboundAgent403JSONResponse) VisitProvisionOutboundAgentResponse

func (response ProvisionOutboundAgent403JSONResponse) VisitProvisionOutboundAgentResponse(w http.ResponseWriter) error

type ProvisionOutboundAgent409JSONResponse

type ProvisionOutboundAgent409JSONResponse Error

func (ProvisionOutboundAgent409JSONResponse) VisitProvisionOutboundAgentResponse

func (response ProvisionOutboundAgent409JSONResponse) VisitProvisionOutboundAgentResponse(w http.ResponseWriter) error

type ProvisionOutboundAgent503TextResponse

type ProvisionOutboundAgent503TextResponse string

func (ProvisionOutboundAgent503TextResponse) VisitProvisionOutboundAgentResponse

func (response ProvisionOutboundAgent503TextResponse) VisitProvisionOutboundAgentResponse(w http.ResponseWriter) error

type ProvisionOutboundAgentJSONRequestBody

type ProvisionOutboundAgentJSONRequestBody = ProvisionOutboundAgentRequest

ProvisionOutboundAgentJSONRequestBody defines body for ProvisionOutboundAgent for application/json ContentType.

type ProvisionOutboundAgentRequest

type ProvisionOutboundAgentRequest struct {
	// Advanced Optional per-install overrides — the wizard's "Advanced" section.
	// All fields nullable / omittable so the default install (with the
	// agent's built-in Telemt defaults) needs none of these.
	Advanced *InstallCommandAdvancedOptions `json:"advanced,omitempty"`

	// DialAddress Public host:port the panel dials to reach the agent. Used
	// both for the agent's listen bind (derived port) and for
	// the panel's outbound supervisor target.
	DialAddress string `json:"dial_address"`

	// FleetGroupId Canonical fleet-group UUID or friendly slug. Empty string
	// falls back to the operator's default fleet group.
	FleetGroupId string `json:"fleet_group_id"`

	// NodeName Operator-supplied display name. Must satisfy the same
	// character class enforced for inbound enrollment
	// (`[A-Za-z0-9._-]+`), since the value is interpolated into
	// the curl|bash one-liner as a CLI flag value.
	NodeName string `json:"node_name"`

	// ScriptSource Source from which the agent host fetches install-agent.sh.
	// 'github' is the default for outbound because the panel is
	// typically firewalled from the agent host (otherwise the
	// operator would use inbound mode); 'panel' is supported for
	// cases where the agent can reach the panel during bootstrap
	// even though the steady-state transport is reverse.
	ScriptSource *ProvisionOutboundAgentRequestScriptSource `json:"script_source,omitempty"`
}

ProvisionOutboundAgentRequest defines model for ProvisionOutboundAgentRequest.

type ProvisionOutboundAgentRequestObject

type ProvisionOutboundAgentRequestObject struct {
	Body *ProvisionOutboundAgentJSONRequestBody
}

type ProvisionOutboundAgentRequestScriptSource

type ProvisionOutboundAgentRequestScriptSource string

ProvisionOutboundAgentRequestScriptSource Source from which the agent host fetches install-agent.sh. 'github' is the default for outbound because the panel is typically firewalled from the agent host (otherwise the operator would use inbound mode); 'panel' is supported for cases where the agent can reach the panel during bootstrap even though the steady-state transport is reverse.

Defines values for ProvisionOutboundAgentRequestScriptSource.

func (ProvisionOutboundAgentRequestScriptSource) Valid

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

type ProvisionOutboundAgentResponse

type ProvisionOutboundAgentResponse struct {
	AgentId string `json:"agent_id"`

	// Command Pre-baked `curl ... | sudo bash -s -- ...` one-liner.
	Command       string `json:"command"`
	ExpiresAtUnix int64  `json:"expires_at_unix"`

	// ScriptUrl The URL the curl in the command points at — exposed so the
	// wizard can show the operator which source was used.
	ScriptUrl string `json:"script_url"`
}

ProvisionOutboundAgentResponse Returned by `POST /api/agents/provision-outbound`. Mirrors InstallCommandResponse plus the freshly-minted agent_id so the wizard can poll `GET /api/agents/{id}` for the first connection and call `DELETE /api/agents/{id}` on cancel.

type ProvisionOutboundAgentResponseObject

type ProvisionOutboundAgentResponseObject interface {
	VisitProvisionOutboundAgentResponse(w http.ResponseWriter) error
}

type RenameAgent200JSONResponse

type RenameAgent200JSONResponse Agent

func (RenameAgent200JSONResponse) VisitRenameAgentResponse

func (response RenameAgent200JSONResponse) VisitRenameAgentResponse(w http.ResponseWriter) error

type RenameAgent400JSONResponse

type RenameAgent400JSONResponse struct{ BadRequestJSONResponse }

func (RenameAgent400JSONResponse) VisitRenameAgentResponse

func (response RenameAgent400JSONResponse) VisitRenameAgentResponse(w http.ResponseWriter) error

type RenameAgent401JSONResponse

type RenameAgent401JSONResponse struct{ UnauthorizedJSONResponse }

func (RenameAgent401JSONResponse) VisitRenameAgentResponse

func (response RenameAgent401JSONResponse) VisitRenameAgentResponse(w http.ResponseWriter) error

type RenameAgent404JSONResponse

type RenameAgent404JSONResponse struct{ NotFoundJSONResponse }

func (RenameAgent404JSONResponse) VisitRenameAgentResponse

func (response RenameAgent404JSONResponse) VisitRenameAgentResponse(w http.ResponseWriter) error

type RenameAgentJSONRequestBody

type RenameAgentJSONRequestBody = RenameAgentRequest

RenameAgentJSONRequestBody defines body for RenameAgent for application/json ContentType.

type RenameAgentRequest

type RenameAgentRequest struct {
	NodeName string `json:"node_name"`
}

RenameAgentRequest defines model for RenameAgentRequest.

type RenameAgentRequestObject

type RenameAgentRequestObject struct {
	Id   string `json:"id"`
	Body *RenameAgentJSONRequestBody
}

type RenameAgentResponseObject

type RenameAgentResponseObject interface {
	VisitRenameAgentResponse(w http.ResponseWriter) error
}

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type RevokeAgentCertificateRecoveryGrant200JSONResponse

type RevokeAgentCertificateRecoveryGrant200JSONResponse AgentCertificateRecoveryGrant

func (RevokeAgentCertificateRecoveryGrant200JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse

func (response RevokeAgentCertificateRecoveryGrant200JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type RevokeAgentCertificateRecoveryGrant401JSONResponse

type RevokeAgentCertificateRecoveryGrant401JSONResponse struct{ UnauthorizedJSONResponse }

func (RevokeAgentCertificateRecoveryGrant401JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse

func (response RevokeAgentCertificateRecoveryGrant401JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type RevokeAgentCertificateRecoveryGrant403JSONResponse

type RevokeAgentCertificateRecoveryGrant403JSONResponse struct{ ForbiddenJSONResponse }

func (RevokeAgentCertificateRecoveryGrant403JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse

func (response RevokeAgentCertificateRecoveryGrant403JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type RevokeAgentCertificateRecoveryGrant404JSONResponse

type RevokeAgentCertificateRecoveryGrant404JSONResponse struct{ NotFoundJSONResponse }

func (RevokeAgentCertificateRecoveryGrant404JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse

func (response RevokeAgentCertificateRecoveryGrant404JSONResponse) VisitRevokeAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error

type RevokeAgentCertificateRecoveryGrantRequestObject

type RevokeAgentCertificateRecoveryGrantRequestObject struct {
	Id string `json:"id"`
}

type RevokeAgentCertificateRecoveryGrantResponseObject

type RevokeAgentCertificateRecoveryGrantResponseObject interface {
	VisitRevokeAgentCertificateRecoveryGrantResponse(w http.ResponseWriter) error
}

type RevokeEnrollmentToken204Response

type RevokeEnrollmentToken204Response struct {
}

func (RevokeEnrollmentToken204Response) VisitRevokeEnrollmentTokenResponse

func (response RevokeEnrollmentToken204Response) VisitRevokeEnrollmentTokenResponse(w http.ResponseWriter) error

type RevokeEnrollmentToken401JSONResponse

type RevokeEnrollmentToken401JSONResponse struct{ UnauthorizedJSONResponse }

func (RevokeEnrollmentToken401JSONResponse) VisitRevokeEnrollmentTokenResponse

func (response RevokeEnrollmentToken401JSONResponse) VisitRevokeEnrollmentTokenResponse(w http.ResponseWriter) error

type RevokeEnrollmentToken403JSONResponse

type RevokeEnrollmentToken403JSONResponse struct{ ForbiddenJSONResponse }

func (RevokeEnrollmentToken403JSONResponse) VisitRevokeEnrollmentTokenResponse

func (response RevokeEnrollmentToken403JSONResponse) VisitRevokeEnrollmentTokenResponse(w http.ResponseWriter) error

type RevokeEnrollmentToken404JSONResponse

type RevokeEnrollmentToken404JSONResponse struct{ NotFoundJSONResponse }

func (RevokeEnrollmentToken404JSONResponse) VisitRevokeEnrollmentTokenResponse

func (response RevokeEnrollmentToken404JSONResponse) VisitRevokeEnrollmentTokenResponse(w http.ResponseWriter) error

type RevokeEnrollmentTokenRequestObject

type RevokeEnrollmentTokenRequestObject struct {
	Value string `json:"value"`
}

type RevokeEnrollmentTokenResponseObject

type RevokeEnrollmentTokenResponseObject interface {
	VisitRevokeEnrollmentTokenResponse(w http.ResponseWriter) error
}

type RuntimeDC

type RuntimeDC struct {
	AliveWriters       int     `json:"alive_writers"`
	AvailableEndpoints int     `json:"available_endpoints"`
	AvailablePct       float64 `json:"available_pct"`
	CoveragePct        float64 `json:"coverage_pct"`
	Dc                 int     `json:"dc"`
	FreshAliveWriters  int     `json:"fresh_alive_writers"`
	FreshCoveragePct   float64 `json:"fresh_coverage_pct"`
	Load               int     `json:"load"`
	RequiredWriters    int     `json:"required_writers"`
	RttMs              float64 `json:"rtt_ms"`
}

RuntimeDC defines model for RuntimeDC.

type RuntimeEvent

type RuntimeEvent struct {
	Context       string `json:"context"`
	EventType     string `json:"event_type"`
	Sequence      int64  `json:"sequence"`
	TimestampUnix int64  `json:"timestamp_unix"`
}

RuntimeEvent defines model for RuntimeEvent.

type RuntimeMeWritersSummary

type RuntimeMeWritersSummary struct {
	AliveWriters        int     `json:"alive_writers"`
	AvailableEndpoints  int     `json:"available_endpoints"`
	ConfiguredEndpoints int     `json:"configured_endpoints"`
	CoveragePct         float64 `json:"coverage_pct"`
	FreshAliveWriters   int     `json:"fresh_alive_writers"`
	FreshCoveragePct    float64 `json:"fresh_coverage_pct"`
	RequiredWriters     int     `json:"required_writers"`
}

RuntimeMeWritersSummary defines model for RuntimeMeWritersSummary.

type RuntimeSystemLoad

type RuntimeSystemLoad struct {
	CpuUsagePct      float64 `json:"cpu_usage_pct"`
	DiskTotalBytes   int64   `json:"disk_total_bytes"`
	DiskUsagePct     float64 `json:"disk_usage_pct"`
	DiskUsedBytes    int64   `json:"disk_used_bytes"`
	Load15m          float64 `json:"load_15m"`
	Load1m           float64 `json:"load_1m"`
	Load5m           float64 `json:"load_5m"`
	MemoryTotalBytes int64   `json:"memory_total_bytes"`
	MemoryUsagePct   float64 `json:"memory_usage_pct"`
	MemoryUsedBytes  int64   `json:"memory_used_bytes"`
	NetBytesRecv     int64   `json:"net_bytes_recv"`
	NetBytesSent     int64   `json:"net_bytes_sent"`
}

RuntimeSystemLoad defines model for RuntimeSystemLoad.

type RuntimeTopByConnections

type RuntimeTopByConnections struct {
	Connections int    `json:"connections"`
	Username    string `json:"username"`
}

RuntimeTopByConnections defines model for RuntimeTopByConnections.

type RuntimeTopByThroughput

type RuntimeTopByThroughput struct {
	ThroughputBytes int64  `json:"throughput_bytes"`
	Username        string `json:"username"`
}

RuntimeTopByThroughput defines model for RuntimeTopByThroughput.

type RuntimeUpstream

type RuntimeUpstream struct {
	Address            string    `json:"address"`
	EffectiveLatencyMs float64   `json:"effective_latency_ms"`
	Fails              int       `json:"fails"`
	Healthy            bool      `json:"healthy"`
	LastCheckAgeSecs   int       `json:"last_check_age_secs"`
	RouteKind          string    `json:"route_kind"`
	Scopes             *[]string `json:"scopes,omitempty"`
	UpstreamId         int       `json:"upstream_id"`
	Weight             int       `json:"weight"`
}

RuntimeUpstream defines model for RuntimeUpstream.

type ScriptSource

type ScriptSource struct {
	// Sha256 Lowercase hex SHA-256 of the script body. Populated for the
	// Panel-served source (the panel knows the exact bytes it is
	// serving); null for the GitHub-hosted fallback (no
	// panel-side integrity guarantee — operators pin a release
	// tag instead).
	Sha256 *string `json:"sha256,omitempty"`

	// Url Fully-qualified HTTPS URL to install-agent.sh.
	Url string `json:"url"`
}

ScriptSource Pointer to a hosted copy of the agent install script (`install-agent.sh`). Each source carries its own URL; the Panel-served copy also exports its SHA-256 so the operator client can render a tamper-resistant curl|sudo-bash form.

type ScriptSources

type ScriptSources struct {
	// Github Pointer to a hosted copy of the agent install script
	// (`install-agent.sh`). Each source carries its own URL; the
	// Panel-served copy also exports its SHA-256 so the operator
	// client can render a tamper-resistant curl|sudo-bash form.
	Github ScriptSource `json:"github"`

	// Panel Pointer to a hosted copy of the agent install script
	// (`install-agent.sh`). Each source carries its own URL; the
	// Panel-served copy also exports its SHA-256 so the operator
	// client can render a tamper-resistant curl|sudo-bash form.
	Panel ScriptSource `json:"panel"`
}

ScriptSources The two canonical sources from which an agent host can fetch the install script. Operators choose between them in the Add-Server wizard — Panel for the default inbound case (panel is reachable, integrity-checked), GitHub for outbound (panel is firewalled from the agent host) or cold-bootstrap.

type ServerInterface

type ServerInterface interface {
	// List enrolled agents in operator's fleet scope
	// (GET /api/agents)
	ListAgents(w http.ResponseWriter, r *http.Request)
	// List enrollment tokens visible to the operator
	// (GET /api/agents/enrollment-tokens)
	ListEnrollmentTokens(w http.ResponseWriter, r *http.Request)
	// Mint a new enrollment token
	// (POST /api/agents/enrollment-tokens)
	CreateEnrollmentToken(w http.ResponseWriter, r *http.Request)
	// Revoke an enrollment token
	// (POST /api/agents/enrollment-tokens/{value}/revoke)
	RevokeEnrollmentToken(w http.ResponseWriter, r *http.Request, value string)
	// Create an outbound agent and return its install command
	// (POST /api/agents/provision-outbound)
	ProvisionOutboundAgent(w http.ResponseWriter, r *http.Request)
	// Deregister an agent
	// (DELETE /api/agents/{id})
	DeregisterAgent(w http.ResponseWriter, r *http.Request, id string)
	// Rename an agent's display node-name
	// (PATCH /api/agents/{id})
	RenameAgent(w http.ResponseWriter, r *http.Request, id string)
	// Allow an agent to recover an expired certificate
	// (POST /api/agents/{id}/certificate-recovery-grants)
	CreateAgentCertificateRecoveryGrant(w http.ResponseWriter, r *http.Request, id string)
	// Revoke a previously-issued recovery grant
	// (POST /api/agents/{id}/certificate-recovery-grants/revoke)
	RevokeAgentCertificateRecoveryGrant(w http.ResponseWriter, r *http.Request, id string)
	// Reassign an agent to a different fleet group
	// (PUT /api/agents/{id}/fleet-group)
	UpdateAgentFleetGroup(w http.ResponseWriter, r *http.Request, id string)
	// Generate a one-line installer for an outbound agent
	// (POST /api/agents/{id}/install-command)
	CreateAgentInstallCommand(w http.ResponseWriter, r *http.Request, id string)
	// Switch an agent between inbound and outbound transport
	// (PUT /api/agents/{id}/transport-mode)
	UpdateAgentTransportMode(w http.ResponseWriter, r *http.Request, id string)
	// Enqueue a self-update job for an agent
	// (POST /api/agents/{id}/update)
	DispatchAgentUpdate(w http.ResponseWriter, r *http.Request, id string)
	// Panel build identification
	// (GET /api/version)
	GetVersion(w http.ResponseWriter, r *http.Request)
	// Liveness probe
	// (GET /healthz)
	GetHealthz(w http.ResponseWriter, r *http.Request)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) CreateAgentCertificateRecoveryGrant

func (siw *ServerInterfaceWrapper) CreateAgentCertificateRecoveryGrant(w http.ResponseWriter, r *http.Request)

CreateAgentCertificateRecoveryGrant operation middleware

func (*ServerInterfaceWrapper) CreateAgentInstallCommand

func (siw *ServerInterfaceWrapper) CreateAgentInstallCommand(w http.ResponseWriter, r *http.Request)

CreateAgentInstallCommand operation middleware

func (*ServerInterfaceWrapper) CreateEnrollmentToken

func (siw *ServerInterfaceWrapper) CreateEnrollmentToken(w http.ResponseWriter, r *http.Request)

CreateEnrollmentToken operation middleware

func (*ServerInterfaceWrapper) DeregisterAgent

func (siw *ServerInterfaceWrapper) DeregisterAgent(w http.ResponseWriter, r *http.Request)

DeregisterAgent operation middleware

func (*ServerInterfaceWrapper) DispatchAgentUpdate

func (siw *ServerInterfaceWrapper) DispatchAgentUpdate(w http.ResponseWriter, r *http.Request)

DispatchAgentUpdate operation middleware

func (*ServerInterfaceWrapper) GetHealthz

func (siw *ServerInterfaceWrapper) GetHealthz(w http.ResponseWriter, r *http.Request)

GetHealthz operation middleware

func (*ServerInterfaceWrapper) GetVersion

func (siw *ServerInterfaceWrapper) GetVersion(w http.ResponseWriter, r *http.Request)

GetVersion operation middleware

func (*ServerInterfaceWrapper) ListAgents

func (siw *ServerInterfaceWrapper) ListAgents(w http.ResponseWriter, r *http.Request)

ListAgents operation middleware

func (*ServerInterfaceWrapper) ListEnrollmentTokens

func (siw *ServerInterfaceWrapper) ListEnrollmentTokens(w http.ResponseWriter, r *http.Request)

ListEnrollmentTokens operation middleware

func (*ServerInterfaceWrapper) ProvisionOutboundAgent

func (siw *ServerInterfaceWrapper) ProvisionOutboundAgent(w http.ResponseWriter, r *http.Request)

ProvisionOutboundAgent operation middleware

func (*ServerInterfaceWrapper) RenameAgent

func (siw *ServerInterfaceWrapper) RenameAgent(w http.ResponseWriter, r *http.Request)

RenameAgent operation middleware

func (*ServerInterfaceWrapper) RevokeAgentCertificateRecoveryGrant

func (siw *ServerInterfaceWrapper) RevokeAgentCertificateRecoveryGrant(w http.ResponseWriter, r *http.Request)

RevokeAgentCertificateRecoveryGrant operation middleware

func (*ServerInterfaceWrapper) RevokeEnrollmentToken

func (siw *ServerInterfaceWrapper) RevokeEnrollmentToken(w http.ResponseWriter, r *http.Request)

RevokeEnrollmentToken operation middleware

func (*ServerInterfaceWrapper) UpdateAgentFleetGroup

func (siw *ServerInterfaceWrapper) UpdateAgentFleetGroup(w http.ResponseWriter, r *http.Request)

UpdateAgentFleetGroup operation middleware

func (*ServerInterfaceWrapper) UpdateAgentTransportMode

func (siw *ServerInterfaceWrapper) UpdateAgentTransportMode(w http.ResponseWriter, r *http.Request)

UpdateAgentTransportMode operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, request any) (any, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {
	// List enrolled agents in operator's fleet scope
	// (GET /api/agents)
	ListAgents(ctx context.Context, request ListAgentsRequestObject) (ListAgentsResponseObject, error)
	// List enrollment tokens visible to the operator
	// (GET /api/agents/enrollment-tokens)
	ListEnrollmentTokens(ctx context.Context, request ListEnrollmentTokensRequestObject) (ListEnrollmentTokensResponseObject, error)
	// Mint a new enrollment token
	// (POST /api/agents/enrollment-tokens)
	CreateEnrollmentToken(ctx context.Context, request CreateEnrollmentTokenRequestObject) (CreateEnrollmentTokenResponseObject, error)
	// Revoke an enrollment token
	// (POST /api/agents/enrollment-tokens/{value}/revoke)
	RevokeEnrollmentToken(ctx context.Context, request RevokeEnrollmentTokenRequestObject) (RevokeEnrollmentTokenResponseObject, error)
	// Create an outbound agent and return its install command
	// (POST /api/agents/provision-outbound)
	ProvisionOutboundAgent(ctx context.Context, request ProvisionOutboundAgentRequestObject) (ProvisionOutboundAgentResponseObject, error)
	// Deregister an agent
	// (DELETE /api/agents/{id})
	DeregisterAgent(ctx context.Context, request DeregisterAgentRequestObject) (DeregisterAgentResponseObject, error)
	// Rename an agent's display node-name
	// (PATCH /api/agents/{id})
	RenameAgent(ctx context.Context, request RenameAgentRequestObject) (RenameAgentResponseObject, error)
	// Allow an agent to recover an expired certificate
	// (POST /api/agents/{id}/certificate-recovery-grants)
	CreateAgentCertificateRecoveryGrant(ctx context.Context, request CreateAgentCertificateRecoveryGrantRequestObject) (CreateAgentCertificateRecoveryGrantResponseObject, error)
	// Revoke a previously-issued recovery grant
	// (POST /api/agents/{id}/certificate-recovery-grants/revoke)
	RevokeAgentCertificateRecoveryGrant(ctx context.Context, request RevokeAgentCertificateRecoveryGrantRequestObject) (RevokeAgentCertificateRecoveryGrantResponseObject, error)
	// Reassign an agent to a different fleet group
	// (PUT /api/agents/{id}/fleet-group)
	UpdateAgentFleetGroup(ctx context.Context, request UpdateAgentFleetGroupRequestObject) (UpdateAgentFleetGroupResponseObject, error)
	// Generate a one-line installer for an outbound agent
	// (POST /api/agents/{id}/install-command)
	CreateAgentInstallCommand(ctx context.Context, request CreateAgentInstallCommandRequestObject) (CreateAgentInstallCommandResponseObject, error)
	// Switch an agent between inbound and outbound transport
	// (PUT /api/agents/{id}/transport-mode)
	UpdateAgentTransportMode(ctx context.Context, request UpdateAgentTransportModeRequestObject) (UpdateAgentTransportModeResponseObject, error)
	// Enqueue a self-update job for an agent
	// (POST /api/agents/{id}/update)
	DispatchAgentUpdate(ctx context.Context, request DispatchAgentUpdateRequestObject) (DispatchAgentUpdateResponseObject, error)
	// Panel build identification
	// (GET /api/version)
	GetVersion(ctx context.Context, request GetVersionRequestObject) (GetVersionResponseObject, error)
	// Liveness probe
	// (GET /healthz)
	GetHealthz(ctx context.Context, request GetHealthzRequestObject) (GetHealthzResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type Unauthorized

type Unauthorized = Error

Unauthorized Standard error envelope used by every 4xx / 5xx response.

type UnauthorizedJSONResponse

type UnauthorizedJSONResponse Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) CreateAgentCertificateRecoveryGrant

func (_ Unimplemented) CreateAgentCertificateRecoveryGrant(w http.ResponseWriter, r *http.Request, id string)

Allow an agent to recover an expired certificate (POST /api/agents/{id}/certificate-recovery-grants)

func (Unimplemented) CreateAgentInstallCommand

func (_ Unimplemented) CreateAgentInstallCommand(w http.ResponseWriter, r *http.Request, id string)

Generate a one-line installer for an outbound agent (POST /api/agents/{id}/install-command)

func (Unimplemented) CreateEnrollmentToken

func (_ Unimplemented) CreateEnrollmentToken(w http.ResponseWriter, r *http.Request)

Mint a new enrollment token (POST /api/agents/enrollment-tokens)

func (Unimplemented) DeregisterAgent

func (_ Unimplemented) DeregisterAgent(w http.ResponseWriter, r *http.Request, id string)

Deregister an agent (DELETE /api/agents/{id})

func (Unimplemented) DispatchAgentUpdate

func (_ Unimplemented) DispatchAgentUpdate(w http.ResponseWriter, r *http.Request, id string)

Enqueue a self-update job for an agent (POST /api/agents/{id}/update)

func (Unimplemented) GetHealthz

func (_ Unimplemented) GetHealthz(w http.ResponseWriter, r *http.Request)

Liveness probe (GET /healthz)

func (Unimplemented) GetVersion

func (_ Unimplemented) GetVersion(w http.ResponseWriter, r *http.Request)

Panel build identification (GET /api/version)

func (Unimplemented) ListAgents

func (_ Unimplemented) ListAgents(w http.ResponseWriter, r *http.Request)

List enrolled agents in operator's fleet scope (GET /api/agents)

func (Unimplemented) ListEnrollmentTokens

func (_ Unimplemented) ListEnrollmentTokens(w http.ResponseWriter, r *http.Request)

List enrollment tokens visible to the operator (GET /api/agents/enrollment-tokens)

func (Unimplemented) ProvisionOutboundAgent

func (_ Unimplemented) ProvisionOutboundAgent(w http.ResponseWriter, r *http.Request)

Create an outbound agent and return its install command (POST /api/agents/provision-outbound)

func (Unimplemented) RenameAgent

func (_ Unimplemented) RenameAgent(w http.ResponseWriter, r *http.Request, id string)

Rename an agent's display node-name (PATCH /api/agents/{id})

func (Unimplemented) RevokeAgentCertificateRecoveryGrant

func (_ Unimplemented) RevokeAgentCertificateRecoveryGrant(w http.ResponseWriter, r *http.Request, id string)

Revoke a previously-issued recovery grant (POST /api/agents/{id}/certificate-recovery-grants/revoke)

func (Unimplemented) RevokeEnrollmentToken

func (_ Unimplemented) RevokeEnrollmentToken(w http.ResponseWriter, r *http.Request, value string)

Revoke an enrollment token (POST /api/agents/enrollment-tokens/{value}/revoke)

func (Unimplemented) UpdateAgentFleetGroup

func (_ Unimplemented) UpdateAgentFleetGroup(w http.ResponseWriter, r *http.Request, id string)

Reassign an agent to a different fleet group (PUT /api/agents/{id}/fleet-group)

func (Unimplemented) UpdateAgentTransportMode

func (_ Unimplemented) UpdateAgentTransportMode(w http.ResponseWriter, r *http.Request, id string)

Switch an agent between inbound and outbound transport (PUT /api/agents/{id}/transport-mode)

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

type UpdateAgentFleetGroup200JSONResponse

type UpdateAgentFleetGroup200JSONResponse Agent

func (UpdateAgentFleetGroup200JSONResponse) VisitUpdateAgentFleetGroupResponse

func (response UpdateAgentFleetGroup200JSONResponse) VisitUpdateAgentFleetGroupResponse(w http.ResponseWriter) error

type UpdateAgentFleetGroup400JSONResponse

type UpdateAgentFleetGroup400JSONResponse struct{ BadRequestJSONResponse }

func (UpdateAgentFleetGroup400JSONResponse) VisitUpdateAgentFleetGroupResponse

func (response UpdateAgentFleetGroup400JSONResponse) VisitUpdateAgentFleetGroupResponse(w http.ResponseWriter) error

type UpdateAgentFleetGroup401JSONResponse

type UpdateAgentFleetGroup401JSONResponse struct{ UnauthorizedJSONResponse }

func (UpdateAgentFleetGroup401JSONResponse) VisitUpdateAgentFleetGroupResponse

func (response UpdateAgentFleetGroup401JSONResponse) VisitUpdateAgentFleetGroupResponse(w http.ResponseWriter) error

type UpdateAgentFleetGroup403JSONResponse

type UpdateAgentFleetGroup403JSONResponse struct{ ForbiddenJSONResponse }

func (UpdateAgentFleetGroup403JSONResponse) VisitUpdateAgentFleetGroupResponse

func (response UpdateAgentFleetGroup403JSONResponse) VisitUpdateAgentFleetGroupResponse(w http.ResponseWriter) error

type UpdateAgentFleetGroup404JSONResponse

type UpdateAgentFleetGroup404JSONResponse struct{ NotFoundJSONResponse }

func (UpdateAgentFleetGroup404JSONResponse) VisitUpdateAgentFleetGroupResponse

func (response UpdateAgentFleetGroup404JSONResponse) VisitUpdateAgentFleetGroupResponse(w http.ResponseWriter) error

type UpdateAgentFleetGroupJSONRequestBody

type UpdateAgentFleetGroupJSONRequestBody = UpdateAgentFleetGroupRequest

UpdateAgentFleetGroupJSONRequestBody defines body for UpdateAgentFleetGroup for application/json ContentType.

type UpdateAgentFleetGroupRequest

type UpdateAgentFleetGroupRequest struct {
	// FleetGroupId Target fleet-group UUID. Must already exist.
	FleetGroupId string `json:"fleet_group_id"`
}

UpdateAgentFleetGroupRequest defines model for UpdateAgentFleetGroupRequest.

type UpdateAgentFleetGroupRequestObject

type UpdateAgentFleetGroupRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateAgentFleetGroupJSONRequestBody
}

type UpdateAgentFleetGroupResponseObject

type UpdateAgentFleetGroupResponseObject interface {
	VisitUpdateAgentFleetGroupResponse(w http.ResponseWriter) error
}

type UpdateAgentTransportMode204Response

type UpdateAgentTransportMode204Response struct {
}

func (UpdateAgentTransportMode204Response) VisitUpdateAgentTransportModeResponse

func (response UpdateAgentTransportMode204Response) VisitUpdateAgentTransportModeResponse(w http.ResponseWriter) error

type UpdateAgentTransportMode400JSONResponse

type UpdateAgentTransportMode400JSONResponse struct{ BadRequestJSONResponse }

func (UpdateAgentTransportMode400JSONResponse) VisitUpdateAgentTransportModeResponse

func (response UpdateAgentTransportMode400JSONResponse) VisitUpdateAgentTransportModeResponse(w http.ResponseWriter) error

type UpdateAgentTransportMode401JSONResponse

type UpdateAgentTransportMode401JSONResponse struct{ UnauthorizedJSONResponse }

func (UpdateAgentTransportMode401JSONResponse) VisitUpdateAgentTransportModeResponse

func (response UpdateAgentTransportMode401JSONResponse) VisitUpdateAgentTransportModeResponse(w http.ResponseWriter) error

type UpdateAgentTransportMode404JSONResponse

type UpdateAgentTransportMode404JSONResponse struct{ NotFoundJSONResponse }

func (UpdateAgentTransportMode404JSONResponse) VisitUpdateAgentTransportModeResponse

func (response UpdateAgentTransportMode404JSONResponse) VisitUpdateAgentTransportModeResponse(w http.ResponseWriter) error

type UpdateAgentTransportModeJSONRequestBody

type UpdateAgentTransportModeJSONRequestBody = UpdateAgentTransportModeRequest

UpdateAgentTransportModeJSONRequestBody defines body for UpdateAgentTransportMode for application/json ContentType.

type UpdateAgentTransportModeRequest

type UpdateAgentTransportModeRequest struct {
	// DialAddress Public host:port the panel dials (required for outbound).
	DialAddress *string `json:"dial_address,omitempty"`

	// ListenAddress Agent-side bind spec. Optional — defaults to `:<port>`
	// derived from `dial_address` when omitted.
	ListenAddress *string                                      `json:"listen_address,omitempty"`
	TransportMode UpdateAgentTransportModeRequestTransportMode `json:"transport_mode"`
}

UpdateAgentTransportModeRequest defines model for UpdateAgentTransportModeRequest.

type UpdateAgentTransportModeRequestObject

type UpdateAgentTransportModeRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateAgentTransportModeJSONRequestBody
}

type UpdateAgentTransportModeRequestTransportMode

type UpdateAgentTransportModeRequestTransportMode string

UpdateAgentTransportModeRequestTransportMode defines model for UpdateAgentTransportModeRequest.TransportMode.

Defines values for UpdateAgentTransportModeRequestTransportMode.

func (UpdateAgentTransportModeRequestTransportMode) Valid

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

type UpdateAgentTransportModeResponseObject

type UpdateAgentTransportModeResponseObject interface {
	VisitUpdateAgentTransportModeResponse(w http.ResponseWriter) error
}

type VersionResponse

type VersionResponse struct {
	// BuildTime RFC3339 build timestamp. Operator+ only.
	BuildTime *time.Time `json:"build_time,omitempty"`

	// CommitSha Git commit hash baked in at build time. Operator+ only.
	CommitSha *string `json:"commit_sha,omitempty"`

	// Version Semantic version (or "dev" for unstamped builds).
	Version string `json:"version"`
}

VersionResponse Build metadata for the running control-plane process.

Jump to

Keyboard shortcuts

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