mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 13:30:56 +00:00
commit
98dfb92e17
@ -81,6 +81,15 @@ func Register(name string, provide Provider) {
|
|||||||
provides[name] = provide
|
provides[name] = provide
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//GetProvider
|
||||||
|
func GetProvider(name string) (Provider, error) {
|
||||||
|
provider, ok := provides[name]
|
||||||
|
if !ok {
|
||||||
|
return nil, fmt.Errorf("session: unknown provide %q (forgotten import?)", name)
|
||||||
|
}
|
||||||
|
return provider, nil
|
||||||
|
}
|
||||||
|
|
||||||
// ManagerConfig define the session config
|
// ManagerConfig define the session config
|
||||||
type ManagerConfig struct {
|
type ManagerConfig struct {
|
||||||
CookieName string `json:"cookieName"`
|
CookieName string `json:"cookieName"`
|
||||||
|
Loading…
Reference in New Issue
Block a user