Documentation ¶
Index ¶
- func LoggedIn(c *fiber.Ctx) bool
- func ToContext(c *fiber.Ctx)
- type Session
- func (z *Session) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *Session) EncodeMsg(en *msgp.Writer) (err error)
- func (z *Session) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Session) Msgsize() (s int)
- func (s *Session) ToStore(c *fiber.Ctx) error
- func (z *Session) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Session ¶
type Session struct { LoggedIn bool `msg:"loggedIn" json:"loggedIn"` UserID int64 `msg:"userId" json:"userId"` Perms perms.Perms `msg:"perms" json:"perms"` LoginToken []byte `msg:"loginToken" json:"-"` NotNew bool `msg:"notNew" json:"notNew"` }
Session user session struct
func Get ¶
func Get(c *fiber.Ctx) *Session
Get get session from store attempt auth login on New session
func (*Session) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (*Session) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
Click to show internal directories.
Click to hide internal directories.