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

32 lines
652 B
Ruby
Raw Normal View History

2019-03-02 22:35:43 +05:30
# frozen_string_literal: true
module API
module Entities
module ContainerRegistry
2019-10-12 21:52:04 +05:30
class Tag < Grape::Entity
2019-03-02 22:35:43 +05:30
expose :name
expose :path
expose :location
end
2019-10-12 21:52:04 +05:30
class Repository < Grape::Entity
expose :id
2019-03-02 22:35:43 +05:30
expose :name
expose :path
2019-10-12 21:52:04 +05:30
expose :project_id
2019-03-02 22:35:43 +05:30
expose :location
2019-10-12 21:52:04 +05:30
expose :created_at
expose :tags, using: Tag, if: -> (_, options) { options[:tags] }
2019-03-02 22:35:43 +05:30
end
class TagDetails < Tag
expose :revision
expose :short_revision
expose :digest
expose :created_at
expose :total_size
end
end
end
end