mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
OK, my dream-idea is implemented. TODO: Some examples and doc.go is not updated yet, comments on the mvc/di subpackage, the tutorial/vuejs-todo-mvc is running but not finished yet (it's using browser's localstorage and it should be replaced by the http requests that are registered via iris mvc
Former-commit-id: 0ea7e01ce1d78bcb78b40f3b0f5c03ad7c9abaea
This commit is contained in:
17
mvc/session.go
Normal file
17
mvc/session.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package mvc
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user