repository

package
v0.0.0-...-af7f33b Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresArticleRepository

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

PostgresArticleRepository implements article repository

func NewPostgresArticleRepository

func NewPostgresArticleRepository(conn *gorm.DB) *PostgresArticleRepository

NewPostgresArticleRepository return new instances of postgres article repository

func (*PostgresArticleRepository) CreateArticle

func (r *PostgresArticleRepository) CreateArticle(a *model.Article) error

CreateArticle ...

func (*PostgresArticleRepository) GetAllArticle

func (r *PostgresArticleRepository) GetAllArticle() ([]*model.Article, error)

GetAllArticle ...

func (*PostgresArticleRepository) GetArticleByID

func (r *PostgresArticleRepository) GetArticleByID(id int) (*model.Article, error)

GetArticleByID ...

Jump to

Keyboard shortcuts

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