Documentation
¶
Index ¶
- Variables
- func AvoidResourceSaverMode(ctx context.Context)
- func CheckDesktopIsRunning(ctx context.Context) error
- func CheckFeatureFlagIsEnabled(ctx context.Context, featureName string) (bool, error)
- func CheckFeatureIsEnabled(ctx context.Context, settingName string, label string) error
- func IsRunningInDockerDesktop(ctx context.Context) bool
- func ProxyTransport() http.RoundTripper
- func WithNoDockerDesktop(ctx context.Context) context.Context
- type AuthResponse
- type DCRClient
- type DockerDesktopPaths
- type Feature
- type OAuthApp
- type OAuthScopes
- type RawClient
- type RegisterDCRRequest
- type Secret
- type Secrets
- func (c *Secrets) DeleteJfsSecret(ctx context.Context, secret string) error
- func (c *Secrets) GetJfsPolicy(ctx context.Context) (string, error)
- func (c *Secrets) ListJfsSecrets(ctx context.Context) ([]StoredSecret, error)
- func (c *Secrets) SetJfsPolicy(ctx context.Context, body string) error
- func (c *Secrets) SetJfsSecret(ctx context.Context, secret Secret) error
- type StoredSecret
- type Tools
- func (c *Tools) DeleteDCRClient(ctx context.Context, app string) error
- func (c *Tools) DeleteOAuthApp(ctx context.Context, app string) error
- func (c *Tools) GetDCRClient(ctx context.Context, app string) (*DCRClient, error)
- func (c *Tools) GetOAuthApp(ctx context.Context, app string) (*OAuthApp, error)
- func (c *Tools) ListOAuthApps(ctx context.Context) ([]OAuthApp, error)
- func (c *Tools) PostOAuthApp(ctx context.Context, app, scopes string, disableAutoOpen bool) (AuthResponse, error)
- func (c *Tools) RegisterDCRClient(ctx context.Context, app string, req RegisterDCRRequest) error
- func (c *Tools) RegisterDCRClientPending(ctx context.Context, app string, req RegisterDCRRequest) error
Constants ¶
This section is empty.
Variables ¶
var ClientBackend = newRawClient(dialBackend)
var Paths = sync.OnceValue(func() DockerDesktopPaths { desktopPaths, err := getDockerDesktopPaths() if err != nil { panic(err) } return desktopPaths })
Functions ¶
func AvoidResourceSaverMode ¶
func CheckDesktopIsRunning ¶ added in v0.33.0
func CheckFeatureFlagIsEnabled ¶ added in v0.35.0
func CheckFeatureIsEnabled ¶
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
func IsRunningInDockerDesktop ¶ added in v0.38.0
IsRunningInDockerDesktop checks if the CLI is running with Docker Desktop.
func ProxyTransport ¶ added in v0.38.0
func ProxyTransport() http.RoundTripper
ProxyTransport returns an HTTP transport configured to use Docker Desktop's HTTP proxy socket when Docker Desktop is running. If Docker Desktop is not running, it returns http.DefaultTransport. The transport is initialized once using sync.Once and cached for subsequent calls.
Types ¶
type AuthResponse ¶
type DCRClient ¶
type DCRClient struct {
State string `json:"state"`
ServerName string `json:"serverName"`
ProviderName string `json:"providerName"`
ClientID string `json:"clientId"`
ClientName string `json:"clientName,omitempty"`
RegisteredAt string `json:"registeredAt"` // ISO timestamp
AuthorizationServer string `json:"authorizationServer,omitempty"`
AuthorizationEndpoint string `json:"authorizationEndpoint,omitempty"`
TokenEndpoint string `json:"tokenEndpoint,omitempty"`
}
type DockerDesktopPaths ¶
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 RegisterDCRRequest ¶
type RegisterDCRRequest struct {
ClientID string `json:"clientId"`
ProviderName string `json:"providerName"`
ClientName string `json:"clientName,omitempty"`
AuthorizationServer string `json:"authorizationServer,omitempty"`
AuthorizationEndpoint string `json:"authorizationEndpoint,omitempty"`
TokenEndpoint string `json:"tokenEndpoint,omitempty"`
ResourceURL string `json:"resourceUrl,omitempty"`
}
type Secrets ¶
type Secrets struct {
// contains filtered or unexported fields
}
func NewSecretsClient ¶
func NewSecretsClient() *Secrets
func (*Secrets) DeleteJfsSecret ¶
func (*Secrets) ListJfsSecrets ¶
func (c *Secrets) ListJfsSecrets(ctx context.Context) ([]StoredSecret, error)
func (*Secrets) SetJfsPolicy ¶
type StoredSecret ¶
type Tools ¶
type Tools struct {
// contains filtered or unexported fields
}
func NewAuthClient ¶
func NewAuthClient() *Tools
func (*Tools) DeleteDCRClient ¶
func (*Tools) DeleteOAuthApp ¶
func (*Tools) GetDCRClient ¶
func (*Tools) GetOAuthApp ¶ added in v0.22.0
func (*Tools) ListOAuthApps ¶
func (*Tools) PostOAuthApp ¶
func (*Tools) RegisterDCRClient ¶
func (*Tools) RegisterDCRClientPending ¶
func (c *Tools) RegisterDCRClientPending(ctx context.Context, app string, req RegisterDCRRequest) error
RegisterDCRClientPending registers a provider for lazy DCR setup using state=unregistered