Documentation
¶
Overview ¶
Package features defines runtime features and their settings contracts.
Index ¶
Constants ¶
View Source
const ( // VulnerabilityManagement identifies scanning, reports, and scan-based patching. VulnerabilityManagement ID = "vulnerabilityManagement" // VulnerabilityManagementSettingKey is the persisted toggle for vulnerability management. VulnerabilityManagementSettingKey = "featureVulnerabilityManagementEnabled" // Swarm identifies the Docker Swarm pages. An active swarm cluster keeps it enabled // regardless of the persisted toggle. Swarm ID = "swarm" // SwarmSettingKey is the persisted toggle for Docker Swarm. SwarmSettingKey = "featureSwarmEnabled" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Definition ¶
Definition connects a runtime feature to its persisted setting and default.
func Lookup ¶
func Lookup(id ID) (Definition, bool)
Lookup returns the definition of a supported runtime feature.
type DisabledError ¶
type DisabledError struct {
Status int `json:"status"`
Title string `json:"title"`
Detail string `json:"detail"`
Code string `json:"code"`
Feature ID `json:"feature"`
}
DisabledError describes an unavailable runtime feature using problem details.
func (*DisabledError) ContentType ¶
func (e *DisabledError) ContentType(contentType string) string
ContentType selects the problem-details media type for JSON and CBOR responses.
func (*DisabledError) Error ¶
func (e *DisabledError) Error() string
Error returns the reason the feature operation was rejected.
func (*DisabledError) GetStatus ¶
func (e *DisabledError) GetStatus() int
GetStatus supplies the HTTP response status to Huma.
Click to show internal directories.
Click to hide internal directories.