Documentation
¶
Index ¶
- Variables
- func ConnectInfluxDB()
- func ConnectMongo()
- func MongoUseSession(ctx context.Context, f func(sessionContext mongo.SessionContext) error) error
- func QuickRCSearch[T any](ctx context.Context, key string, fallback func() (T, error), ...) (*T, error)
- func Redis() redis.UniversalClient
- func Secret(key string) string
- type ConfigInfo
- type FirebaseInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CUser *mongo.Collection CEntity *mongo.Collection CEnvoyGotify *mongo.Collection CEnvoyEmail *mongo.Collection CEnvoyWebhook *mongo.Collection CEnvoyTelegram *mongo.Collection CEnvoySMS *mongo.Collection COfflineLog *mongo.Collection CEnvoyLog *mongo.Collection CUserLoginLog *mongo.Collection CTLS *mongo.Collection )
View Source
var DeleteInfluxDB api.DeleteAPI
View Source
var QueryInfluxDB api.QueryAPI
View Source
var WriteInfluxDB api.WriteAPI
View Source
var WriteInfluxDBBlocking api.WriteAPIBlocking
Functions ¶
func ConnectInfluxDB ¶
func ConnectInfluxDB()
func ConnectMongo ¶
func ConnectMongo()
func MongoUseSession ¶
func QuickRCSearch ¶
func Redis ¶
func Redis() redis.UniversalClient
Types ¶
type ConfigInfo ¶
type ConfigInfo struct {
InfluxDBToken string `yaml:"influxdb_token"`
InfluxDBURI string `yaml:"influxdb_uri"`
InfluxDBOrg string `yaml:"influxdb_org"`
InfluxDBDatabase string `yaml:"influxdb_database"`
MongoDBURI string `yaml:"mongodb_uri"`
TelegramBotToken string `yaml:"telegram_bot_token"`
TelegramBotApiEndpoint string `yaml:"telegram_bot_api_endpoint"`
TelegramBotName string `yaml:"telegram_bot_name"`
SMTPHostname string `yaml:"smtp_hostname"`
SMTPUsername string `yaml:"smtp_username"`
SMTPPassword string `yaml:"smtp_password"`
SMTPPort int `yaml:"smtp_port"`
WebEndpoint string `yaml:"web_endpoint"`
RedisAddrs []string `yaml:"redis_addrs"`
RedisUsername string `yaml:"redis_username"`
RedisPassword string `yaml:"redis_password"`
OpenObserveEnabled bool `yaml:"openobserve_enabled"`
OpenObserveOrg string `yaml:"openobserve_org"`
OpenObserveUsername string `yaml:"openobserve_username"`
OpenObservePassword string `yaml:"openobserve_password"`
}
func Config ¶
func Config() *ConfigInfo
type FirebaseInterface ¶
type FirebaseInterface interface {
Config() map[string]interface{}
ConfigGetString(key string) string
App() *firebase.App
}
func Firebase ¶
func Firebase() FirebaseInterface
Click to show internal directories.
Click to hide internal directories.