Documentation ¶
Index ¶
- func InitSessionManagement(s sessions.Store, us userDAO)
- type Store
- func (s *Store) EndFor(w http.ResponseWriter, r *http.Request, u *user.User) error
- func (s *Store) GetCurrent(r *http.Request) (*user.User, error)
- func (s *Store) GetCurrentCaseRecord(r *http.Request) (*test.CaseExecutionRecord, error)
- func (s *Store) GetCurrentSequenceRecord(r *http.Request) (*test.SequenceExecutionRecord, error)
- func (s *Store) RemoveCurrentCaseRecord(w http.ResponseWriter, r *http.Request) error
- func (s *Store) RemoveCurrentSequenceRecord(w http.ResponseWriter, r *http.Request) error
- func (s *Store) SetCurrentCaseRecord(w http.ResponseWriter, r *http.Request, record *test.CaseExecutionRecord) error
- func (s *Store) SetCurrentSequenceRecord(w http.ResponseWriter, r *http.Request, record *test.SequenceExecutionRecord) error
- func (s *Store) StartFor(w http.ResponseWriter, r *http.Request, user *user.User) error
- type TestStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitSessionManagement ¶
InitSessionManagement initialize the global Store. Default parameters are nil, anything else is just for testing
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store provides functions to store and get data to the session of a request Don't create your own Store! Better get the global Store via the corresponding function
func GetSessionStore ¶
func GetSessionStore() *Store
GetSessionStore returns a pointer to the session-store
func (*Store) EndFor ¶
EndFor removes the user from the session User parameter is not used by now, just for future
func (*Store) GetCurrent ¶
GetCurrent returns the current logged-in user to the given request. If the current user is not logged-in, the function will return nil, nil If an error occurs nil and the error will be returned
func (*Store) GetCurrentCaseRecord ¶
GetCurrentCaseRecord returns the record to the currently running case execution to the given request. If there is no case execution running, the function will return nil, nil If an error occurs nil and the error will be returned
func (*Store) GetCurrentSequenceRecord ¶
GetCurrentSequenceRecord returns the record to the currently running sequence execution to the given request. If there is no sequence execution running, the function will return nil, nil If an error occurs nil and the error will be returned
func (*Store) RemoveCurrentCaseRecord ¶
RemoveCurrentCaseRecord removes the current case record from the session.
func (*Store) RemoveCurrentSequenceRecord ¶
RemoveCurrentSequenceRecord removes the current sequence record from the session.
func (*Store) SetCurrentCaseRecord ¶
func (s *Store) SetCurrentCaseRecord(w http.ResponseWriter, r *http.Request, record *test.CaseExecutionRecord) error
SetCurrentCaseRecord saves the given record to the session. After this call, you can get the current case record via the GetCurrentCaseRecord-function
func (*Store) SetCurrentSequenceRecord ¶
func (s *Store) SetCurrentSequenceRecord(w http.ResponseWriter, r *http.Request, record *test.SequenceExecutionRecord) error
SetCurrentSequenceRecord saves the given record to the session. After this call, you can get the current sequence record via the GetCurrentSequenceRecord-function