cmd

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const KernelClientKey contextKey = "kernel_client"

Variables

This section is empty.

Functions

func Execute

func Execute(m Metadata)

Execute executes the root command.

Types

type BoolFlag

type BoolFlag struct {
	Set   bool
	Value bool
}

BoolFlag captures whether a boolean flag was set explicitly and its value.

type BrowsersCmd

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

BrowsersCmd is a cobra-independent command handler for browsers operations.

func (BrowsersCmd) Create

func (BrowsersCmd) Delete

func (BrowsersCmd) List

func (b BrowsersCmd) List(ctx context.Context) error

func (BrowsersCmd) View

type BrowsersCreateInput

type BrowsersCreateInput struct {
	PersistenceID  string
	TimeoutSeconds int
	Stealth        BoolFlag
	Headless       BoolFlag
}

Inputs for each command

type BrowsersDeleteInput

type BrowsersDeleteInput struct {
	Identifier  string
	SkipConfirm bool
}

type BrowsersService

type BrowsersService interface {
	List(ctx context.Context, opts ...option.RequestOption) (res *[]kernel.BrowserListResponse, err error)
	New(ctx context.Context, body kernel.BrowserNewParams, opts ...option.RequestOption) (res *kernel.BrowserNewResponse, err error)
	Delete(ctx context.Context, body kernel.BrowserDeleteParams, opts ...option.RequestOption) (err error)
	DeleteByID(ctx context.Context, id string, opts ...option.RequestOption) (err error)
}

BrowsersService defines the subset of the Kernel SDK browser client that we use. See https://github.com/onkernel/kernel-go-sdk/blob/main/browser.go

type BrowsersViewInput

type BrowsersViewInput struct {
	Identifier string
}

type JWTClaims

type JWTClaims struct {
	Sub     string `json:"sub"`      // User ID
	Email   string `json:"email"`    // User email
	Exp     int64  `json:"exp"`      // Expiration time
	Iss     string `json:"iss"`      // Issuer
	OrgID   string `json:"org_id"`   // Organization ID
	OrgName string `json:"org_name"` // Organization name
}

JWTClaims represents the claims in a JWT token

type Metadata

type Metadata struct {
	Version   string
	Commit    string
	Date      string
	GoVersion string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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