2017-12-16 05:38:28 +01:00
|
|
|
package mvc
|
2017-12-14 04:56:23 +01:00
|
|
|
|
|
|
|
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
|
2017-12-18 05:47:05 +01:00
|
|
|
// because they are not "binders", their result are binders to be precise.
|
2017-12-14 04:56:23 +01:00
|
|
|
func Session(sess *sessions.Sessions) func(context.Context) *sessions.Session {
|
|
|
|
return func(ctx context.Context) *sessions.Session {
|
|
|
|
return sess.Start(ctx)
|
|
|
|
}
|
|
|
|
}
|