Versions in this module Expand all Collapse all v0 v0.0.11 Jul 31, 2025 Changes in this version + const DefaultMaxBodySize + const DefaultTimeout + const FakeUserAgent + var DefaultHTTPClient = &http.Client + var DefaultHeaders = map[string]string + var FakeHeaders = map[string]string + type Action struct + Action TypedAction + func NewPDFAction(options PDFActionOptions) Action + func NewScreenshotAction(options ScreenshotActionOptions) Action + func NewWaitAction(options WaitActionOptions) Action + func (a *Action) MarshalJSON() ([]byte, error) + func (a *Action) UnmarshalJSON(data []byte) error + type BaseAction struct + Type string + func (a BaseAction) GetType() string + type Client struct + func NewClient(options ClientOptions) *Client + func (c *Client) Fetch(ctx context.Context, request *Request) (*Response, error) + func (c *Client) SetHeader(key, value string) + type ClientOptions struct + AuthToken string + BaseURL string + Headers map[string]string + Timeout time.Duration + type Fetcher interface + Fetch func(ctx context.Context, request *Request) (*Response, error) + type HTTPFetcher struct + func NewHTTPFetcher(options HTTPFetcherOptions) *HTTPFetcher + func (f *HTTPFetcher) Fetch(ctx context.Context, req *Request) (*Response, error) + type HTTPFetcherOptions struct + Client *http.Client + Headers map[string]string + MaxBodySize int64 + Timeout time.Duration + type Link web.Link + type Meta web.Meta + type Metadata web.Metadata + type MockFetcher struct + func NewMockFetcher() *MockFetcher + func (m *MockFetcher) AddError(url string, err error) + func (m *MockFetcher) AddResponse(url string, response *Response) + func (m *MockFetcher) Fetch(ctx context.Context, req *Request) (*Response, error) + type PDFAction struct + Format string + type PDFActionOptions struct + Format string + type Request struct + Actions []Action + ExcludeTags []string + Fetcher string + Formats []string + Headers map[string]string + IncludeTags []string + MaxAge int + Mobile bool + OnlyMainContent bool + Prettify bool + StorageState map[string]any + Timeout int + URL string + WaitFor int + func ParseGetRequest(r *http.Request) (*Request, error) + func ParsePostRequest(r *http.Request) (*Request, error) + type Response struct + Error string + HTML string + Headers map[string]string + Links []*Link + Markdown string + Metadata Metadata + PDF string + Screenshot string + StatusCode int + StorageState map[string]any + Timestamp time.Time + URL string + func ProcessRequest(request *Request, html string) (*Response, error) + type ScreenshotAction struct + FullPage bool + type ScreenshotActionOptions struct + FullPage bool + type TypedAction interface + GetType func() string + type WaitAction struct + Duration int + Selector string + type WaitActionOptions struct + Duration int + Selector string