Documentation
¶
Index ¶
- Constants
- func Batch[T any](c *Client, tasks []BatchTask[T], opts ...BatchOption) ([]mo.Result[T], error)
- func BatchResultToRaw(r mo.Result[*Response]) *json.RawMessage
- func GetLast7Days(t time.Time) (days []string)
- func GetToday() time.Time
- func PrefixedPath(path string) string
- func SetHost(host string)
- type BatchOption
- type BatchOptions
- type BatchTask
- type ChannelOption
- func WithChannelEmailAddresses(emailAddresses []string) ChannelOption
- func WithChannelFrequency(frequency string) ChannelOption
- func WithChannelIgnoreTime(ignoreTime bool) ChannelOption
- func WithChannelIsActive(isActive bool) ChannelOption
- func WithChannelIsDefault(isDefault bool) ChannelOption
- func WithChannelName(name string) ChannelOption
- func WithChannelPermissions(permissions []string) ChannelOption
- func WithChannelType(channelType string) ChannelOption
- func WithChannelUTCTime(utcTime string) ChannelOption
- func WithChannelWebhookURL(webhookURL string) ChannelOption
- func WithChannelWeekDays(weekDays []string) ChannelOption
- type ChannelOptions
- type Client
- func (c *Client) BulkGetDataDumpList(path string) (*DataDumpList, error)
- func (c *Client) CreateChannel(opts ...ChannelOption) (*Response, error)
- func (c *Client) CreateIncident(opts ...IncidentOption) (*Response, error)
- func (c *Client) CreateSavedSearch(opts ...SavedSearchOption) (*Response, error)
- func (c *Client) CreateSubscription(opts ...SubscriptionOption) (*Response, error)
- func (c *Client) Do(r *Request) (resp *Response, err error)
- func (c *Client) Download(path, output string) (n int64, err error)
- func (c *Client) GetDataDumpList(path string) (*DataDumpList, error)
- func (c *Client) GetResult(uuid string) (*Response, error)
- func (c *Client) IterateHostname(hostname string, opts ...HostnameIteratorOption) (*HostnameIterator, error)
- func (c *Client) NewBatchScanTask(url string, opts ...ScanOption) BatchTask[*Response]
- func (c *Client) NewBatchScanWithWaitTask(url string, maxWait int, opts ...ScanOption) BatchTask[*Response]
- func (c *Client) NewRequest() *Request
- func (c *Client) NewScanRequest(url string, opts ...ScanOption) *Request
- func (c *Client) Scan(url string, options ...ScanOption) (*ScanResult, error)
- func (c *Client) Search(q string, options ...IteratorOption) (*Iterator, error)
- func (c *Client) SetAPIKey(key string) *Client
- func (c *Client) SetAgent(agent string) *Client
- func (c *Client) SetBaseURL(url *url.URL) *Client
- func (c *Client) SetDisableCompression(disable bool) *Client
- func (c *Client) SetRetryTransport() *Client
- func (c *Client) SetTransport(transport http.RoundTripper) *Client
- func (c *Client) StoreLiveScanResult(scannerId string, scanId string, opts ...LiveScanStoreOption) (*Response, error)
- func (c *Client) StructureSearch(uuid string, options ...IteratorOption) (*Iterator, error)
- func (c *Client) TriggerLiveScan(id string, opts ...LiveScanOption) (*Response, error)
- func (c *Client) TriggerNonBlockingLiveScan(id string, opts ...LiveScanOption) (*Response, error)
- func (c *Client) URL(path string) (*url.URL, error)
- func (c *Client) UpdateChannel(id string, opts ...ChannelOption) (*Response, error)
- func (c *Client) UpdateIncident(id string, opts ...IncidentOption) (*Response, error)
- func (c *Client) UpdateSavedSearch(id string, opts ...SavedSearchOption) (*Response, error)
- func (c *Client) UpdateSubscription(id string, opts ...SubscriptionOption) (*Response, error)
- func (c *Client) WaitAndGetResult(ctx context.Context, uuid string, maxWait int) (*Response, error)
- type DataDumpFile
- type DataDumpList
- type GetContentFn
- type HostnameIterator
- type HostnameIteratorOption
- type HostnameResults
- type IncidentOption
- func WithIncidentChannels(channels []string) IncidentOption
- func WithIncidentCountries(countries []string) IncidentOption
- func WithIncidentCountriesPerInterval(countriesPerInterval int) IncidentOption
- func WithIncidentExpireAfter(expireAfter int) IncidentOption
- func WithIncidentExpireAt(expireAt string) IncidentOption
- func WithIncidentObservable(observable string) IncidentOption
- func WithIncidentProfile(incidentProfile string) IncidentOption
- func WithIncidentScanInterval(scanInterval int) IncidentOption
- func WithIncidentScanIntervalAfterMalicious(scanIntervalAfterMalicious int) IncidentOption
- func WithIncidentScanIntervalAfterSuspended(scanIntervalAfterSuspended int) IncidentOption
- func WithIncidentScanIntervalMode(scanIntervalMode string) IncidentOption
- func WithIncidentStopDelayInactive(stopDelayInactive int) IncidentOption
- func WithIncidentStopDelayMalicious(stopDelayMalicious int) IncidentOption
- func WithIncidentStopDelaySuspended(stopDelaySuspended int) IncidentOption
- func WithIncidentUserAgents(userAgents []string) IncidentOption
- func WithIncidentUserAgentsPerInterval(userAgentsPerInterval int) IncidentOption
- func WithIncidentVisibility(visibility string) IncidentOption
- func WithIncidentWatchedAttributes(watchedAttributes []string) IncidentOption
- type IncidentOptions
- type Iterator
- type IteratorOption
- func IteratorAll(all bool) IteratorOption
- func IteratorCollapse(collapse string) IteratorOption
- func IteratorDatasource(datasource string) IteratorOption
- func IteratorLimit(n int) IteratorOption
- func IteratorQuery(q string) IteratorOption
- func IteratorSearchAfter(searchAfter string) IteratorOption
- func IteratorSize(n int) IteratorOption
- type JSONError
- type LiveScanOption
- func WithLiveScanScannerCaptureDelay(delay int) LiveScanOption
- func WithLiveScanScannerDisableFeatures(features []string) LiveScanOption
- func WithLiveScanScannerEnableFeatures(features []string) LiveScanOption
- func WithLiveScanScannerExtraHeaders(headers map[string]string) LiveScanOption
- func WithLiveScanScannerPageTimeout(timeout int) LiveScanOption
- func WithLiveScanTaskURL(url string) LiveScanOption
- func WithLiveScanTaskVisibility(visibility string) LiveScanOption
- type LiveScanOptions
- type LiveScanStoreOption
- type LiveScanStoreOptions
- type Request
- func (r *Request) Delete(path string) (*Response, error)
- func (r *Request) Do() (resp *Response, err error)
- func (r *Request) Get(path string) (*Response, error)
- func (r *Request) Post(path string) (*Response, error)
- func (r *Request) Put(path string) (*Response, error)
- func (r *Request) Send(method, path string) (*Response, error)
- func (r *Request) SetBodyBytes(body []byte) *Request
- func (r *Request) SetBodyJSONBytes(body []byte) *Request
- func (r *Request) SetBodyString(body string) *Request
- func (r *Request) SetContentType(contentType string) *Request
- func (r *Request) SetContext(ctx context.Context) *Request
- func (r *Request) SetHeader(key, value string) *Request
- func (r *Request) SetHeaders(headers map[string]string) *Request
- func (r *Request) SetMethod(method string) *Request
- func (r *Request) SetPath(path string) *Request
- func (r *Request) SetQueryParam(key, value string) *Request
- func (r *Request) SetQueryParams(params map[string]string) *Request
- type Response
- func (r *Response) Error() error
- func (r *Response) GetContentType() string
- func (r *Response) IsError() bool
- func (r *Response) IsSuccess() bool
- func (r *Response) PrettyJSON() string
- func (r *Response) ToBytes() (body []byte, err error)
- func (r *Response) ToJSON() (*json.RawMessage, error)
- func (r *Response) ToString() (string, error)
- func (r *Response) Unmarshal(v any) error
- type RetryTransport
- type SavedSearchOption
- func WithSavedSearchDatasource(datasource string) SavedSearchOption
- func WithSavedSearchDescription(description string) SavedSearchOption
- func WithSavedSearchLongDescription(longDescription string) SavedSearchOption
- func WithSavedSearchName(name string) SavedSearchOption
- func WithSavedSearchOwnerDescription(ownerDescription string) SavedSearchOption
- func WithSavedSearchPass(pass int) SavedSearchOption
- func WithSavedSearchPermissions(permissions []string) SavedSearchOption
- func WithSavedSearchQuery(query string) SavedSearchOption
- func WithSavedSearchTLP(tlp string) SavedSearchOption
- func WithSavedSearchTags(tags []string) SavedSearchOption
- func WithSavedSearchUserTags(userTags []string) SavedSearchOption
- type SavedSearchOptions
- type ScanOption
- func WithScanCountry(country string) ScanOption
- func WithScanCustomAgent(customAgent string) ScanOption
- func WithScanOverrideSafety(overrideSafety string) ScanOption
- func WithScanReferer(referer string) ScanOption
- func WithScanTags(tags []string) ScanOption
- func WithScanVisibility(visibility string) ScanOption
- type ScanOptions
- type ScanResult
- type SearchResult
- type SearchResults
- type SubscriptionOption
- func WithSubscriptionDescription(description string) SubscriptionOption
- func WithSubscriptionEmailAddresses(emailAddresses []string) SubscriptionOption
- func WithSubscriptionFrequency(frequency string) SubscriptionOption
- func WithSubscriptionIgnoreTime(ignoreTime bool) SubscriptionOption
- func WithSubscriptionIsActive(isActive bool) SubscriptionOption
- func WithSubscriptionName(name string) SubscriptionOption
- func WithSubscriptionSearchIds(searchIds []string) SubscriptionOption
- type SubscriptionOptions
Constants ¶
View Source
const MaxTotal = 10_000
Variables ¶
This section is empty.
Functions ¶
func BatchResultToRaw ¶
func BatchResultToRaw(r mo.Result[*Response]) *json.RawMessage
func GetLast7Days ¶ added in v0.0.5
func PrefixedPath ¶
Types ¶
type BatchOption ¶
type BatchOption func(*BatchOptions)
func WithBatchMaxConcurrency ¶
func WithBatchMaxConcurrency(max int) BatchOption
func WithBatchTimeout ¶
func WithBatchTimeout(timeout int) BatchOption
type BatchOptions ¶
type ChannelOption ¶ added in v0.0.4
type ChannelOption func(*ChannelOptions)
func WithChannelEmailAddresses ¶ added in v0.0.4
func WithChannelEmailAddresses(emailAddresses []string) ChannelOption
func WithChannelFrequency ¶ added in v0.0.4
func WithChannelFrequency(frequency string) ChannelOption
func WithChannelIgnoreTime ¶ added in v0.0.4
func WithChannelIgnoreTime(ignoreTime bool) ChannelOption
func WithChannelIsActive ¶ added in v0.0.4
func WithChannelIsActive(isActive bool) ChannelOption
func WithChannelIsDefault ¶ added in v0.0.4
func WithChannelIsDefault(isDefault bool) ChannelOption
func WithChannelName ¶ added in v0.0.4
func WithChannelName(name string) ChannelOption
func WithChannelPermissions ¶ added in v0.0.4
func WithChannelPermissions(permissions []string) ChannelOption
func WithChannelType ¶ added in v0.0.4
func WithChannelType(channelType string) ChannelOption
func WithChannelUTCTime ¶ added in v0.0.4
func WithChannelUTCTime(utcTime string) ChannelOption
func WithChannelWebhookURL ¶ added in v0.0.4
func WithChannelWebhookURL(webhookURL string) ChannelOption
func WithChannelWeekDays ¶ added in v0.0.4
func WithChannelWeekDays(weekDays []string) ChannelOption
type ChannelOptions ¶ added in v0.0.4
type ChannelOptions struct {
Channel struct {
Type string `json:"type"`
Name string `json:"name"`
WebhookURL string `json:"webhookURL,omitempty"`
Frequency string `json:"frequency,omitempty"`
EmailAddresses []string `json:"emailAddresses,omitempty"`
UTCTime string `json:"utcTime,omitempty"`
IsActive bool `json:"isActive,omitempty"`
IsDefault bool `json:"isDefault,omitempty"`
IgnoreTime bool `json:"ignoreTime,omitempty"`
WeekDays []string `json:"weekDays,omitempty"`
Permissions []string `json:"permissions,omitempty"`
} `json:"channel"`
}
type Client ¶
type Client struct {
APIKey string
Agent string
Err error
BaseURL *url.URL
// contains filtered or unexported fields
}
func (*Client) BulkGetDataDumpList ¶ added in v0.0.5
func (c *Client) BulkGetDataDumpList(path string) (*DataDumpList, error)
func (*Client) CreateChannel ¶ added in v0.0.4
func (c *Client) CreateChannel(opts ...ChannelOption) (*Response, error)
func (*Client) CreateIncident ¶
func (c *Client) CreateIncident(opts ...IncidentOption) (*Response, error)
func (*Client) CreateSavedSearch ¶
func (c *Client) CreateSavedSearch(opts ...SavedSearchOption) (*Response, error)
func (*Client) CreateSubscription ¶
func (c *Client) CreateSubscription(opts ...SubscriptionOption) (*Response, error)
func (*Client) GetDataDumpList ¶ added in v0.0.5
func (c *Client) GetDataDumpList(path string) (*DataDumpList, error)
func (*Client) IterateHostname ¶
func (c *Client) IterateHostname(hostname string, opts ...HostnameIteratorOption) (*HostnameIterator, error)
func (*Client) NewBatchScanTask ¶
func (c *Client) NewBatchScanTask(url string, opts ...ScanOption) BatchTask[*Response]
func (*Client) NewBatchScanWithWaitTask ¶
func (*Client) NewRequest ¶
func (*Client) NewScanRequest ¶
func (c *Client) NewScanRequest(url string, opts ...ScanOption) *Request
func (*Client) Scan ¶
func (c *Client) Scan(url string, options ...ScanOption) (*ScanResult, error)
func (*Client) Search ¶
func (c *Client) Search(q string, options ...IteratorOption) (*Iterator, error)
func (*Client) SetDisableCompression ¶ added in v0.0.5
func (*Client) SetRetryTransport ¶
func (*Client) SetTransport ¶
func (c *Client) SetTransport(transport http.RoundTripper) *Client
func (*Client) StoreLiveScanResult ¶
func (*Client) StructureSearch ¶
func (c *Client) StructureSearch(uuid string, options ...IteratorOption) (*Iterator, error)
func (*Client) TriggerLiveScan ¶
func (c *Client) TriggerLiveScan(id string, opts ...LiveScanOption) (*Response, error)
func (*Client) TriggerNonBlockingLiveScan ¶
func (c *Client) TriggerNonBlockingLiveScan(id string, opts ...LiveScanOption) (*Response, error)
func (*Client) UpdateChannel ¶ added in v0.0.4
func (c *Client) UpdateChannel(id string, opts ...ChannelOption) (*Response, error)
func (*Client) UpdateIncident ¶
func (c *Client) UpdateIncident(id string, opts ...IncidentOption) (*Response, error)
func (*Client) UpdateSavedSearch ¶
func (c *Client) UpdateSavedSearch(id string, opts ...SavedSearchOption) (*Response, error)
func (*Client) UpdateSubscription ¶
func (c *Client) UpdateSubscription(id string, opts ...SubscriptionOption) (*Response, error)
type DataDumpFile ¶ added in v0.0.5
type DataDumpList ¶ added in v0.0.5
type DataDumpList struct {
Files []DataDumpFile `json:"files"`
Raw json.RawMessage `json:"-"`
}
func (*DataDumpList) PrettyJSON ¶ added in v0.0.5
func (r *DataDumpList) PrettyJSON() string
func (*DataDumpList) UnmarshalJSON ¶ added in v0.0.5
func (r *DataDumpList) UnmarshalJSON(data []byte) error
type GetContentFn ¶
type GetContentFn func() (io.ReadCloser, error)
type HostnameIterator ¶
type HostnameIterator struct {
PageState string
HasMore bool
// contains filtered or unexported fields
}
func (*HostnameIterator) Iterate ¶
func (it *HostnameIterator) Iterate() iter.Seq2[*json.RawMessage, error]
type HostnameIteratorOption ¶
type HostnameIteratorOption func(*HostnameIterator) error
func HostnameIteratorAll ¶
func HostnameIteratorAll(all bool) HostnameIteratorOption
func HostnameIteratorLimit ¶
func HostnameIteratorLimit(limit int) HostnameIteratorOption
limit is the maximum number of results that will be returned by the iterator. note that this is not the same as the API endpoint's "limit" query parameter.
func HostnameIteratorPageState ¶
func HostnameIteratorPageState(pageState string) HostnameIteratorOption
func HostnameIteratorSize ¶
func HostnameIteratorSize(size int) HostnameIteratorOption
size is the number of results returned by the iterator in each batch.
type HostnameResults ¶
type HostnameResults struct {
Item string `json:"item"`
Results []json.RawMessage `json:"results"`
PageState string `json:"pageState"`
Raw json.RawMessage `json:"-"`
}
func (*HostnameResults) UnmarshalJSON ¶
func (r *HostnameResults) UnmarshalJSON(data []byte) error
type IncidentOption ¶
type IncidentOption func(*IncidentOptions)
func WithIncidentChannels ¶
func WithIncidentChannels(channels []string) IncidentOption
func WithIncidentCountries ¶
func WithIncidentCountries(countries []string) IncidentOption
func WithIncidentCountriesPerInterval ¶
func WithIncidentCountriesPerInterval(countriesPerInterval int) IncidentOption
func WithIncidentExpireAfter ¶
func WithIncidentExpireAfter(expireAfter int) IncidentOption
func WithIncidentExpireAt ¶
func WithIncidentExpireAt(expireAt string) IncidentOption
func WithIncidentObservable ¶
func WithIncidentObservable(observable string) IncidentOption
func WithIncidentProfile ¶
func WithIncidentProfile(incidentProfile string) IncidentOption
func WithIncidentScanInterval ¶
func WithIncidentScanInterval(scanInterval int) IncidentOption
func WithIncidentScanIntervalAfterMalicious ¶
func WithIncidentScanIntervalAfterMalicious(scanIntervalAfterMalicious int) IncidentOption
func WithIncidentScanIntervalAfterSuspended ¶
func WithIncidentScanIntervalAfterSuspended(scanIntervalAfterSuspended int) IncidentOption
func WithIncidentScanIntervalMode ¶
func WithIncidentScanIntervalMode(scanIntervalMode string) IncidentOption
func WithIncidentStopDelayInactive ¶
func WithIncidentStopDelayInactive(stopDelayInactive int) IncidentOption
func WithIncidentStopDelayMalicious ¶
func WithIncidentStopDelayMalicious(stopDelayMalicious int) IncidentOption
func WithIncidentStopDelaySuspended ¶
func WithIncidentStopDelaySuspended(stopDelaySuspended int) IncidentOption
func WithIncidentUserAgents ¶
func WithIncidentUserAgents(userAgents []string) IncidentOption
func WithIncidentUserAgentsPerInterval ¶
func WithIncidentUserAgentsPerInterval(userAgentsPerInterval int) IncidentOption
func WithIncidentVisibility ¶
func WithIncidentVisibility(visibility string) IncidentOption
func WithIncidentWatchedAttributes ¶
func WithIncidentWatchedAttributes(watchedAttributes []string) IncidentOption
type IncidentOptions ¶
type IncidentOptions struct {
Incident struct {
// common options
ExpireAfter int `json:"expireAfter"`
ScanInterval int `json:"scanInterval"`
ScanIntervalMode string `json:"scanIntervalMode"`
WatchedAttributes []string `json:"watchedAttributes"`
UserAgents []string `json:"userAgents"`
UserAgentsPerInterval int `json:"userAgentsPerInterval"`
Countries []string `json:"countries"`
CountriesPerInterval int `json:"countriesPerInterval"`
StopDelaySuspended int `json:"stopDelaySuspended"`
StopDelayInactive int `json:"stopDelayInactive"`
StopDelayMalicious int `json:"stopDelayMalicious"`
ScanIntervalAfterSuspended int `json:"scanIntervalAfterSuspended"`
ScanIntervalAfterMalicious int `json:"scanIntervalAfterMalicious"`
// common fields
Visibility string `json:"visibility"`
IncidentProfile string `json:"incidentProfile,omitempty"`
ExpireAt string `json:"expireAt,omitempty"`
// create & updated fields
Channels []string `json:"channels"`
Observable string `json:"observable"`
} `json:"incident"`
}
type IteratorOption ¶
func IteratorAll ¶
func IteratorAll(all bool) IteratorOption
func IteratorCollapse ¶ added in v0.0.5
func IteratorCollapse(collapse string) IteratorOption
func IteratorDatasource ¶
func IteratorDatasource(datasource string) IteratorOption
func IteratorLimit ¶
func IteratorLimit(n int) IteratorOption
func IteratorQuery ¶
func IteratorQuery(q string) IteratorOption
func IteratorSearchAfter ¶
func IteratorSearchAfter(searchAfter string) IteratorOption
func IteratorSize ¶
func IteratorSize(n int) IteratorOption
type JSONError ¶
type JSONError struct {
Status int `json:"status,omitempty"`
Message string `json:"message"`
Description string `json:"description,omitempty"`
Raw json.RawMessage `json:"-"`
}
func (*JSONError) UnmarshalJSON ¶
type LiveScanOption ¶
type LiveScanOption func(*LiveScanOptions)
func WithLiveScanScannerCaptureDelay ¶
func WithLiveScanScannerCaptureDelay(delay int) LiveScanOption
func WithLiveScanScannerDisableFeatures ¶
func WithLiveScanScannerDisableFeatures(features []string) LiveScanOption
func WithLiveScanScannerEnableFeatures ¶
func WithLiveScanScannerEnableFeatures(features []string) LiveScanOption
func WithLiveScanScannerExtraHeaders ¶
func WithLiveScanScannerExtraHeaders(headers map[string]string) LiveScanOption
func WithLiveScanScannerPageTimeout ¶
func WithLiveScanScannerPageTimeout(timeout int) LiveScanOption
func WithLiveScanTaskURL ¶
func WithLiveScanTaskURL(url string) LiveScanOption
func WithLiveScanTaskVisibility ¶
func WithLiveScanTaskVisibility(visibility string) LiveScanOption
type LiveScanOptions ¶
type LiveScanOptions struct {
Task struct {
URL string `json:"url"`
Visibility string `json:"visibility"`
} `json:"task"`
Scanner struct {
PageTimeout int `json:"pageTimeout"`
CaptureDelay int `json:"captureDelay"`
ExtraHeaders map[string]string `json:"extraHeaders,omitempty"`
EnableFeatures []string `json:"enableFeatures,omitempty"`
DisableFeatures []string `json:"disableFeatures,omitempty"`
} `json:"scanner"`
}
type LiveScanStoreOption ¶
type LiveScanStoreOption func(*LiveScanStoreOptions)
func WithLiveScanStoreTaskVisibility ¶
func WithLiveScanStoreTaskVisibility(visibility string) LiveScanStoreOption
type LiveScanStoreOptions ¶
type LiveScanStoreOptions struct {
Task struct {
Visibility string `json:"visibility"`
} `json:"task"`
}
type Request ¶
type Request struct {
Headers http.Header
QueryParams map[string]string
Path string
Method string
Body []byte
GetBody GetContentFn
RawRequest *http.Request
// contains filtered or unexported fields
}
func (*Request) SetBodyBytes ¶
func (*Request) SetBodyJSONBytes ¶
func (*Request) SetBodyString ¶
func (*Request) SetContentType ¶
func (*Request) SetQueryParam ¶
type RetryTransport ¶
type RetryTransport struct {
Transport http.RoundTripper
}
type SavedSearchOption ¶
type SavedSearchOption func(*SavedSearchOptions)
func WithSavedSearchDatasource ¶
func WithSavedSearchDatasource(datasource string) SavedSearchOption
func WithSavedSearchDescription ¶
func WithSavedSearchDescription(description string) SavedSearchOption
func WithSavedSearchLongDescription ¶
func WithSavedSearchLongDescription(longDescription string) SavedSearchOption
func WithSavedSearchName ¶
func WithSavedSearchName(name string) SavedSearchOption
func WithSavedSearchOwnerDescription ¶
func WithSavedSearchOwnerDescription(ownerDescription string) SavedSearchOption
func WithSavedSearchPass ¶
func WithSavedSearchPass(pass int) SavedSearchOption
func WithSavedSearchPermissions ¶
func WithSavedSearchPermissions(permissions []string) SavedSearchOption
func WithSavedSearchQuery ¶
func WithSavedSearchQuery(query string) SavedSearchOption
func WithSavedSearchTLP ¶
func WithSavedSearchTLP(tlp string) SavedSearchOption
func WithSavedSearchTags ¶
func WithSavedSearchTags(tags []string) SavedSearchOption
func WithSavedSearchUserTags ¶
func WithSavedSearchUserTags(userTags []string) SavedSearchOption
type SavedSearchOptions ¶
type SavedSearchOptions struct {
Search struct {
Datasource string `json:"datasource"`
Name string `json:"name"`
Query string `json:"query"`
TLP string `json:"tlp"`
Permissions []string `json:"permissions"`
Pass int `json:"pass"`
Description string `json:"description,omitempty"`
LongDescription string `json:"longDescription,omitempty"`
OwnerDescription string `json:"ownerDescription,omitempty"`
Tags []string `json:"tags,omitempty"`
UserTags []string `json:"userTags,omitempty"`
} `json:"search"`
}
type ScanOption ¶
type ScanOption func(*ScanOptions)
func WithScanCountry ¶
func WithScanCountry(country string) ScanOption
func WithScanCustomAgent ¶
func WithScanCustomAgent(customAgent string) ScanOption
func WithScanOverrideSafety ¶
func WithScanOverrideSafety(overrideSafety string) ScanOption
func WithScanReferer ¶
func WithScanReferer(referer string) ScanOption
func WithScanTags ¶
func WithScanTags(tags []string) ScanOption
func WithScanVisibility ¶
func WithScanVisibility(visibility string) ScanOption
type ScanOptions ¶
type ScanOptions struct {
URL string `json:"url"`
CustomAgent *string `json:"customagent,omitempty"`
Referer *string `json:"referer,omitempty"`
Visibility *string `json:"visibility,omitempty"`
Tags *[]string `json:"tags,omitempty"`
OverrideSafety *string `json:"overrideSafety,omitempty"`
Country *string `json:"country,omitempty"`
}
type ScanResult ¶
type ScanResult struct {
UUID string `json:"uuid"`
Raw json.RawMessage `json:"-"`
}
func (*ScanResult) PrettyJSON ¶
func (r *ScanResult) PrettyJSON() string
func (*ScanResult) UnmarshalJSON ¶
func (r *ScanResult) UnmarshalJSON(data []byte) error
type SearchResult ¶
type SearchResult struct {
Sort []any `json:"sort"`
Raw json.RawMessage `json:"-"`
}
func (*SearchResult) UnmarshalJSON ¶
func (r *SearchResult) UnmarshalJSON(data []byte) error
type SearchResults ¶
type SearchResults struct {
Results []SearchResult `json:"results"`
HasMore bool `json:"has_more"`
Total int `json:"total"`
Raw json.RawMessage `json:"-"`
}
func (*SearchResults) UnmarshalJSON ¶
func (r *SearchResults) UnmarshalJSON(data []byte) error
type SubscriptionOption ¶
type SubscriptionOption func(*SubscriptionOptions)
func WithSubscriptionDescription ¶
func WithSubscriptionDescription(description string) SubscriptionOption
func WithSubscriptionEmailAddresses ¶
func WithSubscriptionEmailAddresses(emailAddresses []string) SubscriptionOption
func WithSubscriptionFrequency ¶
func WithSubscriptionFrequency(frequency string) SubscriptionOption
func WithSubscriptionIgnoreTime ¶
func WithSubscriptionIgnoreTime(ignoreTime bool) SubscriptionOption
func WithSubscriptionIsActive ¶
func WithSubscriptionIsActive(isActive bool) SubscriptionOption
func WithSubscriptionName ¶
func WithSubscriptionName(name string) SubscriptionOption
func WithSubscriptionSearchIds ¶
func WithSubscriptionSearchIds(searchIds []string) SubscriptionOption
type SubscriptionOptions ¶
type SubscriptionOptions struct {
Subscription struct {
SearchIds []string `json:"searchIds"`
Frequency string `json:"frequency"`
EmailAddresses []string `json:"emailAddresses"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
IsActive bool `json:"isActive"`
IgnoreTime bool `json:"ignoreTime"`
} `json:"subscription"`
}
Click to show internal directories.
Click to hide internal directories.