Documentation ¶
Index ¶
- type ArticleItem
- type ArticlePostgres
- func (a *ArticlePostgres) Create(userId int, art models.Article) (int, error)
- func (a *ArticlePostgres) Delete(userId, articleId int) error
- func (a *ArticlePostgres) Get(userId, articleId int) (models.Article, error)
- func (a *ArticlePostgres) SelectAll(userId int) ([]models.Article, error)
- func (a *ArticlePostgres) Update(userId, articleId int, upArt models.UpdateArticle) error
- type Auth
- type Authorization
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleItem ¶
type ArticlePostgres ¶
type ArticlePostgres struct {
// contains filtered or unexported fields
}
func NewArticlePostgres ¶
func NewArticlePostgres(db *sqlx.DB) *ArticlePostgres
func (*ArticlePostgres) Delete ¶
func (a *ArticlePostgres) Delete(userId, articleId int) error
func (*ArticlePostgres) Get ¶
func (a *ArticlePostgres) Get(userId, articleId int) (models.Article, error)
func (*ArticlePostgres) SelectAll ¶
func (a *ArticlePostgres) SelectAll(userId int) ([]models.Article, error)
func (*ArticlePostgres) Update ¶
func (a *ArticlePostgres) Update(userId, articleId int, upArt models.UpdateArticle) error
type Authorization ¶
type Repository ¶
type Repository struct { Authorization ArticleItem }
func NewRepository ¶
func NewRepository(db *sqlx.DB) *Repository
Click to show internal directories.
Click to hide internal directories.