Documentation ¶
Index ¶
- func Connect(dbName string)
- type Postgres
- func (p *Postgres) JsonString(w http.ResponseWriter, query *string, args ...any) (string, error)
- func (p *Postgres) PgxPoolClose()
- func (p *Postgres) Query(query *string, args ...any) (pgx.Rows, error)
- func (p *Postgres) QueryRow(query *string, args ...any) pgx.Row
- func (p *Postgres) WriteJsonString(w http.ResponseWriter, query *string, args ...any)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
var (
Instance Postgres
)
func (*Postgres) JsonString ¶
Returns JSON string serialized by postgres
func (*Postgres) PgxPoolClose ¶
func (p *Postgres) PgxPoolClose()
func (*Postgres) WriteJsonString ¶
func (p *Postgres) WriteJsonString(w http.ResponseWriter, query *string, args ...any)
Writes JSON string serialized by postgres to provided http.ResponseWriter
Click to show internal directories.
Click to hide internal directories.