neko/internal/member/manager.go

23 lines
439 B
Go
Raw Normal View History

2021-03-14 13:08:50 +13:00
package member
import (
"demodesk/neko/internal/config"
"demodesk/neko/internal/member/dummy"
"demodesk/neko/internal/member/file"
"demodesk/neko/internal/member/object"
"demodesk/neko/internal/types"
)
func New(config *config.Member) types.MemberManager {
switch config.Provider {
case "file":
return file.New(config.FilePath)
case "object":
return object.New()
case "dummy":
return dummy.New()
}
return dummy.New()
}