service

package
v0.0.0-...-90cdabe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigurationService

type ConfigurationService struct{}

func (*ConfigurationService) GetConfig

func (config *ConfigurationService) GetConfig() models.Config

type CryptoService

type CryptoService struct {
	// contains filtered or unexported fields
}

func (*CryptoService) GenerateToken

func (cryptoService *CryptoService) GenerateToken(user models.User) (string, error)

Generate JWT Token

func (*CryptoService) Init

func (cryptoService *CryptoService) Init(config models.Config)

func (*CryptoService) TokenVerifyMiddleWare

func (cryptoService *CryptoService) TokenVerifyMiddleWare(next http.HandlerFunc) http.HandlerFunc

type UserService

type UserService struct {
	ConfigurationService ConfigurationService
	CryptoService        CryptoService
	UserRepository       repository.UserRepository
}

func (UserService) GetUserByEmail

func (userService UserService) GetUserByEmail(email string) (models.UserResult, error)

func (UserService) Login

func (userService UserService) Login(user models.User) (models.JWT, error)

func (UserService) RegisterUser

func (userService UserService) RegisterUser(user models.User) (models.User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL