iris/mvc2/session_binder.go
Gerasimos (Makis) Maropoulos 0b2dcc76f5 start of the vue + mvc example and a simple session binding
Former-commit-id: 994f00952352c93d270ad197cb843f3222fb37c0
2017-12-14 05:56:23 +02:00

18 lines
549 B
Go

package mvc2
import (
"github.com/kataras/iris/context"
"github.com/kataras/iris/sessions"
)
// Session -> TODO: think of move all bindings to
// a different folder like "bindings"
// so it will be used as .Bind(bindings.Session(manager))
// or let it here but change the rest of the binding names as well
// because they are not "binders", their result are binders to be percise.
func Session(sess *sessions.Sessions) func(context.Context) *sessions.Session {
return func(ctx context.Context) *sessions.Session {
return sess.Start(ctx)
}
}