Versions in this module Expand all Collapse all v0 v0.4.0 Nov 15, 2026 Changes in this version + func RenderLink(o RenderLinkOptions) (string, error) + type RenderLinkOptions struct + AutoHeight *bool + BaseURL string + BlockAds *bool + BlockPopUps *bool + Click *string + Country *string + DeviceCategory DeviceCategory + DeviceScaleFactor *float64 + EmulatedDevice *string + Format Format + Height *int + Hide *string + Hover *string + KeyPrefix string + Locale *string + MaxHeight *int + PageTimeoutMS *int + PressEscape *bool + RenderSecret string + ScrollMode ScrollMode + ScrollingDelayMS *int + TTLSeconds *int + ThumbWidth *int + TimeZone *string + URL string + Width *int + XPath *string + Zoom *int v0.3.0 Nov 15, 2026 Changes in this version + type Account struct + Email *string + KeyName *string + KeyPrefix string + Product Product type AutoScheduleService + func (s *AutoScheduleService) Account(ctx context.Context) (*Account, error) type InstantSnapService + func (s *InstantSnapService) Account(ctx context.Context) (*Account, error) v0.2.0 Nov 15, 2026 Changes in this version type Capture + URL string v0.1.0 Nov 9, 2026 Changes in this version + const DefaultAutoScheduleBaseURL + const DefaultCaptureTimeout + const DefaultInstantSnapBaseURL + const DefaultMaxRetries + const DefaultPollInterval + const DefaultTimeout + const DefaultWaitTimeout + const DefaultWebhookTolerance + const EnvAutoScheduleKey + const EnvInstantSnapKey + const EventTypeCaptureChanged + const EventTypeCaptureFailed + const EventTypeCaptureSucceeded + const EventTypeDeliveryCompleted + const EventTypePing + const EventTypeSchedulePaused + const EventTypeSitemapRunCompleted + const SignatureHeader + const Version + var ErrAuthentication = errors.New("wsw: authentication failed") + var ErrCapture = errors.New("wsw: capture failed") + var ErrConnection = errors.New("wsw: connection failed") + var ErrInvalidRequest = errors.New("wsw: invalid request") + var ErrMissingKey = errors.New("wsw: missing API key") + var ErrNotFound = errors.New("wsw: not found") + var ErrPlanLimit = errors.New("wsw: plan limit reached") + var ErrRateLimit = errors.New("wsw: rate limited") + var ErrService = errors.New("wsw: service error") + var ErrSignatureVerification = errors.New("wsw: webhook signature verification failed") + func Bool(v bool) *bool + func Float64(v float64) *float64 + func Int(v int) *int + func String(v string) *string + type AutoScheduleCaptureFailedEvent struct + Data ScheduledCapture + type AutoScheduleCaptureSucceededEvent struct + Data ScheduledCapture + type AutoScheduleService struct + func (s *AutoScheduleService) TriggerNow(ctx context.Context, webPageID string) (*TriggerResult, error) + type Capture struct + CallbackURL string + CapturedAt time.Time + ContentType string + DownloadURL string + DurationMS int + ErrorCode string + ExpiresAt time.Time + FinalURL string + Format Format + Height int + ID string + MediaCategory MediaCategory + MediaSHA256 string + PageHTTPStatus int + PageSource *PageSource + Replayed bool + ResponseType ResponseType + S3Delivery *S3Delivery + SizeBytes int64 + SpecVersion string + Status CaptureStatus + Width int + type CaptureChange struct + ChangeImageAvailable bool + ChangePercent float64 + ComparedToCaptureID string + type CaptureChangedEvent struct + Data CaptureChange + type CaptureFile struct + Body io.ReadCloser + CapturedAt time.Time + ContentType string + DurationMS int + Filename string + FinalURL string + Height int + ID string + PageHTTPStatus int + PartCount int + SHA256 string + SizeBytes int64 + SpecVersion string + Status CaptureStatus + Width int + func (f *CaptureFile) Close() error + func (f *CaptureFile) SaveTo(path string) error + type CaptureOptions struct + AutoHeight *bool + BlockAds *bool + BlockPopUps *bool + CallbackURL *string + Cookies map[string]string + DeviceCategory DeviceCategory + EmulatedDevice *string + Format Format + Geolocation *Geolocation + Headers map[string]string + Locale *string + MaxHeight *int + MediaCategory MediaCategory + PageSource *PageSourceOptions + PageTimeoutMS *int + PressEscape *bool + Proxy *Proxy + S3Delivery *S3DeliveryOptions + ScrollMode ScrollMode + ScrollingDelayMS *int + Selectors *Selectors + TimeZone *string + Timeout *int + TimestampWatermark *TimestampWatermark + URL string + UserAgent *string + Viewport *Viewport + Zoom *int + type CaptureStatus string + const CaptureStatusDelivered + const CaptureStatusExpired + const CaptureStatusFailed + const CaptureStatusPending + const CaptureStatusQueued + const CaptureStatusRunning + const CaptureStatusSucceeded + const CaptureStatusTimedOut + type Catalog struct + EmulatedDevices []string + ProxyCountries []string + type Client struct + AutoSchedule *AutoScheduleService + InstantSnap *InstantSnapService + func NewClient(opts ...ClientOption) *Client + type ClientOption func(*Client) + func WithAutoScheduleKey(key string) ClientOption + func WithBaseURLs(instantSnap, autoSchedule string) ClientOption + func WithCaptureTimeout(d time.Duration) ClientOption + func WithHTTPClient(hc *http.Client) ClientOption + func WithInstantSnapKey(key string) ClientOption + func WithMaxRetries(n int) ClientOption + func WithTimeout(d time.Duration) ClientOption + type Defaults struct + AutoHeight bool + AutoHeightMaxHeight int + AutoHeightMaxHeightWebP int + BlockAds bool + BlockPopUps bool + DeviceCategory DeviceCategory + EmulatedDevice string + Format map[MediaCategory]Format + Formats map[MediaCategory][]Format + Geolocation bool + GeolocationAccuracy float64 + LeftToTheBrowser []string + Limits map[string]any + MediaCategory MediaCategory + PageSource map[string]any + PageTimeoutMS int + PressEscape bool + ResponseType ResponseType + ScrollMode ScrollMode + ScrollingDelayMS int + SpecVersion string + TimestampWatermark map[string]any + Viewport ViewportDefaults + WaitForCloudSync bool + Zoom int + type Delivery struct + Destinations []Destination + type DeliveryCompletedEvent struct + Data Delivery + type Destination struct + CompletedAt time.Time + Name string + Provider string + Slot int + Status string + type DeviceCategory string + const DeviceCategoryDesktop + const DeviceCategoryMobile + type Error struct + Body []byte + Code string + HTTPStatus int + Kind ErrorKind + Message string + RetryAfter time.Duration + func (e *Error) Error() string + func (e *Error) Is(target error) bool + func (e *Error) Retryable() bool + func (e *Error) Unwrap() error + type ErrorKind string + const KindAuthentication + const KindCapture + const KindConnection + const KindInvalidRequest + const KindNotFound + const KindPlanLimit + const KindRateLimit + const KindService + const KindSignatureVerification + const KindUnknown + type Event interface + Envelope func() EventEnvelope + func VerifyWebhook(body []byte, header, secret string, opts ...VerifyOption) (Event, error) + type EventEnvelope struct + CreatedAt time.Time + ID string + Product Product + Type string + func (e EventEnvelope) Envelope() EventEnvelope + type Format string + const FormatDocumentPDF + const FormatGIF + const FormatImagePDF + const FormatJPEG + const FormatMOV + const FormatMP4 + const FormatPNG + const FormatTIFF + const FormatWebM + const FormatWebP + type Geolocation struct + Accuracy *float64 + Latitude *float64 + Longitude *float64 + type InstantSnapCaptureFailedEvent struct + Data Capture + type InstantSnapCaptureSucceededEvent struct + Data Capture + type InstantSnapService struct + func (s *InstantSnapService) Capture(ctx context.Context, opts *CaptureOptions, reqOpts ...RequestOption) (*Capture, error) + func (s *InstantSnapService) CaptureFile(ctx context.Context, opts *CaptureOptions, reqOpts ...RequestOption) (*CaptureFile, error) + func (s *InstantSnapService) CaptureToBucket(ctx context.Context, opts *CaptureOptions, reqOpts ...RequestOption) (*Capture, error) + func (s *InstantSnapService) Catalog(ctx context.Context) (*Catalog, error) + func (s *InstantSnapService) Defaults(ctx context.Context) (*Defaults, error) + func (s *InstantSnapService) Download(ctx context.Context, capture *Capture, w io.Writer) (int64, error) + func (s *InstantSnapService) DownloadToFile(ctx context.Context, capture *Capture, path string) error + func (s *InstantSnapService) Get(ctx context.Context, id string) (*Capture, error) + func (s *InstantSnapService) Submit(ctx context.Context, opts *CaptureOptions, reqOpts ...RequestOption) (*Capture, error) + func (s *InstantSnapService) SubmitToBucket(ctx context.Context, opts *CaptureOptions, reqOpts ...RequestOption) (*Capture, error) + func (s *InstantSnapService) Wait(ctx context.Context, id string, opts ...WaitOption) (*Capture, error) + type MediaCategory string + const MediaCategoryImage + const MediaCategoryPDF + const MediaCategoryVideo + type PageSource struct + ContentType string + DownloadURL string + Format PageSourceFormat + SHA256 string + SizeBytes int64 + type PageSourceFormat string + const PageSourceFormatHTML + const PageSourceFormatJSON + const PageSourceFormatText + type PageSourceOptions struct + Format PageSourceFormat + type Ping struct + EndpointID string + EndpointName string + Message string + SentAt time.Time + type PingEvent struct + Data Ping + type Product string + const ProductAutoSchedule + const ProductInstantSnap + type Proxy struct + Country string + type RequestOption func(*requestConfig) + func WithIdempotencyKey(key string) RequestOption + type ResponseType string + const ResponseTypeByFormat + const ResponseTypeCloudStorage + const ResponseTypeJSON + type S3Delivery struct + AccessKeyID string + Bucket string + Error string + Key string + Status S3DeliveryStatus + type S3DeliveryOptions struct + AccessKeyID string + Bucket string + EndpointURL *string + ForcePathStyle *bool + KeyPrefix *string + Region *string + SecretAccessKey string + WaitForSync *bool + type S3DeliveryStatus string + const S3DeliveryStatusCompleted + const S3DeliveryStatusFailed + const S3DeliveryStatusInProgress + const S3DeliveryStatusNotStarted + type SchedulePause struct + PausedAt time.Time + Reason string + ScheduleID string + ScheduleName string + URL string + type SchedulePausedEvent struct + Data SchedulePause + type ScheduledCapture struct + CapturedAt time.Time + FinalURL string + Format Format + ID string + MediaCategory MediaCategory + MediaSHA256 string + PageHTTPStatus int + PageSource *PageSource + ScheduleID string + ScheduleName string + SitemapRunID string + Status string + URL string + type ScrollMode string + const ScrollModeScroll + const ScrollModeViewport + type Selectors struct + Click *string + Hide *string + Hover *string + XPath *string + type SitemapRun struct + CompletedAt time.Time + Message string + PagesFailed int + PagesListed int + PagesMatched int + PagesOverLimit int + PagesOverQuota int + PagesQueued int + PagesSucceeded int + RunAt time.Time + ScheduleID string + ScheduleName string + SitemapRunID string + SitemapURL string + Status string + type SitemapRunCompletedEvent struct + Data SitemapRun + type TimestampWatermark struct + BackgroundColor *string + Enabled *bool + FontColor *string + Location WatermarkLocation + type TriggerResult struct + Message string + Status TriggerStatus + TriggeredAt time.Time + TriggeredBy TriggeredBy + WebPageID string + type TriggerStatus string + const TriggerStatusAlreadyPending + const TriggerStatusTriggered + type TriggeredBy string + const TriggeredByAPI + const TriggeredByUI + type UnknownEvent struct + Data json.RawMessage + type VerifyOption func(*verifyConfig) + func WithNow(now func() time.Time) VerifyOption + func WithTolerance(d time.Duration) VerifyOption + type Viewport struct + DeviceScaleFactor *float64 + Height *int + Width *int + type ViewportDefaults struct + DeviceScaleFactor float64 + Height int + Width int + type WaitOption func(*waitConfig) + func WithPollInterval(d time.Duration) WaitOption + func WithWaitTimeout(d time.Duration) WaitOption + type WatermarkLocation string + const WatermarkLocationBottom + const WatermarkLocationTop