Documentation ¶
Index ¶
- type ArticleRepo
- func (a *ArticleRepo) CreateArticle(ctx context.Context, user *models.User, input models.NewArticle) (*models.Article, error)
- func (a *ArticleRepo) DeleteArticle(ctx context.Context, id string) (bool, error)
- func (a *ArticleRepo) GetArticleByID(ctx context.Context, id string) (*models.Article, error)
- func (a *ArticleRepo) GetArticles(ctx context.Context, filter *models.ArticleFilter, first, offset *int) ([]*models.Article, error)
- func (a *ArticleRepo) GetArticlesByUserIDs(ids []string) ([][]*models.Article, []error)
- func (a *ArticleRepo) UpdateArticle(ctx context.Context, id string, input models.UpdateArticle) (*models.Article, error)
- type AuthRepo
- type ImageRepo
- func (i *ImageRepo) CreateImage(ctx context.Context, input models.NewImage) (*models.Image, error)
- func (i *ImageRepo) DeleteImage(ctx context.Context, id string) (bool, error)
- func (i *ImageRepo) GetImageByID(ctx context.Context, id string) (*models.Image, error)
- func (i *ImageRepo) GetImageBySlug(ctx context.Context, slug string) (*models.Image, error)
- func (i *ImageRepo) GetImages(ctx context.Context, filter *models.ImageFilter, first, offset *int) ([]*models.Image, error)
- func (i *ImageRepo) UpdateImage(ctx context.Context, id string, input models.UpdateImage) (*models.Image, error)
- type Repos
- type UserRepo
- func (u *UserRepo) CreateUser(ctx context.Context, input models.NewUser) (*models.User, error)
- func (u *UserRepo) DeleteUser(ctx context.Context, id string) (bool, error)
- func (u *UserRepo) GetUserByEmail(ctx context.Context, email string) (*models.User, error)
- func (u *UserRepo) GetUserByID(ctx context.Context, id string) (*models.User, error)
- func (u *UserRepo) GetUsers(ctx context.Context, filter *models.UserFilter, first, offset *int) ([]*models.User, error)
- func (u *UserRepo) GetUsersByIDs(ids []string) ([]*models.User, []error)
- func (u *UserRepo) UpdateUser(ctx context.Context, id string, input models.UpdateUser) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleRepo ¶
func (*ArticleRepo) CreateArticle ¶
func (a *ArticleRepo) CreateArticle(ctx context.Context, user *models.User, input models.NewArticle) (*models.Article, error)
func (*ArticleRepo) DeleteArticle ¶
func (*ArticleRepo) GetArticleByID ¶
func (*ArticleRepo) GetArticles ¶
func (a *ArticleRepo) GetArticles(ctx context.Context, filter *models.ArticleFilter, first, offset *int) ([]*models.Article, error)
func (*ArticleRepo) GetArticlesByUserIDs ¶
func (a *ArticleRepo) GetArticlesByUserIDs(ids []string) ([][]*models.Article, []error)
func (*ArticleRepo) UpdateArticle ¶
func (a *ArticleRepo) UpdateArticle(ctx context.Context, id string, input models.UpdateArticle) (*models.Article, error)
type AuthRepo ¶
func (*AuthRepo) Authenticate ¶
type ImageRepo ¶
func (*ImageRepo) CreateImage ¶
func (*ImageRepo) DeleteImage ¶
func (*ImageRepo) GetImageByID ¶
func (*ImageRepo) GetImageBySlug ¶
type UserRepo ¶
func (*UserRepo) CreateUser ¶
func (*UserRepo) DeleteUser ¶
func (*UserRepo) GetUserByEmail ¶
func (*UserRepo) GetUserByID ¶
func (*UserRepo) GetUsersByIDs ¶
Click to show internal directories.
Click to hide internal directories.