blob: b4eb128044346a109f08ceac707a32a9b86523c4 [file] [log] [blame]
Author Namea594e632018-08-10 11:33:58 -04001/*
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
17package settings
18
19var debug = false
donNewtonAlphaaf229742018-09-19 13:22:00 -040020var dummy = false
donNewtonAlphac997d642018-10-17 13:22:48 -040021var mongo = false
22var mongodb = ""
Author Namea594e632018-08-10 11:33:58 -040023
24/*
25SetDebug - sets debug setting
26*/
27func SetDebug(logDebug bool) {
28 debug = logDebug
29}
30
31/*
32GetDebug returns debug setting
33*/
34func GetDebug() bool {
35 return debug
36}
donNewtonAlphaaf229742018-09-19 13:22:00 -040037
38/*
39SetDummy sets dummy mode
40*/
41func SetDummy(dummyMode bool) {
42 dummy = dummyMode
43}
44
45/*
46GetDummy - returns the current value of dummy
47*/
48func GetDummy() bool {
49 return dummy
50}
donNewtonAlphac997d642018-10-17 13:22:48 -040051func SetMongo(useMongo bool) {
52 mongo = useMongo
53}
54func GetMongo() bool {
55 return mongo
56}
57func SetMongodb(connectString string) {
58 mongodb = connectString
59}
60func GetMongodb() string {
61 return mongodb
62}