Documentation ¶
Index ¶
- Constants
- Variables
- func Add(c echo.Context, level int, msg string)
- func Clear(c echo.Context)
- func Debug(c echo.Context, msg string)
- func Error(c echo.Context, msg string)
- func Info(c echo.Context, msg string)
- func SaveStore(c echo.Context, ms *WebMessageStore)
- func Success(c echo.Context, msg string)
- func Warning(c echo.Context, msg string)
- type WebMessage
- type WebMessageStore
Constants ¶
View Source
const ( // DEBUG ... DEBUG int = iota + 1 // INFO ... INFO // SUCCESS ... SUCCESS // WARNING ... WARNING // ERROR ... ERROR )
Shut up golint
Variables ¶
View Source
var UserSessionKey string = "gobwebs.UserSession"
UserSessionKey session key to store User object
Functions ¶
func SaveStore ¶
func SaveStore(c echo.Context, ms *WebMessageStore)
SaveStore saves messages store in session
Types ¶
type WebMessage ¶
WebMessage is a message to display to a user
type WebMessageStore ¶
type WebMessageStore struct { Messages []*WebMessage // contains filtered or unexported fields }
WebMessageStore is the wrapper for messages
func LoadStore ¶
func LoadStore(c echo.Context) *WebMessageStore
LoadStore loads the session message store
func (*WebMessageStore) Clear ¶
func (w *WebMessageStore) Clear(lock bool)
Clear clears out all messages
func (*WebMessageStore) GetAll ¶
func (w *WebMessageStore) GetAll() []*WebMessage
GetAll returns all messages, clears messages after
Click to show internal directories.
Click to hide internal directories.