github.com/mdaxf/iac@v0.0.0-20240519030858-58a061660378/config/global_variable.go (about) 1 // Copyright 2023 IAC. All Rights Reserved. 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package config 16 17 import ( 18 "github.com/mdaxf/iac/framework/cache" 19 ) 20 21 var ( 22 SessionCache cache.Cache 23 SessionCacheTimeout float64 24 25 ObjectCache cache.Cache 26 ObjectCacheTimeout float64 27 28 TestSessionCache cache.Cache 29 TestSessionCacheTimeout float64 30 ) 31 32 var ApiKey string 33 var OpenAiKey string 34 35 var GlobalConfiguration *GlobalConfig 36 37 type GlobalConfig struct { 38 Instance string `json:"instance"` 39 InstanceType string `json:"type"` 40 InstanceName string `json:"name"` 41 SingalRConfig map[string]interface{} `json:"singalrconfig"` 42 LogConfig map[string]interface{} `json:"log"` 43 DocumentConfig map[string]interface{} `json:"documentdb"` 44 DatabaseConfig map[string]interface{} `json:"database"` 45 AltDatabasesConfig []map[string]interface{} `json:"altdatabases"` 46 CacheConfig map[string]interface{} `json:"cache"` 47 TranslationConfig map[string]interface{} `json:"translation"` 48 WebServerConfig map[string]interface{} `json:"webserver"` 49 Transaction map[string]interface{} `json:"transaction"` 50 AppServer map[string]interface{} `json:"appserver"` 51 }