Documentation
¶
Overview ¶
Package dto contains data transfer objects for application layer use cases.
Index ¶
- type CapabilityDiagnostics
- type CheckOptions
- type CheckProfileRequest
- type CheckProfileResponse
- type CollectCapabilitiesRequest
- type CollectCapabilitiesResponse
- type Diagnostics
- type ExecuteProfileRequest
- type ExecuteProfileResponse
- type ExecutionOptions
- type FilterOptions
- type LoadProfileRequest
- type LoadProfileResponse
- type RequestMetadata
- type ResponseMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilityDiagnostics ¶
type CapabilityDiagnostics struct {
// Required capabilities by plugin
Required map[string][]capabilities.Capability
// Granted capabilities by plugin
Granted map[string][]capabilities.Capability
}
CapabilityDiagnostics contains capability-related diagnostics.
type CheckOptions ¶
type CheckOptions struct {
// TrustPlugins - if true, auto-grant all capabilities
TrustPlugins bool
// PluginDir - custom plugin directory (empty = auto-detect)
PluginDir string
// SkipSchemaValidation - skip plugin config schema validation
SkipSchemaValidation bool
// SystemConfigPath - custom system config path (empty = default ~/.reglet/config.yaml)
SystemConfigPath string
}
CheckOptions contains options for plugin and capability management.
type CheckProfileRequest ¶
type CheckProfileRequest struct {
// ProfilePath is the path to the profile YAML file
ProfilePath string
// Filters control which controls to execute
Filters FilterOptions
// Execution controls how the profile is executed
Execution ExecutionOptions
// Options for plugin and capability management
Options CheckOptions
// Metadata for request tracking and diagnostics
Metadata RequestMetadata
}
CheckProfileRequest encapsulates all inputs needed to check a profile.
type CheckProfileResponse ¶
type CheckProfileResponse struct {
// ExecutionResult contains the detailed execution results
ExecutionResult *execution.ExecutionResult
// Metadata contains response metadata
Metadata ResponseMetadata
// Diagnostics contains additional diagnostic information
Diagnostics Diagnostics
}
CheckProfileResponse contains the result of checking a profile.
type CollectCapabilitiesRequest ¶
CollectCapabilitiesRequest encapsulates inputs for capability collection.
type CollectCapabilitiesResponse ¶
type CollectCapabilitiesResponse struct {
// Required capabilities by plugin name
Required map[string][]capabilities.Capability
// Granted capabilities by plugin name
Granted map[string][]capabilities.Capability
}
CollectCapabilitiesResponse contains the result of capability collection.
type Diagnostics ¶
type Diagnostics struct {
// Warnings are non-fatal issues encountered
Warnings []string
// Capabilities shows what capabilities were involved
Capabilities CapabilityDiagnostics
}
Diagnostics contains diagnostic information about execution.
type ExecuteProfileRequest ¶
type ExecuteProfileRequest struct {
ProfilePath string
Filters FilterOptions
Execution ExecutionOptions
GrantedCapabilities map[string][]capabilities.Capability
SkipSchemaValidation bool
}
ExecuteProfileRequest encapsulates inputs for profile execution.
type ExecuteProfileResponse ¶
type ExecuteProfileResponse struct {
// ExecutionResult is the domain execution result
ExecutionResult *execution.ExecutionResult
}
ExecuteProfileResponse contains the result of profile execution.
type ExecutionOptions ¶
type ExecutionOptions struct {
// Parallel enables parallel execution of controls
Parallel bool
// MaxConcurrentControls limits parallel control execution (0 = no limit)
MaxConcurrentControls int
// MaxConcurrentObservations limits parallel observation execution (0 = no limit)
MaxConcurrentObservations int
}
ExecutionOptions controls how the profile is executed.
type FilterOptions ¶
type FilterOptions struct {
// IncludeTags - only run controls with these tags (OR logic)
IncludeTags []string
// IncludeSeverities - only run controls with these severities (OR logic)
IncludeSeverities []string
// IncludeControlIDs - only run these specific controls (exclusive)
IncludeControlIDs []string
// ExcludeTags - skip controls with these tags
ExcludeTags []string
// ExcludeControlIDs - skip these specific controls
ExcludeControlIDs []string
// FilterExpression - advanced filter using expr language
FilterExpression string
// IncludeDependencies - automatically include dependency controls
IncludeDependencies bool
}
FilterOptions defines filters for control selection.
type LoadProfileRequest ¶
type LoadProfileRequest struct {
ProfilePath string
}
LoadProfileRequest encapsulates inputs for loading a profile.
type LoadProfileResponse ¶
type LoadProfileResponse struct {
// Profile is the loaded and validated profile
// Note: We don't expose the profile entity directly in DTO,
// but for now we'll keep it simple. In a strict hexagonal architecture,
// this would be a separate DTO.
ProfilePath string
Success bool
}
LoadProfileResponse contains the result of loading a profile.
type RequestMetadata ¶
type RequestMetadata struct {
// RequestID uniquely identifies this request
RequestID string
}
RequestMetadata contains metadata for request tracking.
type ResponseMetadata ¶
type ResponseMetadata struct {
// RequestID from the original request
RequestID string
// ProcessedAt is when the request was processed
ProcessedAt time.Time
// Duration is how long the request took
Duration time.Duration
}
ResponseMetadata contains metadata about the response.