Documentation ¶
Overview ¶
Package postgres provides the ability for Vela to integrate with Postgres as a SQL backend.
Usage:
import "github.com/go-vela/server/database/postgres"
Index ¶
- func New(opts ...ClientOpt) (*client, error)
- func NewTest() (*client, sqlmock.Sqlmock, error)
- type ClientOpt
- func WithAddress(address string) ClientOpt
- func WithCompressionLevel(level int) ClientOpt
- func WithConnectionIdle(idle int) ClientOpt
- func WithConnectionLife(duration time.Duration) ClientOpt
- func WithConnectionOpen(open int) ClientOpt
- func WithEncryptionKey(key string) ClientOpt
- func WithSkipCreation(skipCreation bool) ClientOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientOpt ¶
type ClientOpt func(*client) error
ClientOpt represents a configuration option to initialize the database client for Postgres.
func WithAddress ¶
WithAddress sets the address in the database client for Postgres.
func WithCompressionLevel ¶
WithCompressionLevel sets the compression level in the database client for Postgres.
func WithConnectionIdle ¶
WithConnectionIdle sets the maximum idle connections in the database client for Postgres.
func WithConnectionLife ¶
WithConnectionLife sets the connection duration in the database client for Postgres.
func WithConnectionOpen ¶
WithConnectionOpen sets the maximum open connections in the database client for Postgres.
func WithEncryptionKey ¶
WithEncryptionKey sets the encryption key in the database client for Postgres.
func WithSkipCreation ¶ added in v0.9.0
WithSkipCreation sets the skip creation logic in the database client for Postgres.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package ddl provides the Postgres data definition language (DDL) for Vela.
|
Package ddl provides the Postgres data definition language (DDL) for Vela. |
Package dml provides the Postgres data manipulation language (DML) for Vela.
|
Package dml provides the Postgres data manipulation language (DML) for Vela. |