postgres

package
v0.0.0-...-d4e755f Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Postgres

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

func NewPostgres

func NewPostgres(configDB string) (*Postgres, error)

func (*Postgres) AddPost

func (p *Postgres) AddPost(post models.Post) (int, error)

func (*Postgres) DeletePost

func (p *Postgres) DeletePost(id int) error

func (*Postgres) GetAllPosts

func (p *Postgres) GetAllPosts() ([]models.Post, error)

func (*Postgres) GetPost

func (p *Postgres) GetPost(id int) (models.Post, error)

func (*Postgres) Migrate

func (p *Postgres) Migrate() error

func (*Postgres) UpdatePost

func (p *Postgres) UpdatePost(post models.Post) (int, error)

Jump to

Keyboard shortcuts

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