TRA-3234 Fetch command (#54)

* preparation to fetch command

* get har as zip from server

* no message

* no message
This commit is contained in:
gadotroee
2021-05-24 19:29:46 +03:00
committed by GitHub
parent 5cbb5a011e
commit 2f33f9229a
14 changed files with 247 additions and 62 deletions

View File

@@ -1,20 +1,28 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
type MizuFetchOptions struct {
Limit uint16
Directory string
}
var mizuFetchOptions = MizuFetchOptions{}
var fetchCmd = &cobra.Command{
Use: "fetch",
Short: "Download recorded traffic",
Short: "Download recorded traffic to files",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("Not implemented")
RunMizuFetch(&mizuFetchOptions)
return nil
},
}
func init() {
rootCmd.AddCommand(fetchCmd)
fetchCmd.Flags().Uint16VarP(&mizuFetchOptions.Limit, "limit", "l", 1000, "Provide a custom limit for entries to fetch")
fetchCmd.Flags().StringVarP(&mizuFetchOptions.Directory, "directory", "d", ".", "Provide a custom directory for fetched entries")
}