kernelclient

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultRequestTimeout = 2 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {
	// contains filtered or unexported fields
}

func New

func New(config Config, opts ...Option) Clients

func (Clients) CreateBrowserPool

func (c Clients) CreateBrowserPool(ctx context.Context, projectID string, params kernel.BrowserPoolNewParams) (*kernel.BrowserPool, error)

func (Clients) CreateProfile

func (c Clients) CreateProfile(ctx context.Context, projectID string, params kernel.ProfileNewParams) (*kernel.Profile, error)

func (Clients) CreateProject

func (c Clients) CreateProject(ctx context.Context, params kernel.ProjectNewParams) (*kernel.Project, error)

func (Clients) CreateProxy

func (c Clients) CreateProxy(ctx context.Context, projectID string, params kernel.ProxyNewParams) (*kernel.ProxyNewResponse, error)

func (Clients) DefaultProjectID

func (c Clients) DefaultProjectID() string

func (Clients) DeleteBrowserPool

func (c Clients) DeleteBrowserPool(ctx context.Context, projectID, id string) error

func (Clients) DeleteExtension

func (c Clients) DeleteExtension(ctx context.Context, projectID, id string) error

func (Clients) DeleteProfile

func (c Clients) DeleteProfile(ctx context.Context, projectID, idOrName string) error

func (Clients) DeleteProject

func (c Clients) DeleteProject(ctx context.Context, id string) error

func (Clients) DeleteProxy

func (c Clients) DeleteProxy(ctx context.Context, projectID, id string) error

func (Clients) GetBrowserPool

func (c Clients) GetBrowserPool(ctx context.Context, projectID, id string) (*kernel.BrowserPool, error)

func (Clients) GetExtension

func (c Clients) GetExtension(ctx context.Context, projectID, idOrName string) (*kernel.ExtensionGetResponse, error)

GetExtension resolves an extension by ID or by name within the project; the API treats the path parameter as id-or-name and returns metadata only.

func (Clients) GetProfile

func (c Clients) GetProfile(ctx context.Context, projectID, idOrName string) (*kernel.Profile, error)

func (Clients) GetProject

func (c Clients) GetProject(ctx context.Context, idOrName string) (*kernel.Project, error)

GetProject resolves a project by ID or by name; the API treats the path parameter as id-or-name (names are unique within an organization).

func (Clients) GetProxy

func (c Clients) GetProxy(ctx context.Context, projectID, id string) (*kernel.ProxyGetResponse, error)

func (Clients) ListProfilePage

func (c Clients) ListProfilePage(ctx context.Context, projectID, query string, offset int64) (ProfilePage, error)

func (Clients) ListProxyPage

func (c Clients) ListProxyPage(ctx context.Context, projectID string, offset int64) (ProxyPage, error)

func (Clients) UpdateBrowserPool

func (c Clients) UpdateBrowserPool(ctx context.Context, projectID, id string, params kernel.BrowserPoolUpdateParams) (*kernel.BrowserPool, error)

func (Clients) UpdateProject

func (c Clients) UpdateProject(ctx context.Context, id string, params kernel.ProjectUpdateParams) (*kernel.Project, error)

func (Clients) UploadExtension

func (c Clients) UploadExtension(ctx context.Context, projectID string, params kernel.ExtensionUploadParams) (*kernel.ExtensionUploadResponse, error)

type Config

type Config struct {
	APIKey         string
	BaseURL        string
	ProjectID      string
	RequestTimeout time.Duration
}

Config configures the shared Kernel API clients. ProjectID is a default only; the client never applies it implicitly.

type Option

type Option func(*clientOptions)

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

type Page

type Page[T any] struct {
	Items       []T
	NextOffset  int64
	HasNextPage bool
}

type ProfilePage

type ProfilePage = Page[kernel.Profile]

type ProxyPage

type ProxyPage = Page[kernel.ProxyListResponse]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL