session

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	// contains filtered or unexported fields
}

Session is entity for current user session.

func (Session) GetCurrentUser

func (s Session) GetCurrentUser() entity.User

GetCurrentUser returns current user.

func (Session) GetUserOrgs

func (s Session) GetUserOrgs() []entity.Organization

GetUserOrgs returns orgs of current user.

func (*Session) SetCurrentUser

func (s *Session) SetCurrentUser(newUser entity.User)

SetCurrentUser sets current user.

func (*Session) SetUserOrgs

func (s *Session) SetUserOrgs(newOrgs []entity.Organization)

SetUserOrgs sets orgs of current user.

type SessionService

type SessionService struct {
	// contains filtered or unexported fields
}

SessionService service which caches most static data.

func GetSessionService

func GetSessionService() *SessionService

GetSessionService returns current session service.

func (*SessionService) CloseSession

func (s *SessionService) CloseSession()

CloseSession closes current session.

func (SessionService) GetSession

func (s SessionService) GetSession() Session

GetSession return a copy of current session.

func (*SessionService) StartSession

func (s *SessionService) StartSession(token string)

StartSession starts new session.

func (*SessionService) UpdateSession

func (s *SessionService) UpdateSession(session Session)

UpdateSession TODO.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL