Documentation
¶
Index ¶
- Variables
- func RoleMW(roles ...string) gin.HandlerFunc
- func Sessions(name string, store sessions.Store) gin.HandlerFunc
- type Session
- func (s *Session) Account() string
- func (s *Session) Clear()
- func (s *Session) Delete(key string)
- func (s *Session) Get(key string) any
- func (s *Session) HasRole(role string) bool
- func (s *Session) ID() string
- func (s *Session) MarshalJSON() ([]byte, error)
- func (s *Session) Roles() []string
- func (s *Session) Save(_ ...time.Duration) error
- func (s *Session) Set(key string, val any)
- func (s *Session) SetAccount(account string)
- func (s *Session) SetID(id string)
- func (s *Session) SetRoles(roles []string)
- func (s *Session) SetValues(key string, val any)
- func (s *Session) Token() string
- func (s *Session) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("not implemented")
Functions ¶
func RoleMW ¶
func RoleMW(roles ...string) gin.HandlerFunc
Types ¶
type Session ¶
func (*Session) MarshalJSON ¶
func (*Session) SetAccount ¶
func (*Session) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.