Documentation
¶
Index ¶
- type Extension
- type Registry
- func (r *Registry) Get(name string) (*Extension, bool)
- func (r *Registry) GetBySQL(sqlName string) (*Extension, bool)
- func (r *Registry) GetMissingExtensions(extensions []*Extension) []*Extension
- func (r *Registry) GetRequiredExtensions(extensions []*Extension) []*Extension
- func (r *Registry) GetUninstalledExtensions(extensions []*Extension) []*Extension
- func (r *Registry) List() []*Extension
- func (r *Registry) ParseFromEnvironment() ([]*Extension, error)
- func (r *Registry) Register(ext *Extension)
- func (r *Registry) ValidatePostgreSQLVersion(extensions []*Extension, pgVersion float32) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extension ¶
type Extension struct {
Name string `json:"name"` // Extension package name
SQLName string `json:"sql_name"` // SQL name used in CREATE EXTENSION
Description string `json:"description"` // Brief description
Required bool `json:"required"` // Whether this extension is required
MinVersion float32 `json:"min_version"` // Minimum PostgreSQL version required
Available bool `json:"available"` // Whether extension files are available
Installed bool `json:"installed"` // Whether extension is installed in database
Install func(p pkg.Postgres) error
IsInstalled func(p pkg.Postgres) bool
Health func(p pkg.Postgres) error
}
Extension represents a PostgreSQL extension configuration
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry holds the extension registry
func GetDefaultRegistry ¶
func GetDefaultRegistry() *Registry
GetDefaultRegistry returns the default extension registry with built-in extensions
func (*Registry) GetMissingExtensions ¶
GetMissingExtensions returns extensions that are required but not available
func (*Registry) GetRequiredExtensions ¶
GetRequiredExtensions returns only the extensions marked as required
func (*Registry) GetUninstalledExtensions ¶
GetUninstalledExtensions returns extensions that are available but not installed
func (*Registry) ParseFromEnvironment ¶
ParseFromEnvironment parses the POSTGRES_EXTENSIONS environment variable and returns a list of extensions with their status updated
Click to show internal directories.
Click to hide internal directories.