-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.gen.go
36 lines (32 loc) · 1.67 KB
/
client.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Code generated by ifacemaker; DO NOT EDIT.
package flaresolverr
import (
"context"
"github.com/google/uuid"
)
// Client interface describes wrapped Flaresolverr client.
type Client interface {
// CreateSession launch a new browser instance
// which will retain cookies until you destroy it with sessions.destroy.
//
// This comes in handy, so you don't have to keep solving challenges over
// and over, and you won't need to keep sending cookies for the browser to use.
//
// This also speeds up the requests since it won't have to launch a new browser instance for every request.
CreateSession(ctx context.Context, session uuid.UUID, proxy ...string) (*Response, error)
// ListSessions Returns a list of all the active sessions.
// More for debugging if you are curious to see how many sessions are running.
// You should always make sure to properly close each session
// when you are done using them as too many may slow your computer down.
ListSessions(ctx context.Context) (*Response, error)
// DestroySession will properly shut down a browser instance
// and remove all files associated with it to free up resources for a new session.
// When you no longer need to use a session you should make sure to close it.
DestroySession(ctx context.Context, session uuid.UUID) error
// Get makes an HTTP GET request using flaresolverr proxy
// Session can be nil.
Get(ctx context.Context, u string, session uuid.UUID, proxy ...string) (*Response, error)
// Post makes an HTTP POST request using flaresolverr proxy
// data must be an application/x-www-form-urlencoded string.
Post(ctx context.Context, u string, session uuid.UUID, data string, proxy ...string) (*Response, error)
}