Documentation ¶
Overview ¶
Copyright 2016 Wenhui Shen <www.webx.top> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Session implements middleware for easily using github.com/gorilla/sessions within echo. This package was originally inspired from the https://github.com/ipfans/echo-session package, and modified to provide more functionality
Index ¶
- func Del(name string)
- func NewMySession(store Store, name string, ctx echo.Context) echo.Sessioner
- func NewSession(options *echo.SessionOptions, ctx echo.Context) echo.Sessioner
- func Reg(name string, store Store)
- type Session
- func (s *Session) AddFlash(value interface{}, vars ...string) echo.Sessioner
- func (s *Session) Clear() echo.Sessioner
- func (s *Session) Delete(key string) echo.Sessioner
- func (s *Session) Flashes(vars ...string) []interface{}
- func (s *Session) Get(key string) interface{}
- func (s *Session) Id() string
- func (s *Session) Options(options echo.SessionOptions) echo.Sessioner
- func (s *Session) Save() error
- func (s *Session) Session() *sessions.Session
- func (s *Session) Set(key string, val interface{}) echo.Sessioner
- func (s *Session) SetId(id string) echo.Sessioner
- func (s *Session) Written() bool
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSession ¶
Types ¶
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
type Store ¶
type Store interface { sessions.Store Options(echo.SessionOptions) }
func StoreEngine ¶
func StoreEngine(options *echo.SessionOptions) (store Store)
Click to show internal directories.
Click to hide internal directories.