func (m *Modules) SetFileStoreConfig(ctx context.Context, projectID string, fileStore *config.FileStoreConfig) error {
	module, err := m.loadModule(projectID)
	if err != nil {
		return err
	}
	return module.SetFileStoreConfig(ctx, projectID, fileStore)
}
SetFileStoreConfig sets the config of auth and filestore modules
package modules
import (
	"context"
	"errors"
	"fmt"
	"sync"
	"github.com/spaceuptech/helpers"
	"github.com/spaceuptech/space-cloud/gateway/config"
	"github.com/spaceuptech/space-cloud/gateway/managers"
	"github.com/spaceuptech/space-cloud/gateway/modules/global"
)
type Modules struct {
	lock   sync.RWMutex
	blocks map[string]*Module
	clusterID string
	nodeID    string
	GlobalMods *global.Global
	Managers *managers.Managers
}
func New(_, clusterID, nodeID string, managers *managers.Managers, globalMods *global.Global) (*Modules, error) {
	return &Modules{
		blocks:     map[string]*Module{},
		clusterID:  clusterID,
		nodeID:     nodeID,
		GlobalMods: globalMods,
		Managers:   managers,
	}, nil
}
func (m *Modules) SetInitialProjectConfig(ctx context.Context, projects config.Projects) error {
	for projectID, project := range projects {
		module, err := m.loadModule(projectID)
		if err != nil {
			module, err = m.newModule(project.ProjectConfig)
			if err != nil {
				return err
			}
		}
		if err := module.SetInitialProjectConfig(ctx, config.Projects{projectID: project}); err != nil {
			return err
		}
	}
	return nil
}
func (m *Modules) SetProjectConfig(ctx context.Context, config *config.ProjectConfig) error {
	module, err := m.loadModule(config.ID)
	if err != nil {
		module, err = m.newModule(config)
		if err != nil {
			return err
		}
	}
	return module.SetProjectConfig(ctx, config)
}
func (m *Modules) SetDatabaseConfig(ctx context.Context, projectID string, databaseConfigs config.DatabaseConfigs, schemaConfigs config.DatabaseSchemas, ruleConfigs config.DatabaseRules, prepConfigs config.DatabasePreparedQueries) error {
	module, err := m.loadModule(projectID)
	if err != nil {
		return err
	}
	return module.SetDatabaseConfig(ctx, projectID, databaseConfigs, schemaConfigs, ruleConfigs, prepConfigs)
}
func (m *Modules) SetDatabaseSchemaConfig(ctx context.Context, projectID string, schemaConfigs config.DatabaseSchemas) error {
	module, err := m.loadModule(projectID)
	if err != nil {
		return err
	}
	return module.SetDatabaseSchemaConfig(ctx, projectID, schemaConfigs)
}
func (m *Modules) SetDatabaseRulesConfig(ctx context.Context, projectID string, ruleConfigs config.DatabaseRules) error {
	module, err := m.loadModule(projectID)
	if err != nil {
		return err
	}
	return module.SetDatabaseRulesConfig(ctx, projectID, ruleConfigs)
}
func (m *Modules) SetDatabasePreparedQueryConfig(ctx context.Context, projectID string, prepConfigs config.DatabasePreparedQueries) error {
	module, err := m.loadModule(projectID)
	if err != nil {
		return err
	}
	return module.SetDatabasePreparedQueryConfig(ctx, prepConfigs)
}