Documentation
¶
Overview ¶
Package registry provides types for avatar provider registration and discovery.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LiveProviderFactory ¶ added in v0.2.0
type LiveProviderFactory func(config ProviderConfig) (live.Provider, error)
LiveProviderFactory creates a live (real-time session) Provider from configuration.
type ProviderConfig ¶
type ProviderConfig struct {
// APIKey is the authentication key for the provider.
APIKey string //nolint:gosec // G117: This is a config struct, not storing secrets
// BaseURL is an optional custom API endpoint.
BaseURL string
// Extensions holds provider-specific configuration.
// Keys and values depend on the provider.
Extensions map[string]any
}
ProviderConfig holds common configuration options for creating providers.
func ApplyOptions ¶
func ApplyOptions(opts ...ProviderOption) ProviderConfig
ApplyOptions applies provider options to a config.
func (ProviderConfig) GetBool ¶
func (c ProviderConfig) GetBool(key string, defaultValue bool) bool
GetBool retrieves a bool extension value with a default.
func (ProviderConfig) GetInt ¶
func (c ProviderConfig) GetInt(key string, defaultValue int) int
GetInt retrieves an int extension value with a default.
func (ProviderConfig) GetString ¶
func (c ProviderConfig) GetString(key, defaultValue string) string
GetString retrieves a string extension value with a default.
type ProviderOption ¶
type ProviderOption func(*ProviderConfig)
ProviderOption configures a ProviderConfig.
func WithAPIKey ¶
func WithAPIKey(key string) ProviderOption
WithAPIKey sets the API key for the provider.
func WithBaseURL ¶
func WithBaseURL(url string) ProviderOption
WithBaseURL sets a custom API base URL.
func WithExtension ¶
func WithExtension(key string, value any) ProviderOption
WithExtension sets a provider-specific configuration value.
type RenderProviderFactory ¶ added in v0.2.0
type RenderProviderFactory func(config ProviderConfig) (render.Provider, error)
RenderProviderFactory creates a render (batch generation) Provider from configuration.