postgres

package
v0.0.0-...-e9c3aaf Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgres

func NewPostgres(psqlConnString string, cfg config.Config) (storage.StorageI, error)

func NewService_1_Repo

func NewService_1_Repo(db *pgxpool.Pool) storage.Service_1_I

Types

type Links struct {
	Previous string `json:"previous"`
	Current  string `json:"current"`
	Next     string `json:"next"`
}

type Meta

type Meta struct {
	Pagination Pagination
}

type Pagination

type Pagination struct {
	Total int   `json:"total"`
	Pages int   `json:"page"`
	Page  int   `json:"pages"`
	Limit int   `json:"limit"`
	Links Links `json:"links"`
}

type Posts

type Posts struct {
	Id     int    `json:"id"`
	UserId int    `json:"user_id"`
	Title  string `json:"title"`
	Body   string `json:"body"`
}

type Response

type Response struct {
	Meta Meta    `json:"meta"`
	Data []Posts `json:"data"`
}

type Store

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

func (*Store) Service_1_I

func (s *Store) Service_1_I() storage.Service_1_I

Jump to

Keyboard shortcuts

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