Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2017 the original author or authors. |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package settings |
| 18 | |
| 19 | var debug = false |
donNewtonAlpha | af22974 | 2018-09-19 13:22:00 -0400 | [diff] [blame] | 20 | var dummy = false |
donNewtonAlpha | c997d64 | 2018-10-17 13:22:48 -0400 | [diff] [blame] | 21 | var mongo = false |
| 22 | var mongodb = "" |
Author Name | a594e63 | 2018-08-10 11:33:58 -0400 | [diff] [blame] | 23 | |
| 24 | /* |
| 25 | SetDebug - sets debug setting |
| 26 | */ |
| 27 | func SetDebug(logDebug bool) { |
| 28 | debug = logDebug |
| 29 | } |
| 30 | |
| 31 | /* |
| 32 | GetDebug returns debug setting |
| 33 | */ |
| 34 | func GetDebug() bool { |
| 35 | return debug |
| 36 | } |
donNewtonAlpha | af22974 | 2018-09-19 13:22:00 -0400 | [diff] [blame] | 37 | |
| 38 | /* |
| 39 | SetDummy sets dummy mode |
| 40 | */ |
| 41 | func SetDummy(dummyMode bool) { |
| 42 | dummy = dummyMode |
| 43 | } |
| 44 | |
| 45 | /* |
| 46 | GetDummy - returns the current value of dummy |
| 47 | */ |
| 48 | func GetDummy() bool { |
| 49 | return dummy |
| 50 | } |
donNewtonAlpha | c997d64 | 2018-10-17 13:22:48 -0400 | [diff] [blame] | 51 | func SetMongo(useMongo bool) { |
| 52 | mongo = useMongo |
| 53 | } |
| 54 | func GetMongo() bool { |
| 55 | return mongo |
| 56 | } |
| 57 | func SetMongodb(connectString string) { |
| 58 | mongodb = connectString |
| 59 | } |
| 60 | func GetMongodb() string { |
| 61 | return mongodb |
| 62 | } |