Documentation
¶
Index ¶
- type Flash
- type FlashLevel
- type Flashes
- type Session
- func (s *Session) AddFlash(level FlashLevel, msg string)
- func (s Session) Data() *store.Service
- func (s *Session) GetAllFlashes() Flashes
- func (s *Session) GetNextFlash() Flash
- func (s *Session) HasFlashes() bool
- func (s Session) KeyID() string
- func (s Session) MarshalJSON() ([]byte, error)
- func (s Session) UnmarshalJSON(b []byte) error
- func (s *Session) WithID(id string) *Session
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flash ¶
type Flash struct {
Level FlashLevel `json:"level"`
Msg string `json:"msg"`
}
type FlashLevel ¶
type FlashLevel string
const ( FlashLevelInfo FlashLevel = "info" FlashLevelSuccess FlashLevel = "success" FlashLevelWarn FlashLevel = "warn" FlashLevelError FlashLevel = "error" )
type Session ¶
type Session struct {
ID string
// contains filtered or unexported fields
}
func (*Session) AddFlash ¶
func (s *Session) AddFlash(level FlashLevel, msg string)
AddFlash adds a flash to the session
func (*Session) GetAllFlashes ¶
GetFlashes returns all the flashes in the session, deleting them
func (*Session) GetNextFlash ¶
func (*Session) HasFlashes ¶
func (Session) MarshalJSON ¶
func (Session) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.