Documentation ¶
Index ¶
Constants ¶
View Source
const ( DbName = "exercise_store" ExerCollection = "exercise" CatCollection = "category" )
Variables ¶
View Source
var ( MissingTagNameErr = fmt.Errorf("error! tag or exercise name is missing") MissingInstanceErr = fmt.Errorf("error! there should be at the least an instance") MissingImageErr = fmt.Errorf("error! instance image empty") MissingChildConfigErr = fmt.Errorf("error! there should be at the least a child in an instance") MissingExerciseFieldsErr = fmt.Errorf("error! not all the required fields in a child are present") MissingExerciseStaticFieldsErr = fmt.Errorf("error! not all the required static fields in a child are present") MissingExerciseDynamicFieldsErr = fmt.Errorf("error! not all the required dynamic fields in a child are present") )
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface { GetExercises() []model.Exercise GetExercisesByTags([]string) ([]model.Exercise, error) GetExercisesByCategory(string) ([]model.Exercise, error) AddExercise(string) error UpdateExercise(string) error DeleteExercisesByTags([]string) error GetCategories() []model.Category GetCategoryID(primitive.ObjectID) string AddCategory(string) error UpdateCategory(string) error DeleteCategory(string) error UpdateCache() error }
Click to show internal directories.
Click to hide internal directories.