Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoIdentity user is considered to be not logged in ErrNoIdentity = errors.New("no identity") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service for customer management
func (*Service) GetForIdentity ¶
func (s *Service) GetForIdentity(ctx context.Context, request *web.Request) (domain.Customer, error)
GetForIdentity returns the authenticated user if logged in
func (*Service) GetUserID ¶
GetUserID returns the current user ID if logged in
Can be used to check if user is logged in. Returns ErrNoIdentity if user is considered to be not logged in.
func (*Service) Inject ¶
func (s *Service) Inject( webIdentityService *auth.WebIdentityService, customerIdentityService domain.CustomerIdentityService, ) *Service
Inject dependencies
Click to show internal directories.
Click to hide internal directories.