16 lines
441 B
Go
16 lines
441 B
Go
package gorilla
|
|
|
|
import (
|
|
"forge.cadoles.com/wpetit/goweb/service"
|
|
"github.com/gorilla/sessions"
|
|
)
|
|
|
|
// ServiceProvider returns a service.Provider for the
|
|
// the gorilla session service implementation
|
|
func ServiceProvider(sessionName string, store sessions.Store) service.Provider {
|
|
sessionService := NewSessionService(sessionName, store)
|
|
return func(container *service.Container) (interface{}, error) {
|
|
return sessionService, nil
|
|
}
|
|
}
|