diff --git a/client/api_key.go b/client/api_key.go index 227b11f6..85a7f4f7 100644 --- a/client/api_key.go +++ b/client/api_key.go @@ -10,6 +10,7 @@ import ( "github.com/spectrocloud/palette-sdk-go/api/models" ) +// GetAPIKeys retrieves all API Keys. func (h *V1Client) GetAPIKeys() (*models.V1APIKeys, error) { params := clientv1.NewV1APIKeysListParams() resp, err := h.Client.V1APIKeysList(params) @@ -20,6 +21,7 @@ func (h *V1Client) GetAPIKeys() (*models.V1APIKeys, error) { return resp.Payload, nil } +// DeleteAPIKeyByName deletes an existing API Key by name. func (h *V1Client) DeleteAPIKeyByName(name string) error { keys, err := h.GetAPIKeys() if err != nil { @@ -33,6 +35,7 @@ func (h *V1Client) DeleteAPIKeyByName(name string) error { return fmt.Errorf("api key with name '%s' not found", name) } +// DeleteAPIKey deletes an existing API Key by UID. func (h *V1Client) DeleteAPIKey(uid string) error { params := clientv1.NewV1APIKeysUIDDeleteParams().WithUID(uid) _, err := h.Client.V1APIKeysUIDDelete(params) diff --git a/client/project.go b/client/project.go index 5c6dd947..a19f2b40 100644 --- a/client/project.go +++ b/client/project.go @@ -38,7 +38,7 @@ func (h *V1Client) GetProjectUID(projectName string) (string, error) { return "", fmt.Errorf("project '%s' not found", projectName) } -// GetProjectByUID retrieves an existing project by UID. +// GetProject retrieves an existing project by UID. func (h *V1Client) GetProject(uid string) (*models.V1Project, error) { // ACL scoped to tenant only params := clientv1.NewV1ProjectsUIDGetParams(). diff --git a/client/ssh_key.go b/client/ssh_key.go index 42dc50ba..1adf2c97 100644 --- a/client/ssh_key.go +++ b/client/ssh_key.go @@ -42,7 +42,7 @@ func (h *V1Client) GetSSHKeyByName(name string) (*models.V1UserAssetSSH, error) return nil, fmt.Errorf("ssh key '%s' not found", name) } -// GetSSHKeyByUID retrieves an existing SSH key by UID. +// GetSSHKey retrieves an existing SSH key by UID. func (h *V1Client) GetSSHKey(uid string) (*models.V1UserAssetSSH, error) { params := clientv1.NewV1UsersAssetSSHGetUIDParamsWithContext(h.ctx). WithUID(uid) diff --git a/client/user.go b/client/user.go index ee6ebd86..8369d3a5 100644 --- a/client/user.go +++ b/client/user.go @@ -84,7 +84,7 @@ func (h *V1Client) GetUserByEmail(email string) (*models.V1User, error) { return nil, fmt.Errorf("user with email '%s' not found", email) } -// DeleteUserByUID deletes an existing user by UID. +// DeleteUser deletes an existing user by UID. func (h *V1Client) DeleteUser(uid string) error { params := clientv1.NewV1UsersUIDDeleteParams().WithUID(uid) _, err := h.Client.V1UsersUIDDelete(params)