10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'match/lib/match/storage.rb', line 10
def backends
@backends ||= {
"git" => lambda { |params|
return Storage::GitStorage.configure({
type: params[:type],
platform: params[:platform],
git_url: params[:git_url],
shallow_clone: params[:shallow_clone],
skip_docs: params[:skip_docs],
git_branch: params[:git_branch],
git_full_name: params[:git_full_name],
git_user_email: params[:git_user_email],
clone_branch_directly: params[:clone_branch_directly],
git_basic_authorization: params[:git_basic_authorization],
git_bearer_authorization: params[:git_bearer_authorization],
git_private_key: params[:git_private_key]
})
},
"google_cloud" => lambda { |params|
return Storage::GoogleCloudStorage.configure({
type: params[:type],
platform: params[:platform],
google_cloud_bucket_name: params[:google_cloud_bucket_name],
google_cloud_keys_file: params[:google_cloud_keys_file],
google_cloud_project_id: params[:google_cloud_project_id],
readonly: params[:readonly],
username: params[:username],
team_id: params[:team_id],
team_name: params[:team_name],
api_key_path: params[:api_key_path],
api_key: params[:api_key],
skip_google_cloud_account_confirmation: params[:skip_google_cloud_account_confirmation]
})
},
"s3" => lambda { |params|
return Storage::S3Storage.configure({
s3_region: params[:s3_region],
s3_access_key: params[:s3_access_key],
s3_secret_access_key: params[:s3_secret_access_key],
s3_bucket: params[:s3_bucket],
s3_object_prefix: params[:s3_object_prefix],
readonly: params[:readonly],
username: params[:username],
team_id: params[:team_id],
team_name: params[:team_name],
api_key_path: params[:api_key_path],
api_key: params[:api_key]
})
},
"gitlab_secure_files" => lambda { |params|
return Storage::GitLabSecureFiles.configure({
gitlab_host: params[:gitlab_host],
gitlab_project: params[:gitlab_project],
git_url: params[:git_url], job_token: params[:job_token],
private_token: params[:private_token],
readonly: params[:readonly],
username: params[:username],
team_id: params[:team_id],
team_name: params[:team_name],
api_key_path: params[:api_key_path],
api_key: params[:api_key]
})
}
}
end
|