Documentation ¶
Index ¶
- type Session
- type SessionData
- type SessionManager
- func (m *SessionManager) Create(response http.ResponseWriter, values SessionData)
- func (m *SessionManager) Destroy(response http.ResponseWriter, request *http.Request)
- func (m *SessionManager) Get(request *http.Request) *SessionData
- func (m *SessionManager) PruneSessions()
- func (m *SessionManager) SessionCount() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct { Data SessionData Expires time.Time }
type SessionData ¶
type SessionData struct { FHIRLauncher string StringValues map[string]string OtherValues map[string]interface{} }
func SessionFromHttpResponse ¶
func SessionFromHttpResponse(manager *SessionManager, httpResponse *http.Response) *SessionData
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager(sessionLifetime time.Duration) *SessionManager
NewSessionManager creates a new session manager. It uses in-memory storage.
func (*SessionManager) Create ¶
func (m *SessionManager) Create(response http.ResponseWriter, values SessionData)
Create creates a new session and sets a session cookie. The given values are stored in the session, which can be retrieved later using Get.
func (*SessionManager) Destroy ¶
func (m *SessionManager) Destroy(response http.ResponseWriter, request *http.Request)
func (*SessionManager) Get ¶
func (m *SessionManager) Get(request *http.Request) *SessionData
Get retrieves the session for the given request. The session is retrieved using the session cookie. If no session is found, nil is returned.
func (*SessionManager) PruneSessions ¶
func (m *SessionManager) PruneSessions()
PruneSessions removes expired sessions.
func (*SessionManager) SessionCount ¶
func (m *SessionManager) SessionCount() int
Click to show internal directories.
Click to hide internal directories.