Documentation
¶
Index ¶
- Variables
- func AddSocialAccountEndpoint(svc Service) endpoint.Endpoint
- func CheckHealth(svc Service) endpoint.Endpoint
- func EventEndpoint(svc Service) endpoint.Endpoint
- func OTPVerifyEndpoint(svc Service) endpoint.Endpoint
- func RegisterEndpoint(svc Service) endpoint.Endpoint
- func SignInEndpoint(svc Service) endpoint.Endpoint
- type AddSocialAccountRequest
- type EndpointSet
- type EventHandler
- type Instance
- type OTPVerifyRequest
- type RegisterRequest
- type RequestInfo
- type Service
- type ServiceMiddleware
- type SignInRequest
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckHealth ¶ added in v1.0.6
func EventEndpoint ¶
func OTPVerifyEndpoint ¶
func RegisterEndpoint ¶
func SignInEndpoint ¶
Types ¶
type AddSocialAccountRequest ¶
type AddSocialAccountRequest struct {
Credential string
Provider user.SocialProvider
UserID user.UserID
}
type EndpointSet ¶ added in v1.0.3
type EventHandler ¶ added in v1.0.3
type EventHandler interface {
UserRegisteredHandler(e *user.UserRegisteredEvent) error
UserActivatedHandler(e *user.UserActivatedEvent) error
UserSocialAccountAddedHandler(e *user.UserSocialAccountAddedEvent) error
}
type OTPVerifyRequest ¶
type RegisterRequest ¶
type RequestInfo ¶ added in v1.0.6
type Service ¶
type Service interface {
Register(username string, name string, email string) (*user.User, error)
OTPVerify(otp string, id user.UserID) (*user.User, error)
SignIn(credential string, provider user.SocialProvider) (*user.User, error)
AddSocialAccount(credential string, provider user.SocialProvider, id user.UserID) (*user.User, error)
CheckHealth(ctx context.Context) error
Handler() (EventHandler, error)
}
func NewService ¶
func NewService(users user.Repository, cfg conf.Providers) Service
type ServiceMiddleware ¶
func LoggingMiddleware ¶
func LoggingMiddleware(log *zap.Logger) ServiceMiddleware
func ProxyingMiddleware ¶ added in v1.0.3
func ProxyingMiddleware(ctx context.Context, ch <-chan Instance) ServiceMiddleware
type SignInRequest ¶
type SignInRequest struct {
Credential string
Provider user.SocialProvider
}
Click to show internal directories.
Click to hide internal directories.