From 7bb404c2a1f0bf3b6f4aa25bb6ab53093c81e33d Mon Sep 17 00:00:00 2001 From: cgoodwin90 Date: Mon, 20 Nov 2023 10:45:28 +1100 Subject: [PATCH] Removed unused function --- pkg/lagoon/users/main.go | 1 - pkg/lagoon/users/users.go | 20 +------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/pkg/lagoon/users/main.go b/pkg/lagoon/users/main.go index 4afa8fb6..c9e55044 100644 --- a/pkg/lagoon/users/main.go +++ b/pkg/lagoon/users/main.go @@ -23,7 +23,6 @@ type Client interface { ListUsers(string) ([]byte, error) AddUser(api.User) ([]byte, error) AddSSHKeyToUser(api.User, api.SSHKey) ([]byte, error) - DeleteSSHKey(string) ([]byte, error) DeleteUser(api.User) ([]byte, error) ModifyUser(api.User, api.User) ([]byte, error) ListUserSSHKeys(string, string, bool) ([]byte, error) diff --git a/pkg/lagoon/users/users.go b/pkg/lagoon/users/users.go index c4c15897..411a92bb 100644 --- a/pkg/lagoon/users/users.go +++ b/pkg/lagoon/users/users.go @@ -61,24 +61,6 @@ func (u *Users) AddSSHKeyToUser(user api.User, sshKey api.SSHKey) ([]byte, error return returnResult, nil } -// DeleteSSHKey function -func (u *Users) DeleteSSHKey(keyName string) ([]byte, error) { - customReq := api.CustomRequest{ - Query: `mutation deleteSshKey ($keyname: String!) { - deleteSshKey(input:{name: $keyname}) - }`, - Variables: map[string]interface{}{ - "keyname": keyName, - }, - MappedResult: "deleteSshKey", - } - returnResult, err := u.api.Request(customReq) - if err != nil { - return []byte(""), err - } - return returnResult, nil -} - // DeleteUser function func (u *Users) DeleteUser(user api.User) ([]byte, error) { customReq := api.CustomRequest{ @@ -218,7 +200,7 @@ func (u *Users) ListUserSSHKeys(groupName string, email string, allUsers bool) ( customReq := api.CustomRequest{ Query: `query allGroups ($name: String) { allGroups (name: $name) { - name + nameListUserSSHKeys id members{ user{