Basic JWT is now working #12

Merged
jtom38 merged 12 commits from features/jwt/maybe into main 2024-03-29 14:51:01 -07:00
Showing only changes of commit e08dbea213 - Show all commits

View File

@ -0,0 +1,45 @@
package repositories
import (
"database/sql"
"errors"
"go-cook/api/models"
)
type IRecipeTable interface {
Create(models.RecipeModel) error
List() ([]models.RecipeModel, error)
Get(id int) (models.RecipeModel, error)
Update(id int, entity models.RecipeModel) error
Delete(id int) error
}
type RecipeRepository struct {
client *sql.DB
}
func NewRecipeRepository(client *sql.DB) RecipeRepository {
return RecipeRepository{
client: client,
}
}
func (rr RecipeRepository) Create(models.RecipeModel) error {
return errors.New("not implemented")
}
func (rr RecipeRepository) List() ([]models.RecipeModel, error) {
return []models.RecipeModel{}, errors.New("not implemented")
}
func (rr RecipeRepository) Get(id int) (models.RecipeModel, error) {
return models.RecipeModel{}, errors.New("not implemented")
}
func (rr RecipeRepository) Update(id int, entity models.RecipeModel) error {
return errors.New("not implemented")
}
func (rr RecipeRepository) Delete(id int) error {
return errors.New("not implemented")
}