2018-12-07 20:40:23 +01:00
|
|
|
package gorilla
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/gorilla/sessions"
|
2019-07-28 13:11:23 +02:00
|
|
|
"gitlab.com/wpetit/goweb/service"
|
2018-12-07 20:40:23 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// ServiceProvider returns a service.Provider for the
|
|
|
|
// the gorilla session service implementation
|
2019-05-13 09:09:28 +02:00
|
|
|
func ServiceProvider(sessionName string, store sessions.Store) service.Provider {
|
|
|
|
sessionService := NewSessionService(sessionName, store)
|
2018-12-07 20:40:23 +01:00
|
|
|
return func(container *service.Container) (interface{}, error) {
|
|
|
|
return sessionService, nil
|
|
|
|
}
|
|
|
|
}
|