Yimaru-BackEnd/internal/services/authentication/service.go
2025-03-28 01:30:55 +03:00

29 lines
542 B
Go

package authentication
type EmailPhone struct {
Email ValidString
PhoneNumber ValidString
Password ValidString
}
type ValidString struct {
Value string
Valid bool
}
type Tokens struct {
AccessToken string
RefreshToken string
}
type Service struct {
userStore UserStore
tokenStore TokenStore
RefreshExpiry int
}
func NewService(userStore UserStore, tokenStore TokenStore, RefreshExpiry int) *Service {
return &Service{
userStore: userStore,
tokenStore: tokenStore,
RefreshExpiry: RefreshExpiry,
}
}