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 ¶
func New ¶
func New(db *gorm.DB) Repository
Click to show internal directories.
Click to hide internal directories.