Dylan Reid | 6b590e6 | 2016-10-27 19:10:53 -0700 | [diff] [blame] | 1 | // Copyright 2016 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Stephen Barber | 5f6dc9b | 2017-04-04 12:36:32 -0700 | [diff] [blame] | 5 | #ifndef RUN_OCI_CONTAINER_CONFIG_PARSER_H_ |
| 6 | #define RUN_OCI_CONTAINER_CONFIG_PARSER_H_ |
Dylan Reid | 6b590e6 | 2016-10-27 19:10:53 -0700 | [diff] [blame] | 7 | |
| 8 | #include <memory> |
| 9 | #include <string> |
| 10 | |
| 11 | #include <base/files/file_path.h> |
| 12 | #include <base/values.h> |
| 13 | |
Stephen Barber | 5f6dc9b | 2017-04-04 12:36:32 -0700 | [diff] [blame] | 14 | #include "run_oci/oci_config.h" |
Dylan Reid | 6b590e6 | 2016-10-27 19:10:53 -0700 | [diff] [blame] | 15 | |
Stephen Barber | 5f6dc9b | 2017-04-04 12:36:32 -0700 | [diff] [blame] | 16 | namespace run_oci { |
Dylan Reid | 6b590e6 | 2016-10-27 19:10:53 -0700 | [diff] [blame] | 17 | |
| 18 | using OciConfigPtr = std::unique_ptr<OciConfig>; |
| 19 | |
| 20 | // Parses container configuration from the config.json data as specified in |
| 21 | // https://github.com/opencontainers/runtime-spec/tree/v1.0.0-rc1 |
| 22 | // |config_json_data| - The text from config.json. |
| 23 | // |config_out| - Filled with the OCI configuration. |
| 24 | bool ParseContainerConfig(const std::string& config_json_data, |
| 25 | OciConfigPtr const& config_out); |
| 26 | |
Stephen Barber | 5f6dc9b | 2017-04-04 12:36:32 -0700 | [diff] [blame] | 27 | } // namespace run_oci |
Dylan Reid | 6b590e6 | 2016-10-27 19:10:53 -0700 | [diff] [blame] | 28 | |
Stephen Barber | 5f6dc9b | 2017-04-04 12:36:32 -0700 | [diff] [blame] | 29 | #endif // RUN_OCI_CONTAINER_CONFIG_PARSER_H_ |