Android-cuttlefish cvd tool
luci_build_api.h
Go to the documentation of this file.
1//
2// Copyright (C) 2024 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#pragma once
17
18#include <optional>
19#include <string>
20#include <vector>
21
26
27namespace cuttlefish {
28
30 std::string artifact_link;
31 std::vector<std::string> artifact_files;
32};
33
35 public:
36 LuciBuildApi(HttpClient& http_client,
37 CredentialSource* buildbucket_credential_source,
38 CredentialSource* storage_credential_source);
39
41 const ChromeOsBuildString&);
42
43 Result<void> DownloadArtifact(const std::string& artifact_link,
44 const std::string& artifact_file,
45 const std::string& target_path);
46
47 private:
50
54};
55
56} // namespace cuttlefish
Definition: expected.h:86
Definition: credential_source.h:29
Definition: http_client.h:84
Definition: luci_build_api.h:34
Result< void > DownloadArtifact(const std::string &artifact_link, const std::string &artifact_file, const std::string &target_path)
Definition: luci_build_api.cpp:138
LuciBuildApi(HttpClient &http_client, CredentialSource *buildbucket_credential_source, CredentialSource *storage_credential_source)
Definition: luci_build_api.cpp:42
CredentialSource * buildbucket_credential_source_
Definition: luci_build_api.h:52
Result< std::vector< std::string > > CloudStorageHeaders()
Definition: luci_build_api.cpp:62
Result< std::vector< std::string > > BuildBucketHeaders()
Definition: luci_build_api.cpp:49
HttpClient & http_client_
Definition: luci_build_api.h:51
Result< std::optional< ChromeOsBuildArtifacts > > GetBuildArtifacts(const ChromeOsBuildString &)
Definition: luci_build_api.cpp:72
CredentialSource * storage_credential_source_
Definition: luci_build_api.h:53
Definition: alloc_utils.cpp:23
std::variant< ChromeOsBuilder, std::string > ChromeOsBuildString
Definition: chrome_os_build_string.h:44
Definition: luci_build_api.h:29
std::string artifact_link
Definition: luci_build_api.h:30
std::vector< std::string > artifact_files
Definition: luci_build_api.h:31