Help us shape the future of Go! Take the 2026 Go Developer Survey

environment

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: BSD-3-Clause Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentPairRequest

type AgentPairRequest struct {
	// Rotate indicates if the token should be rotated.
	//
	// Required: false
	Rotate *bool `json:"rotate,omitempty"`
}

AgentPairRequest is the request body for pairing with an agent.

type AgentPairResponse

type AgentPairResponse struct {
	// Token is the pairing token.
	//
	// Required: true
	Token string `json:"token"`
}

AgentPairResponse is the response from pairing with an agent.

type Create

type Create struct {
	// ApiUrl is the URL of the environment API.
	//
	// Required: true
	ApiUrl string `json:"apiUrl" binding:"required,url"`

	// Name of the environment.
	//
	// Required: false
	Name *string `json:"name,omitempty"`

	// Enabled indicates if the environment is enabled.
	//
	// Required: false
	Enabled *bool `json:"enabled,omitempty"`

	// AccessToken for authentication with the environment.
	//
	// Required: false
	AccessToken *string `json:"accessToken,omitempty"` //nolint:gosec // API schema requires accessToken field name

	// BootstrapToken for initial setup of the environment.
	//
	// Required: false
	BootstrapToken *string `json:"bootstrapToken,omitempty"`

	// UseApiKey indicates if an API key should be generated for pairing.
	//
	// Required: false
	UseApiKey *bool `json:"useApiKey,omitempty"`

	// IsEdge indicates if this is an edge agent that connects outbound to manager.
	//
	// Required: false
	IsEdge *bool `json:"isEdge,omitempty"`
}

type EdgeMTLSCertificate added in v1.19.0

type EdgeMTLSCertificate struct {
	// CommonName is the certificate subject common name.
	//
	// Required: false
	CommonName *string `json:"commonName,omitempty"`

	// ExpiresAt is when the generated mTLS client certificate expires.
	//
	// Required: false
	ExpiresAt *time.Time `json:"expiresAt,omitempty"`

	// DaysRemaining is the rounded number of days until certificate expiry.
	//
	// Required: false
	DaysRemaining *int `json:"daysRemaining,omitempty"`

	// Expired indicates whether the certificate is already expired.
	//
	// Required: false
	Expired bool `json:"expired"`

	// ExpiringSoon indicates whether the certificate is within the warning window.
	//
	// Required: false
	ExpiringSoon bool `json:"expiringSoon"`
}

type Environment

type Environment struct {
	// ID of the environment.
	//
	// Required: true
	ID string `json:"id"`

	// Name of the environment.
	//
	// Required: false
	Name string `json:"name,omitempty"`

	// ApiUrl is the URL of the environment API.
	//
	// Required: true
	ApiUrl string `json:"apiUrl"`

	// Status of the environment.
	//
	// Required: true
	Status string `json:"status"`

	// Enabled indicates if the environment is enabled.
	//
	// Required: true
	Enabled bool `json:"enabled"`

	// IsEdge indicates if this is an edge agent that connects outbound.
	//
	// Required: false
	IsEdge bool `json:"isEdge"`

	// LastSeen is the last successful manager-side health/contact timestamp.
	//
	// Required: false
	LastSeen *time.Time `json:"lastSeen,omitempty"`

	// EdgeTransport indicates the active tunnel transport for an edge environment.
	// Values are "grpc" or "websocket" when connected.
	//
	// Required: false
	EdgeTransport *string `json:"edgeTransport,omitempty"`

	// EdgeSecurityMode indicates how the current edge tunnel authenticated.
	// Values include "token" and "mtls".
	//
	// Required: false
	EdgeSecurityMode *string `json:"edgeSecurityMode,omitempty"`

	// EdgeSessionID is the manager-issued ID for the current live edge session.
	//
	// Required: false
	EdgeSessionID *string `json:"edgeSessionId,omitempty"`

	// EdgeAgentInstance identifies the currently connected agent runtime instance.
	//
	// Required: false
	EdgeAgentInstance *string `json:"edgeAgentInstance,omitempty"`

	// EdgeCapabilities lists the commands advertised by the connected edge agent.
	//
	// Required: false
	EdgeCapabilities []string `json:"edgeCapabilities,omitempty"`

	// Connected reports whether an edge environment currently has a live tunnel.
	//
	// Required: false
	Connected *bool `json:"connected,omitempty"`

	// ConnectedAt is when the current edge tunnel connection was established.
	//
	// Required: false
	ConnectedAt *time.Time `json:"connectedAt,omitempty"`

	// LastHeartbeat is the timestamp of the most recent heartbeat received
	// from the current edge tunnel connection.
	//
	// Required: false
	LastHeartbeat *time.Time `json:"lastHeartbeat,omitempty"`

	// LastPollAt is the timestamp of the most recent poll control-plane check-in
	// received from a poll-mode edge agent.
	//
	// Required: false
	LastPollAt *time.Time `json:"lastPollAt,omitempty"`

	// EdgeMTLSCertificate describes the generated edge client certificate when available.
	//
	// Required: false
	EdgeMTLSCertificate *EdgeMTLSCertificate `json:"edgeMTLSCertificate,omitempty"`

	// ApiKey is returned only when creating or regenerating
	//
	// Required: false
	ApiKey *string `json:"apiKey,omitempty"` //nolint:gosec // API schema requires apiKey field name
}

Environment represents an environment in API responses.

type Test

type Test struct {
	// Status of the environment test.
	//
	// Required: true
	Status string `json:"status"`

	// Message providing additional details about the test result.
	//
	// Required: false
	Message *string `json:"message,omitempty"`
}

type TestConnectionRequest

type TestConnectionRequest struct {
	// ApiUrl is an optional URL to test instead of the saved one.
	//
	// Required: false
	ApiUrl *string `json:"apiUrl,omitempty"`
}

TestConnectionRequest is the request body for testing a connection.

type Update

type Update struct {
	// ApiUrl is the URL of the environment API.
	//
	// Required: false
	ApiUrl *string `json:"apiUrl,omitempty" binding:"omitempty,url"`

	// Name of the environment.
	//
	// Required: false
	Name *string `json:"name,omitempty"`

	// Enabled indicates if the environment is enabled.
	//
	// Required: false
	Enabled *bool `json:"enabled,omitempty"`

	// AccessToken for authentication with the environment.
	//
	// Required: false
	AccessToken *string `json:"accessToken,omitempty"` //nolint:gosec // API schema requires accessToken field name

	// BootstrapToken for initial setup of the environment.
	//
	// Required: false
	BootstrapToken *string `json:"bootstrapToken,omitempty"`

	// RegenerateApiKey indicates whether to regenerate the API key.
	//
	// Required: false
	RegenerateApiKey *bool `json:"regenerateApiKey,omitempty"`
}

Jump to

Keyboard shortcuts

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