Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/normalize_fields'
Browse files Browse the repository at this point in the history
  • Loading branch information
andriygm committed Aug 15, 2024
2 parents 5062d1c + bf52428 commit 79e92cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion internal/config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import (
)

type Config struct {
StorageDir string `yaml:"storage-dir"`
StorageDir string `yaml:"storage_dir"`
Permissions int `yaml:"permissions"`
Group string `yaml:"group"`
}

var ConfigFileName = "dvs.yaml"
Expand Down Expand Up @@ -38,6 +40,9 @@ func Write(config Config, dir string) error {
}
defer dvsFile.Close()

config.Permissions = 664
config.Group = ""

// Convert config to YAML
configYaml, err := yaml.Marshal(config)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions internal/meta/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

type Metadata struct {
FileHash string `json:"blake3_checksum"`
FileSize uint64 `json:"file_size_bytes"`
Timestamp time.Time `json:"timestamp"`
FileSize uint64 `json:"size"`
Timestamp time.Time `json:"add_time"`
Message string `json:"message"`
SavedBy string `json:"saved_by"`
}
Expand Down

0 comments on commit 79e92cd

Please sign in to comment.