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:
authorAsh McKenzie <amckenzie@gitlab.com>2018-08-28 06:43:11 +0300
committerAsh McKenzie <amckenzie@gitlab.com>2018-09-06 11:38:19 +0300
commit31a752a782d4ed382f5a426bde06192f08962dce (patch)
treef8f9edf26c24c8b42c5d61bdbcff4743bd5902f0 /lib/gitlab/git_access_result
parentb92b7d822226724db76b8dfb61dca438ea8dbb1c (diff)
New GitAccessResult::Success/CustomAction
Diffstat (limited to 'lib/gitlab/git_access_result')
-rw-r--r--lib/gitlab/git_access_result/custom_action.rb25
-rw-r--r--lib/gitlab/git_access_result/success.rb8
2 files changed, 33 insertions, 0 deletions
diff --git a/lib/gitlab/git_access_result/custom_action.rb b/lib/gitlab/git_access_result/custom_action.rb
new file mode 100644
index 00000000000..a05a4baed82
--- /dev/null
+++ b/lib/gitlab/git_access_result/custom_action.rb
@@ -0,0 +1,25 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module GitAccessResult
+ class CustomAction
+ attr_reader :payload, :message
+
+ # Example of payload:
+ #
+ # {
+ # 'action' => 'geo_proxy_to_primary',
+ # 'data' => {
+ # 'api_endpoints' => %w{geo/proxy_git_push_ssh/info_refs geo/proxy_git_push_ssh/push},
+ # 'gl_username' => user.username,
+ # 'primary_repo' => geo_primary_http_url_to_repo(project_or_wiki)
+ # }
+ # }
+ #
+ def initialize(payload, message)
+ @payload = payload
+ @message = message
+ end
+ end
+ end
+end
diff --git a/lib/gitlab/git_access_result/success.rb b/lib/gitlab/git_access_result/success.rb
new file mode 100644
index 00000000000..7bb9f24cb0e
--- /dev/null
+++ b/lib/gitlab/git_access_result/success.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module GitAccessResult
+ class Success
+ end
+ end
+end