CCF
Loading...
Searching...
No Matches
include
ccf
js
bundle.h
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the Apache 2.0 License.
3
#pragma once
4
5
#include "
ccf/ds/json.h
"
6
#include "
ccf/endpoint.h
"
7
8
#include <map>
9
#include <string>
10
11
namespace
ccf::js
12
{
13
struct
Metadata
14
{
15
// Path -> {HTTP Method -> Properties}
16
std::map<
17
ccf::endpoints::URI
,
18
std::map<std::string, ccf::endpoints::EndpointProperties>>
19
endpoints
;
20
};
21
DECLARE_JSON_TYPE
(
Metadata
);
22
DECLARE_JSON_REQUIRED_FIELDS
(
Metadata
, endpoints);
23
24
struct
ModuleDef
25
{
26
std::string
name
;
27
std::string
module
;
28
};
29
DECLARE_JSON_TYPE
(
ModuleDef
);
30
DECLARE_JSON_REQUIRED_FIELDS
(
ModuleDef
, name, module);
31
32
struct
Bundle
33
{
34
std::vector<ModuleDef>
modules
;
35
Metadata
metadata
;
36
};
37
38
DECLARE_JSON_TYPE
(
Bundle
);
39
DECLARE_JSON_REQUIRED_FIELDS
(
Bundle
, modules, metadata);
40
}
endpoint.h
json.h
DECLARE_JSON_REQUIRED_FIELDS
#define DECLARE_JSON_REQUIRED_FIELDS(TYPE,...)
Definition
json.h:714
DECLARE_JSON_TYPE
#define DECLARE_JSON_TYPE(TYPE)
Definition
json.h:663
ccf::endpoints::URI
std::string URI
Definition
endpoint.h:17
ccf::js
Definition
bundle.h:12
ccf::js::Bundle
Definition
bundle.h:33
ccf::js::Bundle::metadata
Metadata metadata
Definition
bundle.h:35
ccf::js::Bundle::modules
std::vector< ModuleDef > modules
Definition
bundle.h:34
ccf::js::Metadata
Definition
bundle.h:14
ccf::js::Metadata::endpoints
std::map< ccf::endpoints::URI, std::map< std::string, ccf::endpoints::EndpointProperties > > endpoints
Definition
bundle.h:19
ccf::js::ModuleDef
Definition
bundle.h:25
ccf::js::ModuleDef::name
std::string name
Definition
bundle.h:26
Generated by
1.9.8