2022-06-23 11:25:35 +02:00
|
|
|
package store
|
|
|
|
|
|
|
|
import (
|
2022-06-24 18:56:06 +02:00
|
|
|
"git.andreafazzi.eu/andrea/probo/client"
|
|
|
|
"git.andreafazzi.eu/andrea/probo/models"
|
2022-06-23 11:25:35 +02:00
|
|
|
)
|
|
|
|
|
2022-06-29 16:08:55 +02:00
|
|
|
type ProboCollectorStore interface {
|
2022-06-23 11:25:35 +02:00
|
|
|
ReadAllQuizzes() ([]*models.Quiz, error)
|
2023-07-10 13:23:46 +02:00
|
|
|
ReadQuizByHash(hash string) (*models.Quiz, error)
|
2022-06-29 16:08:55 +02:00
|
|
|
CreateQuiz(r *client.CreateUpdateQuizRequest) (*models.Quiz, error)
|
|
|
|
UpdateQuiz(r *client.CreateUpdateQuizRequest, id string) (*models.Quiz, error)
|
2023-09-01 11:48:09 +02:00
|
|
|
DeleteQuiz(r *client.DeleteQuizRequest) (*models.Quiz, error)
|
2023-10-07 11:43:12 +02:00
|
|
|
|
|
|
|
ReadAllCollections() ([]*models.Collection, error)
|
|
|
|
ReadCollectionByID(id string) (*models.Collection, error)
|
|
|
|
CreateCollection(r *client.CreateUpdateCollectionRequest) (*models.Collection, error)
|
|
|
|
UpdateCollection(r *client.CreateUpdateCollectionRequest, id string) (*models.Collection, error)
|
|
|
|
DeleteCollection(r *client.DeleteCollectionRequest) (*models.Collection, error)
|
2022-06-23 11:25:35 +02:00
|
|
|
}
|