Documentation
¶
Overview ¶
Package cli provides command-line interface commands for the Scanorama network scanner. This file implements the API server command for running a standalone API server without the full daemon functionality.
Package cli provides CLI authentication helpers for making API calls. This file implements HTTP client functionality with API key authentication for CLI commands that interact with the Scanorama API server.
Package cli provides command-line interface commands for the Scanorama network scanner. This file implements API key management commands for creating, listing, updating, and deleting API keys used for API server authentication.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This package implements the Cobra-based CLI structure with commands for scanning, discovery, host management, scheduling, and daemon operations.
Package cli provides command-line interface commands for the Scanorama network scanner. This file implements the server command with lifecycle management.
Index ¶
- Constants
- func Execute()
- func SetVersion(v, c, bt string)
- func WithAPIClient(operation string, fn func(*APIClient) error) error
- type APIClient
- func (c *APIClient) Delete(endpoint string) (*APIResponse, error)
- func (c *APIClient) Get(endpoint string) (*APIResponse, error)
- func (c *APIClient) GetServerInfo() (map[string]interface{}, error)
- func (c *APIClient) Post(endpoint string, payload interface{}) (*APIResponse, error)
- func (c *APIClient) Put(endpoint string, payload interface{}) (*APIResponse, error)
- func (c *APIClient) TestConnection() error
- type APIError
- type APIResponse
- type DatabaseOperation
- type DiscoveryJob
- type Host
- type HostFilters
- type ScanJob
- type ScheduledJob
Constants ¶
const ( StatusBadRequest = 400 StatusForbidden = 403 StatusNotFound = 404 StatusTooManyRequests = 429 StatusInternalServerError = 500 )
HTTP status code constants
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func SetVersion ¶
func SetVersion(v, c, bt string)
SetVersion sets the version information (called from main).
Types ¶
type APIClient ¶ added in v0.10.0
type APIClient struct {
// contains filtered or unexported fields
}
APIClient provides authenticated HTTP client functionality for CLI commands
func NewAPIClient ¶ added in v0.10.0
NewAPIClient creates a new API client with authentication
func (*APIClient) Delete ¶ added in v0.10.0
func (c *APIClient) Delete(endpoint string) (*APIResponse, error)
Delete performs a DELETE request
func (*APIClient) Get ¶ added in v0.10.0
func (c *APIClient) Get(endpoint string) (*APIResponse, error)
Get performs a GET request to the specified endpoint
func (*APIClient) GetServerInfo ¶ added in v0.10.0
GetServerInfo retrieves server information (requires authentication)
func (*APIClient) Post ¶ added in v0.10.0
func (c *APIClient) Post(endpoint string, payload interface{}) (*APIResponse, error)
Post performs a POST request with JSON payload
func (*APIClient) Put ¶ added in v0.10.0
func (c *APIClient) Put(endpoint string, payload interface{}) (*APIResponse, error)
Put performs a PUT request with JSON payload
func (*APIClient) TestConnection ¶ added in v0.10.0
TestConnection tests the API connection and authentication
type APIError ¶ added in v0.10.0
type APIError struct {
StatusCode int
Message string
RequestID string
Response *APIResponse
}
APIError represents an API error response
type APIResponse ¶ added in v0.10.0
type APIResponse struct {
Data interface{} `json:"data,omitempty"`
Error string `json:"error,omitempty"`
Message string `json:"message,omitempty"`
RequestID string `json:"request_id,omitempty"`
Timestamp time.Time `json:"timestamp,omitempty"`
}
APIResponse represents a standard API response structure
type DatabaseOperation ¶
DatabaseOperation represents a function that operates on a database connection.
type DiscoveryJob ¶
DiscoveryJob represents a discovery job configuration.
type Host ¶
type Host struct {
IP string
Status string
OSFamily string
OSName string
LastSeen time.Time
FirstSeen time.Time
IsIgnored bool
OpenPorts int
TotalScans int
DiscoveryMethod string
}
Host represents a discovered host.
type HostFilters ¶
type HostFilters struct {
Status string
OSFamily string
LastSeenDur time.Duration
ShowIgnored bool
}
HostFilters represents the filters for querying hosts.