Documentation ¶
Index ¶
- Constants
- type Credentials
- type Ingredient
- type IngredientsRepository
- type Recipe
- type RecipesRepository
- type RedisRepository
- type Step
- type StepsRepository
- type User
- type UsersRepository
- func (u *UsersRepository) ExistsByEmail(email string) (bool, error)
- func (u *UsersRepository) ExistsByUsername(username string) (bool, error)
- func (u *UsersRepository) Insert(username, email, password string) (int64, error)
- func (u *UsersRepository) Verify(login, password string) (bool, int64, error)
Constants ¶
View Source
const BCRYPT_COST = 10
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Credentials ¶
type Ingredient ¶
type IngredientsRepository ¶
type IngredientsRepository struct {
// contains filtered or unexported fields
}
func NewIngredientsRepository ¶
func NewIngredientsRepository(db *sql.DB) *IngredientsRepository
func (*IngredientsRepository) GetForRecipe ¶
func (r *IngredientsRepository) GetForRecipe(recipeID int64) ([]*Ingredient, error)
type Recipe ¶
type Recipe struct { ID *int64 `json:"id"` Name *string `json:"name"` Description *string `json:"description"` Creator *string `json:"creator,omitempty"` Servings *int `json:"servings,omitempty"` PrepTime *string `json:"prep_time,omitempty"` CookTime *string `json:"cook_time,omitempty"` CoolTime *string `json:"cool_time,omitempty"` TotalTime *string `json:"total_time,omitempty"` Source *string `json:"source,omitempty"` }
type RecipesRepository ¶
type RecipesRepository struct {
// contains filtered or unexported fields
}
func NewRecipesRepository ¶
func NewRecipesRepository(db *sql.DB) *RecipesRepository
type RedisRepository ¶
type RedisRepository struct {
// contains filtered or unexported fields
}
func NewRedisRepository ¶
func NewRedisRepository(client redis.Cmdable) *RedisRepository
func (*RedisRepository) DeleteTokenDetails ¶
func (r *RedisRepository) DeleteTokenDetails(uuid string) (int64, error)
func (*RedisRepository) RetrieveTokenDetails ¶
func (r *RedisRepository) RetrieveTokenDetails(details *token.AccessDetails) (int64, error)
func (*RedisRepository) StoreTokenDetails ¶
func (r *RedisRepository) StoreTokenDetails(userID int64, details *token.Details) error
type StepsRepository ¶
type StepsRepository struct {
// contains filtered or unexported fields
}
func NewStepsRepository ¶
func NewStepsRepository(db *sql.DB) *StepsRepository
func (*StepsRepository) GetForRecipe ¶
func (r *StepsRepository) GetForRecipe(recipeID int64) ([]*Step, error)
type UsersRepository ¶
type UsersRepository struct {
// contains filtered or unexported fields
}
func NewUsersRepository ¶
func NewUsersRepository(db *sql.DB) *UsersRepository
func (*UsersRepository) ExistsByEmail ¶
func (u *UsersRepository) ExistsByEmail(email string) (bool, error)
func (*UsersRepository) ExistsByUsername ¶
func (u *UsersRepository) ExistsByUsername(username string) (bool, error)
Click to show internal directories.
Click to hide internal directories.