20 lines
833 B
Go
20 lines
833 B
Go
package store
|
|
|
|
import (
|
|
"git.andreafazzi.eu/andrea/probo/client"
|
|
"git.andreafazzi.eu/andrea/probo/models"
|
|
)
|
|
|
|
type ProboCollectorStore interface {
|
|
ReadAllQuizzes() ([]*models.Quiz, error)
|
|
ReadQuizByHash(hash string) (*models.Quiz, error)
|
|
CreateQuiz(r *client.CreateUpdateQuizRequest) (*models.Quiz, error)
|
|
UpdateQuiz(r *client.CreateUpdateQuizRequest, id string) (*models.Quiz, error)
|
|
DeleteQuiz(r *client.DeleteQuizRequest) (*models.Quiz, error)
|
|
|
|
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)
|
|
}
|