Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository interface { SavePost(ctx context.Context, post *entity.Post) (int, error) GetPosts(ctx context.Context) ([]entity.Post, error) GetPost(ctx context.Context, id int) (*entity.Post, error) UpdatePost(ctx context.Context, post *entity.Post) (int64, error) DeletePost(ctx context.Context, id int) (int64, error) GetImage(ctx context.Context, uuid string) (*entity.Image, error) GetImages(ctx context.Context, limit int) ([]entity.Image, error) SaveImage(ctx context.Context, imageData *entity.Image) error DeleteImage(ctx context.Context, uuid string) (int64, error) }
Repository is the interface that wraps the basic CRUD operations.
func New ¶
func New(db *sqlx.DB) Repository
Click to show internal directories.
Click to hide internal directories.