Documentation ¶
Index ¶
- type ArticleRepository
- func (m *ArticleRepository) Delete(ctx context.Context, id int64) (err error)
- func (m *ArticleRepository) Fetch(ctx context.Context, cursor string, num int64) (res []domain.Article, nextCursor string, err error)
- func (m *ArticleRepository) GetByID(ctx context.Context, id int64) (res domain.Article, err error)
- func (m *ArticleRepository) GetByTitle(ctx context.Context, title string) (res domain.Article, err error)
- func (m *ArticleRepository) Store(ctx context.Context, a *domain.Article) (err error)
- func (m *ArticleRepository) Update(ctx context.Context, ar *domain.Article) (err error)
- type AuthorRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleRepository ¶
func NewArticleRepository ¶
func NewArticleRepository(conn *sql.DB) *ArticleRepository
NewArticleRepository will create an object that represent the article.Repository interface
func (*ArticleRepository) Delete ¶
func (m *ArticleRepository) Delete(ctx context.Context, id int64) (err error)
func (*ArticleRepository) GetByTitle ¶
type AuthorRepository ¶
func NewAuthorRepository ¶
func NewAuthorRepository(db *sql.DB) *AuthorRepository
NewMysqlAuthorRepository will create an implementation of author.Repository
Click to show internal directories.
Click to hide internal directories.