Documentation
¶
Index ¶
- Variables
- type Catalog
- func (c *Catalog) Authenticate(ctx context.Context, token string) (*model.User, error)
- func (c *Catalog) DeleteRating(ctx context.Context, user *model.User, ratingID int) error
- func (c *Catalog) DeleteRatings(ctx context.Context, user *model.User) error
- func (c *Catalog) GetDoughs(ctx context.Context) ([]model.Dough, error)
- func (c *Catalog) GetHistory(ctx context.Context, limit int) ([]model.Pizza, error)
- func (c *Catalog) GetIngredients(ctx context.Context, t string) ([]model.Ingredient, error)
- func (c *Catalog) GetRating(ctx context.Context, user *model.User, ratingID int) (*model.Rating, error)
- func (c *Catalog) GetRatings(ctx context.Context, user *model.User) ([]*model.Rating, error)
- func (c *Catalog) GetRecommendation(ctx context.Context, id int) (*model.Pizza, error)
- func (c *Catalog) GetTools(ctx context.Context) ([]string, error)
- func (c *Catalog) LoginUser(ctx context.Context, username, passwordText string) (*model.User, error)
- func (c *Catalog) RecordRating(ctx context.Context, rating *model.Rating) error
- func (c *Catalog) RecordRecommendation(ctx context.Context, pizza *model.Pizza) error
- func (c *Catalog) RecordUser(ctx context.Context, user *model.User) error
- func (c *Catalog) UpdateRating(ctx context.Context, user *model.User, rating *model.Rating) (*model.Rating, error)
- type Copy
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrGlobalOperationNotPermitted = errors.New("operation not permitted for default user")
View Source
var ErrUsernameTaken = errors.New("username already taken")
Functions ¶
This section is empty.
Types ¶
type Catalog ¶ added in v0.5.0
type Catalog struct {
// contains filtered or unexported fields
}
func NewCatalog ¶ added in v0.5.0
func (*Catalog) Authenticate ¶ added in v0.13.3
Authenticate finds the corresponding user for token. If a user is not found, then a default user is returned, with ID 1. This is done in order to simplify the testing/usage of QuickPizza in general. This function will always return a user, unless it returns a non-nil error.
func (*Catalog) DeleteRating ¶ added in v0.13.3
func (*Catalog) DeleteRatings ¶ added in v0.13.4
func (*Catalog) GetHistory ¶ added in v0.5.0
func (*Catalog) GetIngredients ¶ added in v0.5.0
func (*Catalog) GetRatings ¶ added in v0.13.3
func (*Catalog) GetRecommendation ¶ added in v0.12.1
func (*Catalog) RecordRating ¶ added in v0.13.3
func (*Catalog) RecordRecommendation ¶ added in v0.5.0
func (*Catalog) RecordUser ¶ added in v0.13.3
type Copy ¶ added in v0.5.0
type Copy struct {
// contains filtered or unexported fields
}
func (*Copy) GetAdjectives ¶ added in v0.5.0
func (*Copy) GetClassicalNames ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.