update google-callback.html, repository.go, script.js, telegram-callback.html
This commit is contained in:
1 parent
ecfac68f89
commit
d73a4f44cb
4 files changed
+227
No files matched your search
@@ -0,0 +1,27 @@
|
||||
package repository
|
||||
|
||||
import (
|
||||
"esauth"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Authorization interface {
|
||||
CreateUser(user *esauth.User) (int64, error)
|
||||
SaveUser(user *esauth.User) (int64, error)
|
||||
GetUser(id int64) (esauth.User, error)
|
||||
FindUser(query, param string) (esauth.User, error)
|
||||
GetUsers(start, limit int) []int64
|
||||
DeleteUser(id int64) error
|
||||
GetUsersCount() int64
|
||||
}
|
||||
|
||||
type Repository struct {
|
||||
Authorization
|
||||
}
|
||||
|
||||
func NewRepository(db *gorm.DB) *Repository {
|
||||
return &Repository{
|
||||
Authorization: NewAuthSchema(db),
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user