Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdentityService ¶
type IdentityService interface { // Signin verify user account Signin( ctx context.Context, username string, password string, opt *SigninOption, ) (identity *entity.Identity, err error) // Signup sign up a new user Signup( ctx context.Context, username string, password string, opts *SignupOption, ) (identity *entity.Identity, err error) }
IdentityService define identity service
func New ¶
func New(repo repository.Repository) IdentityService
type Middleware ¶
type Middleware func(IdentityService) IdentityService
Middleware describes a service (as opposed to endpoint) middleware.
func LoggingMiddleware ¶
func LoggingMiddleware() Middleware
LoggingMiddleware takes a logger as a dependency and returns a ServiceMiddleware.
type SigninOption ¶
type SignupOption ¶
type SignupOption struct { Nickname string // Nickname user nickname FirstName string // FirstName user first name LastName string // LastName user last name Email string // Email user email address IPAddress string // IPAddress from user login Platform string // Login platform Device entity.Device // Device login information }
Click to show internal directories.
Click to hide internal directories.