Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService interface { // Add your methods here Register(ctx context.Context, Username, Password, Name, LastName, Phone, Email string) (Response model.User, err error) // Username: Username, password password // Username: Phone, password password LoginUP(ctx context.Context, Username, Password string) (Response model.User, err error) // Phone: phone LoginP(ctx context.Context, Phone string) (Response model.User, err error) // token: A4613Ac9...., Type: JWT_TOKEN, Code: .... Verify(ctx context.Context, Token, Type, Code string) (Response model.User, err error) }
AuthService describes the service.
func New ¶
func New(middleware []Middleware) AuthService
New returns a AuthService with all of the expected middleware wired in.
func NewBasicAuthService ¶
func NewBasicAuthService() AuthService
NewBasicAuthService returns a naive, stateless implementation of AuthService.
type Middleware ¶
type Middleware func(AuthService) AuthService
Middleware describes a service middleware.
func LoggingMiddleware ¶
func LoggingMiddleware(logger log.Logger) Middleware
LoggingMiddleware takes a logger as a dependency and returns a AuthService Middleware.
Click to show internal directories.
Click to hide internal directories.