Documentation
¶
Overview ¶
Package kloakd provides the Go SDK for the KLOAKD API. Error hierarchy mirrors the design document §6.
Index ¶
- type AnalyzeOptions
- type AnalyzeResult
- type ApiEndpoint
- type ApiError
- type AuthenticationError
- type ChatEvent
- type ChatTurn
- type Client
- type Config
- type CrawlEvent
- type CrawlOptions
- type CrawlResult
- type CrawlStreamOptions
- type DeduplicationResult
- type DiscoverEvent
- type DiscoverOptions
- type DiscoverResult
- type DiscoverStreamOptions
- type EvadrNamespace
- func (e *EvadrNamespace) Analyze(ctx context.Context, targetURL string, opts *AnalyzeOptions) (*AnalyzeResult, error)
- func (e *EvadrNamespace) Fetch(ctx context.Context, targetURL string, opts *FetchOptions) (*FetchResult, error)
- func (e *EvadrNamespace) FetchAsync(ctx context.Context, targetURL string, opts *FetchAsyncOptions) (string, error)
- func (e *EvadrNamespace) FetchStream(ctx context.Context, targetURL string, opts *FetchStreamOptions) (<-chan FetchEvent, error)
- func (e *EvadrNamespace) StoreProxy(ctx context.Context, name, proxyURL string) error
- type ExecutionResult
- type ExtractHTMLOptions
- type ExtractionResult
- type FetchAsyncOptions
- type FetchEvent
- type FetchOptions
- type FetchResult
- type FetchStreamOptions
- type FetchyrFetchOptions
- type FetchyrNamespace
- func (f *FetchyrNamespace) CheckDuplicates(ctx context.Context, records []map[string]interface{}, domain string) (*DeduplicationResult, error)
- func (f *FetchyrNamespace) CreateWorkflow(ctx context.Context, name string, steps []map[string]interface{}, ...) (*WorkflowResult, error)
- func (f *FetchyrNamespace) DetectForms(ctx context.Context, targetURL string, sessionArtifactID string) (*FormDetectionResult, error)
- func (f *FetchyrNamespace) DetectMFA(ctx context.Context, targetURL string, sessionArtifactID string) (*MfaDetectionResult, error)
- func (f *FetchyrNamespace) ExecuteWorkflow(ctx context.Context, workflowID string) (*ExecutionResult, error)
- func (f *FetchyrNamespace) Fetch(ctx context.Context, targetURL, sessionArtifactID string, ...) (*FetchyrResult, error)
- func (f *FetchyrNamespace) GetExecution(ctx context.Context, workflowID, executionID string) (*ExecutionResult, error)
- func (f *FetchyrNamespace) Login(ctx context.Context, ...) (*SessionResult, error)
- func (f *FetchyrNamespace) SubmitMFA(ctx context.Context, challengeID, code string) (*MfaResult, error)
- type FetchyrResult
- type FormDetectionResult
- type KloakdError
- type KolektrNamespace
- func (k *KolektrNamespace) ExtractHTML(ctx context.Context, html, targetURL string, opts *ExtractHTMLOptions) (*ExtractionResult, error)
- func (k *KolektrNamespace) Page(ctx context.Context, targetURL string, opts *PageOptions) (*ExtractionResult, error)
- func (k *KolektrNamespace) PageAll(ctx context.Context, targetURL string, opts *PageOptions) ([]map[string]interface{}, error)
- type LoginOptions
- type MfaDetectionResult
- type MfaResult
- type NexusAnalyzeOptions
- type NexusAnalyzeResult
- type NexusExecuteResult
- type NexusKnowledgeResult
- type NexusNamespace
- func (n *NexusNamespace) Analyze(ctx context.Context, targetURL string, opts *NexusAnalyzeOptions) (*NexusAnalyzeResult, error)
- func (n *NexusNamespace) Execute(ctx context.Context, strategyID, targetURL string) (*NexusExecuteResult, error)
- func (n *NexusNamespace) Knowledge(ctx context.Context, executionResultID string) (*NexusKnowledgeResult, error)
- func (n *NexusNamespace) Synthesize(ctx context.Context, perceptionID string, opts *NexusSynthesizeOptions) (*NexusSynthesisResult, error)
- func (n *NexusNamespace) Verify(ctx context.Context, strategyID string) (*NexusVerifyResult, error)
- type NexusSynthesisResult
- type NexusSynthesizeOptions
- type NexusVerifyResult
- type NotEntitledError
- type PageNode
- type PageOptions
- type ParlyrNamespace
- func (p *ParlyrNamespace) Chat(ctx context.Context, sessionID, message string) (*ChatTurn, error)
- func (p *ParlyrNamespace) ChatStream(ctx context.Context, sessionID, message string) (<-chan ChatEvent, error)
- func (p *ParlyrNamespace) DeleteSession(ctx context.Context, sessionID string) error
- func (p *ParlyrNamespace) Parse(ctx context.Context, message string, opts *ParseOptions) (*ParseResult, error)
- type ParseOptions
- type ParseResult
- type RateLimitError
- type SessionResult
- type SkanyrNamespace
- func (s *SkanyrNamespace) Discover(ctx context.Context, targetURL string, opts *DiscoverOptions) (*DiscoverResult, error)
- func (s *SkanyrNamespace) DiscoverAll(ctx context.Context, targetURL string, opts *DiscoverOptions) ([]ApiEndpoint, error)
- func (s *SkanyrNamespace) DiscoverStream(ctx context.Context, targetURL string, opts *DiscoverStreamOptions) (<-chan DiscoverEvent, error)
- func (s *SkanyrNamespace) GetApiMap(ctx context.Context, artifactID string) (map[string]interface{}, error)
- func (s *SkanyrNamespace) GetJob(ctx context.Context, jobID string) (map[string]interface{}, error)
- type UpstreamError
- type WebgrphNamespace
- func (w *WebgrphNamespace) Crawl(ctx context.Context, targetURL string, opts *CrawlOptions) (*CrawlResult, error)
- func (w *WebgrphNamespace) CrawlAll(ctx context.Context, targetURL string, opts *CrawlOptions) ([]PageNode, error)
- func (w *WebgrphNamespace) CrawlStream(ctx context.Context, targetURL string, opts *CrawlStreamOptions) (<-chan CrawlEvent, error)
- func (w *WebgrphNamespace) GetHierarchy(ctx context.Context, artifactID string) (map[string]interface{}, error)
- func (w *WebgrphNamespace) GetJob(ctx context.Context, jobID string) (map[string]interface{}, error)
- type WorkflowResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyzeOptions ¶
AnalyzeOptions configures optional parameters for Evadr.Analyze.
type AnalyzeResult ¶
type AnalyzeResult struct {
Blocked bool
Vendor *string
Confidence float64
RecommendedActions []string
}
AnalyzeResult is returned by Evadr.Analyze.
type ApiEndpoint ¶
type ApiEndpoint struct {
URL string
Method string
ApiType string
Confidence float64
Parameters map[string]interface{}
}
ApiEndpoint represents a discovered API endpoint.
type ApiError ¶
type ApiError struct {
KloakdError
}
ApiError is returned for any other 4xx/5xx response.
type AuthenticationError ¶
type AuthenticationError struct {
KloakdError
}
AuthenticationError is returned for HTTP 401 — invalid or expired API key.
func (*AuthenticationError) Error ¶
func (e *AuthenticationError) Error() string
type ChatTurn ¶
type ChatTurn struct {
SessionID string
Intent string
Confidence float64
Tier int
Response string
Entities map[string]interface{}
RequiresAction bool
ClarificationNeeded *string
}
ChatTurn is returned by Parlyr.Chat.
type Client ¶
type Client struct {
Evadr *EvadrNamespace
Webgrph *WebgrphNamespace
Skanyr *SkanyrNamespace
Nexus *NexusNamespace
Parlyr *ParlyrNamespace
Fetchyr *FetchyrNamespace
Kolektr *KolektrNamespace
// contains filtered or unexported fields
}
Client is the KLOAKD SDK client. Create one with New().
client := kloakd.New(kloakd.Config{
APIKey: "sk-live-...",
OrganizationID: "your-org-uuid",
})
type Config ¶
type Config struct {
// APIKey is the KLOAKD API key (required). Starts with "sk-".
APIKey string
// OrganizationID is the UUID of the organization (required).
OrganizationID string
// BaseURL overrides the API base URL. Defaults to https://api.kloakd.dev.
BaseURL string
// Timeout is the per-request timeout. Defaults to 30s.
Timeout time.Duration
// MaxRetries sets the number of retry attempts for retryable errors.
// 0 means one attempt (no retries). Defaults to 3.
MaxRetries int
// HTTPClient allows injecting a custom *http.Client (e.g. for testing).
HTTPClient *http.Client
}
Config holds all configuration for the KLOAKD client.
type CrawlEvent ¶
type CrawlEvent struct {
Type string
URL *string
Depth *int
PagesFound *int
Metadata map[string]interface{}
}
CrawlEvent is yielded by Webgrph.CrawlStream.
type CrawlOptions ¶
type CrawlOptions struct {
MaxDepth int
MaxPages int
IncludeExternalLinks bool
SessionArtifactID string
Limit int
Offset int
}
CrawlOptions configures optional parameters for Webgrph.Crawl.
type CrawlResult ¶
type CrawlResult struct {
Success bool
CrawlID string
URL string
TotalPages int
MaxDepthReached int
Pages []PageNode
HasMore bool
Total int
ArtifactID *string
Error *string
}
CrawlResult is returned by Webgrph.Crawl.
type CrawlStreamOptions ¶
CrawlStreamOptions configures optional parameters for Webgrph.CrawlStream.
type DeduplicationResult ¶
type DeduplicationResult struct {
UniqueRecords []map[string]interface{}
DuplicateCount int
TotalInput int
Error *string
}
DeduplicationResult is returned by Fetchyr.CheckDuplicates.
type DiscoverEvent ¶
type DiscoverEvent struct {
Type string
EndpointURL *string
ApiType *string
Metadata map[string]interface{}
}
DiscoverEvent is yielded by Skanyr.DiscoverStream.
type DiscoverOptions ¶
type DiscoverOptions struct {
SiteHierarchyArtifactID string
MaxRequests int
SessionArtifactID string
Limit int
Offset int
}
DiscoverOptions configures optional parameters for Skanyr.Discover.
type DiscoverResult ¶
type DiscoverResult struct {
Success bool
DiscoveryID string
URL string
TotalEndpoints int
Endpoints []ApiEndpoint
HasMore bool
Total int
ArtifactID *string
Error *string
}
DiscoverResult is returned by Skanyr.Discover.
type DiscoverStreamOptions ¶
DiscoverStreamOptions configures optional parameters for Skanyr.DiscoverStream.
type EvadrNamespace ¶
type EvadrNamespace struct {
// contains filtered or unexported fields
}
EvadrNamespace exposes the Anti-Bot Intelligence module. Access via client.Evadr.
func (*EvadrNamespace) Analyze ¶
func (e *EvadrNamespace) Analyze(ctx context.Context, targetURL string, opts *AnalyzeOptions) (*AnalyzeResult, error)
Analyze inspects the anti-bot defenses of the given URL.
func (*EvadrNamespace) Fetch ¶
func (e *EvadrNamespace) Fetch(ctx context.Context, targetURL string, opts *FetchOptions) (*FetchResult, error)
Fetch performs an anti-bot fetch of the given URL.
func (*EvadrNamespace) FetchAsync ¶
func (e *EvadrNamespace) FetchAsync(ctx context.Context, targetURL string, opts *FetchAsyncOptions) (string, error)
FetchAsync enqueues an anti-bot fetch job and returns the job ID.
func (*EvadrNamespace) FetchStream ¶
func (e *EvadrNamespace) FetchStream(ctx context.Context, targetURL string, opts *FetchStreamOptions) (<-chan FetchEvent, error)
FetchStream opens a server-sent events stream for an anti-bot fetch operation. Returns a read-only channel of FetchEvent values. The channel is closed when the stream ends or ctx is cancelled.
func (*EvadrNamespace) StoreProxy ¶
func (e *EvadrNamespace) StoreProxy(ctx context.Context, name, proxyURL string) error
StoreProxy registers a named proxy in the organization's proxy pool.
type ExecutionResult ¶
type ExecutionResult struct {
ExecutionID string
WorkflowID string
Status string
StartedAt *string
CompletedAt *string
Records []map[string]interface{}
Error *string
}
ExecutionResult is returned by Fetchyr.ExecuteWorkflow / GetExecution.
type ExtractHTMLOptions ¶
type ExtractHTMLOptions struct {
Schema map[string]interface{}
}
ExtractHTMLOptions configures optional parameters for Kolektr.ExtractHTML.
type ExtractionResult ¶
type ExtractionResult struct {
Success bool
URL string
Method string
Records []map[string]interface{}
TotalRecords int
PagesScraped int
HasMore bool
Total int
ArtifactID *string
JobID *string
Error *string
}
ExtractionResult is returned by Kolektr.Page and Kolektr.ExtractHTML.
type FetchAsyncOptions ¶
FetchAsyncOptions configures optional parameters for Evadr.FetchAsync.
type FetchEvent ¶
FetchEvent is yielded by Evadr.FetchStream.
type FetchOptions ¶
FetchOptions configures optional parameters for Evadr.Fetch.
type FetchResult ¶
type FetchResult struct {
Success bool
URL string
StatusCode int
TierUsed int
HTML *string
VendorDetected *string
AntiBotBypassed bool
ArtifactID *string
Error *string
}
FetchResult is returned by Evadr.Fetch.
type FetchStreamOptions ¶
type FetchStreamOptions struct {
ForceBrowser bool
}
FetchStreamOptions configures optional parameters for Evadr.FetchStream.
type FetchyrFetchOptions ¶
FetchyrFetchOptions configures optional parameters for Fetchyr.Fetch.
type FetchyrNamespace ¶
type FetchyrNamespace struct {
// contains filtered or unexported fields
}
FetchyrNamespace exposes the RPA & Authentication module. Access via client.Fetchyr.
func (*FetchyrNamespace) CheckDuplicates ¶
func (f *FetchyrNamespace) CheckDuplicates(ctx context.Context, records []map[string]interface{}, domain string) (*DeduplicationResult, error)
CheckDuplicates deduplicates a list of records, optionally scoped to a domain.
func (*FetchyrNamespace) CreateWorkflow ¶
func (f *FetchyrNamespace) CreateWorkflow(ctx context.Context, name string, steps []map[string]interface{}, targetURL string) (*WorkflowResult, error)
CreateWorkflow creates a new RPA workflow.
func (*FetchyrNamespace) DetectForms ¶
func (f *FetchyrNamespace) DetectForms(ctx context.Context, targetURL string, sessionArtifactID string) (*FormDetectionResult, error)
DetectForms detects forms on a page.
func (*FetchyrNamespace) DetectMFA ¶
func (f *FetchyrNamespace) DetectMFA(ctx context.Context, targetURL string, sessionArtifactID string) (*MfaDetectionResult, error)
DetectMFA detects MFA challenges on a page.
func (*FetchyrNamespace) ExecuteWorkflow ¶
func (f *FetchyrNamespace) ExecuteWorkflow(ctx context.Context, workflowID string) (*ExecutionResult, error)
ExecuteWorkflow triggers execution of a workflow by ID.
func (*FetchyrNamespace) Fetch ¶
func (f *FetchyrNamespace) Fetch( ctx context.Context, targetURL, sessionArtifactID string, opts *FetchyrFetchOptions, ) (*FetchyrResult, error)
Fetch performs an authenticated fetch within an existing session.
func (*FetchyrNamespace) GetExecution ¶
func (f *FetchyrNamespace) GetExecution(ctx context.Context, workflowID, executionID string) (*ExecutionResult, error)
GetExecution retrieves the result of a workflow execution.
func (*FetchyrNamespace) Login ¶
func (f *FetchyrNamespace) Login( ctx context.Context, targetURL, usernameSelector, passwordSelector, username, password string, opts *LoginOptions, ) (*SessionResult, error)
Login performs an automated login and returns an authenticated session artifact.
type FetchyrResult ¶
type FetchyrResult struct {
Success bool
URL string
StatusCode int
HTML *string
ArtifactID *string
SessionArtifactID string
Error *string
}
FetchyrResult is returned by Fetchyr.Fetch.
type FormDetectionResult ¶
FormDetectionResult is returned by Fetchyr.DetectForms.
type KloakdError ¶
KloakdError is the base error type for all SDK errors. Every error carries StatusCode and Message.
func (*KloakdError) Error ¶
func (e *KloakdError) Error() string
type KolektrNamespace ¶
type KolektrNamespace struct {
// contains filtered or unexported fields
}
KolektrNamespace exposes the Data Extraction module. Access via client.Kolektr.
func (*KolektrNamespace) ExtractHTML ¶
func (k *KolektrNamespace) ExtractHTML(ctx context.Context, html, targetURL string, opts *ExtractHTMLOptions) (*ExtractionResult, error)
ExtractHTML extracts structured data from raw HTML without making a network request.
func (*KolektrNamespace) Page ¶
func (k *KolektrNamespace) Page(ctx context.Context, targetURL string, opts *PageOptions) (*ExtractionResult, error)
Page extracts structured data from a URL using the full Kolektr pipeline.
func (*KolektrNamespace) PageAll ¶
func (k *KolektrNamespace) PageAll(ctx context.Context, targetURL string, opts *PageOptions) ([]map[string]interface{}, error)
PageAll auto-paginates until all records are retrieved.
type LoginOptions ¶
LoginOptions configures optional parameters for Fetchyr.Login.
type MfaDetectionResult ¶
type MfaDetectionResult struct {
MfaDetected bool
ChallengeID *string
MfaType *string
Error *string
}
MfaDetectionResult is returned by Fetchyr.DetectMFA.
type NexusAnalyzeOptions ¶
NexusAnalyzeOptions configures optional parameters for Nexus.Analyze.
type NexusAnalyzeResult ¶
type NexusAnalyzeResult struct {
PerceptionID string
Strategy map[string]interface{}
PageType string
ComplexityLevel string
ArtifactID *string
DurationMs int
Error *string
}
NexusAnalyzeResult is returned by Nexus.Analyze.
type NexusExecuteResult ¶
type NexusExecuteResult struct {
ExecutionResultID string
Success bool
Records []map[string]interface{}
ArtifactID *string
DurationMs int
Error *string
}
NexusExecuteResult is returned by Nexus.Execute.
type NexusKnowledgeResult ¶
type NexusKnowledgeResult struct {
LearnedConcepts []map[string]interface{}
LearnedPatterns []map[string]interface{}
DurationMs int
Error *string
}
NexusKnowledgeResult is returned by Nexus.Knowledge.
type NexusNamespace ¶
type NexusNamespace struct {
// contains filtered or unexported fields
}
NexusNamespace exposes the Strategy Engine module (5-layer cognitive pipeline). Access via client.Nexus.
func (*NexusNamespace) Analyze ¶
func (n *NexusNamespace) Analyze(ctx context.Context, targetURL string, opts *NexusAnalyzeOptions) (*NexusAnalyzeResult, error)
Analyze analyzes a URL using the Nexus perception layer.
func (*NexusNamespace) Execute ¶
func (n *NexusNamespace) Execute(ctx context.Context, strategyID, targetURL string) (*NexusExecuteResult, error)
Execute runs a verified strategy against a URL.
func (*NexusNamespace) Knowledge ¶
func (n *NexusNamespace) Knowledge(ctx context.Context, executionResultID string) (*NexusKnowledgeResult, error)
Knowledge stores learned concepts and patterns from an execution result.
func (*NexusNamespace) Synthesize ¶
func (n *NexusNamespace) Synthesize(ctx context.Context, perceptionID string, opts *NexusSynthesizeOptions) (*NexusSynthesisResult, error)
Synthesize generates a scraping strategy from a perception ID.
func (*NexusNamespace) Verify ¶
func (n *NexusNamespace) Verify(ctx context.Context, strategyID string) (*NexusVerifyResult, error)
Verify verifies the safety of a strategy before execution.
type NexusSynthesisResult ¶
type NexusSynthesisResult struct {
StrategyID string
StrategyName string
GeneratedCode string
ArtifactID *string
SynthesisTimeMs int
Error *string
}
NexusSynthesisResult is returned by Nexus.Synthesize.
type NexusSynthesizeOptions ¶
NexusSynthesizeOptions configures optional parameters for Nexus.Synthesize.
type NexusVerifyResult ¶
type NexusVerifyResult struct {
VerificationResultID string
IsSafe bool
RiskScore float64
SafetyScore float64
Violations []string
DurationMs int
Error *string
}
NexusVerifyResult is returned by Nexus.Verify.
type NotEntitledError ¶
type NotEntitledError struct {
KloakdError
Module string
UpgradeURL string
}
NotEntitledError is returned for HTTP 403 — tenant not on required plan.
func (*NotEntitledError) Error ¶
func (e *NotEntitledError) Error() string
type PageOptions ¶
type PageOptions struct {
Schema map[string]interface{}
FetchArtifactID string
SessionArtifactID string
ApiMapArtifactID string
Limit int
Offset int
}
PageOptions configures optional parameters for Kolektr.Page.
type ParlyrNamespace ¶
type ParlyrNamespace struct {
// contains filtered or unexported fields
}
ParlyrNamespace exposes the Conversational NLP module. Access via client.Parlyr.
func (*ParlyrNamespace) Chat ¶
Chat sends a message to a conversation session and blocks until the full response is collected from the SSE stream.
func (*ParlyrNamespace) ChatStream ¶
func (p *ParlyrNamespace) ChatStream(ctx context.Context, sessionID, message string) (<-chan ChatEvent, error)
ChatStream opens an SSE stream for a conversation turn. Returns a read-only channel of ChatEvent values.
func (*ParlyrNamespace) DeleteSession ¶
func (p *ParlyrNamespace) DeleteSession(ctx context.Context, sessionID string) error
DeleteSession removes a conversation session.
func (*ParlyrNamespace) Parse ¶
func (p *ParlyrNamespace) Parse(ctx context.Context, message string, opts *ParseOptions) (*ParseResult, error)
Parse interprets a natural language message.
type ParseOptions ¶
type ParseOptions struct {
SessionID string
}
ParseOptions configures optional parameters for Parlyr.Parse.
type ParseResult ¶
type ParseResult struct {
Intent string
Confidence float64
Tier int
Source string
Entities map[string]interface{}
RequiresAction bool
ClarificationNeeded *string
Reasoning *string
DetectedURL *string
}
ParseResult is returned by Parlyr.Parse.
type RateLimitError ¶
type RateLimitError struct {
KloakdError
RetryAfter int // seconds
ResetAt string // ISO timestamp
}
RateLimitError is returned for HTTP 429 — quota exceeded.
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string
type SessionResult ¶
type SessionResult struct {
Success bool
SessionID string
URL string
ArtifactID *string
ScreenshotURL *string
Error *string
}
SessionResult is returned by Fetchyr.Login.
type SkanyrNamespace ¶
type SkanyrNamespace struct {
// contains filtered or unexported fields
}
SkanyrNamespace exposes the API Discovery module. Access via client.Skanyr.
func (*SkanyrNamespace) Discover ¶
func (s *SkanyrNamespace) Discover(ctx context.Context, targetURL string, opts *DiscoverOptions) (*DiscoverResult, error)
Discover discovers API endpoints on the given URL.
func (*SkanyrNamespace) DiscoverAll ¶
func (s *SkanyrNamespace) DiscoverAll(ctx context.Context, targetURL string, opts *DiscoverOptions) ([]ApiEndpoint, error)
DiscoverAll auto-paginates until all endpoints are retrieved.
func (*SkanyrNamespace) DiscoverStream ¶
func (s *SkanyrNamespace) DiscoverStream(ctx context.Context, targetURL string, opts *DiscoverStreamOptions) (<-chan DiscoverEvent, error)
DiscoverStream opens a server-sent events stream for the API discovery operation. Returns a read-only channel of DiscoverEvent values.
type UpstreamError ¶
type UpstreamError struct {
KloakdError
}
UpstreamError is returned for HTTP 502 — upstream site fetch failed.
func (*UpstreamError) Error ¶
func (e *UpstreamError) Error() string
type WebgrphNamespace ¶
type WebgrphNamespace struct {
// contains filtered or unexported fields
}
WebgrphNamespace exposes the Site Mapping & Discovery module. Access via client.Webgrph.
func (*WebgrphNamespace) Crawl ¶
func (w *WebgrphNamespace) Crawl(ctx context.Context, targetURL string, opts *CrawlOptions) (*CrawlResult, error)
Crawl performs a site crawl and returns the hierarchy result.
func (*WebgrphNamespace) CrawlAll ¶
func (w *WebgrphNamespace) CrawlAll(ctx context.Context, targetURL string, opts *CrawlOptions) ([]PageNode, error)
CrawlAll auto-paginates until all pages are retrieved.
func (*WebgrphNamespace) CrawlStream ¶
func (w *WebgrphNamespace) CrawlStream(ctx context.Context, targetURL string, opts *CrawlStreamOptions) (<-chan CrawlEvent, error)
CrawlStream opens a server-sent events stream for the crawl operation. Returns a read-only channel of CrawlEvent values.
func (*WebgrphNamespace) GetHierarchy ¶
func (w *WebgrphNamespace) GetHierarchy(ctx context.Context, artifactID string) (map[string]interface{}, error)
GetHierarchy retrieves a stored site hierarchy artifact by ID.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
examples
|
|
|
quickstart
command
Quickstart: Discover and extract from a site in ~10 lines.
|
Quickstart: Discover and extract from a site in ~10 lines. |