Documentation ¶
Index ¶
- type Postgres
- func (p *Postgres) AddPost(post models.Post) (int, error)
- func (p *Postgres) DeletePost(id int) error
- func (p *Postgres) GetAllPosts() ([]models.Post, error)
- func (p *Postgres) GetPost(id int) (models.Post, error)
- func (p *Postgres) Migrate() error
- func (p *Postgres) UpdatePost(post models.Post) (int, error)
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 (*Postgres) DeletePost ¶
Click to show internal directories.
Click to hide internal directories.