From 3e1c9a2e216169b8cd59cc3f5a10152f1f8c0614 Mon Sep 17 00:00:00 2001 From: satakshigarg Date: Mon, 30 Jan 2023 16:21:37 +0530 Subject: [PATCH 1/4] Updated go.mod Signed-off-by: satakshigarg --- cmd/app/application.go | 66 +++++++++++ cmd/app/application_config_set.go | 62 ++++++++++ cmd/app/application_config_show.go | 48 ++++++++ cmd/app/application_config_unset.go | 62 ++++++++++ cmd/app/application_create.go | 177 ++++++++++++++++++++++++++++ cmd/app/application_list.go | 58 +++++++++ cmd/app/application_remove.go | 91 ++++++++++++++ cmd/app/application_scale.go | 63 ++++++++++ go.mod | 4 + 9 files changed, 631 insertions(+) create mode 100644 cmd/app/application.go create mode 100644 cmd/app/application_config_set.go create mode 100644 cmd/app/application_config_show.go create mode 100644 cmd/app/application_config_unset.go create mode 100644 cmd/app/application_create.go create mode 100644 cmd/app/application_list.go create mode 100644 cmd/app/application_remove.go create mode 100644 cmd/app/application_scale.go diff --git a/cmd/app/application.go b/cmd/app/application.go new file mode 100644 index 00000000..ee57177f --- /dev/null +++ b/cmd/app/application.go @@ -0,0 +1,66 @@ +package cmd + +import ( + "errors" + + "github.com/spf13/cobra" +) + +var appCmd = &cobra.Command{ + Use: "app", + Aliases: []string{"apps, application, applications"}, + Short: "Manage Applications inside your Civo account", + RunE: func(cmd *cobra.Command, args []string) error { + err := cmd.Help() + if err != nil { + return err + } + return errors.New("a valid subcommand is required") + }, +} + +var appDomainCmd = &cobra.Command{ + Use: "domain", + Aliases: []string{"domains"}, + Short: "Details of your application domains", + RunE: func(cmd *cobra.Command, args []string) error { + err := cmd.Help() + if err != nil { + return err + } + return errors.New("a valid subcommand is required") + }, +} + +var appConfigCmd = &cobra.Command{ + Use: "config", + Aliases: []string{"conf"}, + Short: "Configure your application", + RunE: func(cmd *cobra.Command, args []string) error { + err := cmd.Help() + if err != nil { + return err + } + return errors.New("a valid subcommand is required") + }, +} + +func init() { + appCmd.AddCommand(appListCmd) + appCmd.AddCommand(appCreateCmd) + appCreateCmd.Flags().StringVarP(&appName, "name", "n", "", "Name of the application") + appCreateCmd.Flags().StringVarP(&appSize, "size", "s", "", "Size of the application") + appCmd.AddCommand(appRemoveCmd) + appCmd.AddCommand(appScaleCmd) + appScaleCmd.Flags().StringVarP(&processType, "process-type", "t", "", "The type of process you want to scale. E.g. web, worker, etc.") + appScaleCmd.Flags().IntVarP(&processCount, "process-count", "c", 0, "The number by which you want to scale the process. E.g. 2, 3, etc.") + + //App config commands + appCmd.AddCommand(appConfigCmd) + appConfigCmd.AddCommand(appConfigShowCmd) + appConfigCmd.AddCommand(appConfigSetCmd) + appConfigSetCmd.Flags().StringVarP(&configName, "name", "n", "", "The name of the environment variable you want to set.") + appConfigSetCmd.Flags().StringVarP(&configValue, "value", "v", "", "The value of the environment variable you want to set.") + appConfigCmd.AddCommand(appConfigUnSetCmd) + appConfigUnSetCmd.Flags().StringVarP(&envVarName, "env-var-name", "e", "", "The name of the env variable you want to unset.") +} diff --git a/cmd/app/application_config_set.go b/cmd/app/application_config_set.go new file mode 100644 index 00000000..62367f6f --- /dev/null +++ b/cmd/app/application_config_set.go @@ -0,0 +1,62 @@ +package cmd + +import ( + "fmt" + + "github.com/civo/civogo" + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + + "os" + + "github.com/spf13/cobra" +) + +var configName, configValue string + +var appConfigSetCmd = &cobra.Command{ + Use: "set", + Args: cobra.MinimumNArgs(1), + Short: "Set application config", + Example: "civo app config set APP_NAME --name=foo --value=bar", + Run: func(cmd *cobra.Command, args []string) { + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + findApp, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + updatedConfig := civogo.EnvVar{ + Name: configName, + Value: configValue, + } + + config := &civogo.UpdateApplicationRequest{ + Config: append(findApp.Config, updatedConfig), + } + + app, err := client.UpdateApplication(findApp.ID, config) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) + + switch common.OutputFormat { + case "json": + ow.WriteSingleObjectJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) + } + }, +} diff --git a/cmd/app/application_config_show.go b/cmd/app/application_config_show.go new file mode 100644 index 00000000..df17c1c7 --- /dev/null +++ b/cmd/app/application_config_show.go @@ -0,0 +1,48 @@ +package cmd + +import ( + "fmt" + + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + + "os" + + "github.com/spf13/cobra" +) + +var appConfigShowCmd = &cobra.Command{ + Use: "show", + Aliases: []string{"get", "inspect"}, + Args: cobra.MinimumNArgs(1), + Short: "Show application config", + Example: "civo app config show APP_NAME", + Run: func(cmd *cobra.Command, args []string) { + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + app, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriter() + for _, config := range app.Config { + fmt.Println(config) + } + + switch common.OutputFormat { + case "json": + ow.WriteMultipleObjectsJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + ow.WriteKeyValues() + } + }, +} diff --git a/cmd/app/application_config_unset.go b/cmd/app/application_config_unset.go new file mode 100644 index 00000000..ffca4836 --- /dev/null +++ b/cmd/app/application_config_unset.go @@ -0,0 +1,62 @@ +package cmd + +import ( + "fmt" + + "github.com/civo/civogo" + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + + "os" + + "github.com/spf13/cobra" +) + +var envVarName string + +var appConfigUnSetCmd = &cobra.Command{ + Use: "unset", + Args: cobra.MinimumNArgs(1), + Short: "Unset application config", + Example: "civo app config unset APP_NAME --name=foo", + Run: func(cmd *cobra.Command, args []string) { + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + findApp, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + config := &civogo.UpdateApplicationRequest{ + Config: []civogo.EnvVar{ + { + Name: configName, + Value: configValue, + }, + }, + } + + app, err := client.UpdateApplication(findApp.ID, config) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) + + switch common.OutputFormat { + case "json": + ow.WriteSingleObjectJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) + } + }, +} diff --git a/cmd/app/application_create.go b/cmd/app/application_create.go new file mode 100644 index 00000000..7bfc68ad --- /dev/null +++ b/cmd/app/application_create.go @@ -0,0 +1,177 @@ +package cmd + +import ( + "time" + + "k8s.io/kubectl/pkg/util/templates" +) + +// RoutePollTimoutSeconds sets how long app create command waits for route host to be prepopulated +const RoutePollTimeout = 5 * time.Second + +var ( + newAppLong = templates.LongDesc(` + Create a new application by specifying source code, templates, and/or images. + + This command will try to build up the components of an application using images, templates, + or code that has a public repository. It will look up the images on the local container storage + (if available), a container image registry, an integrated image stream, or stored templates. + + If you specify a source code URL, it will set up a build that takes your source code and converts + it into an image that can run inside of a pod. Local source must be in a git repository that has a + remote repository that the server can see. The images will be deployed via a deployment or + deployment configuration, and a service will be connected to the first public port of the app. + You may either specify components using the various existing flags or let civo app create autodetect + what kind of components you have provided. + If you provide source code, a new build will be automatically triggered. + You can use 'civo app status' to check the progress.`) + + newAppExample = templates.Examples(` + # List all local templates and image streams that can be used to create an app + civo app create --list + + # Create an application based on the source code in the current git repository (with a public remote) and a container image + civo app create . --image=registry/repo/langimage + + # Create an application from a remote repository using its beta4 branch and tag v1 + civo app create https://github.com/openshift/ruby-hello-world#beta4:v1 + + # Create an application from a remote repository and specify a context directory + civo app create https://github.com/youruser/yourgitrepo --context-dir=src/build + + # Create an application from a remote private repository with GIT TOKEN in env variables + civo app create https://github.com/youruser/yourgitrepo + + `) + + newAppNoInput = `You must specify one or more images, image streams, templates, or source code locations to create an application. + +To list all local templates and image streams, use: + + civo app create -L + +To search templates, image streams, and container images that match the arguments provided, use: + + civo app create -S php + civo app create -S --template=rails + civo app create -S --image-stream=mysql + civo app create -S --image=registry.access.redhat.com/ubi8/python-38 + + For details on how to use the results from those searches to provide images, image streams, templates, or source code locations as inputs into 'civo create ', use: + civo app create help +` +) + +// var appName, appSize string +// var wait bool + +// var appCreateCmd = &cobra.Command{ +// Use: "create", +// Aliases: []string{"new", "add"}, +// Example: "civo app create APP_NAME [flags]", +// Short: "Create a new application", +// Run: func(cmd *cobra.Command, args []string) { +// utility.EnsureCurrentRegion() + +// client, err := config.CivoAPIClient() +// if err != nil { +// utility.Error("Creating the connection to Civo's API failed with %s", err) +// os.Exit(1) +// } + +// config, err := client.NewApplicationConfig() +// if err != nil { +// utility.Error("Unable to create a new config for the app %s", err) +// os.Exit(1) +// } + +// if appName != "" { +// if utility.ValidNameLength(appName) { +// utility.Warning("the name cannot be longer than 63 characters") +// os.Exit(1) +// } +// config.Name = appName +// } + +// if len(args) > 0 { +// if utility.ValidNameLength(args[0]) { +// utility.Warning("the name cannot be longer than 63 characters") +// os.Exit(1) +// } +// config.Name = args[0] +// } + +// if appSize != "" { +// config.Size = appSize +// } else { +// config.Size = "small" +// } + +// var executionTime string +// startTime := utility.StartTime() + +// var application *civogo.Application +// resp, err := client.CreateApplication(config) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } + +// if wait { +// stillCreating := true +// s := spinner.New(spinner.CharSets[9], 100*time.Millisecond) +// s.Prefix = fmt.Sprintf("Creating application (%s)... ", resp.Name) +// s.Start() + +// for stillCreating { +// application, err = client.FindApplication(resp.Name) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } +// if application.Status == "ACTIVE" { +// stillCreating = false +// s.Stop() +// } else { +// time.Sleep(2 * time.Second) +// } +// } +// executionTime = utility.TrackTime(startTime) +// } else { +// // we look for the created app to obtain the data that we need +// application, err = client.FindApplication(resp.Name) +// if err != nil { +// utility.Error("App %s", err) +// os.Exit(1) +// } +// } + +// if common.OutputFormat == "human" { +// if executionTime != "" { +// fmt.Printf("The app %s has been created in %s\n", utility.Green(application.Name), executionTime) +// } else { +// fmt.Printf("The app %s has been created\n", utility.Green(application.Name)) +// } +// } else { +// ow := utility.NewOutputWriter() +// ow.StartLine() +// ow.AppendDataWithLabel("id", resp.ID, "ID") +// ow.AppendDataWithLabel("name", resp.Name, "Name") +// ow.AppendDataWithLabel("network_id", resp.NetworkID, "Network ID") +// ow.AppendDataWithLabel("description", resp.Description, "Description") +// //ow.AppendDataWithLabel("image", resp.Image, "Image") +// ow.AppendDataWithLabel("size", resp.Size, "Size") +// ow.AppendDataWithLabel("status", resp.Status, "Status") +// // ow.AppendDataWithLabel("process_info", resp.ProcessInfo, "Process Info") +// ow.AppendDataWithLabel("domains", strings.Join(resp.Domains, ", "), "Domains") +// ow.AppendDataWithLabel("ssh_key_ids", strings.Join(resp.SSHKeyIDs, ", "), "SSH Key IDs") +// //ow.AppendDataWithLabel("config", resp.Config, "Config") + +// if common.OutputFormat == "json" { +// ow.WriteSingleObjectJSON(common.PrettySet) +// } else { +// ow.WriteCustomOutput(common.OutputFields) +// } +// } +// }, +// } diff --git a/cmd/app/application_list.go b/cmd/app/application_list.go new file mode 100644 index 00000000..67d6d26c --- /dev/null +++ b/cmd/app/application_list.go @@ -0,0 +1,58 @@ +package cmd + +import ( + "fmt" + "os" + "strings" + + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + "github.com/spf13/cobra" +) + +var appListCmd = &cobra.Command{ + Use: "ls", + Aliases: []string{"list", "all"}, + Short: "List all appplications", + Example: "civo app ls", + Run: func(cmd *cobra.Command, args []string) { + utility.EnsureCurrentRegion() + client, err := config.CivoAPIClient() + + if common.RegionSet != "" { + client.Region = common.RegionSet + } + + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + applications, err := client.ListApplications() + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriter() + for _, app := range applications.Items { + ow.StartLine() + ow.AppendDataWithLabel("id", app.ID, "ID") + ow.AppendDataWithLabel("name", app.Name, "Name") + ow.AppendDataWithLabel("size", app.Size, "Size") + ow.AppendDataWithLabel("network_id", app.NetworkID, "Network ID") + ow.AppendDataWithLabel("domains", strings.Join(app.Domains, " "), "Domains") + fmt.Println(app.ProcessInfo) + } + + switch common.OutputFormat { + case "json": + ow.WriteMultipleObjectsJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + ow.WriteTable() + } + }, +} diff --git a/cmd/app/application_remove.go b/cmd/app/application_remove.go new file mode 100644 index 00000000..45ef3bbe --- /dev/null +++ b/cmd/app/application_remove.go @@ -0,0 +1,91 @@ +package cmd + +import ( + "errors" + "fmt" + "os" + "strings" + + pluralize "github.com/alejandrojnm/go-pluralize" + "github.com/civo/civogo" + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + "github.com/spf13/cobra" +) + +var appList []utility.ObjecteList +var appRemoveCmd = &cobra.Command{ + Use: "remove", + Aliases: []string{"delete", "rm"}, + Short: "Remove an application", + Args: cobra.MinimumNArgs(1), + Example: "civo app rm APP_NAME", + Run: func(cmd *cobra.Command, args []string) { + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + if len(args) == 1 { + app, err := client.FindApplication(args[0]) + if err != nil { + if errors.Is(err, civogo.ZeroMatchesError) { + utility.Error("sorry there is no %s application in your account", utility.Red(args[0])) + os.Exit(1) + } + if errors.Is(err, civogo.MultipleMatchesError) { + utility.Error("sorry we found more than one application with that name in your account") + os.Exit(1) + } + } + appList = append(appList, utility.ObjecteList{ID: app.ID, Name: app.Name}) + } else { + for _, v := range args { + app, err := client.FindApplication(v) + if err == nil { + appList = append(appList, utility.ObjecteList{ID: app.ID, Name: app.Name}) + } + } + } + + appNameList := []string{} + for _, v := range appList { + appNameList = append(appNameList, v.Name) + } + + if utility.UserConfirmedDeletion(fmt.Sprintf("application %s", pluralize.Pluralize(len(appList), "")), common.DefaultYes, strings.Join(appNameList, ", ")) { + + for _, v := range appList { + _, err = client.DeleteApplication(v.ID) + if err != nil { + utility.Error("error deleting application: %s", err) + os.Exit(1) + } + } + + ow := utility.NewOutputWriter() + + for _, v := range appList { + ow.StartLine() + ow.AppendDataWithLabel("id", v.ID, "ID") + ow.AppendDataWithLabel("name", v.Name, "Name") + } + + switch common.OutputFormat { + case "json": + if len(appList) == 1 { + ow.WriteSingleObjectJSON(common.PrettySet) + } else { + ow.WriteMultipleObjectsJSON(common.PrettySet) + } + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + fmt.Printf("The application %s(%s) has been deleted\n", pluralize.Pluralize(len(appList), ""), utility.Green(strings.Join(appNameList, ", "))) + } + } else { + fmt.Println("Operation aborted.") + } + }, +} diff --git a/cmd/app/application_scale.go b/cmd/app/application_scale.go new file mode 100644 index 00000000..42159c94 --- /dev/null +++ b/cmd/app/application_scale.go @@ -0,0 +1,63 @@ +package cmd + +import ( + "fmt" + "os" + + "github.com/civo/civogo" + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + "github.com/spf13/cobra" +) + +var processType string +var processCount int + +var appScaleCmd = &cobra.Command{ + Use: "scale", + Aliases: []string{"change", "modify", "upgrade"}, + Example: "civo app scale APP-NAME --process-type=web --process-count=3", + Short: "Scale processes of your application", + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + findApp, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("App %s", err) + os.Exit(1) + } + + processInfo := civogo.ProcessInfo{ + ProcessType: processType, + ProcessCount: processCount, + } + + application := &civogo.UpdateApplicationRequest{ + ProcessInfo: append(findApp.ProcessInfo, processInfo), + } + + app, err := client.UpdateApplication(findApp.ID, application) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) + + switch common.OutputFormat { + case "json": + ow.WriteSingleObjectJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + fmt.Printf("The application %s has been updated.\n", utility.Green(app.Name)) + } + }, +} diff --git a/go.mod b/go.mod index 89352313..6df1d8b6 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,11 @@ require ( github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect github.com/briandowns/spinner v1.11.1 github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c // indirect +<<<<<<< Updated upstream github.com/civo/civogo v0.3.19 +======= + github.com/civo/civogo v0.3.23 +>>>>>>> Stashed changes github.com/dsnet/compress v0.0.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/google/go-github v17.0.0+incompatible From dd1fa851c1ab078fce0b588715219dc2007cdddc Mon Sep 17 00:00:00 2001 From: satakshigarg Date: Mon, 30 Jan 2023 19:55:57 +0530 Subject: [PATCH 2/4] Added CRUD for PaaS Signed-off-by: satakshigarg --- cmd/app/application.go | 67 ++--- cmd/app/application_config_set.go | 124 ++++----- cmd/app/application_config_show.go | 96 +++---- cmd/app/application_config_unset.go | 124 ++++----- cmd/app/application_create.go | 308 ++++++++++------------- cmd/app/application_list.go | 9 +- cmd/app/application_remove.go | 2 +- cmd/app/application_scale.go | 126 +++++----- cmd/app/application_show.go | 70 ++++++ cmd/app/application_update.go | 71 ++++++ cmd/root.go | 2 + go.mod | 33 ++- go.sum | 378 +++++++++++----------------- 13 files changed, 727 insertions(+), 683 deletions(-) create mode 100644 cmd/app/application_show.go create mode 100644 cmd/app/application_update.go diff --git a/cmd/app/application.go b/cmd/app/application.go index ee57177f..5b603d7d 100644 --- a/cmd/app/application.go +++ b/cmd/app/application.go @@ -1,4 +1,4 @@ -package cmd +package app import ( "errors" @@ -6,7 +6,7 @@ import ( "github.com/spf13/cobra" ) -var appCmd = &cobra.Command{ +var AppCmd = &cobra.Command{ Use: "app", Aliases: []string{"apps, application, applications"}, Short: "Manage Applications inside your Civo account", @@ -19,18 +19,18 @@ var appCmd = &cobra.Command{ }, } -var appDomainCmd = &cobra.Command{ - Use: "domain", - Aliases: []string{"domains"}, - Short: "Details of your application domains", - RunE: func(cmd *cobra.Command, args []string) error { - err := cmd.Help() - if err != nil { - return err - } - return errors.New("a valid subcommand is required") - }, -} +// var appDomainCmd = &cobra.Command{ +// Use: "domain", +// Aliases: []string{"domains"}, +// Short: "Details of your application domains", +// RunE: func(cmd *cobra.Command, args []string) error { +// err := cmd.Help() +// if err != nil { +// return err +// } +// return errors.New("a valid subcommand is required") +// }, +// } var appConfigCmd = &cobra.Command{ Use: "config", @@ -46,21 +46,30 @@ var appConfigCmd = &cobra.Command{ } func init() { - appCmd.AddCommand(appListCmd) - appCmd.AddCommand(appCreateCmd) - appCreateCmd.Flags().StringVarP(&appName, "name", "n", "", "Name of the application") + AppCmd.AddCommand(appListCmd) + AppCmd.AddCommand(appRemoveCmd) + AppCmd.AddCommand(appShowCmd) + AppCmd.AddCommand(appCreateCmd) appCreateCmd.Flags().StringVarP(&appSize, "size", "s", "", "Size of the application") - appCmd.AddCommand(appRemoveCmd) - appCmd.AddCommand(appScaleCmd) - appScaleCmd.Flags().StringVarP(&processType, "process-type", "t", "", "The type of process you want to scale. E.g. web, worker, etc.") - appScaleCmd.Flags().IntVarP(&processCount, "process-count", "c", 0, "The number by which you want to scale the process. E.g. 2, 3, etc.") + appCreateCmd.Flags().StringVarP(&gitURL, "git-url", "g", "", "URL of the git repo") + appCreateCmd.Flags().StringVarP(&image, "image", "i", "", "Container Image to pull") + appCreateCmd.Flags().StringVarP(&branchName, "branch", "b", "", "Branch for the git repo") + appCreateCmd.Flags().StringVarP(&tagName, "tag", "t", "", "Tag for the git repo") + AppCmd.AddCommand(appUpdateCmd) + appUpdateCmd.Flags().StringVarP(&appSize, "size", "s", "", "Updated Size of the application") + appCreateCmd.Flags().StringVarP(&firewallID, "firewall-id", "f", "", "Firewall ID of the application") + appUpdateCmd.Flags().StringVarP(&processType, "process-type", "t", "", "The type of process you want to scale. E.g. web, worker, etc.") + appUpdateCmd.Flags().IntVarP(&processCount, "process-count", "c", 0, "The number by which you want to scale the process. E.g. 2, 3, etc.") + // appCmd.AddCommand(appCreateCmd) + // appCmd.AddCommand(appRemoveCmd) + // appCmd.AddCommand(appScaleCmd) - //App config commands - appCmd.AddCommand(appConfigCmd) - appConfigCmd.AddCommand(appConfigShowCmd) - appConfigCmd.AddCommand(appConfigSetCmd) - appConfigSetCmd.Flags().StringVarP(&configName, "name", "n", "", "The name of the environment variable you want to set.") - appConfigSetCmd.Flags().StringVarP(&configValue, "value", "v", "", "The value of the environment variable you want to set.") - appConfigCmd.AddCommand(appConfigUnSetCmd) - appConfigUnSetCmd.Flags().StringVarP(&envVarName, "env-var-name", "e", "", "The name of the env variable you want to unset.") + // //App config commands + // appCmd.AddCommand(appConfigCmd) + // appConfigCmd.AddCommand(appConfigShowCmd) + // appConfigCmd.AddCommand(appConfigSetCmd) + // appConfigSetCmd.Flags().StringVarP(&configName, "name", "n", "", "The name of the environment variable you want to set.") + // appConfigSetCmd.Flags().StringVarP(&configValue, "value", "v", "", "The value of the environment variable you want to set.") + // appConfigCmd.AddCommand(appConfigUnSetCmd) + // appConfigUnSetCmd.Flags().StringVarP(&envVarName, "env-var-name", "e", "", "The name of the env variable you want to unset.") } diff --git a/cmd/app/application_config_set.go b/cmd/app/application_config_set.go index 62367f6f..a267e99a 100644 --- a/cmd/app/application_config_set.go +++ b/cmd/app/application_config_set.go @@ -1,62 +1,62 @@ -package cmd - -import ( - "fmt" - - "github.com/civo/civogo" - "github.com/civo/cli/common" - "github.com/civo/cli/config" - "github.com/civo/cli/utility" - - "os" - - "github.com/spf13/cobra" -) - -var configName, configValue string - -var appConfigSetCmd = &cobra.Command{ - Use: "set", - Args: cobra.MinimumNArgs(1), - Short: "Set application config", - Example: "civo app config set APP_NAME --name=foo --value=bar", - Run: func(cmd *cobra.Command, args []string) { - client, err := config.CivoAPIClient() - if err != nil { - utility.Error("Creating the connection to Civo's API failed with %s", err) - os.Exit(1) - } - - findApp, err := client.FindApplication(args[0]) - if err != nil { - utility.Error("%s", err) - os.Exit(1) - } - - updatedConfig := civogo.EnvVar{ - Name: configName, - Value: configValue, - } - - config := &civogo.UpdateApplicationRequest{ - Config: append(findApp.Config, updatedConfig), - } - - app, err := client.UpdateApplication(findApp.ID, config) - if err != nil { - utility.Error("%s", err) - os.Exit(1) - } - - ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) - - switch common.OutputFormat { - case "json": - ow.WriteSingleObjectJSON(common.PrettySet) - case "custom": - ow.WriteCustomOutput(common.OutputFields) - default: - fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) - } - }, -} +package app + +// import ( +// "fmt" + +// "github.com/civo/civogo" +// "github.com/civo/cli/common" +// "github.com/civo/cli/config" +// "github.com/civo/cli/utility" + +// "os" + +// "github.com/spf13/cobra" +// ) + +// var configName, configValue string + +// var appConfigSetCmd = &cobra.Command{ +// Use: "set", +// Args: cobra.MinimumNArgs(1), +// Short: "Set application config", +// Example: "civo app config set APP_NAME --name=foo --value=bar", +// Run: func(cmd *cobra.Command, args []string) { +// client, err := config.CivoAPIClient() +// if err != nil { +// utility.Error("Creating the connection to Civo's API failed with %s", err) +// os.Exit(1) +// } + +// findApp, err := client.FindApplication(args[0]) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } + +// updatedConfig := civogo.EnvVar{ +// Name: configName, +// Value: configValue, +// } + +// config := &civogo.UpdateApplicationRequest{ +// Config: append(findApp.Config, updatedConfig), +// } + +// app, err := client.UpdateApplication(findApp.ID, config) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } + +// ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) + +// switch common.OutputFormat { +// case "json": +// ow.WriteSingleObjectJSON(common.PrettySet) +// case "custom": +// ow.WriteCustomOutput(common.OutputFields) +// default: +// fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) +// } +// }, +// } diff --git a/cmd/app/application_config_show.go b/cmd/app/application_config_show.go index df17c1c7..f8247f2b 100644 --- a/cmd/app/application_config_show.go +++ b/cmd/app/application_config_show.go @@ -1,48 +1,48 @@ -package cmd - -import ( - "fmt" - - "github.com/civo/cli/common" - "github.com/civo/cli/config" - "github.com/civo/cli/utility" - - "os" - - "github.com/spf13/cobra" -) - -var appConfigShowCmd = &cobra.Command{ - Use: "show", - Aliases: []string{"get", "inspect"}, - Args: cobra.MinimumNArgs(1), - Short: "Show application config", - Example: "civo app config show APP_NAME", - Run: func(cmd *cobra.Command, args []string) { - client, err := config.CivoAPIClient() - if err != nil { - utility.Error("Creating the connection to Civo's API failed with %s", err) - os.Exit(1) - } - - app, err := client.FindApplication(args[0]) - if err != nil { - utility.Error("%s", err) - os.Exit(1) - } - - ow := utility.NewOutputWriter() - for _, config := range app.Config { - fmt.Println(config) - } - - switch common.OutputFormat { - case "json": - ow.WriteMultipleObjectsJSON(common.PrettySet) - case "custom": - ow.WriteCustomOutput(common.OutputFields) - default: - ow.WriteKeyValues() - } - }, -} +package app + +// import ( +// "fmt" + +// "github.com/civo/cli/common" +// "github.com/civo/cli/config" +// "github.com/civo/cli/utility" + +// "os" + +// "github.com/spf13/cobra" +// ) + +// var appConfigShowCmd = &cobra.Command{ +// Use: "show", +// Aliases: []string{"get", "inspect"}, +// Args: cobra.MinimumNArgs(1), +// Short: "Show application config", +// Example: "civo app config show APP_NAME", +// Run: func(cmd *cobra.Command, args []string) { +// client, err := config.CivoAPIClient() +// if err != nil { +// utility.Error("Creating the connection to Civo's API failed with %s", err) +// os.Exit(1) +// } + +// app, err := client.FindApplication(args[0]) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } + +// ow := utility.NewOutputWriter() +// for _, config := range app.Config { +// fmt.Println(config) +// } + +// switch common.OutputFormat { +// case "json": +// ow.WriteMultipleObjectsJSON(common.PrettySet) +// case "custom": +// ow.WriteCustomOutput(common.OutputFields) +// default: +// ow.WriteKeyValues() +// } +// }, +// } diff --git a/cmd/app/application_config_unset.go b/cmd/app/application_config_unset.go index ffca4836..4fbf0a18 100644 --- a/cmd/app/application_config_unset.go +++ b/cmd/app/application_config_unset.go @@ -1,62 +1,62 @@ -package cmd - -import ( - "fmt" - - "github.com/civo/civogo" - "github.com/civo/cli/common" - "github.com/civo/cli/config" - "github.com/civo/cli/utility" - - "os" - - "github.com/spf13/cobra" -) - -var envVarName string - -var appConfigUnSetCmd = &cobra.Command{ - Use: "unset", - Args: cobra.MinimumNArgs(1), - Short: "Unset application config", - Example: "civo app config unset APP_NAME --name=foo", - Run: func(cmd *cobra.Command, args []string) { - client, err := config.CivoAPIClient() - if err != nil { - utility.Error("Creating the connection to Civo's API failed with %s", err) - os.Exit(1) - } - - findApp, err := client.FindApplication(args[0]) - if err != nil { - utility.Error("%s", err) - os.Exit(1) - } - - config := &civogo.UpdateApplicationRequest{ - Config: []civogo.EnvVar{ - { - Name: configName, - Value: configValue, - }, - }, - } - - app, err := client.UpdateApplication(findApp.ID, config) - if err != nil { - utility.Error("%s", err) - os.Exit(1) - } - - ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) - - switch common.OutputFormat { - case "json": - ow.WriteSingleObjectJSON(common.PrettySet) - case "custom": - ow.WriteCustomOutput(common.OutputFields) - default: - fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) - } - }, -} +package app + +// import ( +// "fmt" + +// "github.com/civo/civogo" +// "github.com/civo/cli/common" +// "github.com/civo/cli/config" +// "github.com/civo/cli/utility" + +// "os" + +// "github.com/spf13/cobra" +// ) + +// var envVarName string + +// var appConfigUnSetCmd = &cobra.Command{ +// Use: "unset", +// Args: cobra.MinimumNArgs(1), +// Short: "Unset application config", +// Example: "civo app config unset APP_NAME --name=foo", +// Run: func(cmd *cobra.Command, args []string) { +// client, err := config.CivoAPIClient() +// if err != nil { +// utility.Error("Creating the connection to Civo's API failed with %s", err) +// os.Exit(1) +// } + +// findApp, err := client.FindApplication(args[0]) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } + +// config := &civogo.UpdateApplicationRequest{ +// Config: []civogo.EnvVar{ +// { +// Name: configName, +// Value: configValue, +// }, +// }, +// } + +// app, err := client.UpdateApplication(findApp.ID, config) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } + +// ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) + +// switch common.OutputFormat { +// case "json": +// ow.WriteSingleObjectJSON(common.PrettySet) +// case "custom": +// ow.WriteCustomOutput(common.OutputFields) +// default: +// fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) +// } +// }, +// } diff --git a/cmd/app/application_create.go b/cmd/app/application_create.go index 7bfc68ad..5409d766 100644 --- a/cmd/app/application_create.go +++ b/cmd/app/application_create.go @@ -1,177 +1,143 @@ -package cmd +package app import ( + "fmt" + "os" + "strings" "time" - "k8s.io/kubectl/pkg/util/templates" + "github.com/briandowns/spinner" + "github.com/civo/civogo" + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + "github.com/spf13/cobra" ) -// RoutePollTimoutSeconds sets how long app create command waits for route host to be prepopulated -const RoutePollTimeout = 5 * time.Second - -var ( - newAppLong = templates.LongDesc(` - Create a new application by specifying source code, templates, and/or images. - - This command will try to build up the components of an application using images, templates, - or code that has a public repository. It will look up the images on the local container storage - (if available), a container image registry, an integrated image stream, or stored templates. - - If you specify a source code URL, it will set up a build that takes your source code and converts - it into an image that can run inside of a pod. Local source must be in a git repository that has a - remote repository that the server can see. The images will be deployed via a deployment or - deployment configuration, and a service will be connected to the first public port of the app. - You may either specify components using the various existing flags or let civo app create autodetect - what kind of components you have provided. - If you provide source code, a new build will be automatically triggered. - You can use 'civo app status' to check the progress.`) - - newAppExample = templates.Examples(` - # List all local templates and image streams that can be used to create an app - civo app create --list - - # Create an application based on the source code in the current git repository (with a public remote) and a container image - civo app create . --image=registry/repo/langimage - - # Create an application from a remote repository using its beta4 branch and tag v1 - civo app create https://github.com/openshift/ruby-hello-world#beta4:v1 - - # Create an application from a remote repository and specify a context directory - civo app create https://github.com/youruser/yourgitrepo --context-dir=src/build - - # Create an application from a remote private repository with GIT TOKEN in env variables - civo app create https://github.com/youruser/yourgitrepo - - `) - - newAppNoInput = `You must specify one or more images, image streams, templates, or source code locations to create an application. - -To list all local templates and image streams, use: - - civo app create -L - -To search templates, image streams, and container images that match the arguments provided, use: - - civo app create -S php - civo app create -S --template=rails - civo app create -S --image-stream=mysql - civo app create -S --image=registry.access.redhat.com/ubi8/python-38 - - For details on how to use the results from those searches to provide images, image streams, templates, or source code locations as inputs into 'civo create ', use: - civo app create help -` -) - -// var appName, appSize string -// var wait bool - -// var appCreateCmd = &cobra.Command{ -// Use: "create", -// Aliases: []string{"new", "add"}, -// Example: "civo app create APP_NAME [flags]", -// Short: "Create a new application", -// Run: func(cmd *cobra.Command, args []string) { -// utility.EnsureCurrentRegion() - -// client, err := config.CivoAPIClient() -// if err != nil { -// utility.Error("Creating the connection to Civo's API failed with %s", err) -// os.Exit(1) -// } - -// config, err := client.NewApplicationConfig() -// if err != nil { -// utility.Error("Unable to create a new config for the app %s", err) -// os.Exit(1) -// } - -// if appName != "" { -// if utility.ValidNameLength(appName) { -// utility.Warning("the name cannot be longer than 63 characters") -// os.Exit(1) -// } -// config.Name = appName -// } - -// if len(args) > 0 { -// if utility.ValidNameLength(args[0]) { -// utility.Warning("the name cannot be longer than 63 characters") -// os.Exit(1) -// } -// config.Name = args[0] -// } - -// if appSize != "" { -// config.Size = appSize -// } else { -// config.Size = "small" -// } - -// var executionTime string -// startTime := utility.StartTime() - -// var application *civogo.Application -// resp, err := client.CreateApplication(config) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } - -// if wait { -// stillCreating := true -// s := spinner.New(spinner.CharSets[9], 100*time.Millisecond) -// s.Prefix = fmt.Sprintf("Creating application (%s)... ", resp.Name) -// s.Start() - -// for stillCreating { -// application, err = client.FindApplication(resp.Name) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } -// if application.Status == "ACTIVE" { -// stillCreating = false -// s.Stop() -// } else { -// time.Sleep(2 * time.Second) -// } -// } -// executionTime = utility.TrackTime(startTime) -// } else { -// // we look for the created app to obtain the data that we need -// application, err = client.FindApplication(resp.Name) -// if err != nil { -// utility.Error("App %s", err) -// os.Exit(1) -// } -// } - -// if common.OutputFormat == "human" { -// if executionTime != "" { -// fmt.Printf("The app %s has been created in %s\n", utility.Green(application.Name), executionTime) -// } else { -// fmt.Printf("The app %s has been created\n", utility.Green(application.Name)) -// } -// } else { -// ow := utility.NewOutputWriter() -// ow.StartLine() -// ow.AppendDataWithLabel("id", resp.ID, "ID") -// ow.AppendDataWithLabel("name", resp.Name, "Name") -// ow.AppendDataWithLabel("network_id", resp.NetworkID, "Network ID") -// ow.AppendDataWithLabel("description", resp.Description, "Description") -// //ow.AppendDataWithLabel("image", resp.Image, "Image") -// ow.AppendDataWithLabel("size", resp.Size, "Size") -// ow.AppendDataWithLabel("status", resp.Status, "Status") -// // ow.AppendDataWithLabel("process_info", resp.ProcessInfo, "Process Info") -// ow.AppendDataWithLabel("domains", strings.Join(resp.Domains, ", "), "Domains") -// ow.AppendDataWithLabel("ssh_key_ids", strings.Join(resp.SSHKeyIDs, ", "), "SSH Key IDs") -// //ow.AppendDataWithLabel("config", resp.Config, "Config") - -// if common.OutputFormat == "json" { -// ow.WriteSingleObjectJSON(common.PrettySet) -// } else { -// ow.WriteCustomOutput(common.OutputFields) -// } -// } -// }, -// } +var appSize, gitURL, image, tagName, branchName string +var wait bool + +var appCreateCmd = &cobra.Command{ + Use: "create", + Aliases: []string{"new", "add"}, + Example: "civo app create APP_NAME [flags]", + Args: cobra.MinimumNArgs(1), + Short: "Create a new application", + Run: func(cmd *cobra.Command, args []string) { + utility.EnsureCurrentRegion() + + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + config, err := client.NewApplicationConfig() + if err != nil { + utility.Error("Unable to create a new config for the app %s", err) + os.Exit(1) + } + + config.PublicIPv4Required = true + + if gitURL != "" { + config.GitInfo.GitURL = gitURL + config.GitInfo.PullPreference.Branch = &branchName + config.GitInfo.PullPreference.Tag = &tagName + if os.Getenv("GIT_TOKEN") == "" { + utility.Error("GIT_TOKEN env var not found %s", err) + os.Exit(1) + } + config.GitInfo.GitToken = os.Getenv("GIT_TOKEN") + } + + if image != "" { + config.Image = &image + } + + if config.Image == nil && config.GitInfo == nil { + utility.Error("No image or git info specified for the app %s", err) + os.Exit(1) + } + + if utility.ValidNameLength(args[0]) { + utility.Warning("the name cannot be longer than 40 characters") + os.Exit(1) + } + config.Name = args[0] + + // if len(args) > 0 { + // if utility.ValidNameLength(args[0]) { + // utility.Warning("the name cannot be longer than 40 characters") + // os.Exit(1) + // } + // config.Name = args[0] + // } + + if appSize != "" { + config.Size = appSize + } else { + config.Size = "small" + } + + var executionTime string + startTime := utility.StartTime() + + var application *civogo.Application + resp, err := client.CreateApplication(config) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + if wait { + stillCreating := true + s := spinner.New(spinner.CharSets[9], 100*time.Millisecond) + s.Prefix = fmt.Sprintf("Creating application (%s)... ", resp.Name) + s.Start() + + for stillCreating { + application, err = client.FindApplication(resp.Name) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + if strings.ToLower(application.Status) == "ready" { + stillCreating = false + s.Stop() + } else { + time.Sleep(2 * time.Second) + } + } + executionTime = utility.TrackTime(startTime) + } else { + application, err = client.FindApplication(resp.Name) + if err != nil { + utility.Error("App %s", err) + os.Exit(1) + } + } + + if common.OutputFormat == "human" { + if executionTime != "" { + fmt.Printf("The app %s has been created in %s\n", utility.Green(application.Name), executionTime) + } else { + fmt.Printf("The app %s has been created\n", utility.Green(application.Name)) + } + } else { + ow := utility.NewOutputWriter() + ow.StartLine() + ow.AppendDataWithLabel("id", resp.ID, "ID") + ow.AppendDataWithLabel("name", resp.Name, "Name") + ow.AppendDataWithLabel("network_id", resp.NetworkID, "Network ID") + ow.AppendDataWithLabel("size", resp.Size, "Size") + ow.AppendDataWithLabel("status", resp.Status, "Status") + + if common.OutputFormat == "json" { + ow.WriteSingleObjectJSON(common.PrettySet) + } else { + ow.WriteCustomOutput(common.OutputFields) + } + } + }, +} diff --git a/cmd/app/application_list.go b/cmd/app/application_list.go index 67d6d26c..16391e65 100644 --- a/cmd/app/application_list.go +++ b/cmd/app/application_list.go @@ -1,9 +1,7 @@ -package cmd +package app import ( - "fmt" "os" - "strings" "github.com/civo/cli/common" "github.com/civo/cli/config" @@ -41,9 +39,8 @@ var appListCmd = &cobra.Command{ ow.AppendDataWithLabel("id", app.ID, "ID") ow.AppendDataWithLabel("name", app.Name, "Name") ow.AppendDataWithLabel("size", app.Size, "Size") - ow.AppendDataWithLabel("network_id", app.NetworkID, "Network ID") - ow.AppendDataWithLabel("domains", strings.Join(app.Domains, " "), "Domains") - fmt.Println(app.ProcessInfo) + ow.AppendDataWithLabel("app_ip", app.AppIP, "App IP") + ow.AppendDataWithLabel("status", app.Status, "Status") } switch common.OutputFormat { diff --git a/cmd/app/application_remove.go b/cmd/app/application_remove.go index 45ef3bbe..6bfe8155 100644 --- a/cmd/app/application_remove.go +++ b/cmd/app/application_remove.go @@ -1,4 +1,4 @@ -package cmd +package app import ( "errors" diff --git a/cmd/app/application_scale.go b/cmd/app/application_scale.go index 42159c94..52cd427f 100644 --- a/cmd/app/application_scale.go +++ b/cmd/app/application_scale.go @@ -1,63 +1,63 @@ -package cmd - -import ( - "fmt" - "os" - - "github.com/civo/civogo" - "github.com/civo/cli/common" - "github.com/civo/cli/config" - "github.com/civo/cli/utility" - "github.com/spf13/cobra" -) - -var processType string -var processCount int - -var appScaleCmd = &cobra.Command{ - Use: "scale", - Aliases: []string{"change", "modify", "upgrade"}, - Example: "civo app scale APP-NAME --process-type=web --process-count=3", - Short: "Scale processes of your application", - Args: cobra.MinimumNArgs(1), - Run: func(cmd *cobra.Command, args []string) { - - client, err := config.CivoAPIClient() - if err != nil { - utility.Error("Creating the connection to Civo's API failed with %s", err) - os.Exit(1) - } - - findApp, err := client.FindApplication(args[0]) - if err != nil { - utility.Error("App %s", err) - os.Exit(1) - } - - processInfo := civogo.ProcessInfo{ - ProcessType: processType, - ProcessCount: processCount, - } - - application := &civogo.UpdateApplicationRequest{ - ProcessInfo: append(findApp.ProcessInfo, processInfo), - } - - app, err := client.UpdateApplication(findApp.ID, application) - if err != nil { - utility.Error("%s", err) - os.Exit(1) - } - - ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) - - switch common.OutputFormat { - case "json": - ow.WriteSingleObjectJSON(common.PrettySet) - case "custom": - ow.WriteCustomOutput(common.OutputFields) - default: - fmt.Printf("The application %s has been updated.\n", utility.Green(app.Name)) - } - }, -} +package app + +// import ( +// "fmt" +// "os" + +// "github.com/civo/civogo" +// "github.com/civo/cli/common" +// "github.com/civo/cli/config" +// "github.com/civo/cli/utility" +// "github.com/spf13/cobra" +// ) + +// var processType string +// var processCount int + +// var appScaleCmd = &cobra.Command{ +// Use: "scale", +// Aliases: []string{"change", "modify", "upgrade"}, +// Example: "civo app scale APP-NAME --process-type=web --process-count=3", +// Short: "Scale processes of your application", +// Args: cobra.MinimumNArgs(1), +// Run: func(cmd *cobra.Command, args []string) { + +// client, err := config.CivoAPIClient() +// if err != nil { +// utility.Error("Creating the connection to Civo's API failed with %s", err) +// os.Exit(1) +// } + +// findApp, err := client.FindApplication(args[0]) +// if err != nil { +// utility.Error("App %s", err) +// os.Exit(1) +// } + +// processInfo := civogo.ProcessInfo{ +// ProcessType: processType, +// ProcessCount: processCount, +// } + +// application := &civogo.UpdateApplicationRequest{ +// ProcessInfo: append(findApp.ProcessInfo, processInfo), +// } + +// app, err := client.UpdateApplication(findApp.ID, application) +// if err != nil { +// utility.Error("%s", err) +// os.Exit(1) +// } + +// ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) + +// switch common.OutputFormat { +// case "json": +// ow.WriteSingleObjectJSON(common.PrettySet) +// case "custom": +// ow.WriteCustomOutput(common.OutputFields) +// default: +// fmt.Printf("The application %s has been updated.\n", utility.Green(app.Name)) +// } +// }, +// } diff --git a/cmd/app/application_show.go b/cmd/app/application_show.go new file mode 100644 index 00000000..64062f5b --- /dev/null +++ b/cmd/app/application_show.go @@ -0,0 +1,70 @@ +package app + +import ( + "fmt" + "os" + "strconv" + + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + "github.com/spf13/cobra" +) + +var appShowCmd = &cobra.Command{ + Use: "show", + Aliases: []string{"get", "info"}, + Example: `civo app show APP_NAME`, + Short: "Prints information about an App", + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + utility.EnsureCurrentRegion() + + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + if common.RegionSet != "" { + client.Region = common.RegionSet + } + + app, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriter() + + ow.StartLine() + fmt.Println() + ow.AppendDataWithLabel("id", app.ID, "ID") + ow.AppendDataWithLabel("name", app.Name, "Name") + ow.AppendDataWithLabel("size", app.Size, "Size") + ow.AppendDataWithLabel("network_id", app.NetworkID, "Network ID") + ow.AppendDataWithLabel("firewall_id", app.FirewallID, "Firewall ID") + // ow.AppendDataWithLabel("image", string(*app.Image), "Image") + ow.AppendDataWithLabel("app_ip", app.AppIP, "App IP") + ow.AppendDataWithLabel("status", app.Status, "Status") + if app.ProcessInfo != nil { + for _, process := range app.ProcessInfo { + ow.AppendDataWithLabel("process_type", process.ProcessType, "Process Type") + ow.AppendDataWithLabel("process_count", strconv.Itoa(process.ProcessCount), "Process Count") + } + } + if app.GitInfo != nil { + ow.AppendDataWithLabel("git_url", app.GitInfo.GitURL, "Git URL") + } + + switch common.OutputFormat { + case "json": + ow.WriteMultipleObjectsJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + ow.WriteKeyValues() + } + }, +} diff --git a/cmd/app/application_update.go b/cmd/app/application_update.go new file mode 100644 index 00000000..52dbb6fb --- /dev/null +++ b/cmd/app/application_update.go @@ -0,0 +1,71 @@ +package app + +import ( + "fmt" + "os" + + "github.com/civo/civogo" + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + "github.com/spf13/cobra" +) + +var name, size, firewallID, processType string +var processCount int + +var appUpdateCmd = &cobra.Command{ + Use: "update", + Aliases: []string{"edit", "modify", "change", "scale", "resize"}, + Short: "Update an App", + Example: "civo app update APP_NAME --flags", + Args: cobra.MinimumNArgs(1), + Run: func(cmd *cobra.Command, args []string) { + utility.EnsureCurrentRegion() + + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + if common.RegionSet != "" { + client.Region = common.RegionSet + } + + findApp, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("App %s", err) + os.Exit(1) + } + + processInfo := civogo.ProcInfo{ + ProcessType: processType, + ProcessCount: processCount, + } + + app, err := client.UpdateApplication(findApp.ID, &civogo.UpdateApplicationRequest{ + Name: name, + Size: size, + FirewallID: firewallID, + ProcessInfo: append(findApp.ProcessInfo, processInfo), + }) + + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": findApp.Name}) + + switch common.OutputFormat { + case "json": + ow.WriteSingleObjectJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + fmt.Printf("The App with ID %s was updated. \n", utility.Green(app.ID)) + os.Exit(0) + } + }, +} diff --git a/cmd/root.go b/cmd/root.go index dec572f9..a035755e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,6 +5,7 @@ import ( "os" "github.com/civo/cli/cmd/apikey" + "github.com/civo/cli/cmd/app" "github.com/civo/cli/cmd/diskimage" "github.com/civo/cli/cmd/domain" "github.com/civo/cli/cmd/firewall" @@ -155,6 +156,7 @@ func init() { rootCmd.AddCommand(sshkey.SSHKeyCmd) rootCmd.AddCommand(teams.TeamsCmd) rootCmd.AddCommand(volume.VolumeCmd) + rootCmd.AddCommand(app.AppCmd) // Add warning if the region is empty, for the user with the old config config.ReadConfig() diff --git a/go.mod b/go.mod index 6df1d8b6..b580d0e6 100644 --- a/go.mod +++ b/go.mod @@ -9,11 +9,7 @@ require ( github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect github.com/briandowns/spinner v1.11.1 github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c // indirect -<<<<<<< Updated upstream - github.com/civo/civogo v0.3.19 -======= github.com/civo/civogo v0.3.23 ->>>>>>> Stashed changes github.com/dsnet/compress v0.0.1 // indirect github.com/fatih/color v1.13.0 // indirect github.com/google/go-github v17.0.0+incompatible @@ -29,13 +25,12 @@ require ( github.com/mattn/go-colorable v0.1.12 // indirect github.com/mitchellh/go-homedir v1.1.0 github.com/olekukonko/tablewriter v0.0.4 - github.com/spf13/cobra v1.1.1 + github.com/spf13/cobra v1.6.0 github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e github.com/tj/go-update v2.2.4+incompatible github.com/ulikunitz/xz v0.5.10 // indirect - golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 - golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + golang.org/x/crypto v0.1.0 + golang.org/x/term v0.3.0 ) require ( @@ -50,8 +45,12 @@ require ( github.com/disintegration/imaging v1.6.2 // indirect github.com/dlclark/regexp2 v1.1.6 // indirect github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/gogo/protobuf v1.3.2 // indirect github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/google/gofuzz v1.1.0 // indirect + github.com/inconshreveable/mousetrap v1.0.1 // indirect + github.com/json-iterator/go v1.1.12 // indirect github.com/jwalton/go-supportscolor v1.1.0 // indirect github.com/klauspost/compress v1.4.1 // indirect github.com/klauspost/cpuid v1.2.0 // indirect @@ -59,8 +58,20 @@ require ( github.com/lucasb-eyer/go-colorful v1.0.3 // indirect github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.8 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect github.com/spf13/pflag v1.0.5 // indirect golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 // indirect - golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect - golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect + golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect + golang.org/x/sys v0.3.0 // indirect + golang.org/x/text v0.5.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + k8s.io/apimachinery v0.26.1 // indirect + k8s.io/klog/v2 v2.80.1 // indirect + k8s.io/utils v0.0.0-20221107191617-1a15be271d1d // indirect + sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) + +replace github.com/civo/civogo => /Users/satakshigarg/civogo diff --git a/go.sum b/go.sum index 86222da9..b5c65ca5 100644 --- a/go.sum +++ b/go.sum @@ -1,23 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/MichaelMure/go-term-markdown v0.1.3 h1:G2CihElZPxb3lNH9o+zJu3nssJVYaZUU76txRz4dUT4= github.com/MichaelMure/go-term-markdown v0.1.3/go.mod h1:WNYfAWS95/dLzuTMpjFo7Khyj382yhovzCy9BEWzziM= github.com/MichaelMure/go-term-text v0.2.7 h1:nSYvYGwXxJoiQu6kdGSErpxZ6ah/4WlJyp/niqQor6g= github.com/MichaelMure/go-term-text v0.2.7/go.mod h1:6z+q5b/nP1V8I9KkWQcUi5QpmF8DVrz9vLJ4hdoxHnM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/chroma v0.7.1 h1:G1i02OhUbRi2nJxcNkwJaY/J1gHXj9tt72qN6ZouLFQ= @@ -27,8 +16,6 @@ github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBo github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alejandrojnm/go-pluralize v0.1.0 h1:UU5RugPUq2t+/vaVohvPuCZhsYJo32eytEcltwELrDg= github.com/alejandrojnm/go-pluralize v0.1.0/go.mod h1:MikvFqHtu1+7zZKzupaBRNRDdDudcFZrt93JGKWrYJw= github.com/apex/log v1.6.0 h1:Y50wF1PBIIexIgTm0/7G6gcLitkO5jHK5Mb6wcMY0UI= @@ -36,70 +23,64 @@ github.com/apex/log v1.6.0/go.mod h1:x7s+P9VtvFBXge9Vbn+8TrqKmuzmD35TTkeBHul8UtY github.com/apex/logs v1.0.0/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaqKnf+7Qs6GbEPfd4iMOitWzXJx8= github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og= github.com/briandowns/spinner v1.11.1 h1:OixPqDEcX3juo5AjQZAnFPbeUA0jvkp2qzB5gOZJ/L0= github.com/briandowns/spinner v1.11.1/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ= github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c h1:aprLqMn7gSPT+vdDSl+/E6NLEuArwD/J7IWd8bJt5lQ= github.com/c4milo/unpackit v0.0.0-20170704181138-4ed373e9ef1c/go.mod h1:Ie6SubJv/NTO9Q0UBH0QCl3Ve50lu9hjbi5YJUw03TE= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/civo/civogo v0.3.19 h1:BPRsD++bR7RYu2KtZJmQxazIWYij37U+baLR8u42oWs= -github.com/civo/civogo v0.3.19/go.mod h1:SbS06e0JPgIF27r1sLC97gjU1xWmONQeHgzF1hfLpak= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c= github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4= github.com/dlclark/regexp2 v1.1.6 h1:CqB4MjHw0MFCDj+PHHjiESmHX+N7t0tJzKvC6M97BRg= github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75 h1:vbix8DDQ/rfatfFr/8cf/sJfIL69i4BcZfjrVOxsMqk= github.com/eliukblau/pixterm/pkg/ansimage v0.0.0-20191210081756-9fb6cf8c2f75/go.mod h1:0gZuvTO1ikSA5LtTI6E13LEOdWQNjIo5MTQOvrV0eFg= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -108,85 +89,58 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098 h1:Qxs3bNRWe8GTcKMxYOSXm0jx6j0de8XUtb/fsP3GZ0I= github.com/gomarkdown/markdown v0.0.0-20191123064959-2c17d62f5098/go.mod h1:aii0r/K0ZnHv7G0KF7xy1v0A7s2Ljrb5byB7MO5p6TU= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gookit/color v1.3.8 h1:w2WcSwaCa1ojRWO60Mm4GJUJomBNKR9G+x9DwaaCL1c= github.com/gookit/color v1.3.8/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gosuri/uilive v0.0.4 h1:hUEBpQDj8D8jXgtCdBu7sWsy5sbW/5GhuO8KBwJ2jyY= github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI= github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw= github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.1 h1:zEfKbn2+PDgroKdiOzqiE8rsmLqU2uwi5PB5pBJ3TkI= github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214 h1:WgfvpuKg42WVLkxNwzfFraXkTXPK36bMqXvMFN67clI= github.com/hooklift/assert v0.0.0-20170704181755-9d1defd6d214/go.mod h1:kj6hFWqfwSjFjLnYW5PK1DoxZ4O0uapwHRmd9jhln4E= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= +github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jwalton/go-supportscolor v1.1.0 h1:HsXFJdMPjRUAx8cIW6g30hVSFYaxh9yRQwEWgkAR7lQ= github.com/jwalton/go-supportscolor v1.1.0/go.mod h1:hFVUAZV2cWg+WFFC4v8pT2X/S2qUUBYMioBD9AINXGs= github.com/kierdavis/ansi v0.0.0-20180105022324-90d93b0fcae2 h1:2+IYapTz9szRWaC5dFYHV08KNZbQCalXxUKTjJxqt1Q= github.com/kierdavis/ansi v0.0.0-20180105022324-90d93b0fcae2/go.mod h1:6KRKajh4tzbIPkvCp13swt0c9/lxruYdjz89vuDf3dk= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1 h1:8VMb5+0wMgdBykOV96DwNwKFQ+WTI4pzYURP99CcB9E= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -194,17 +148,19 @@ github.com/klauspost/cpuid v1.2.0 h1:NMpwD2G9JSFOE1/TJjGSo5zG7Yb2bTe7eq1jH+irmeE github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/pgzip v1.2.4 h1:TQ7CNpYKovDOmqzRHKxJh0BeaBI7UdQZYc6p7pMQh1A= github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kyokomi/emoji v2.1.0+incompatible h1:+DYU2RgpI6OHG4oQkM5KlqD3Wd3UPEsX8jamTo1Mp6o= github.com/kyokomi/emoji v2.1.0+incompatible/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA= github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -212,7 +168,6 @@ github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -223,91 +178,72 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.8 h1:3tS41NlGYSmhhe/8fhGRzc+z3AYCw1Fe1WAyLuujKs0= github.com/mattn/go-runewidth v0.0.8/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= +github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= +github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= +github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/savioxavier/termlink v1.2.1 h1:O9ZQvk9BPQQK4JQeMB56ZfV8uam0Ts+f97mJme7+dq8= github.com/savioxavier/termlink v1.2.1/go.mod h1:WA7FTALNwN41NGnmQMIrnjAYTsEhIAZ4RuzgEiB0Jp8= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.1 h1:KfztREH0tPxJJ+geloSLaAkaPkr4ki2Er5quFV1TDo4= -github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJQMI= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cobra v1.6.0 h1:42a0n6jwCot1pUmomAp4T7DeMD+20LFv4Q54pxLf2LI= +github.com/spf13/cobra v1.6.0/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e h1:IWllFTiDjjLIf2oeKxpIUmtiDV5sn71VgeQgg6vcE7k= github.com/tcnksm/go-latest v0.0.0-20170313132115-e3007ae9052e/go.mod h1:d7u6HkTYKSv5m6MCKkOQlHwaShTMl3HjqSGW3XtVhXM= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= @@ -319,98 +255,68 @@ github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPf github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tj/go-update v2.2.4+incompatible h1:7Rkw5ZyRSFb3QyEWM7sHCy9rCy1/r66elkOyGlfnZFc= github.com/tj/go-update v2.2.4+incompatible/go.mod h1:waFwwyiAhGey2e+dNoYQ/iLhIcFqhCW7zL/+vDU1WLo= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= golang.org/dl v0.0.0-20190829154251-82a15e2f2ead/go.mod h1:IUMfjQLJQd4UTqG1Z90tenwKoCX93Gn3MAQJMOSBsDQ= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20191206065243-da761ea9ff43 h1:gQ6GUSD102fPgli+Yb4cR/cGaHF7tNBt+GYoRCpGC7s= golang.org/x/image v0.0.0-20191206065243-da761ea9ff43/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 h1:Frnccbp+ok2GkUS2tC84yAq/U9Vg+0sIO7aRL3T4Xnc= +golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -427,83 +333,78 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -513,10 +414,27 @@ gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +k8s.io/apimachinery v0.26.1 h1:8EZ/eGJL+hY/MYCNwhmDzVqq2lPl3N3Bo8rvweJwXUQ= +k8s.io/apimachinery v0.26.1/go.mod h1:tnPmbONNJ7ByJNz9+n9kMjNP8ON+1qoAIIC70lztu74= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.80.1 h1:atnLQ121W371wYYFawwYx1aEY2eUfs4l3J72wtgAwV4= +k8s.io/klog/v2 v2.80.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20221012153701-172d655c2280/go.mod h1:+Axhij7bCpeqhklhUTe3xmOn6bWxolyZEeyaFpjGtl4= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20221107191617-1a15be271d1d h1:0Smp/HP1OH4Rvhe+4B8nWGERtlqAGSftbSbbmm45oFs= +k8s.io/utils v0.0.0-20221107191617-1a15be271d1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= +sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= From bf01e72576e0023592aeac223bcc82f814c33725 Mon Sep 17 00:00:00 2001 From: Haardik Dharma Date: Tue, 31 Jan 2023 03:37:18 +0530 Subject: [PATCH 3/4] Fixes --- cmd/app/application.go | 26 +++--- cmd/app/application_config_set.go | 131 +++++++++++++++------------- cmd/app/application_config_show.go | 93 ++++++++++---------- cmd/app/application_config_unset.go | 62 ------------- cmd/app/application_create.go | 63 +++++++------ cmd/app/application_scale.go | 63 ------------- cmd/app/application_show.go | 16 ++-- cmd/app/application_update.go | 31 ++++++- 8 files changed, 200 insertions(+), 285 deletions(-) delete mode 100644 cmd/app/application_config_unset.go delete mode 100644 cmd/app/application_scale.go diff --git a/cmd/app/application.go b/cmd/app/application.go index 5b603d7d..1190b449 100644 --- a/cmd/app/application.go +++ b/cmd/app/application.go @@ -50,26 +50,24 @@ func init() { AppCmd.AddCommand(appRemoveCmd) AppCmd.AddCommand(appShowCmd) AppCmd.AddCommand(appCreateCmd) + AppCmd.AddCommand(appUpdateCmd) + AppCmd.AddCommand(appConfigCmd) + appConfigCmd.AddCommand(appConfigShowCmd) + appConfigCmd.AddCommand(appConfigSetCmd) + appConfigSetCmd.Flags().StringVarP(&configName, "name", "n", "", "The name of the environment variable you want to set.") + appConfigSetCmd.Flags().StringVarP(&configValue, "value", "v", "", "The value of the environment variable you want to set.") + + // Create flags appCreateCmd.Flags().StringVarP(&appSize, "size", "s", "", "Size of the application") appCreateCmd.Flags().StringVarP(&gitURL, "git-url", "g", "", "URL of the git repo") appCreateCmd.Flags().StringVarP(&image, "image", "i", "", "Container Image to pull") appCreateCmd.Flags().StringVarP(&branchName, "branch", "b", "", "Branch for the git repo") appCreateCmd.Flags().StringVarP(&tagName, "tag", "t", "", "Tag for the git repo") - AppCmd.AddCommand(appUpdateCmd) + + // Update flags + appUpdateCmd.Flags().StringVarP(&name, "name", "n", "", "Updated Name of the application") appUpdateCmd.Flags().StringVarP(&appSize, "size", "s", "", "Updated Size of the application") - appCreateCmd.Flags().StringVarP(&firewallID, "firewall-id", "f", "", "Firewall ID of the application") + appUpdateCmd.Flags().StringVarP(&firewallID, "firewall-id", "f", "", "Firewall ID of the application") appUpdateCmd.Flags().StringVarP(&processType, "process-type", "t", "", "The type of process you want to scale. E.g. web, worker, etc.") appUpdateCmd.Flags().IntVarP(&processCount, "process-count", "c", 0, "The number by which you want to scale the process. E.g. 2, 3, etc.") - // appCmd.AddCommand(appCreateCmd) - // appCmd.AddCommand(appRemoveCmd) - // appCmd.AddCommand(appScaleCmd) - - // //App config commands - // appCmd.AddCommand(appConfigCmd) - // appConfigCmd.AddCommand(appConfigShowCmd) - // appConfigCmd.AddCommand(appConfigSetCmd) - // appConfigSetCmd.Flags().StringVarP(&configName, "name", "n", "", "The name of the environment variable you want to set.") - // appConfigSetCmd.Flags().StringVarP(&configValue, "value", "v", "", "The value of the environment variable you want to set.") - // appConfigCmd.AddCommand(appConfigUnSetCmd) - // appConfigUnSetCmd.Flags().StringVarP(&envVarName, "env-var-name", "e", "", "The name of the env variable you want to unset.") } diff --git a/cmd/app/application_config_set.go b/cmd/app/application_config_set.go index a267e99a..1f6f6a8d 100644 --- a/cmd/app/application_config_set.go +++ b/cmd/app/application_config_set.go @@ -1,62 +1,73 @@ package app -// import ( -// "fmt" - -// "github.com/civo/civogo" -// "github.com/civo/cli/common" -// "github.com/civo/cli/config" -// "github.com/civo/cli/utility" - -// "os" - -// "github.com/spf13/cobra" -// ) - -// var configName, configValue string - -// var appConfigSetCmd = &cobra.Command{ -// Use: "set", -// Args: cobra.MinimumNArgs(1), -// Short: "Set application config", -// Example: "civo app config set APP_NAME --name=foo --value=bar", -// Run: func(cmd *cobra.Command, args []string) { -// client, err := config.CivoAPIClient() -// if err != nil { -// utility.Error("Creating the connection to Civo's API failed with %s", err) -// os.Exit(1) -// } - -// findApp, err := client.FindApplication(args[0]) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } - -// updatedConfig := civogo.EnvVar{ -// Name: configName, -// Value: configValue, -// } - -// config := &civogo.UpdateApplicationRequest{ -// Config: append(findApp.Config, updatedConfig), -// } - -// app, err := client.UpdateApplication(findApp.ID, config) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } - -// ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) - -// switch common.OutputFormat { -// case "json": -// ow.WriteSingleObjectJSON(common.PrettySet) -// case "custom": -// ow.WriteCustomOutput(common.OutputFields) -// default: -// fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) -// } -// }, -// } +import ( + "fmt" + + "github.com/civo/civogo" + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + + "os" + + "github.com/spf13/cobra" +) + +var configName, configValue string + +var appConfigSetCmd = &cobra.Command{ + Use: "set", + Args: cobra.MinimumNArgs(1), + Short: "Set application config", + Example: "civo app config set APP_NAME --name=foo --value=bar", + Run: func(cmd *cobra.Command, args []string) { + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + findApp, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + // TODO: If the user has a .env, env vars will be picked up from there. + // Add this in help menu for config. + updatedConfig := make([]civogo.EnvVar, 0) + var varFound bool + for _, envVar := range findApp.Config.Env { + if envVar.Name == configName { + varFound = true + envVar.Value = configValue + } + updatedConfig = append(updatedConfig, envVar) + } + if !varFound { + updatedConfig = append(updatedConfig, civogo.EnvVar{ + Name: configName, + Value: configValue, + }) + } + + app, err := client.UpdateApplication(findApp.ID, &civogo.UpdateApplicationRequest{ + EnvVars: updatedConfig, + }) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) + + switch common.OutputFormat { + case "json": + ow.WriteSingleObjectJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) + } + }, +} diff --git a/cmd/app/application_config_show.go b/cmd/app/application_config_show.go index f8247f2b..dd53266b 100644 --- a/cmd/app/application_config_show.go +++ b/cmd/app/application_config_show.go @@ -1,48 +1,49 @@ package app -// import ( -// "fmt" - -// "github.com/civo/cli/common" -// "github.com/civo/cli/config" -// "github.com/civo/cli/utility" - -// "os" - -// "github.com/spf13/cobra" -// ) - -// var appConfigShowCmd = &cobra.Command{ -// Use: "show", -// Aliases: []string{"get", "inspect"}, -// Args: cobra.MinimumNArgs(1), -// Short: "Show application config", -// Example: "civo app config show APP_NAME", -// Run: func(cmd *cobra.Command, args []string) { -// client, err := config.CivoAPIClient() -// if err != nil { -// utility.Error("Creating the connection to Civo's API failed with %s", err) -// os.Exit(1) -// } - -// app, err := client.FindApplication(args[0]) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } - -// ow := utility.NewOutputWriter() -// for _, config := range app.Config { -// fmt.Println(config) -// } - -// switch common.OutputFormat { -// case "json": -// ow.WriteMultipleObjectsJSON(common.PrettySet) -// case "custom": -// ow.WriteCustomOutput(common.OutputFields) -// default: -// ow.WriteKeyValues() -// } -// }, -// } +import ( + "github.com/civo/cli/common" + "github.com/civo/cli/config" + "github.com/civo/cli/utility" + + "os" + + "github.com/spf13/cobra" +) + +var appConfigShowCmd = &cobra.Command{ + Use: "show", + Aliases: []string{"get", "inspect"}, + Args: cobra.MinimumNArgs(1), + Short: "Show application config", + Example: "civo app config show APP_NAME", + Run: func(cmd *cobra.Command, args []string) { + client, err := config.CivoAPIClient() + if err != nil { + utility.Error("Creating the connection to Civo's API failed with %s", err) + os.Exit(1) + } + + app, err := client.FindApplication(args[0]) + if err != nil { + utility.Error("%s", err) + os.Exit(1) + } + + ow := utility.NewOutputWriter() + ow.StartLine() + + for _, env := range app.Config.Env { + ow.AppendDataWithLabel("name", env.Name, "Name") + ow.AppendDataWithLabel("value", env.Value, "Value") + } + + switch common.OutputFormat { + case "json": + ow.WriteMultipleObjectsJSON(common.PrettySet) + case "custom": + ow.WriteCustomOutput(common.OutputFields) + default: + ow.WriteKeyValues() + } + }, +} diff --git a/cmd/app/application_config_unset.go b/cmd/app/application_config_unset.go deleted file mode 100644 index 4fbf0a18..00000000 --- a/cmd/app/application_config_unset.go +++ /dev/null @@ -1,62 +0,0 @@ -package app - -// import ( -// "fmt" - -// "github.com/civo/civogo" -// "github.com/civo/cli/common" -// "github.com/civo/cli/config" -// "github.com/civo/cli/utility" - -// "os" - -// "github.com/spf13/cobra" -// ) - -// var envVarName string - -// var appConfigUnSetCmd = &cobra.Command{ -// Use: "unset", -// Args: cobra.MinimumNArgs(1), -// Short: "Unset application config", -// Example: "civo app config unset APP_NAME --name=foo", -// Run: func(cmd *cobra.Command, args []string) { -// client, err := config.CivoAPIClient() -// if err != nil { -// utility.Error("Creating the connection to Civo's API failed with %s", err) -// os.Exit(1) -// } - -// findApp, err := client.FindApplication(args[0]) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } - -// config := &civogo.UpdateApplicationRequest{ -// Config: []civogo.EnvVar{ -// { -// Name: configName, -// Value: configValue, -// }, -// }, -// } - -// app, err := client.UpdateApplication(findApp.ID, config) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } - -// ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) - -// switch common.OutputFormat { -// case "json": -// ow.WriteSingleObjectJSON(common.PrettySet) -// case "custom": -// ow.WriteCustomOutput(common.OutputFields) -// default: -// fmt.Printf("Application %s's config has been updated.\n", utility.Green(app.Name)) -// } -// }, -// } diff --git a/cmd/app/application_create.go b/cmd/app/application_create.go index 5409d766..50773b72 100644 --- a/cmd/app/application_create.go +++ b/cmd/app/application_create.go @@ -21,11 +21,12 @@ var appCreateCmd = &cobra.Command{ Use: "create", Aliases: []string{"new", "add"}, Example: "civo app create APP_NAME [flags]", - Args: cobra.MinimumNArgs(1), Short: "Create a new application", Run: func(cmd *cobra.Command, args []string) { utility.EnsureCurrentRegion() + // TODO: Add network and firewall flags + client, err := config.CivoAPIClient() if err != nil { utility.Error("Creating the connection to Civo's API failed with %s", err) @@ -40,49 +41,48 @@ var appCreateCmd = &cobra.Command{ config.PublicIPv4Required = true + if image == "" && gitURL == "" { + utility.Error("No image or git info specified for the app") + os.Exit(1) + } + if gitURL != "" { - config.GitInfo.GitURL = gitURL - config.GitInfo.PullPreference.Branch = &branchName - config.GitInfo.PullPreference.Tag = &tagName + // TODO : Add in help menu if os.Getenv("GIT_TOKEN") == "" { - utility.Error("GIT_TOKEN env var not found %s", err) + utility.Error("GIT_TOKEN env var not found") os.Exit(1) } + config.GitInfo = &civogo.GitInfo{} config.GitInfo.GitToken = os.Getenv("GIT_TOKEN") + config.GitInfo.GitURL = gitURL + pullPref := &civogo.PullPreference{} + if branchName != "" { + pullPref.Branch = &branchName + } + if tagName != "" { + pullPref.Tag = &tagName + } + config.GitInfo.PullPreference = pullPref } if image != "" { config.Image = &image } - if config.Image == nil && config.GitInfo == nil { - utility.Error("No image or git info specified for the app %s", err) - os.Exit(1) - } - - if utility.ValidNameLength(args[0]) { - utility.Warning("the name cannot be longer than 40 characters") - os.Exit(1) + if len(args) > 0 { + if args[0] != "" { + if utility.ValidNameLength(args[0]) { + utility.Warning("the name cannot be longer than 40 characters") + os.Exit(1) + } + config.Name = args[0] + } } - config.Name = args[0] - - // if len(args) > 0 { - // if utility.ValidNameLength(args[0]) { - // utility.Warning("the name cannot be longer than 40 characters") - // os.Exit(1) - // } - // config.Name = args[0] - // } if appSize != "" { config.Size = appSize - } else { - config.Size = "small" } - var executionTime string - startTime := utility.StartTime() - var application *civogo.Application resp, err := client.CreateApplication(config) if err != nil { @@ -90,18 +90,25 @@ var appCreateCmd = &cobra.Command{ os.Exit(1) } + var executionTime string if wait { + startTime := utility.StartTime() stillCreating := true s := spinner.New(spinner.CharSets[9], 100*time.Millisecond) s.Prefix = fmt.Sprintf("Creating application (%s)... ", resp.Name) s.Start() + var statusAvailable bool for stillCreating { application, err = client.FindApplication(resp.Name) if err != nil { utility.Error("%s", err) os.Exit(1) } + if strings.ToLower(application.Status) == "available" && !statusAvailable { + statusAvailable = true + fmt.Println("Environment has been set up, deploying workloads now.") + } if strings.ToLower(application.Status) == "ready" { stillCreating = false s.Stop() @@ -122,7 +129,7 @@ var appCreateCmd = &cobra.Command{ if executionTime != "" { fmt.Printf("The app %s has been created in %s\n", utility.Green(application.Name), executionTime) } else { - fmt.Printf("The app %s has been created\n", utility.Green(application.Name)) + fmt.Printf("The app %s is deploying\n", utility.Green(application.Name)) } } else { ow := utility.NewOutputWriter() diff --git a/cmd/app/application_scale.go b/cmd/app/application_scale.go deleted file mode 100644 index 52cd427f..00000000 --- a/cmd/app/application_scale.go +++ /dev/null @@ -1,63 +0,0 @@ -package app - -// import ( -// "fmt" -// "os" - -// "github.com/civo/civogo" -// "github.com/civo/cli/common" -// "github.com/civo/cli/config" -// "github.com/civo/cli/utility" -// "github.com/spf13/cobra" -// ) - -// var processType string -// var processCount int - -// var appScaleCmd = &cobra.Command{ -// Use: "scale", -// Aliases: []string{"change", "modify", "upgrade"}, -// Example: "civo app scale APP-NAME --process-type=web --process-count=3", -// Short: "Scale processes of your application", -// Args: cobra.MinimumNArgs(1), -// Run: func(cmd *cobra.Command, args []string) { - -// client, err := config.CivoAPIClient() -// if err != nil { -// utility.Error("Creating the connection to Civo's API failed with %s", err) -// os.Exit(1) -// } - -// findApp, err := client.FindApplication(args[0]) -// if err != nil { -// utility.Error("App %s", err) -// os.Exit(1) -// } - -// processInfo := civogo.ProcessInfo{ -// ProcessType: processType, -// ProcessCount: processCount, -// } - -// application := &civogo.UpdateApplicationRequest{ -// ProcessInfo: append(findApp.ProcessInfo, processInfo), -// } - -// app, err := client.UpdateApplication(findApp.ID, application) -// if err != nil { -// utility.Error("%s", err) -// os.Exit(1) -// } - -// ow := utility.NewOutputWriterWithMap(map[string]string{"id": app.ID, "name": app.Name}) - -// switch common.OutputFormat { -// case "json": -// ow.WriteSingleObjectJSON(common.PrettySet) -// case "custom": -// ow.WriteCustomOutput(common.OutputFields) -// default: -// fmt.Printf("The application %s has been updated.\n", utility.Green(app.Name)) -// } -// }, -// } diff --git a/cmd/app/application_show.go b/cmd/app/application_show.go index 64062f5b..a9072dac 100644 --- a/cmd/app/application_show.go +++ b/cmd/app/application_show.go @@ -3,7 +3,6 @@ package app import ( "fmt" "os" - "strconv" "github.com/civo/cli/common" "github.com/civo/cli/config" @@ -45,19 +44,20 @@ var appShowCmd = &cobra.Command{ ow.AppendDataWithLabel("size", app.Size, "Size") ow.AppendDataWithLabel("network_id", app.NetworkID, "Network ID") ow.AppendDataWithLabel("firewall_id", app.FirewallID, "Firewall ID") - // ow.AppendDataWithLabel("image", string(*app.Image), "Image") ow.AppendDataWithLabel("app_ip", app.AppIP, "App IP") ow.AppendDataWithLabel("status", app.Status, "Status") - if app.ProcessInfo != nil { - for _, process := range app.ProcessInfo { - ow.AppendDataWithLabel("process_type", process.ProcessType, "Process Type") - ow.AppendDataWithLabel("process_count", strconv.Itoa(process.ProcessCount), "Process Count") - } - } if app.GitInfo != nil { ow.AppendDataWithLabel("git_url", app.GitInfo.GitURL, "Git URL") } + // TODO: Separate this into a separate command + // if app.ProcessInfo != nil { + // for _, process := range app.ProcessInfo { + // ow.AppendDataWithLabel("process_type", process.ProcessType, "Process Type") + // ow.AppendDataWithLabel("process_count", strconv.Itoa(process.ProcessCount), "Process Count") + // } + // } + switch common.OutputFormat { case "json": ow.WriteMultipleObjectsJSON(common.PrettySet) diff --git a/cmd/app/application_update.go b/cmd/app/application_update.go index 52dbb6fb..5fc17943 100644 --- a/cmd/app/application_update.go +++ b/cmd/app/application_update.go @@ -39,16 +39,39 @@ var appUpdateCmd = &cobra.Command{ os.Exit(1) } - processInfo := civogo.ProcInfo{ - ProcessType: processType, - ProcessCount: processCount, + if name == "" { + name = findApp.Name + } + + if size == "" { + size = findApp.Size + } + + if firewallID == "" { + firewallID = findApp.FirewallID + } + + procInfo := make([]civogo.ProcInfo, 0) + var procFound bool + for _, proc := range findApp.ProcessInfo { + if proc.ProcessType == processType { + procFound = true + proc.ProcessCount = processCount + } + procInfo = append(procInfo, proc) + } + if !procFound { + procInfo = append(procInfo, civogo.ProcInfo{ + ProcessType: processType, + ProcessCount: processCount, + }) } app, err := client.UpdateApplication(findApp.ID, &civogo.UpdateApplicationRequest{ Name: name, Size: size, FirewallID: firewallID, - ProcessInfo: append(findApp.ProcessInfo, processInfo), + ProcessInfo: procInfo, }) if err != nil { From c774250600b5c28762195a2caaf02ffbf5531a8a Mon Sep 17 00:00:00 2001 From: satakshigarg Date: Thu, 2 Feb 2023 20:42:41 +0530 Subject: [PATCH 4/4] Added PaaS Features Signed-off-by: satakshigarg --- cmd/app/application.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/app/application.go b/cmd/app/application.go index 1190b449..a61a3674 100644 --- a/cmd/app/application.go +++ b/cmd/app/application.go @@ -67,7 +67,7 @@ func init() { // Update flags appUpdateCmd.Flags().StringVarP(&name, "name", "n", "", "Updated Name of the application") appUpdateCmd.Flags().StringVarP(&appSize, "size", "s", "", "Updated Size of the application") - appUpdateCmd.Flags().StringVarP(&firewallID, "firewall-id", "f", "", "Firewall ID of the application") + appUpdateCmd.Flags().StringVarP(&firewallID, "firewall-id", "", "", "Firewall ID of the application") appUpdateCmd.Flags().StringVarP(&processType, "process-type", "t", "", "The type of process you want to scale. E.g. web, worker, etc.") appUpdateCmd.Flags().IntVarP(&processCount, "process-count", "c", 0, "The number by which you want to scale the process. E.g. 2, 3, etc.") }