desktop

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClientBackend = newRawClient(dialBackend)
View Source
var Paths = sync.OnceValue(func() DockerDesktopPaths {
	desktopPaths, err := getDockerDesktopPaths()
	if err != nil {
		panic(err)
	}

	return desktopPaths
})

Functions

func AvoidResourceSaverMode

func AvoidResourceSaverMode(ctx context.Context)

func CheckFeatureIsEnabled

func CheckFeatureIsEnabled(ctx context.Context, settingName string, label string) error

CheckFeatureIsEnabled verifies if a feature is enabled in either admin-settings.json or Docker Desktop settings. settingName is the setting name (e.g. "enableDockerMCPToolkit", "enableDockerAI", etc.) label is the human-readable name of the feature for error messages

Types

type AuthResponse

type AuthResponse struct {
	AuthType   string `json:"authType,omitempty"`
	BrowserURL string `json:"browserUrl,omitempty"`
}

type DockerDesktopPaths

type DockerDesktopPaths struct {
	AdminSettingPath     string
	BackendSocket        string
	JFSSocket            string
	ToolsSocket          string
	CredentialHelperPath func() string
}

type Feature

type Feature struct {
	Enabled bool `json:"enabled"`
}

type OAuthApp

type OAuthApp struct {
	App        string        `json:"app"`
	Authorized bool          `json:"authorized"`
	Provider   string        `json:"provider"`
	Scopes     []OAuthScopes `json:"scopes,omitempty"`
	Tools      []string      `json:"tools"`
}

type OAuthScopes

type OAuthScopes struct {
	Description string   `json:"description,omitempty"`
	Metadata    []string `json:"metadata,omitempty"`
	Name        string   `json:"name,omitempty"`
}

type RawClient

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

func (*RawClient) Delete

func (c *RawClient) Delete(ctx context.Context, endpoint string) error

func (*RawClient) Get

func (c *RawClient) Get(ctx context.Context, endpoint string, v any) error

func (*RawClient) Post

func (c *RawClient) Post(ctx context.Context, endpoint string, v any, result any) error

type Secret

type Secret struct {
	Name     string `json:"name"`
	Provider string `json:"provider,omitempty"`
	Value    string `json:"value"`
}

type Secrets

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

func NewSecretsClient

func NewSecretsClient() *Secrets

func (*Secrets) DeleteJfsSecret

func (c *Secrets) DeleteJfsSecret(ctx context.Context, secret string) error

func (*Secrets) GetJfsPolicy

func (c *Secrets) GetJfsPolicy(ctx context.Context) (string, error)

func (*Secrets) ListJfsSecrets

func (c *Secrets) ListJfsSecrets(ctx context.Context) ([]StoredSecret, error)

func (*Secrets) SetJfsPolicy

func (c *Secrets) SetJfsPolicy(ctx context.Context, body string) error

func (*Secrets) SetJfsSecret

func (c *Secrets) SetJfsSecret(ctx context.Context, secret Secret) error

type StoredSecret

type StoredSecret struct {
	Name     string `json:"name"`
	Provider string `json:"provider,omitempty"`
}

type Tools

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

func NewAuthClient

func NewAuthClient() *Tools

func (*Tools) DeleteOAuthApp

func (c *Tools) DeleteOAuthApp(ctx context.Context, app string) error

func (*Tools) ListOAuthApps

func (c *Tools) ListOAuthApps(ctx context.Context) ([]OAuthApp, error)

func (*Tools) PostOAuthApp

func (c *Tools) PostOAuthApp(ctx context.Context, app, scopes string) (AuthResponse, error)

Jump to

Keyboard shortcuts

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