src

package
v0.0.0-...-a089b4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type BooksHandler

type BooksHandler struct {
	PgConn PostgresConnector
}

func NewBooksHandler

func NewBooksHandler(PgConn PostgresConnector) BooksHandler

func (BooksHandler) GET

func (h BooksHandler) GET() http.Handler

type DataBaseConfiguration

type DataBaseConfiguration struct {
	Type            string `json:"type"`
	Host            string `json:"host"`
	Port            int    `json:"port"`
	Username        string `json:"username"`
	Password        string `json:"password"`
	DBName          string `json:"dbname"`
	SSL             string `json:"ssl"`
	ConnMaxLifetime int    `json:"connMaxLifetime"`
	MaxIdleConns    int    `json:"maxIdleConns"`
	MaxOpenConns    int    `json:"maxOpenConns"`
}

type PostgresConnector

type PostgresConnector struct {
	// contains filtered or unexported fields
}

func NewPostgresConnector

func NewPostgresConnector(gConfig DataBaseConfiguration) PostgresConnector

func (PostgresConnector) DBConnection

func (pc PostgresConnector) DBConnection() *sql.DB

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL