store

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

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
}

func NewStore

func NewStore(host string, certPath string) (Store, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL