Documentation
¶
Index ¶
- Variables
- func AvoidResourceSaverMode(ctx context.Context)
- func CheckFeatureIsEnabled(ctx context.Context, settingName string, label string) error
- 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 ¶
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 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
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 ¶
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
Click to show internal directories.
Click to hide internal directories.