From 0ddc43a72054e85f4d71b2932fa923367e6e1eff Mon Sep 17 00:00:00 2001 From: shreddedbacon Date: Tue, 5 Dec 2023 12:17:47 +1100 Subject: [PATCH] refactor: update user and user group queries to use machinery --- cmd/list.go | 179 ++++++++++++++++-- docs/commands/lagoon.md | 2 +- docs/commands/lagoon_list.md | 8 +- docs/commands/lagoon_list_all-users.md | 41 ++++ docs/commands/lagoon_list_backups.md | 2 +- docs/commands/lagoon_list_deployments.md | 2 +- .../lagoon_list_deploytarget-configs.md | 2 +- docs/commands/lagoon_list_deploytargets.md | 2 +- docs/commands/lagoon_list_environments.md | 2 +- docs/commands/lagoon_list_group-projects.md | 2 +- docs/commands/lagoon_list_group-users.md | 42 ++++ docs/commands/lagoon_list_groups.md | 2 +- docs/commands/lagoon_list_invokable-tasks.md | 2 +- docs/commands/lagoon_list_notification.md | 2 +- .../lagoon_list_projects-by-metadata.md | 2 +- docs/commands/lagoon_list_projects.md | 2 +- docs/commands/lagoon_list_tasks.md | 2 +- docs/commands/lagoon_list_user-groups.md | 40 ++++ docs/commands/lagoon_list_variables.md | 2 +- go.mod | 4 +- go.sum | 10 +- internal/lagoon/client/lgraphql/lgraphql.go | 12 +- 22 files changed, 318 insertions(+), 46 deletions(-) create mode 100644 docs/commands/lagoon_list_all-users.md create mode 100644 docs/commands/lagoon_list_group-users.md create mode 100644 docs/commands/lagoon_list_user-groups.md diff --git a/cmd/list.go b/cmd/list.go index 6c2a23ef..6d1a4c3a 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -15,6 +15,7 @@ import ( "github.com/uselagoon/lagoon-cli/pkg/output" l "github.com/uselagoon/machinery/api/lagoon" lclient "github.com/uselagoon/machinery/api/lagoon/client" + ls "github.com/uselagoon/machinery/api/schema" ) // ListFlags . @@ -366,24 +367,168 @@ var listTasksCmd = &cobra.Command{ } var listUsersCmd = &cobra.Command{ - //@TODO: once individual user interaction comes in, this will need to be adjusted - Use: "users", - Aliases: []string{"u"}, - Short: "List all users in groups (alias: u)", - Long: `List all users in groups in lagoon, this only shows users that are in groups.`, - Run: func(cmd *cobra.Command, args []string) { - returnedJSON, err := uClient.ListUsers(groupName) - handleError(err) + Use: "group-users", + Aliases: []string{"gu"}, + Short: "List all users in groups", + Long: `List all users in groups in lagoon, this only shows users that are in groups. +If no group name is provided, all groups are queried. +Without a group name, this query may time out in large Lagoon installs.`, + PreRunE: func(_ *cobra.Command, _ []string) error { + return validateTokenE(cmdLagoon) + }, + RunE: func(cmd *cobra.Command, args []string) error { + debug, err := cmd.Flags().GetBool("debug") + if err != nil { + return err + } + groupName, err := cmd.Flags().GetString("name") + if err != nil { + return err + } + current := lagoonCLIConfig.Current + token := lagoonCLIConfig.Lagoons[current].Token + lc := lclient.New( + lagoonCLIConfig.Lagoons[current].GraphQL, + lagoonCLIVersion, + &token, + debug) + data := []output.Data{} + if groupName != "" { + // if a groupName is provided, use the groupbyname resolver + groupMembers, err := l.ListGroupMembers(context.TODO(), groupName, lc) + if err != nil { + return err + } + for _, member := range groupMembers.Members { + data = append(data, []string{ + returnNonEmptyString(fmt.Sprintf("%s", groupMembers.ID)), + returnNonEmptyString(fmt.Sprintf("%s", groupMembers.Name)), + returnNonEmptyString(fmt.Sprintf("%s", member.User.Email)), + returnNonEmptyString(fmt.Sprintf("%s", member.Role)), + }) + } + } else { + // otherwise allgroups query + groupMembers, err := l.ListAllGroupMembers(context.TODO(), groupName, lc) + if err != nil { + return err + } + for _, group := range *groupMembers { + for _, member := range group.Members { + data = append(data, []string{ + returnNonEmptyString(fmt.Sprintf("%s", group.ID)), + returnNonEmptyString(fmt.Sprintf("%s", group.Name)), + returnNonEmptyString(fmt.Sprintf("%s", member.User.Email)), + returnNonEmptyString(fmt.Sprintf("%s", member.Role)), + }) + } + } + } + dataMain := output.Table{ + Header: []string{"ID", "GroupName", "Email", "Role"}, + Data: data, + } + output.RenderOutput(dataMain, outputOptions) + return nil + }, +} - var dataMain output.Table - err = json.Unmarshal([]byte(returnedJSON), &dataMain) - handleError(err) - if len(dataMain.Data) == 0 { - output.RenderInfo("There are no users in any groups", outputOptions) - os.Exit(0) +var listAllUsersCmd = &cobra.Command{ + Use: "all-users", + Aliases: []string{"au"}, + Short: "List all users", + Long: `List all users. +This query can take a long time to run if there are a lot of users.`, + PreRunE: func(_ *cobra.Command, _ []string) error { + return validateTokenE(cmdLagoon) + }, + RunE: func(cmd *cobra.Command, args []string) error { + debug, err := cmd.Flags().GetBool("debug") + if err != nil { + return err + } + emailAddress, err := cmd.Flags().GetString("email-address") + if err != nil { + return err + } + current := lagoonCLIConfig.Current + token := lagoonCLIConfig.Lagoons[current].Token + lc := lclient.New( + lagoonCLIConfig.Lagoons[current].GraphQL, + lagoonCLIVersion, + &token, + debug) + allUsers, err := l.AllUsers(context.TODO(), ls.AllUsersFilter{ + Email: emailAddress, + }, lc) + if err != nil { + return err + } + data := []output.Data{} + for _, user := range *allUsers { + data = append(data, []string{ + returnNonEmptyString(fmt.Sprintf("%s", user.ID)), + returnNonEmptyString(fmt.Sprintf("%s", user.Email)), + returnNonEmptyString(fmt.Sprintf("%s", user.FirstName)), + returnNonEmptyString(fmt.Sprintf("%s", user.LastName)), + returnNonEmptyString(fmt.Sprintf("%s", user.Comment)), + }) + } + dataMain := output.Table{ + Header: []string{"ID", "Email", "FirstName", "LastName", "Comment"}, + Data: data, } output.RenderOutput(dataMain, outputOptions) + return nil + }, +} +var listUsersGroupsCmd = &cobra.Command{ + Use: "user-groups", + Aliases: []string{"ug"}, + Short: "List a single users groups and roles", + Long: `List a single users groups and roles`, + PreRunE: func(_ *cobra.Command, _ []string) error { + return validateTokenE(cmdLagoon) + }, + RunE: func(cmd *cobra.Command, args []string) error { + debug, err := cmd.Flags().GetBool("debug") + if err != nil { + return err + } + emailAddress, err := cmd.Flags().GetString("email-address") + if err != nil { + return err + } + if emailAddress == "" { + return fmt.Errorf("Missing arguments: email address is not defined") + } + current := lagoonCLIConfig.Current + token := lagoonCLIConfig.Lagoons[current].Token + lc := lclient.New( + lagoonCLIConfig.Lagoons[current].GraphQL, + lagoonCLIVersion, + &token, + debug) + allUsers, err := l.GetUserByEmail(context.TODO(), emailAddress, lc) + if err != nil { + return err + } + data := []output.Data{} + for _, grouprole := range allUsers.GroupRoles { + data = append(data, []string{ + returnNonEmptyString(fmt.Sprintf("%s", allUsers.ID)), + returnNonEmptyString(fmt.Sprintf("%s", allUsers.Email)), + returnNonEmptyString(fmt.Sprintf("%s", grouprole.Name)), + returnNonEmptyString(fmt.Sprintf("%s", grouprole.Role)), + }) + } + dataMain := output.Table{ + Header: []string{"ID", "Email", "GroupName", "GroupRole"}, + Data: data, + } + output.RenderOutput(dataMain, outputOptions) + return nil }, } @@ -450,8 +595,12 @@ func init() { listCmd.AddCommand(listInvokableTasks) listCmd.AddCommand(listBackupsCmd) listCmd.AddCommand(listDeployTargetConfigsCmd) + listCmd.AddCommand(listAllUsersCmd) + listCmd.AddCommand(listUsersGroupsCmd) + listAllUsersCmd.Flags().StringP("email-address", "E", "", "The email address of a user") + listUsersGroupsCmd.Flags().StringP("email-address", "E", "", "The email address of a user") listCmd.Flags().BoolVarP(&listAllProjects, "all-projects", "", false, "All projects (if supported)") - listUsersCmd.Flags().StringVarP(&groupName, "name", "N", "", "Name of the group to list users in (if not specified, will default to all groups)") + listUsersCmd.Flags().StringVarP(&groupName, "name", "N", "", "Name of the group to list users in") listGroupProjectsCmd.Flags().StringVarP(&groupName, "name", "N", "", "Name of the group to list projects in") listVariablesCmd.Flags().BoolP("reveal", "", false, "Reveal the variable values") } diff --git a/docs/commands/lagoon.md b/docs/commands/lagoon.md index 6cfb47c0..7ab9ad66 100644 --- a/docs/commands/lagoon.md +++ b/docs/commands/lagoon.md @@ -39,7 +39,7 @@ lagoon [flags] * [lagoon get](lagoon_get.md) - Get info on a resource * [lagoon import](lagoon_import.md) - Import a config from a yaml file * [lagoon kibana](lagoon_kibana.md) - Launch the kibana interface -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications * [lagoon login](lagoon_login.md) - Log into a Lagoon instance * [lagoon retrieve](lagoon_retrieve.md) - Trigger a retrieval operation on backups * [lagoon run](lagoon_run.md) - Run a task against an environment diff --git a/docs/commands/lagoon_list.md b/docs/commands/lagoon_list.md index 2b48e078..e4e790ee 100644 --- a/docs/commands/lagoon_list.md +++ b/docs/commands/lagoon_list.md @@ -1,10 +1,10 @@ ## lagoon list -List projects, deployments, variables or notifications +List projects, environments, deployments, variables or notifications ### Synopsis -List projects, deployments, variables or notifications +List projects, environments, deployments, variables or notifications ### Options @@ -33,18 +33,20 @@ List projects, deployments, variables or notifications ### SEE ALSO * [lagoon](lagoon.md) - Command line integration for Lagoon +* [lagoon list all-users](lagoon_list_all-users.md) - List all users * [lagoon list backups](lagoon_list_backups.md) - List an environments backups * [lagoon list deployments](lagoon_list_deployments.md) - List deployments for an environment (alias: d) * [lagoon list deploytarget-configs](lagoon_list_deploytarget-configs.md) - List deploytarget configs for a project * [lagoon list deploytargets](lagoon_list_deploytargets.md) - List all DeployTargets in Lagoon * [lagoon list environments](lagoon_list_environments.md) - List environments for a project (alias: e) * [lagoon list group-projects](lagoon_list_group-projects.md) - List projects in a group (alias: gp) +* [lagoon list group-users](lagoon_list_group-users.md) - List all users in groups * [lagoon list groups](lagoon_list_groups.md) - List groups you have access to (alias: g) * [lagoon list invokable-tasks](lagoon_list_invokable-tasks.md) - Print a list of invokable tasks * [lagoon list notification](lagoon_list_notification.md) - List all notifications or notifications on projects * [lagoon list projects](lagoon_list_projects.md) - List all projects you have access to (alias: p) * [lagoon list projects-by-metadata](lagoon_list_projects-by-metadata.md) - List projects by a given metadata key or key:value * [lagoon list tasks](lagoon_list_tasks.md) - List tasks for an environment (alias: t) -* [lagoon list users](lagoon_list_users.md) - List all users in groups (alias: u) +* [lagoon list user-groups](lagoon_list_user-groups.md) - List a single users groups and roles * [lagoon list variables](lagoon_list_variables.md) - List variables for a project or environment (alias: v) diff --git a/docs/commands/lagoon_list_all-users.md b/docs/commands/lagoon_list_all-users.md new file mode 100644 index 00000000..98974c30 --- /dev/null +++ b/docs/commands/lagoon_list_all-users.md @@ -0,0 +1,41 @@ +## lagoon list all-users + +List all users + +### Synopsis + +List all users. +This query can take a long time to run if there are a lot of users. + +``` +lagoon list all-users [flags] +``` + +### Options + +``` + -E, --email-address string The email address of a user + -h, --help help for all-users +``` + +### Options inherited from parent commands + +``` + --config-file string Path to the config file to use (must be *.yml or *.yaml) + --debug Enable debugging output (if supported) + -e, --environment string Specify an environment to use + --force Force yes on prompts (if supported) + -l, --lagoon string The Lagoon instance to interact with + --no-header No header on table (if supported) + --output-csv Output as CSV (if supported) + --output-json Output as JSON (if supported) + --pretty Make JSON pretty (if supported) + -p, --project string Specify a project to use + --skip-update-check Skip checking for updates + -i, --ssh-key string Specify path to a specific SSH key to use for lagoon authentication +``` + +### SEE ALSO + +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications + diff --git a/docs/commands/lagoon_list_backups.md b/docs/commands/lagoon_list_backups.md index 962e9c92..6a209b04 100644 --- a/docs/commands/lagoon_list_backups.md +++ b/docs/commands/lagoon_list_backups.md @@ -35,5 +35,5 @@ lagoon list backups [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_deployments.md b/docs/commands/lagoon_list_deployments.md index 6175372a..25a09aff 100644 --- a/docs/commands/lagoon_list_deployments.md +++ b/docs/commands/lagoon_list_deployments.md @@ -35,5 +35,5 @@ lagoon list deployments [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_deploytarget-configs.md b/docs/commands/lagoon_list_deploytarget-configs.md index d3806da4..723d714e 100644 --- a/docs/commands/lagoon_list_deploytarget-configs.md +++ b/docs/commands/lagoon_list_deploytarget-configs.md @@ -35,5 +35,5 @@ lagoon list deploytarget-configs [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_deploytargets.md b/docs/commands/lagoon_list_deploytargets.md index eb899903..3791e812 100644 --- a/docs/commands/lagoon_list_deploytargets.md +++ b/docs/commands/lagoon_list_deploytargets.md @@ -35,5 +35,5 @@ lagoon list deploytargets [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_environments.md b/docs/commands/lagoon_list_environments.md index 504151f2..5186199d 100644 --- a/docs/commands/lagoon_list_environments.md +++ b/docs/commands/lagoon_list_environments.md @@ -35,5 +35,5 @@ lagoon list environments [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_group-projects.md b/docs/commands/lagoon_list_group-projects.md index a1213b98..803d32db 100644 --- a/docs/commands/lagoon_list_group-projects.md +++ b/docs/commands/lagoon_list_group-projects.md @@ -36,5 +36,5 @@ lagoon list group-projects [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_group-users.md b/docs/commands/lagoon_list_group-users.md new file mode 100644 index 00000000..e39a7bb2 --- /dev/null +++ b/docs/commands/lagoon_list_group-users.md @@ -0,0 +1,42 @@ +## lagoon list group-users + +List all users in groups + +### Synopsis + +List all users in groups in lagoon, this only shows users that are in groups. +If no group name is provided, all groups are queried. +Without a group name, this query may time out in large Lagoon installs. + +``` +lagoon list group-users [flags] +``` + +### Options + +``` + -h, --help help for group-users + -N, --name string Name of the group to list users in +``` + +### Options inherited from parent commands + +``` + --config-file string Path to the config file to use (must be *.yml or *.yaml) + --debug Enable debugging output (if supported) + -e, --environment string Specify an environment to use + --force Force yes on prompts (if supported) + -l, --lagoon string The Lagoon instance to interact with + --no-header No header on table (if supported) + --output-csv Output as CSV (if supported) + --output-json Output as JSON (if supported) + --pretty Make JSON pretty (if supported) + -p, --project string Specify a project to use + --skip-update-check Skip checking for updates + -i, --ssh-key string Specify path to a specific SSH key to use for lagoon authentication +``` + +### SEE ALSO + +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications + diff --git a/docs/commands/lagoon_list_groups.md b/docs/commands/lagoon_list_groups.md index 40f5cf53..cad64322 100644 --- a/docs/commands/lagoon_list_groups.md +++ b/docs/commands/lagoon_list_groups.md @@ -35,5 +35,5 @@ lagoon list groups [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_invokable-tasks.md b/docs/commands/lagoon_list_invokable-tasks.md index 0c27bef6..77e92550 100644 --- a/docs/commands/lagoon_list_invokable-tasks.md +++ b/docs/commands/lagoon_list_invokable-tasks.md @@ -35,5 +35,5 @@ lagoon list invokable-tasks [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_notification.md b/docs/commands/lagoon_list_notification.md index 5b4f86b5..f89a4300 100644 --- a/docs/commands/lagoon_list_notification.md +++ b/docs/commands/lagoon_list_notification.md @@ -31,7 +31,7 @@ List all notifications or notifications on projects ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications * [lagoon list notification email](lagoon_list_notification_email.md) - List all email notification details (alias: e) * [lagoon list notification microsoftteams](lagoon_list_notification_microsoftteams.md) - List all Microsoft Teams notification details (alias: m) * [lagoon list notification project-email](lagoon_list_notification_project-email.md) - List email details about a project (alias: pe) diff --git a/docs/commands/lagoon_list_projects-by-metadata.md b/docs/commands/lagoon_list_projects-by-metadata.md index ca245d5e..981142ac 100644 --- a/docs/commands/lagoon_list_projects-by-metadata.md +++ b/docs/commands/lagoon_list_projects-by-metadata.md @@ -38,5 +38,5 @@ lagoon list projects-by-metadata [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_projects.md b/docs/commands/lagoon_list_projects.md index 7b9fa690..ba3b8559 100644 --- a/docs/commands/lagoon_list_projects.md +++ b/docs/commands/lagoon_list_projects.md @@ -35,5 +35,5 @@ lagoon list projects [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_tasks.md b/docs/commands/lagoon_list_tasks.md index 6d3aac8c..11e2fe80 100644 --- a/docs/commands/lagoon_list_tasks.md +++ b/docs/commands/lagoon_list_tasks.md @@ -35,5 +35,5 @@ lagoon list tasks [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/docs/commands/lagoon_list_user-groups.md b/docs/commands/lagoon_list_user-groups.md new file mode 100644 index 00000000..3d2a43f6 --- /dev/null +++ b/docs/commands/lagoon_list_user-groups.md @@ -0,0 +1,40 @@ +## lagoon list user-groups + +List a single users groups and roles + +### Synopsis + +List a single users groups and roles + +``` +lagoon list user-groups [flags] +``` + +### Options + +``` + -E, --email-address string The email address of a user + -h, --help help for user-groups +``` + +### Options inherited from parent commands + +``` + --config-file string Path to the config file to use (must be *.yml or *.yaml) + --debug Enable debugging output (if supported) + -e, --environment string Specify an environment to use + --force Force yes on prompts (if supported) + -l, --lagoon string The Lagoon instance to interact with + --no-header No header on table (if supported) + --output-csv Output as CSV (if supported) + --output-json Output as JSON (if supported) + --pretty Make JSON pretty (if supported) + -p, --project string Specify a project to use + --skip-update-check Skip checking for updates + -i, --ssh-key string Specify path to a specific SSH key to use for lagoon authentication +``` + +### SEE ALSO + +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications + diff --git a/docs/commands/lagoon_list_variables.md b/docs/commands/lagoon_list_variables.md index a4c01425..59f6eed4 100644 --- a/docs/commands/lagoon_list_variables.md +++ b/docs/commands/lagoon_list_variables.md @@ -36,5 +36,5 @@ lagoon list variables [flags] ### SEE ALSO -* [lagoon list](lagoon_list.md) - List projects, deployments, variables or notifications +* [lagoon list](lagoon_list.md) - List projects, environments, deployments, variables or notifications diff --git a/go.mod b/go.mod index 2d25de43..da24df75 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,6 @@ require ( require ( github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect - github.com/go-bindata/go-bindata v3.1.2+incompatible // indirect github.com/google/go-querystring v1.0.0 // indirect github.com/guregu/null v4.0.0+incompatible // workaround for https://github.com/manifoldco/promptui/issues/98 @@ -42,3 +41,6 @@ replace github.com/olekukonko/tablewriter => github.com/shreddedbacon/tablewrite // replace github.com/machinebox/graphql => ../../shreddedbacon/graphql // replace github.com/olekukonko/tablewriter => ../../shreddedbacon/tablewriter + +// replace github.com/uselagoon/machinery => ../machinery +replace github.com/uselagoon/machinery v0.0.13 => github.com/uselagoon/machinery v0.0.0-20231205012931-58a4ccde55f9 diff --git a/go.sum b/go.sum index ce748682..c99e5e72 100644 --- a/go.sum +++ b/go.sum @@ -25,8 +25,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/go-bindata/go-bindata v3.1.2+incompatible h1:5vjJMVhowQdPzjE1LdxyFF7YFTXg5IgGVW4gBr5IbvE= -github.com/go-bindata/go-bindata v3.1.2+incompatible/go.mod h1:xK8Dsgwmeed+BBsSy2XTopBn/8uK2HWuGSnA11C3Joo= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3 h1:I4BOK3PBMjhWfQM2zPJKK7lOBGsrsvOB7kBELP33hiE= github.com/golang/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= @@ -106,12 +104,8 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9 h1:vY5WqiEon0ZSTGM3ayVVi+twaHKHDFUVloaQ/wug9/c= github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9/go.mod h1:q+QjxYvZ+fpjMXqs+XEriussHjSYqeXVnAdSV1tkMYk= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/uselagoon/machinery v0.0.11 h1:s6EhyU/pj1+C4FdS0EqmR6C0dLsoeCd9n+5xHL1YDag= -github.com/uselagoon/machinery v0.0.11/go.mod h1:IXLxlkahEAEgpCmu9Xa/Wmjo6ja4Aoq7tf8G7VrileE= -github.com/uselagoon/machinery v0.0.12 h1:TJnA+FrL1uEhRTjJ6dExiL4G7SOQ+hUfGuWDmbW2HBA= -github.com/uselagoon/machinery v0.0.12/go.mod h1:h/qeMWQR4Qqu33x+8AulNDeolEwvb/G+aIsn/jyUtwk= -github.com/uselagoon/machinery v0.0.13 h1:ZCLBNWJmDr3wikaHs3pWhQ1j8MprhIqRuChgSqmLyZc= -github.com/uselagoon/machinery v0.0.13/go.mod h1:h/qeMWQR4Qqu33x+8AulNDeolEwvb/G+aIsn/jyUtwk= +github.com/uselagoon/machinery v0.0.0-20231205012931-58a4ccde55f9 h1:PxXlTj6IPuaGIdnAeBIupq2V+HVFCh8fQs0euke/ZJY= +github.com/uselagoon/machinery v0.0.0-20231205012931-58a4ccde55f9/go.mod h1:h/qeMWQR4Qqu33x+8AulNDeolEwvb/G+aIsn/jyUtwk= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/internal/lagoon/client/lgraphql/lgraphql.go b/internal/lagoon/client/lgraphql/lgraphql.go index f246b0f1..5c965f9e 100644 --- a/internal/lagoon/client/lgraphql/lgraphql.go +++ b/internal/lagoon/client/lgraphql/lgraphql.go @@ -1432,11 +1432,13 @@ var _bindata = map[string]func() (*asset, error){ // directory embedded in the file by go-bindata. // For example if you run go-bindata on data/... and data contains the // following hierarchy: -// data/ -// foo.txt -// img/ -// a.png -// b.png +// +// data/ +// foo.txt +// img/ +// a.png +// b.png +// // then AssetDir("data") would return []string{"foo.txt", "img"} // AssetDir("data/img") would return []string{"a.png", "b.png"} // AssetDir("foo.txt") and AssetDir("notexist") would return an error