Make all paths configurable and default to

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-12-14 07:51:17 +00:00
parent ee7b3213b3
commit 8a33993d76
24 changed files with 72 additions and 22 deletions
+1 -1
View File
@@ -131,7 +131,7 @@ func ServerWithConfig(cfg *config.Config) []cli.Flag {
},
&cli.StringFlag{
Name: "data-path",
Value: "/var/tmp/ocis-store",
Value: "/var/tmp/ocis/store",
Usage: "location of the store data path",
EnvVars: []string{"STORE_DATA_PATH"},
Destination: &cfg.Datapath,
+1 -1
View File
@@ -242,7 +242,7 @@ func (s *Service) Tables(ctx context.Context, in *proto.TablesRequest, out *prot
}
// TODO sanitize key. As it may contain invalid characters, such as slashes.
// file: /var/tmp/ocis-store/databases/{database}/{table}/{record.key}.
// file: /var/tmp/ocis/store/databases/{database}/{table}/{record.key}.
func getID(database string, table string, key string) string {
// TODO sanitize input.
return filepath.Join(database, table, key)