Skip to content

Instantly share code, notes, and snippets.

@bxcodec
Last active October 10, 2017 15:44
Show Gist options
  • Save bxcodec/c57ddd3e362c4f41ede244cd3756b762 to your computer and use it in GitHub Desktop.
Save bxcodec/c57ddd3e362c4f41ede244cd3756b762 to your computer and use it in GitHub Desktop.
ArticleRepo Clean Arch
package repository
import models "github.com/bxcodec/go-clean-arch/article"
type ArticleRepository interface {
Fetch(cursor string, num int64) ([]*models.Article, error)
GetByID(id int64) (*models.Article, error)
GetByTitle(title string) (*models.Article, error)
Update(article *models.Article) (*models.Article, error)
Store(a *models.Article) (int64, error)
Delete(id int64) (bool, error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment