Versions in this module Expand all Collapse all v1 v1.0.0 Dec 24, 2024 Changes in this version + var NotInitError = errors.New("mongo manager is nil, please call Init() first") + func Close() + func GetClient() (*mongo.Client, error) + func GetCollectionDao[T any](key string, database DatabaseType, model any, ...) (T, error) + func GetTableName(model any) string + func Init(conf *Config) + func Restart() + type Collection = internal.Collection + func GetCollection(platform string, database DatabaseType, collection string) (*Collection, error) + func GetGlobalCollection(database DatabaseType, collection string) (*Collection, error) + func GetGlobalLogCollection(collection string) (*Collection, error) + func GetGlobalMonitorCollection(collection string) (*Collection, error) + func GetGlobalUserCollection(collection string) (*Collection, error) + func GetLogCollection(platform string, collection string) (*Collection, error) + func GetUserCollection(platform string, collection string) (*Collection, error) + type Config = internal.Config + func GetConfig() *Config + type Database = internal.Database + func GetDatabase(platform string, database DatabaseType) (*Database, error) + func GetGlobalDatabase(database DatabaseType) (*Database, error) + func GetGlobalLogDatabase() (*Database, error) + func GetGlobalMonitorDatabase() (*Database, error) + func GetGlobalUserDatabase() (*Database, error) + func GetLogDatabase(platform string) (*Database, error) + func GetUserDatabase(platform string) (*Database, error) + type DatabaseConfig = internal.DatabaseConfig + type DatabaseType string + const DatabaseLog + const DatabaseMonitor + const DatabaseUser + const KeyGlobal + type ICollectionName interface + CollectionName func() string