Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DbConnection *sql.DB
DbConnection - Database Connectin Pool
Functions ¶
Types ¶
type BookRepo ¶
type BookRepo struct {
Name string
}
BookRepo - Book repository
func GetBookRepository ¶
func GetBookRepository() BookRepo
GetBookRepository - returns book repository
type Repo ¶
type Repo interface { Select(doc interface{}) (*list.List, error) Insert(doc interface{}) (int64, error) Update(doc interface{}) (int64, error) Remove(doc interface{}) (int64, error) }
Repo - abstract repository interface
type StudentRepo ¶
type StudentRepo struct {
Name string
}
StudentRepo - Student repository
func GetStudentRepository ¶
func GetStudentRepository() StudentRepo
GetStudentRepository - returns student repository
func (StudentRepo) Insert ¶
func (repo StudentRepo) Insert(doc interface{}) (int64, error)
Insert - Insert Student to db
func (StudentRepo) Remove ¶
func (repo StudentRepo) Remove(doc interface{}) (int64, error)
Remove - Delete student from db
func (StudentRepo) Select ¶
func (repo StudentRepo) Select() (*list.List, error)
Select - Select students from db
func (StudentRepo) Update ¶
func (repo StudentRepo) Update(doc interface{}) (int64, error)
Update - Update student
Click to show internal directories.
Click to hide internal directories.