Versions in this module Expand all Collapse all v0 v0.1.0 Nov 7, 2026 Changes in this version + var ErrWebhookVerification = errors.New("castle: webhook signature verification failed") + func VerifyWebhookSignature(body []byte, signature, apiSecret string) error + type APIError struct + StatusCode int + func (e *APIError) Error() string + type Client struct + func NewClient(apiSecret string, config Config) (*Client, error) + func (c *Client) ArchiveListItem(ctx context.Context, listId string, id string) (*api.ArchiveListItemResponse, error) + func (c *Client) CountListItems(ctx context.Context, listId string, body api.CountListItemsJSONRequestBody) (*api.CountListItemsResponse, error) + func (c *Client) CountListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader) (*api.CountListItemsResponse, error) + func (c *Client) CreateList(ctx context.Context, body api.CreateListJSONRequestBody) (*api.CreateListResponse, error) + func (c *Client) CreateListItem(ctx context.Context, listId string, body api.CreateListItemJSONRequestBody) (*api.CreateListItemResponse, error) + func (c *Client) CreateListItemWithBody(ctx context.Context, listId string, contentType string, body io.Reader) (*api.CreateListItemResponse, error) + func (c *Client) CreateListWithBody(ctx context.Context, contentType string, body io.Reader) (*api.CreateListResponse, error) + func (c *Client) CreateOrUpdateBatchListItems(ctx context.Context, listId string, ...) (*api.CreateOrUpdateBatchListItemsResponse, error) + func (c *Client) CreateOrUpdateBatchListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader) (*api.CreateOrUpdateBatchListItemsResponse, error) + func (c *Client) DeleteList(ctx context.Context, id string) (*api.DeleteListResponse, error) + func (c *Client) DeleteUserPrivacy(ctx context.Context, body api.DeleteUserPrivacyJSONRequestBody) (*api.DeleteUserPrivacyResponse, error) + func (c *Client) DeleteUserPrivacyDeprecated(ctx context.Context, id string) (*api.DeleteUserPrivacyDeprecatedResponse, error) + func (c *Client) DeleteUserPrivacyWithBody(ctx context.Context, contentType string, body io.Reader) (*api.DeleteUserPrivacyResponse, error) + func (c *Client) DownloadIpDatasetExport(ctx context.Context, dataset string, window string, format string) (*api.DownloadIpDatasetExportResponse, error) + func (c *Client) Filter(ctx context.Context, body api.FilterJSONRequestBody) (*api.FilterResponse, error) + func (c *Client) FilterWithBody(ctx context.Context, contentType string, body io.Reader) (*api.FilterResponse, error) + func (c *Client) GetEventSchema(ctx context.Context) (*api.GetEventSchemaResponse, error) + func (c *Client) GetLatestIpDatasetExportMetadata(ctx context.Context, dataset string, window string, format string) (*api.GetLatestIpDatasetExportMetadataResponse, error) + func (c *Client) GetList(ctx context.Context, id string, params *api.GetListParams) (*api.GetListResponse, error) + func (c *Client) GetListItem(ctx context.Context, listId string, id string) (*api.GetListItemResponse, error) + func (c *Client) GetLists(ctx context.Context) (*api.GetListsResponse, error) + func (c *Client) GetUserPrivacy(ctx context.Context, body api.GetUserPrivacyJSONRequestBody) (*api.GetUserPrivacyResponse, error) + func (c *Client) GetUserPrivacyDeprecated(ctx context.Context, id string) (*api.GetUserPrivacyDeprecatedResponse, error) + func (c *Client) GetUserPrivacyWithBody(ctx context.Context, contentType string, body io.Reader) (*api.GetUserPrivacyResponse, error) + func (c *Client) GroupEvents(ctx context.Context, body api.GroupEventsJSONRequestBody) (*api.GroupEventsResponse, error) + func (c *Client) GroupEventsWithBody(ctx context.Context, contentType string, body io.Reader) (*api.GroupEventsResponse, error) + func (c *Client) IpsLookupBatch(ctx context.Context, body api.IpsLookupBatchJSONRequestBody) (*api.IpsLookupBatchResponse, error) + func (c *Client) IpsLookupBatchWithBody(ctx context.Context, contentType string, body io.Reader) (*api.IpsLookupBatchResponse, error) + func (c *Client) IpsLookupSingle(ctx context.Context, value string) (*api.IpsLookupSingleResponse, error) + func (c *Client) QueryEvents(ctx context.Context, body api.QueryEventsJSONRequestBody) (*api.QueryEventsResponse, error) + func (c *Client) QueryEventsWithBody(ctx context.Context, contentType string, body io.Reader) (*api.QueryEventsResponse, error) + func (c *Client) QueryListItems(ctx context.Context, listId string, body api.QueryListItemsJSONRequestBody) (*api.QueryListItemsResponse, error) + func (c *Client) QueryListItemsWithBody(ctx context.Context, listId string, contentType string, body io.Reader) (*api.QueryListItemsResponse, error) + func (c *Client) QueryLists(ctx context.Context, body api.QueryListsJSONRequestBody) (*api.QueryListsResponse, error) + func (c *Client) QueryListsWithBody(ctx context.Context, contentType string, body io.Reader) (*api.QueryListsResponse, error) + func (c *Client) Risk(ctx context.Context, body api.RiskJSONRequestBody) (*api.RiskResponse, error) + func (c *Client) RiskWithBody(ctx context.Context, contentType string, body io.Reader) (*api.RiskResponse, error) + func (c *Client) UnarchiveListItem(ctx context.Context, listId string, id string, ...) (*api.UnarchiveListItemResponse, error) + func (c *Client) UnarchiveListItemWithBody(ctx context.Context, listId string, id string, contentType string, ...) (*api.UnarchiveListItemResponse, error) + func (c *Client) UpdateList(ctx context.Context, id string, body api.UpdateListJSONRequestBody) (*api.UpdateListResponse, error) + func (c *Client) UpdateListItem(ctx context.Context, listId string, id string, ...) (*api.UpdateListItemResponse, error) + func (c *Client) UpdateListItemWithBody(ctx context.Context, listId string, id string, contentType string, ...) (*api.UpdateListItemResponse, error) + func (c *Client) UpdateListWithBody(ctx context.Context, id string, contentType string, body io.Reader) (*api.UpdateListResponse, error) + type Config struct + BaseURL string + HTTPClient *http.Client + MaxResponseBytes int64 v0.0.1 Nov 5, 2026