Documentation ¶
Index ¶
- Constants
- func NewUseCase(repository oauthDomain.Repository, ...) oauthDomain.UseCase
- type Service
- func (s *Service) ClearUserSession() error
- func (s *Service) GetFlashMessage() (interface{}, error)
- func (s *Service) GetUserSession() (*oauthDomain.UserSession, error)
- func (s *Service) SetFlashMessage(msg string) error
- func (s *Service) SetSessionService(r *http.Request, w http.ResponseWriter)
- func (s *Service) SetUserSession(userSession *oauthDomain.UserSession) error
- func (s *Service) StartSession() error
Constants ¶
View Source
const ( // Superuser ... Superuser = "superuser" // User ... User = "user" )
Variables ¶
This section is empty.
Functions ¶
func NewUseCase ¶
func NewUseCase( repository oauthDomain.Repository, sampleExtServiceUseCase sampleExtServiceDomain.SampleExtServiceUseCase, kafkaProducer oauthDomain.KafkaProducer, ) oauthDomain.UseCase
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService returns a new Service instance
func (*Service) ClearUserSession ¶
ClearUserSession deletes the user session
func (*Service) GetFlashMessage ¶
GetFlashMessage returns the first flash message
func (*Service) GetUserSession ¶
func (s *Service) GetUserSession() (*oauthDomain.UserSession, error)
GetUserSession returns the user session
func (*Service) SetFlashMessage ¶
SetFlashMessage sets a flash message, useful for displaying an error after 302 redirection
func (*Service) SetSessionService ¶
func (s *Service) SetSessionService(r *http.Request, w http.ResponseWriter)
SetSessionService sets the request and responseWriter on the session service
func (*Service) SetUserSession ¶
func (s *Service) SetUserSession(userSession *oauthDomain.UserSession) error
SetUserSession saves the user session
func (*Service) StartSession ¶
StartSession starts a new session. This method must be called before other public methods of this struct as it sets the internal session object
Source Files ¶
Click to show internal directories.
Click to hide internal directories.