Documentation
¶
Overview ¶
Package v1 provides the API server for the application. It includes common API definitions and utilities for version 1 of the API.
Index ¶
- Constants
- type Agent
- type AgentAvailableComponents
- type AgentCapabilities
- type AgentComponentDetails
- type AgentComponentHealth
- type AgentConfig
- type AgentConfigFile
- type AgentConfigMap
- type AgentCustomCapabilities
- type AgentDescription
- type AgentEffectiveConfig
- type AgentGroup
- type AgentGroupRemoteConfig
- type AgentMetadata
- type AgentPackage
- type AgentPackageMetadata
- type AgentPackageSpec
- type AgentPackageStatus
- type AgentPackageStatuses
- type AgentRemoteConfig
- type AgentRemoteConfigMetadata
- type AgentRemoteConfigSpec
- type AgentRemoteConfigStatus
- type AgentSelector
- type AgentSpec
- type AgentSpecPackages
- type AgentSpecRemoteConfig
- type AgentStatus
- type AgentStatusPackageEntry
- type AssignRoleRequest
- type Attributes
- type Certificate
- type CertificateMetadata
- type CertificateSpec
- type CertificateStatus
- type CheckPermissionRequest
- type CheckPermissionResponse
- type Condition
- type ConditionStatus
- type ConditionType
- type Connection
- type ConnectionListResponse
- type ConnectionSettings
- type ListMeta
- type ListResponse
- type Metadata
- type Namespace
- type NamespaceMetadata
- type NamespaceStatus
- type OpAMPConnectionSettings
- type OtherConnectionSettings
- type Permission
- type PermissionMetadata
- type PermissionSpec
- type PermissionStatus
- type PingResponse
- type Role
- type RoleBinding
- type RoleBindingMetadata
- type RoleBindingRoleRef
- type RoleBindingSpec
- type RoleBindingStatus
- type RoleBindingSubject
- type RoleMetadata
- type RoleSpec
- type RoleStatus
- type Server
- type ServerCondition
- type ServerConditionStatus
- type ServerConditionType
- type ServerListResponse
- type Spec
- type Status
- type TLSCertificate
- type TelemetryConnectionSettings
- type Time
- func (t *Time) Before(u *Time) bool
- func (t *Time) DeepCopyInto(out *Time)
- func (t *Time) Equal(u *Time) bool
- func (t *Time) IsZero() bool
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) MarshalYAML() (any, error)
- func (t Time) Rfc3339Copy() Time
- func (t *Time) UnmarshalJSON(b []byte) error
- func (t *Time) UnmarshalYAML(value *yaml.Node) error
- type User
- type UserMetadata
- type UserProfileResponse
- type UserRole
- type UserRoleMetadata
- type UserRoleSpec
- type UserRoleStatus
- type UserSpec
- type UserStatus
Constants ¶
const ( // UserKind is the kind for User resources. UserKind = "User" // RoleKind is the kind for Role resources. RoleKind = "Role" // PermissionKind is the kind for Permission resources. PermissionKind = "Permission" // UserRoleKind is the kind for UserRole resources. UserRoleKind = "UserRole" )
const (
// APIVersion is the version of the API.
APIVersion = "v1"
)
const (
// AgentGroupKind is the kind of the agent group resource.
AgentGroupKind = "AgentGroup"
)
const (
// AgentKind is the kind of the agent resource.
AgentKind = "Agent"
)
const (
// AgentPackageKind is the kind of the agent package resource.
AgentPackageKind = "AgentPackage"
)
const (
// AgentRemoteConfigKind is the kind for AgentRemoteConfig resources.
AgentRemoteConfigKind = "AgentRemoteConfig"
)
const (
// CertificateKind is the kind for Certificate resources.
CertificateKind = "Certificate"
)
const (
// ConnectionKind is the kind of the connection resource.
ConnectionKind = "Connection"
)
const (
// NamespaceKind is the kind of the namespace resource.
NamespaceKind = "Namespace"
)
const (
// RoleBindingKind is the kind for RoleBinding resources.
RoleBindingKind = "RoleBinding"
)
const (
// ServerKind is the kind of the server.
ServerKind = "Server"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶ added in v0.1.27
type Agent struct {
// Metadata contains identifying information about the agent.
Metadata AgentMetadata `json:"metadata"`
// Spec contains the desired configuration for the agent.
Spec AgentSpec `json:"spec,omitzero"`
// Status contains the observed state of the agent.
Status AgentStatus `json:"status"`
} // @name Agent
Agent represents an agent which is defined OpAMP protocol. It follows the Kubernetes-style resource structure with Metadata, Spec, and Status.
type AgentAvailableComponents ¶ added in v0.1.27
type AgentAvailableComponents struct {
Components map[string]AgentComponentDetails `json:"components,omitempty"`
} // @name AgentAvailableComponents
AgentAvailableComponents represents the available components of the agent.
type AgentCapabilities ¶ added in v0.1.27
type AgentCapabilities uint64
AgentCapabilities is a bitmask representing the capabilities of the agent.
func (AgentCapabilities) Names ¶ added in v0.1.35
func (c AgentCapabilities) Names() []string
Names returns the list of capability flag names set in this bitmask.
type AgentComponentDetails ¶ added in v0.1.27
type AgentComponentDetails struct {
Type string `json:"type,omitempty"`
Version string `json:"version,omitempty"`
} // @name ComponentDetails
AgentComponentDetails represents details of an available component.
type AgentComponentHealth ¶ added in v0.1.27
type AgentComponentHealth struct {
Healthy bool `json:"healthy"`
StartTime Time `json:"startTime,omitzero"`
LastError string `json:"lastError,omitempty"`
Status string `json:"status,omitempty"`
StatusTime Time `json:"statusTime,omitzero"`
ComponentsMap map[string]string `json:"componentsMap,omitempty"`
} // @name AgentComponentHealth
AgentComponentHealth represents the health status of the agent's components.
type AgentConfig ¶ added in v0.1.27
type AgentConfig struct {
AgentRemoteConfig *AgentGroupRemoteConfig `json:"agentRemoteConfig,omitempty"`
ConnectionSettings *ConnectionSettings `json:"connectionSettings,omitempty"`
}
AgentConfig represents the remote configuration for agents in the group. @name AgentGroupAgentConfig.
type AgentConfigFile ¶ added in v0.1.27
type AgentConfigFile struct {
Body string `json:"body"`
ContentType string `json:"contentType"`
} // @name AgentConfigFile
AgentConfigFile represents a configuration file for the agent.
type AgentConfigMap ¶ added in v0.1.27
type AgentConfigMap struct {
ConfigMap map[string]AgentConfigFile `json:"configMap,omitempty"`
} // @name AgentConfigMap
AgentConfigMap represents a map of configuration files for the agent.
type AgentCustomCapabilities ¶ added in v0.1.27
type AgentCustomCapabilities struct {
Capabilities []string `json:"capabilities,omitempty"`
} // @name AgentCustomCapabilities
AgentCustomCapabilities represents the custom capabilities of the agent.
type AgentDescription ¶ added in v0.1.27
type AgentDescription struct {
// IdentifyingAttributes are attributes that uniquely identify the agent.
IdentifyingAttributes map[string]string `json:"identifyingAttributes,omitempty"`
// NonIdentifyingAttributes are attributes that do not uniquely identify the agent.
NonIdentifyingAttributes map[string]string `json:"nonIdentifyingAttributes,omitempty"`
} // @name AgentDescription
AgentDescription represents the description of the agent.
type AgentEffectiveConfig ¶ added in v0.1.27
type AgentEffectiveConfig struct {
ConfigMap AgentConfigMap `json:"configMap"`
} // @name AgentEffectiveConfig
AgentEffectiveConfig represents the effective configuration of the agent.
func (AgentEffectiveConfig) IsZero ¶ added in v0.1.35
func (e AgentEffectiveConfig) IsZero() bool
IsZero reports whether the effective config is empty, enabling omitzero on the parent field.
type AgentGroup ¶ added in v0.1.27
type AgentGroup struct {
Metadata Metadata `json:"metadata"`
Spec Spec `json:"spec"`
Status Status `json:"status"`
} // @name AgentGroup
AgentGroup represents a struct that represents an agent group.
type AgentGroupRemoteConfig ¶ added in v0.1.28
type AgentGroupRemoteConfig struct {
// AgentRemoteConfigName is the name of a standalone remote configuration resource.
AgentRemoteConfigName *string `json:"agentRemoteConfigName,omitempty"`
// AgentRemoteConfigSpec is the remote configuration to be applied to agents in this group.
AgentRemoteConfigSpec *AgentRemoteConfigSpec `json:"agentRemoteConfigSpec,omitempty"`
// AgentRemoteConfigRef is a reference to a standalone remote configuration resource.
AgentRemoteConfigRef *string `json:"agentRemoteConfigRef,omitempty"`
}
AgentGroupRemoteConfig represents the remote configuration in an agent group. @name AgentGroupRemoteConfig.
type AgentMetadata ¶ added in v0.1.27
type AgentMetadata struct {
// InstanceUID is a unique identifier for the agent instance.
InstanceUID uuid.UUID `json:"instanceUid"`
// Namespace is the namespace the agent belongs to.
Namespace string `json:"namespace"`
// Description is a human-readable description of the agent.
Description AgentDescription `json:"description,omitzero"`
// Capabilities is a bitmask representing the capabilities of the agent.
Capabilities AgentCapabilities `json:"capabilities,omitempty"`
// CustomCapabilities is a map of custom capabilities for the agent.
CustomCapabilities AgentCustomCapabilities `json:"customCapabilities,omitzero"`
} // @name AgentMetadata
AgentMetadata contains identifying information about the agent.
type AgentPackage ¶ added in v0.1.28
type AgentPackage struct {
Metadata AgentPackageMetadata `json:"metadata"`
Spec AgentPackageSpec `json:"spec"`
Status AgentPackageStatus `json:"status"`
} // @name AgentPackage
AgentPackage represents an agent package resource.
type AgentPackageMetadata ¶ added in v0.1.28
type AgentPackageMetadata struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Attributes Attributes `json:"attributes"`
CreatedAt Time `json:"createdAt"`
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name AgentPackageMetadata
AgentPackageMetadata represents the metadata of an agent package.
type AgentPackageSpec ¶ added in v0.1.28
type AgentPackageSpec struct {
PackageType string `json:"packageType"`
Version string `json:"version"`
DownloadURL string `json:"downloadUrl"`
ContentHash []byte `json:"contentHash"`
Signature []byte `json:"signature"`
Headers map[string]string `json:"headers"`
Hash []byte `json:"hash"`
} // @name AgentPackageSpec
AgentPackageSpec represents the specification of an agent package.
type AgentPackageStatus ¶ added in v0.1.27
type AgentPackageStatus struct {
Conditions []Condition `json:"conditions"`
} // @name AgentPackageStatus
AgentPackageStatus represents the status of an agent package.
type AgentPackageStatuses ¶ added in v0.1.27
type AgentPackageStatuses struct {
Packages map[string]AgentStatusPackageEntry `json:"packages,omitempty"`
ServerProvidedAllPackagesHash string `json:"serverProvidedAllPackagesHash,omitempty"`
ErrorMessage string `json:"errorMessage,omitempty"`
} // @name AgentPackageStatuses
AgentPackageStatuses represents the package statuses of the agent.
func (AgentPackageStatuses) IsZero ¶ added in v0.1.35
func (p AgentPackageStatuses) IsZero() bool
IsZero reports whether the package statuses are empty, enabling omitzero on the parent field.
type AgentRemoteConfig ¶ added in v0.1.27
type AgentRemoteConfig struct {
Metadata AgentRemoteConfigMetadata `json:"metadata"`
Spec AgentRemoteConfigSpec `json:"spec"`
Status AgentRemoteConfigStatus `json:"status"`
} // @name AgentRemoteConfig
AgentRemoteConfig represents an agent remote config resource.
type AgentRemoteConfigMetadata ¶ added in v0.1.28
type AgentRemoteConfigMetadata struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Attributes Attributes `json:"attributes"`
CreatedAt Time `json:"createdAt"`
} // @name AgentRemoteConfigMetadata
AgentRemoteConfigMetadata represents the metadata of an agent remote config.
type AgentRemoteConfigSpec ¶ added in v0.1.28
type AgentRemoteConfigSpec struct {
Value string `json:"value"`
ContentType string `json:"contentType"`
}
AgentRemoteConfigSpec represents the specification of an agent remote config.
type AgentRemoteConfigStatus ¶ added in v0.1.28
type AgentRemoteConfigStatus struct {
Conditions []Condition `json:"conditions"`
} // @name AgentRemoteConfigStatus
AgentRemoteConfigStatus represents the status of an agent remote config.
type AgentSelector ¶ added in v0.1.27
type AgentSelector struct {
IdentifyingAttributes map[string]string `json:"identifyingAttributes"`
NonIdentifyingAttributes map[string]string `json:"nonIdentifyingAttributes"`
}
AgentSelector defines the criteria for selecting agents to be included in the agent group. @name AgentGroupAgentSelector.
type AgentSpec ¶ added in v0.1.27
type AgentSpec struct {
// NewInstanceUID is a new instance UID to inform the agent of its new identity.
NewInstanceUID string `json:"newInstanceUid,omitempty"`
// ConnectionSettings contains connection settings for the agent.
ConnectionSettings ConnectionSettings `json:"connectionSettings,omitzero"`
// RemoteConfig is the remote configuration of the agent.
RemoteConfig AgentSpecRemoteConfig `json:"remoteConfig,omitzero"`
// PackagesAvailable is the packages available for the agent to download.
PackagesAvailable AgentSpecPackages `json:"packagesAvailable,omitzero"`
// RestartRequiredAt is the time when a restart was requested.
// If this time is after the agent's start time, the agent should be restarted.
RestartRequiredAt *Time `json:"restartRequiredAt,omitempty"`
} // @name AgentSpec
AgentSpec contains the desired configuration for the agent.
type AgentSpecPackages ¶ added in v0.1.28
type AgentSpecPackages struct {
// Packages is a list of package names available for the agent.
Packages []string `json:"packages,omitempty"`
} // @name AgentSpecPackages
AgentSpecPackages represents the packages specification for an agent.
type AgentSpecRemoteConfig ¶ added in v0.1.28
type AgentSpecRemoteConfig struct {
// RemoteConfigNames is a list of remote config names applied to this agent.
RemoteConfigNames []string `json:"remoteConfigNames,omitempty"`
} // @name AgentSpecRemoteConfig
AgentSpecRemoteConfig represents the remote config specification for an agent.
type AgentStatus ¶ added in v0.1.27
type AgentStatus struct {
// EffectiveConfig is the effective configuration of the agent.
EffectiveConfig AgentEffectiveConfig `json:"effectiveConfig,omitzero"`
// PackageStatuses is a map of package statuses for the agent.
PackageStatuses AgentPackageStatuses `json:"packageStatuses,omitzero"`
// ComponentHealth is the health status of the agent's components.
ComponentHealth AgentComponentHealth `json:"componentHealth"`
// AvailableComponents lists components available on the agent.
AvailableComponents AgentAvailableComponents `json:"availableComponents,omitzero"`
// Conditions is a list of conditions that apply to the agent.
Conditions []Condition `json:"conditions,omitempty"`
// Connected indicates if the agent is currently connected.
Connected bool `json:"connected"`
// ConnectionType indicates the type of connection the agent is using.
ConnectionType string `json:"connectionType,omitempty"`
// SequenceNum is the sequence number from the last AgentToServer message.
SequenceNum uint64 `json:"sequenceNum,omitempty"`
// LastReportedAt is the timestamp when the agent last reported its status.
LastReportedAt string `json:"lastReportedAt,omitempty"`
} // @name AgentStatus
AgentStatus contains the observed state of the agent.
type AgentStatusPackageEntry ¶ added in v0.1.28
type AgentStatusPackageEntry struct {
// Name is the name of the package.
Name string `json:"name"`
} // @name AgentPackageStatusPackageEntry
AgentStatusPackageEntry represents the status of a package in the agent.
type AssignRoleRequest ¶ added in v0.1.35
type AssignRoleRequest struct {
// UserID is the ID of the user to assign the role to.
UserID string `json:"userId"`
// RoleID is the ID of the role to assign.
RoleID string `json:"roleId"`
// Namespace is the namespace scope for this assignment. "*" means all namespaces.
Namespace string `json:"namespace"`
// AssignedBy is the ID of the user performing the assignment.
AssignedBy string `json:"assignedBy"`
} // @name AssignRoleRequest
AssignRoleRequest represents a request to assign a role to a user.
type Attributes ¶ added in v0.1.27
Attributes represents a map of attributes for the agent group. @name AgentGroupAttributes.
type Certificate ¶ added in v0.1.28
type Certificate struct {
// Kind is the type of the resource.
Kind string `json:"kind"`
// APIVersion is the version of the API.
APIVersion string `json:"apiVersion"`
// Metadata contains the metadata of the certificate.
Metadata CertificateMetadata `json:"metadata"`
// Spec contains the specification of the certificate.
Spec CertificateSpec `json:"spec"`
// Status contains the status of the certificate.
Status CertificateStatus `json:"status,omitzero"`
} // @name Certificate
Certificate represents a TLS certificate resource.
type CertificateMetadata ¶ added in v0.1.28
type CertificateMetadata struct {
// Name is the unique name of the certificate.
Name string `json:"name"`
// Namespace is the namespace the certificate belongs to.
Namespace string `json:"namespace"`
// Attributes are optional key-value pairs for the certificate.
Attributes Attributes `json:"attributes,omitempty"`
// CreatedAt is the timestamp when the certificate was created.
CreatedAt Time `json:"createdAt"`
// DeletedAt is the timestamp when the certificate was soft deleted.
// If nil, the certificate is not deleted.
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name CertificateMetadata
CertificateMetadata represents metadata for a certificate.
type CertificateSpec ¶ added in v0.1.28
type CertificateSpec struct {
// Cert is the PEM-encoded certificate.
Cert string `json:"cert,omitempty"`
// PrivateKey is the PEM-encoded private key.
PrivateKey string `json:"privateKey,omitempty"`
// CaCert is the PEM-encoded CA certificate.
CaCert string `json:"caCert,omitempty"`
} // @name CertificateSpec
CertificateSpec represents the specification of a certificate.
type CertificateStatus ¶ added in v0.1.28
type CertificateStatus struct {
// Conditions contains the conditions of the certificate.
Conditions []Condition `json:"conditions,omitempty"`
} // @name CertificateStatus
CertificateStatus represents the status of a certificate.
type CheckPermissionRequest ¶ added in v0.1.35
type CheckPermissionRequest struct {
// UserID is the ID of the user to check.
UserID string `json:"userId"`
// Namespace is the namespace to check permission in.
Namespace string `json:"namespace"`
// Resource is the resource to check access for.
Resource string `json:"resource"`
// Action is the action to check access for.
Action string `json:"action"`
} // @name CheckPermissionRequest
CheckPermissionRequest represents a request to check a user's permission.
type CheckPermissionResponse ¶ added in v0.1.35
type CheckPermissionResponse struct {
// Allowed indicates whether the user has the permission.
Allowed bool `json:"allowed"`
} // @name CheckPermissionResponse
CheckPermissionResponse represents the response for a permission check.
type Condition ¶ added in v0.1.27
type Condition struct {
Type ConditionType `json:"type"`
LastTransitionTime Time `json:"lastTransitionTime"`
Status ConditionStatus `json:"status"`
Reason string `json:"reason"`
Message string `json:"message,omitempty"`
} // @name Condition
Condition represents a condition of an agent group.
type ConditionStatus ¶ added in v0.1.27
type ConditionStatus string // @name AgentConditionStatus
ConditionStatus represents the status of an agent condition.
const ( // ConditionStatusTrue represents a true condition status. ConditionStatusTrue ConditionStatus = "True" // ConditionStatusFalse represents a false condition status. ConditionStatusFalse ConditionStatus = "False" // ConditionStatusUnknown represents an unknown condition status. ConditionStatusUnknown ConditionStatus = "Unknown" )
type ConditionType ¶ added in v0.1.27
type ConditionType string // @name ConditionType
ConditionType represents the type of an agent condition.
const ( // ConditionTypeCreated represents the condition when the agent group was created. ConditionTypeCreated ConditionType = "Created" // ConditionTypeUpdated represents the condition when the agent group was updated. ConditionTypeUpdated ConditionType = "Updated" // ConditionTypeDeleted represents the condition when the agent group was deleted. ConditionTypeDeleted ConditionType = "Deleted" // ConditionTypeConnected represents the condition when the agent is connected. ConditionTypeConnected ConditionType = "Connected" // ConditionTypeHealthy represents the condition when the agent is healthy. ConditionTypeHealthy ConditionType = "Healthy" // ConditionTypeConfigured represents the condition when the agent has been configured. ConditionTypeConfigured ConditionType = "Configured" // ConditionTypeRegistered represents the condition when the agent has been registered. ConditionTypeRegistered ConditionType = "Registered" )
type Connection ¶ added in v0.1.27
type Connection struct {
// ID is the unique identifier of the connection.
ID uuid.UUID `json:"id"`
// InstanceUID is the unique identifier of the agent instance.
InstanceUID uuid.UUID `json:"instanceUid"`
// Namespace is the namespace the connection belongs to.
Namespace string `json:"namespace"`
// Type is the type of connection (e.g., "http", "websocket").
Type string `json:"type"`
// LastCommunicatedAt is the timestamp of the last communication with the agent.
LastCommunicatedAt Time `json:"lastCommunicatedAt"`
// Alive indicates whether the connection is currently alive.
Alive bool `json:"alive"`
} // @name Connection
Connection represents a connection to an agent. It follows the Kubernetes-style resource structure.
type ConnectionListResponse ¶ added in v0.1.27
type ConnectionListResponse = ListResponse[Connection]
ConnectionListResponse represents a list of connections with metadata.
func NewConnectionListResponse ¶ added in v0.1.27
func NewConnectionListResponse(connections []Connection, metadata ListMeta) *ConnectionListResponse
NewConnectionListResponse creates a new ConnectionListResponse with the given connections and metadata.
type ConnectionSettings ¶ added in v0.1.27
type ConnectionSettings struct {
// OpAMP contains OpAMP server connection settings.
OpAMP OpAMPConnectionSettings `json:"opamp,omitzero"`
// OwnMetrics contains own metrics connection settings.
OwnMetrics TelemetryConnectionSettings `json:"ownMetrics,omitzero"`
// OwnLogs contains own logs connection settings.
OwnLogs TelemetryConnectionSettings `json:"ownLogs,omitzero"`
// OwnTraces contains own traces connection settings.
OwnTraces TelemetryConnectionSettings `json:"ownTraces,omitzero"`
// OtherConnections contains other connection settings mapped by name.
OtherConnections map[string]OtherConnectionSettings `json:"otherConnections,omitempty"`
} // @name ConnectionSettings
ConnectionSettings represents connection settings for the agent.
type ListMeta ¶
type ListMeta struct {
Continue string `json:"continue"`
RemainingItemCount int64 `json:"remainingItemCount"`
} // @name ListMeta
ListMeta is a struct that contains metadata for list responses.
type ListResponse ¶
type ListResponse[T any] struct { Kind string `json:"kind"` APIVersion string `json:"apiVersion"` Metadata ListMeta `json:"metadata"` Items []T `json:"items"` } // @name ListResponse
ListResponse is a struct that represents the response for listing agents.
type Metadata ¶ added in v0.1.27
type Metadata struct {
Namespace string `json:"namespace"`
Name string `json:"name"`
Attributes Attributes `json:"attributes"`
CreatedAt Time `json:"createdAt"`
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name AgentGroupMetadata
Metadata represents metadata information for an agent group.
type Namespace ¶ added in v0.1.35
type Namespace struct {
Metadata NamespaceMetadata `json:"metadata"`
Status NamespaceStatus `json:"status"`
} // @name Namespace
Namespace represents a namespace resource that groups agent groups.
type NamespaceMetadata ¶ added in v0.1.35
type NamespaceMetadata struct {
Name string `json:"name"`
Labels map[string]string `json:"labels,omitempty"`
Annotations map[string]string `json:"annotations,omitempty"`
CreatedAt Time `json:"createdAt"`
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name NamespaceMetadata
NamespaceMetadata represents the metadata of a namespace.
type NamespaceStatus ¶ added in v0.1.35
type NamespaceStatus struct {
Conditions []Condition `json:"conditions"`
} // @name NamespaceStatus
NamespaceStatus represents the status of a namespace.
type OpAMPConnectionSettings ¶ added in v0.1.27
type OpAMPConnectionSettings struct {
// DestinationEndpoint is the URL to connect to the OpAMP server.
DestinationEndpoint string `json:"destinationEndpoint"`
// Headers are HTTP headers to include in requests.
Headers map[string][]string `json:"headers,omitempty"`
// CertificateName is the name of the certificate resource to use.
CertificateName *string `json:"certificateName,omitempty"`
} // @name OpAMPConnectionSettings
OpAMPConnectionSettings represents OpAMP connection settings.
type OtherConnectionSettings ¶ added in v0.1.27
type OtherConnectionSettings struct {
// DestinationEndpoint is the URL to connect to.
DestinationEndpoint string `json:"destinationEndpoint"`
// Headers are HTTP headers to include in requests.
Headers map[string][]string `json:"headers,omitempty"`
// CertificateName is the name of the certificate resource to use.
CertificateName *string `json:"certificateName,omitempty"`
} // @name OtherConnectionSettings
OtherConnectionSettings represents other connection settings.
type Permission ¶ added in v0.1.35
type Permission struct {
// Kind is the type of the resource.
Kind string `json:"kind"`
// APIVersion is the version of the API.
APIVersion string `json:"apiVersion"`
// Metadata contains the metadata of the permission.
Metadata PermissionMetadata `json:"metadata"`
// Spec contains the specification of the permission.
Spec PermissionSpec `json:"spec"`
// Status contains the status of the permission.
Status PermissionStatus `json:"status,omitzero"`
} // @name Permission
Permission represents a permission resource.
type PermissionMetadata ¶ added in v0.1.35
type PermissionMetadata struct {
// UID is the unique identifier of the permission.
UID string `json:"uid"`
// CreatedAt is the timestamp when the permission was created.
CreatedAt Time `json:"createdAt"`
// UpdatedAt is the timestamp when the permission was last updated.
UpdatedAt Time `json:"updatedAt"`
// DeletedAt is the timestamp when the permission was soft deleted.
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name PermissionMetadata
PermissionMetadata represents metadata for a permission.
type PermissionSpec ¶ added in v0.1.35
type PermissionSpec struct {
// Name is the name of the permission (e.g., "agent:read").
Name string `json:"name"`
// Description is the description of the permission.
Description string `json:"description"`
// Resource is the resource this permission applies to.
Resource string `json:"resource"`
// Action is the action this permission grants.
Action string `json:"action"`
// IsBuiltIn indicates whether the permission is a built-in permission.
IsBuiltIn bool `json:"isBuiltIn"`
} // @name PermissionSpec
PermissionSpec represents the specification of a permission.
type PermissionStatus ¶ added in v0.1.35
type PermissionStatus struct {
// Conditions contains the conditions of the permission.
Conditions []Condition `json:"conditions,omitempty"`
} // @name PermissionStatus
PermissionStatus represents the status of a permission.
type PingResponse ¶ added in v0.1.27
type PingResponse struct {
// Message is the response message.
Message string `json:"message"`
} // @name PingResponse
PingResponse is the response for the ping endpoint.
type Role ¶ added in v0.1.35
type Role struct {
// Kind is the type of the resource.
Kind string `json:"kind"`
// APIVersion is the version of the API.
APIVersion string `json:"apiVersion"`
// Metadata contains the metadata of the role.
Metadata RoleMetadata `json:"metadata"`
// Spec contains the specification of the role.
Spec RoleSpec `json:"spec"`
// Status contains the status of the role.
Status RoleStatus `json:"status,omitzero"`
} // @name Role
Role represents a role resource.
type RoleBinding ¶ added in v0.1.35
type RoleBinding struct {
// Kind is the type of the resource.
Kind string `json:"kind" yaml:"kind"`
// APIVersion is the version of the API.
APIVersion string `json:"apiVersion" yaml:"apiVersion"`
// Metadata contains the metadata of the role binding.
Metadata RoleBindingMetadata `json:"metadata" yaml:"metadata"`
// Spec contains the specification of the role binding.
Spec RoleBindingSpec `json:"spec" yaml:"spec"`
// Status contains the status of the role binding.
Status RoleBindingStatus `json:"status,omitzero" yaml:"status,omitempty"`
} // @name RoleBinding
RoleBinding represents a binding of a role to a user within a namespace.
type RoleBindingMetadata ¶ added in v0.1.35
type RoleBindingMetadata struct {
// Namespace is the namespace scope for this role binding.
Namespace string `json:"namespace" yaml:"namespace"`
// Name is the unique name of the role binding within the namespace.
Name string `json:"name" yaml:"name"`
// CreatedAt is the timestamp when the role binding was created.
CreatedAt Time `json:"createdAt,omitzero" yaml:"createdAt,omitempty"`
// UpdatedAt is the timestamp when the role binding was last updated.
UpdatedAt Time `json:"updatedAt,omitzero" yaml:"updatedAt,omitempty"`
// DeletedAt is the timestamp when the role binding was soft deleted.
DeletedAt *Time `json:"deletedAt,omitempty" yaml:"deletedAt,omitempty"`
} // @name RoleBindingMetadata
RoleBindingMetadata represents metadata for a role binding.
type RoleBindingRoleRef ¶ added in v0.1.35
type RoleBindingRoleRef struct {
// Kind is the type of the referenced resource (e.g., "Role").
Kind string `json:"kind" yaml:"kind"`
// Name is the display name of the role.
Name string `json:"name" yaml:"name"`
} // @name RoleBindingRoleRef
RoleBindingRoleRef references a Role resource.
type RoleBindingSpec ¶ added in v0.1.35
type RoleBindingSpec struct {
// RoleRef references the role to bind.
RoleRef RoleBindingRoleRef `json:"roleRef" yaml:"roleRef"`
// Subject identifies the user to bind the role to.
Subject RoleBindingSubject `json:"subject" yaml:"subject"`
} // @name RoleBindingSpec
RoleBindingSpec defines the role binding details.
type RoleBindingStatus ¶ added in v0.1.35
type RoleBindingStatus struct {
// Conditions contains the conditions of the role binding.
Conditions []Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"`
} // @name RoleBindingStatus
RoleBindingStatus represents the current state of the role binding.
type RoleBindingSubject ¶ added in v0.1.35
type RoleBindingSubject struct {
// Kind is the type of the subject (e.g., "User").
Kind string `json:"kind" yaml:"kind"`
// Name is the email of the user.
Name string `json:"name" yaml:"name"`
} // @name RoleBindingSubject
RoleBindingSubject identifies a user.
type RoleMetadata ¶ added in v0.1.35
type RoleMetadata struct {
// UID is the unique identifier of the role.
UID string `json:"uid"`
// CreatedAt is the timestamp when the role was created.
CreatedAt Time `json:"createdAt"`
// UpdatedAt is the timestamp when the role was last updated.
UpdatedAt Time `json:"updatedAt"`
// DeletedAt is the timestamp when the role was soft deleted.
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name RoleMetadata
RoleMetadata represents metadata for a role.
type RoleSpec ¶ added in v0.1.35
type RoleSpec struct {
// DisplayName is the display name of the role.
DisplayName string `json:"displayName"`
// Description is the description of the role.
Description string `json:"description"`
// Permissions contains the permission names assigned to the role (e.g., "agent:read").
Permissions []string `json:"permissions,omitempty"`
// IsBuiltIn indicates whether the role is a built-in role.
IsBuiltIn bool `json:"isBuiltIn"`
} // @name RoleSpec
RoleSpec represents the specification of a role.
type RoleStatus ¶ added in v0.1.35
type RoleStatus struct {
// Conditions contains the conditions of the role.
Conditions []Condition `json:"conditions,omitempty"`
} // @name RoleStatus
RoleStatus represents the status of a role.
type Server ¶ added in v0.1.27
type Server struct {
ID string `json:"id"`
LastHeartbeatAt Time `json:"lastHeartbeatAt"`
Conditions []ServerCondition `json:"conditions"`
} // @name Server
Server represents an API server instance.
type ServerCondition ¶ added in v0.1.27
type ServerCondition struct {
Type ServerConditionType `json:"type"`
LastTransitionTime Time `json:"lastTransitionTime"`
Status ServerConditionStatus `json:"status"`
Reason string `json:"reason"`
Message string `json:"message,omitempty"`
} // @name ServerCondition
ServerCondition represents a condition of a server.
type ServerConditionStatus ¶ added in v0.1.27
type ServerConditionStatus string // @name ServerConditionStatus
ServerConditionStatus represents the status of a server condition.
const ( // ServerConditionStatusTrue represents a true condition status. ServerConditionStatusTrue ServerConditionStatus = "True" // ServerConditionStatusFalse represents a false condition status. ServerConditionStatusFalse ServerConditionStatus = "False" // ServerConditionStatusUnknown represents an unknown condition status. ServerConditionStatusUnknown ServerConditionStatus = "Unknown" )
type ServerConditionType ¶ added in v0.1.27
type ServerConditionType string // @name ServerConditionType
ServerConditionType represents the type of a server condition.
const ( // ServerConditionTypeRegistered represents the condition when the server was registered. ServerConditionTypeRegistered ServerConditionType = "Registered" // ServerConditionTypeAlive represents the condition when the server is alive. ServerConditionTypeAlive ServerConditionType = "Alive" )
type ServerListResponse ¶ added in v0.1.27
type ServerListResponse = ListResponse[Server]
ServerListResponse represents a list of servers with metadata.
func NewServerListResponse ¶ added in v0.1.27
func NewServerListResponse(servers []Server, metadata ListMeta) *ServerListResponse
NewServerListResponse creates a new ServerListResponse with the given servers and metadata.
type Spec ¶ added in v0.1.27
type Spec struct {
Priority int `json:"priority"`
Selector AgentSelector `json:"selector"`
AgentConfig *AgentConfig `json:"agentConfig,omitempty"`
} // @name AgentGroupSpec
Spec represents the specification of an agent group.
type Status ¶ added in v0.1.27
type Status struct {
// NumAgents is the total number of agents in the agent group.
NumAgents int `json:"numAgents"`
// NumConnectedAgents is the number of connected agents in the agent group.
NumConnectedAgents int `json:"numConnectedAgents"`
// NumHealthyAgents is the number of healthy agents in the agent group.
NumHealthyAgents int `json:"numHealthyAgents"`
// NumUnhealthyAgents is the number of unhealthy agents in the agent group.
NumUnhealthyAgents int `json:"numUnhealthyAgents"`
// NumNotConnectedAgents is the number of not connected agents in the agent group.
NumNotConnectedAgents int `json:"numNotConnectedAgents"`
// Conditions is a list of conditions that apply to the agent group.
Conditions []Condition `json:"conditions"`
} // @name AgentGroupStatus
Status represents the status of an agent group.
type TLSCertificate ¶ added in v0.1.27
type TLSCertificate struct {
// Cert is the PEM-encoded certificate.
Cert string `json:"cert,omitempty"`
// PrivateKey is the PEM-encoded private key.
PrivateKey string `json:"privateKey,omitempty"`
// CaCert is the PEM-encoded CA certificate.
CaCert string `json:"caCert,omitempty"`
} // @name TLSCertificate
TLSCertificate represents TLS certificate information.
type TelemetryConnectionSettings ¶ added in v0.1.27
type TelemetryConnectionSettings struct {
// DestinationEndpoint is the URL to send telemetry data to.
DestinationEndpoint string `json:"destinationEndpoint"`
// Headers are HTTP headers to include in requests.
Headers map[string][]string `json:"headers,omitempty"`
// CertificateName is the name of the certificate resource to use.
CertificateName *string `json:"certificateName,omitempty"`
} // @name TelemetryConnectionSettings
TelemetryConnectionSettings represents telemetry connection settings.
type Time ¶ added in v0.1.27
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
func Date ¶ added in v0.1.27
Date returns the Time corresponding to the supplied parameters by wrapping time.Date.
func Unix ¶ added in v0.1.27
Unix returns the local time corresponding to the given Unix time by wrapping time.Unix.
func (*Time) DeepCopyInto ¶ added in v0.1.27
DeepCopyInto creates a deep-copy of the Time value. The underlying time.Time type is effectively immutable in the time API, so it is safe to copy-by-assign, despite the presence of (unexported) Pointer fields.
func (Time) MarshalJSON ¶ added in v0.1.27
MarshalJSON implements the json.Marshaler interface.
func (Time) MarshalYAML ¶ added in v0.1.27
MarshalYAML implements yaml.Marshaler.
func (Time) Rfc3339Copy ¶ added in v0.1.27
Rfc3339Copy returns a copy of the Time at second-level precision.
func (*Time) UnmarshalJSON ¶ added in v0.1.27
UnmarshalJSON implements the json.Unmarshaller interface.
func (*Time) UnmarshalYAML ¶ added in v0.1.27
UnmarshalYAML implements yaml.Unmarshaler.
type User ¶ added in v0.1.35
type User struct {
// Kind is the type of the resource.
Kind string `json:"kind"`
// APIVersion is the version of the API.
APIVersion string `json:"apiVersion"`
// Metadata contains the metadata of the user.
Metadata UserMetadata `json:"metadata"`
// Spec contains the specification of the user.
Spec UserSpec `json:"spec"`
// Status contains the status of the user.
Status UserStatus `json:"status,omitzero"`
} // @name User
User represents an authenticated user resource.
type UserMetadata ¶ added in v0.1.35
type UserMetadata struct {
// UID is the unique identifier of the user.
UID string `json:"uid"`
// CreatedAt is the timestamp when the user was created.
CreatedAt Time `json:"createdAt"`
// UpdatedAt is the timestamp when the user was last updated.
UpdatedAt Time `json:"updatedAt"`
// DeletedAt is the timestamp when the user was soft deleted.
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name UserMetadata
UserMetadata represents metadata for a user.
type UserProfileResponse ¶ added in v0.1.35
type UserProfileResponse struct {
// User contains the user information.
User User `json:"user"`
// Roles contains the roles assigned to the user.
Roles []Role `json:"roles"`
// Permissions contains the effective permissions for the user.
Permissions []Permission `json:"permissions"`
} // @name UserProfileResponse
UserProfileResponse represents a user's profile with their roles and permissions.
type UserRole ¶ added in v0.1.35
type UserRole struct {
// Kind is the type of the resource.
Kind string `json:"kind"`
// APIVersion is the version of the API.
APIVersion string `json:"apiVersion"`
// Metadata contains the metadata of the user role assignment.
Metadata UserRoleMetadata `json:"metadata"`
// Spec contains the specification of the user role assignment.
Spec UserRoleSpec `json:"spec"`
// Status contains the status of the user role assignment.
Status UserRoleStatus `json:"status,omitzero"`
} // @name UserRole
UserRole represents a user-role assignment resource.
type UserRoleMetadata ¶ added in v0.1.35
type UserRoleMetadata struct {
// UID is the unique identifier of the user role assignment.
UID string `json:"uid"`
// CreatedAt is the timestamp when the assignment was created.
CreatedAt Time `json:"createdAt"`
// UpdatedAt is the timestamp when the assignment was last updated.
UpdatedAt Time `json:"updatedAt"`
// DeletedAt is the timestamp when the assignment was soft deleted.
DeletedAt *Time `json:"deletedAt,omitempty"`
} // @name UserRoleMetadata
UserRoleMetadata represents metadata for a user role assignment.
type UserRoleSpec ¶ added in v0.1.35
type UserRoleSpec struct {
// UserID is the ID of the user.
UserID string `json:"userId"`
// RoleID is the ID of the role.
RoleID string `json:"roleId"`
// Namespace is the namespace scope for this role assignment. "*" means all namespaces.
Namespace string `json:"namespace"`
// AssignedAt is the timestamp when the role was assigned.
AssignedAt Time `json:"assignedAt"`
// AssignedBy is the ID of the user who assigned the role.
AssignedBy string `json:"assignedBy"`
} // @name UserRoleSpec
UserRoleSpec represents the specification of a user role assignment.
type UserRoleStatus ¶ added in v0.1.35
type UserRoleStatus struct {
// Conditions contains the conditions of the user role assignment.
Conditions []Condition `json:"conditions,omitempty"`
} // @name UserRoleStatus
UserRoleStatus represents the status of a user role assignment.
type UserSpec ¶ added in v0.1.35
type UserSpec struct {
// Email is the email address of the user.
Email string `json:"email"`
// Username is the username of the user.
Username string `json:"username"`
// IsActive indicates whether the user is active.
IsActive bool `json:"isActive"`
} // @name UserSpec
UserSpec represents the specification of a user.
type UserStatus ¶ added in v0.1.35
type UserStatus struct {
// Conditions contains the conditions of the user.
Conditions []Condition `json:"conditions,omitempty"`
// Roles contains the role IDs assigned to the user.
Roles []string `json:"roles,omitempty"`
} // @name UserStatus
UserStatus represents the status of a user.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package auth provides the authentication api for the opampcommander application
|
Package auth provides the authentication api for the opampcommander application |
|
Package command provides the command api model for opampcommander.
|
Package command provides the command api model for opampcommander. |
|
Package version provides api model for version information.
|
Package version provides api model for version information. |