Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Register ¶
func Register(name string, factory DataStoreFactory)
Register saves data store into a data store factory
Types ¶
type DataStore ¶
type DataStore interface { AddStudent(student *models.Student) (string, error) GetStudent(id string) (*models.Student, error) DeleteStudent(id string) error UpdateStudent(student *models.Student) error AddTeacher(teacher *models.Teacher) (string, error) GetTeacher(id string) (*models.Teacher, error) DeleteTeacher(id string) error UpdateTeacher(teacher *models.Teacher) error }
DataStore is an interface for query ops
type DataStoreFactory ¶
DataStoreFactory holds configuration for data store
Click to show internal directories.
Click to hide internal directories.