repository

package
v0.0.0-...-ca0e800 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: MIT Imports: 4 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 {
	SaveUser(ctx context.Context, user *entity.User) error
	GetUserByEmail(ctx context.Context, email string) (*entity.User, error)

	SaveLink(ctx context.Context, link *entity.Link) error
	GetLink(ctx context.Context, slug string) (*entity.Link, error)
	GetLinks(ctx context.Context, user_id string) ([]entity.Link, error)
	GetLinksByDescription(
		ctx context.Context, description, user_id string,
	) ([]entity.Link, error)
	UpdateLink(ctx context.Context, description string, id int) error
	DeleteLink(ctx context.Context, slug, user_id 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