Documentation ¶
Index ¶
- func GenID() (string, error)
- type Sessions
- func (s *Sessions) Authorize(accessToken string, projectName string) bool
- func (s *Sessions) Get(accessToken string) (*UserData, bool)
- func (s *Sessions) Len() int
- func (s *Sessions) Prune()
- func (s *Sessions) Put(sessionID string, accessToken string, expires time.Time, ...)
- func (s *Sessions) Remove(accessToken string)
- func (s *Sessions) Start(delay uint) error
- type UserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Sessions ¶
Sessions pool
func (*Sessions) Prune ¶
func (s *Sessions) Prune()
Prune sessions will remove expired sessions from sessions pool
func (*Sessions) Put ¶
func (s *Sessions) Put(sessionID string, accessToken string, expires time.Time, project *gitlab.ProjectInfo)
Put UserData into session pool
type UserData ¶
type UserData struct { Expires time.Time Project *gitlab.ProjectInfo // contains filtered or unexported fields }
UserData user sessions contains user data
func (*UserData) MatchRequestedProject ¶
MatchRequestedProject check is this user session match the required project
Click to show internal directories.
Click to hide internal directories.