Documentation ¶
Index ¶
- Constants
- func WithHTTPSessionMiddleware(store *sessions.CookieStore) mux.MiddlewareFunc
- type Cookie
- type WebSession
- func (s *WebSession) Bool(key string) bool
- func (s *WebSession) Delete(key string)
- func (s *WebSession) Encoded() ([]byte, error)
- func (s *WebSession) Get(key string) interface{}
- func (s *WebSession) Int64(key string) int64
- func (s *WebSession) Put(key string, value interface{})
- func (s *WebSession) Save(w http.ResponseWriter) error
- func (s *WebSession) String(key string) string
Constants ¶
View Source
const ( ClientAppSession = "client-app" UserSession = "user-session" )
View Source
const ( KeyAccessType = "type" KeyAccessInfo = "info" KeyAccessKey = "key" KeyUsername = "" )
Variables ¶
This section is empty.
Functions ¶
func WithHTTPSessionMiddleware ¶
func WithHTTPSessionMiddleware(store *sessions.CookieStore) mux.MiddlewareFunc
Types ¶
type WebSession ¶
type WebSession struct {
// contains filtered or unexported fields
}
func GetWebSession ¶
func GetWebSession(name string, r *http.Request) (*WebSession, error)
func (*WebSession) Bool ¶
func (s *WebSession) Bool(key string) bool
func (*WebSession) Delete ¶
func (s *WebSession) Delete(key string)
func (*WebSession) Encoded ¶
func (s *WebSession) Encoded() ([]byte, error)
func (*WebSession) Get ¶
func (s *WebSession) Get(key string) interface{}
func (*WebSession) Int64 ¶
func (s *WebSession) Int64(key string) int64
func (*WebSession) Put ¶
func (s *WebSession) Put(key string, value interface{})
func (*WebSession) Save ¶
func (s *WebSession) Save(w http.ResponseWriter) error
func (*WebSession) String ¶
func (s *WebSession) String(key string) string
Click to show internal directories.
Click to hide internal directories.