Documentation ¶
Index ¶
- type AuthService
- func (authService *AuthService) GenerateJwtToken(user *models.User, authMode string) string
- func (authService *AuthService) LoginByUsernamePassword(username string, password string) (string, *models.User)
- func (authService *AuthService) ReSendLoginOtpPhone(phone string) (bool, string)
- func (authService *AuthService) SendLoginOtpPhone(phone string) (bool, string)
- func (authService *AuthService) SignupByUsernamePassword(data map[string]interface{}) (string, *models.User)
- func (authService *AuthService) VerifyLoginOtpPhone(phone string, otp string) (string, *models.User)
- type ExampleService
- func (exampleService *ExampleService) CreateExample(data map[string]interface{}) (*models.Example, error)
- func (exampleService *ExampleService) DeleteExample(exampleId int) bool
- func (exampleService *ExampleService) GetExample(exampleId int) *models.Example
- func (exampleService *ExampleService) UpdateExample(data map[string]interface{}) bool
- type UserService
- func (userService *UserService) CreateUser(data map[string]interface{}) *models.User
- func (userService *UserService) GetActiveUserById(userId int) *models.User
- func (userService *UserService) UpdatePassword(userId int, password string) error
- func (userService *UserService) UpdateUser(userId int, data map[string]interface{}) (*models.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct{}
func (*AuthService) GenerateJwtToken ¶
func (authService *AuthService) GenerateJwtToken(user *models.User, authMode string) string
func (*AuthService) LoginByUsernamePassword ¶
func (authService *AuthService) LoginByUsernamePassword(username string, password string) (string, *models.User)
@name LoginByUsernamePassword @description LoginByUsernamePassword @return string
func (*AuthService) ReSendLoginOtpPhone ¶
func (authService *AuthService) ReSendLoginOtpPhone(phone string) (bool, string)
func (*AuthService) SendLoginOtpPhone ¶
func (authService *AuthService) SendLoginOtpPhone(phone string) (bool, string)
func (*AuthService) SignupByUsernamePassword ¶
func (authService *AuthService) SignupByUsernamePassword(data map[string]interface{}) (string, *models.User)
func (*AuthService) VerifyLoginOtpPhone ¶
type ExampleService ¶
type ExampleService struct{}
func (*ExampleService) CreateExample ¶
func (exampleService *ExampleService) CreateExample(data map[string]interface{}) (*models.Example, error)
func (*ExampleService) DeleteExample ¶
func (exampleService *ExampleService) DeleteExample(exampleId int) bool
func (*ExampleService) GetExample ¶
func (exampleService *ExampleService) GetExample(exampleId int) *models.Example
func (*ExampleService) UpdateExample ¶
func (exampleService *ExampleService) UpdateExample(data map[string]interface{}) bool
type UserService ¶
type UserService struct{}
func (*UserService) CreateUser ¶
func (userService *UserService) CreateUser(data map[string]interface{}) *models.User
func (*UserService) GetActiveUserById ¶
func (userService *UserService) GetActiveUserById(userId int) *models.User
func (*UserService) UpdatePassword ¶
func (userService *UserService) UpdatePassword(userId int, password string) error
func (*UserService) UpdateUser ¶
Click to show internal directories.
Click to hide internal directories.