blob: 35d76cf979cef5e1b450d15e4a6e45d3e1a0ee8f [file] [log] [blame]
Dylan Reid6b590e62016-10-27 19:10:53 -07001// 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
5#ifndef CONTAINER_UTILS_CONTAINER_CONFIG_PARSER_H_
6#define CONTAINER_UTILS_CONTAINER_CONFIG_PARSER_H_
7
8#include <memory>
9#include <string>
10
11#include <base/files/file_path.h>
12#include <base/values.h>
13
14#include "oci_config.h"
15
16namespace container_utils {
17
18using 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.
24bool ParseContainerConfig(const std::string& config_json_data,
25 OciConfigPtr const& config_out);
26
27} // namespace container_utils
28
29#endif // CONTAINER_UTILS_CONTAINER_CONFIG_PARSER_H_