Documentation ¶ Overview ¶ Package postgres implements postgres connection. Index ¶ type Option func ConnAttempts(attempts int) Option func ConnTimeout(timeout time.Duration) Option type Postgres func New(url string, opts ...Option) (*Postgres, error) func (p *Postgres) Close() Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Option ¶ type Option func(*Postgres) Option -. func ConnAttempts ¶ func ConnAttempts(attempts int) Option ConnAttempts -. func ConnTimeout ¶ func ConnTimeout(timeout time.Duration) Option ConnTimeout -. type Postgres ¶ type Postgres struct { Builder squirrel.StatementBuilderType Db *sqlx.DB // contains filtered or unexported fields } Postgres -. func New ¶ func New(url string, opts ...Option) (*Postgres, error) New -. func (*Postgres) Close ¶ func (p *Postgres) Close() Close -. Source Files ¶ View all Source files options.go postgres.go Click to show internal directories. Click to hide internal directories.