mirror of
https://github.com/kopia/kopia.git
synced 2026-03-19 22:56:29 -04:00
37 lines
755 B
Go
37 lines
755 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"gopkg.in/alecthomas/kingpin.v2"
|
|
)
|
|
|
|
var (
|
|
statusCommand = app.Command("status", "Display status information.")
|
|
)
|
|
|
|
func init() {
|
|
statusCommand.Action(runRepositoryInfoCommand)
|
|
}
|
|
|
|
func runRepositoryInfoCommand(context *kingpin.ParseContext) error {
|
|
v, err := openVault()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
rc, err := v.RepositoryConfig()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
fmt.Println("Repository:")
|
|
fmt.Println(" Version: ", rc.Format.Version)
|
|
fmt.Println(" Secret: ", len(rc.Format.Secret), "bytes")
|
|
fmt.Println(" ID Format: ", rc.Format.ObjectFormat)
|
|
fmt.Println(" Blob Size: ", rc.Format.MaxBlobSize)
|
|
fmt.Println(" Inline Blob Size:", rc.Format.MaxInlineBlobSize)
|
|
|
|
return nil
|
|
}
|