Add FileInfoStore and Cloud services for Focalboard multi product architecture (#20546)

* add FileInfoStore and Cloud services
Этот коммит содержится в:
Doug Lauder
2022-06-27 14:32:27 -04:00
коммит произвёл GitHub
родитель e31dbb5aeb
Коммит 5544e753e8
4 изменённых файлов: 77 добавлений и 24 удалений

Просмотреть файл

@@ -86,19 +86,21 @@ var SentryDSN = "placeholder_sentry_dsn"
type ServiceKey string
const (
ChannelKey ServiceKey = "channel"
ConfigKey ServiceKey = "config"
LicenseKey ServiceKey = "license"
FilestoreKey ServiceKey = "filestore"
ClusterKey ServiceKey = "cluster"
PostKey ServiceKey = "post"
TeamKey ServiceKey = "team"
UserKey ServiceKey = "user"
PermissionsKey ServiceKey = "permissions"
RouterKey ServiceKey = "router"
BotKey ServiceKey = "bot"
LogKey ServiceKey = "log"
HooksKey ServiceKey = "hooks"
ChannelKey ServiceKey = "channel"
ConfigKey ServiceKey = "config"
LicenseKey ServiceKey = "license"
FilestoreKey ServiceKey = "filestore"
FileInfoStoreKey ServiceKey = "fileinfostore"
ClusterKey ServiceKey = "cluster"
CloudKey ServiceKey = "cloud"
PostKey ServiceKey = "post"
TeamKey ServiceKey = "team"
UserKey ServiceKey = "user"
PermissionsKey ServiceKey = "permissions"
RouterKey ServiceKey = "router"
BotKey ServiceKey = "bot"
LogKey ServiceKey = "log"
HooksKey ServiceKey = "hooks"
)
type Server struct {
@@ -379,6 +381,14 @@ func NewServer(options ...Option) (*Server, error) {
srv: s,
}
fileInfoWrapper := &fileInfoWrapper{
srv: s,
}
cloudWrapper := &cloudWrapper{
cloud: s.Cloud,
}
s.teamService, err = teams.New(teams.ServiceConfig{
TeamStore: s.Store.Team(),
ChannelStore: s.Store.Channel(),
@@ -393,13 +403,15 @@ func NewServer(options ...Option) (*Server, error) {
}
serviceMap := map[ServiceKey]interface{}{
ChannelKey: channelWrapper,
ConfigKey: s.configStore,
LicenseKey: s.licenseWrapper,
FilestoreKey: s.filestore,
ClusterKey: s.clusterWrapper,
UserKey: New(ServerConnector(s.Channels())),
LogKey: s.GetLogger(),
ChannelKey: channelWrapper,
ConfigKey: s.configStore,
LicenseKey: s.licenseWrapper,
FilestoreKey: s.filestore,
FileInfoStoreKey: fileInfoWrapper,
ClusterKey: s.clusterWrapper,
UserKey: New(ServerConnector(s.Channels())),
LogKey: s.GetLogger(),
CloudKey: cloudWrapper,
}
// Step 8: Initialize products.