repository

package
v0.0.0-...-2893c3e Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRecordWithEmailNotFound = response.NewError(http.StatusNotFound, "record with email not found")
)

Error from user repository

Functions

This section is empty.

Types

type Client

type Client struct {
	User interface {
		GetByEmail(ctx context.Context, email string) (entity.User, error)
		Insert(ctx context.Context, user entity.User) error
	}
	Nutrition interface {
		Insert(ctx context.Context, nutrition entity.Nutrition) error
		GetAllByUserID(ctx context.Context, userID string) ([]entity.Nutrition, error)
	}
	Commit   func() error
	Rollback func() error
}

type Repository

type Repository interface {
	NewClient(tx bool) (Client, error)
}

func New

func New(db *gorm.DB) Repository

Jump to

Keyboard shortcuts

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