Documentation
¶
Index ¶
- type Client
- func (c *Client) Close() error
- func (c *Client) GetRulesInfo(ctx context.Context) (*RulesResponse, error)
- func (c *Client) GetVersion() string
- func (c *Client) Health(ctx context.Context) (*HealthResponse, error)
- func (c *Client) Scan(ctx context.Context, request ScanRequest) (*ScanResponse, error)
- func (c *Client) ValidateConfig() error
- type HealthResponse
- type RulesResponse
- type ScanRequest
- type ScanResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a programmatic interface to the PQSwitch scanner
func NewDefaultClient ¶
func NewDefaultClient() *Client
NewDefaultClient creates a new client with default configuration
func (*Client) GetRulesInfo ¶
func (c *Client) GetRulesInfo(ctx context.Context) (*RulesResponse, error)
GetRulesInfo returns information about loaded rules
func (*Client) GetVersion ¶
GetVersion returns the client version
func (*Client) Health ¶
func (c *Client) Health(ctx context.Context) (*HealthResponse, error)
Health returns the health status of the scanner
func (*Client) Scan ¶
func (c *Client) Scan(ctx context.Context, request ScanRequest) (*ScanResponse, error)
Scan performs a cryptographic scan
func (*Client) ValidateConfig ¶
ValidateConfig validates the client configuration
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
Version string `json:"version"`
Timestamp time.Time `json:"timestamp"`
Details map[string]string `json:"details"`
}
HealthResponse represents a health check response
func (*HealthResponse) JSONResponse ¶
func (r *HealthResponse) JSONResponse() ([]byte, error)
JSONResponse converts a health response to JSON
type RulesResponse ¶
type RulesResponse struct {
TotalRules int `json:"total_rules"`
RulesByType map[string]int `json:"rules_by_type"`
Statistics map[string]interface{} `json:"statistics"`
LastUpdated time.Time `json:"last_updated"`
}
RulesResponse represents a rules information response
func (*RulesResponse) JSONResponse ¶
func (r *RulesResponse) JSONResponse() ([]byte, error)
JSONResponse converts a rules response to JSON
type ScanRequest ¶
type ScanRequest struct {
Path string `json:"path"`
OutputFormat string `json:"output_format,omitempty"`
RulesPath string `json:"rules_path,omitempty"`
Options map[string]string `json:"options,omitempty"`
}
ScanRequest represents a scan request
type ScanResponse ¶
type ScanResponse struct {
Success bool `json:"success"`
Result *types.ScanResult `json:"result,omitempty"`
Error string `json:"error,omitempty"`
RequestID string `json:"request_id"`
Timestamp time.Time `json:"timestamp"`
}
ScanResponse represents a scan response
func (*ScanResponse) JSONResponse ¶
func (r *ScanResponse) JSONResponse() ([]byte, error)
JSONResponse converts a response to JSON