Documentation
¶
Overview ¶
Package capability 提供当前服务端操作能力查询。 Package capability provides discovery of operations supported by the current server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Data ¶
type Data struct {
APIVersion string `json:"api_version"`
ServerVersion string `json:"server_version"`
GitCommit string `json:"git_commit"`
BuildTime string `json:"build_time"`
MinCLIVersion string `json:"min_cli_version"`
RegistryRevision string `json:"registry_revision"`
Operations []Operation `json:"operations"`
}
Data 是能力查询返回的版本和操作列表。 Data contains server versions and the supported operation list.
type Operation ¶
type Operation struct {
OperationID string `json:"operation_id"`
Revision int `json:"revision"`
Allowed bool `json:"allowed"`
DenialCode string `json:"denial_code,omitempty"`
Mode operation.OperationMode `json:"mode"`
Risk operation.RiskLevel `json:"risk"`
Impact *operation.ImpactSpec `json:"impact,omitempty"`
}
Operation 描述一个操作对当前用户是否可用。 Operation describes whether an operation is available to the current user.
type Response ¶
Response 是能力查询的标准 API 响应。 Response is the standard API response for capability discovery.
type VersionData ¶ added in v1.0.0
type VersionData struct {
Version string `json:"version"`
GitCommit string `json:"git_commit"`
BuildTime string `json:"build_time"`
MinCLIVersion string `json:"min_cli_version"`
}
VersionData 是公开的产品版本信息(不含操作能力列表)。 VersionData is public product version info without the operation capability list.
type VersionResponse ¶ added in v1.0.0
type VersionResponse struct {
ErrorMsg string `json:"error_msg"`
Data VersionData `json:"data"`
}
VersionResponse 是产品版本查询的标准 API 响应。 VersionResponse is the standard API response for product version discovery.
Click to show internal directories.
Click to hide internal directories.