Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit da94ca6

Browse filesBrowse files
committed
feat: add synth config to generate datastore_admin_v1
1 parent 6218d95 commit da94ca6
Copy full SHA for da94ca6

File tree

Expand file treeCollapse file tree

1 file changed

+32
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+32
-10
lines changed

‎synth.py

Copy file name to clipboardExpand all lines: synth.py
+32-10Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,42 @@
1818

1919
gapic = gcp.GAPICGenerator()
2020
common = gcp.CommonTemplates()
21+
versions = [
22+
("v1", "artman_datastore.yaml")
23+
]
24+
admin_versions = [
25+
("v1", "artman_datastore_admin.yaml")
26+
]
2127

2228
# ----------------------------------------------------------------------------
2329
# Generate datastore GAPIC layer
2430
# ----------------------------------------------------------------------------
25-
library = gapic.py_library(
26-
"datastore",
27-
"v1",
28-
config_path="/google/datastore/artman_datastore.yaml",
29-
artman_output_name="datastore-v1",
30-
include_protos=True,
31-
)
32-
33-
s.move(library / "google/cloud/datastore_v1/proto")
34-
s.move(library / "google/cloud/datastore_v1/gapic")
31+
for version, artman_config in versions:
32+
library = gapic.py_library(
33+
"datastore",
34+
f"{version}",
35+
config_path=f"/google/datastore/{artman_config}",
36+
artman_output_name=f"datastore-{version}",
37+
include_protos=True,
38+
)
39+
40+
s.move(library / f"google/cloud/datastore_{version}/proto")
41+
s.move(library / f"google/cloud/datastore_{version}/gapic")
42+
43+
# ----------------------------------------------------------------------------
44+
# Generate datastore admin GAPIC layer
45+
# ----------------------------------------------------------------------------
46+
for version, artman_config in admin_versions:
47+
library = gapic.py_library(
48+
"datastore_admin",
49+
f"{version}",
50+
config_path=f"/google/datastore/admin/{artman_config}",
51+
artman_output_name=f"datastore-admin-{version}",
52+
include_protos=True,
53+
)
54+
55+
s.move(library / f"google/cloud/datastore_admin_{version}/proto")
56+
s.move(library / f"google/cloud/datastore_admin_{version}/gapic")
3557

3658
# ----------------------------------------------------------------------------
3759
# Add templated files

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.