update api.go, auth.go, docs.go, handler.go, service.go, swagger.json, swagger.yaml

This commit is contained in:
redtea committed 2024-10-25 12:00:00 +03:00
1 parent 4c8b4e9fce
commit 362a6d1041
7 files changed
+1564

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
package service
import (
"esauth"
"esauth/pkg/repository"
)
type Authorization interface {
CreateUser(user *esauth.User) (int64, error)
SaveUser(user *esauth.User) (int64, error)
GenerateToken(userId int64) (string, error)
GenerateInfinityToken(userId int64) (string, error)
ParseToken(token string) (int64, error)
}
type Service struct {
Authorization
}
func NewService(repos *repository.Repository) *Service {
return &Service{
Authorization: NewAuthService(repos),
}
}