debian-mirror-gitlab/lib/api/entities/deploy_key.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
872 B
Ruby
Raw Normal View History

2020-07-01 16:08:20 +05:30
# frozen_string_literal: true
module API
module Entities
class DeployKey < Entities::SSHKey
2023-01-13 00:05:48 +05:30
expose :key,
documentation: { type: 'string', example: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNJAkI3Wdf0r13c8a5pEExB2YowPWCSVzfZV22pNBc1CuEbyYLHpUyaD0GwpGvFdx2aP7lMEk35k6Rz3ccBF6jRaVJyhsn5VNnW92PMpBJ/P1UebhXwsFHdQf5rTt082cSxWuk61kGWRQtk4ozt/J2DF/dIUVaLvc+z4HomT41fQ==' }
expose :fingerprint,
documentation: { type: 'string', example: '4a:9d:64:15:ed:3a:e6:07:6e:89:36:b3:3b:03:05:d9' },
if: ->(key, _) { key.fingerprint.present? }
expose :fingerprint_sha256,
documentation: { type: 'string', example: 'SHA256:Jrs3LD1Ji30xNLtTVf9NDCj7kkBgPBb2pjvTZ3HfIgU' }
2021-12-11 22:18:48 +05:30
expose :projects_with_write_access, using: Entities::ProjectIdentity, if: -> (_, options) { options[:include_projects_with_write_access] }
2020-07-01 16:08:20 +05:30
end
end
end