Documentation
¶
Overview ¶
Package plugins provides a provider registry for email-backed integrations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthSpec ¶
type AuthSpec struct {
Type AuthType `json:"type"`
RequiredScopes []string `json:"required_scopes"`
RequiresCredentialsUpload bool `json:"requires_credentials_upload"`
}
AuthSpec describes how a provider authenticates.
type ConfigField ¶
type ConfigField struct {
Key string `json:"name"` // serialized as "name" for frontend compatibility
Label string `json:"label"`
Type string `json:"type"` // "text", "password", "path", "thunderbird-profile", "thunderbird-mailboxes"
Required bool `json:"required"`
Help string `json:"help,omitempty"`
DependsOn string `json:"depends_on,omitempty"`
}
ConfigField describes a single user-provided configuration field for a plugin.
type GuideNote ¶
GuideNote is a color-coded callout displayed below the guide sections. Type: "info" (blue), "warning" (amber), "tip" (green), "docker" (purple).
type GuideSection ¶
type GuideSection struct {
Title string `json:"title"`
Steps []GuideStep `json:"steps"`
Link *GuideLink `json:"link,omitempty"`
}
GuideSection is a titled group of steps in the setup guide.
type Provider ¶
type Provider struct {
Metadata ProviderMetadata
NewReader func(ProviderInput) (api.Reader, error)
NewEmailSearcher func(ProviderInput) (api.EmailSearcher, error)
}
Provider defines an email provider and the capabilities it can construct.
type ProviderGuide ¶
type ProviderGuide struct {
Sections []GuideSection `json:"sections"`
Notes []GuideNote `json:"notes,omitempty"`
}
ProviderGuide is the structured setup guide for a provider.
type ProviderInput ¶
type ProviderInput struct {
HTTPClient *http.Client
AppConfig *config.App
ReaderConfig json.RawMessage
Rules []api.Rule
Resolver api.CategoryResolver
StateManager *state.Manager
DiagnosticSink api.DiagnosticSink
Logger *slog.Logger
}
ProviderInput contains dependencies required to create provider capabilities.
type ProviderMetadata ¶
type ProviderMetadata struct {
Name string `json:"name"`
Description string `json:"description"`
Auth AuthSpec `json:"auth"`
ConfigSchema []ConfigField `json:"config_schema"`
SetupGuide json.RawMessage `json:"setup_guide,omitempty"`
}
ProviderMetadata describes a provider for catalog display and selection.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages available providers.
func (*Registry) GetAllScopes ¶
GetAllScopes returns all OAuth scopes required by the given provider.
func (*Registry) GetProvider ¶
GetProvider returns a provider by name.
func (*Registry) ListProviders ¶
ListProviders returns all registered providers.
func (*Registry) RegisterProvider ¶
RegisterProvider registers a provider.