Documentation
¶
Index ¶
- func PGResourceExistsFunc(fn func(*DBConnection, *schema.ResourceData) (bool, error)) func(*schema.ResourceData, any) (bool, error)
- func PGResourceFunc(fn func(*DBConnection, *schema.ResourceData) error) func(*schema.ResourceData, any) error
- func Provider() *schema.Provider
- type Client
- type ClientCertificateConfig
- type Config
- type DBConnection
- type PGFunction
- type PGFunctionArg
- type QueryAble
- type ResourceSchemeGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PGResourceExistsFunc ¶
func PGResourceExistsFunc(fn func(*DBConnection, *schema.ResourceData) (bool, error)) func(*schema.ResourceData, any) (bool, error)
func PGResourceFunc ¶
func PGResourceFunc(fn func(*DBConnection, *schema.ResourceData) error) func(*schema.ResourceData, any) error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct holding connection string
func (*Client) Connect ¶
func (c *Client) Connect() (*DBConnection, error)
Connect returns a copy to an sql.Open()'ed database connection wrapped in a DBConnection struct. Callers must return their database resources. Use of QueryRow() or Exec() is encouraged. Query() must have their rows.Close()'ed.
type ClientCertificateConfig ¶
type Config ¶
type Config struct {
Scheme string
Host string
Port int
Username string
Password string
DatabaseUsername string
Superuser bool
SSLMode string
ApplicationName string
Timeout int
ConnectTimeoutSec int
MaxConns int
ExpectedVersion semver.Version
SSLClientCert *ClientCertificateConfig
SSLRootCertPath string
GCPIAMImpersonateServiceAccount string
}
Config - provider config
type DBConnection ¶
type PGFunction ¶
type PGFunction struct {
Schema string
Name string
Returns string
Language string
Body string
Args []PGFunctionArg
Parallel string
SecurityDefiner bool
Strict bool
Volatility string
}
PGFunction is the model for the database function
func (*PGFunction) FromResourceData ¶
func (pgFunction *PGFunction) FromResourceData(d *schema.ResourceData) error
func (*PGFunction) Parse ¶
func (pgFunction *PGFunction) Parse(functionDefinition string) error
type PGFunctionArg ¶
func (*PGFunctionArg) Parse ¶
func (pgFunctionArg *PGFunctionArg) Parse(functionArgDefinition string) error
type QueryAble ¶
type QueryAble interface {
Exec(query string, args ...any) (sql.Result, error)
Query(query string, args ...any) (*sql.Rows, error)
QueryRow(query string, args ...any) *sql.Row
}
QueryAble is a DB connection (sql.DB/Tx)
type ResourceSchemeGetter ¶
Source Files
¶
- config.go
- data_source_helpers.go
- data_source_postgresql_schemas.go
- data_source_postgresql_sequences.go
- data_source_postgresql_tables.go
- helpers.go
- model_pg_function.go
- provider.go
- proxy_driver.go
- resource_postgresql_database.go
- resource_postgresql_default_privileges.go
- resource_postgresql_extension.go
- resource_postgresql_function.go
- resource_postgresql_grant.go
- resource_postgresql_grant_role.go
- resource_postgresql_physical_replication_slot.go
- resource_postgresql_publication.go
- resource_postgresql_replication_slot.go
- resource_postgresql_role.go
- resource_postgresql_schema.go
- resource_postgresql_security_label.go
- resource_postgresql_server.go
- resource_postgresql_subscription.go
- resource_postgresql_user_mapping.go
Click to show internal directories.
Click to hide internal directories.