repository

package
v0.0.0-...-91de801 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL