Skip to content

Add usage_type to SSHKey

The API supports this already:

❯ curl https://gitlab.com/api/v4/users/faleksic/keys --silent | jq
[
  {
    "id": 8150715,
    "title": "faleksic@gitlab.com",
    "created_at": "2021-10-11T08:26:06.220Z",
    "expires_at": null,
    "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKzFOb/VDmer+EemUhU5K2pFMerGFJKCMPGpGT18c2na Filip Aleksic (gitlab.com)",
    "usage_type": "auth_and_signing"
  }
]

However we aren't exposing this functionality via the gitlab-org/api/client-go> SDK.

This MR adds the field to the struct to be in-line with the API. Clients using the SDK such as gitlab-org/cli> can benefit from this by including the usage_type in the output of the CLI tool.

Closes #2095 (closed)

Edited by Filip Aleksic

Merge request reports

Loading