major changes
This commit is contained in:
parent
a3270f399d
commit
2b56832843
83 changed files with 7760 additions and 1244 deletions
8
vendor/github.com/gorilla/sessions/sessions.go
generated
vendored
8
vendor/github.com/gorilla/sessions/sessions.go
generated
vendored
|
|
@ -45,7 +45,10 @@ func NewSession(store Store, name string) *Session {
|
|||
|
||||
// Session stores the values and optional configuration for a session.
|
||||
type Session struct {
|
||||
ID string
|
||||
// The ID of the session, generated by stores. It should not be used for
|
||||
// user data.
|
||||
ID string
|
||||
// Values contains the user-data for the session.
|
||||
Values map[interface{}]interface{}
|
||||
Options *Options
|
||||
IsNew bool
|
||||
|
|
@ -142,6 +145,9 @@ type Registry struct {
|
|||
//
|
||||
// It returns a new session if there are no sessions registered for the name.
|
||||
func (s *Registry) Get(store Store, name string) (session *Session, err error) {
|
||||
if !isCookieNameValid(name) {
|
||||
return nil, fmt.Errorf("sessions: invalid character in cookie name: %s", name)
|
||||
}
|
||||
if info, ok := s.sessions[name]; ok {
|
||||
session, err = info.s, info.e
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue