Documentation ¶
Overview ¶
Package postgresql contains an implementation of the `gokv.Store` interface for PostgreSQL.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = Options{ ConnectionURL: "postgres://postgres@/" + defaultDBname + "?sslmode=disable", TableName: "Item", MaxOpenConnections: 100, Codec: encoding.JSON, }
DefaultOptions is an Options object with default values. ConnectionURL: "postgres://postgres@/gokv?sslmode=disable", TableName: "Item", MaxOpenConnections: 100, Codec: encoding.JSON
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Connection URL. // Format: postgres://username[:password]@[address]/dbname[?param1=value1&...¶mN=valueN]. // Full example: "postgres://username:password@host:123/dbname?sslmode=verify-full". // Minimal example: "postgres://postgres@/dbname". // The database ("dbname" in the example) must already exist. // Optional ("postgres://postgres@/gokv?sslmode=disable" by default, // which will connect to "localhost:5432" // and requires the server to be configured with "trust" authentication // to not require a password when connecting from the same host. // When running the official PostgreSQL Docker container // and accessing it from outside the container, // this is NOT the "same host" (except when running with `--network host`)). ConnectionURL string // Name of the table in which the key-value pairs are stored. // Optional ("Item" by default). TableName string // Limits the number of open connections to the PostgreSQL server. // -1 for no limit. 0 will lead to the default value (100) being set. // Optional (100 by default). MaxOpenConnections int // Encoding format. // Optional (encoding.JSON by default). Codec encoding.Codec }
Options are the options for the PostgreSQL client.
Click to show internal directories.
Click to hide internal directories.