-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync sqlite database to google drive
Signed-off-by: Masudur Rahman <[email protected]>
- Loading branch information
1 parent
fda0aa5
commit 9756a52
Showing
276 changed files
with
64,802 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package cmd | ||
|
||
import ( | ||
"log" | ||
"os" | ||
"path/filepath" | ||
|
||
"github.com/masudur-rahman/expense-tracker-bot/configs" | ||
"github.com/masudur-rahman/expense-tracker-bot/pkg" | ||
|
||
"gopkg.in/yaml.v3" | ||
) | ||
|
||
var cfgFile string | ||
|
||
// initConfig reads in config file and ENV variables if set. | ||
func initConfig() { | ||
if cfgFile == "" { | ||
cfgFile = filepath.Join(pkg.ProjectDirectory, "configs", ".expense-tracker.yaml") | ||
} | ||
|
||
data, err := os.ReadFile(cfgFile) | ||
if err != nil { | ||
log.Fatalf("Reading config file %v, %v", cfgFile, err) | ||
} | ||
|
||
if err = yaml.Unmarshal(data, &configs.TrackerConfig); err != nil { | ||
log.Fatalf("Unmarshaling PurrfectConfig, %v", err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
database: | ||
type: sqlite | ||
sqlite: | ||
syncToDrive: true | ||
# postgres: | ||
# name: expense | ||
# host: localhost | ||
# port: 5432 | ||
# user: postgres | ||
# password: postgres | ||
# sslmode: disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.