Documentation ¶
Index ¶
- Constants
- type Session
- type SessionStore
- func (ss *SessionStore) Delete(sessionId string) error
- func (ss *SessionStore) Exist(sessionId string) (bool, error)
- func (ss *SessionStore) Get(sessionId string) (*Session, error)
- func (ss *SessionStore) Set(session *Session) error
- func (ss *SessionStore) ValidateOrgId(sessionIdClient string, OrgIdClient string) (bool, error)
- func (ss *SessionStore) ValidateUserId(sessionIdClient string, UserIdClient string) (bool, error)
Constants ¶
View Source
const (
DEFAULT_EXPIRATION = "604800" // 7*24*60*60s
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Session ¶
type Session struct { SessionId string `json:"sessionId"` UserId string `json:"userId"` UserName string `json:"userName"` OrgId string `json:"orgId"` DcList []string `json:"dcList"` CreatedAt string `json:"CreatedAt"` Expiration string `json:"Expiration"` // expiration in seconds }
func NewSession ¶
func (*Session) DecodeJson ¶
func (*Session) EncodeJson ¶
type SessionStore ¶
type SessionStore struct {
// contains filtered or unexported fields
}
func NewSessionStore ¶
func NewSessionStore() *SessionStore
func SessionStoreInstance ¶
func SessionStoreInstance() *SessionStore
func (*SessionStore) Delete ¶
func (ss *SessionStore) Delete(sessionId string) error
func (*SessionStore) Set ¶
func (ss *SessionStore) Set(session *Session) error
func (*SessionStore) ValidateOrgId ¶
func (ss *SessionStore) ValidateOrgId(sessionIdClient string, OrgIdClient string) (bool, error)
func (*SessionStore) ValidateUserId ¶
func (ss *SessionStore) ValidateUserId(sessionIdClient string, UserIdClient string) (bool, error)
Click to show internal directories.
Click to hide internal directories.