MCPcopy Create free account
hub / github.com/OverloadBlitz/cloudcent-cli / runMetadataRefresh

Function runMetadataRefresh

cmd/metadata.go:31–46  ·  view source on GitHub ↗
(cmd *cobra.Command, args []string)

Source from the content-addressed store, hash-verified

29}
30
31func runMetadataRefresh(cmd *cobra.Command, args []string) error {
32 client, err := api.New()
33 if err != nil {
34 return err
35 }
36 if !client.IsInitialized() {
37 return fmt.Errorf("not authenticated — run 'cloudcent init' first")
38 }
39
40 fmt.Println("Downloading metadata…")
41 if err := client.DownloadMetadataGz(); err != nil {
42 return err
43 }
44 fmt.Println("Metadata downloaded successfully.")
45 return nil
46}
47
48func runMetadataStats(cmd *cobra.Command, args []string) error {
49 meta, err := api.LoadMetadataFromFile()

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
IsInitializedMethod · 0.80
DownloadMetadataGzMethod · 0.80

Tested by

no test coverage detected