Documentation
¶
Index ¶
- func GetFlagOrEnvironmentVariable(cmd *cobra.Command, flagName string, environmentVariableName string) (string, error)
- type BrowserSettings
- type Client
- type CloseSessionRequest
- type CreateSessionRequest
- type Geolocation
- type Option
- type Options
- type Proxy
- type ProxyCountryOption
- type Requester
- type Session
- type WebSocket
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFlagOrEnvironmentVariable ¶
func GetFlagOrEnvironmentVariable(cmd *cobra.Command, flagName string, environmentVariableName string) (string, error)
GetFlagOrEnvironmentVariable retrieves a value from either a command flag or an environment variable. It first checks the environment variable, then falls back to the command flag. Returns an error if neither source has a value.
Types ¶
type BrowserSettings ¶
type Client ¶
type Client struct {
APIKey string
URL string
ConnectionURL string
ProjectID string
Sessions []*Session
Options *common.BrowserbaseRequestConfig
}
func NewBrowserbaseClient ¶
func NewBrowserbaseClient(browserbaseConfig *common.BrowserbaseRequestConfig, browserbaseSecrets *common.BrowserbaseRequestSecrets) *Client
func (*Client) CloseSession ¶
func (*Client) ConnectionString ¶
type CloseSessionRequest ¶
type CreateSessionRequest ¶
type CreateSessionRequest struct {
ProjectID string `json:"projectId,omitempty"`
BrowserSettings BrowserSettings `json:"browserSettings,omitempty"`
Proxies []Proxy `json:"proxies,omitempty"`
}
type Geolocation ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithProxyCountries ¶
type Proxy ¶
type Proxy struct {
Type string `json:"type"`
Geolocation *Geolocation `json:"geolocation,omitempty"`
}
type ProxyCountryOption ¶
type ProxyCountryOption struct {
Countries []string
}
type Requester ¶
Requester is a struct that contains a Client and a Requester
func NewBrowserbaseRequester ¶
func NewBrowserbaseRequester( ctx context.Context, browserbaseClient Client, timeout int, minDOMStabalizeTime int, ) *Requester
NewBrowserbaseRequester creates a new BrowserbaseRequester
func (*Requester) SendRequest ¶
func (b *Requester) SendRequest(ctx context.Context, options common.SendHttpRequestConfig) (common.HttpRequestResponse, error)
Click to show internal directories.
Click to hide internal directories.