Documentation ¶
Index ¶
- Constants
- type CommentsRepository
- type ImagesRepository
- type PGXCommentsRepository
- func (r *PGXCommentsRepository) Create(ctx context.Context, comment *models.Comment) (uuid.UUID, error)
- func (r *PGXCommentsRepository) FindByID(ctx context.Context, commentID uuid.UUID) (*models.Comment, error)
- func (r *PGXCommentsRepository) FindByImageID(ctx context.Context, imageID uuid.UUID) ([]models.Comment, error)
- type PGXImagesRepository
- func (r *PGXImagesRepository) Create(ctx context.Context, image *models.Image) (uuid.UUID, error)
- func (r *PGXImagesRepository) FindByID(ctx context.Context, id uuid.UUID) (*models.Image, error)
- func (r *PGXImagesRepository) FindMany(ctx context.Context, page uint64) ([]models.Post, error)
- func (r *PGXImagesRepository) GetImageByID(ctx context.Context, imageID uuid.UUID) (*models.Image, error)
- func (r *PGXImagesRepository) GetImagesByUserID(ctx context.Context, userID uuid.UUID) ([]models.Image, error)
- type PGXUsersRepository
- func (r *PGXUsersRepository) Create(ctx context.Context, user *models.User) (uuid.UUID, error)
- func (r *PGXUsersRepository) FindByEmail(ctx context.Context, email string) (*models.User, error)
- func (r *PGXUsersRepository) FindByID(ctx context.Context, id uuid.UUID) (*models.User, error)
- func (r *PGXUsersRepository) Update(ctx context.Context, user *models.User) error
- type UsersRepository
Constants ¶
View Source
const ITEMS_PER_PAGE = 20
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentsRepository ¶
type CommentsRepository interface { Create(ctx context.Context, comment *models.Comment) (uuid.UUID, error) FindByID(ctx context.Context, commentID uuid.UUID) (*models.Comment, error) FindByImageID( ctx context.Context, imageID uuid.UUID, ) ([]models.Comment, error) }
func NewPGXCommentsRepository ¶
func NewPGXCommentsRepository(pool *pgxpool.Pool) CommentsRepository
type ImagesRepository ¶
type ImagesRepository interface { Create(ctx context.Context, image *models.Image) (uuid.UUID, error) GetImageByID( ctx context.Context, imageID uuid.UUID, ) (*models.Image, error) GetImagesByUserID( ctx context.Context, userID uuid.UUID, ) ([]models.Image, error) FindMany(ctx context.Context, page uint64) ([]models.Post, error) FindByID(ctx context.Context, id uuid.UUID) (*models.Image, error) }
func NewPGXImagesRepository ¶
func NewPGXImagesRepository(db *pgxpool.Pool) ImagesRepository
type PGXCommentsRepository ¶
type PGXCommentsRepository struct {
// contains filtered or unexported fields
}
func (*PGXCommentsRepository) FindByImageID ¶
type PGXImagesRepository ¶
type PGXImagesRepository struct {
// contains filtered or unexported fields
}
func (*PGXImagesRepository) GetImageByID ¶
func (*PGXImagesRepository) GetImagesByUserID ¶
type PGXUsersRepository ¶
type PGXUsersRepository struct {
// contains filtered or unexported fields
}
func (*PGXUsersRepository) FindByEmail ¶
type UsersRepository ¶
type UsersRepository interface { Create(ctx context.Context, user *models.User) (uuid.UUID, error) FindByEmail(ctx context.Context, email string) (*models.User, error) FindByID(ctx context.Context, id uuid.UUID) (*models.User, error) Update(ctx context.Context, user *models.User) error }
func NewPGXUsersRepository ¶
func NewPGXUsersRepository(db *pgxpool.Pool) UsersRepository
Click to show internal directories.
Click to hide internal directories.