blob: 6df5eaab685e79a886e71cd66b1d15f95eca556d [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
Don Newton16520672018-11-28 14:44:42 -050022var grpc = true
donNewtonAlphac997d642018-10-17 13:22:48 -040023var mongodb = ""
Author Namea594e632018-08-10 11:33:58 -040024
25/*
26SetDebug - sets debug setting
27*/
28func SetDebug(logDebug bool) {
29 debug = logDebug
30}
31
32/*
33GetDebug returns debug setting
34*/
35func GetDebug() bool {
36 return debug
37}
donNewtonAlphaaf229742018-09-19 13:22:00 -040038
39/*
40SetDummy sets dummy mode
41*/
42func SetDummy(dummyMode bool) {
43 dummy = dummyMode
44}
45
46/*
47GetDummy - returns the current value of dummy
48*/
49func GetDummy() bool {
50 return dummy
51}
Don Newton16520672018-11-28 14:44:42 -050052
53/*
54SetMongo - sets useMongo mode
55*/
donNewtonAlphac997d642018-10-17 13:22:48 -040056func SetMongo(useMongo bool) {
57 mongo = useMongo
58}
Don Newton16520672018-11-28 14:44:42 -050059
60/*GetMongo - returns the value of mongo
61 */
donNewtonAlphac997d642018-10-17 13:22:48 -040062func GetMongo() bool {
63 return mongo
64}
Don Newton16520672018-11-28 14:44:42 -050065
66/*
67SetMongodb - sets the connection string for mongo db used for backups
68*/
donNewtonAlphac997d642018-10-17 13:22:48 -040069func SetMongodb(connectString string) {
70 mongodb = connectString
71}
Don Newton16520672018-11-28 14:44:42 -050072
73/*
74GetMongodb - returns the connection string used for connecting to mongo db
75*/
donNewtonAlphac997d642018-10-17 13:22:48 -040076func GetMongodb() string {
77 return mongodb
78}
Don Newton16520672018-11-28 14:44:42 -050079
80/*
81SetGrpc - sets useGrpc mode
82*/
83func SetGrpc(useGrpc bool) {
84 grpc = useGrpc
85}
86
87/*
88GetGrpc - returns the value of grpc
89*/
90func GetGrpc() bool {
91 return grpc
92}