Documentation
¶
Index ¶
- func NewCookie(name, value string, options *Options) *http.Cookie
- type MemoryStore
- type Options
- type Session
- func (s *Session) AddFlash(value string)
- func (s *Session) AddFlashs(values []string)
- func (z *Session) DecodeMsg(dc *msgp.Reader) (err error)
- func (s *Session) Delete(w http.ResponseWriter) error
- func (z *Session) EncodeMsg(en *msgp.Writer) (err error)
- func (s *Session) Flashes() []string
- func (s *Session) GetBool(key string, def bool) bool
- func (s *Session) GetFloat(key string, def float64) float64
- func (s *Session) GetFloats(key string, def []float64) []float64
- func (s *Session) GetInt(key string, def int64) int64
- func (s *Session) GetInts(key string, def []int64) []int64
- func (s *Session) GetString(key string, def string) string
- func (s *Session) GetStrings(key string, def []string) []string
- func (z *Session) MarshalMsg(b []byte) (o []byte, err error)
- func (z *Session) Msgsize() (s int)
- func (s *Session) Name() string
- func (s *Session) Save(w http.ResponseWriter) error
- func (s *Session) Set(key string, v interface{})
- func (s *Session) SetAll(vals map[string]interface{})
- func (z *Session) UnmarshalMsg(bts []byte) (o []byte, err error)
- type SessionManager
- type Sessions
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemoryStore ¶
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) Delete ¶
func (s *MemoryStore) Delete(id string) error
func (*MemoryStore) Save ¶
func (s *MemoryStore) Save(session *Session, buf *bytes.Buffer, w http.ResponseWriter) error
type Session ¶
type Session struct { ID string `msg:"-"` Values map[string]interface{} `msg:"v"` Options *Options `msg:"-"` IsNew bool `msg:"-"` // contains filtered or unexported fields }
func (*Session) AddFlash ¶
AddFlash adds a flash message to the session.
A single variadic argument is accepted, and it is optional: it defines the flash key. If not defined "_flash" is used by default.
func (*Session) Flashes ¶
Flashes returns a slice of flash messages from the session.
A single variadic argument is accepted, and it is optional: it defines the flash key. If not defined "_flash" is used by default.
func (*Session) GetStrings ¶
GetStrings return array string value
func (*Session) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func (*SessionManager) Close ¶
func (s *SessionManager) Close(sessions *Sessions)
func (*SessionManager) GetSessions ¶
func (s *SessionManager) GetSessions(r *http.Request) *Sessions
Source Files
¶
Click to show internal directories.
Click to hide internal directories.