recreate conf erased by gitignore
This commit is contained in:
		
							
								
								
									
										10
									
								
								conf/app.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								conf/app.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
				
			|||||||
 | 
					appname = oc-datacenter
 | 
				
			||||||
 | 
					httpport = 8080
 | 
				
			||||||
 | 
					runmode = dev
 | 
				
			||||||
 | 
					autorender = false
 | 
				
			||||||
 | 
					copyrequestbody = true
 | 
				
			||||||
 | 
					EnableDocs = true
 | 
				
			||||||
 | 
					sqlconn = 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					MONGO_URL = "mongodb://127.0.0.1:27017/beego-demo"
 | 
				
			||||||
 | 
					MONGO_DATABASE = "DC_myDC-demo_06042021"
 | 
				
			||||||
							
								
								
									
										22
									
								
								conf/config.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								conf/config.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
				
			|||||||
 | 
					package conf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import "sync"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type Config struct {
 | 
				
			||||||
 | 
						Mode     string
 | 
				
			||||||
 | 
						KubeHost string
 | 
				
			||||||
 | 
						KubePort string
 | 
				
			||||||
 | 
						KubeCA   string
 | 
				
			||||||
 | 
						KubeCert string
 | 
				
			||||||
 | 
						KubeData string
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var instance *Config
 | 
				
			||||||
 | 
					var once sync.Once
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func GetConfig() *Config {
 | 
				
			||||||
 | 
						once.Do(func() {
 | 
				
			||||||
 | 
							instance = &Config{}
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
						return instance
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user