Documentation
¶
Index ¶
- type ASCIIHandler
- type ASNHandler
- type Answer
- type AnswerType
- type AntonymHandler
- type Base64Handler
- type BeautifyConfig
- type BeautifyHandler
- type CVEHandler
- type CVEItem
- type CalendarHandler
- type CaseHandler
- type CertHandler
- type CertInfo
- type CheatHandler
- type ChmodHandler
- type ColorHandler
- type ConvertHandler
- type CronHandler
- type DNSHandler
- type DNSRecord
- type DefinitionHandler
- type DictionaryHandler
- type DirectAnswerManager
- type EmojiHandler
- type EmojiInfo
- type EscapeHandler
- type ExpandHandler
- type FeedHandler
- type FeedInfo
- type HTMLEntityHandler
- type HTTPCodeHandler
- type Handler
- type HashHandler
- type HeadersHandler
- type IPHandler
- type JSONHandler
- type JWTHandler
- type ManHandler
- type ManOption
- type ManPageInfo
- type Manager
- type MathHandler
- type NPMPackage
- type NPMVersionInfo
- type NVDResponse
- type ParsedRobots
- type PasswordHandler
- type PkgHandler
- type PortHandler
- type PyPIPackage
- type QRHandler
- type RFCHandler
- type RFCInfo
- type RandomHandler
- type RedirectHop
- type RegexHandler
- type ResolveHandler
- type RobotDirective
- type RobotUserAgent
- type RobotsHandler
- type SafeHandler
- type SafetyCheck
- type SafetyResult
- type Sitemap
- type SitemapHandler
- type SitemapIndex
- type SitemapIndexFile
- type SitemapURL
- type SlugHandler
- type StopwatchHandler
- type SubnetHandler
- type SynonymHandler
- type TLDRHandler
- type TechHandler
- type TechInfo
- type TimeHandler
- type TimestampHandler
- type TimezoneHandler
- type URLHandler
- type UUIDHandler
- type UnicodeHandler
- type WHOISHandler
- type YAMLHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ASCIIHandler ¶
type ASCIIHandler struct {
// contains filtered or unexported fields
}
ASCIIHandler handles ASCII art text generation
func NewASCIIHandler ¶
func NewASCIIHandler() *ASCIIHandler
NewASCIIHandler creates a new ASCII art handler
func (*ASCIIHandler) CanHandle ¶
func (h *ASCIIHandler) CanHandle(query string) bool
func (*ASCIIHandler) Name ¶
func (h *ASCIIHandler) Name() string
func (*ASCIIHandler) Patterns ¶
func (h *ASCIIHandler) Patterns() []*regexp.Regexp
type ASNHandler ¶
type ASNHandler struct {
// contains filtered or unexported fields
}
ASNHandler handles Autonomous System Number lookups
func (*ASNHandler) CanHandle ¶
func (h *ASNHandler) CanHandle(query string) bool
func (*ASNHandler) Name ¶
func (h *ASNHandler) Name() string
func (*ASNHandler) Patterns ¶
func (h *ASNHandler) Patterns() []*regexp.Regexp
type Answer ¶
type Answer struct {
Type AnswerType `json:"type"`
Query string `json:"query"`
Title string `json:"title"`
Content string `json:"content"`
Data map[string]interface{} `json:"data,omitempty"`
Source string `json:"source,omitempty"`
SourceURL string `json:"source_url,omitempty"`
RelatedHTML string `json:"related_html,omitempty"`
}
Answer represents an instant answer result
type AnswerType ¶
type AnswerType string
AnswerType represents the type of instant answer
const ( AnswerTypeDefinition AnswerType = "definition" AnswerTypeDictionary AnswerType = "dictionary" AnswerTypeSynonym AnswerType = "synonym" AnswerTypeAntonym AnswerType = "antonym" AnswerTypeMath AnswerType = "math" AnswerTypeConvert AnswerType = "convert" AnswerTypeTime AnswerType = "time" AnswerTypeDate AnswerType = "date" AnswerTypeCalendar AnswerType = "calendar" AnswerTypeTimezone AnswerType = "timezone" AnswerTypeStopwatch AnswerType = "stopwatch" AnswerTypeIP AnswerType = "ip" AnswerTypeHash AnswerType = "hash" AnswerTypeBase64 AnswerType = "base64" AnswerTypeURL AnswerType = "url" AnswerTypeColor AnswerType = "color" AnswerTypeUUID AnswerType = "uuid" AnswerTypeRandom AnswerType = "random" AnswerTypePassword AnswerType = "password" AnswerTypeQR AnswerType = "qr" AnswerTypeASCII AnswerType = "ascii" AnswerTypeCase AnswerType = "case" AnswerTypeSlug AnswerType = "slug" AnswerTypeJSON AnswerType = "json" AnswerTypeYAML AnswerType = "yaml" AnswerTypeEscape AnswerType = "escape" AnswerTypeASN AnswerType = "asn" AnswerTypeWHOIS AnswerType = "whois" AnswerTypeDNS AnswerType = "dns" AnswerTypeBeautify AnswerType = "beautify" // Direct answer types (type:query pattern) AnswerTypeTLDR AnswerType = "tldr" AnswerTypeHTTPCode AnswerType = "httpcode" AnswerTypePort AnswerType = "port" AnswerTypeCron AnswerType = "cron" AnswerTypeChmod AnswerType = "chmod" AnswerTypeTimestamp AnswerType = "timestamp" AnswerTypeSubnet AnswerType = "subnet" AnswerTypeJWT AnswerType = "jwt" // Web analysis types AnswerTypeFeed AnswerType = "feed" AnswerTypeTech AnswerType = "tech" AnswerTypeSitemap AnswerType = "sitemap" AnswerTypeSafe AnswerType = "safe" AnswerTypeEmoji AnswerType = "emoji" AnswerTypeHTMLEntity AnswerType = "htmlentity" AnswerTypeUnicode AnswerType = "unicode" )
const AnswerTypeCVE AnswerType = "cve"
AnswerTypeCVE is the answer type for CVE lookups
const AnswerTypeCert AnswerType = "cert"
AnswerTypeCert is the answer type for certificate information
const AnswerTypeCheat AnswerType = "cheat"
AnswerTypeCheat is the answer type for cheatsheet lookups
const AnswerTypeExpand AnswerType = "expand"
AnswerTypeExpand is the answer type for URL expansion
const AnswerTypeHeaders AnswerType = "headers"
AnswerTypeHeaders is the answer type for HTTP headers analysis
const AnswerTypeMan AnswerType = "man"
AnswerTypeMan is the answer type for man page lookups
const AnswerTypePkg AnswerType = "pkg"
AnswerTypePkg is the answer type for package lookups
const AnswerTypeRFC AnswerType = "rfc"
AnswerTypeRFC is the answer type for RFC lookups
const AnswerTypeRegex AnswerType = "regex"
AnswerTypeRegex is the answer type for regex explanations
const AnswerTypeResolve AnswerType = "resolve"
AnswerTypeResolve is the answer type for DNS resolution
const AnswerTypeRobots AnswerType = "robots"
AnswerTypeRobots is the answer type for robots.txt analysis
type AntonymHandler ¶
type AntonymHandler struct {
// contains filtered or unexported fields
}
AntonymHandler handles antonym lookups
func NewAntonymHandler ¶
func NewAntonymHandler() *AntonymHandler
NewAntonymHandler creates a new antonym handler
func (*AntonymHandler) CanHandle ¶
func (h *AntonymHandler) CanHandle(query string) bool
func (*AntonymHandler) Name ¶
func (h *AntonymHandler) Name() string
func (*AntonymHandler) Patterns ¶
func (h *AntonymHandler) Patterns() []*regexp.Regexp
type Base64Handler ¶
type Base64Handler struct {
// contains filtered or unexported fields
}
Base64Handler handles base64 encoding/decoding
func NewBase64Handler ¶
func NewBase64Handler() *Base64Handler
func (*Base64Handler) CanHandle ¶
func (h *Base64Handler) CanHandle(query string) bool
func (*Base64Handler) Name ¶
func (h *Base64Handler) Name() string
func (*Base64Handler) Patterns ¶
func (h *Base64Handler) Patterns() []*regexp.Regexp
type BeautifyConfig ¶
BeautifyConfig holds beautification settings
func DefaultBeautifyConfig ¶
func DefaultBeautifyConfig() *BeautifyConfig
DefaultBeautifyConfig returns default beautification config
type BeautifyHandler ¶
type BeautifyHandler struct {
// contains filtered or unexported fields
}
BeautifyHandler handles code beautification queries
func NewBeautifyHandler ¶
func NewBeautifyHandler() *BeautifyHandler
NewBeautifyHandler creates a new code beautify handler
func (*BeautifyHandler) CanHandle ¶
func (h *BeautifyHandler) CanHandle(query string) bool
func (*BeautifyHandler) Name ¶
func (h *BeautifyHandler) Name() string
func (*BeautifyHandler) Patterns ¶
func (h *BeautifyHandler) Patterns() []*regexp.Regexp
type CVEHandler ¶
type CVEHandler struct {
// contains filtered or unexported fields
}
CVEHandler handles CVE (Common Vulnerabilities and Exposures) lookups
func (*CVEHandler) CanHandle ¶
func (h *CVEHandler) CanHandle(query string) bool
func (*CVEHandler) Name ¶
func (h *CVEHandler) Name() string
func (*CVEHandler) Patterns ¶
func (h *CVEHandler) Patterns() []*regexp.Regexp
type CVEItem ¶
type CVEItem struct {
ID string `json:"id"`
Published string `json:"published"`
LastModified string `json:"lastModified"`
Descriptions []struct {
Lang string `json:"lang"`
Value string `json:"value"`
} `json:"descriptions"`
Metrics struct {
CVSSMetricV31 []struct {
CVSSData struct {
Version string `json:"version"`
VectorString string `json:"vectorString"`
BaseScore float64 `json:"baseScore"`
BaseSeverity string `json:"baseSeverity"`
} `json:"cvssData"`
} `json:"cvssMetricV31"`
CVSSMetricV2 []struct {
CVSSData struct {
Version string `json:"version"`
VectorString string `json:"vectorString"`
BaseScore float64 `json:"baseScore"`
} `json:"cvssData"`
BaseSeverity string `json:"baseSeverity"`
} `json:"cvssMetricV2"`
} `json:"metrics"`
References []struct {
URL string `json:"url"`
Source string `json:"source"`
Tags []string `json:"tags"`
} `json:"references"`
}
type CalendarHandler ¶
type CalendarHandler struct {
// contains filtered or unexported fields
}
CalendarHandler handles date calculations and queries
func NewCalendarHandler ¶
func NewCalendarHandler() *CalendarHandler
NewCalendarHandler creates a new calendar handler
func (*CalendarHandler) CanHandle ¶
func (h *CalendarHandler) CanHandle(query string) bool
func (*CalendarHandler) Name ¶
func (h *CalendarHandler) Name() string
func (*CalendarHandler) Patterns ¶
func (h *CalendarHandler) Patterns() []*regexp.Regexp
type CaseHandler ¶
type CaseHandler struct {
// contains filtered or unexported fields
}
CaseHandler handles text case conversions
func NewCaseHandler ¶
func NewCaseHandler() *CaseHandler
NewCaseHandler creates a new case converter handler
func (*CaseHandler) CanHandle ¶
func (h *CaseHandler) CanHandle(query string) bool
func (*CaseHandler) Name ¶
func (h *CaseHandler) Name() string
func (*CaseHandler) Patterns ¶
func (h *CaseHandler) Patterns() []*regexp.Regexp
type CertHandler ¶
type CertHandler struct {
// contains filtered or unexported fields
}
CertHandler handles SSL certificate information queries
func NewCertHandler ¶
func NewCertHandler() *CertHandler
NewCertHandler creates a new certificate handler
func (*CertHandler) CanHandle ¶
func (h *CertHandler) CanHandle(query string) bool
func (*CertHandler) Name ¶
func (h *CertHandler) Name() string
func (*CertHandler) Patterns ¶
func (h *CertHandler) Patterns() []*regexp.Regexp
type CertInfo ¶
type CertInfo struct {
Subject string `json:"subject"`
Issuer string `json:"issuer"`
ValidFrom time.Time `json:"valid_from"`
ValidUntil time.Time `json:"valid_until"`
DaysLeft int `json:"days_left"`
IsValid bool `json:"is_valid"`
}
CertInfo represents SSL certificate information
type CheatHandler ¶
type CheatHandler struct {
// contains filtered or unexported fields
}
CheatHandler handles cheatsheet lookups from cheat.sh
func NewCheatHandler ¶
func NewCheatHandler() *CheatHandler
NewCheatHandler creates a new cheatsheet handler
func (*CheatHandler) CanHandle ¶
func (h *CheatHandler) CanHandle(query string) bool
func (*CheatHandler) Name ¶
func (h *CheatHandler) Name() string
func (*CheatHandler) Patterns ¶
func (h *CheatHandler) Patterns() []*regexp.Regexp
type ChmodHandler ¶
type ChmodHandler struct {
// contains filtered or unexported fields
}
ChmodHandler calculates Unix file permissions
func NewChmodHandler ¶
func NewChmodHandler() *ChmodHandler
NewChmodHandler creates a new chmod handler
func (*ChmodHandler) CanHandle ¶
func (h *ChmodHandler) CanHandle(query string) bool
func (*ChmodHandler) Name ¶
func (h *ChmodHandler) Name() string
func (*ChmodHandler) Patterns ¶
func (h *ChmodHandler) Patterns() []*regexp.Regexp
type ColorHandler ¶
type ColorHandler struct {
// contains filtered or unexported fields
}
ColorHandler handles color conversions
func NewColorHandler ¶
func NewColorHandler() *ColorHandler
func (*ColorHandler) CanHandle ¶
func (h *ColorHandler) CanHandle(query string) bool
func (*ColorHandler) Name ¶
func (h *ColorHandler) Name() string
func (*ColorHandler) Patterns ¶
func (h *ColorHandler) Patterns() []*regexp.Regexp
type ConvertHandler ¶
type ConvertHandler struct {
// contains filtered or unexported fields
}
ConvertHandler handles unit conversions
func NewConvertHandler ¶
func NewConvertHandler() *ConvertHandler
NewConvertHandler creates a new conversion handler
func (*ConvertHandler) CanHandle ¶
func (h *ConvertHandler) CanHandle(query string) bool
func (*ConvertHandler) Name ¶
func (h *ConvertHandler) Name() string
func (*ConvertHandler) Patterns ¶
func (h *ConvertHandler) Patterns() []*regexp.Regexp
type CronHandler ¶
type CronHandler struct {
// contains filtered or unexported fields
}
CronHandler explains cron expressions
func (*CronHandler) CanHandle ¶
func (h *CronHandler) CanHandle(query string) bool
func (*CronHandler) Name ¶
func (h *CronHandler) Name() string
func (*CronHandler) Patterns ¶
func (h *CronHandler) Patterns() []*regexp.Regexp
type DNSHandler ¶
type DNSHandler struct {
// contains filtered or unexported fields
}
DNSHandler handles DNS record lookups
func NewDNSHandler ¶
func NewDNSHandler() *DNSHandler
NewDNSHandler creates a new DNS lookup handler
func (*DNSHandler) CanHandle ¶
func (h *DNSHandler) CanHandle(query string) bool
func (*DNSHandler) Name ¶
func (h *DNSHandler) Name() string
func (*DNSHandler) Patterns ¶
func (h *DNSHandler) Patterns() []*regexp.Regexp
type DNSRecord ¶
type DNSRecord struct {
Type string `json:"type"`
Value string `json:"value"`
TTL int `json:"ttl,omitempty"`
}
DNSRecord represents a DNS record
type DefinitionHandler ¶
type DefinitionHandler struct {
// contains filtered or unexported fields
}
DefinitionHandler handles word definitions
func NewDefinitionHandler ¶
func NewDefinitionHandler() *DefinitionHandler
NewDefinitionHandler creates a new definition handler
func (*DefinitionHandler) CanHandle ¶
func (h *DefinitionHandler) CanHandle(query string) bool
func (*DefinitionHandler) Name ¶
func (h *DefinitionHandler) Name() string
func (*DefinitionHandler) Patterns ¶
func (h *DefinitionHandler) Patterns() []*regexp.Regexp
type DictionaryHandler ¶
type DictionaryHandler struct {
*DefinitionHandler
}
DictionaryHandler is an alias for DefinitionHandler with different patterns
func NewDictionaryHandler ¶
func NewDictionaryHandler() *DictionaryHandler
NewDictionaryHandler creates a new dictionary handler
func (*DictionaryHandler) Name ¶
func (h *DictionaryHandler) Name() string
type DirectAnswerManager ¶
type DirectAnswerManager struct {
// contains filtered or unexported fields
}
DirectAnswerManager handles "type:query" pattern instant answers
func NewDirectAnswerManager ¶
func NewDirectAnswerManager() *DirectAnswerManager
NewDirectAnswerManager creates a new direct answer manager with all handlers
func (*DirectAnswerManager) GetHandlers ¶
func (m *DirectAnswerManager) GetHandlers() []Handler
GetHandlers returns all registered handlers
func (*DirectAnswerManager) Process ¶
Process checks if query matches any direct answer and returns the result
func (*DirectAnswerManager) Register ¶
func (m *DirectAnswerManager) Register(h Handler)
Register adds a handler to the manager
type EmojiHandler ¶
type EmojiHandler struct {
// contains filtered or unexported fields
}
EmojiHandler handles emoji lookups by name/keyword
func NewEmojiHandler ¶
func NewEmojiHandler() *EmojiHandler
NewEmojiHandler creates a new emoji handler
func (*EmojiHandler) CanHandle ¶
func (h *EmojiHandler) CanHandle(query string) bool
func (*EmojiHandler) Name ¶
func (h *EmojiHandler) Name() string
func (*EmojiHandler) Patterns ¶
func (h *EmojiHandler) Patterns() []*regexp.Regexp
type EscapeHandler ¶
type EscapeHandler struct {
// contains filtered or unexported fields
}
EscapeHandler handles string escaping for various formats
func NewEscapeHandler ¶
func NewEscapeHandler() *EscapeHandler
NewEscapeHandler creates a new escape handler
func (*EscapeHandler) CanHandle ¶
func (h *EscapeHandler) CanHandle(query string) bool
func (*EscapeHandler) Name ¶
func (h *EscapeHandler) Name() string
func (*EscapeHandler) Patterns ¶
func (h *EscapeHandler) Patterns() []*regexp.Regexp
type ExpandHandler ¶
type ExpandHandler struct {
// contains filtered or unexported fields
}
ExpandHandler handles URL expansion by following redirects
func NewExpandHandler ¶
func NewExpandHandler() *ExpandHandler
NewExpandHandler creates a new URL expansion handler
func (*ExpandHandler) CanHandle ¶
func (h *ExpandHandler) CanHandle(query string) bool
func (*ExpandHandler) Name ¶
func (h *ExpandHandler) Name() string
func (*ExpandHandler) Patterns ¶
func (h *ExpandHandler) Patterns() []*regexp.Regexp
type FeedHandler ¶
type FeedHandler struct {
// contains filtered or unexported fields
}
FeedHandler discovers RSS/Atom feeds on a website
func NewFeedHandler ¶
func NewFeedHandler() *FeedHandler
NewFeedHandler creates a new feed discovery handler
func (*FeedHandler) CanHandle ¶
func (h *FeedHandler) CanHandle(query string) bool
func (*FeedHandler) Name ¶
func (h *FeedHandler) Name() string
func (*FeedHandler) Patterns ¶
func (h *FeedHandler) Patterns() []*regexp.Regexp
type FeedInfo ¶
type FeedInfo struct {
Title string `json:"title"`
URL string `json:"url"`
Type string `json:"type"` // "rss" or "atom"
}
FeedInfo represents a discovered feed
type HTMLEntityHandler ¶
type HTMLEntityHandler struct {
// contains filtered or unexported fields
}
HTMLEntityHandler handles HTML entity encoding/decoding
func NewHTMLEntityHandler ¶
func NewHTMLEntityHandler() *HTMLEntityHandler
NewHTMLEntityHandler creates a new HTML entity handler
func (*HTMLEntityHandler) CanHandle ¶
func (h *HTMLEntityHandler) CanHandle(query string) bool
func (*HTMLEntityHandler) Name ¶
func (h *HTMLEntityHandler) Name() string
func (*HTMLEntityHandler) Patterns ¶
func (h *HTMLEntityHandler) Patterns() []*regexp.Regexp
type HTTPCodeHandler ¶
type HTTPCodeHandler struct {
// contains filtered or unexported fields
}
HTTPCodeHandler explains HTTP status codes
func NewHTTPCodeHandler ¶
func NewHTTPCodeHandler() *HTTPCodeHandler
NewHTTPCodeHandler creates a new HTTP code handler
func (*HTTPCodeHandler) CanHandle ¶
func (h *HTTPCodeHandler) CanHandle(query string) bool
func (*HTTPCodeHandler) Name ¶
func (h *HTTPCodeHandler) Name() string
func (*HTTPCodeHandler) Patterns ¶
func (h *HTTPCodeHandler) Patterns() []*regexp.Regexp
type Handler ¶
type Handler interface {
// Name returns the handler name
Name() string
// Patterns returns regex patterns that trigger this handler
Patterns() []*regexp.Regexp
// CanHandle checks if query matches this handler
CanHandle(query string) bool
// Handle processes the query and returns an answer
Handle(ctx context.Context, query string) (*Answer, error)
}
Handler interface for instant answer handlers
type HashHandler ¶
type HashHandler struct {
// contains filtered or unexported fields
}
HashHandler handles hash generation
func NewHashHandler ¶
func NewHashHandler() *HashHandler
func (*HashHandler) CanHandle ¶
func (h *HashHandler) CanHandle(query string) bool
func (*HashHandler) Name ¶
func (h *HashHandler) Name() string
func (*HashHandler) Patterns ¶
func (h *HashHandler) Patterns() []*regexp.Regexp
type HeadersHandler ¶
type HeadersHandler struct {
// contains filtered or unexported fields
}
HeadersHandler handles HTTP response header queries
func NewHeadersHandler ¶
func NewHeadersHandler() *HeadersHandler
NewHeadersHandler creates a new headers handler
func (*HeadersHandler) CanHandle ¶
func (h *HeadersHandler) CanHandle(query string) bool
func (*HeadersHandler) Name ¶
func (h *HeadersHandler) Name() string
func (*HeadersHandler) Patterns ¶
func (h *HeadersHandler) Patterns() []*regexp.Regexp
type IPHandler ¶
type IPHandler struct {
// contains filtered or unexported fields
}
IPHandler handles IP address lookups
func NewIPHandler ¶
func NewIPHandler() *IPHandler
type JSONHandler ¶
type JSONHandler struct {
// contains filtered or unexported fields
}
JSONHandler handles JSON formatting and validation
func (*JSONHandler) CanHandle ¶
func (h *JSONHandler) CanHandle(query string) bool
func (*JSONHandler) Name ¶
func (h *JSONHandler) Name() string
func (*JSONHandler) Patterns ¶
func (h *JSONHandler) Patterns() []*regexp.Regexp
type JWTHandler ¶
type JWTHandler struct {
// contains filtered or unexported fields
}
JWTHandler decodes JWT tokens
func (*JWTHandler) CanHandle ¶
func (h *JWTHandler) CanHandle(query string) bool
func (*JWTHandler) Name ¶
func (h *JWTHandler) Name() string
func (*JWTHandler) Patterns ¶
func (h *JWTHandler) Patterns() []*regexp.Regexp
type ManHandler ¶
type ManHandler struct {
// contains filtered or unexported fields
}
ManHandler handles man page lookups using man.cx API
func (*ManHandler) CanHandle ¶
func (h *ManHandler) CanHandle(query string) bool
func (*ManHandler) Name ¶
func (h *ManHandler) Name() string
func (*ManHandler) Patterns ¶
func (h *ManHandler) Patterns() []*regexp.Regexp
type ManPageInfo ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages all instant answer handlers
func (*Manager) GetHandlers ¶
GetHandlers returns all registered handlers
type MathHandler ¶
type MathHandler struct {
// contains filtered or unexported fields
}
MathHandler handles mathematical expressions
func (*MathHandler) CanHandle ¶
func (h *MathHandler) CanHandle(query string) bool
func (*MathHandler) Name ¶
func (h *MathHandler) Name() string
func (*MathHandler) Patterns ¶
func (h *MathHandler) Patterns() []*regexp.Regexp
type NPMPackage ¶
type NPMPackage struct {
Name string `json:"name"`
Description string `json:"description"`
License string `json:"license"`
Homepage string `json:"homepage"`
DistTags struct {
Latest string `json:"latest"`
} `json:"dist-tags"`
Versions map[string]NPMVersionInfo `json:"versions"`
}
NPM response structures
type NPMVersionInfo ¶
type NVDResponse ¶
type NVDResponse struct {
ResultsPerPage int `json:"resultsPerPage"`
StartIndex int `json:"startIndex"`
TotalResults int `json:"totalResults"`
Vulnerabilities []struct {
CVE CVEItem `json:"cve"`
} `json:"vulnerabilities"`
}
NVD API response structures
type ParsedRobots ¶
type ParsedRobots struct {
UserAgents []RobotUserAgent
Sitemaps []string
}
ParsedRobots represents parsed robots.txt content
type PasswordHandler ¶
type PasswordHandler struct {
// contains filtered or unexported fields
}
PasswordHandler generates secure passwords
func NewPasswordHandler ¶
func NewPasswordHandler() *PasswordHandler
func (*PasswordHandler) CanHandle ¶
func (h *PasswordHandler) CanHandle(query string) bool
func (*PasswordHandler) Name ¶
func (h *PasswordHandler) Name() string
func (*PasswordHandler) Patterns ¶
func (h *PasswordHandler) Patterns() []*regexp.Regexp
type PkgHandler ¶
type PkgHandler struct {
// contains filtered or unexported fields
}
PkgHandler handles package information lookups from npm, PyPI, and pkg.go.dev
func (*PkgHandler) CanHandle ¶
func (h *PkgHandler) CanHandle(query string) bool
func (*PkgHandler) Name ¶
func (h *PkgHandler) Name() string
func (*PkgHandler) Patterns ¶
func (h *PkgHandler) Patterns() []*regexp.Regexp
type PortHandler ¶
type PortHandler struct {
// contains filtered or unexported fields
}
PortHandler looks up service information for port numbers
func (*PortHandler) CanHandle ¶
func (h *PortHandler) CanHandle(query string) bool
func (*PortHandler) Name ¶
func (h *PortHandler) Name() string
func (*PortHandler) Patterns ¶
func (h *PortHandler) Patterns() []*regexp.Regexp
type PyPIPackage ¶
type PyPIPackage struct {
Info struct {
Name string `json:"name"`
Version string `json:"version"`
Summary string `json:"summary"`
Description string `json:"description"`
License string `json:"license"`
Author string `json:"author"`
AuthorEmail string `json:"author_email"`
HomePage string `json:"home_page"`
ProjectURL string `json:"project_url"`
RequiresPython string `json:"requires_python"`
Keywords string `json:"keywords"`
} `json:"info"`
}
PyPI response structures
type QRHandler ¶
type QRHandler struct {
// contains filtered or unexported fields
}
QRHandler handles QR code generation
type RFCHandler ¶
type RFCHandler struct {
// contains filtered or unexported fields
}
RFCHandler handles RFC (Request for Comments) document lookups
func (*RFCHandler) CanHandle ¶
func (h *RFCHandler) CanHandle(query string) bool
func (*RFCHandler) Name ¶
func (h *RFCHandler) Name() string
func (*RFCHandler) Patterns ¶
func (h *RFCHandler) Patterns() []*regexp.Regexp
type RandomHandler ¶
type RandomHandler struct {
// contains filtered or unexported fields
}
RandomHandler generates random numbers
func NewRandomHandler ¶
func NewRandomHandler() *RandomHandler
func (*RandomHandler) CanHandle ¶
func (h *RandomHandler) CanHandle(query string) bool
func (*RandomHandler) Name ¶
func (h *RandomHandler) Name() string
func (*RandomHandler) Patterns ¶
func (h *RandomHandler) Patterns() []*regexp.Regexp
type RedirectHop ¶
type RedirectHop struct {
URL string `json:"url"`
StatusCode int `json:"status_code"`
Status string `json:"status"`
}
RedirectHop represents a single redirect in the chain
type RegexHandler ¶
type RegexHandler struct {
// contains filtered or unexported fields
}
RegexHandler handles regex pattern explanations and testing
func NewRegexHandler ¶
func NewRegexHandler() *RegexHandler
NewRegexHandler creates a new regex handler
func (*RegexHandler) CanHandle ¶
func (h *RegexHandler) CanHandle(query string) bool
func (*RegexHandler) Name ¶
func (h *RegexHandler) Name() string
func (*RegexHandler) Patterns ¶
func (h *RegexHandler) Patterns() []*regexp.Regexp
type ResolveHandler ¶
type ResolveHandler struct {
// contains filtered or unexported fields
}
ResolveHandler handles DNS resolution queries
func NewResolveHandler ¶
func NewResolveHandler() *ResolveHandler
NewResolveHandler creates a new DNS resolution handler
func (*ResolveHandler) CanHandle ¶
func (h *ResolveHandler) CanHandle(query string) bool
func (*ResolveHandler) Name ¶
func (h *ResolveHandler) Name() string
func (*ResolveHandler) Patterns ¶
func (h *ResolveHandler) Patterns() []*regexp.Regexp
type RobotDirective ¶
type RobotDirective struct {
Type string `json:"type"` // "allow", "disallow", "crawl-delay", "sitemap"
Value string `json:"value"` // the path or value
}
RobotDirective represents a parsed robots.txt directive
type RobotUserAgent ¶
type RobotUserAgent struct {
Agent string `json:"agent"`
Directives []RobotDirective `json:"directives"`
}
RobotUserAgent represents rules for a specific user agent
type RobotsHandler ¶
type RobotsHandler struct {
// contains filtered or unexported fields
}
RobotsHandler handles robots.txt fetching and parsing
func NewRobotsHandler ¶
func NewRobotsHandler() *RobotsHandler
NewRobotsHandler creates a new robots.txt handler
func (*RobotsHandler) CanHandle ¶
func (h *RobotsHandler) CanHandle(query string) bool
func (*RobotsHandler) Name ¶
func (h *RobotsHandler) Name() string
func (*RobotsHandler) Patterns ¶
func (h *RobotsHandler) Patterns() []*regexp.Regexp
type SafeHandler ¶
type SafeHandler struct {
// contains filtered or unexported fields
}
SafeHandler performs basic URL safety checks
func NewSafeHandler ¶
func NewSafeHandler() *SafeHandler
NewSafeHandler creates a new safety check handler
func (*SafeHandler) CanHandle ¶
func (h *SafeHandler) CanHandle(query string) bool
func (*SafeHandler) Name ¶
func (h *SafeHandler) Name() string
func (*SafeHandler) Patterns ¶
func (h *SafeHandler) Patterns() []*regexp.Regexp
type SafetyCheck ¶
type SafetyCheck struct {
Name string `json:"name"`
Status string `json:"status"` // "pass", "warn", "fail", "info"
Message string `json:"message"`
}
SafetyCheck represents a single safety check result
type SafetyResult ¶
type SafetyResult struct {
URL string `json:"url"`
Safe bool `json:"safe"`
Score int `json:"score"` // 0-100
Checks []SafetyCheck `json:"checks"`
Certificate *CertInfo `json:"certificate,omitempty"`
}
SafetyResult represents the overall safety assessment
type Sitemap ¶
type Sitemap struct {
XMLName xml.Name `xml:"urlset"`
URLs []SitemapURL `xml:"url"`
Sitemaps []SitemapIndex `xml:"sitemap"` // for sitemap index
}
Sitemap represents a parsed sitemap
type SitemapHandler ¶
type SitemapHandler struct {
// contains filtered or unexported fields
}
SitemapHandler parses and displays sitemap.xml contents
func NewSitemapHandler ¶
func NewSitemapHandler() *SitemapHandler
NewSitemapHandler creates a new sitemap handler
func (*SitemapHandler) CanHandle ¶
func (h *SitemapHandler) CanHandle(query string) bool
func (*SitemapHandler) Name ¶
func (h *SitemapHandler) Name() string
func (*SitemapHandler) Patterns ¶
func (h *SitemapHandler) Patterns() []*regexp.Regexp
type SitemapIndex ¶
type SitemapIndex struct {
Loc string `xml:"loc" json:"loc"`
LastMod string `xml:"lastmod" json:"lastmod,omitempty"`
}
SitemapIndex represents a sitemap index entry
type SitemapIndexFile ¶
type SitemapIndexFile struct {
XMLName xml.Name `xml:"sitemapindex"`
Sitemaps []SitemapIndex `xml:"sitemap"`
}
SitemapIndexFile represents a sitemap index file
type SitemapURL ¶
type SitemapURL struct {
Loc string `xml:"loc" json:"loc"`
LastMod string `xml:"lastmod" json:"lastmod,omitempty"`
ChangeFreq string `xml:"changefreq" json:"changefreq,omitempty"`
Priority string `xml:"priority" json:"priority,omitempty"`
}
SitemapURL represents a URL entry in a sitemap
type SlugHandler ¶
type SlugHandler struct {
// contains filtered or unexported fields
}
SlugHandler handles URL slug generation
func (*SlugHandler) CanHandle ¶
func (h *SlugHandler) CanHandle(query string) bool
func (*SlugHandler) Name ¶
func (h *SlugHandler) Name() string
func (*SlugHandler) Patterns ¶
func (h *SlugHandler) Patterns() []*regexp.Regexp
type StopwatchHandler ¶
type StopwatchHandler struct {
// contains filtered or unexported fields
}
StopwatchHandler handles timer and stopwatch queries
func NewStopwatchHandler ¶
func NewStopwatchHandler() *StopwatchHandler
NewStopwatchHandler creates a new stopwatch handler
func (*StopwatchHandler) CanHandle ¶
func (h *StopwatchHandler) CanHandle(query string) bool
func (*StopwatchHandler) Name ¶
func (h *StopwatchHandler) Name() string
func (*StopwatchHandler) Patterns ¶
func (h *StopwatchHandler) Patterns() []*regexp.Regexp
type SubnetHandler ¶
type SubnetHandler struct {
// contains filtered or unexported fields
}
SubnetHandler calculates CIDR subnet information
func NewSubnetHandler ¶
func NewSubnetHandler() *SubnetHandler
NewSubnetHandler creates a new subnet handler
func (*SubnetHandler) CanHandle ¶
func (h *SubnetHandler) CanHandle(query string) bool
func (*SubnetHandler) Name ¶
func (h *SubnetHandler) Name() string
func (*SubnetHandler) Patterns ¶
func (h *SubnetHandler) Patterns() []*regexp.Regexp
type SynonymHandler ¶
type SynonymHandler struct {
// contains filtered or unexported fields
}
SynonymHandler handles synonym lookups
func NewSynonymHandler ¶
func NewSynonymHandler() *SynonymHandler
NewSynonymHandler creates a new synonym handler
func (*SynonymHandler) CanHandle ¶
func (h *SynonymHandler) CanHandle(query string) bool
func (*SynonymHandler) Name ¶
func (h *SynonymHandler) Name() string
func (*SynonymHandler) Patterns ¶
func (h *SynonymHandler) Patterns() []*regexp.Regexp
type TLDRHandler ¶
type TLDRHandler struct {
// contains filtered or unexported fields
}
TLDRHandler fetches command summaries from tldr.sh
func (*TLDRHandler) CanHandle ¶
func (h *TLDRHandler) CanHandle(query string) bool
func (*TLDRHandler) Name ¶
func (h *TLDRHandler) Name() string
func (*TLDRHandler) Patterns ¶
func (h *TLDRHandler) Patterns() []*regexp.Regexp
type TechHandler ¶
type TechHandler struct {
// contains filtered or unexported fields
}
TechHandler detects technology stack of a website
func NewTechHandler ¶
func NewTechHandler() *TechHandler
NewTechHandler creates a new technology detection handler
func (*TechHandler) CanHandle ¶
func (h *TechHandler) CanHandle(query string) bool
func (*TechHandler) Name ¶
func (h *TechHandler) Name() string
func (*TechHandler) Patterns ¶
func (h *TechHandler) Patterns() []*regexp.Regexp
type TechInfo ¶
type TechInfo struct {
Name string `json:"name"`
Category string `json:"category"`
Version string `json:"version,omitempty"`
Evidence string `json:"evidence,omitempty"`
}
TechInfo represents a detected technology
type TimeHandler ¶
type TimeHandler struct {
// contains filtered or unexported fields
}
TimeHandler handles time/date queries
func NewTimeHandler ¶
func NewTimeHandler() *TimeHandler
func (*TimeHandler) CanHandle ¶
func (h *TimeHandler) CanHandle(query string) bool
func (*TimeHandler) Name ¶
func (h *TimeHandler) Name() string
func (*TimeHandler) Patterns ¶
func (h *TimeHandler) Patterns() []*regexp.Regexp
type TimestampHandler ¶
type TimestampHandler struct {
// contains filtered or unexported fields
}
TimestampHandler converts Unix timestamps
func NewTimestampHandler ¶
func NewTimestampHandler() *TimestampHandler
NewTimestampHandler creates a new timestamp handler
func (*TimestampHandler) CanHandle ¶
func (h *TimestampHandler) CanHandle(query string) bool
func (*TimestampHandler) Name ¶
func (h *TimestampHandler) Name() string
func (*TimestampHandler) Patterns ¶
func (h *TimestampHandler) Patterns() []*regexp.Regexp
type TimezoneHandler ¶
type TimezoneHandler struct {
// contains filtered or unexported fields
}
TimezoneHandler handles timezone queries and conversions
func NewTimezoneHandler ¶
func NewTimezoneHandler() *TimezoneHandler
NewTimezoneHandler creates a new timezone handler
func (*TimezoneHandler) CanHandle ¶
func (h *TimezoneHandler) CanHandle(query string) bool
func (*TimezoneHandler) Name ¶
func (h *TimezoneHandler) Name() string
func (*TimezoneHandler) Patterns ¶
func (h *TimezoneHandler) Patterns() []*regexp.Regexp
type URLHandler ¶
type URLHandler struct {
// contains filtered or unexported fields
}
URLHandler handles URL encoding/decoding and parsing
func NewURLHandler ¶
func NewURLHandler() *URLHandler
func (*URLHandler) CanHandle ¶
func (h *URLHandler) CanHandle(query string) bool
func (*URLHandler) Name ¶
func (h *URLHandler) Name() string
func (*URLHandler) Patterns ¶
func (h *URLHandler) Patterns() []*regexp.Regexp
type UUIDHandler ¶
type UUIDHandler struct {
// contains filtered or unexported fields
}
UUIDHandler generates UUIDs
func NewUUIDHandler ¶
func NewUUIDHandler() *UUIDHandler
func (*UUIDHandler) CanHandle ¶
func (h *UUIDHandler) CanHandle(query string) bool
func (*UUIDHandler) Name ¶
func (h *UUIDHandler) Name() string
func (*UUIDHandler) Patterns ¶
func (h *UUIDHandler) Patterns() []*regexp.Regexp
type UnicodeHandler ¶
type UnicodeHandler struct {
// contains filtered or unexported fields
}
UnicodeHandler handles unicode character lookups
func NewUnicodeHandler ¶
func NewUnicodeHandler() *UnicodeHandler
NewUnicodeHandler creates a new unicode handler
func (*UnicodeHandler) CanHandle ¶
func (h *UnicodeHandler) CanHandle(query string) bool
func (*UnicodeHandler) Name ¶
func (h *UnicodeHandler) Name() string
func (*UnicodeHandler) Patterns ¶
func (h *UnicodeHandler) Patterns() []*regexp.Regexp
type WHOISHandler ¶
type WHOISHandler struct {
// contains filtered or unexported fields
}
WHOISHandler handles domain WHOIS lookups
func NewWHOISHandler ¶
func NewWHOISHandler() *WHOISHandler
NewWHOISHandler creates a new WHOIS handler
func (*WHOISHandler) CanHandle ¶
func (h *WHOISHandler) CanHandle(query string) bool
func (*WHOISHandler) Name ¶
func (h *WHOISHandler) Name() string
func (*WHOISHandler) Patterns ¶
func (h *WHOISHandler) Patterns() []*regexp.Regexp
type YAMLHandler ¶
type YAMLHandler struct {
// contains filtered or unexported fields
}
YAMLHandler handles YAML formatting and conversion
func (*YAMLHandler) CanHandle ¶
func (h *YAMLHandler) CanHandle(query string) bool
func (*YAMLHandler) Name ¶
func (h *YAMLHandler) Name() string
func (*YAMLHandler) Patterns ¶
func (h *YAMLHandler) Patterns() []*regexp.Regexp
Source Files
¶
- ascii.go
- asn.go
- beautify.go
- calendar.go
- case.go
- cert.go
- cheat.go
- convert.go
- cve.go
- definition.go
- direct.go
- dns_handler.go
- emoji.go
- escape.go
- expand.go
- feed.go
- headers.go
- html_entity.go
- instant.go
- json_handler.go
- man.go
- math.go
- pkg.go
- qr.go
- regex.go
- resolve.go
- rfc.go
- robots.go
- safe.go
- sitemap.go
- slug.go
- stopwatch.go
- synonym.go
- tech.go
- timezone.go
- unicode.go
- utils.go
- whois.go
- yaml_handler.go