Documentation ¶
Index ¶
- Constants
- type Meta
- type UserSession
- func (s *UserSession) Empty() bool
- func (s *UserSession) Invalidate(r *http.Request, w http.ResponseWriter) error
- func (s *UserSession) IsValid() bool
- func (s UserSession) Marshal() string
- func (s *UserSession) Oauth2Token() *oauth2.Token
- func (s *UserSession) Save(r *http.Request, w http.ResponseWriter) error
- func (s *UserSession) String() string
- func (s *UserSession) Unmarshal(value string)
Constants ¶
View Source
const (
SessionKeyUserSession = "user-session"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserSession ¶
type UserSession struct { Id string `json:"id"` Name string `json:"name"` UserId string `json:"userId"` Email string `json:"email"` State string `json:"state"` Token string `json:"token"` CreatedAt time.Time `json:"createdAt"` RedirectUrl string `json:"redirectUrl"` // contains filtered or unexported fields }
func NewUserSession ¶
func NewUserSession(session *sessions.Session) *UserSession
func UnmarshalSession ¶
func UnmarshalSession(value string) *UserSession
func (*UserSession) Empty ¶
func (s *UserSession) Empty() bool
func (*UserSession) Invalidate ¶
func (s *UserSession) Invalidate(r *http.Request, w http.ResponseWriter) error
func (*UserSession) IsValid ¶
func (s *UserSession) IsValid() bool
func (UserSession) Marshal ¶
func (s UserSession) Marshal() string
func (*UserSession) Oauth2Token ¶
func (s *UserSession) Oauth2Token() *oauth2.Token
func (*UserSession) Save ¶
func (s *UserSession) Save(r *http.Request, w http.ResponseWriter) error
func (*UserSession) String ¶
func (s *UserSession) String() string
func (*UserSession) Unmarshal ¶
func (s *UserSession) Unmarshal(value string)
Click to show internal directories.
Click to hide internal directories.