Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 18:09:08 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-14 18:09:08 +0300
commitb3a736ed88a1db0391cd9881e70b987bab7d89d1 (patch)
treea91ca3a06abd4c3412775ac3c49b11e3151df2be /lib/api/entities
parent5366964a10484c2783a646b35a6da9eece01b242 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/entities')
-rw-r--r--lib/api/entities/application.rb13
-rw-r--r--lib/api/entities/application_with_secret.rb10
-rw-r--r--lib/api/entities/blob.rb20
-rw-r--r--lib/api/entities/custom_attribute.rb10
-rw-r--r--lib/api/entities/pages_domain_certificate_expiration.rb10
-rw-r--r--lib/api/entities/user_agent_detail.rb11
6 files changed, 74 insertions, 0 deletions
diff --git a/lib/api/entities/application.rb b/lib/api/entities/application.rb
new file mode 100644
index 00000000000..33514200424
--- /dev/null
+++ b/lib/api/entities/application.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class Application < Grape::Entity
+ expose :id
+ expose :uid, as: :application_id
+ expose :name, as: :application_name
+ expose :redirect_uri, as: :callback_url
+ expose :confidential
+ end
+ end
+end
diff --git a/lib/api/entities/application_with_secret.rb b/lib/api/entities/application_with_secret.rb
new file mode 100644
index 00000000000..3e540381d89
--- /dev/null
+++ b/lib/api/entities/application_with_secret.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ # Use with care, this exposes the secret
+ class ApplicationWithSecret < Entities::Application
+ expose :secret
+ end
+ end
+end
diff --git a/lib/api/entities/blob.rb b/lib/api/entities/blob.rb
new file mode 100644
index 00000000000..b14ef127b68
--- /dev/null
+++ b/lib/api/entities/blob.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class Blob < Grape::Entity
+ expose :basename
+ expose :data
+ expose :path
+ # TODO: :filename was renamed to :path but both still return the full path,
+ # in the future we can only return the filename here without the leading
+ # directory path.
+ # https://gitlab.com/gitlab-org/gitlab/issues/34521
+ expose :filename, &:path
+ expose :id
+ expose :ref
+ expose :startline
+ expose :project_id
+ end
+ end
+end
diff --git a/lib/api/entities/custom_attribute.rb b/lib/api/entities/custom_attribute.rb
new file mode 100644
index 00000000000..f949b709517
--- /dev/null
+++ b/lib/api/entities/custom_attribute.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class CustomAttribute < Grape::Entity
+ expose :key
+ expose :value
+ end
+ end
+end
diff --git a/lib/api/entities/pages_domain_certificate_expiration.rb b/lib/api/entities/pages_domain_certificate_expiration.rb
new file mode 100644
index 00000000000..bfc70f6657f
--- /dev/null
+++ b/lib/api/entities/pages_domain_certificate_expiration.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class PagesDomainCertificateExpiration < Grape::Entity
+ expose :expired?, as: :expired
+ expose :expiration
+ end
+ end
+end
diff --git a/lib/api/entities/user_agent_detail.rb b/lib/api/entities/user_agent_detail.rb
new file mode 100644
index 00000000000..a2d02c16589
--- /dev/null
+++ b/lib/api/entities/user_agent_detail.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+module API
+ module Entities
+ class UserAgentDetail < Grape::Entity
+ expose :user_agent
+ expose :ip_address
+ expose :submitted, as: :akismet_submitted
+ end
+ end
+end