Documentation ¶
Index ¶
Constants ¶
View Source
const ServiceName service.Name = "session"
ServiceName defines the Session service name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseFlash ¶
type BaseFlash struct {
// contains filtered or unexported fields
}
BaseFlash is a base implementation of a flash message
func NewBaseFlash ¶
NewBaseFlash returns a new BaseFlash
type FlashType ¶
type FlashType string
FlashType defines the type of a flash message
const ( // FlashError defines an "error" flash message FlashError FlashType = "error" // FlashWarn defines an "warning" flash message FlashWarn FlashType = "warn" // FlashSuccess defines an "success" flash message FlashSuccess FlashType = "success" // FlashInfo defines an "info" flash message FlashInfo FlashType = "info" )
type Service ¶
Service defines the API of a "http session" service
type Session ¶
type Session interface { Set(string, interface{}) Unset(string) Get(string) interface{} AddFlash(flashType FlashType, message string) Flashes(flashTypes ...FlashType) []Flash Save(http.ResponseWriter, *http.Request) error Delete(http.ResponseWriter, *http.Request) error }
Session defines the API of a Session
Click to show internal directories.
Click to hide internal directories.