Compare commits

...

1590 Commits

Author SHA1 Message Date
dependabot[bot]
a4e1ab017c chore(deps): bump golang.org/x/net
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20201110031124-69a78807bb2b to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-25 01:52:52 +00:00
Andrey Melnikov
1170b53f61 Merge pull request #964 from Vafilor/feat/remove.links
fix: remove slack link
2021-11-15 12:24:52 -08:00
Andrey Melnikov
0213e1ead6 fix: remove slack link 2021-11-15 12:24:15 -08:00
Andrey Melnikov
9c1430273c Merge pull request #963 from Vafilor/feat/remove.links
feat: remove enterprise support link
2021-11-10 10:02:01 -08:00
Andrey Melnikov
90c45fb6db feat: remove enterprise support link 2021-11-10 09:54:23 -08:00
Andrey Melnikov
c984ff34d5 Merge pull request #961 from Vafilor/feat/remove.community.restrictions
fix: remove namespace creation restriction
2021-10-28 16:12:59 -07:00
Andrey Melnikov
5283b7beb6 fix: add missing manifests and incorrect cvat_1.6.0 version name in metadata 2021-10-28 16:08:31 -07:00
Andrey Melnikov
2cddf4a88a fix: remove namespace creation restriction 2021-10-28 15:50:39 -07:00
Andrey Melnikov
dd3d7f6632 Merge pull request #960 from Vafilor/feat/new.cvat
feat: cvat 1.6.0 workspace migration
2021-10-28 14:47:57 -07:00
Andrey Melnikov
4d1aff5c5b fix: method comments 2021-10-28 14:45:55 -07:00
Andrey Melnikov
719613ecd4 feat: cvat 1.6.0 workspace migration 2021-10-28 14:44:29 -07:00
Andrey Melnikov
09b854a434 Merge pull request #959 from Vafilor/feat/create.namespace.stub
feat: stub out create namespace
2021-10-27 10:09:19 -07:00
Andrey Melnikov
493ca51682 fix: docs for CreateNamespace 2021-10-27 09:31:07 -07:00
Andrey Melnikov
6407c2a7b4 feat: add create namespace code 2021-10-27 09:24:28 -07:00
Andrey Melnikov
62896b2f52 fix: Deny create namespace permission in community edition 2021-10-26 15:47:13 -07:00
Andrey Melnikov
d934163fc8 fix: code formatting and docs 2021-10-26 15:37:21 -07:00
Andrey Melnikov
e991102d85 Merge pull request #958 from Vafilor/feat/cache.values
feat: cache artifactRepositoryType
2021-10-26 15:32:59 -07:00
Andrey Melnikov
467f7f71dd fix: add missing comment 2021-10-26 15:29:12 -07:00
Andrey Melnikov
f1c0f0d31e feat: stub out create namespace and add supporting methods from enterprise version 2021-10-26 15:26:23 -07:00
Andrey Melnikov
11fc055ee3 feat: cache artifactRepositoryType 2021-10-26 15:23:47 -07:00
Andrey Melnikov
d9c79370e9 Merge pull request #957 from Vafilor/feat/update.migrations
feat: updated go migration data to have metadata
2021-10-26 15:19:19 -07:00
Andrey Melnikov
98f78d453a feat: updated go migration data to have metadata to make it easier to get all of the information from one file 2021-10-26 15:14:43 -07:00
Andrey Melnikov
700b3bd512 Merge pull request #955 from Vafilor/feat/add.serving.variables
feat: add onepanel serving url to workspaces
2021-10-07 12:29:05 -07:00
Andrey Melnikov
3abdc54d3c feat: add onepanel serving url to workspaces 2021-10-07 12:24:01 -07:00
Rush Tehrani
f570a710ba Update README.md 2021-09-17 09:40:54 -07:00
Rush Tehrani
c922b708fc Merge pull request #953 from Vafilor/fix/workflow.volumes
fix: workflow volumes don't delete on failed workflow
2021-09-08 12:57:56 -07:00
Andrey Melnikov
fc9669d757 fix: add PodCompletion volume claim gc by default to workflows. This will clean up the volumes if the workflow fails 2021-09-08 12:47:23 -07:00
rushtehrani
8eeb90d3f1 update features image in README 2021-08-19 12:22:57 -07:00
rushtehrani
c25dfce84f Update features image 2021-08-18 11:09:48 -07:00
Andrey Melnikov
5705bfa47f Merge pull request #943 from Vafilor/feat/model.deployment
feat: Inference Service API
2021-08-12 10:58:15 -07:00
Andrey Melnikov
44a78effed feat: Create response for inference service now returns information about the status 2021-08-12 10:05:04 -07:00
Andrey Melnikov
a8985a7878 chore: codacy docs 2021-08-11 17:08:24 -07:00
Andrey Melnikov
69006309b4 feat: allow onepanel-access-token in addition to the onepanel-auth-token 2021-08-11 16:29:37 -07:00
Andrey Melnikov
22b3d984ec clean: simplify marshaling of InferenceService 2021-08-11 16:29:10 -07:00
Andrey Melnikov
4528927463 feat: updated endpoint to get the status to include predictor url 2021-08-11 11:40:18 -07:00
Andrey Melnikov
edf7a30f64 feat: support both resource requests and limits for InferenceService 2021-08-10 14:47:32 -07:00
Andrey Melnikov
51fb86e3fe feat: simplify API for model services and rename it to inferenceservice 2021-08-10 13:36:44 -07:00
Andrey Melnikov
d8e0e5c968 feat: add defaults for model deployment and add get status and delete endpoints 2021-08-10 09:54:17 -07:00
Andrey Melnikov
75719caec9 feat: model deployment API 2021-08-06 16:07:27 -07:00
Andrey Melnikov
147c937252 Merge pull request #940 from Vafilor/feat/full.node.resources
feat: add optional logic to capture the entire node
2021-08-03 09:01:52 -07:00
Andrey Melnikov
e0f3f81563 feat: add optional logic to capture the entire node 2021-08-02 16:43:12 -07:00
Andrey Melnikov
0021249464 Merge pull request #938 from Vafilor/feat/expose.minio
feat: separate files api and support presigned urls
2021-08-02 15:11:34 -07:00
Andrey Melnikov
7235951ec2 chore: codacy docs 2021-08-02 15:08:09 -07:00
Andrey Melnikov
f843074a3f chore: codacy - Url -> URL 2021-07-30 14:21:15 -07:00
Andrey Melnikov
8e6ef8d3eb feat: updated presigned url response to include the file size so client can decide if it can be displayed or not 2021-07-30 14:01:38 -07:00
Andrey Melnikov
d226028b33 feat: separate files from workflow and add endpoint to get pre-signed url 2021-07-30 12:52:50 -07:00
Andrey Melnikov
82585d1011 Merge pull request #936 from Vafilor/fix/wrong.namespace
fix: issue where wrong namespace was parsed in certain cases
2021-07-27 11:10:34 -07:00
Andrey Melnikov
193dbe156e fix: issue where wrong namespace was obtained from certain urls for workspaces/models 2021-07-27 11:05:26 -07:00
Rush Tehrani
5ebccbd811 Update summary and Argo link 2021-07-22 11:05:43 -07:00
Andrey Melnikov
023fb50046 Merge pull request #934 from Vafilor/fix/s3.files
fix: s3 not listing files in file browser
2021-07-20 13:18:13 -07:00
Andrey Melnikov
abd8d3cde0 Merge pull request #933 from Vafilor/feat/filesyncer.update.migrations
feat: added migrations to update filesyncer to version 1.0.0
2021-07-20 13:13:58 -07:00
Andrey Melnikov
64d6dde1aa Merge branch 'fix/s3.files' of github.com:Vafilor/core into fix/s3.files 2021-07-20 13:08:21 -07:00
Andrey Melnikov
d0d68470dd fix: issue where s3 storage would not list files (but would list folders) 2021-07-20 13:07:38 -07:00
Andrey Melnikov
6f8e3f56e7 chore: documenting migrations 2021-07-20 13:07:17 -07:00
Andrey Melnikov
2b47ad7092 fix: issue where s3 storage would not list files (but would list folders) 2021-07-20 13:01:14 -07:00
Andrey Melnikov
66e2418424 feat: added migrations to update filesyncer to version 1.0.0 2021-07-20 13:00:41 -07:00
Andrey Melnikov
5b6979302e Merge pull request #930 from Vafilor/feat/storage.pagination
feat: added pagination to listing files
2021-07-16 16:02:22 -07:00
Andrey Melnikov
afb98c295b feat: added pagination to listing files 2021-07-16 15:33:09 -07:00
Andrey Melnikov
1fb0d10b7c Merge pull request #925 from Vafilor/feat/service.availability
feat: check if kfserving is set up
2021-07-12 15:27:16 -07:00
Andrey Melnikov
c4438bfe0d feat: check if kfserving is set up 2021-07-12 12:46:11 -07:00
Rush Tehrani
8329706f22 Update README.md 2021-07-08 14:01:22 -07:00
Andrey Melnikov
09be35b2d6 fix: don't publish image on any md file changes or github workflow changes 2021-07-08 12:23:21 -07:00
Andrey Melnikov
e4d83903c7 fix: don't publish image on README changess 2021-07-08 12:15:19 -07:00
Rush Tehrani
69bc6e3df1 Update README.md 2021-07-08 12:04:47 -07:00
Andrey Melnikov
bfee6c2e34 Merge pull request #921 from Vafilor/feat/auth.updates
feat: auth updates
2021-05-25 11:53:37 -07:00
Andrey Melnikov
47e03d7e7c Merge pull request #922 from Vafilor/fix/in.cluster.api.url
fix: use in-cluster url for ONEPANEL_API_URL
2021-05-25 11:51:08 -07:00
Andrey Melnikov
bcf78b54a0 fix: no 400 response returned from bad token 2021-05-25 11:49:35 -07:00
Andrey Melnikov
96b8f522b3 fix: use in-cluster url for ONEPANEL_API_URL so workspaces can access it in-cluster 2021-05-21 15:41:26 -07:00
Andrey Melnikov
98766cdc41 feat: auth updates 2021-05-19 13:40:43 -07:00
Rush Tehrani
378850f591 Merge pull request #919 from rushtehrani/master
chore: Add feature highlights video
2021-04-28 17:52:52 -07:00
Rush Tehrani
e27361466f Update feature highlights video 2021-04-28 17:47:49 -07:00
Rush Tehrani
daabf17078 Update features overview video 2021-04-27 11:11:15 -07:00
Rush Tehrani
73385ad779 Update README.md 2021-04-27 11:05:55 -07:00
Andrey Melnikov
c92c848134 Merge pull request #912 from inohmonton99/feat/description
feat: add description for workflow templates
2021-04-19 12:44:12 -07:00
Andrey Melnikov
82424605f6 chore: version bump to 0.22.0 2021-04-19 12:41:22 -07:00
Andrey Melnikov
9f05ab150a Merge pull request #913 from Vafilor/feat/add.deep.learning.desktop
feat: added deep learning desktop workspace
2021-04-14 11:01:56 -07:00
Andrey Melnikov
81de77d88b feat: added description to deep learning workspace 2021-04-14 10:58:22 -07:00
Andrey Melnikov
ea47eaf49d feat: added deep learning desktop workspace 2021-04-14 10:22:24 -07:00
inohmonton99
42e99f0ac4 updated api to match correct settings with new feature 2021-04-10 00:44:53 +08:00
inohmonton99
ae702c474c removed unnecessary commits and description migration for workflow_templates db 2021-04-08 00:28:20 +08:00
inohmonton99
cfd63a3ef9 description feature wip 2021-04-06 04:34:47 +08:00
Andrey Melnikov
1b2d5623b4 Merge pull request #908 from Vafilor/fix/release.command.repo
fix: updated repo in generate release notes as the name has changed
2021-04-01 16:31:42 -07:00
Andrey Melnikov
86895a9dfe Update README.md 2021-04-01 14:44:37 -07:00
Andrey Melnikov
ec94a13cd9 fix: updated repo in generate release notes as the name has changed 2021-04-01 10:53:26 -07:00
Andrey Melnikov
22836c85e1 Merge pull request #907 from Vafilor/feat/pns.updates
fix: don't use port 80 for host port
2021-04-01 10:29:23 -07:00
Andrey Melnikov
a3ab4a86b0 fjx: don't use port 80 for host port so it doesn't take it 2021-04-01 09:08:36 -07:00
Andrey Melnikov
b6ef84a0aa Merge pull request #906 from Vafilor/feat/pns.updates
fix: wrong onepanel/dl version
2021-03-31 19:21:58 -07:00
Andrey Melnikov
9f513dda9b fix: wrong onepanel/dl version 2021-03-31 18:59:21 -07:00
Andrey Melnikov
1bb3e7506d Merge pull request #905 from Vafilor/feat/pns.updates
fix: bug with remove hyperparam tuning migration
2021-03-30 15:13:02 -07:00
Andrey Melnikov
0f19e4d618 fix: bug with remove hyperparam tuning migration 2021-03-30 14:02:08 -07:00
Rush Tehrani
6c251761f5 Merge pull request #904 from Vafilor/feat/pns.updates
feat: Update code to work better with PNS executor
2021-03-30 12:47:54 -07:00
Andrey Melnikov
2cad065778 chore: codacy fixes 2021-03-29 16:23:31 -07:00
Andrey Melnikov
2fe0a239c5 feat: remove hyperparameter tuning workflow if there are no workflow executions ran by it 2021-03-29 16:18:41 -07:00
Andrey Melnikov
8287e178b5 fix: wrong onepanel/dl version for updated jupyterlab template 2021-03-29 12:35:11 -07:00
Andrey Melnikov
b869f2eb22 Merge branch 'feat/pns.updates' of github.com:Vafilor/core into feat/pns.updates 2021-03-29 12:09:54 -07:00
Andrey Melnikov
c4893ed0d7 feat: updated migrations and updated code to better work with pns executor based on Long Nguyen's suggestions. 2021-03-29 12:08:38 -07:00
Andrey Melnikov
4882671b52 feat: updated migrations and updated code to better work with pns executor based on Long Nguyen's suggestions. 2021-03-29 12:03:12 -07:00
Andrey Melnikov
a2009de7b1 Merge pull request #903 from Vafilor/fix/contributing.commands
fix: bash missing character in contributing guide
2021-03-26 13:06:22 -07:00
Andrey Melnikov
bd5641bedc fix: bash missing character 2021-03-26 13:00:59 -07:00
Andrey Melnikov
75680ee621 Merge pull request #902 from Vafilor/fix/contributing.commands
fix: windows sections of contribution guide
2021-03-26 12:59:57 -07:00
Andrey Melnikov
aeba4ee8a2 fix: separate windows sections as windows doesn't use $PWD.
remove: minikube section as that is no longer recommended.
2021-03-26 12:53:34 -07:00
Andrey Melnikov
948f61da13 Merge pull request #892 from lnguyen/master
fix: fixes stability issue with pns executor
2021-03-26 12:09:17 -07:00
Andrey Melnikov
d69f6a4947 Merge pull request #897 from Vafilor/fix/secret.updates
fix:  add error detection when environment variable is too long
2021-03-12 11:38:35 -08:00
Andrey Melnikov
b2119d86d0 fix: detect case where secret is too long. Also only log the secret name. In case of long secret values this would flood the console. 2021-03-12 10:42:52 -08:00
Rush Tehrani
9938b60118 Update README.md 2021-03-08 10:01:47 -08:00
Long Nguyen
50dd0b9264 fixes stability issue with pns executor 2021-03-05 10:20:50 -05:00
Rush Tehrani
1424d24772 Merge pull request #889 from Vafilor/fix/workspaces
fix: incorrectly formatted label for workspaces
2021-03-03 12:21:56 -08:00
Andrey Melnikov
52e4117ab4 chore: codacy fixes 2021-03-03 12:18:09 -08:00
Andrey Melnikov
d6a2e98fc8 fix: incorrectly formatted label for workspaces 2021-03-03 12:14:51 -08:00
Andrey Melnikov
a4dcbdf6dc Merge pull request #888 from Vafilor/feat/workspace.machine.type
feat: add machine type to workspace listing
2021-03-03 10:07:13 -08:00
Andrey Melnikov
e114701958 Merge branch 'feat/workspace.machine.type' of github.com:Vafilor/core into feat/workspace.machine.type 2021-03-03 10:03:05 -08:00
Andrey Melnikov
f0588b7dc4 fix: revert debugging code 2021-03-03 10:02:18 -08:00
Andrey Melnikov
3a17632575 chore: added logging for unexpected error. 2021-03-03 10:02:18 -08:00
Andrey Melnikov
9ed7fc7cc3 feat: add machine type to workspace response 2021-03-03 10:01:37 -08:00
Rush Tehrani
07b525d4d3 Merge pull request #887 from rushtehrani/chore/readme
chore: Update README.md
2021-03-02 18:16:27 -08:00
Rush Tehrani
3d02e8de18 Update README.md 2021-03-02 18:13:48 -08:00
Rush Tehrani
a88066cd22 fix type in README 2021-03-02 18:12:16 -08:00
Rush Tehrani
eb5a248244 upload new logo 2021-03-02 18:10:00 -08:00
Rush Tehrani
90787ba733 Update README.md 2021-03-02 18:06:03 -08:00
rushtehrani
723d8854d7 update features image 2021-03-02 17:46:36 -08:00
rushtehrani
da804eeee0 fix logo 2021-03-02 15:13:48 -08:00
Rush Tehrani
87f13f7c28 Merge pull request #886 from rushtehrani/chore/readme
chore: Update README
2021-03-02 13:47:33 -08:00
Andrey Melnikov
78c576b674 Merge pull request #881 from Vafilor/feat/upgrade.and.resume
feat: allow changing machine type when resuming
2021-03-02 13:04:57 -08:00
Andrey Melnikov
c52f7290ea chore: remove checking for hidden inputs in resume workspace 2021-03-02 13:00:51 -08:00
Andrey Melnikov
ada5f5f588 Merge branch 'feat/upgrade.and.resume' of github.com:Vafilor/core into feat/upgrade.and.resume 2021-03-02 12:59:42 -08:00
Andrey Melnikov
e9c804d718 chore: update auto-generated files 2021-03-02 12:56:58 -08:00
Andrey Melnikov
638647f478 feat: resume workspace now allows changing machine type 2021-03-02 12:55:58 -08:00
rushtehrani
5b52991f18 additional README updates 2021-03-02 12:15:05 -08:00
rushtehrani
ee74238c8d update README 2021-03-02 12:03:11 -08:00
Rush Tehrani
35bc8b9bc6 Merge pull request #884 from Vafilor/feat/filtering.updates
feat: updated workflow/workspace fields to allow some related field queries
2021-02-26 12:16:33 -08:00
Andrey Melnikov
8e36a07ede feat: updated workflow/workspace fields to allow some related field queries. 2021-02-26 10:19:22 -08:00
Andrey Melnikov
ebd304b7e1 Merge pull request #883 from Vafilor/feat/filtering.updates
feat: added methods to get just the field name for resources
2021-02-26 09:49:10 -08:00
Andrey Melnikov
15de7c7e1f chore: documented new methods 2021-02-26 09:36:44 -08:00
Andrey Melnikov
d597ccc13f feat: added methods to get just the field name for workflows, templates, workspaces, and workspace templates 2021-02-25 17:14:28 -08:00
Rush Tehrani
4ce7175424 Merge pull request #882 from rushtehrani/feat/policy-labels
feat: Add labels for better policy management
2021-02-25 12:03:41 -08:00
rushtehrani
9713d4928a add labels to Workflow pods for policy management 2021-02-24 19:26:42 -08:00
rushtehrani
af5bc31410 add labels to Workspace pod for policy management 2021-02-24 19:07:15 -08:00
Rush Tehrani
cce7d4a2ee Merge pull request #880 from Vafilor/feat/update.workspace.templates
feat: Update workspace templates
2021-02-24 12:32:51 -08:00
Andrey Melnikov
098efadc7f feat: resume workspace now allows changing machine type 2021-02-24 11:42:22 -08:00
Andrey Melnikov
ac9753941e feat: update workspace templates 2021-02-24 10:57:36 -08:00
Andrey Melnikov
34d3efd67d chore: added logging for unexpected error. 2021-02-24 10:15:53 -08:00
Andrey Melnikov
547dcec0c6 fix: removed code from resume workspace changes 2021-02-24 10:15:40 -08:00
Andrey Melnikov
058e31d0de feat: add machine type to workspace response 2021-02-24 09:57:39 -08:00
Rush Tehrani
8418962b9e Merge pull request #837 from Vafilor/feat/upgrade.argo.2.12.4
feat: upgrade argo to 2.12.9
2021-02-23 09:17:59 -08:00
Rush Tehrani
410a8741ae Merge pull request #879 from Vafilor/feat/filesyncer.sidecar
feat: filesyncer sidecar for workflows
2021-02-19 16:24:04 -08:00
Andrey Melnikov
4e6e0fb801 feat: update filesyncer 2021-02-19 16:21:32 -08:00
Andrey Melnikov
88a06a5461 feat: remove workflow manifest parts that are not used. 2021-02-19 15:10:33 -08:00
Andrey Melnikov
0343c6fb52 fix: only add filesyncer sidecar if there are volume mounts 2021-02-17 13:06:31 -08:00
Andrey Melnikov
5b0bc517d3 feat: auto-inject filesyncer sidecar 2021-02-16 12:29:34 -08:00
Rush Tehrani
ace9e6e7f0 Merge pull request #876 from onepanelio/update-README
docs: Update README.md
2021-02-15 17:48:23 -08:00
Rush Tehrani
a7b6a1fc77 Update README.md 2021-02-13 10:15:28 -08:00
Andrey Melnikov
5619122e35 Merge pull request #875 from rushtehrani/fix/main-container
fix: Add ONEPANEL_MAIN_CONTAINER env var to all Workspaces
2021-02-09 14:38:04 -08:00
rushtehrani
bf9c20de64 add ONEPANEL_MAIN_CONTAINER env var to all Workspaces 2021-02-09 14:09:21 -08:00
Andrey Melnikov
4275c3c740 Merge pull request #873 from Vafilor/fix/migrations.configmap
fix: db not reconnecting
2021-02-05 11:19:00 -08:00
Andrey Melnikov
1da29e550f fix: reconnect db 2021-02-05 11:17:41 -08:00
Rush Tehrani
3b9c84544c Merge pull request #872 from Vafilor/fix/migrations.configmap 2021-02-04 18:31:37 -08:00
Andrey Melnikov
f88a98c774 fix: move db migrations outside of configmap changes. This was causing an issue where go and sql migrations clashed. 2021-02-04 18:25:30 -08:00
Rush Tehrani
63afd315ff Merge pull request #871 from rushtehrani/chore/update-nni-template
chore: Update hyperparameter tuning template
2021-02-04 10:52:12 -08:00
rushtehrani
8a6a79a4bc update hyperparam tuning template 2021-02-04 10:30:15 -08:00
Rush Tehrani
3b9875ab2d Merge pull request #869 from Vafilor/feat/add.bucket
feat: Add bucket to config response
2021-02-03 12:02:43 -08:00
Andrey Melnikov
5c09e07ab8 feat: separated out config from namespace config 2021-02-03 11:55:36 -08:00
Andrey Melnikov
de9d38a656 chore: cleaned up repository logic since we use minio for non-s3 providers 2021-02-03 11:32:53 -08:00
Andrey Melnikov
e906edc1ec feat: add bucket to config response 2021-02-03 11:25:26 -08:00
rushtehrani
a079c17693 update docs url for training templates 2021-02-02 09:55:59 -08:00
rushtehrani
1413d98ef0 update mrcnn params 2021-02-01 16:46:35 -08:00
rushtehrani
5e8b85c9e9 use correct versioning convention 2021-02-01 14:04:53 -08:00
Rush Tehrani
e5a1276e1d Merge pull request #867 from rushtehrani/chore/filesyncer
chore: Use v0.18.0 for FileSyncer
2021-02-01 13:16:02 -08:00
rushtehrani
ffcef0c0dc use v0.18.0 for filesyncer 2021-02-01 13:10:50 -08:00
Rush Tehrani
257d838092 Merge pull request #866 from rushtehrani/fix/templates
fix: Fix Workflow Template comment
2021-02-01 11:40:16 -08:00
Rush Tehrani
fa6fa6c10e Merge pull request #865 from Vafilor/feat/workspace.updates
feat: workspace updates
2021-02-01 11:36:03 -08:00
rushtehrani
daf0b4622d minor comment fix 2021-01-31 19:17:34 -08:00
Rush Tehrani
a4d7f69118 Merge pull request #860 from onepanelio/feat/update-templates
feat: Update all templates for dynamic node labels and new file syncing
2021-01-31 17:39:38 -08:00
rushtehrani
a8cf80396f update labels 2021-01-30 17:13:33 -08:00
rushtehrani
c5fc80d979 template cleanup 2021-01-29 18:24:15 -08:00
rushtehrani
f55b82f4b1 use correct template name vars 2021-01-29 18:12:12 -08:00
rushtehrani
bd052005f1 update vscode template 2021-01-29 15:37:59 -08:00
rushtehrani
dcab30f839 use correct image 2021-01-29 15:22:57 -08:00
rushtehrani
c91048aae7 update JupyterLab workspace template 2021-01-29 14:24:26 -08:00
Andrey Melnikov
a9ae982e61 Merge branch 'feat/workspace.updates' of github.com:Vafilor/core into feat/workspace.updates 2021-01-29 13:54:42 -08:00
Andrey Melnikov
559d937e79 feat: support sinceTime for workspace container logs 2021-01-29 13:54:08 -08:00
rushtehrani
0283aecfad update CVAT template 2021-01-29 13:47:12 -08:00
rushtehrani
53612cc145 update TFOD template 2021-01-29 12:46:25 -08:00
rushtehrani
f44e1d31c0 update MaskRCNN template 2021-01-29 12:20:28 -08:00
rushtehrani
35ea2164eb update MaskRCNN template 2021-01-29 12:07:25 -08:00
Andrey Melnikov
986b0ec7ee chore: missing comment 2021-01-29 09:57:00 -08:00
Andrey Melnikov
e1e382e223 fix: added missing proto data for workspace component service 2021-01-29 09:57:00 -08:00
Andrey Melnikov
3ae767d8f9 fix: onepanel helper image reference in contributing.md 2021-01-29 09:57:00 -08:00
Andrey Melnikov
dac793601d feat: updated workspace API request to return file syncer url if available 2021-01-29 09:57:00 -08:00
Andrey Melnikov
8f1d1ee7e0 chore: missing comment 2021-01-29 09:56:23 -08:00
Andrey Melnikov
4e2154b3e2 fix: added missing proto data for workspace component service 2021-01-29 09:55:12 -08:00
Andrey Melnikov
0664eb37c2 fix: onepanel helper image reference in contributing.md 2021-01-29 09:54:05 -08:00
Andrey Melnikov
2c86994919 feat: updated workspace API request to return file syncer url if available 2021-01-29 09:53:40 -08:00
Andrey Melnikov
4bc9cc1204 Merge pull request #851 from rushtehrani/feat/workspace-logs
feat: Add GetWorkspaceContainerLogs
2021-01-29 09:48:29 -08:00
Rush Tehrani
e240532756 Merge pull request #858 from onepanelio/chore/fix-badge
chore: Fix LFAI badge
2021-01-27 11:41:04 -08:00
Rush Tehrani
a0d9285646 chore: Fix LFAI badge 2021-01-27 09:41:53 -08:00
Andrey Melnikov
bb4cd8b283 Merge pull request #855 from rushtehrani/feat/nodepool-default
feat: Allow default for nodepool option
2021-01-25 16:35:12 -08:00
rushtehrani
33a25397c3 use an env var for more flexibility 2021-01-25 16:22:37 -08:00
rushtehrani
67180fdba3 allow default for nodepool option 2021-01-25 16:14:06 -08:00
Andrey Melnikov
527bcd835e Merge branch 'feat/upgrade.argo.2.12.4' of github.com:Vafilor/core into feat/upgrade.argo.2.12.4 2021-01-25 14:36:42 -08:00
Andrey Melnikov
488a32d5d5 fix: issue where filterOutCustomTypesFromManifest was crashing 2021-01-25 14:31:47 -08:00
Andrey Melnikov
989ec1f02d fix: wrong format for wfv1.Item 2021-01-25 14:31:47 -08:00
Andrey Melnikov
5a66c278e4 feat: update argo to 2.12.4 (WIP) 2021-01-25 14:31:47 -08:00
Andrey Melnikov
8799a79643 Merge pull request #853 from Vafilor/fix/workflow.template.version.archive
fix: issue where workflow template version did not ignore archived template
2021-01-23 19:51:19 -08:00
Andrey Melnikov
3c8d0ad5db fix: issue where workflow template version did not ignore archived templates 2021-01-23 19:44:56 -08:00
rushtehrani
0a690ad77a add comments to exported funcs 2021-01-20 16:52:40 -08:00
rushtehrani
932b343738 use correct http endpoint for workspace logs 2021-01-20 16:48:16 -08:00
rushtehrani
4a22327fec add GetWorkspaceContainerLogs 2021-01-20 16:32:32 -08:00
Rush Tehrani
1d20348a50 Merge pull request #850 from Vafilor/feat/workspace.uid.param
fix: workspace uid was name and not uid and namespace was not replaced
2021-01-19 15:57:06 -08:00
Andrey Melnikov
c7021b735e chore: codacy method comment 2021-01-19 15:54:40 -08:00
Andrey Melnikov
a132ce4e34 chore: codacy 2021-01-19 15:50:34 -08:00
Andrey Melnikov
26218bb426 fix: workspace uid was name and not uid. Also namespace was not replaced. 2021-01-19 15:33:43 -08:00
Rush Tehrani
744b79ee73 Merge pull request #849 from Vafilor/feat/workspace.uid.param
feat: add {{workspace.uid}} to parameters as a replaceable value
2021-01-19 14:42:16 -08:00
Andrey Melnikov
734d793d83 chore: codacy formatting 2021-01-19 13:19:10 -08:00
Andrey Melnikov
23f8200042 feat: add {{workspace.uid}} to parameters as a replacable value 2021-01-19 13:03:07 -08:00
Andrey Melnikov
f1bdbbad28 chore: code cleanup 2021-01-19 10:55:55 -08:00
Andrey Melnikov
a6cfbe24df chore: codacy method comments 2021-01-18 10:41:17 -08:00
Andrey Melnikov
d630508c0f feat: update workflow templates to have dynamic node pool label 2021-01-18 10:37:08 -08:00
Andrey Melnikov
e02db631b7 Merge pull request #844 from rushtehrani/feat/nodepoollabel
feat: Evaluate node pool label in Workflow Templates
2021-01-18 09:48:39 -08:00
rushtehrani
3c8556e17b evaluate nodepoollabel in workflow templates 2021-01-17 13:15:58 -08:00
Andrey Melnikov
e66255b4ca fix: issue where filterOutCustomTypesFromManifest was crashing 2021-01-15 13:28:50 -08:00
Rush Tehrani
2cb43850be Merge pull request #843 from Vafilor/fix/migration.rollback
fix: wrong file for migration rollback
2021-01-15 12:40:11 -08:00
Andrey Melnikov
08b5edde72 fix: wrong file name for migration rollback 20201113094916 2021-01-15 12:37:48 -08:00
Andrey Melnikov
82a411ebda fix: wrong file for migration rollback 2021-01-15 12:29:00 -08:00
Rush Tehrani
b30be5277a Merge pull request #839 from rushtehrani/docs/readme
docs: Update images, text and links
2021-01-14 10:00:12 -08:00
rushtehrani
4ca5ee3ded update lfai badge and text 2021-01-14 09:49:23 -08:00
rushtehrani
b09cf245d6 update README layout 2021-01-14 09:37:03 -08:00
rushtehrani
c3082cb3cc update onepanel.gif 2021-01-13 15:48:06 -08:00
Rush Tehrani
ab057f25d8 Merge pull request #838 from onepanelio/docs/readme
docs: Update README.md
2021-01-13 13:26:19 -08:00
Rush Tehrani
8081a62771 shorten hyperparameter sentence 2021-01-13 12:57:38 -08:00
Rush Tehrani
83642dd5b0 shorten feature sentences 2021-01-13 12:46:33 -08:00
Rush Tehrani
456d0f9f3c clean up and shorten some sentences 2021-01-13 12:34:01 -08:00
Rush Tehrani
13274ec703 shorten sentences 2021-01-13 12:00:06 -08:00
Rush Tehrani
45454cb783 add hyperparameter tuning bullet 2021-01-13 11:56:56 -08:00
Rush Tehrani
8a68e0e07b update note about python sdk 2021-01-13 11:52:21 -08:00
Rush Tehrani
91b9e86792 shorten sentences 2021-01-13 11:35:17 -08:00
Rush Tehrani
b5fdfa4783 clean up and wording changes 2021-01-13 11:33:04 -08:00
Rush Tehrani
99ef4ef2ac Update README.md 2021-01-13 11:05:38 -08:00
Andrey Melnikov
6e0ca2e1e4 fix: wrong format for wfv1.Item 2021-01-12 16:04:40 -08:00
Andrey Melnikov
edcc42ba4b feat: update argo to 2.12.4 (WIP) 2021-01-12 15:58:49 -08:00
Andrey Melnikov
cebbc069fc Merge pull request #832 from Vafilor/feat/rename.dev
feat: change "dev" tag to be "latest" for images
2021-01-12 11:33:38 -08:00
Rush Tehrani
709871dd3b Merge pull request #834 from rushtehrani/fix/params
fix: Only remove whitespaces in var references
2021-01-11 20:44:37 -08:00
rushtehrani
1d0c898fa4 code cleanup + no param mutation 2021-01-11 20:37:23 -08:00
rushtehrani
1355f8039e only remove whitespaces in var references 2021-01-11 20:05:58 -08:00
Andrey Melnikov
132e4f1d9c feat: change "dev" tag to be "latest" for images 2021-01-11 11:53:32 -08:00
Rush Tehrani
2c187ad784 Merge pull request #830 from Vafilor/feat/workflow.template.version.parameters
feat: add parameters to workflow template versions response
2021-01-09 20:36:51 -08:00
Andrey Melnikov
c2a80121b7 fix: issue where opts.params were overwritten because of pointer reference - this caused the params stored in database to be altered 2021-01-09 19:26:33 -08:00
Andrey Melnikov
5275aa2ea7 Merge branch 'feat/workflow.template.version.parameters' of github.com:Vafilor/core into feat/workflow.template.version.parameters 2021-01-09 19:25:50 -08:00
Andrey Melnikov
682994c4c2 feat: add parameters to workflow template versions response 2021-01-09 19:20:25 -08:00
Andrey Melnikov
302731e23a feat: replace parameter namespace values for workflow/workspace with the runtime value 2021-01-09 15:14:38 -08:00
Andrey Melnikov
f9338bd51e feat: add parameters to workflow template versions response 2021-01-08 10:47:06 -08:00
Andrey Melnikov
f424e5e661 Merge pull request #826 from rushtehrani/fix/tfod
fix: Rename train.py => main.py in TFOD workflow template
2021-01-07 12:54:07 -08:00
rushtehrani
d9cc564596 rename train.py => main.py in tfod workflow template 2021-01-07 12:50:37 -08:00
Andrey Melnikov
fbc780ab4d Merge pull request #824 from rushtehrani/feat/update-cvat
feat: Update CVAT and FileSyncer images
2021-01-07 10:05:28 -08:00
rushtehrani
5f531f2ac0 update cvat and filesyncer images 2021-01-07 09:59:26 -08:00
Rush Tehrani
208828fcaf Merge pull request #822 from aleksandrmelnikov/feat/core.804-upg.k8s.arg.support.secrets
feat: Adding support for ImagePullSecrets in workspaces and workflows
2021-01-06 12:14:31 -08:00
Rush Tehrani
855eaf2a40 Merge pull request #823 from rushtehrani/fix/tf-training
fix: Remove used-by: cvat from tf training workflow
2021-01-06 10:00:41 -08:00
rushtehrani
d230357a28 remove used-by: cvat from tf training workflow 2021-01-05 16:48:50 -08:00
Aleksandr Melnikov
6e0131636e go fmt. 2021-01-05 12:28:12 -08:00
Aleksandr Melnikov
70e3d36416 Adding support for ImagePullSecrets in workspaces. 2021-01-05 11:44:10 -08:00
Rush Tehrani
313e6841b1 Merge pull request #821 from rushtehrani/feat/cleanup
chore: Remove archive from templates
2021-01-04 13:51:39 -08:00
rushtehrani
22abceb9df remove archive from templates 2021-01-04 13:47:32 -08:00
Rush Tehrani
e6889ac470 Merge pull request #820 from Vafilor/fix/finished.logs
fix: issue where logs would sometimes crash
2020-12-31 23:36:16 -08:00
Andrey Melnikov
5669d03c5c chore: codacy 2020-12-31 23:33:42 -08:00
Andrey Melnikov
a8f5cde75e fix: issue where logs would sometimes accumulate because there was no newline in the content. 2020-12-31 23:23:13 -08:00
Rush Tehrani
67af745dab Merge pull request #818 from Vafilor/fix/finished.logs
fix: issues with finished logs
2020-12-31 11:12:09 -08:00
Andrey Melnikov
080624d9e2 fix: issues with finished logs. Content was repeating, resulting in a large data load - making the stream fail.
No timestamps were being returned as timestamps for time 0.
Occasionally lines would cut off across multiple lines.
2020-12-31 11:07:39 -08:00
Rush Tehrani
69c523ee23 Merge pull request #815 from Vafilor/feat/default.make.api
feat: make api command use docker by default.
2020-12-30 15:18:46 -08:00
Andrey Melnikov
303cee3e9f feat: make api command use docker by default. 2020-12-30 15:05:16 -08:00
Rush Tehrani
3cb799f6fe Merge pull request #814 from Vafilor/fix/timestamp.logs
fix: workflow execution logs showing timestamps incorrectly
2020-12-30 13:25:35 -08:00
Andrey Melnikov
8d896c03c0 Merge branch 'fix/timestamp.logs' of github.com:Vafilor/core into fix/timestamp.logs 2020-12-30 12:05:37 -08:00
Andrey Melnikov
543367c36e feat: updated workflow logs to return a response that may contain several log entries. 2020-12-30 12:04:21 -08:00
Andrey Melnikov
ba776cddbd fix: fixed issue with logs where the timestamp parsing ignored newlines 2020-12-30 12:04:21 -08:00
Andrey Melnikov
ea89ddf289 feat: updated workflow logs to return a response that may contain several log entries. 2020-12-30 12:02:25 -08:00
Andrey Melnikov
48d66004ec fix: fixed issue with logs where the timestamp parsing ignored newlines 2020-12-30 11:49:37 -08:00
Andrey Melnikov
25fbbf59ae Merge pull request #813 from Vafilor/feat/generate.message
feat: improve error message for not found milestones
2020-12-30 09:53:14 -08:00
Andrey Melnikov
d70aea815c feat: improve error message for not found milestones 2020-12-30 09:49:41 -08:00
Rush Tehrani
4e99c7b12c Merge pull request #812 from rushtehrani/feat/migrations
fix: Use correct label for hyperparameter tuning Workflow
2020-12-29 14:37:38 -08:00
rushtehrani
758ec11b5d fix label 2020-12-29 14:31:01 -08:00
Andrey Melnikov
5cbf504dc9 Merge pull request #811 from rushtehrani/feat/migrations
fix: Path to hyperparameter-tuning migration
2020-12-29 14:17:57 -08:00
rushtehrani
50ff540ae3 fix migration path 2020-12-29 14:14:25 -08:00
rushtehrani
943f61a251 fix migration path 2020-12-29 14:13:10 -08:00
Andrey Melnikov
e8890f2fa2 Merge pull request #786 from rushtehrani/feat/migrations
feat: Add Hyperparameter tuning Workflow Template
2020-12-29 13:50:40 -08:00
rushtehrani
39bb30d6bf make updates based on feedback 2020-12-29 13:48:06 -08:00
Rush Tehrani
a79f57c374 Merge branch 'master' into feat/migrations 2020-12-29 13:30:37 -08:00
Rush Tehrani
3d72cb432b Merge pull request #810 from Vafilor/feat/sys.node.pool
fix: select.nodepool validation
2020-12-29 13:29:52 -08:00
Andrey Melnikov
61c31e43f7 chore: migration method documentation 2020-12-29 13:26:18 -08:00
Andrey Melnikov
01f3fc664b fix: updated generated workflow template to check all valid node pool values 2020-12-29 13:18:00 -08:00
Andrey Melnikov
1af1ccb2b9 fix: updated logic so that workflow templates are not modified from their display value, but the generated value provides more error handling 2020-12-29 13:06:09 -08:00
Rush Tehrani
95794ba155 Merge pull request #809 from onepanelio/feat/sys.node.pool
feat: Add select.nodepool parameter type
2020-12-29 11:45:17 -08:00
Andrey Melnikov
ef941de524 fix: case where options might not exist in manifest 2020-12-29 11:14:19 -08:00
Andrey Melnikov
13170cbbeb fix: add missing method addition 2020-12-29 10:54:47 -08:00
Andrey Melnikov
6a4c1e8917 chore: code clean up and documentation 2020-12-29 10:54:35 -08:00
Andrey Melnikov
d4e2968477 chore: document methods 2020-12-29 10:37:28 -08:00
Andrey Melnikov
4b6ed47506 feat: fix issues with comments and auto injection of options for select.nodepool and workflow templates. 2020-12-29 10:09:08 -08:00
rushtehrani
4c148665a7 reverting tfod tf image to 1.13.1 2020-12-28 12:48:21 -08:00
rushtehrani
16100f59bc remove comment from maskrcnn 2020-12-28 12:04:21 -08:00
rushtehrani
af8e61cf6a upgrade tfod tf image to 1.15.4 2020-12-28 11:54:32 -08:00
rushtehrani
7c0fcaaeb7 update maskrcnn template 2020-12-28 11:02:24 -08:00
rushtehrani
bac1253eeb update tfod template 2020-12-28 11:02:04 -08:00
Andrey Melnikov
eb85a8042c fix: issue where GetAvailableLabels endpoint could not be distinguished from GetLabels endpoint 2020-12-28 10:25:53 -08:00
rushtehrani
f60824f6c4 fix indentation 2020-12-28 10:11:57 -08:00
Rush Tehrani
029429dbd8 Merge branch 'feat/sys.node.pool' into feat/migrations 2020-12-28 10:10:48 -08:00
rushtehrani
968444a1ba use nni-web-ui image 2020-12-27 15:44:10 -08:00
rushtehrani
ea8bf0a9bd update nni template 2020-12-27 14:17:17 -08:00
rushtehrani
8555b42c63 update pytorch training example 2020-12-26 17:30:42 -08:00
rushtehrani
2a74e07075 update tfod template 2020-12-26 13:52:49 -08:00
rushtehrani
3b7b8849ac use LeNet-5 for tf training example 2020-12-25 23:23:41 -08:00
rushtehrani
de1a4cef85 update tf template 2020-12-25 22:56:34 -08:00
rushtehrani
dea3de8659 update tf template 2020-12-25 22:42:36 -08:00
rushtehrani
7a05106bc7 Workflow template cleanup 2020-12-25 16:44:27 -08:00
rushtehrani
4b4e9a4024 remove Slack tasks to make template easier to understand 2020-12-25 16:42:04 -08:00
rushtehrani
a557764c26 point source to repo directory 2020-12-25 16:38:59 -08:00
Rush Tehrani
01bfb9c889 Merge pull request #802 from Vafilor/feat/sys.node.pool
feat: dd node pool parameter
2020-12-25 16:35:32 -08:00
Andrey Melnikov
546bbceef2 Merge branch 'feat/sys.node.pool' of github.com:Vafilor/core into feat/sys.node.pool 2020-12-25 16:32:51 -08:00
Andrey Melnikov
ffd801a262 fix: wrong indentation for sidecars in maskrcnn training 2020-12-25 16:32:15 -08:00
Andrey Melnikov
237988da86 fix: wrong migration file name 2020-12-25 16:32:15 -08:00
Andrey Melnikov
f1aa8cc32b fix: key indentation in maskrcnn-training migration yaml 2020-12-25 16:32:15 -08:00
Andrey Melnikov
e738e07e58 fix: issue where workspaceSpec.arguments could be nil 2020-12-25 16:32:15 -08:00
Andrey Melnikov
e24052d51f fix: migration path issue for jupyterlab 2020-12-25 16:32:15 -08:00
Andrey Melnikov
ca5f602738 fix: separated workflow templates and workspace templates for yaml resources for migrations.
Also updated migration yamls to the latest based on templates repo.
2020-12-25 16:32:15 -08:00
Andrey Melnikov
7c273e20cf chore: updated tf_training to be tensorflow-mnist-training to better match onepanel templates repo 2020-12-25 16:32:15 -08:00
Andrey Melnikov
4f7715034e fix: add back removed migration and move source to be in template instead of README 2020-12-25 16:32:15 -08:00
Andrey Melnikov
69e2488728 fix: added nodeSelector to tf training migration 2020-12-25 16:32:15 -08:00
Andrey Melnikov
7e5906f46c fix: incorrect indentation of sidecars in migration 2020-12-25 16:32:15 -08:00
Andrey Melnikov
45a9e98829 chore: code cleanup for codacy 2020-12-25 16:32:15 -08:00
Andrey Melnikov
153dd3ccd7 chore: update documentation for migration methods 2020-12-25 16:32:15 -08:00
Andrey Melnikov
6739ffc2f9 feat: update other workflows with new node pool information. 2020-12-25 16:32:15 -08:00
Andrey Melnikov
96fde4e005 feat: update templates to add node pool argument (WIP) 2020-12-25 16:32:15 -08:00
Andrey Melnikov
5e7c5ba888 feat: add workflow template and updated workspace template parameter logic to replace select.nodepool values with runtime values. 2020-12-25 16:32:15 -08:00
Andrey Melnikov
b2bf62d932 feat: updated API with method to generate workflow template manifest. This will perform any modifications needed to replace types with runtime data, etc.
An example is select.nodepool. This value should set the options to the currently available node types.
2020-12-25 16:32:15 -08:00
Rush Tehrani
c93e7a526c chore: Fix manifests repo link 2020-12-25 16:29:33 -08:00
rushtehrani
a1d6a151cd update README 2020-12-25 16:29:33 -08:00
rushtehrani
33aa79f03b update README 2020-12-25 16:29:33 -08:00
rushtehrani
70d75f8f75 set jupyterlab workingDir to data 2020-12-25 16:29:33 -08:00
Rush Tehrani
72e7cb41e7 remove extra space 2020-12-25 16:29:33 -08:00
Andrey Melnikov
2784798c9e fix: wrong indentation for sidecars in maskrcnn training 2020-12-24 18:22:42 -08:00
Andrey Melnikov
2a6b57bfb9 fix: wrong migration file name 2020-12-24 18:11:01 -08:00
Andrey Melnikov
03460eaeff fix: key indentation in maskrcnn-training migration yaml 2020-12-24 18:10:44 -08:00
Andrey Melnikov
99f8ebe25d fix: issue where workspaceSpec.arguments could be nil 2020-12-24 18:01:55 -08:00
Rush Tehrani
ee4b5d45ed Merge pull request #808 from rushtehrani/fix/k8s-patch-issue
fix: Resolves intermittent errors in Workflows with Sidecars
2020-12-24 17:58:21 -08:00
Andrey Melnikov
cbf4200544 fix: migration path issue for jupyterlab 2020-12-24 17:49:28 -08:00
Andrey Melnikov
75765e5ab4 fix: separated workflow templates and workspace templates for yaml resources for migrations.
Also updated migration yamls to the latest based on templates repo.
2020-12-24 17:48:26 -08:00
rushtehrani
300842a1ee rename hyperparam tune migration 2020-12-24 17:45:01 -08:00
rushtehrani
656e6e62a8 update hyperparam tuning example paths 2020-12-24 17:43:52 -08:00
rushtehrani
086a375c05 update template path 2020-12-24 17:36:34 -08:00
rushtehrani
f5320e61a3 update migration date 2020-12-24 17:19:01 -08:00
Andrey Melnikov
4fd7a2c5a8 chore: updated tf_training to be tensorflow-mnist-training to better match onepanel templates repo 2020-12-24 14:14:11 -08:00
Andrey Melnikov
c02c8b59bb fix: add back removed migration and move source to be in template instead of README 2020-12-24 13:32:36 -08:00
rushtehrani
cda805b666 add template source as comment 2020-12-24 12:35:04 -08:00
rushtehrani
cc5e8a03ba fix indentation 2020-12-24 12:26:22 -08:00
Andrey Melnikov
dc660e0b2f fix: added nodeSelector to tf training migration 2020-12-24 12:09:56 -08:00
Andrey Melnikov
6a3b21ad11 fix: incorrect indentation of sidecars in migration 2020-12-24 12:06:41 -08:00
rushtehrani
ab25eee9bb bypass istio proxy for outbound traffic in workflows 2020-12-24 11:01:59 -08:00
rushtehrani
1fc5d0ea73 exclude outbound port 443 2020-12-23 18:38:15 -08:00
Rush Tehrani
d203b04af0 chore: Fix manifests repo link 2020-12-23 16:20:34 -08:00
Rush Tehrani
9f202b2049 Merge branch 'master' into feat/migrations 2020-12-23 15:14:36 -08:00
rushtehrani
efea105da3 add select.nodepool 2020-12-23 15:03:45 -08:00
Andrey Melnikov
720f64213d chore: code cleanup for codacy 2020-12-23 14:21:23 -08:00
Rush Tehrani
0efa00dbd5 Merge pull request #807 from rushtehrani/chore/readme
chore: Update demo note
2020-12-23 13:22:08 -08:00
rushtehrani
af6e3c8e72 update README 2020-12-23 13:21:13 -08:00
Andrey Melnikov
2759d1ae68 chore: update documentation for migration methods 2020-12-23 13:19:21 -08:00
rushtehrani
f196c01fdb update README 2020-12-23 13:17:22 -08:00
Andrey Melnikov
c46f16356b feat: update other workflows with new node pool information. 2020-12-23 13:03:31 -08:00
Andrey Melnikov
7e94686efe feat: update templates to add node pool argument (WIP) 2020-12-23 09:10:15 -08:00
rushtehrani
5caf584aed update hyperparam tuning template 2020-12-21 18:35:21 -08:00
rushtehrani
5f466235c5 revert prev migration changes 2020-12-21 18:25:39 -08:00
rushtehrani
ad742591b5 revert prev migration changes 2020-12-21 18:24:08 -08:00
Andrey Melnikov
54580a7176 Merge pull request #801 from Vafilor/feat/upgrade.grpc
feat: upgrade grpc
2020-12-21 11:01:36 -08:00
Andrey Melnikov
182664c943 feat: add workflow template and updated workspace template parameter logic to replace select.nodepool values with runtime values. 2020-12-19 20:52:52 -08:00
Andrey Melnikov
371c50cbe5 feat: updated API with method to generate workflow template manifest. This will perform any modifications needed to replace types with runtime data, etc.
An example is select.nodepool. This value should set the options to the currently available node types.
2020-12-19 20:52:01 -08:00
Andrey Melnikov
3a5fc3894b chore: codacy 2020-12-18 20:17:07 -08:00
Andrey Melnikov
76ecdcfb70 chore: codacy 2020-12-18 19:36:23 -08:00
Andrey Melnikov
3ad571582a feat: added documentation for helper 2020-12-18 09:53:11 -08:00
Andrey Melnikov
8dcc38c6cd fix: wrong docker image for make api-docker 2020-12-17 23:21:50 -08:00
Andrey Melnikov
779cba97c9 chore: updated contributing guide to include docker version 2020-12-17 22:49:16 -08:00
Andrey Melnikov
bd2d98c146 fix: removed non proto files for third party 2020-12-17 22:00:29 -08:00
Andrey Melnikov
4359f6f099 chore: updated api to version 0.17.0 2020-12-17 18:19:16 -08:00
Andrey Melnikov
5b177a112e feat: added option to Makefile to generate api via docker image 2020-12-17 18:16:30 -08:00
Andrey Melnikov
19be6d48f6 fix: minor cleanup for helper Dockerfile 2020-12-17 18:16:11 -08:00
Andrey Melnikov
41f8508763 update: to go packages because of grpc update 2020-12-17 16:02:22 -08:00
Andrey Melnikov
8b155bae17 update: helper image to interact with core 2020-12-17 15:59:09 -08:00
Andrey Melnikov
1257ab101e chore: generate new files from proto 2020-12-17 15:46:55 -08:00
Andrey Melnikov
2931d5e754 update: fixed missing generated files for grpc and moved generated files into their own subdirectory for easier separation of files. 2020-12-17 15:46:34 -08:00
Andrey Melnikov
d99189807d feat: updated grpc gateway related code 2020-12-17 14:09:20 -08:00
Rush Tehrani
5bd2c969d5 Merge pull request #799 from Vafilor/fix/closed.web.sockets
fix: closing web sockets
2020-12-16 22:24:17 -08:00
Andrey Melnikov
2a01138cf3 chore: codacy 2020-12-16 22:03:54 -08:00
Andrey Melnikov
45f6d4e3c6 feat: updated watching configmap changes so it uses its own kubeclient. This kubeclient has no timeout as timeouts happen a lot while watching for configmap changes. 2020-12-16 21:56:04 -08:00
Andrey Melnikov
7ec209334a fix: missing setting the initializedMigrations variable for migration. This fixes a big where changing the configmap crashed the server. 2020-12-16 21:54:08 -08:00
Andrey Melnikov
ec2a0f58ff feat: increased default timeout for kubernetes to be 3 minutes as testing shows 1 minute happens fairly often 2020-12-16 21:33:10 -08:00
Andrey Melnikov
ed54598771 fix: handle case for watching workflow where a timeout occurs 2020-12-16 21:32:13 -08:00
Aleksandr Melnikov
7ae4e1373a Merge pull request #797 from rushtehrani/fix/jupyterlab-data-dir
fix: Set jupyterlab workingDir to /data
2020-12-16 12:33:02 -08:00
rushtehrani
01040a72d1 set jupyterlab workingDir to data 2020-12-16 11:16:19 -08:00
Rush Tehrani
1cf037340c Merge pull request #793 from Vafilor/fix/onepanelio.core.791-gke.jupyterlab.gpu
fix: Issue where gpu didn't work for jupyterlab in gke
2020-12-14 14:32:48 -08:00
Rush Tehrani
81bd32f837 remove extra space 2020-12-14 14:30:00 -08:00
Andrey Melnikov
0b68e88c60 fix: wrong template name 2020-12-14 14:05:08 -08:00
Andrey Melnikov
01cd321a1a fix: added migration to update jupyterlab workspace template to be able to use GPUs in GKE 2020-12-14 14:03:05 -08:00
Rush Tehrani
f54021c820 Merge pull request #788 from Vafilor/fix/gke.gpu
fix: GPU not being present in GKE for workspaces
2020-12-11 19:27:32 -08:00
Andrey Melnikov
172c4e6dd2 chore: clean up code for node pool resource selection 2020-12-11 19:21:51 -08:00
Andrey Melnikov
9302853820 chore: migration method documentation 2020-12-11 16:57:03 -08:00
Andrey Melnikov
5ce0bb1532 fix: add resource limits to a main container
This fixes an issue with GPUs in GKE as the container that needs the GPU needs to have a resource requirement.
2020-12-11 16:52:50 -08:00
rushtehrani
64b591d7f7 reduce hyperparam max trials for quicker example 2020-12-11 15:02:07 -08:00
rushtehrani
eab1c11cb7 update default search space config 2020-12-11 13:02:31 -08:00
rushtehrani
b6e08df6e8 minor update to tf training template 2020-12-11 11:32:17 -08:00
rushtehrani
a55ba7a3c1 add comment to exported funcs 2020-12-11 11:24:08 -08:00
Rush Tehrani
b6abe862c9 Merge pull request #783 from Vafilor/fix/revert.argo
chore: revert argo updates for stability
2020-12-11 11:18:53 -08:00
rushtehrani
18625673cc add hyperparam tuning workflow template 2020-12-11 11:17:50 -08:00
Andrey Melnikov
8735444f54 Merge pull request #785 from Vafilor/fix/workspace.node.pool
chore: changed variable name to better reflect purpose
2020-12-10 22:06:50 -08:00
Andrey Melnikov
909a728a41 chore: changed newParam to be newValue to better describe the functionality 2020-12-10 22:04:00 -08:00
Rush Tehrani
0aee834a9c Merge pull request #782 from Vafilor/fix/workspace.node.pool
fix: issue where workspace params were not updated
2020-12-10 22:03:18 -08:00
Andrey Melnikov
6f9f8ed164 fix: bug where parameters query did not actually update with the set parameters call 2020-12-10 21:27:34 -08:00
Andrey Melnikov
50a57f049c chore: revert argo updates 2020-12-10 20:26:35 -08:00
rushtehrani
e79404aabc display maskrcnn dataset 2020-12-10 18:30:25 -08:00
rushtehrani
9695550f56 display tfod dataset 2020-12-10 18:30:11 -08:00
Andrey Melnikov
5d0d84c5d7 fix: issue where workspace params (like new node pool) were not updated when a workspace was upgraded. 2020-12-10 17:16:38 -08:00
Rush Tehrani
1fa8242a3c Merge pull request #781 from rushtehrani/fix/script-resources
fix: Correctly add resources to script templates
2020-12-10 16:02:40 -08:00
rushtehrani
37f1c0b6eb correctly add resources to script templates 2020-12-10 14:15:55 -08:00
Aleksandr Melnikov
ee7c148a5e Merge pull request #779 from Vafilor/feat/upgrade.tensorflow.workflow
fix: tf training with epochs
2020-12-09 15:16:42 -08:00
Andrey Melnikov
92c387a622 update: tf training with epochs 2020-12-09 13:39:15 -08:00
Aleksandr Melnikov
cb617d0605 Merge pull request #778 from Vafilor/feat/upgrade.tensorflow.workflow
feat: update tensorflow migration
2020-12-09 13:19:53 -08:00
Andrey Melnikov
7f5d52cb13 chore: migration method comments 2020-12-09 13:03:05 -08:00
Andrey Melnikov
ae998d000a feat: update tensorflow migration 2020-12-09 12:58:45 -08:00
Aleksandr Melnikov
93a0770f31 Merge pull request #777 from Vafilor/fix/adjust.curl
fix: adjust curl to use specific version and fail on non 200 responses
2020-12-09 11:16:18 -08:00
Andrey Melnikov
95e2516f66 fix: adjust curl to use specific version and fail on non 200 responses 2020-12-09 11:08:24 -08:00
Andrey Melnikov
4d28ce42d8 Merge pull request #776 from onepanelio/fix/wrong.migration.names
fix: wrong migration folder
2020-12-09 11:05:14 -08:00
Andrey Melnikov
f58263ddb2 fix: wrong migration folder 2020-12-09 11:03:20 -08:00
Andrey Melnikov
16977e3bd0 Merge pull request #775 from onepanelio/fix/wrong.migration.names
fix: wrong migration file names
2020-12-09 11:00:10 -08:00
Andrey Melnikov
24409404f8 fix: wrong migration file names 2020-12-09 10:59:28 -08:00
Aleksandr Melnikov
f8f23451f3 Merge pull request #771 from Vafilor/test/istio.inject
feat: Use env var instead of tty for interactive sidecars
2020-12-09 10:17:53 -08:00
Andrey Melnikov
f8a6670f2d chore: double quotes to single quotes in yaml 2020-12-09 09:54:41 -08:00
Andrey Melnikov
6d165921d8 fix: yaml errors in new migration data 2020-12-08 19:46:50 -08:00
Andrey Melnikov
be8f157235 Merge pull request #770 from rushtehrani/feat/limits
feat: Support GPU resource limits in Workspaces and Workflows
2020-12-08 18:54:04 -08:00
Andrey Melnikov
f9373561fb chore: added missing migration comments 2020-12-08 16:50:42 -08:00
Andrey Melnikov
b1812006f9 update: changed tty to be under the "ONEPANEL_INTERACTIVE_SIDECAR" 2020-12-08 16:46:13 -08:00
Andrey Melnikov
e42ac38103 feat: re-organized data folder for migrations 2020-12-08 16:44:43 -08:00
Aleksandr Melnikov
28651bf333 Merge pull request #774 from Vafilor/fix/add.timeout.to.k8s
feat: update kubernetes timeout to be set via environment variable
2020-12-08 15:31:44 -08:00
Andrey Melnikov
701d31cb74 feat: update kubernetes timeout to be set via environment variable 2020-12-08 13:22:19 -08:00
Aleksandr Melnikov
2331e9fa0f Merge pull request #773 from Vafilor/fix/add.timeout.to.k8s
fix: added timeout to k8s so it doesn't wait forever.
2020-12-08 12:21:45 -08:00
Andrey Melnikov
e29b6266e4 fix: added timeout to k8s so it doesn't wait forever. 2020-12-08 12:14:15 -08:00
Andrey Melnikov
70d604b2d0 test: istio inject var instead of tty 2020-12-07 18:21:57 -08:00
rushtehrani
3abdda5b81 name methods more explicitly 2020-12-07 16:52:26 -08:00
rushtehrani
78fde018fd support resource limits for GPUs in Workflows 2020-12-07 15:51:50 -08:00
rushtehrani
b4ea002387 support resource limits for GPUs in Workspaces 2020-12-07 15:51:37 -08:00
Andrey Melnikov
f11a36f62a Merge pull request #765 from Vafilor/feat/requests.updates
feat: added total results counts to list requests
2020-12-05 13:24:03 -08:00
Andrey Melnikov
a85f97256b Merge pull request #757 from onepanelio/fix/dynamic-envs
fix: Move env vars to workspace creation
2020-12-04 12:58:42 -08:00
rushtehrani
6ca3d60298 update method name to be more descriptive 2020-12-04 12:54:52 -08:00
Andrey Melnikov
906e7c4d7b fix: issue where container env vars were not being updated 2020-12-04 12:37:55 -08:00
rushtehrani
39e9c2e572 wip - move env vars to workspace creation 2020-12-02 10:02:27 -08:00
Rush Tehrani
762abe8e9a Merge pull request #756 from savan77/cvat_tfod_migration
fix: Add migration for changes in TFOD and CVAT template
2020-11-30 13:25:29 -08:00
savan
dbc008100a update indentation in the template 2020-11-30 15:11:40 -06:00
savan
8c00552ba0 remove namespace from path 2020-11-30 15:05:53 -06:00
Rush Tehrani
0639f10834 Fix template name and package name 2020-11-30 12:43:40 -08:00
Rush Tehrani
1946fdd254 Rename 20201130130433_update_tfod_patch.go to 20201130130433_update_tfod_path.go 2020-11-30 12:35:09 -08:00
savan
c556e65a88 use latest template for up 2020-11-30 14:33:40 -06:00
savan
72fa2f1270 update template to the previous one 2020-11-30 14:26:09 -06:00
savan
83812bb68c update TFOD based on last migration 2020-11-30 13:58:59 -06:00
savan
2366cbce01 add migration in db and add comments 2020-11-30 13:45:15 -06:00
Rush Tehrani
446f591a06 Merge pull request #755 from onepanelio/chore/issue-templates
chore: Add issue templates
2020-11-30 11:22:33 -08:00
Rush Tehrani
59492c021d chore: Add issue templates 2020-11-30 11:18:11 -08:00
savan
f6be3732a1 add migration for TFOD and CVAT 2020-11-30 13:17:45 -06:00
Andrey Melnikov
b8b6853909 feat: added total results counts to list requests. This simplifies client logic for determining resource counts 2020-11-24 10:55:52 -08:00
Andrey Melnikov
1aa1cf9cb7 Merge pull request #744 from onepanelio/feat/update.github.workflow
fix: github actions
2020-11-23 12:27:58 -08:00
Andrey Melnikov
0f9902d5c1 test: fix env var reference 2020-11-23 12:08:23 -08:00
Andrey Melnikov
ad55e8fa60 fix: update get-tag to get by set-env github error 2020-11-23 11:55:52 -08:00
Andrey Melnikov
d7e9e19de9 update: slack message 2020-11-23 11:49:57 -08:00
Andrey Melnikov
840e4b1006 Merge pull request #729 from onepanelio/dsdon10-patch-1
feat: include LF AI Landscape onepanel link
2020-11-23 11:29:04 -08:00
Andrey Melnikov
1d0892f245 Merge pull request #740 from gliptak/patch-1
build: Bring Go to 1.15.5 in Dockerfile
2020-11-23 11:26:56 -08:00
Gábor Lipták
9d9b1ab88f Bring Go to 1.15.5 in Dockerfile
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2020-11-20 20:10:10 -05:00
Rush Tehrani
cfe3d57bb7 Merge pull request #739 from Vafilor/fix/metrics.migration
fix: issue where previous metrics migration was using incorrect format
2020-11-18 20:19:55 -08:00
Andrey Melnikov
5ada969517 fix: issue where previous metrics migration was using old design for metrics column 2020-11-18 20:10:26 -08:00
Andrey Melnikov
c5464d7120 Merge pull request #738 from Vafilor/feat/onepanelio.core.724-metrics.api
feat: add metrics API to core
2020-11-18 12:40:06 -08:00
Andrey Melnikov
ed4b0ae127 fix: metrics add test 2020-11-18 11:12:16 -08:00
Rush Tehrani
e43d7d74a1 Update support options 2020-11-18 11:03:09 -08:00
Andrey Melnikov
0cf38f8c85 chore: method documentation 2020-11-17 13:49:14 -08:00
Andrey Melnikov
fd713e0800 feat: added update metrics endpoint which replaces the contents. Also renamed merge to add to better distinguish the two 2020-11-17 13:42:19 -08:00
Andrey Melnikov
6af5d5b5b0 feat: added merge method workflow executions merge api 2020-11-17 13:32:55 -08:00
Andrey Melnikov
f22c6b051f Merge pull request #736 from Vafilor/feat/onepanelio.723-metrics.db
feat: add metrics database support to workflow executions
2020-11-17 12:39:49 -08:00
Andrey Melnikov
cb402b9496 feat: added methods to Metrics to Add/Merge items 2020-11-17 12:28:51 -08:00
Rush Tehrani
a00e155afb Merge pull request #730 from rushtehrani/fix/cvat
feat: Update CVAT env vars + add TensorBoard
2020-11-17 09:55:54 -08:00
Andrey Melnikov
0a73aed929 feat: updated metrics structure to be an array of structs 2020-11-16 16:04:20 -08:00
Rush Tehrani
085e2a7427 Merge pull request #733 from Vafilor/fix/workspaces.labels
fix: issue where workspace label selection wasn't working.
2020-11-16 15:25:28 -08:00
Andrey Melnikov
0f0616ec6d fix: issue where workspace label selection wasn't working. 2020-11-16 15:19:06 -08:00
rushtehrani
a2fe9f2619 remove incorrect migration 2020-11-16 12:09:14 -08:00
Andrey Melnikov
212ef7c0de feat: added metrics to workflow_executions database related code 2020-11-16 12:08:17 -08:00
Andrey Melnikov
d3af2059d4 Merge pull request #731 from Vafilor/feat/revert.remove.token
fix: puts back IsValidToken endpoint for backwards compatibility
2020-11-16 10:51:06 -08:00
Andrey Melnikov
89c0f26103 Revert "feat: remove is valid token endpoint"
This reverts commit 466a417e60.

Also marks the IsValidToken endpoint as deprecated
2020-11-16 10:46:44 -08:00
rushtehrani
37c01428e2 update models location for previous CVAT templates 2020-11-16 08:50:33 -08:00
Donald Scott
1a5df76cec Update README.md
Added link to http://landscape.lfai.foundation/selected=onepanel
2020-11-16 08:07:45 -08:00
rushtehrani
dc65fc10b9 add tensorboard to maskrcnn workflow 2020-11-15 15:57:28 -08:00
rushtehrani
4abe355ef8 add tensorboard sidecar to tfod workflow 2020-11-15 14:43:53 -08:00
rushtehrani
341a010fc0 update CVAT env vars 2020-11-15 13:42:33 -08:00
Rush Tehrani
52ca9663f5 Merge pull request #728 from aleksandrmelnikov/chore/core.714-get.access.token.cvat
chore: Adding migration for new CVAT image.
2020-11-14 12:41:47 -08:00
Aleksandr Melnikov
173d043074 Commenting on functions. 2020-11-13 13:38:50 -08:00
Aleksandr Melnikov
9ddd69bce8 Adding migration for new CVAT image.
- This image updates the authentication endpoint used for Onepanel
user credentials, inside of CVAT.
2020-11-13 13:06:36 -08:00
Rush Tehrani
7edfc606a0 Merge pull request #713 from onepanelio/test/argo.update
feat: update argo to 2.11.6
2020-11-13 12:41:27 -08:00
Andrey Melnikov
d51db584b7 chore: added comment explaining quotation 2020-11-13 12:09:00 -08:00
Andrey Melnikov
a79100bdf6 Merge branch 'test/argo.update' of github.com:onepanelio/core into test/argo.update 2020-11-13 12:07:21 -08:00
Andrey Melnikov
8a9637bc22 fix: add hydrator 2020-11-13 12:06:18 -08:00
Andrey Melnikov
a291e08252 fix: migrations that had numbers where new argo expects strings 2020-11-13 12:03:53 -08:00
Andrey Melnikov
091e1d7c44 chore: removed todo comments that have been resolved 2020-11-13 12:03:53 -08:00
Andrey Melnikov
3ae2dd8077 upgraded argo to v2.11.6 (wip) 2020-11-13 11:59:44 -08:00
Rush Tehrani
cc919f6d89 Merge pull request #722 from Vafilor/feat/remove.valid.token.endpoint
feat: remove is valid token endpoint
2020-11-13 11:16:11 -08:00
Rush Tehrani
27bebcbc1d Merge pull request #718 from aleksandrmelnikov/chore/removing.unused.function
chore: Removing ensureWorkflowRunsOnDedicatedNode function.
2020-11-13 11:06:02 -08:00
Aleksandr Melnikov
b296d85c07 Merge branch 'master' into chore/removing.unused.function 2020-11-13 10:17:35 -08:00
Andrey Melnikov
466a417e60 feat: remove is valid token endpoint 2020-11-12 15:55:58 -08:00
Aleksandr Melnikov
bfa4def06b Merge pull request #719 from rushtehrani/feat/stop-workflow
feat: Terminate Workflow action will still execute exitHandler tasks
2020-11-12 14:00:25 -08:00
rushtehrani
4fec204e7f use correct where statement 2020-11-12 12:22:15 -08:00
Rush Tehrani
363c430703 Merge pull request #691 from aleksandrmelnikov/feat/core.416-add.ts.to.workflows
feat: Add support for visualization sidecars
2020-11-11 12:04:02 -08:00
rushtehrani
f7e48a0be7 don't update phase for already terminated workflow 2020-11-11 09:53:13 -08:00
rushtehrani
3f70f26da4 use stop instead of terminate 2020-11-10 19:38:52 -08:00
Aleksandr Melnikov
f7c74ebf13 Removing ensureWorkflowRunsOnDedicatedNode function.
- Not used
- We're using a different function
2020-11-10 16:05:36 -08:00
Aleksandr Melnikov
a5ec80e586 If tty is set to true, mirror the main container volume mounts to
sidecars.
- This way, sidecars have access
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
a67012f893 Tweaking the dependencies of the sys-exit task.
- This ensures that multiple sidecars will vertically end
at the sys-exit task.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
806d15f4c9 Adjusting the exit-handler task order.
- sys-exit will run after deletion of service and virtual service
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
74752efd20 Adding output parameters to the template with the sidecars.
- These are the URLs for the side-cars.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
5e4d5c0242 Changed the order of tasks for the exit handler.
- The clean up tasks for service(s) and virtualservice(s) will
now display vertically.
If multiple sidecars were present, parallel vertical rows will display.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
c699b5b2ba Changed the order of tasks per feedback.
The new structure is:
 sys-send-status -> service -> virtual service -> main task
If there are multiple sidecars for the same template, they
are displayed next to each other, vertically and in parallel.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
5bd7f222cd Removing the workflow.uid, because it causes a doubly long uid string. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
04a1db0f81 Adding "sys-" prefix to onepanel injected services and virtualservices. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
d4846b521e Putting the services and virtualservices for sidecars logic, into
it's own function.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
544991117c Changing the label that maps between the service and pod.
- For multiple sidecars, this needs to be unique as well.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
8057098e29 Fixing envoyfilter by adding "--" to the sub-domain url that gets
generate.d
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
a4c40dff8b Removing jwt-go library since it's no longer used. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
ccb991207b Adding code to clean-up the service and virtualservice after the
workflow is finished.
- Adding clean-up code to run alongside any onExit tasks.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
70007d6d23 Codacy: Fixing variable names. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
af47ffbd2f Updating logic that checks if a sidecar needs routing and service.
- Check if tty is set to true on the sidecar.
- Updated formatting.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
4f28882d05 Adding go.sum changes. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
d8101bff8e Checking for istio injection by checking if the sidecar has "tty"
set to true.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
0f226eb0b7 Adding google uuid library to go.mod. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
e1c3dc3979 Enabling Istio for workflows with sidecars.
- WIP
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
7698b705d8 Removing unused code. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
7b7142da49 Generating names using uuid.
- workflow.name is assigned at run-time, and may not be DNS compliant
for a service name. So that variable is not used.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
d903baea00 Adding uuid generating library 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
530e24180d Simplifying prefix to "/" 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
f5fb44c59b Port and TargetPort are assumed to be the same.
If Tensorboard has 6006 set, we also set it to 6006.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
6d42a44957 Removing condition tests. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
2fef7d78c1 Fixing typo. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
b46e7fd3b9 Excluding istio side-car from resource creation.
- Otherwise, the step hangs and never finishes, so long as istio
container runs.
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
e5f2f3e937 Adding k8s-service-resource and k8s-routes-resource as tasks
and dependencies to the entry point template.
- Issue: Argo throws this error

Message:             invalid spec: templates.main.tasks.train-model.dependencies[1] dependency 'k8s-service-resource' not defined
2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
af361d5045 Renaming the side-car check per feedback. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
3e1a4dd313 Refactoring code since it's empty initialization. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
d2dfd4cc34 Updating the host placeholder. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
2d45b0a015 Using the right yaml library to marshal. 2020-11-10 15:58:26 -08:00
Aleksandr Melnikov
cb7bb793e7 Adding code to support sidecars and accessing them.
- Specifically, if a sidecar is labeled with "sys-tensorboard-like",
code attempts to create services and virtual services (routes).
- Code will create argo templates that are resource type, where the
manifests are the generated resources.
The templates are then added right before the template with the
sidecar that requires these services and routes.
2020-11-10 15:58:26 -08:00
Andrey Melnikov
90f01f8036 Merge pull request #711 from rushtehrani/fix/send-status
fix: Only inject one sys-send-status task
2020-11-09 11:12:27 -08:00
Andrey Melnikov
850b184788 Merge pull request #715 from Vafilor/feat/add.auth.back
fix: add backwards compatibility for auth token requests
2020-11-09 10:34:31 -08:00
rushtehrani
875097fed7 only inject one sys-send-status task 2020-11-06 17:35:55 -08:00
Andrey Melnikov
cd28474249 Merge pull request #710 from Vafilor/feat/upgrade.argo
feat: upgrade argo
2020-11-06 15:17:17 -08:00
Andrey Melnikov
855fd43301 Merge branch 'feat/upgrade.argo' of github.com:Vafilor/core into feat/upgrade.argo 2020-11-06 15:15:35 -08:00
Andrey Melnikov
e037d89a0a fix: issue where new migration ran before all others, causing issues 2020-11-06 15:14:47 -08:00
Rush Tehrani
623964dc6b Update description in README.md 2020-11-06 15:14:47 -08:00
Andrey Melnikov
f6aff415d5 fix: migrations that had numbers where new argo expects strings 2020-11-06 15:14:47 -08:00
Andrey Melnikov
316016765d chore: removed todo comments that have been resolved 2020-11-06 15:14:47 -08:00
Andrey Melnikov
8bce73417a upgraded argo to v2.11.6 (wip) 2020-11-06 15:14:47 -08:00
Andrey Melnikov
9c400e82e6 Merge pull request #709 from Vafilor/fix/migration
fix: issue where new migration ran before all others, causing issues
2020-11-06 15:14:11 -08:00
Andrey Melnikov
f9bf162b94 fix: issue where new migration ran before all others, causing issues 2020-11-06 15:10:34 -08:00
Rush Tehrani
91b9fb37c2 Update description in README.md 2020-11-06 12:45:15 -08:00
Andrey Melnikov
594390d742 Merge pull request #704 from Vafilor/feat/upgrade.argo
feat: upgrade argo to v2.11.6
2020-11-06 12:41:57 -08:00
Andrey Melnikov
e3cbbc7d00 Merge branch 'feat/upgrade.argo' of github.com:Vafilor/core into feat/upgrade.argo 2020-11-06 12:13:58 -08:00
Andrey Melnikov
6d511f7c8e upgraded argo to v2.11.6 (wip) 2020-11-06 12:12:34 -08:00
Andrey Melnikov
717a4bc2e8 fix: temporary fix while cvat is not updated to use new auth 2020-11-06 12:11:40 -08:00
Andrey Melnikov
74bc140107 Merge pull request #705 from Vafilor/fix/rename.auth
fix: rename LogIn request to GetAccessToken
2020-11-03 13:45:06 -08:00
Andrey Melnikov
a405e8bf46 feat: update api to use accessTokenAuth 2020-11-03 13:37:30 -08:00
Andrey Melnikov
93bdc7cd70 fix: rename LogIn to GetAccessToken 2020-11-03 10:29:02 -08:00
Andrey Melnikov
3b3784508c upgraded argo to v2.11.6 (wip) 2020-11-02 15:17:17 -08:00
Rush Tehrani
ff0526db9a Merge pull request #703 from aleksandrmelnikov/fix/fixing.namespace.typo
fix: Fixing typo in CVAT migration yaml.
2020-11-02 14:41:45 -08:00
Andrey Melnikov
8b35c1709c Merge pull request #702 from Vafilor/fix/workspaces.terminated.labels
fix: issue where terminated workspace labels were being selected
2020-11-02 11:26:35 -08:00
Aleksandr Melnikov
98c086ad1e Fixing typo. 2020-11-02 11:20:18 -08:00
Rush Tehrani
e07aebcc3c Merge pull request #700 from aleksandrmelnikov/feat/core.681-update.mnt.vol.locations.in.cvat
feat: Adding migration to reduce the number of volumes in CVAT workspace template
2020-11-02 11:13:10 -08:00
Rush Tehrani
6c1f522921 Merge pull request #699 from rushtehrani/fix/tensorboard
fix: Set TENSORBOARD_PROXY_URL so TensorBoard can easily be used in JupyterLab
2020-11-02 11:12:31 -08:00
Andrey Melnikov
31840afab1 fix: issue where terminated workspace labels were being selected. 2020-11-02 11:09:55 -08:00
Aleksandr Melnikov
cf607513aa Adding down migration for new migration.
- Refactoring yaml files per feedback.
2020-11-02 10:53:45 -08:00
Aleksandr Melnikov
0e35ed2d52 Adding migration for cvat template.
- Main changes are a reduction of volumes needed.
2020-11-02 10:51:54 -08:00
Andrey Melnikov
5e82311efb Merge pull request #698 from Vafilor/fix/concurrent.map
fix: concurrency issues with token
2020-11-02 10:36:19 -08:00
rushtehrani
0bb5ad7f2c fix migrations 2020-11-01 22:39:03 -08:00
rushtehrani
a598b3f620 set TENSORBOARD_PROXY_URL so it can be used in JupyterLab 2020-10-31 17:00:38 -07:00
Rush Tehrani
a184c294da Merge pull request #697 from Vafilor/fix/revert.system.flag
fix: removed is_system flag
2020-10-31 14:41:46 -07:00
Andrey Melnikov
b129a1da7d fix: moved token to be inside client instead of sysconfig as it is not a system config value, but it is applicable to the current client.
This fixes some concurrency issues since you could have multiple requests handled at the same time that try to read and modify the system values.
2020-10-30 23:48:51 -07:00
Andrey Melnikov
7854aa15ca fix: removed is_system flag 2020-10-30 23:45:39 -07:00
Andrey Melnikov
7814502404 Merge pull request #693 from Vafilor/feat/onepanelio.core.688.login
feat: support for login endpoint
2020-10-30 12:04:13 -07:00
Andrey Melnikov
5d6fae152d feat: added system flag to workflow template creation 2020-10-29 12:30:55 -07:00
Andrey Melnikov
e41d5c38af feat: added log in endpoint which is essentially an alias for auth token, but is more descriptive 2020-10-29 12:14:53 -07:00
Rush Tehrani
0cdb8ffac8 Merge pull request #689 from Vafilor/fix/upgrade.migrations
feat: update latest migrations to use file format
2020-10-28 15:16:27 -07:00
Andrey Melnikov
a274daa811 update: updated migrations to use new file format and renamed them so they run after the latest migration updates. 2020-10-28 15:08:31 -07:00
Rush Tehrani
79d4c44817 Merge pull request #646 from aleksandrmelnikov/feat/core.623-persist.packages.between.ws.switch.pause
feat: Add lifecycle hooks to VSCode and Jupyterlab Workspaces to provide persistence of conda, pip, and extensions.
2020-10-28 12:55:20 -07:00
Aleksandr Melnikov
6591d19dae Adding --minimize=False to build command.
- This is a trade-off to reduce workspace start-up time, but increase
browser load times for Jupyterlab.
2020-10-28 12:51:10 -07:00
Aleksandr Melnikov
4ea8ca8635 Tweaking when jupyter lab build runs.
- We want it to run only if the installation succeeds.
2020-10-27 11:34:48 -07:00
Aleksandr Melnikov
cbc07693bc We need to actually build the extensions after installing them.
- This ensures all the extensions installed with "--no-build" will
be compiled in one go, instead of individually.
2020-10-27 11:23:03 -07:00
Rush Tehrani
c77711b887 Merge pull request #684 from Vafilor/feat/onepanelio.core.492.filter.labels
feat: add support to list labels for resources
2020-10-27 10:31:10 -07:00
Andrey Melnikov
bcbccbe68d fix: issue where null json labels were selected, causing a crash. 2020-10-27 10:15:16 -07:00
Aleksandr Melnikov
a4b9e9d444 Renaming container as specified. 2020-10-26 15:45:25 -07:00
Aleksandr Melnikov
7c0b5a06f8 Removing whitespace. 2020-10-26 15:42:34 -07:00
Andrey Melnikov
a756684ae5 feat: API support for selecting labels 2020-10-26 15:38:03 -07:00
Aleksandr Melnikov
d4f676210e Removing unused yaml. 2020-10-26 15:35:30 -07:00
Aleksandr Melnikov
83f6ef3e27 Removing migrationsRan code.
- This is SQL and will never evaluate to true. These templates are
go migrations, not sql based.
See https://github.com/onepanelio/core/pull/646/#discussion_r504214052
for context.
2020-10-26 13:44:13 -07:00
Aleksandr Melnikov
ee29c12eb2 Merge branch 'master' into feat/core.623-persist.packages.between.ws.switch.pause 2020-10-26 13:33:48 -07:00
Aleksandr Melnikov
6758e260c9 Adding "--no-build" to code that re-installs jupyterlab extensions.
- Otherwise, the extension installation process also kicks off a
production minimization of code, which takes minutes.
- This leads to Jupyterlab Workspace taking ~10 minutes to resume, even
if no new extensions had been installed.
2020-10-26 13:29:37 -07:00
Andrey Melnikov
5de512136a fix: added migration to fix existing null labels 2020-10-23 12:24:34 -07:00
Andrey Melnikov
94c5850eda fix: issue where nil values for JSON Labels sometimes returned "null" and not "{}" 2020-10-23 12:11:18 -07:00
Andrey Melnikov
50145cccdf feat: added more logging for getBearerToken errors 2020-10-23 11:40:29 -07:00
Rush Tehrani
83acc5a5ce Merge pull request #683 from rushtehrani/docs/readme-1
docs: Update support badge
2020-10-23 10:59:07 -07:00
Rush Tehrani
19378c62f3 Update README.md 2020-10-23 10:51:51 -07:00
Rush Tehrani
0d4f5fbb37 Merge pull request #678 from rushtehrani/docs/readme
docs: Update README
2020-10-20 14:11:01 -07:00
rushtehrani
43a4d60b5b add onepanel.gif 2020-10-20 13:43:57 -07:00
rushtehrani
6c85a81709 docs: Update README 2020-10-20 13:40:34 -07:00
Aleksandr Melnikov
e9d8a6ebe0 Merge pull request #677 from Vafilor/fix/artifact.repository.generic
fix: non-generic filesyncer for latest cvat migration
2020-10-20 11:17:54 -07:00
Andrey Melnikov
c8c0b6ffd4 fix: non-generic filesyncer for latest cvat migration 2020-10-20 11:03:03 -07:00
Andrey Melnikov
38780c2e08 Merge pull request #675 from Vafilor/feat/cvat.upgrade
feat: upgrade cvat to v14
2020-10-19 10:52:51 -07:00
Andrey Melnikov
e1f8ee846c feat: update-cvat 2020-10-19 10:48:10 -07:00
Andrey Melnikov
2cc4cbd6f8 cleanup: simplified updating workspace template into a separate function 2020-10-16 17:33:35 -07:00
Andrey Melnikov
276aaf6e7a feat: placeholder for updating cvat template. 2020-10-16 17:20:27 -07:00
Rush Tehrani
6e1a08fdc3 Merge pull request #673 from Vafilor/feat/gcs.compatible.files
fix: issue where files were not being listed when using gcs
2020-10-16 16:47:18 -07:00
Andrey Melnikov
7129fdf55f fix: issue where s3 with gcs wasn't working because of incompatible listing of files. 2020-10-16 16:41:49 -07:00
Rush Tehrani
00e3247fcd Merge pull request #672 from rushtehrani/fix/sys-uid-env-var
fix: Use sys-uid instead of sys-name for ONEPANEL_RESOURCE_UID
2020-10-16 12:58:23 -07:00
rushtehrani
c26019b4d5 use sys-uid instead of sys-name for ONEPANEL_RESOURCE_UID 2020-10-16 12:55:12 -07:00
Andrey Melnikov
acadc0c0a7 Merge pull request #670 from Vafilor/feat/tag.channel
fix: change notify slack channel to be org instead of dev
2020-10-16 09:57:46 -07:00
Rush Tehrani
1b97099d11 Merge pull request #669 from Vafilor/fix/db.connections
fix: use system-wide db connection for auth
2020-10-16 09:55:41 -07:00
Andrey Melnikov
c5365975ac fix: change notify slack channel to be org instead of dev 2020-10-16 09:53:45 -07:00
Andrey Melnikov
b7d37586a8 fix: add method to get client with a provided db 2020-10-16 09:45:51 -07:00
Andrey Melnikov
2bd3c3dde0 fix: use system-wide connection when checking authentication 2020-10-16 09:45:29 -07:00
Rush Tehrani
957313423c Merge pull request #668 from Vafilor/fix/db.connections
fix: close db connection when not in use.
2020-10-16 09:21:32 -07:00
Andrey Melnikov
c883f69fc9 fix: close db connection when not in use. 2020-10-15 21:48:25 -07:00
Andrey Melnikov
6c5b6c877e Merge pull request #660 from Vafilor/feat/revert.jwt
feat: revert jwt changes as it creates issues with workflow authentication logic
2020-10-14 12:15:27 -07:00
Andrey Melnikov
67e684a715 revert: remove util/tokens/jwt as it is no longer used. 2020-10-14 11:54:23 -07:00
Andrey Melnikov
20c4950b69 feat: revert jwt token from auth 2020-10-14 11:53:05 -07:00
Andrey Melnikov
5e5c3cca67 Merge pull request #657 from rushtehrani/fix/workspace-resource
fix: Update label function to return group and resource
2020-10-13 16:15:28 -07:00
Andrey Melnikov
575a33c272 Merge pull request #658 from Vafilor/feat/onepanel.io.653-additional-fixes
fix: issue with concurrent map access
2020-10-13 16:09:22 -07:00
rushtehrani
8e9b95aa12 update label function to return group and resource 2020-10-13 16:06:08 -07:00
Andrey Melnikov
38f1aafaec fix: issue with concurrent map access 2020-10-13 16:02:40 -07:00
rushtehrani
30ebda4918 use workspaces instead of statefulset for resource 2020-10-13 15:47:20 -07:00
Andrey Melnikov
ce972f2988 Merge pull request #656 from Vafilor/feat/onepanel.io.653-additional-fixes
fix: bad token issue
2020-10-13 15:27:45 -07:00
Andrey Melnikov
ede4c67c8f fix: bad token issue 2020-10-13 15:17:56 -07:00
Aleksandr Melnikov
cc05c4994c Fixing whitespace, so we have valid YAML. 2020-10-13 13:13:23 -07:00
Rush Tehrani
68ddec78c8 Merge pull request #655 from Vafilor/feat/onepanelio.core.653-auth.changes
feat: update incoming token to be a JWT token that takes in username
2020-10-13 12:45:14 -07:00
Andrey Melnikov
c42997a643 fix: error to be API friendly 2020-10-13 12:21:32 -07:00
Andrey Melnikov
5bd2feaa86 update: added username to returned auth token 2020-10-12 17:01:26 -07:00
Andrey Melnikov
de4302d226 chore: formatting updates for error strings 2020-10-12 16:17:16 -07:00
Andrey Melnikov
7150f24631 feat: update incoming token to be a JWT token that takes in username 2020-10-12 16:07:12 -07:00
Rush Tehrani
0e1e48dfc8 Merge pull request #647 from rushtehrani/master
fix: Use correct group for workspaces resource
2020-10-08 20:03:51 -07:00
rushtehrani
dd0f1f7705 use correct group for workspaces resource 2020-10-08 19:52:48 -07:00
Aleksandr Melnikov
ac589bfb62 Added migration for VSCode workspace template
- Added lifecycle hooks to template
- This enables persistence of conda, pip, and vscode extensions.
2020-10-08 15:59:02 -07:00
Aleksandr Melnikov
1d35adbeaa Added migration for Jupyterlab workspace template
- Added lifecycle hooks to template
- This enables persistence of conda, pip, and jupyter labextensions.
2020-10-08 15:49:47 -07:00
Aleksandr Melnikov
2b52f46ba6 Adding design document related to ticket and general implementation. 2020-10-08 15:13:23 -07:00
Aleksandr Melnikov
03f8f47664 Merge pull request #642 from Vafilor/fix/jupyterlab.migrations
feat: added convenience method to update workspace template manifest
2020-10-06 10:47:18 -07:00
Andrey Melnikov
c85496d216 update: added method specifically to update the manifest of a workspace template and modified recent migration to use it.
This fixes an issue where the jupyterlab migration wiped out the old description.
2020-10-06 10:28:03 -07:00
Rush Tehrani
5f6415548d Merge pull request #640 from aleksandrmelnikov/fix/core.637-dedicated.nodes.via.hostport
fix: Fixing issues with using hostPort. Removed prior logic that still relied on running nodes.
2020-10-05 15:40:26 -07:00
Aleksandr Melnikov
c641c17a8c Updating code that generates an extra container for a workspace.
- Renamed function to make it clearer what it's doing with the extra container
- Added documentation for the function
- Removed listing nodes code, since we only care if the workspace has
a nodeSelector set.
2020-10-05 14:17:00 -07:00
Aleksandr Melnikov
83a2543b13 Updating function name to reflect what it's doing. 2020-10-05 14:04:32 -07:00
Aleksandr Melnikov
e8dae0f2e9 Since we're no longer relying on running nodes, we don't need logic
relating to them.
- We can just check if a nodeSelector is set on the template.
2020-10-05 13:59:14 -07:00
Rush Tehrani
b85bf4d688 Merge pull request #638 from aleksandrmelnikov/fix/core.637-dedicated.nodes.via.hostport
fix: Replace resource requests and limits with hostPort, as a means of grabbing dedicated nodes.
2020-10-05 12:17:45 -07:00
Aleksandr Melnikov
7fe0ab2654 Tweaking names so it's more clear why they are there. 2020-10-05 11:51:04 -07:00
Aleksandr Melnikov
dfa6eb2fe6 Removing function that's no longer used. 2020-10-05 11:46:19 -07:00
Aleksandr Melnikov
cc2c51ace5 Removing resource requests and limits.
- Using hostPort on the node as a way to require dedicated nodes
for workspaces and workflows.
2020-10-05 11:46:01 -07:00
Andrey Melnikov
897462ede7 Merge pull request #636 from aleksandrmelnikov/fix/if.no.running.node.don't.try.to.set.resources
fix: Do not try to calculate resource requests and limits if the node is not running.
2020-10-02 16:25:04 -07:00
Aleksandr Melnikov
4e3c24fd89 Merge pull request #630 from Vafilor/fix/workspace.start.resource.requirements
fix: added resource requirements to start workspace
2020-10-02 16:17:15 -07:00
Aleksandr Melnikov
276e105f20 Adding documentation for function call.
- Refactoring the parameter names so they are actually usefully named.
2020-10-02 15:53:29 -07:00
Aleksandr Melnikov
656026ac84 Refactored workflow_execution resource calculation to use the new
function, to put the logic into the same place.
2020-10-02 13:08:48 -07:00
Aleksandr Melnikov
95bea11e43 Refactored the resource calculation piece into it's own function.
Added code logic to check the cpu and memory generated by the node.
- If they are empty, then skip trying to add an extra container
for workspace.
2020-10-02 13:08:29 -07:00
Andrey Melnikov
c6f65510d8 Merge pull request #635 from Vafilor/fix/remove.dependabot.from.release.notes
fix: remove dependabot[bot] from release notes
2020-10-01 22:55:31 -07:00
Andrey Melnikov
d6e279dde5 fix: remove dependabot[bot] from release notes 2020-10-01 22:52:08 -07:00
Andrey Melnikov
e99b0e943d Merge pull request #632 from onepanelio/fix/tags
fix: build docker image on tag push
2020-10-01 22:44:58 -07:00
Andrey Melnikov
22a7c31f1d fix: testing tag push 2020-10-01 22:31:26 -07:00
Andrey Melnikov
b6c0f24170 fix: added resource requirements to start workspace 2020-10-01 21:21:57 -07:00
Andrey Melnikov
9c04ee066d Merge pull request #629 from Vafilor/fix/migrations
fix: issue where more than one namespace caused migration issues
2020-10-01 13:41:35 -07:00
Andrey Melnikov
29c3e808e1 fix: issue where more than one namespace caused migration issues.
The `version` of a WorkspaceTemplate is set in an iteration, so we need to move the declaration inside the loop so the version is always reset to 0.
2020-10-01 13:29:50 -07:00
Andrey Melnikov
3ded40a477 Merge pull request #628 from Vafilor/feat/update.cvat
feat: update cvat workspace template
2020-10-01 10:23:49 -07:00
Andrey Melnikov
559d52b033 chore: docs for migration 2020-10-01 10:09:11 -07:00
Andrey Melnikov
0ea527ec0a feat: update cvat 2020-10-01 10:05:46 -07:00
Andrey Melnikov
1a67e07d20 Merge pull request #626 from Vafilor/fix/unit.tests
fix: unit tests
2020-09-30 13:01:36 -07:00
Andrey Melnikov
49b9bc4f93 fix: unit tests 2020-09-30 12:54:35 -07:00
Andrey Melnikov
4def4aa529 Merge pull request #625 from Vafilor/chore/wording.updates
chore: update name and description for vscode template so it fits in ui
2020-09-30 12:34:14 -07:00
Andrey Melnikov
5d114e1d27 chore: update name and description for vscode template 2020-09-30 12:29:58 -07:00
Andrey Melnikov
1ed3b3e740 Merge pull request #624 from Vafilor/feat/onepanelio.299-templates.filtering
feat: added workspace templates filtering to API
2020-09-30 12:13:16 -07:00
Andrey Melnikov
571de0b40e chore: Uid -> UID per code conventions 2020-09-30 12:10:44 -07:00
Andrey Melnikov
463a8eea60 feat: added workspace templates filtering 2020-09-30 11:58:42 -07:00
Andrey Melnikov
5105ad373a Merge pull request #621 from aleksandrmelnikov/feat/core.609-add.vscode.template
feat: Adding migration for VSCode to be added as a workspace template.
2020-09-30 11:57:51 -07:00
Andrey Melnikov
afa675dc28 Merge branch 'master' into feat/core.609-add.vscode.template 2020-09-30 11:54:21 -07:00
Andrey Melnikov
335301396e Merge pull request #622 from aleksandrmelnikov/feat/update.jupyterlab
feat: Adding migration to update jupyterlab workspace to include `onepanel-sdk`
2020-09-30 11:52:45 -07:00
Aleksandr Melnikov
995b1171e6 Per feedback, returning err instead of logging. 2020-09-30 11:50:51 -07:00
Aleksandr Melnikov
d497058f20 Removing code that will prevent down migration from running,
per feedback.
2020-09-30 11:49:54 -07:00
Aleksandr Melnikov
63bcd60d84 Adding migration to update jupyterlab workspace to include onepanel-sdk. 2020-09-29 15:51:57 -07:00
Aleksandr Melnikov
ecf0a82a62 Adding migration for VSCode to be added as a workspace template. 2020-09-29 15:19:53 -07:00
Andrey Melnikov
f31c998349 Merge pull request #619 from Vafilor/feat/onepanelio.597-pr.updates
feat: pull request template updates
2020-09-29 12:35:09 -07:00
Andrey Melnikov
b6e5626a19 update: split checklist into optional and required parts 2020-09-29 12:21:54 -07:00
Andrey Melnikov
77ca0939e4 update: added checklist to PR to help remind people to include unit tests, documentation, and the license of the project. 2020-09-29 12:20:58 -07:00
Andrey Melnikov
83a4238153 Merge pull request #617 from Vafilor/feat/workspace.listing
feat: workspace list filtering, sorting and statistics
2020-09-29 11:20:46 -07:00
Andrey Melnikov
77716ba56b chore: updated method docs 2020-09-29 11:17:50 -07:00
Andrey Melnikov
541747d232 fix: issue where workspace templates were not accessing correct task for generating the template 2020-09-29 11:04:12 -07:00
Andrey Melnikov
0956afdabe update: workspace listing endpoint to include a statistics report endpoint and allow filtering by phase. 2020-09-28 15:57:31 -07:00
Andrey Melnikov
8b4a70d958 feat: added support for sorting and filtering workspaces.
* Also added a LabelFilter interface
2020-09-28 12:09:16 -07:00
Rush Tehrani
91b97d9243 Merge pull request #611 from aleksandrmelnikov/feat/core.607-revert.to.resource.limits.requests
feat: Undo pod anti-affinity for scheduling nodes, use resource requests instead.
2020-09-25 14:02:02 -07:00
Aleksandr Melnikov
be62f41e20 Error should be the last type when returning multiple items. 2020-09-25 13:53:22 -07:00
Aleksandr Melnikov
5fa34f7870 Reducing code duplication with a function. 2020-09-25 12:32:56 -07:00
Aleksandr Melnikov
65f49113a8 Adding code to set the proper resource request (and limits, in case of gpu) when
a workspace is updated.
2020-09-25 12:12:13 -07:00
Andrey Melnikov
8a874ec3f2 Merge pull request #615 from Vafilor/fix/onepanelio.core.613-labels.selector
fix: issue where some workflow templates don't show up
2020-09-25 11:56:11 -07:00
Andrey Melnikov
ada6cfd413 fix: issue where no labels filter still applied a filter for workflow templates. 2020-09-25 11:51:16 -07:00
Aleksandr Melnikov
e7cef240c4 Fixing code that assigns a GPU limit for a workflow.
- This GPU assignment works for cron created workflows as well.
2020-09-25 10:38:21 -07:00
Rush Tehrani
1b7e96cab9 Merge pull request #610 from Vafilor/feat/onepanelio.core.590-workflow.columns
feat: workflow executions include workflow template uid/name
2020-09-25 10:00:58 -07:00
Aleksandr Melnikov
dca6db842c Adding back injectContainerResourceQuotas for workflows.
- This time, the node capacity is grabbed from running nodes instead
of information from configmap (which is grabbed from params.yaml)
- Added support for two different instance-type keys.
Note that GPU support does not work at this time.
- There is no ResourceName "nvidia.com/gpu" in library code, so it throws
a deref nil error.
2020-09-24 17:28:54 -07:00
Andrey Melnikov
f7770618ca update: added parameter to control listing of system workflows 2020-09-24 12:32:35 -07:00
Aleksandr Melnikov
bafd371e11 Moved the code for generating the resources request for a workspace, into
it's own function.
2020-09-24 11:54:17 -07:00
Aleksandr Melnikov
274a1c2e84 Putting back the resource requests extraContainer and supporting logic for workspaces.
- Note that 90% of capacity that can be allocated, is used.
2020-09-24 11:04:47 -07:00
Aleksandr Melnikov
77812419d2 Removing pod anti-affinity injection from workflows.
- Workspaces end up calling workflows. This has to be removed
as part of switching back to resource requests.
2020-09-24 11:03:37 -07:00
Andrey Melnikov
6fa123b122 feat: added explicit nulls sorting for workflow execution columns. Idea is to treat null as an empty/zero value. So in asc, it is first. 2020-09-23 19:13:53 -07:00
Andrey Melnikov
b1d0ab1d59 update: added workflow template name and uid to select of workflow executions 2020-09-23 16:20:38 -07:00
Andrey Melnikov
0d5cd95ccb Merge pull request #602 from onepanelio/fix/onepanelio.core.601-workflowtemplate.bug
fix: workflow template labels persistence
2020-09-22 11:46:29 -07:00
Andrey Melnikov
9d7172c920 fix: issue where workflow template labels did not persist to the version upon creation 2020-09-22 11:38:49 -07:00
Aleksandr Melnikov
d04c17eee1 Merge pull request #600 from onepanelio/feat/onepanelio.core.599-jupyter.lab.description
feat: add description to jupyterlab workspace template
2020-09-22 11:11:26 -07:00
Andrey Melnikov
78269c2b2c fix: double comment 2020-09-22 11:08:59 -07:00
Andrey Melnikov
3e17318512 chore: documentation for migration 2020-09-22 10:54:34 -07:00
Andrey Melnikov
011fcc590e feat: add description to jupyterlab workspace template 2020-09-22 10:48:01 -07:00
Rush Tehrani
c45231c106 Merge pull request #585 from aleksandrmelnikov/feat/core.583-workflows.use.pod.anti.affinity
feat: Updated Workflows, and Cron created Workflows, to ensure they get their own pod by using Pod AntiAffinity. This replaces resource limits and/or requests.
2020-09-21 16:20:13 -07:00
Aleksandr Melnikov
9ec45e4f34 Formatting feedback and fix. 2020-09-21 16:12:53 -07:00
Aleksandr Melnikov
48e2050e97 Adjusting code so that we don't need the nodePoolLabel to figure
out the selected Node.
- The nodePoolLabel can change with the params.yaml and different
k8s versions.
2020-09-18 16:34:07 -07:00
Andrey Melnikov
478b9a1c76 Merge pull request #589 from onepanelio/feat/onepanelio.core.469-namespace.dashboard
feat: workflow filtering and sorting updates
2020-09-18 16:02:53 -07:00
Aleksandr Melnikov
d42f88e04c Adding flag to decide when to add pod affinity.
- This avoids adding it every time the loop finds a nodeSelector that's
not nil in a template
2020-09-18 15:53:00 -07:00
Aleksandr Melnikov
6dd7c0ac70 Adjusting the pod anti-affinity per feedback.
- The pod anti-affinity should be set for a template that has a nodeSelector
value (not nil).
- If the template does not have a nodeSelector, we do nothing.
2020-09-18 15:51:48 -07:00
Aleksandr Melnikov
31076bc70d Adding systemConfig to function.
- Also added error return
2020-09-18 15:50:28 -07:00
Andrey Melnikov
7bbb57ca09 update: SortOrder -> Order since package name is Sort. 2020-09-18 14:25:11 -07:00
Andrey Melnikov
7b404ff0b6 fix: issue where workflow statistics report may have null for last executed. 2020-09-18 12:47:24 -07:00
Aleksandr Melnikov
aaf20b4ab6 Updating code to use the returned wf. 2020-09-17 17:43:40 -07:00
Aleksandr Melnikov
3e87376feb Updating cron_workflow to actually ensure a singular node for
the cron created workflows.
2020-09-17 17:42:49 -07:00
Aleksandr Melnikov
7bc1056bc6 Updating function to return the updated workflow. 2020-09-17 17:42:23 -07:00
Aleksandr Melnikov
880e8ba082 Removing prior code that injected resource requests and limits
to workflows.
2020-09-17 17:08:06 -07:00
Aleksandr Melnikov
ec634b66ca Adding function to ensure a workflow gets a dedicated node for all the
templates it executes.
- Note that workflows executed by cron are also affected.
2020-09-17 17:06:20 -07:00
Rush Tehrani
15fc40a3e9 Merge pull request #582 from aleksandrmelnikov/feat/core.581-pod.anti.affinity.to.schedule
feat: Ensure workspaces get a node to themselves with pod anti-affinity.
2020-09-17 15:02:52 -07:00
Rush Tehrani
96747f1dc0 Merge pull request #584 from rushtehrani/master
docs: Additional quick start videos
2020-09-17 14:58:07 -07:00
Rush Tehrani
b7395a1ffa Add quick start videos 2020-09-17 14:54:16 -07:00
Rush Tehrani
a5f34b4f3b Update README.md 2020-09-17 14:53:39 -07:00
Aleksandr Melnikov
a28b5101fd Renaming import alias per feedback. 2020-09-17 14:53:09 -07:00
Aleksandr Melnikov
688302c58e Adding comments per Codacy feedback. 2020-09-17 10:08:39 -07:00
Aleksandr Melnikov
49e19eb135 Merge branch 'master' into feat/core.581-pod.anti.affinity.to.schedule 2020-09-17 09:21:04 -07:00
Andrey Melnikov
0a676dff6f Merge branch 'feat/onepanelio.core.469-namespace.dashboard' of github.com:onepanelio/core into feat/onepanelio.core.469-namespace.dashboard 2020-09-16 19:38:03 -07:00
Andrey Melnikov
d524c3cb66 update: fixed issue where GetWorkflowExecutionStatisticsForNamespace included workspace workflows (is_system = true). Added support for filtering by phase. 2020-09-16 19:37:10 -07:00
Andrey Melnikov
a9953683a9 feat: added endpoint to get the workflow execution statistics for a namespace 2020-09-16 19:37:10 -07:00
Andrey Melnikov
d4d4884e5b feat: initial pagination updates 2020-09-16 18:26:51 -07:00
Andrey Melnikov
d29290945c update: fixed issue where GetWorkflowExecutionStatisticsForNamespace included workspace workflows (is_system = true). Added support for filtering by phase. 2020-09-16 18:18:25 -07:00
Aleksandr Melnikov
3343f2f74b Changing the affinity label key per feedback. 2020-09-16 17:26:00 -07:00
Aleksandr Melnikov
837291a52a Implementing pod antiAffinity, so that a node will have only one
workspace scheduled on it.
2020-09-16 17:23:50 -07:00
Andrey Melnikov
122593fdbe feat: added endpoint to get the workflow execution statistics for a namespace 2020-09-16 15:19:47 -07:00
Andrey Melnikov
cd40edb16a feat: initial pagination updates 2020-09-16 11:28:32 -07:00
Rush Tehrani
b27ca42e42 Merge pull request #579 from onepanelio/revert-readme
Revert FAQ change
2020-09-15 17:26:13 -07:00
Rush Tehrani
3af4273541 Revert FAQ change 2020-09-15 17:25:57 -07:00
Donald Scott
197fb06f4c Added an FAQ skeleton for everyone's review and updates
Please add, remove, update, FAQs...
2020-09-15 17:11:59 -07:00
Aleksandr Melnikov
0b6a6e0af3 Fixing the search location of the nodeSelector. 2020-09-15 16:57:50 -07:00
Aleksandr Melnikov
ba3c2e22a9 Adding support for amd gpus. 2020-09-15 16:57:35 -07:00
Andrey Melnikov
5955876c49 Merge pull request #576 from onepanelio/fix/unit.tests
fix: unit tests
2020-09-15 14:02:46 -07:00
Andrey Melnikov
767643a51a fix: issue where omitted visibility is now public and not empty for manifest parameters 2020-09-15 13:59:05 -07:00
Andrey Melnikov
5100efdd2d fix: issue where labels table was attempted to be removed even though it no longer exists 2020-09-15 13:58:42 -07:00
Andrey Melnikov
a5e358ea61 Merge pull request #575 from onepanelio/test/github.actions
Test/GitHub.actions
2020-09-15 13:40:47 -07:00
Andrey Melnikov
a3ef3d410a fix: push dev image only on master branch 2020-09-15 13:35:53 -07:00
Andrey Melnikov
c270283c42 fix: build docker image depends on testing 2020-09-15 13:26:07 -07:00
Aleksandr Melnikov
2093b565eb Adding code to pull the capacity that can be allocated for the selected
node.
We then request 90% of this capacity, so the node schedules properly.

Gotcha: Note that this requires the node to be already running.
If there are no nodes running and have to be scaled up, our code
cannot get the capacity information for that node at this time.
2020-09-15 12:54:13 -07:00
Andrey Melnikov
0b4b5c8050 test: on all push 2020-09-15 12:31:00 -07:00
Andrey Melnikov
1781e2774d test: unit test then docker image build 2020-09-15 12:28:47 -07:00
Rush Tehrani
d87e6e49db Merge pull request #574 from rushtehrani/master
docs: Update build status badge
2020-09-14 19:35:08 -07:00
Rush Tehrani
a1c58477bd Update build status badge 2020-09-14 19:22:40 -07:00
Andrey Melnikov
f90b45437a Merge pull request #573 from onepanelio/fix/github.actions.dev
fix: for master push, release a new dev image only
2020-09-14 17:50:55 -07:00
Andrey Melnikov
85fb89862b fix: for master push, release a new dev image only 2020-09-14 17:50:17 -07:00
Andrey Melnikov
c30f48811d Merge pull request #569 from onepanelio/onepanelio/core.365-retry
feat: added retry last action support for workspaces
2020-09-14 15:46:33 -07:00
Andrey Melnikov
0170252659 fix: api version to 0.13.0 2020-09-14 15:41:06 -07:00
Rush Tehrani
498eed6aca Merge pull request #570 from rushtehrani/master
docs: Update README
2020-09-11 17:46:15 -07:00
Rush Tehrani
e01842c922 Update README.md 2020-09-11 16:05:48 -07:00
Andrey Melnikov
8f12351761 clean: removed debugging comment 2020-09-11 13:11:19 -07:00
Rush Tehrani
a22bdcc6f5 Update README.md 2020-09-11 12:24:05 -07:00
Rush Tehrani
766815da1f Update README.md 2020-09-11 12:23:08 -07:00
Aleksandr Melnikov
a84d74d256 Fixing the constant used for injecting the extra container. 2020-09-10 22:50:37 -07:00
Aleksandr Melnikov
6e6b70aeb7 Adding more constants. 2020-09-10 22:50:25 -07:00
Aleksandr Melnikov
a78138c562 Adding nvidia resource example.
- Note that the request and limit are both necessary.
2020-09-10 15:53:28 -07:00
Aleksandr Melnikov
6167d5ef65 Using a constant instead of a hard-coded string. 2020-09-10 15:53:05 -07:00
Aleksandr Melnikov
ce52f9914e Adding constants for WorkspaceTemplate. 2020-09-10 15:52:54 -07:00
Aleksandr Melnikov
ed54cb9a3f Adding proof of concept resource request to Workspace template.
- An extra container is added to a given workspace.
This container has the resource requests assigned to it.

Note that the container sleeps forever in a while-loop, so
that the workspace notes it's ready.
- If the container does not sleep, it goes into a crash loop of restarting.
The container exits successfully, and gets restarted.
2020-09-10 13:48:31 -07:00
Andrey Melnikov
fc7ef5ffac feat: added retry last action support for workspaces and new failure states 2020-09-10 12:30:18 -07:00
Andrey Melnikov
1c16a5e743 Merge pull request #568 from onepanelio/fix/github.actions.v2
Merge pull request #565 from onepanelio/fix/github.actions
2020-09-08 14:19:55 -07:00
Andrey Melnikov
9b25fd4190 Merge pull request #565 from onepanelio/fix/github.actions
fix: changed workflows since master branch is now development
2020-09-08 14:18:13 -07:00
Rush Tehrani
076422e8ac Merge pull request #567 from onepanelio/dev
chore: dev > master
2020-09-08 14:11:08 -07:00
Andrey Melnikov
5464dc71ac Merge pull request #566 from onepanelio/revert-565-fix/github.actions
Revert "fix: changed workflows since master branch is now development"
2020-09-08 14:05:02 -07:00
Andrey Melnikov
3a0af4c727 Revert "fix: changed workflows since master branch is now development" 2020-09-08 14:04:28 -07:00
Andrey Melnikov
f4879a4228 Merge pull request #565 from onepanelio/fix/github.actions
fix: changed workflows since master branch is now development
2020-09-08 14:04:04 -07:00
Andrey Melnikov
4135b86928 update: changed workflows since master branch is now development 2020-09-08 13:58:37 -07:00
rushtehrani
ac51146dbc add more features to README 2020-09-08 11:12:26 -07:00
rushtehrani
575dbc1507 add features 2020-09-08 11:12:08 -07:00
rushtehrani
8810b2c226 update README 2020-09-08 11:11:40 -07:00
rushtehrani
95cc0c3622 update README and build name 2020-09-08 11:10:57 -07:00
rushtehrani
48a68083dc chore: move util/sql to pkg/util/sql 2020-09-08 11:10:05 -07:00
Aleksandr Melnikov
029469e031 Changing the secret "key" value.
- Otherwise, the workflow can't get access to GCS bucket.
2020-09-08 11:10:05 -07:00
Andrey Melnikov
c2d665ac8b feat: upgraded cvat template with new filesyncer changes 2020-09-08 11:10:05 -07:00
Rush Tehrani
0fff409d0f Merge pull request #563 from onepanelio/docs/update-readme
docs: Update README
2020-09-08 11:07:18 -07:00
rushtehrani
abf301093e Update some README sections 2020-09-07 15:02:13 -07:00
rushtehrani
91b79a1d33 Add note about CPU/GPU nodes to README 2020-09-05 19:59:35 -07:00
rushtehrani
c92781b5c8 Add note about CPU/GPU nodes to README 2020-09-04 15:50:21 -07:00
Rush Tehrani
858c299604 Merge pull request #559 from onepanelio/docs/update-readme
docs: Update README
2020-09-04 12:26:55 -07:00
rushtehrani
94a91fc543 fix typo and grammar 2020-09-04 12:21:50 -07:00
Rush Tehrani
18a7c3fa99 Merge pull request #562 from onepanelio/dsdon10-patch-2
docs: Update README.md
2020-09-04 12:01:58 -07:00
Donald Scott
06fe267366 Update README.md 2020-09-04 11:59:53 -07:00
Rush Tehrani
35e4d1fc5b Merge pull request #561 from inohmonton99/docs/update-readme
docs: Update README.md
2020-09-04 11:57:14 -07:00
Rush Tehrani
b54e464c4a Merge branch 'docs/update-readme' into docs/update-readme 2020-09-04 11:57:01 -07:00
Inoh Francis Monton
735baac10d Update README.md 2020-09-05 02:54:38 +08:00
Rush Tehrani
edd1d474b1 Merge pull request #560 from onepanelio/dsdon10-patch-2
docs: Update README.md
2020-09-04 11:53:07 -07:00
Donald Scott
150da5654b Update README.md 2020-09-04 11:51:29 -07:00
Donald Scott
ee67c8713b Update README.md 2020-09-04 11:47:20 -07:00
Rush Tehrani
4a16b4e031 Update README.md 2020-09-04 11:46:14 -07:00
Savan Visalpara
0e3626b25a update text in README 2020-09-04 13:29:25 -05:00
rushtehrani
597a03ffc2 fix README typo 2020-09-04 10:58:02 -07:00
rushtehrani
88595d6b4c add additional sections to README 2020-09-04 10:37:44 -07:00
rushtehrani
f1bbd0e884 update template engine text in README 2020-09-03 16:23:51 -07:00
rushtehrani
4ee679cf9f update README 2020-09-03 15:49:58 -07:00
Rush Tehrani
26b6e045de Merge pull request #557 from onepanelio/docs/update-readme
docs: Update README
2020-09-02 11:56:03 -07:00
rushtehrani
4a3a754585 update README 2020-09-02 11:50:40 -07:00
Rush Tehrani
4543c84170 Merge pull request #556 from onepanelio/docs/update-readme
docs: Update README
2020-09-02 11:45:10 -07:00
rushtehrani
b2a70c46d3 fix md table 2020-09-02 11:35:39 -07:00
rushtehrani
3ede228aa9 fix typos 2020-09-02 11:20:56 -07:00
rushtehrani
4a67aa103f update community section 2020-09-02 11:18:18 -07:00
rushtehrani
4129466236 fix typo 2020-09-01 19:58:29 -07:00
rushtehrani
79b3ed6a49 update contributing section 2020-09-01 19:40:19 -07:00
rushtehrani
853c50dea2 add note about TensorBoard 2020-09-01 16:46:43 -07:00
rushtehrani
f23aa928d8 add more features to README 2020-09-01 16:38:54 -07:00
rushtehrani
a1872b8554 add features 2020-09-01 12:36:55 -07:00
Rush Tehrani
99c42034b7 Merge pull request #520 from onepanelio/chore/move-sql-util
chore: move util/sql to pkg/util/sql
2020-09-01 08:29:51 -07:00
Rush Tehrani
5e5f6bd51b Merge pull request #548 from onepanelio/fix/workflows.fail.using.gcs
fix: Updating code that injects the location of the serviceAccountToken if Google Cloud Storage is used.
2020-09-01 08:29:10 -07:00
rushtehrani
a33c18c479 update README 2020-08-31 17:10:06 -07:00
rushtehrani
e882d4270f update README and build name 2020-08-31 15:48:42 -07:00
Rush Tehrani
86fc90cd6b Merge pull request #550 from onepanelio/feat/migraitons.updates.dev
feat: upgraded cvat template with new filesyncer changes
2020-08-26 19:17:49 -07:00
Andrey Melnikov
4a93177b5c feat: upgraded cvat template with new filesyncer changes 2020-08-26 19:08:48 -07:00
Aleksandr Melnikov
7239e6620b Changing the secret "key" value.
- Otherwise, the workflow can't get access to GCS bucket.
2020-08-26 13:50:47 -07:00
Andrey Melnikov
cbecaf6fa1 Merge pull request #546 from onepanelio/dev
feat: update master with latest release changes 0.12.0
2020-08-25 16:33:45 -07:00
Rush Tehrani
de7f060c81 Merge pull request #537 from onepanelio/feat/core.415-jupyter.lab.workspace
feat: Added migration for new Jupyterlab Workspace, 1.0.1
2020-08-25 16:30:07 -07:00
Rush Tehrani
c723a3270f Remove TensorBoard, it can be run in the notebook 2020-08-25 16:29:38 -07:00
Rush Tehrani
24bb7cb0a5 Merge pull request #545 from onepanelio/feat/cvat.update
fix: cvat to 0.12.0_cvat.1.0.0
2020-08-25 15:56:56 -07:00
Andrey Melnikov
a51d4b662e update: documentation 2020-08-25 15:49:04 -07:00
Andrey Melnikov
6e72b550b1 update: cvat to 0.12.0_cvat.1.0.0 2020-08-25 15:47:41 -07:00
Aleksandr Melnikov
1f95b87699 Using a fixed image. 2020-08-25 15:36:09 -07:00
Rush Tehrani
8258c5f19b Merge pull request #544 from onepanelio/fix/fix.regression
fix: Fixing code that was removed during a merge and caused a regression.
2020-08-25 15:19:10 -07:00
Aleksandr Melnikov
e61341c50a Fixing merge removed code. 2020-08-25 15:13:02 -07:00
Rush Tehrani
8c0a763404 Merge pull request #542 from onepanelio/fix/update.migrations.to.support.more.than.s3
fix: Adding support for different bucket storages in the db migrations
2020-08-25 14:45:20 -07:00
Aleksandr Melnikov
76bc226a2e Merge branch 'dev' into fix/update.migrations.to.support.more.than.s3 2020-08-25 14:25:06 -07:00
Andrey Melnikov
e1dd4b8ed1 Merge pull request #543 from onepanelio/fix/migrations.namespaces
fix: issue where migrations crashed with multiple namespaces
2020-08-25 12:50:00 -07:00
Aleksandr Melnikov
1e3b9ca278 Merge branch 'dev' into feat/core.415-jupyter.lab.workspace 2020-08-25 12:46:42 -07:00
Andrey Melnikov
cde5b54830 fix: issue where workspace templates were changed during update, resulting in crash if more than one namespace attempted updates. 2020-08-25 12:45:11 -07:00
Aleksandr Melnikov
d2adb109e1 Adding comment for function. 2020-08-25 11:32:33 -07:00
Aleksandr Melnikov
6eac7f2c74 Adding support for different bucket storages.
- Updating various migrations
- Adding helper function
2020-08-25 10:55:43 -07:00
Andrey Melnikov
9e4eb59cec Merge pull request #538 from onepanelio/feat/update.migrations
feat: updated migrations for cvat, tf od training, maskrcnn
2020-08-24 11:43:10 -07:00
Andrey Melnikov
0ccd871e54 update: templates 2020-08-24 11:08:20 -07:00
Andrey Melnikov
4bb205257a fix: tf-object detection training template 2020-08-24 10:46:52 -07:00
Andrey Melnikov
bbbf1c0d6a chore: docs for latest migrations 2020-08-24 10:29:26 -07:00
Andrey Melnikov
f9b23a7d2a feat: updated migrations for cvat, tf object detection training, maskrcnn 2020-08-24 10:24:56 -07:00
Rush Tehrani
53c88c8390 Fix postExecutionWorkflow 2020-08-24 10:22:24 -07:00
Aleksandr Melnikov
b7e4281eeb Adding migration for new jupyterlab workspace. 2020-08-21 16:46:19 -07:00
Andrey Melnikov
f533ce01b3 Merge pull request #527 from onepanelio/fix/permissions.messages
feat: permissions issues are now more detailed in API responses
2020-08-21 12:54:03 -07:00
Andrey Melnikov
abba7b5476 Merge pull request #530 from onepanelio/fix/migration.template
fix: issue where migration crashed
2020-08-20 13:21:07 -07:00
Andrey Melnikov
96861e19d3 fix: issue where migration crashed because a workflow template did not yet exist 2020-08-20 12:56:52 -07:00
Aleksandr Melnikov
f797e93821 Merge pull request #528 from onepanelio/fix/tfod-workflow-name
fix: Update TF object detection workflow name
2020-08-19 12:44:50 -07:00
Rush Tehrani
e5586fcf76 fix: Update TF object detection workflow name 2020-08-19 12:38:01 -07:00
Andrey Melnikov
93d1b4a2c0 update: permissions issues are now more detailed 2020-08-19 11:00:40 -07:00
Andrey Melnikov
df1421c6c4 Merge pull request #524 from onepanelio/fix/workspace.core.ip
fix: extra import
2020-08-17 16:25:14 -07:00
Andrey Melnikov
cfbd92b65f fix: extra import 2020-08-17 16:22:23 -07:00
Rush Tehrani
bd5bea5f3a Merge pull request #523 from onepanelio/fix/workspace.core.ip
fix: update core pod host to use name instead of static value
2020-08-17 16:17:49 -07:00
Andrey Melnikov
5d3345ded2 update: removed port since default is 80 2020-08-17 16:17:10 -07:00
Andrey Melnikov
0274785f72 fix: removed port environment variable as it is no longer needed since host is not using an environment variable 2020-08-17 16:14:30 -07:00
Andrey Melnikov
bcec3c13fd fix: update core pod host to use string instead of environment variable which evaluates to a static ip 2020-08-17 16:07:47 -07:00
rushtehrani
62b3e64df5 chore: move util/sql to pkg/util/sql 2020-08-17 10:09:24 -07:00
Andrey Melnikov
7c6708849f Merge pull request #517 from onepanelio/fix/tfod-template
fix: Update TFOD migration
2020-08-17 10:02:32 -07:00
Rush Tehrani
811f86633a Remove num of classes hint as that is in the docs 2020-08-15 17:31:18 -07:00
Rush Tehrani
4ed14f9baf Update TFOD migration 2020-08-15 16:57:51 -07:00
Andrey Melnikov
c0ad80a185 Merge pull request #514 from onepanelio/fix/migrations.issues
fix: migrations to include latest cvat image and descriptions
2020-08-14 16:41:50 -07:00
Andrey Melnikov
9e694f1c34 chore: documentation for migrations 2020-08-14 16:38:02 -07:00
Andrey Melnikov
4e92586024 update: migrations to include latest cvat and add descriptions 2020-08-14 16:30:57 -07:00
Andrey Melnikov
b62271ddba fix: migrations missing labels 2020-08-14 15:52:29 -07:00
Andrey Melnikov
d1a119b6de fix: issue with migration crashing 2020-08-14 15:43:07 -07:00
Andrey Melnikov
5a66ef2673 Merge pull request #500 from onepanelio/feat/onepanelio.core.386-migrations.update
feat: Update migrations for maskRCNN, tf od, and cvat
2020-08-14 14:36:21 -07:00
Andrey Melnikov
eabd391180 update: api to 0.12.0-rc.0 2020-08-14 14:35:36 -07:00
Andrey Melnikov
0736c92804 Merge branch 'dev' into feat/onepanelio.core.386-migrations.update 2020-08-14 14:34:20 -07:00
Andrey Melnikov
93551f12ee update: migration templates 2020-08-14 14:27:59 -07:00
Andrey Melnikov
9cb3002cee Merge pull request #512 from onepanelio/feat/add.default.visibility
feat: make default visibility public for parameters
2020-08-14 11:10:25 -07:00
Andrey Melnikov
eb9d798021 feat: make default visibility public for parameters 2020-08-14 10:58:06 -07:00
Andrey Melnikov
a31082d9a1 Merge pull request #510 from onepanelio/bug/auth.crash
fix: issue where auth would sometimes crash
2020-08-13 18:21:37 -07:00
Andrey Melnikov
865f3fa827 fix: issue where auth would sometimes crash 2020-08-13 18:18:43 -07:00
Andrey Melnikov
072cbf24e3 Merge pull request #506 from onepanelio/bug/onepanelio.core.505-panic
fix: issue where creating a workspace with no matching template caused a panic
2020-08-13 14:55:52 -07:00
Andrey Melnikov
90ce50a9ac fix: issue where creating a workspace with no template caused a panic 2020-08-13 14:51:38 -07:00
Andrey Melnikov
00806b9baf Merge pull request #502 from onepanelio/feat/support-script-templates
feat: Support script templates in Workflow
2020-08-13 10:25:53 -07:00
rushtehrani
ce805bfa20 feat: Support script templates in Workflow 2020-08-12 22:31:42 -07:00
Andrey Melnikov
1431b4344b update: added migrations to
* create maskrcnn workflow template
* update tf_od workflow template
* updated cvat workspace template
2020-08-12 11:51:37 -07:00
Andrey Melnikov
9558473f2c feat: handled edge case where auth pieces might be less than 2. 2020-08-12 10:36:25 -07:00
Andrey Melnikov
bc7ce21fb6 chore: update api swagger version to 0.12.0b5. 2020-08-12 10:36:05 -07:00
Andrey Melnikov
e222af5564 Merge pull request #498 from onepanelio/feat/onepanelio.core.470-workspace.template.description.and.labels
feat: added description to workspace templates
2020-08-12 10:21:04 -07:00
Andrey Melnikov
2abe166904 Merge pull request #496 from onepanelio/fix/skip-params-for-sys-volumes
fix: Skip generation volume size parameters for system volumes
2020-08-11 10:14:31 -07:00
Andrey Melnikov
4b4cccbd74 Merge pull request #486 from onepanelio/feat/remove-nvidia-smi-mount
chore: Remove nvidia-smi mount
2020-08-11 10:10:57 -07:00
Andrey Melnikov
eb06f0ada3 Merge pull request #497 from onepanelio/fix/labels.count
fix: bug with counting workflow templates with labels query
2020-08-10 20:09:42 -07:00
Andrey Melnikov
6b74d0c61b fix: issue where counting workflow templates didn't work without the old labels table 2020-08-10 20:06:58 -07:00
Aleksandr Melnikov
d41dad0074 Merge pull request #493 from onepanelio/feat/onepanelio.labels.upgrade
feat: upgrade label structure to support querying with multiple labels
2020-08-10 17:01:19 -07:00
rushtehrani
34f440587f skip param generation for system volumes 2020-08-10 16:14:59 -07:00
Aleksandr Melnikov
70a4fc9eb8 Merge pull request #491 from onepanelio/fix/onepanelio.core-458.workflow.template.name.error
fix: add more useful error message when workflow template name is too long
2020-08-10 15:40:03 -07:00
Andrey Melnikov
cd7f4cb5d7 feat: added description to workspace templates 2020-08-10 15:06:38 -07:00
Andrey Melnikov
6a681e6693 chore: documented JSONLabels and ReplaceLabelsUsingKnownID 2020-08-10 13:01:19 -07:00
Andrey Melnikov
036e417a56 fix: go migration that used old label method. It is no longer needed apart from backwards compatibility support. 2020-08-10 12:00:21 -07:00
Andrey Melnikov
879932c4b5 update: migration to migrate old labels to new labels and roll back 2020-08-10 11:35:42 -07:00
Andrey Melnikov
3c3a514983 update: updated logic to filter workflow templates by labels. It now supports AND so you can filter by multiple labels 2020-08-09 21:04:50 -07:00
Andrey Melnikov
8586639a6c update: cron workflows to use new labels 2020-08-09 16:15:05 -07:00
Andrey Melnikov
55eeb90e2a update: workspace labels during creation, listing, and getting to use new method 2020-08-09 13:57:33 -07:00
Andrey Melnikov
c81c2d7672 update: fixed issues where workspace template version labels were not being correctly set/got. Also updated generic server endpoints with new logic 2020-08-09 13:45:24 -07:00
Andrey Melnikov
2f5720aefc fix: migration for labels - added workspace templates labels 2020-08-09 13:43:50 -07:00
Andrey Melnikov
f02e7791f7 update: updated labels for workflow templates and their versions 2020-08-08 15:56:17 -07:00
Andrey Melnikov
8dc22ff9bc chore: added more descriptive error message when workflow template name is too long 2020-08-07 15:41:27 -07:00
Andrey Melnikov
6edca5731b update: change reader to use bufio for buffered reading 2020-08-07 15:15:25 -07:00
Andrey Melnikov
63bdb69968 fix: issue where scanner could not handle long lines while reading logs 2020-08-07 15:10:55 -07:00
rushtehrani
b2e887c1c9 remove nvidia-smi mount 2020-08-06 14:18:21 -07:00
Andrey Melnikov
88d23a5ec5 Merge pull request #483 from onepanelio/fix/workspace.namespace
fix: issue with migrations failing to run
2020-08-05 14:24:32 -07:00
Andrey Melnikov
97ac5892ab fix: issue where workspaceTemplate namespace was not set before setting service environment variables
These were called from migrations
2020-08-05 14:18:58 -07:00
Andrey Melnikov
18a8164b8e Merge pull request #482 from onepanelio/fix/parameter.display.name
fix: issue where parameter display name was not being parsed correctly
2020-08-05 12:50:11 -07:00
Andrey Melnikov
2d5db5baa1 fix: issue where parameter display name was not being parsed correctly 2020-08-05 12:44:28 -07:00
Andrey Melnikov
c30196f267 Merge pull request #479 from onepanelio/feat/onepanelio.core-476.service.environment.vars
fix: incorrect url generated for service environment variables
2020-08-05 11:06:35 -07:00
Andrey Melnikov
7af2e5b1db update: rename files component -> service 2020-08-05 11:00:32 -07:00
Andrey Melnikov
5e4bbaaf9b fix: issue where updating a workspace template did not correctly update services env vars 2020-08-05 10:59:54 -07:00
Andrey Melnikov
e826167aa5 Merge pull request #477 from onepanelio/feat/onepanelio.core-476.service.environment.vars
feat: added service environment variables to be mounted into workspaces
2020-08-04 15:43:24 -07:00
Andrey Melnikov
6863fd8d99 feat: added service environment variables to be mounted into workspaces 2020-08-04 15:30:55 -07:00
Andrey Melnikov
aed10dc1c9 Merge pull request #475 from onepanelio/fix/core.414-large.artifact.download.crashes.dev
fix: issue where downloading artifact files from a workflow over 10 MB failed
2020-08-04 11:16:32 -07:00
Andrey Melnikov
20c23cfb8e Merge pull request #474 from onepanelio/fix/onepanelio.core.473-fix.workflow.bug
fix: issue where running a workflow execution again failed
2020-08-04 10:47:22 -07:00
Aleksandr Melnikov
4cdb39f934 Updating the max server / client send and receive message size. 2020-08-04 10:46:43 -07:00
Aleksandr Melnikov
10204a8896 Addiing octet-stream to api.proto. 2020-08-04 10:43:08 -07:00
Andrey Melnikov
3e6a48ba1e fix: issue where running a workflow execution again failed. 2020-08-04 10:40:18 -07:00
Andrey Melnikov
aeaa447beb Revert "poc: Using a custom type for labels backed by JSONB"
This reverts commit 023713da32.
2020-08-03 15:26:08 -07:00
Andrey Melnikov
023713da32 poc: Using a custom type for labels backed by JSONB 2020-08-03 15:25:18 -07:00
Aleksandr Melnikov
8a58fb9705 Merge pull request #464 from onepanelio/fix/onepanel.core.463-workflow.template.error
fix: workflow template visibility gave incorrect error
2020-07-31 11:41:26 -07:00
Andrey Melnikov
54d5420838 fix: issue where workflow template parameters error did not correctly propagate back to the client 2020-07-31 11:22:09 -07:00
Andrey Melnikov
ebfcf1fb31 Merge pull request #462 from onepanelio/feat/onepanelio.core.450-refactor.parameters.parsing
chore: simplify logic for parsing parameters from cron workflow manifests
2020-07-31 11:12:28 -07:00
Aleksandr Melnikov
10fb88639c Merge pull request #461 from onepanelio/feat/onepanelio.core.440-parameter.visibility
fix: restricted parameter visibility to not allow any random value
2020-07-31 10:25:08 -07:00
Andrey Melnikov
b020efb16f update: GetParametersFromWorkflowSpec to use yaml unmarshaling 2020-07-30 22:33:00 -07:00
Andrey Melnikov
85e876b723 update: restricted parameter visibility to one of four values
* public
* protected
* internal
* private

Also did a minor cleanup to parameter conversion from v1 to api
2020-07-30 19:01:52 -07:00
Aleksandr Melnikov
080c667b05 Merge pull request #457 from onepanelio/feat/onepanelio.core.440-parameter.visibility
feat: add visibility field to parameters
2020-07-30 13:39:07 -07:00
Andrey Melnikov
fc89727b80 feat: added visibility to parameters 2020-07-30 12:52:03 -07:00
Andrey Melnikov
9b90391892 Merge pull request #448 from onepanelio/bug/db.connection.leak
fix: database connection leak
2020-07-30 11:13:25 -07:00
Andrey Melnikov
e99e66590a fix: fixed issue where ParseParametersFromManifest did not correctly parse integers 2020-07-30 10:58:34 -07:00
Andrey Melnikov
a8f287b197 update: when formatting parameters for API response, if the value is nil, allow it.
Although this technically shouldn't happen, it will help in debugging and preventing crashes.
2020-07-29 22:33:55 -07:00
Andrey Melnikov
7e63fa28d0 fix: issue where nil param values caused dereference errors 2020-07-29 22:27:53 -07:00
Andrey Melnikov
7e41f5e538 fix: issue where db connections were not being closed in go migrations or when configmap changes were detected 2020-07-29 17:43:40 -07:00
Andrey Melnikov
77080ff173 Merge pull request #447 from onepanelio/chore/protoc.updates
chore: update api docs
2020-07-29 16:43:01 -07:00
Andrey Melnikov
8ca18d5fc5 update: regenerate api 2020-07-29 16:40:26 -07:00
Andrey Melnikov
4b7d7a1932 Merge pull request #421 from onepanelio/feat/components
feat: add components API
2020-07-29 16:37:27 -07:00
Aleksandr Melnikov
e244b8e625 Merge pull request #437 from onepanelio/feat/onepanelio.core.391-create.workflow.link
feat: add workflow execution metadata fields
2020-07-29 16:34:15 -07:00
Andrey Melnikov
819c57bed1 Merge pull request #443 from onepanelio/feat/core.387-merge
feat: Adding "parameters" to workflow template API response.
2020-07-29 15:51:04 -07:00
Aleksandr Melnikov
eeaad9c03b Putting back a function lost to merge. 2020-07-29 15:45:29 -07:00
Aleksandr Melnikov
6ca2977662 Adding a comment. 2020-07-29 15:35:35 -07:00
Aleksandr Melnikov
6dd0225e17 Generated proto files. 2020-07-29 15:06:46 -07:00
Aleksandr Melnikov
a26c83988b Fixing functions from merge. 2020-07-29 15:06:37 -07:00
Aleksandr Melnikov
80ed85a4cb Fixing an issue with parameters being null for insert.
- This can happen when editing a workflow template in the UI and hitting
save.
2020-07-29 15:06:26 -07:00
Aleksandr Melnikov
e0f8118241 Merge branch 'dev' into feat/core.387-merge 2020-07-29 14:46:22 -07:00
Andrey Melnikov
da1ca6eece update: rename components to services 2020-07-29 14:21:14 -07:00
Aleksandr Melnikov
b239ca1e6f Merge pull request #439 from onepanelio/feat/onepanelio.core.434-filter.workflow.templates.by.label
feat: add API support to filter workflow templates by a label
2020-07-29 14:15:13 -07:00
Aleksandr Melnikov
b2bef450e1 Merge branch 'dev' into feat/onepanelio.core.434-filter.workflow.templates.by.label 2020-07-29 13:10:05 -07:00
Andrey Melnikov
08442a796f Merge pull request #427 from onepanelio/feat/namespace-config-injector
feat: Mount namespace config for system containers
2020-07-29 12:44:21 -07:00
Aleksandr Melnikov
206e6a48cd Simplifying function calls per feedback. 2020-07-29 12:02:16 -07:00
Aleksandr Melnikov
276708d83c Adding and fixing comments. 2020-07-29 11:52:03 -07:00
Aleksandr Melnikov
9c8299d89c Renaming function per feedback. 2020-07-29 11:24:30 -07:00
Aleksandr Melnikov
828e44ab7d Updating function names per feedback.
- Do not expose DB functions.
2020-07-29 11:19:58 -07:00
Aleksandr Melnikov
98a45f927f Adding wtv.ID <= 0 check, per feedback.
Simplifying the returned err.
2020-07-29 11:19:35 -07:00
Aleksandr Melnikov
c97737773e Removing unnecessary type-cast 2020-07-29 11:15:19 -07:00
Aleksandr Melnikov
57f228ec2c Removing fields that should not be changed. 2020-07-29 11:14:12 -07:00
Aleksandr Melnikov
f421ba4ab8 Simplifying variable initializing. 2020-07-29 11:14:04 -07:00
Aleksandr Melnikov
6d9a575789 Simplifying migration that updates parameters.
- Directly retrieving all the WorkflowTemplateVersions from the database
and updating them, instead of going through namespaces, workflow templates,
then the versions.
2020-07-29 10:45:27 -07:00
Aleksandr Melnikov
0a6ea236c7 Adding functions to select all WorkflowTemplateVersions from the
database without filtering.
2020-07-29 10:44:22 -07:00
Aleksandr Melnikov
fa2a351da3 Removing namespace parameter since updating the database entry does
not require a namespace filter.
2020-07-29 10:42:42 -07:00
Aleksandr Melnikov
7ff17a5aae Refactoring database code.
- This ensures the transaction commits.
2020-07-29 10:15:37 -07:00
Aleksandr Melnikov
8d8472f52d Casting parameters to string. 2020-07-29 10:14:38 -07:00
Andrey Melnikov
12d3e84943 chore: documentation to meet codacy requirements 2020-07-28 22:54:02 -07:00
Andrey Melnikov
6f65f291d5 update: added migration for workflow template labels 2020-07-28 20:52:16 -07:00
Andrey Melnikov
ac5a394366 update: added utility to go migrations to find out if it has been run before as a sql migration 2020-07-28 20:52:02 -07:00
Andrey Melnikov
5b0fc82acf update: added new method to workflow templates to list all of them, which we need for certain migrations. 2020-07-28 20:50:58 -07:00
Andrey Melnikov
39c9511578 update: pagination with new methods to aid in starting a pagination and advancing it. 2020-07-28 20:50:17 -07:00
Andrey Melnikov
5d221f6140 update: added migration to update workflow template labels 2020-07-28 20:07:36 -07:00
Andrey Melnikov
da8cb2859a feat: added support for filtering workflow templates by a single label.
When a workflow template is created, or a new version is created, we now stores the labels for it as the latest labels. This makes it easier to filter based on labels.
2020-07-28 16:57:43 -07:00
Andrey Melnikov
5009a2643f fix: issue with label parsing where empty string did not return nil 2020-07-28 16:55:08 -07:00
Aleksandr Melnikov
e0ec2e5783 Fixing the version used.
- Otherwise, templates are not found consistently.
2020-07-28 16:17:31 -07:00
Andrey Melnikov
11d198a2db feat: Added API support for filtering workflow templates by labels. Logic not yet implemented. 2020-07-28 16:14:35 -07:00
Aleksandr Melnikov
9ab76e78fb Removing previous ParseParametersFromMAnifest.
- Instead, retrieving the WorkflowTemplateVersion from the database,
and using it's params for the WorkflowTemplate's
2020-07-28 15:07:52 -07:00
Aleksandr Melnikov
859a3d21c9 Adding code to Unmarshal the Parameters after DB query. 2020-07-28 15:07:17 -07:00
Aleksandr Melnikov
512bb04be5 Adding []byte field to struct.
- So we can load the JSONB data from the database.
2020-07-28 15:06:53 -07:00
Aleksandr Melnikov
00c22974a9 Updating WorkflowTemplateVersionColumns to also return "parameters"
column.
2020-07-28 15:06:31 -07:00
Aleksandr Melnikov
2bb66545e8 Fixing pagination.
- Results may be less than pageSize.
Changed to paginate only if there are over 0 results.
2020-07-28 11:56:20 -07:00
Andrey Melnikov
b0ec3194b6 fix: workflow execution uid = name now, we should not be returning the k8s uid. 2020-07-28 11:53:49 -07:00
Andrey Melnikov
81e3a7f299 fix: wrong namespace variable passed in 2020-07-28 11:53:27 -07:00
Aleksandr Melnikov
a913c69b71 Fixing the while loop condition.
Adding code to paginate through results.
2020-07-28 11:44:43 -07:00
Aleksandr Melnikov
16c04a9906 Adding code to load WorkflowTemplateVersionsDB. 2020-07-28 11:43:16 -07:00
Aleksandr Melnikov
013b41f102 Removing validateWorkflowTemplate because WorkflowTemplate is not
loaded from the database.
2020-07-28 11:42:57 -07:00
Aleksandr Melnikov
4d5f02c815 Converting parameters to JSON for database operations. 2020-07-28 11:42:16 -07:00
Aleksandr Melnikov
c1a22cd330 Adding migration to db.go 2020-07-28 11:41:29 -07:00
Andrey Melnikov
25049535e3 feat: Added generator for web routes. Added url for workflow executions. 2020-07-28 11:12:19 -07:00
Aleksandr Melnikov
2f8735c6d0 Added migration to go through current workflow_template_versions
and generate the "parameters" column values for each.
2020-07-27 17:41:41 -07:00
Aleksandr Melnikov
276f084fab Added SQL migration to add "parameters" column to workflow_template_versions
table.
2020-07-27 17:41:18 -07:00
Aleksandr Melnikov
8e9e51fc5e Added exposed function to update a WorkflowTemplateVersion in the database. 2020-07-27 17:41:00 -07:00
Aleksandr Melnikov
f9838a4614 Adding Parameters to WorkflowTemplateVersion struct. 2020-07-27 17:40:22 -07:00
Aleksandr Melnikov
36a5d26b4e Adding work-around functions for listWorkflowTemplateVersions and
ListWorkflowTemplateVersions.
2020-07-27 17:39:38 -07:00
Aleksandr Melnikov
e12cdafac2 Adding function to update a workflow_template_version row in the database. 2020-07-27 17:39:02 -07:00
Aleksandr Melnikov
e851a35b4e Fixing database connection string. 2020-07-27 12:07:34 -07:00
Aleksandr Melnikov
d0a83ffddd Adding the rest of the proto updated files. 2020-07-27 12:07:34 -07:00
Aleksandr Melnikov
29710519a1 Fixing the Parameter parsing from Manifest.
- Using specific function to achieve same functionality
Removing the for-loop because it caused duplicate values.
Wrong:
```json
  "parameters": [
    {
      "type": null,
      "required": null,
      "name": "source",
      "options": null,
      "hint": null,
      "value": "name: command\norder: 1\nvalue: python mnist/main.py --epochs=5\n",
      "display_name": null
    },
    {
      "type": null,
      "required": null,
      "name": "command",
      "options": null,
      "hint": null,
      "value": "name: command\norder: 1\nvalue: python mnist/main.py --epochs=5\n",
      "display_name": null
    }
```
Right:
```json
  "parameters": [
    {
      "options": [],
      "name": "source",
      "value": "https://github.com/onepanelio/tensorflow-examples.git",
      "type": "",
      "displayName": "",
      "hint": "",
      "required": false
    },
    {
      "options": [],
      "name": "command",
      "value": "python mnist/main.py --epochs=5",
      "type": "",
      "displayName": "",
      "hint": "",
      "required": false
    }
```
2020-07-27 12:07:33 -07:00
Aleksandr Melnikov
c05ac10c64 Adding Parameters to workflow template getWorkflowTemplate. 2020-07-27 12:07:33 -07:00
Aleksandr Melnikov
43a9c22d40 Adding Parameters to WorkflowTemplate to proto. 2020-07-27 12:07:32 -07:00
rushtehrani
2eec349af9 add Workspace volume params last 2020-07-26 22:53:37 -07:00
rushtehrani
f81cdc03f7 change hint and displayName for CVAT arg 2020-07-26 22:28:22 -07:00
rushtehrani
1276e82fb0 enable filesyncer support out of the box for CVAT 2020-07-26 21:56:13 -07:00
rushtehrani
8bfcb87e91 update CVAT workspace template to use new filesyncer 2020-07-24 22:29:49 -07:00
rushtehrani
30e25192c7 mount namespace config for system containers 2020-07-24 21:59:39 -07:00
Rush Tehrani
cb4a229984 Merge pull request #425 from onepanelio/fix/changing.secretAccountKey.key.to.be.consistent
fix: Use consistent naming convention for GCS artifactRepository secret key
2020-07-24 12:15:44 -07:00
Aleksandr Melnikov
c3f76f971c Removing comments. 2020-07-24 12:08:41 -07:00
Aleksandr Melnikov
dc27fd3319 Changing serviceAccountKey to be more consistent with other secret
keys.
2020-07-24 12:08:36 -07:00
rushtehrani
0a8744656c remove redeclared package 2020-07-24 11:51:49 -07:00
Rush Tehrani
1910a47a21 Merge pull request #423 from onepanelio/fix/putting.yaml.lib.back.for.nodepool.options
fix: Regression fix; We need the specific sigs.k8s.io/yaml library
2020-07-24 11:22:26 -07:00
Aleksandr Melnikov
e3fd781cd3 Merge branch 'dev' into fix/putting.yaml.lib.back.for.nodepool.options 2020-07-24 11:21:06 -07:00
Rush Tehrani
5eff42fb2c Merge pull request #422 from onepanelio/fix/adding.yaml.annotation.to.prevent.empty.keys
fix: Adding omitempty to prevent the keys from showing up in onepanel
2020-07-24 11:13:44 -07:00
Aleksandr Melnikov
3067c62a7f Regression fix; We need the specific sigs.k8s.io/yaml library
to properly unmarshal nodePoolOptions from params.yaml.
2020-07-23 21:09:37 -07:00
Aleksandr Melnikov
adb7f0b74a Adding omitempty to prevent the keys from showing up in onepanel
configmap, if they are not filled.
- Adding explicit yaml conversion for serviceAccountJSON, otherwise
"omitempty" shows in the configmap.
2020-07-23 20:45:37 -07:00
Andrey Melnikov
6753ead9f8 doc: component type 2020-07-23 20:10:35 -07:00
Andrey Melnikov
146411c370 feat: added components API 2020-07-23 19:57:18 -07:00
Rush Tehrani
bdc3d99fed Merge pull request #400 from onepanelio/feat/core.331-support.gcs.artifact.repository
feat: core.331 support.gcs.artifact.repository
2020-07-23 13:11:58 -07:00
Aleksandr Melnikov
aa6725fbc9 Another comment adjustment. 2020-07-22 17:00:14 -07:00
Aleksandr Melnikov
8da35695de Another comments adjustment. 2020-07-22 16:57:19 -07:00
Aleksandr Melnikov
fc7cdb5681 Another comments adjustment. 2020-07-22 16:46:14 -07:00
Aleksandr Melnikov
7bbeba544d Fixing comments per Codacy. 2020-07-22 16:37:55 -07:00
Aleksandr Melnikov
5b7f5c9724 Codacy feedback for comments. 2020-07-22 16:30:23 -07:00
Aleksandr Melnikov
1effb919d6 Per Codacy,
- Adding comments
- Refactoring variables names
- Fixing return variable order
2020-07-22 16:23:24 -07:00
Aleksandr Melnikov
7f6f58884a Per discussion, combining Config structs into Provider. 2020-07-22 16:01:33 -07:00
Aleksandr Melnikov
16274dd946 Moving some attributes form S3Config to S3Provider. 2020-07-22 15:32:38 -07:00
Aleksandr Melnikov
cebb412175 Removing extra yaml from import. 2020-07-22 15:31:58 -07:00
Aleksandr Melnikov
5dbb2104ce Merge branch 'dev' into feat/core.331-support.gcs.artifact.repository 2020-07-22 14:03:10 -07:00
Andrey Melnikov
2232d4e946 Merge pull request #417 from onepanelio/feat/onepanel.auth.header
feat: onepanel-auth-token header for authentication
2020-07-21 15:03:33 -07:00
Andrey Melnikov
e66c095500 update: added reserved workspace names 2020-07-21 14:37:51 -07:00
Andrey Melnikov
7af3c9dd7c feat: allowed onepanel-auth-token header to provide authentication token.
Updated server to make that key not require a grpc-gateway prefix.
2020-07-20 20:52:36 -07:00
Rush Tehrani
b01c0c41a8 Merge pull request #412 from onepanelio/fix/onepanelio.core.407-workspaces.missing.node.pools
fix: goose binary errors
2020-07-14 19:14:04 -07:00
Andrey Melnikov
59d0c95307 fix: extra run of goose up 2020-07-14 19:11:30 -07:00
Andrey Melnikov
d319d41929 fix: goose command since the package structure changed, we need to update it to reference the go migrations package. Further, we need to update the logic to run both migrations of sql and go. 2020-07-14 19:00:52 -07:00
Andrey Melnikov
9435404701 fix: filepath separator to include windows support. 2020-07-14 19:00:05 -07:00
Rush Tehrani
b6b8652829 Merge pull request #410 from onepanelio/fix/onepanelio.core.407-workspaces.missing.node.pools
fix: get workspaces now returns up-to-date node pool options
2020-07-14 18:39:22 -07:00
Andrey Melnikov
5073cbdff1 fix: issue where changing configmap crashed goose because migrations were re-added 2020-07-14 18:31:21 -07:00
Andrey Melnikov
0b77438d57 clean: drop nil initialization from var pointer as it is the default value. 2020-07-14 15:16:15 -07:00
Andrey Melnikov
59e7d58503 fix: get workspaces now returns up-to-date node pool options 2020-07-14 15:09:06 -07:00
Aleksandr Melnikov
fa96d6ef66 Merge branch 'dev' into feat/core.331-support.gcs.artifact.repository 2020-07-14 14:06:47 -07:00
Aleksandr Melnikov
6c0d3fe598 Refactored GCS client creation.
Added GetObject function to be consistent with S3 functionality.
Note
- pkg/client.go, line 88 passes in the JSON.
If ArtifactRepositoryGCSCondig was imported inside gcs.NewClient
code, an import cycle would be created.
2020-07-14 14:05:31 -07:00
Aleksandr Melnikov
b0361cdc6c Instead of passing the secret values into the configmap, pass
the secret reference and secret key.
2020-07-13 17:37:29 -07:00
Aleksandr Melnikov
e526505365 Fixing the Key to look for inside the secret. 2020-07-13 17:01:07 -07:00
Aleksandr Melnikov
993ce397aa Removing todo, verified Name is correct. 2020-07-13 16:02:14 -07:00
Aleksandr Melnikov
7a8df485ad Removing completed todos. 2020-07-10 17:53:33 -07:00
Aleksandr Melnikov
7936eac98d Adding a way to store the location of the secret and the secret key to use.
Adding another field to struct, which will store the ServiceAccountJSON.
- This will be generated by the API and used by the API for the GCS client.
2020-07-10 17:53:25 -07:00
Aleksandr Melnikov
94ae9071aa Adding exit condition to for true when iterating through bucket files. 2020-07-10 17:19:03 -07:00
Aleksandr Melnikov
8b6d10d112 Updating GCS MarshalToYaml
- Do not write the value of ServiceAccount to Config Map. This
exposes credentials.
- Properly write the reference the argo expects. The reference
points to the secret that contains the credentials.
2020-07-10 17:19:03 -07:00
Aleksandr Melnikov
a94ae526ca Merge pull request #393 from onepanelio/feat/provider-specific-config
feat: Add support for ResourceRequirements in node pools
2020-07-10 11:35:30 -07:00
Aleksandr Melnikov
8e2b1ab106 Merge branch 'dev' into feat/core.331-support.gcs.artifact.repository 2020-07-09 18:09:50 -07:00
Aleksandr Melnikov
e83e5d495e Injecting GCS configuration into ArtifactRepository. 2020-07-09 18:02:18 -07:00
Aleksandr Melnikov
0f5cf7be4d Fixing shadowed err. 2020-07-09 16:30:11 -07:00
Aleksandr Melnikov
7295ba36b3 Putting pack a required package. 2020-07-09 16:30:00 -07:00
rushtehrani
a8958b0136 move migration to correct folder 2020-07-09 15:35:06 -07:00
rushtehrani
69a6a72303 add missing methods after conflict resolution 2020-07-09 14:36:24 -07:00
Rush Tehrani
92f2be7cac Merge branch 'dev' into feat/provider-specific-config 2020-07-09 14:18:49 -07:00
Rush Tehrani
46f4465103 Merge pull request #374 from onepanelio/test/docker.database
feat: setup unit tests with database
2020-07-09 14:17:41 -07:00
rushtehrani
ca45e29dd5 remove unused file 2020-07-09 14:06:38 -07:00
rushtehrani
dfd892d6f1 update func names to match new convention 2020-07-09 13:50:42 -07:00
rushtehrani
c1d123ec2c use run-tests for all tests 2020-07-09 13:43:28 -07:00
rushtehrani
7c2001f5ac Merge branch 'test/docker.database' of https://github.com/onepanelio/core into test/docker.database 2020-07-09 12:45:23 -07:00
rushtehrani
aff166fb40 change test names to match new convention 2020-07-09 12:45:16 -07:00
Andrey Melnikov
40759738ae fix: took up the messages if a go migration was already ran as it was printed after the goose message, which was a bit confusing. 2020-07-09 12:27:44 -07:00
Andrey Melnikov
a0454cdfc3 fix: backwards compatibility for previous go migrations. Don't run them if they were ran earlier in the goose_db_version db table. 2020-07-09 12:23:38 -07:00
Rush Tehrani
41d3d7be34 Merge pull request #399 from onepanelio/fix/new-cvat-template
fix: Update CVAT template to Comment out filesyncer to avoid crashing
2020-07-09 11:46:31 -07:00
rushtehrani
4dc60c2113 update cvat template 2020-07-09 11:43:25 -07:00
Rush Tehrani
3cf11eaa58 Merge pull request #398 from onepanelio/revert-394-fix/cvat-template
Revert "fix: Comment out filesyncer to avoid CVAT template crashing"
2020-07-09 11:33:01 -07:00
Rush Tehrani
3b605545b1 Revert "fix: Comment out filesyncer to avoid CVAT template crashing" 2020-07-09 11:32:16 -07:00
Rush Tehrani
eef3309080 Merge pull request #394 from onepanelio/fix/cvat-template
fix: Comment out filesyncer to avoid CVAT template crashing
2020-07-09 11:27:11 -07:00
Aleksandr Melnikov
4e3eaae1f6 Updating ListFiles to support GCS. 2020-07-09 10:55:37 -07:00
rushtehrani
2ddab18a59 rename function 2020-07-08 17:50:16 -07:00
Aleksandr Melnikov
6727b00b05 Updating GetArtifact to support GCS. 2020-07-08 14:00:51 -07:00
Aleksandr Melnikov
81c05f9954 Adding error check. 2020-07-08 14:00:20 -07:00
Aleksandr Melnikov
ac5bf65ae9 Added GCS support for Metrics retrieval. 2020-07-08 13:36:59 -07:00
Aleksandr Melnikov
66431a21eb Added code to get the log object from GCS.
Added switch statement for GCS versus S3.
2020-07-08 13:17:07 -07:00
Aleksandr Melnikov
8d662d6ce0 Adding FormatKey function for GCS Config. 2020-07-08 13:16:42 -07:00
Aleksandr Melnikov
ad16285fd4 Fixing typo.
Adding explicit error checking for opts.SetRange.
2020-07-08 12:53:12 -07:00
Aleksandr Melnikov
f024889ca8 Implementing switch statement since we have s3 and gcs storage now.
- GCS has necessary credentials in serviceAccount as json
2020-07-08 12:52:55 -07:00
Aleksandr Melnikov
d7df089d31 When grabbing artifactRepository from config, check if
S3 or GCS are set.
- If not, throw an error.
2020-07-08 12:52:11 -07:00
Aleksandr Melnikov
2cd3f76299 Adding GetGCSClient function.
- Returns client that can interact with google cloud storage.
2020-07-08 12:51:45 -07:00
Aleksandr Melnikov
965e8dda92 Adding Google library for Google Cloud Storage. 2020-07-08 11:33:47 -07:00
Aleksandr Melnikov
c13c868143 Adding GCS structs for Artifact Repository configuration.
- These will be unmarshalled into via CLI from params.yaml.
- Added helper function, MarshalToYaml.
2020-07-06 21:56:39 -07:00
Aleksandr Melnikov
e2f94e937c Adding function to output the CLI required YAML for manifests.
- Adding helper structs and tags
2020-07-06 17:07:14 -07:00
Aleksandr Melnikov
df74766a66 Adding yaml tags for unmarshalling into the struct. 2020-07-06 17:06:40 -07:00
Aleksandr Melnikov
30305f42e1 Adding Yaml V3. 2020-07-06 17:04:12 -07:00
rushtehrani
41b2f322da update cvat version 2020-07-04 23:13:39 -07:00
rushtehrani
946ab11dab fix: comment out filesyncer and reference docs 2020-07-04 15:28:33 -07:00
rushtehrani
886e39244e add comments to exported structs and methods 2020-07-03 11:43:52 -07:00
rushtehrani
7ce8d9cdfa support workflow params for resource injection 2020-07-03 11:38:04 -07:00
rushtehrani
2868ab69c9 add resources requests and limits to nodePoolOptions 2020-07-02 22:29:05 -07:00
rushtehrani
18428c4e82 add nvidia-smi in case of aks 2020-07-02 19:19:27 -07:00
Andrey Melnikov
df3dba4e2e test: Added basic test for CreateWorkspace (capital) 2020-07-02 16:45:52 -07:00
Andrey Melnikov
d097cdfefe clean: removed UpdateWorkflowTemplateVersion as it did nothing and should not be used.
#breaking-change
2020-07-02 16:45:34 -07:00
rushtehrani
cee49e67f4 add ONEPANEL_PROVIDER env var 2020-07-02 16:44:22 -07:00
Andrey Melnikov
640c7b54f5 test: fixed issue where Updating the workspace status did not correctly detect a not-found condition and added tests for it. 2020-07-02 16:22:23 -07:00
Andrey Melnikov
655020b54b clean: removed unnecessary generation of uid in "injectWorkspaceSystemParameters" function.
Updated time tests to compare against time.Time{} because nanosecond difference comparison doesn't always work.
2020-07-02 15:46:46 -07:00
Andrey Melnikov
5117c8b34e tests: separated out logic to convert workspace status to a field map and added tests for it 2020-07-02 15:41:54 -07:00
Andrey Melnikov
045912fe5c tests: added more tests surround workspace templates and workspaces 2020-07-02 13:21:11 -07:00
Andrey Melnikov
3673b3da59 tests: added more tests for workspace templates 2020-07-02 12:19:39 -07:00
Andrey Melnikov
d7db598cc6 clean: removed unused methods 2020-07-02 12:19:15 -07:00
Andrey Melnikov
f3a2856d65 fix: codacy issues 2020-07-02 11:20:18 -07:00
Andrey Melnikov
f1045710a0 update: refactored creating a workflow execution 2020-07-02 11:17:31 -07:00
Andrey Melnikov
ed621633df update: updated tests to have method calls for particular cases. Added more tests. 2020-07-01 16:07:20 -07:00
Andrey Melnikov
c5d1ec9b1f fix: go migrations since they would still occur in the order of creation timestamp. Manually initializing them fixes this issue. 2020-07-01 16:06:18 -07:00
Andrey Melnikov
5c225b405d clean: reworked creating a workflow template and version to consolidate logic 2020-06-30 13:05:28 -07:00
Andrey Melnikov
bd5ec0e7c2 fix: updated versions to use a bigint to store nanosecond precision.
updated code to reflect this change and migrated it over.
2020-06-30 11:42:07 -07:00
Andrey Melnikov
176fcc3008 update: recreate issue with workflow template versions being created one after another 2020-06-30 10:59:32 -07:00
Andrey Melnikov
945b3bc2e5 fix: moved migration into appropriate folder 2020-06-30 10:50:35 -07:00
Andrey Melnikov
1bdd6a7eda Merge branch 'test/docker.database' of github.com:onepanelio/core into test/docker.database 2020-06-30 10:50:05 -07:00
Andrey Melnikov
f78ae63afa clean: added method to SysConfig to return database connection information 2020-06-30 10:49:22 -07:00
Andrey Melnikov
114f290cde docs: documented some workflow execution methods 2020-06-30 10:49:22 -07:00
Andrey Melnikov
1a15df4999 fix: testing commit for db connection 2020-06-30 10:49:22 -07:00
Andrey Melnikov
f9f6d75be8 fix: remove extraneous character 2020-06-30 10:49:22 -07:00
Andrey Melnikov
782617a3e9 clean: clean up code for cron workflows 2020-06-30 10:49:22 -07:00
Andrey Melnikov
0ec109da2b fix: how we get argo mock. 2020-06-30 10:49:22 -07:00
Andrey Melnikov
b8b9ff2543 clean: capitalization of names and added WorkflowTemplate uid generator method to encapsulate the behavior 2020-06-30 10:49:22 -07:00
Andrey Melnikov
0b54bd1c43 test: added tests for workflow executions and creating workflow templates 2020-06-30 10:49:22 -07:00
Andrey Melnikov
cb27809665 fix: dynamic database service name in testing 2020-06-30 10:49:22 -07:00
Andrey Melnikov
252e53a793 feat: added flag to database service for testing 2020-06-30 10:49:22 -07:00
Andrey Melnikov
05fc2b1422 fix: inconsistent testing variables and github action variables 2020-06-30 10:49:22 -07:00
Andrey Melnikov
839b9ac2e3 clean: removed custom configmap/secret setting as providing the objects to k8s mock will have them be automatically loaded. 2020-06-30 10:49:22 -07:00
Andrey Melnikov
2091485345 feat: added basic unit testing. Also separated migrations to separate sql and go migrations. This makes it easier to unit test where we just need sql migrations. 2020-06-30 10:49:22 -07:00
Andrey Melnikov
0ffa3aee32 Merge pull request #383 from onepanelio/dev
fix: migration issue (into master)
2020-06-29 22:21:52 -07:00
Andrey Melnikov
a5cc3cf38a Merge pull request #382 from onepanelio/fix/migration
fix: migration issue where workflow name clashed because of unix time…
2020-06-29 22:20:37 -07:00
Andrey Melnikov
4bad6b8858 fix: migration issue where workflow name clashed because of unix timestamp 2020-06-29 22:17:36 -07:00
Andrey Melnikov
35982bf85a Merge pull request #381 from onepanelio/dev
feat: v0.11.0
2020-06-29 11:08:18 -07:00
Andrey Melnikov
f1b31c7d3d Merge pull request #380 from onepanelio/feat/onepanelio.core-376.update.cvat.template
feat: cvat template
2020-06-29 10:56:59 -07:00
Andrey Melnikov
ec2f9b3ecd clean: added method to SysConfig to return database connection information 2020-06-26 17:35:24 -07:00
Andrey Melnikov
a2c11050fc docs: documented some workflow execution methods 2020-06-26 17:26:11 -07:00
Andrey Melnikov
b3f9c44482 fix: testing commit for db connection 2020-06-26 17:25:45 -07:00
Andrey Melnikov
8aa10c9630 fix: remove extraneous character 2020-06-26 17:17:33 -07:00
Andrey Melnikov
6c8f6cee5b clean: clean up code for cron workflows 2020-06-26 17:15:01 -07:00
Andrey Melnikov
60bfe4e02a fix: how we get argo mock. 2020-06-26 17:14:31 -07:00
Andrey Melnikov
9e022b24f7 clean: capitalization of names and added WorkflowTemplate uid generator method to encapsulate the behavior 2020-06-26 16:14:07 -07:00
Andrey Melnikov
be63c412be test: added tests for workflow executions and creating workflow templates 2020-06-26 16:11:57 -07:00
Andrey Melnikov
df582292b7 fix: document the up and down migration for codacy. 2020-06-26 12:18:25 -07:00
Andrey Melnikov
636f7cc72f update: migration to update cvat 2020-06-26 12:09:09 -07:00
Andrey Melnikov
b8912d4f4a update: return error if there is one. 2020-06-26 12:08:58 -07:00
Andrey Melnikov
2b8c2b4589 fix: more descriptive error when yaml conversion fails 2020-06-26 12:08:46 -07:00
Rush Tehrani
c98d1d5614 Merge pull request #379 from onepanelio/fix/onepanelio.core-378.workspace.name.formatting
fix: updated workspace name regex to allow spaces and uppercase letters
2020-06-26 10:31:11 -07:00
Andrey Melnikov
88f6ba2fb8 clean: cleaned up workspace name tests to be easier and clearer 2020-06-26 10:28:02 -07:00
Andrey Melnikov
71ce7289fd fix: updated workspace name regex to allow spaces and uppercase letters 2020-06-26 09:27:39 -07:00
Andrey Melnikov
62f53ee605 fix: dynamic database service name in testing 2020-06-25 16:51:18 -07:00
Andrey Melnikov
81241b0cc9 feat: added flag to database service for testing 2020-06-25 16:48:22 -07:00
Andrey Melnikov
90602b8f87 fix: inconsistent testing variables and github action variables 2020-06-25 16:34:42 -07:00
Andrey Melnikov
ff2e948623 clean: removed custom configmap/secret setting as providing the objects to k8s mock will have them be automatically loaded. 2020-06-25 16:30:10 -07:00
Andrey Melnikov
a831ed164d feat: added basic unit testing. Also separated migrations to separate sql and go migrations. This makes it easier to unit test where we just need sql migrations. 2020-06-25 16:27:33 -07:00
Andrey Melnikov
22bcd5f838 Merge pull request #372 from onepanelio/fix/grpc-status
fix: return correct gRPC code
2020-06-24 12:26:02 -07:00
Andrey Melnikov
21ab9cab01 fix: workspace name regex
600s was valid, but it shouldn't be due to other constraints. The s matches.
2020-06-24 12:21:56 -07:00
rushtehrani
2daf7f8c72 add comments to GRPCStatus method 2020-06-24 11:25:03 -07:00
rushtehrani
3d1382ba17 fix: return correct gRPC code 2020-06-24 11:20:27 -07:00
Rush Tehrani
51a76523d3 Merge pull request #369 from onepanelio/feat/onepanelio.core-362.api.return.node.pools
feat: added endpoint to list node pools
2020-06-23 19:25:08 -07:00
rushtehrani
6b08cd3233 allow access to basic config settings to all logged in user 2020-06-23 19:20:57 -07:00
Andrey Melnikov
2a499f228a update: removed GetValueOrEmpty method since map access does the exact same thing.
Removed more sensitive data from config response
2020-06-23 19:11:12 -07:00
Andrey Melnikov
2c0279eba1 Merge pull request #371 from onepanelio/fix/workspace-template-message
fix:  workspace template message
2020-06-23 18:05:44 -07:00
Andrey Melnikov
cc7ec322b3 docs: ConfigServer 2020-06-23 17:56:46 -07:00
rushtehrani
882901facb se => e 2020-06-23 17:55:48 -07:00
rushtehrani
c59c3f2492 StatusError => UserError and added Go doc comments 2020-06-23 17:52:55 -07:00
Andrey Melnikov
3384564c42 update: Separate config server 2020-06-23 17:52:39 -07:00
rushtehrani
e22056876e add new error type and override workspace template validation messages 2020-06-23 17:42:51 -07:00
rushtehrani
b7bd16610c fix: show correct parameter error for workspace templates 2020-06-23 17:00:14 -07:00
Rush Tehrani
fe5a071b61 Merge pull request #370 from onepanelio/fix/onepanelio.core.361-workspace.names.validation
fix: validate workspace names
2020-06-23 16:33:32 -07:00
Andrey Melnikov
50e6e83a16 update: updated the way we validate workspace name 2020-06-23 15:27:29 -07:00
Andrey Melnikov
bd49e64b78 update: workspace names are now validated to ensure they are okay as subdomains 2020-06-23 12:14:16 -07:00
Andrey Melnikov
90003fa2d9 doc: added missing doc for ListNodePools server method 2020-06-23 11:04:38 -07:00
Andrey Melnikov
1440a660ef feat: added endpoint to list node pools 2020-06-23 11:01:15 -07:00
Rush Tehrani
925d278163 Merge pull request #364 from onepanelio/feat/runtime-params
feat: runtime params
2020-06-22 14:35:36 -07:00
Andrey Melnikov
5a13be299f fix: code cleanup 2020-06-22 13:51:34 -07:00
Andrey Melnikov
3d5dcb632a docs: for various types and some variable name updates per go conventions 2020-06-22 13:43:17 -07:00
Andrey Melnikov
5620bfb3fb docs: workflow_template_types 2020-06-22 12:45:13 -07:00
Andrey Melnikov
dea5eeda3b clean: WorkflowTemplateVersionId -> WorkflowTemplateVersionID 2020-06-22 12:29:26 -07:00
Andrey Melnikov
1cf4dd6658 docs: label_types 2020-06-22 12:25:54 -07:00
Andrey Melnikov
d079d5bad8 docs: file_types 2020-06-22 12:24:27 -07:00
Andrey Melnikov
0d738fe2ad doc: documentation updates 2020-06-22 12:21:30 -07:00
Andrey Melnikov
8cf8436afc fix: issue where archiving workspace template was breaking because it attempted to do so for every version, but there was no logical difference since it used the template 2020-06-22 12:11:55 -07:00
Andrey Melnikov
ab9627f249 docs: added more docs 2020-06-22 11:32:33 -07:00
Andrey Melnikov
a0197e0883 fix: issue where workspace template versions did not correctly mark latest as latest 2020-06-22 11:32:18 -07:00
Andrey Melnikov
97c5e2da6f fix: issue where listing cron workflows failed 2020-06-22 11:11:53 -07:00
rushtehrani
817ec61bdf fix workspace termination 2020-06-21 13:27:12 -07:00
rushtehrani
c56a1c0e96 inject runtime params into Argo workflow as well 2020-06-21 11:08:45 -07:00
rushtehrani
441722a8ba runtime params with only arguments.parameters changes 2020-06-21 01:03:41 -07:00
rushtehrani
ec32dc825c fix nodepool issue 2020-06-20 13:18:52 -07:00
Andrey Melnikov
9f5b12da69 update: moved sqlutil to util/sql 2020-06-20 13:18:52 -07:00
Andrey Melnikov
1526194e71 clean: CronWorkflow logic since label options are now a map and not a pointer to a map. 2020-06-20 13:18:52 -07:00
Andrey Melnikov
017c3ca899 update: CreateWorkflowExecution now takes in a WorkflowTemplate so it can be more easily configured. Workspaces do this by injecting runtime variables. 2020-06-20 13:18:52 -07:00
Andrey Melnikov
7887f3a4ef feat: added Getx method to db wrapper to more easily interact with squirrel. 2020-06-20 13:18:52 -07:00
Andrey Melnikov
d209423100 clean:
* updated method names to fit go conventions of uppercase. Db -> DB
* updated some method calls to use updated column select functions to remove extraneous empty string
* updated methods to use new label function that does nothing if no labels are passed in, this simplifies the code.
* updated some methods to use new Selectx function, reducing code in caller.
2020-06-20 13:18:52 -07:00
Andrey Melnikov
1e3a5d4faf clean: Updated DB to be a struct with convenience functions for getting data. 2020-06-20 13:18:52 -07:00
Andrey Melnikov
f6a7d3ec58 clean: created separate package for sql utils, and put in an updated FormatColumnSelect in there. Also added tests.
This update makes alias optional, so you don't need to provide an empty string as an argument. It also removes extraColumns as an argument as that is easily managed by squirrel.
2020-06-20 13:18:52 -07:00
Andrey Melnikov
ef9c185977 Merge pull request #359 from onepanelio/feat/workspace-crd
feat: Authorize against Workspace CRD
2020-06-19 10:29:28 -07:00
rushtehrani
c7184d133e check auth by uid in workspace get request 2020-06-18 19:35:35 -07:00
rushtehrani
ec2ad1a9be fix param 2020-06-18 19:35:35 -07:00
rushtehrani
640d4f6e9f add Workspace CRD auth check and creation 2020-06-18 19:35:35 -07:00
Rush Tehrani
027a93f044 Merge pull request #357 from onepanelio/fix/params
fix: reference to parameters can now be defined as `workspace.parameters`
2020-06-18 19:34:47 -07:00
Rush Tehrani
5fe3ef9213 Merge pull request #352 from onepanelio/feat/onepanelio.core-348.system.updates
feat: runtime variables and system config change reload
2020-06-18 19:31:41 -07:00
Andrey Melnikov
49c1c6a0cd fix: issue where getting workspace did not have the runtime parameters 2020-06-18 15:23:25 -07:00
Andrey Melnikov
ce9fd4bf52 update: config updates and related usage updates. 2020-06-18 15:22:27 -07:00
Andrey Melnikov
e1ade14d6c Merge branch 'feat/onepanelio.core-348.system.updates' of github.com:onepanelio/core into feat/onepanelio.core-348.system.updates 2020-06-18 12:41:01 -07:00
Andrey Melnikov
d823a951fb fix: fixed issue where channels were not working for restarting server. 2020-06-18 12:40:36 -07:00
Andrey Melnikov
9e236aafb2 test: locks instead of channels 2020-06-18 12:40:36 -07:00
Andrey Melnikov
aaf6d31847 fix: issue where watch was started multiple times. 2020-06-18 12:40:36 -07:00
Andrey Melnikov
efffe1f070 fix: added missing migration 2020-06-18 12:40:36 -07:00
Andrey Melnikov
6fe23c7ed8 clean: code cleanup and minor documentation 2020-06-18 12:40:09 -07:00
Andrey Melnikov
8684e44632 update: added logic to inject runtime variables in Workspace templates 2020-06-18 12:40:08 -07:00
Andrey Melnikov
8c8d4e237a fix: removed db reference to workspace url 2020-06-18 12:36:20 -07:00
Andrey Melnikov
0e2eb1580e fix: removed reference to workspace.url 2020-06-18 12:36:20 -07:00
Andrey Melnikov
72d6892276 update: workspace url is no longer stored in db but is auto generated as it depends on config. 2020-06-18 12:36:20 -07:00
Andrey Melnikov
24348647a8 poc: proof of concept for a server that detects configmap changes and updates the server accordingly. 2020-06-18 12:36:20 -07:00
Andrey Melnikov
d736e773ca Merge pull request #356 from onepanelio/fix/onepanelio.core.355-migrations.crash
fix: migrations crash
2020-06-18 12:32:28 -07:00
Andrey Melnikov
fddf2d6a81 fix: fixed issue where channels were not working for restarting server. 2020-06-18 11:55:01 -07:00
Andrey Melnikov
7df9ac6240 test: locks instead of channels 2020-06-17 19:56:37 -07:00
Rush Tehrani
7ddd6873ea Merge branch 'feat/onepanelio.core-348.system.updates' into fix/params 2020-06-17 17:27:47 -07:00
Andrey Melnikov
63011e1ab4 fix: issue where watch was started multiple times. 2020-06-17 15:01:44 -07:00
Andrey Melnikov
b6c67dd774 fix: added missing volume 2020-06-17 12:58:59 -07:00
Andrey Melnikov
c91efc7a60 fix: added missing migration 2020-06-17 12:27:07 -07:00
Andrey Melnikov
b6b8d624d1 fix: removed constraint on workflow template migration for uid.
This fixes an issue where the go migrations to add templates crashed because the current code assumes uid no longer exists for workflow template versions, but at that point in time, it still does.
2020-06-17 11:41:22 -07:00
rushtehrani
504c4bf597 workspaceSpec => spec 2020-06-16 21:32:56 -07:00
rushtehrani
f19d3b4e53 allow user to use {{workspace.parameters}} in workspace template 2020-06-16 21:26:14 -07:00
Andrey Melnikov
c657a004f0 fix: removed references to workflow template version uid as it is not needed and currently causing a crash with migrations as it is set to the timestamp, which is limited to second precision 2020-06-16 20:06:24 -07:00
Andrey Melnikov
3253aac814 fix: issue where the wrong workflow template was being logged 2020-06-16 19:47:44 -07:00
Andrey Melnikov
57502417ad fix: migrations return the error instead of crashing. This allows goose to perform any logic it needs to respond. 2020-06-16 19:47:29 -07:00
Andrey Melnikov
56777b48c3 fix: parameter name 2020-06-16 10:47:48 -07:00
Andrey Melnikov
3074622046 Merge branch 'dev' into feat/onepanelio.core-348.system.updates 2020-06-16 10:46:27 -07:00
Andrey Melnikov
ba72b1435f clean: code cleanup and minor documentation 2020-06-16 10:30:37 -07:00
Andrey Melnikov
d56b728995 update: added logic to inject runtime variables in Workspace templates 2020-06-15 18:42:47 -07:00
Aleksandr Melnikov
d213fda778 Merge pull request #351 from onepanelio/fix/shared-memory
fix: Shared memory in Workspaces
2020-06-15 17:12:38 -07:00
Andrey Melnikov
a983e26b92 fix: removed db reference to workspace url 2020-06-15 14:06:51 -07:00
Andrey Melnikov
9f6a1be08e fix: removed reference to workspace.url 2020-06-15 14:06:06 -07:00
Andrey Melnikov
9c356dfd8b update: workspace url is no longer stored in db but is auto generated as it depends on config. 2020-06-15 13:56:22 -07:00
rushtehrani
814b289024 fix shared memory issues in Workspaces 2020-06-12 18:55:21 -07:00
Andrey Melnikov
ee9cf10667 Merge pull request #350 from onepanelio/feat/volume-claims
feat: Allow users to define their own VolumeClaimTemplates
2020-06-12 10:44:36 -07:00
rushtehrani
5b69516867 skip parameters for volumes that have storage set 2020-06-11 22:23:39 -07:00
rushtehrani
0c28cc1576 rename field 2020-06-11 21:06:10 -07:00
rushtehrani
7cddeb9311 feat: Custom volume claim templates 2020-06-11 20:59:29 -07:00
Andrey Melnikov
64a078f4d6 poc: proof of concept for a server that detects configmap changes and updates the server accordingly. 2020-06-11 20:19:48 -07:00
rushtehrani
3f4d84398b += 1 => ++ 2020-06-11 12:23:06 -07:00
rushtehrani
5ecd8ca185 order contributors by number of contributions 2020-06-11 12:08:30 -07:00
rushtehrani
73e7cda6f1 fix contributor sorting 2020-06-11 11:16:17 -07:00
Rush Tehrani
9af50d36b3 Merge pull request #346 from onepanelio/feat/authorization.updates
feat: Centralize authorization to one endpoint
2020-06-10 23:02:03 -07:00
Andrey Melnikov
0e9ec72527 update: error variable names to just err for simplicity 2020-06-10 22:56:24 -07:00
Andrey Melnikov
b8191f6b1f Merge remote-tracking branch 'origin/feat/onepanelio.core.266-is.authorized.changes' into feat/authorization.updates 2020-06-10 22:44:51 -07:00
Andrey Melnikov
5f6b995564 chore: added comments to some modified methods 2020-06-10 22:38:32 -07:00
Andrey Melnikov
beb867eb22 Merge remote-tracking branch 'origin/feat/onepanelio.core.266-is.authorized.changes' into feat/onepanelio.core.266-is.authorized.changes 2020-06-10 15:25:48 -07:00
Andrey Melnikov
cd8298b654 fix: config missing for goose 2020-06-10 15:25:34 -07:00
rushtehrani
c4d9c8b9a8 check != nil first 2020-06-10 14:34:50 -07:00
Andrey Melnikov
6e1a3729f2 fix: wrong config 2020-06-10 14:26:26 -07:00
Andrey Melnikov
483c79abb3 update: cache system config for entire application and not just per request 2020-06-10 14:19:33 -07:00
Andrey Melnikov
79d5babfcb update: IsAuthorized request to only be POST since the additional HEAD binding didn't work. Also updated the request to get data from headers if nothing is in body. 2020-06-10 10:44:33 -07:00
Aleksandr Melnikov
322265dce2 Merge pull request #339 from onepanelio/chore/release-cmd
chore: update release command
2020-06-09 11:53:49 -07:00
Aleksandr Melnikov
3079bbf0be Adding code to print the error. 2020-06-09 11:22:14 -07:00
Andrey Melnikov
78a9b845a8 Merge pull request #343 from onepanelio/refactor/correct-context-name
refactor: clean up client code
2020-06-09 10:31:34 -07:00
rushtehrani
40eb461541 update Windows installation info 2020-06-08 23:37:23 -07:00
rushtehrani
3c03bd5d6c list changelog items in asc order 2020-06-08 16:15:01 -07:00
rushtehrani
ddd529f9bf allow for all conventional commit prefixes 2020-06-08 16:05:55 -07:00
rushtehrani
4c4d01ed09 use non-string context key 2020-06-08 15:43:31 -07:00
rushtehrani
601541ebbf always use ClientContextKey 2020-06-08 15:32:21 -07:00
rushtehrani
5f6bda8838 refactor: clean up client code 2020-06-08 15:25:02 -07:00
Andrey Melnikov
c226ff8419 update: removed code specific to x-original-auth based on changes upcoming to structure.
* Auth token will always be present unless you are validating an auth token.
2020-06-08 14:44:28 -07:00
Andrey Melnikov
8cd3cc5836 update: cache system config 2020-06-08 14:03:59 -07:00
Andrey Melnikov
27203d4d7f docs: for AuthServer 2020-06-08 11:59:00 -07:00
Rush Tehrani
ecadd189a2 Create issue_label_bot.yaml 2020-06-07 12:33:05 -07:00
rushtehrani
be4ce07b7c gen-release-md structs should not be exported 2020-06-06 19:15:27 -07:00
rushtehrani
a30b46dff9 print contributor names in alphabetical order 2020-06-06 14:44:19 -07:00
rushtehrani
295a3b9484 update instructions 2020-06-06 14:33:57 -07:00
rushtehrani
c9ee8f301e handle 403 status code 2020-06-06 14:11:14 -07:00
rushtehrani
a8a97d608e update release command 2020-06-06 14:03:29 -07:00
Andrey Melnikov
77a457ae01 fix: wrong group permissions 2020-06-05 16:03:14 -07:00
Andrey Melnikov
88955d4e15 fix: issue where request data did not come through to api 2020-06-05 16:03:05 -07:00
Rush Tehrani
b68de30418 Merge pull request #321 from onepanelio/dev
chore: dev > master  (v0.10.0)
2020-06-05 13:06:29 -07:00
Rush Tehrani
facbed59bc Merge pull request #335 from onepanelio/feat/core.288-add.pytorch.tensorflow.workspace.template.migrations
feat: Adding Pytorch and Tensorflow to workflow templates, as runnable workflow executions.
2020-06-05 12:56:08 -07:00
rushtehrani
71781426e0 template name changes + comments on metrics 2020-06-05 12:55:36 -07:00
Aleksandr Melnikov
f48e749721 Adding comments. 2020-06-05 12:34:04 -07:00
Aleksandr Melnikov
56f87f39d6 Using the right archive function for workflow templates. 2020-06-05 12:07:42 -07:00
Aleksandr Melnikov
334642c091 Commenting out more slack related code. 2020-06-05 12:07:42 -07:00
Aleksandr Melnikov
4cd5e619a5 Initial code of adding templates, up and down code. 2020-06-05 12:07:42 -07:00
Aleksandr Melnikov
b3a0365447 Adding placeholder migration files. 2020-06-05 12:07:42 -07:00
Rush Tehrani
dedc295441 Update LICENSE 2020-06-04 19:50:39 -07:00
rushtehrani
07d6c1cc4b update gen-release-md command 2020-06-04 19:17:30 -07:00
Rush Tehrani
38becdd251 Merge pull request #330 from onepanelio/fix/docker.build.breaking
fix: fix docker build
2020-06-04 18:33:05 -07:00
Rush Tehrani
2108691f68 Update PULL_REQUEST_TEMPLATE.md 2020-06-04 18:26:20 -07:00
Aleksandr Melnikov
3c2786ed6d Updating paths in README under cmd dir. 2020-06-04 18:05:31 -07:00
Aleksandr Melnikov
3378899c5c Adding explanation to contributing. 2020-06-04 18:05:13 -07:00
Aleksandr Melnikov
1efd66d010 Updating path in Dockerfile. 2020-06-04 18:04:31 -07:00
Aleksandr Melnikov
4895d48e11 Moving commands into their own folders. 2020-06-04 18:04:14 -07:00
Rush Tehrani
df7ce2f752 Merge pull request #328 from onepanelio/chore/update-commands
chore: update gen-release-md command and README
2020-06-04 16:36:52 -07:00
Rush Tehrani
0262a9ec90 Update PULL_REQUEST_TEMPLATE.md 2020-06-04 16:01:17 -07:00
Rush Tehrani
c6c8e80516 Delete badge.yaml 2020-06-04 15:54:12 -07:00
rushtehrani
f20a7a2b14 fix README headings 2020-06-04 15:52:39 -07:00
rushtehrani
327c73f22a chore: update gen-release-md command and README 2020-06-04 15:47:00 -07:00
Rush Tehrani
b3e7ed5941 Merge pull request #326 from onepanelio/fix/slack-yaml
fix: Slack notify YAML indentation
2020-06-04 15:24:42 -07:00
Rush Tehrani
9381dd0a85 Update badge.yaml 2020-06-04 14:52:37 -07:00
Andrey Melnikov
e2f027dd61 update: centralized authorization logic for workspace actions into one IsAuthorized endpoint 2020-06-04 14:01:07 -07:00
Rush Tehrani
b6f7118a43 Create badge.yaml 2020-06-04 12:56:27 -07:00
Rush Tehrani
f7b941f8a0 Update PULL_REQUEST_TEMPLATE.md 2020-06-04 12:52:45 -07:00
rushtehrani
9996bfbbc3 fix: Slack notify YAML indentation 2020-06-04 11:41:46 -07:00
Aleksandr Melnikov
574301df07 Merge pull request #323 from onepanelio/fix/code.refactor
fix: Fixing function name.
2020-06-04 10:22:28 -07:00
rushtehrani
6834f660d7 fix: use correct method name 2020-06-04 10:00:56 -07:00
Aleksandr Melnikov
e8e37cd8ea Fixing function name. 2020-06-04 09:59:28 -07:00
Rush Tehrani
a47bbe949b Merge pull request #286 from onepanelio/feat/add.cvat.migration.template
feat: add cvat migration template
2020-06-04 09:51:02 -07:00
Aleksandr Melnikov
7c72a36e8b Fixing parameter to fix convention. 2020-06-04 09:12:16 -07:00
Aleksandr Melnikov
8d4989d2db Commenting more functions per codacy. 2020-06-04 09:08:37 -07:00
Aleksandr Melnikov
2de59c22cf Fixing "Id" in function name. 2020-06-04 09:05:13 -07:00
Aleksandr Melnikov
d23ce9b6a9 Documenting package migration. 2020-06-04 09:04:42 -07:00
Aleksandr Melnikov
02f3904d6a Documenting cvat migrations. 2020-06-04 08:52:21 -07:00
rushtehrani
883b7bee30 clean up migrations 2020-06-03 18:27:17 -07:00
Aleksandr Melnikov
ff7aa917f7 Removing column that does not exist. 2020-06-03 16:57:22 -07:00
Rush Tehrani
e00a54c24e Create semantic.yml 2020-06-03 16:04:19 -07:00
Aleksandr Melnikov
183296ff63 Merge pull request #312 from onepanelio/chore/gen-release-md-script
chore: generate release MD script
2020-06-03 13:31:58 -07:00
Aleksandr Melnikov
9d23b111b6 Marking goose up/down errors as fatal.
- Migrations should not go on if there is an error
2020-06-03 12:47:34 -07:00
Aleksandr Melnikov
8b26a84162 Updated ArchiveWorkspaceTemplate.
- Fixed various error message responses
- Added code to grab the WorkspaceTemplate versions
Then, code will run through these versions and grab workspaces that use
that version.
Then, code will try to Archive those workspaces (delete k8s resources,
archive database entries).
Finally, code cleans up the related WorkflowTemplate.
- Updated method docs
2020-06-03 12:46:33 -07:00
Andrey Melnikov
9d3150ccd3 Merge pull request #309 from onepanelio/fix/sys-param-priority
fix: sys param priority
2020-06-03 10:56:43 -07:00
rushtehrani
6460fefbd8 append user defined parameters after sys params 2020-06-02 22:31:52 -07:00
Rush Tehrani
7a9aa28210 Merge pull request #310 from onepanelio/feat/onepanelio.core.147-workflow.executions.template.version
feat: workflow template created at is selected when listing workflow executions
2020-06-02 19:10:36 -07:00
rushtehrani
1c085d8794 chore: Generate release MD script 2020-06-02 19:01:51 -07:00
Aleksandr Melnikov
1055b228a1 Re-arranged the code that archives the workspace template.
- This code was re-arranged to focus on archiving the k8s components
first, then the database.
- Also, workspace components are archived first,
because they rely on the workflow templates being present.
If workflow template is archived first, then the clean-up
can't resume to run again if some error is thrown.
This arrangement will ensure that if an error occurs during clean-up,
it can be re-run without throwing an error of missing prerequisite data.
- Removed an early return statement, which prevented the rest
of the clean-up
- Added extra code to not return an error if no workflow templates
are found in the database. This is to ensure k8s cleanup can continue.
2020-06-02 17:09:54 -07:00
Aleksandr Melnikov
05ad9ca2cc Added code to handle a case where there are no workspaces returned.
- This is if there are no workspaces in the database.
2020-06-02 17:06:15 -07:00
Aleksandr Melnikov
0f5d27a60d Fixing an issue with Down migrations.
- The passed in name was not converted to the UID format, so the code
could never find the relevant data.
2020-06-02 17:05:36 -07:00
Aleksandr Melnikov
1390d4d235 Updating error reporting to always return the source error.
- If extra errors, add them as text.
2020-06-02 16:18:55 -07:00
Aleksandr Melnikov
bf37713371 Migration fails silently because the insert statement lacked "uid" value. 2020-06-02 16:18:37 -07:00
Andrey Melnikov
88b20d878d update: workflow template created at is selected when listing workflow executions 2020-06-02 15:23:47 -07:00
rushtehrani
8d29cd0c5c remove extra space 2020-06-02 14:32:34 -07:00
rushtehrani
dafaadd80a fix kind 2020-06-02 14:26:10 -07:00
rushtehrani
4f036468b0 add PR template 2020-06-02 14:14:45 -07:00
Rush Tehrani
8df966fcee Create PULL_REQUEST_TEMPLATE.md 2020-06-02 14:10:45 -07:00
Andrey Melnikov
6d8ac266a3 chore: created new dev branch to phase out develop. Updated the workflow to push develop branch 2020-06-02 10:33:53 -07:00
Aleksandr Melnikov
6e9ffed843 Adding custom goose binary to dockerfile.
- This will add the goose command with the ".go" migration files.
This is needed to run goose down commands.
goose.go is needed to generate an executable.
2020-06-01 21:30:41 -07:00
Rush Tehrani
20777ed3ce Merge pull request #306 from onepanelio/feat/onepanelio.core.294-last.modified.at
update: Workflow Template now gets a modifiedAt date, and total versi…
2020-06-01 16:40:16 -07:00
Andrey Melnikov
fa68d2bef4 update: Workflow Template now gets a modifiedAt date, and total version count, from the the Get endpoint. 2020-06-01 16:09:35 -07:00
Andrey Melnikov
2726ec8d82 Merge pull request #298 from onepanelio/fix/workspace-update
fix: workspace update waits for correct success condition
2020-06-01 15:28:28 -07:00
Aleksandr Melnikov
a9df73e63a Merge pull request #281 from onepanelio/chore/fix-version
fix: version and names
2020-06-01 12:55:30 -07:00
Rush Tehrani
b8ca62efda Merge pull request #305 from onepanelio/fix/onepanelio.core.304-labels.listing.order
Fix/onepanelio.core.304 labels.listing.order
2020-06-01 12:43:57 -07:00
Andrey Melnikov
afd1b65dc5 fix: issue where labels were not sorted in any order when returned in API 2020-06-01 12:36:34 -07:00
Rush Tehrani
b7f298035d Merge pull request #303 from onepanelio/fix/onepanelio.core.296-workflow.template.count.wrong
fix: issue where workflow template count included system workflow tem…
2020-06-01 11:49:32 -07:00
Andrey Melnikov
90733b5daa fix: issue where workflow template count included system workflow templates. 2020-06-01 11:35:16 -07:00
Aleksandr Melnikov
35aef3819f Changing migrations to use ArchiveWorkspaceTemplate.
Ref: https://github.com/onepanelio/core/pull/286#discussion_r432901056
2020-06-01 10:59:47 -07:00
rushtehrani
bbe5593b52 add version flag to make api 2020-06-01 10:22:48 -07:00
rushtehrani
7911ff02cc check successCondition of statefulset at creation time as well 2020-05-31 23:27:40 -07:00
rushtehrani
f1ecb595b4 fixes workspace update success condition 2020-05-31 22:47:17 -07:00
rushtehrani
010052de3a update cvat images 2020-05-30 18:12:16 -07:00
rushtehrani
56856caa8a update name and rebase 2020-05-30 18:10:47 -07:00
Aleksandr Melnikov
3d3c9d6a66 Removing sleep command.
- Per testing, a migration error does not happen with an Azure deployment.
2020-05-30 18:05:49 -07:00
Aleksandr Melnikov
159d1819b0 Adding migration for CVAT Workspace Template. 2020-05-30 18:05:49 -07:00
Rush Tehrani
5597e14985 Merge pull request #260 from onepanelio/feature/add.jupyter.lab.to.workspace.templates
feature: added migration with jupyterlab
2020-05-30 18:03:54 -07:00
rushtehrani
7b570f861e fix db connection 2020-05-30 17:59:02 -07:00
Rush Tehrani
c6c2079226 Merge pull request #295 from onepanelio/fix/onepanelio.core.292-workspace.labels.fail
fix: issue where workspace labels did not take into account archived …
2020-05-30 15:53:31 -07:00
Andrey Melnikov
b9d5f24f37 fix: issue where workspace labels did not take into account archived ones. 2020-05-29 21:21:38 -07:00
Rush Tehrani
738d3a0050 Merge pull request #290 from onepanelio/feat/onepanelio.core.282-key.format
update: hard-coded artifacts key format with the new config.
2020-05-29 13:22:33 -07:00
Andrey Melnikov
64f6afc730 fix: replace KeyFormat placeholders with the actual value. 2020-05-29 11:43:13 -07:00
Andrey Melnikov
04bc8f2e12 update: hard-coded artifacts key format with the new config. 2020-05-29 11:27:08 -07:00
Rush Tehrani
67f4634ae0 Merge pull request #284 from onepanelio/fix/onepanelio.core.264-post.execution.workflow.optional
fix: added a default post execution workflow if there wasn't one alre…
2020-05-29 10:05:38 -07:00
Andrey Melnikov
271b1ed563 update: removed default PostExecution and only add the post execution if it exists in the setup 2020-05-28 16:53:16 -07:00
Rush Tehrani
b7c6d33c9e Merge pull request #283 from onepanelio/fix/onepanelio.core.277-sys.send.exit.status
fix: set workspaces dags to be FailFast: false so that even if anothe…
2020-05-28 16:23:55 -07:00
Andrey Melnikov
a138413c5f update: exit handler no longer depends on other exit handlers. This fixes an issue where the user's custom exit handler could crash, leaving ours not executed. 2020-05-28 16:14:16 -07:00
Andrey Melnikov
ca1c672f0d fix: added a default post execution workflow if there wasn't one already. 2020-05-28 13:26:15 -07:00
Andrey Melnikov
b41ddcdc2c fix: set workspaces dags to be FailFast: false so that even if another part of the dag fails, the sys-exit will not. 2020-05-28 12:28:51 -07:00
Andrey Melnikov
48f543b9f6 Merge pull request #280 from onepanelio/fix/onepanelio.278-list.workspace.labels
fix: added labels to list workspace method
2020-05-28 10:23:37 -07:00
Rush Tehrani
e41eb4a087 Merge pull request #269 from onepanelio/feat/core.254-workflow.counts
fix: update archive code to list all the template versions.
2020-05-28 10:17:41 -07:00
rushtehrani
73535da7fa make API 2020-05-28 10:09:08 -07:00
rushtehrani
84ddd0d0da correct API version and name 2020-05-28 10:08:25 -07:00
rushtehrani
7600f79776 update README 2020-05-28 10:08:25 -07:00
Andrey Melnikov
2164b644e6 update: removed snapshot from develop branch for GithubActions 2020-05-28 10:08:25 -07:00
Andrey Melnikov
29e1550446 fix: added labels to list workspace method 2020-05-27 22:44:39 -07:00
Aleksandr Melnikov
f2d8165016 Updating archive code to list all the template versions.
- Iterate through each version and grab the related WorkflowExecutions,
then archive them.
2020-05-26 22:09:25 -07:00
Andrey Melnikov
e8c17a04ee feature: added migration with jupyter lab 2020-05-26 10:45:56 -07:00
Rush Tehrani
cfd9bc6f43 Add badge 2020-05-25 13:38:05 -07:00
Rush Tehrani
3ee8497cac Merge pull request #258 from onepanelio/develop
dev > master
2020-05-25 13:37:08 -07:00
Rush Tehrani
58a7019b24 Merge pull request #257 from onepanelio/chore/readme-gh-actions
update README
2020-05-25 13:36:41 -07:00
rushtehrani
212f70cbb5 update README 2020-05-25 13:35:31 -07:00
Andrey Melnikov
18e2c4e411 update: removed snapshot from develop branch for GithubActions 2020-05-25 09:55:19 -07:00
Rush Tehrani
afb7af1bbe Merge pull request #253 from onepanelio/develop
dev > master
2020-05-24 15:44:34 -07:00
Rush Tehrani
9c072f5b46 Merge pull request #250 from onepanelio/fix/onepanelio.core.237-template.tables.archived.not.null
Fix/onepanelio.core.237 template.tables.archived.not.null
2020-05-24 14:31:38 -07:00
Andrey Melnikov
3403efa18c update: renamed migrations to snake case so they are consistent with others. 2020-05-24 11:55:40 -07:00
Andrey Melnikov
d53dbe1097 fix: added migration to set workflow and workspace templates is_archived column to not nullable and default false. 2020-05-24 11:55:19 -07:00
Rush Tehrani
6005f55d63 Merge pull request #247 from onepanelio/feat/update.cron.delete
fix: cron workflows now return UID and the delete endpoint doesn't ha…
2020-05-22 21:01:29 -07:00
Aleksandr Melnikov
9b1ee3fbb7 Merge pull request #248 from onepanelio/fix/wft-versions
fix wtf version display and create issue
2020-05-22 20:55:03 -07:00
rushtehrani
0a80eeede4 fix wtf version displaying and create issue 2020-05-22 20:49:51 -07:00
Andrey Melnikov
9acd4cf6d3 fix: cron workflows now return UID and the delete endpoint doesn't have the terminate suffix.
Also updated Authorized endpoint to not have same path as IsValidToken
2020-05-22 20:25:05 -07:00
Rush Tehrani
8ba2f9f6a1 Merge pull request #246 from onepanelio/fix/delete.scheduled.cron
Fixed TerminateCronWorkflow
2020-05-22 20:22:45 -07:00
Andrey Melnikov
037e735b6b Merge pull request #245 from onepanelio/fix/workspace-validation
fix workspace name validation
2020-05-22 19:55:54 -07:00
rushtehrani
076078601d only allow workspace templates to be deleted if workspace is terminated 2020-05-22 19:52:41 -07:00
rushtehrani
06ada8ff95 use uid in host 2020-05-22 19:38:58 -07:00
Aleksandr Melnikov
b712ba676a Fixed TerminateCronWorkflow
- Code will clean up any WorkflowExecutions, including those in progress.
Code then cleans up the scheduled cron workflow, archiving it in the database.
2020-05-22 19:20:31 -07:00
rushtehrani
9f00c87d9c fix workspace name validation 2020-05-22 19:07:59 -07:00
Rush Tehrani
5f697b22f9 Merge pull request #242 from onepanelio/fix/increase-uid-size
increase column size to 63 for cron workflows and workflow executions
2020-05-22 17:55:54 -07:00
rushtehrani
7ff3ad0c98 uid => name in down migration 2020-05-22 17:32:19 -07:00
rushtehrani
3ebd7ab245 increase column size to 63 for cron workflows and workflo executions 2020-05-22 17:26:58 -07:00
Andrey Melnikov
2d3f51bf27 Merge pull request #241 from onepanelio/feat/core.171-rebase.develop.3
refactored workspace template archive changes.
2020-05-22 17:17:02 -07:00
Andrey Melnikov
0eaa2b5ea2 fix: added is_archived = false to getting a workspace template, otherwise we get non-archived versions and a crash. 2020-05-22 16:44:47 -07:00
Andrey Melnikov
6bc28c4e72 fix: getting workspace template by name ignores archived ones 2020-05-22 16:27:35 -07:00
Andrey Melnikov
2bc8f684c7 refactored workspace template archive changes. 2020-05-22 16:07:50 -07:00
Rush Tehrani
b57ffe8f71 Merge pull request #226 from onepanelio/feat/core.171-archiving.workflow.template.clean.up
Feat/core.171 archiving.workflow.template.clean.up
2020-05-22 16:01:41 -07:00
rushtehrani
617806011c move getCronWorkflowColumns to types.go 2020-05-22 16:01:17 -07:00
Aleksandr Melnikov
e405ccdf04 Removing unused functions. 2020-05-22 15:57:00 -07:00
Aleksandr Melnikov
cd4f429559 Merge branch 'develop' into feat/core.171-archiving.workflow.template.clean.up 2020-05-22 15:44:01 -07:00
Aleksandr Melnikov
f555584fc8 Per https://github.com/onepanelio/core/pull/226/files#r429475185
This method ended up being equal to the one mentioned.
2020-05-22 15:42:25 -07:00
Aleksandr Melnikov
f4743d3790 Making method not public.
Per https://github.com/onepanelio/core/pull/226#discussion_r429473764
2020-05-22 15:35:26 -07:00
Aleksandr Melnikov
7ec544550b Refactored per https://github.com/onepanelio/core/pull/226#discussion_r428964039. 2020-05-22 15:28:59 -07:00
Aleksandr Melnikov
472c50b9d7 Fixing update statement.
- sq has an issue with placeholders.
2020-05-22 15:22:32 -07:00
Aleksandr Melnikov
bd38568e6b Fixing "is_archived" not being set on insert, which had unintentional
consequences for displaying data in UI.
2020-05-22 15:22:14 -07:00
Aleksandr Melnikov
b94aaa8778 Refactoring
- Adding a helper method
https://github.com/onepanelio/core/pull/226#discussion_r428965941
2020-05-22 14:49:01 -07:00
Aleksandr Melnikov
a2521e90f2 Refactoring workflow template archive code.
- Some notes from https://github.com/onepanelio/core/pull/226#discussion_r428964510
Removing archiveWorkflowTemplate, replacing with direct db code.
- Abstraction doesn't help much
Removing DeleteWorkflowTemplateK8S
- Similarly, this abstraction doesn't help. Using direct code
where method was used.
2020-05-22 14:39:39 -07:00
Aleksandr Melnikov
4cdef38325 Refactoring CronWorkflow pkg
- Terminate function will focus on deleting data
- Archive will delete k8s but archive db data
Removing DB and K8s specific methods
- Per code guidelines, these do not add anything by abstracting them away.
2020-05-22 14:30:30 -07:00
Aleksandr Melnikov
16b3f37b1d Refactoring per feedback.
- https://github.com/onepanelio/core/pull/226#discussion_r429046881
Removing helper methods that are not saving code.
- This also fixes k8s / db methods that were exposed from the package.
Instead, using an ArchiveWorkflowExecution function to achieve
the same functionality.
2020-05-22 13:44:00 -07:00
Aleksandr Melnikov
375ef146f3 Removing unused function.
- Referenced: https://github.com/onepanelio/core/pull/226#discussion_r429026779
2020-05-22 12:53:40 -07:00
Aleksandr Melnikov
b91a82ece8 Refactored is_archived columns to be not null, default false.
Fixed the migration down.
2020-05-22 12:43:33 -07:00
Aleksandr Melnikov
bc1236fef3 Updated cron workflow and workflow execution select queries.
- Exclude "is_archived" rows.
2020-05-22 11:59:43 -07:00
Aleksandr Melnikov
d4fbd71d55 Updating workflow execution selection to not return archived executions. 2020-05-21 22:37:50 -07:00
Aleksandr Melnikov
123e8830bf Moving the workflow template clean-up to the end.
- This way, if some part of the process fails, it can be re-run again
for testing.
2020-05-21 22:33:34 -07:00
Aleksandr Melnikov
e8c28175f5 Fixing queries not executing. 2020-05-21 22:33:12 -07:00
Aleksandr Melnikov
860dc7398c Updating function names per feedback. 2020-05-21 22:20:00 -07:00
Aleksandr Melnikov
1a9ce9870d Refactoring DB queries related to archiving.
- Using Squirrel RunWith instead of ToSql.
2020-05-21 22:19:26 -07:00
Rush Tehrani
d273037954 Merge pull request #236 from onepanelio/fix/onepanelio.core.234-workflow.details.issues
Fix/onepanelio.core.234 workflow.details.issues
2020-05-21 16:07:28 -07:00
Andrey Melnikov
6d494a9643 update: added omitempty to json serialization of Parameters so they don't show empty values in the DB parameters. 2020-05-21 15:24:54 -07:00
Aleksandr Melnikov
e6d30407c9 Adding "is_archived" column to cron workflows and workflow executions. 2020-05-21 15:20:08 -07:00
Andrey Melnikov
ea5d4d56fb update: Updated GetWorkflowExecution request to also get information for the workflow template, since we query for it anyway. 2020-05-21 15:13:26 -07:00
Aleksandr Melnikov
92b3b2ae23 Adding index to cron workflows
- uid and namespace
2020-05-21 14:55:52 -07:00
Aleksandr Melnikov
92b9aba0d1 Adding namespace to cron workflow related code. 2020-05-21 12:47:42 -07:00
Aleksandr Melnikov
eed930c7f6 Adding namespace to Cron Workflow.
- Proto files
2020-05-21 12:45:10 -07:00
Aleksandr Melnikov
eb13274243 Added migration to add namespace column to cron workflows
#CORE-227
2020-05-21 12:19:30 -07:00
Rush Tehrani
a15e9fb3d3 Merge pull request #231 from onepanelio/feat/no-compression
feat: don't compress artifacts by default
2020-05-21 10:38:46 -07:00
rushtehrani
79aa54c0c1 don't compress artifacts by default 2020-05-21 08:35:13 -07:00
Aleksandr Melnikov
68ffbb1d93 Refactoring raw SQL to use squirrel. 2020-05-20 15:53:12 -07:00
Aleksandr Melnikov
b79cfa019f Added code to clean up Workflow Executions.
- Removes db and k8s entries.
2020-05-20 14:59:01 -07:00
Aleksandr Melnikov
819f48efde Added code to clean up CronWorkflows when a template is archived.
- Code iterates through all the related CronWorkflows
Deletes their workflowExecutions from k8s and db
Deletes the CronWorkflow from k8s and db
2020-05-20 14:28:05 -07:00
Aleksandr Melnikov
381fba4c8f Refactoring TerminateCronWorkflow into separate methods.
- Need these methods for archiving
2020-05-20 14:18:59 -07:00
Andrey Melnikov
1daca92c3e Merge pull request #215 from onepanelio/feat/archive.workspace.templates
Feat/archive.workspace.templates
2020-05-20 13:36:01 -07:00
Aleksandr Melnikov
81566969c7 Merge pull request #223 from onepanelio/feat/ns-scoped-artifact-config
feat: ns scoped artifact config
2020-05-20 13:32:19 -07:00
Rush Tehrani
af98871c0f Merge pull request #220 from onepanelio/fix/crashing.workflow.execution.watch
fix: fixed an issue where workflow watch crashed and closed web…
2020-05-20 13:30:36 -07:00
Andrey Melnikov
60e85c76e5 Merge pull request #224 from onepanelio/feat/core.214.errors
fix: added more detailed error message for 409 workspace template to …
2020-05-20 12:30:31 -07:00
Andrey Melnikov
d4f849073c fix: added more detailed error message for 409 workspace template to distinguish between archived workspace taking the name, or another template.
Also changed IsArchived to be a bool type instead of string for workspace template type, as that's what it is in the database.
2020-05-20 12:29:28 -07:00
rushtehrani
6d0260a623 get artifactRepository config separately 2020-05-20 12:15:53 -07:00
Aleksandr Melnikov
37350f78fb Added DeleteWorkflowTemplate function. 2020-05-20 12:01:14 -07:00
Andrey Melnikov
f3deea797b update: reworked watching workflow execution to keep watching until the workflow is done or failed. 2020-05-20 11:23:03 -07:00
Aleksandr Melnikov
adf117d56b Adding notes about utils and pkg directories. 2020-05-20 09:50:50 -07:00
Andrey Melnikov
dc1972a808 fix: (WIP) fixed an issue where workflow watch crashed and closed websocket, despite the workflow still running. 2020-05-19 20:59:05 -07:00
rushtehrani
609f24fcb2 update documentation 2020-05-19 18:03:58 -07:00
rushtehrani
933e1fa6fd add json tags for proper marshalling 2020-05-19 17:53:58 -07:00
rushtehrani
a7d075e7c7 use correct http method 2020-05-19 17:40:22 -07:00
rushtehrani
2df35cb27e add workflow status webhook 2020-05-19 17:33:02 -07:00
Aleksandr Melnikov
a46864a38f Ran into a case where the index being created already exists.
- Minor formatting
2020-05-19 15:13:53 -07:00
Aleksandr Melnikov
0aced56569 Added checking for existence of constraints.
- Since this is run on start-up and not in production, we're fine
2020-05-19 15:13:27 -07:00
rushtehrani
227d9c0d4e move functions to respective types 2020-05-19 14:57:41 -07:00
Andrey Melnikov
e0096f9be6 documentation: for ArchiveWorkspaceTemplate 2020-05-19 13:57:44 -07:00
Andrey Melnikov
4f8a92c7a4 fix: added case where a workspace is terminating - a workspace can be archived if all of it's workspaces are terminating. 2020-05-19 13:54:01 -07:00
Andrey Melnikov
21baabd634 update: check if workspace template has running workspaces before archiving it. 2020-05-19 13:47:38 -07:00
rushtehrani
260dd334f6 update api + remove unused import 2020-05-19 12:57:37 -07:00
Andrey Melnikov
9deee0cc8c Merge pull request #213 from onepanelio/feat/resource-env-vars
feat: resource env vars
2020-05-19 12:43:55 -07:00
rushtehrani
8540bb82b7 add comment to function + named return value 2020-05-19 12:40:22 -07:00
rushtehrani
ac8c622769 remove length check since range will not iterate on 0 length slices 2020-05-19 12:31:15 -07:00
Rush Tehrani
e75170d468 Merge pull request #205 from onepanelio/fix/labels
fix: remove label uid and fix migration
2020-05-19 11:38:48 -07:00
Andrey Melnikov
2c9dbf52b3 feature: Added ArchiveWorkspaceTemplate endpoint.
update: listing workspace templates ignores archived ones now.
2020-05-19 11:27:19 -07:00
rushtehrani
679d7e50b5 add resource env vars 2020-05-18 22:10:44 -07:00
rushtehrani
3f5108121b remove unused methods 2020-05-18 21:43:02 -07:00
rushtehrani
8ddab20769 append artifact repository to outputs as well if only key is provided 2020-05-18 19:49:18 -07:00
Andrey Melnikov
afda5003e7 fix: issue where workspace labels were not persisting on creation 2020-05-18 19:19:16 -07:00
Rush Tehrani
ac229239fa Merge pull request #210 from onepanelio/feat/core.208-expose.isauthorized
Feat/core.208 expose.isauthorized
2020-05-18 18:20:45 -07:00
rushtehrani
7c5f79ac60 add conditional uq index 2020-05-18 17:21:37 -07:00
Aleksandr Melnikov
abea64f05f Merge pull request #209 from onepanelio/feat/input-artifacts-config
feat: update namespace config structure
2020-05-18 16:53:51 -07:00
Andrey Melnikov
72fbff18cd fix: issue where workflow template labels did not work 2020-05-18 16:38:17 -07:00
rushtehrani
674c4f81e5 inject default artifact repository 2020-05-18 15:48:38 -07:00
Aleksandr Melnikov
e2d286356f Updating isAuthorized function name to isValidToken
- Simplified the returned values to just err.
- Updating related code
2020-05-18 14:17:38 -07:00
Aleksandr Melnikov
8f94318944 Renaming err2. 2020-05-18 14:03:58 -07:00
Aleksandr Melnikov
e0cca02a3a Added IsAuthorized function to AuthServer
- Put a helper function into isAuthorized.
2020-05-18 13:49:31 -07:00
Aleksandr Melnikov
2b67724e35 Adding IsAuthorized endpoint. 2020-05-18 13:49:27 -07:00
Andrey Melnikov
66760c5f44 fix: issue where labels were not editable for workspaces. 2020-05-18 13:09:02 -07:00
Andrey Melnikov
756010958d fix: GetWorkflowExecution now gets the same columns as List.
Also minor cleanup with method calls.
2020-05-18 12:47:04 -07:00
rushtehrani
cf7d52bb19 namespace config updates 2020-05-18 12:34:05 -07:00
Andrey Melnikov
14af381877 fix: issue where cloning a workflow by uid didn't work. 2020-05-17 14:03:23 -07:00
Andrey Melnikov
f8d7ec73ba fix: deleting labels and getting labels for workflow execution
* Fixed issue where ReplaceLabels did not work when no labels were passed in (a delete essentially)
* Updated workflow execution to also get the labels
* Removed unusued GetResourceIdBuilder method.
2020-05-17 13:25:08 -07:00
Andrey Melnikov
b9ccacc2ea fix: issue where workspace template labels were not working. 2020-05-16 17:37:47 -07:00
Aleksandr Melnikov
a19ae1c1c3 Merge pull request #206 from onepanelio/fix/cron
fix: cron workflow execution
2020-05-15 15:26:40 -07:00
rushtehrani
094503174c remove uid from workspace_template_versions 2020-05-15 13:41:56 -07:00
rushtehrani
1eb25e1b67 fix migrations 2020-05-15 13:27:02 -07:00
rushtehrani
fb09fb621d fix migrations 2020-05-15 13:11:04 -07:00
Andrey Melnikov
feeb42a038 fix: workflow_execution returns a pointer to workflow with get method, so type cast needs to reflect this. 2020-05-15 12:38:13 -07:00
rushtehrani
655bb3c15f don't generate UUID 2020-05-15 12:31:19 -07:00
rushtehrani
96a969fbdb remove label uid and fix migration 2020-05-15 11:25:45 -07:00
Rush Tehrani
84c19a231c Merge pull request #204 from onepanelio/feature/workspace.adjustments
Feature/workspace.adjustments
2020-05-14 20:45:04 -07:00
Rush Tehrani
c075719165 Merge pull request #201 from onepanelio/feat/combined
uid + env var changes
2020-05-14 20:41:15 -07:00
Andrey Melnikov
bad6fe47ec comment: added a comment explaining why we get templateParameters for workspace 2020-05-14 20:37:57 -07:00
rushtehrani
662f353512 update WorkflowExecutionStatisticReport struct 2020-05-14 20:19:20 -07:00
Andrey Melnikov
1595594dc8 fix: added back function that went missing. 2020-05-14 19:18:55 -07:00
rushtehrani
7eac879f40 gen with 3.11.4 version of protoc 2020-05-14 17:20:13 -07:00
Aleksandr Melnikov
56314a0850 Updating pb files. 2020-05-14 17:13:57 -07:00
Aleksandr Melnikov
62c8f5dcb2 Adding support for terminated workflow executions.
- When terminating, adding started_at and finished_at timestamps
Updated workflow_template.proto to return the count of terminated executions.
- Updating supporting code
2020-05-14 17:13:44 -07:00
Andrey Melnikov
21099b7627 update: Added template parameters to a workspace.
This is so we can get the options from a workflow template version, since the parameters for a workspace do not store options.
2020-05-14 16:45:48 -07:00
rushtehrani
61704062ba fix template version update uid 2020-05-14 15:57:44 -07:00
rushtehrani
f530a7fac2 fix workflowTemplate and version uid 2020-05-14 15:46:58 -07:00
Aleksandr Melnikov
076917278b Consolidated UID generation for WorkflowTemplate and WorkspaceTemplate 2020-05-14 15:04:49 -07:00
Aleksandr Melnikov
6a27719167 Updating TerminateWorkflowExecution to not remove the DB workflow entry.
- This keeps the Workflow in the UI list.
2020-05-14 13:47:10 -07:00
Andrey Melnikov
c9438a344b revert: undid storing the options as those can be obtained from the workflow template version. 2020-05-14 11:27:17 -07:00
Andrey Melnikov
9723f5685a update: store workspace parameter options in db 2020-05-14 11:19:55 -07:00
rushtehrani
195a332281 remove unused code 2020-05-14 10:45:38 -07:00
rushtehrani
4aeee1f2ac update api gen 2020-05-14 10:34:04 -07:00
Aleksandr Melnikov
9e48c3b406 Updating name generated to use onepanel uid generation. 2020-05-14 10:31:33 -07:00
Aleksandr Melnikov
3c0a138642 Adding development notes on how to develop core with minikube.
- Added disclaimer about minikube and driver VMWare.
2020-05-14 10:31:33 -07:00
Aleksandr Melnikov
fc10444656 Updating name to uid in cron_workflow and related code. 2020-05-14 10:31:33 -07:00
Aleksandr Melnikov
20151d5108 Adding generated proto files. 2020-05-14 10:31:33 -07:00
Aleksandr Melnikov
bcc72e2567 Changing name to uid for cron_workflow proto requests. 2020-05-14 10:31:33 -07:00
Aleksandr Melnikov
735b10c025 Refactored name to uid. 2020-05-14 10:31:33 -07:00
Aleksandr Melnikov
460b7c0604 Putting UID back as part of the WorkflowExecution response. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
a400d64c81 Revert "Removing uid parameter from WorkflowExecution message."
This reverts commit d9e6c3195a3990dd363b79d9e834a220d6cf499d.

Per discussion, name is okay to return as part of the response.
- It will not be set by user for workflows
2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
c414673b13 Adding generated pb.go files. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
70e38c99c9 Removing uid parameter from WorkflowExecution message. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
b41c2ea848 Changed name to uid for CloneWorkflowExecution.
- Added supporting changes
2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
c1ce0ad17b Changed name to uid for WatchWorkflowExecution. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
2048b7a4eb Using Onepanel UID generator. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
d308761f27 Changed name to uid for GetWorkflowExecution. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
8f257ca73e Removing UID as a value returned by the API request.
- This value is not managed by the user in the UI
- It may impact the UI code, to be determined
2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
452bbfe258 Changing "name" into "uid" for Workflow Execution paths.
- WIP, updates to Core API code remaining.
2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
4ad388e892 Adding import. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
b89a31323d Fixing error message.
- This is specific to us because of how we combine uid and namespace to create the subdomain.
2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
18a795f129 Using GenerateUID to clean up the names. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
184bb1247d Removing sys-uid appending.
- Workflow generates the name on creation. We're continuing to use
workflow.name.
2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
5e86a0e2aa Removing unused namespace parameter. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
2daa821cfb Removing label.WorkflowUid from label, for workflow execution. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
4bf928531a Fixing method name to fit go convention, per feedback. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
f437c9f0f9 Renaming function name per feedback.
- This is a onepanel uid.
2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
c7bd017725 Fixing error information. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
1420248489 Removing un-used function. 2020-05-14 10:29:55 -07:00
Aleksandr Melnikov
998d6bcca4 Removing injected "sys-uid" since we're injecting it before createWorkflow is called. 2020-05-14 10:29:08 -07:00
Aleksandr Melnikov
f7d20e9d54 Exiting loop once param found. 2020-05-14 10:27:15 -07:00
Aleksandr Melnikov
263f963a4c Using parameters instead of labels. 2020-05-14 10:27:15 -07:00
Aleksandr Melnikov
6111abd740 Adding sys-uid to CreateWorkflowExecution.
- Appending if it does not exist
2020-05-14 10:27:15 -07:00
Aleksandr Melnikov
2a88ff8234 Changing length check. 2020-05-14 10:27:15 -07:00
Aleksandr Melnikov
68e7b6b10f Refactoring uid and namespace to be a maximum length of 30.
- 60 altogether
The reason is we use <uid>--<ns>.<domain> for workspace urls.
- The maximum length for the subdomain is 63, per k8s restriction.
These changes will result in a subdomain max of 62 (including the --).
2020-05-14 10:27:15 -07:00
Aleksandr Melnikov
6ce6991156 Changing uid varchar length. 2020-05-14 10:27:15 -07:00
Aleksandr Melnikov
55db5f2708 Adding util function to generate k8s compatible uids (to be used
for k8s name).
2020-05-14 10:27:15 -07:00
Aleksandr Melnikov
963dd9adcc Refactoring migrations.
- uid is now 63 chars long, to fit k8s requirement
- Updating unique indices to use uid and namespace
2020-05-14 10:27:15 -07:00
rushtehrani
e5f5b8d183 fix typo 2020-05-14 01:05:49 -07:00
rushtehrani
c121116b9d move envfrom to util 2020-05-14 00:33:46 -07:00
rushtehrani
dd9e64ccf6 fix envvar mount issue 2020-05-13 23:35:30 -07:00
rushtehrani
5fe29d5f58 add precedence to env vars 2020-05-13 23:05:09 -07:00
rushtehrani
3edbc809de use EnvFrom for mounting env vars in workflows 2020-05-13 21:53:33 -07:00
rushtehrani
fd3dcdec9c fix constant name 2020-05-13 21:34:07 -07:00
rushtehrani
c7caeeb70a add env var to workspace 2020-05-13 21:30:52 -07:00
Rush Tehrani
089a49f8c3 Merge pull request #199 from onepanelio/feature/workspace.adjustments
fix: workspace count did not exclude terminated workspaces.
2020-05-13 12:55:37 -07:00
Andrey Melnikov
b5e5cbf2c6 fix: workspace count did not exclude terminated workspaces. 2020-05-13 12:38:52 -07:00
Andrey Melnikov
e2bc242657 Merge pull request #198 from onepanelio/feat/workspaces
feat: workspace updates
2020-05-13 11:48:52 -07:00
rushtehrani
23a70de39b exclude terminated workspaces from list 2020-05-12 19:54:51 -07:00
rushtehrani
dac2029969 update workspace params 2020-05-12 19:41:32 -07:00
rushtehrani
356459a011 started => launching 2020-05-12 18:17:37 -07:00
Rush Tehrani
a92cd13ffb Merge pull request #197 from onepanelio/feat/url.updates
Feat/url.updates
2020-05-12 16:41:49 -07:00
rushtehrani
7ef68ade48 workspace update 2020-05-12 16:04:35 -07:00
Andrey Melnikov
1c48a9a954 update: Get Workspace to use column select methods.
This adds in workspace template name among other columns.
2020-05-12 15:55:38 -07:00
Andrey Melnikov
99a5d24279 fix: issue where paginationw was not being applied to workspace template query 2020-05-12 10:46:57 -07:00
Andrey Melnikov
5621477465 update: updated logic to get protocol for workspaces to be based off onepanel api url 2020-05-12 10:35:20 -07:00
Rush Tehrani
7772a20482 Merge pull request #196 from onepanelio/feature/workspace.path
fix: issue where url was not selected for workspaces.
2020-05-11 19:16:11 -07:00
Andrey Melnikov
5fdaf16c47 fix: issue where url was not selected for workspaces. 2020-05-11 19:07:31 -07:00
Rush Tehrani
b1559ddf23 Merge pull request #195 from onepanelio/feature/workspace.path
feature: added path for workspaces
2020-05-11 18:51:45 -07:00
Andrey Melnikov
799330b50a fix: typo for inserting workspaces 2020-05-11 18:07:55 -07:00
Andrey Melnikov
4d4d5a23b1 update: rename path -> url 2020-05-11 17:52:20 -07:00
Andrey Melnikov
d11a2c8aa5 fix: added http prefix for path. We automatically redirect to https, so that should handle that case. 2020-05-11 16:56:48 -07:00
Andrey Melnikov
effd641bc7 feature: added path for workspaces 2020-05-11 16:48:48 -07:00
Andrey Melnikov
9e2f065d5d Merge pull request #194 from onepanelio/fix/circular-assignment
remove circular assignment
2020-05-11 16:42:17 -07:00
rushtehrani
43e3a1a97b remove circular assignment 2020-05-11 16:40:44 -07:00
Andrey Melnikov
4be301eb46 fix: sys-host was not being changed with mapping values. 2020-05-11 15:25:39 -07:00
Rush Tehrani
e85561a651 Merge pull request #193 from onepanelio/feature/workspace.api.updates
Feature/workspace.api.updates
2020-05-11 14:15:50 -07:00
Rush Tehrani
35bca23f4d Merge pull request #192 from onepanelio/feat/workspaces
feat: workspace update using uid + curl node with retries
2020-05-11 14:15:24 -07:00
Andrey Melnikov
1f9d68c382 Merge branch 'feat/simplify.create.workflow.execution' into feature/workspace.api.updates 2020-05-11 13:45:09 -07:00
Andrey Melnikov
9600794c38 update: List Workspaces request to include the workspace template information. 2020-05-11 12:18:31 -07:00
rushtehrani
6c785ed2a6 add is_system to workflow_templates for sys workflows 2020-05-10 20:42:33 -07:00
rushtehrani
1a387f6c72 get the correct version of workspace template 2020-05-10 13:30:20 -07:00
rushtehrani
1b4e16a168 update is_latest when a new workspace template version is added 2020-05-09 20:37:43 -07:00
rushtehrani
90804b77be change update workspace to use uid 2020-05-09 20:26:24 -07:00
Rush Tehrani
b4fc0b024e Merge pull request #191 from onepanelio/feat/simplify.create.workflow.execution
Feat/simplify.create.workflow.execution
2020-05-09 19:11:49 -07:00
Andrey Melnikov
9b8d3e83a9 update: swagger with recent workspace status changes. 2020-05-09 19:08:08 -07:00
rushtehrani
572a20a308 add retries to curl command 2020-05-09 18:52:01 -07:00
Andrey Melnikov
3a9e84c4a5 update: select columns for workspace status. 2020-05-09 18:31:26 -07:00
Andrey Melnikov
d611a8ca0c update: removed fields from workspace that are already in status. 2020-05-09 18:05:08 -07:00
Andrey Melnikov
df7c38de32 update: injectParameters to detect existing parameters by name and override them. 2020-05-08 20:47:50 -07:00
Andrey Melnikov
4543d381ce fix: verb for getting a workspace create -> get 2020-05-08 20:41:16 -07:00
Andrey Melnikov
383e915fa3 update: added labels and workspace type 2020-05-08 20:38:41 -07:00
Andrey Melnikov
5fc913fa7a Merge branch 'feat/simplify.create.workflow.execution' of github.com:onepanelio/core into feat/simplify.create.workflow.execution 2020-05-08 20:38:07 -07:00
Andrey Melnikov
1b30721a05 update: api definition and more fields for workspace. 2020-05-08 20:33:13 -07:00
Andrey Melnikov
8bfbf561a5 update: api definition and more fields for workspace. 2020-05-08 20:16:13 -07:00
Rush Tehrani
2aca938df8 Merge pull request #190 from onepanelio/feat/workspaces
feat: additional workspace fixes and actions
2020-05-08 18:45:12 -07:00
rushtehrani
14c6c6b8a7 resume workspace 2020-05-08 18:43:22 -07:00
rushtehrani
f472b9263e fix issue with workspace creation 2020-05-08 17:57:42 -07:00
Rush Tehrani
a0196f433f Merge pull request #189 from onepanelio/feat/workspaces
feat: use uid in workspaces
2020-05-08 16:21:33 -07:00
rushtehrani
cc7cd1201b check for existing workspace on creation 2020-05-08 16:21:00 -07:00
rushtehrani
de9947defa change namespace and uid to 30 characters each 2020-05-08 15:53:30 -07:00
rushtehrani
841c3bc635 use sys-uid instead of sys-name 2020-05-08 15:10:30 -07:00
rushtehrani
5659975fb9 generate UID based on name 2020-05-08 14:26:10 -07:00
Rush Tehrani
61763f7eaf Merge pull request #188 from onepanelio/feature/simplify.workflow.executions
update: Workflow Execution body into a separate message
2020-05-08 14:25:05 -07:00
Andrey Melnikov
e339e698d0 update: Workflow Execution body into a separate message 2020-05-08 13:25:58 -07:00
Rush Tehrani
79d02f2b5c Merge pull request #185 from onepanelio/feature/simplify.workflow.executions
update: simplified create workflow execution
2020-05-08 13:12:24 -07:00
Rush Tehrani
e7483535f8 Merge pull request #187 from onepanelio/revert-183-feat/simplify.create.workflow.execution
Revert "update: simplified request for creating a workflow execution."
2020-05-08 13:11:37 -07:00
Rush Tehrani
3a8e170e73 Revert "update: simplified request for creating a workflow execution." 2020-05-08 13:11:13 -07:00
Rush Tehrani
828315ef94 Merge pull request #183 from onepanelio/feat/simplify.create.workflow.execution
update: simplified request for creating a workflow execution.
2020-05-08 13:05:40 -07:00
Andrey Melnikov
6e9105a742 update: simplified create workflow execution 2020-05-08 11:21:39 -07:00
Andrey Melnikov
97f9b78efa update: workspaces with labels and simplified use of parameters. 2020-05-08 11:02:42 -07:00
Andrey Melnikov
af6b053147 update: removed inner body from create workflow request. 2020-05-08 09:38:16 -07:00
Rush Tehrani
1480a8da8c Merge pull request #184 from onepanelio/feat/core.124-add.envoy.filter
feat: add envoy filter
2020-05-07 16:32:40 -07:00
Andrey Melnikov
5859da5520 update: simplified request for creating a workflow execution. 2020-05-07 13:36:16 -07:00
366 changed files with 52294 additions and 13930 deletions

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**`opctl` version**
```bash
$ opctl version
CLI version: v0.16.0-rc.0
Manifest version: v0.16.0-rc.0
API version: v0.16.0-rc.0
Web UI version: v0.16.0-rc.0
```
**`opctl init` command**
You can find this at the top of your `params.yaml` file. [e.g. `opctl init --provider eks --artifact-repository-provider s3 --gpu-device-plugins nvidia`]
**Kubernetes information**
- Cloud provider: [e.g. AKS, EKS, GKE, Microk8s]
- Kubernetes version: [e.g. 1.17.13]
**Machine information**
- OS: [e.g. Ubuntu 18.04, Windows 10 19042.631, macOS 10.14.6]
- Browser: [e.g. Chrome, Firefox, Safari]
**Screenshots**
If applicable, add screenshots to help explain your problem.

View File

@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

27
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,27 @@
<!-- Thanks for sending a pull request! Here are some tips for you:
1. Please read our contributor guidelines: https://docs.onepanel.ai/docs/getting-started/contributing
2. Prefix the title of this PR with `feat:`, `fix:`, `docs:` or `chore:`, example: `feat: added great feature`
3. If this PR is a feature or enhancement, then create an issue (https://github.com/onepanelio/core/issues) first.
-->
**What this PR does**:
**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes onepanelio/core#<issue-number>`
-->
Fixes onepanelio/core#
**Special notes for your reviewer**:
**Checklist**
Please check if applies
- [ ] I have added/updated relevant unit tests
- [ ] I have added/updated relevant documentation
Required
- [ ] I accept to release these changes under the Apache 2.0 License

4
.github/issue_label_bot.yaml vendored Normal file
View File

@@ -0,0 +1,4 @@
label-alias:
bug: 'kind/bug'
feature_request: 'kind/enhancement'
question: 'kind/question'

1
.github/semantic.yml vendored Normal file
View File

@@ -0,0 +1 @@
titleOnly: true

View File

@@ -1,39 +0,0 @@
name: Bump version and create tag
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Bump version and push tag
id: version_bump
uses: anothrNick/github-tag-action@1.17.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: 'minor'
- name: Alias New tag to VERSION
run: echo "::set-env name=VERSION::${{ steps.version_bump.outputs.new_tag }}"
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: onepanel/core
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
buildargs: VERSION
tags: ${{ steps.version_bump.outputs.new_tag }}, latest
- name: Set Slack Message
run: echo "::set-env name=SLACK_MESSAGE::Version $VERSION. Docker Tag onepanel/core:$VERSION"
- name: Notify Slack Channels
uses: rtCamp/action-slack-notify@v2.0.0
env:
SLACK_CHANNEL: dev
SLACK_ICON: https://avatars1.githubusercontent.com/u/30390575?s=48&v=4
SLACK_TITLE: New Core Version
SLACK_USERNAME: opBot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

42
.github/workflows/push_dev_branch.yaml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Publish dev docker image
on:
push:
paths-ignore:
- LICENSE
- ".github/**"
- "*.md"
branches:
- master
jobs:
test-code-job:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12.3
env:
POSTGRES_DB: onepanel
POSTGRES_USER: admin
POSTGRES_PASSWORD: tester
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@master
- name: Run testing code
uses: cedrickring/golang-action@1.5.2
with:
args: go test github.com/onepanelio/core/pkg -db=postgres
build:
needs: test-code-job
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: onepanel/core
tags: "latest"
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

View File

@@ -1,17 +0,0 @@
name: Publish develop docker image
on:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: onepanel/core
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
snapshot: true

29
.github/workflows/push_tag.yaml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Publish docker image on tag push
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: little-core-labs/get-git-tag@v3.0.1
id: tagName
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: onepanel/core
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
tags: "${{ env.GIT_TAG_NAME }}"
- name: Notify Slack Channels
uses: rtCamp/action-slack-notify@v2.1.1
env:
SLACK_CHANNEL: org
SLACK_ICON: https://avatars1.githubusercontent.com/u/30390575?s=48&v=4
SLACK_TITLE: New Core Version
SLACK_USERNAME: opBot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true
SLACK_MESSAGE: "${{ env.GIT_TAG_NAME }}\nDocker Tag: onepanel/core:${{ env.GIT_TAG_NAME }}"

View File

@@ -1,5 +1,29 @@
## Database migrations
### Docker
Note: Up migrations are automatically executed when the application is run.
#### Linux / Mac
```bash
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose -dir db/sql create <name> sql # Create migration in db/sql folder
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 goose help # See all available commands
```
#### Windows
```bash
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose -dir db/sql create wow sql # Create migration in db/sql folder
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 goose help # See all available commands
```
### Local
Install `goose`:
```bash
go get -u github.com/pressly/goose/cmd/goose
@@ -8,20 +32,22 @@ go get -u github.com/pressly/goose/cmd/goose
Note: Up migrations are automatically executed when the application is run.
```bash
goose -dir db create <name> sql # Create migration in db folder
goose -dir db/sql create <name> sql # Create migration in db/sql folder
goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available
goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1
goose help # See all available commands
```
## gRPC installation
## gRPC
### local installation
Install gRPC:
```bash
go get -u google.golang.org/grpc
```
Download pre-compiled binaries for your platform(protoc-<version>-<platform>.zip) from here: https://github.com/google/protobuf/releases
Download pre-compiled binaries for your platform (protoc-<version>-<platform>.zip) from here: https://github.com/google/protobuf/releases
On macOS or Linux:
@@ -47,7 +73,80 @@ Make sure that your `$GOBIN` is in your `$PATH`.
## API code generation
### Docker
Generate Go and Swagger APIs
#### Linux / Mac
```bash
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 make api-internal version=1.0.0
```
#### Windows
```bash
docker run --rm --mount type=bind,source="%CD%",target=/root onepanel/helper:v1.0.0 make api-internal version=1.0.0
```
### Local Installation
Generate Go and Swagger APIs:
```bash
make api
make api-internal version=1.0.0
```
## Code Structure & Organization
### `utils` dir
```shell script
utils/*.go
```
Utils are intended to stand-alone.
- They do not track state
- They are meant to mutate metadata
Do not add onepanel specific code in here.
- Such as "Client"
```shell script
pkg/*.go
```
Code here has to be package friendly.
- Meaning, you can pull the code out into it's own package as needed
That's why you see
```shell script
workspace_template.go
workspace_template_test.go
workspace_template_types.go
```
These can be pulled out into their own package or into a new v2 directory if needed.
You can add
- kubernetes specific operations
- database specific operations
- types
### `cmd` dir
Each source file here is assumed to result in an executable.
- Hence the `package main` at the top of each
Place each source file into it's own folder.
Example source file name: `flush_cache.go`
- Dir structure: `cmd/flush-cache/flush_cache.go`
To avoid errors like this during docker build
```text
# github.com/onepanelio/core/cmd
cmd/goose.go:22:6: main redeclared in this block
previous declaration at cmd/gen-release-md.go:136:6
github.com/onepanelio/core
```
Caused by
```dockerfile
RUN go install -v ./...
```

View File

@@ -1,15 +1,18 @@
FROM golang:1.13.10 AS builder
FROM golang:1.15.5 AS builder
WORKDIR /go/src
COPY . .
RUN go get -d -v ./...
RUN go install -v ./...
RUN go get -u github.com/pressly/goose/cmd/goose
RUN go build -o /go/bin/goose ./cmd/goose/goose.go
FROM golang:1.13.10
FROM golang:1.15.5
COPY --from=builder /go/bin/core .
COPY --from=builder /go/src/db ./db
COPY --from=builder /go/bin/goose .
COPY --from=builder /go/src/manifest ./manifest
EXPOSE 8888
EXPOSE 8887

View File

@@ -1,3 +1,5 @@
Copyright 2020 Onepanel, Inc. All rights reserved.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

View File

@@ -1,22 +1,44 @@
COMMIT_HASH=$(shell git rev-parse --short HEAD)
.PHONY: init
init:
ifndef version
$(error version is undefined)
endif
jq:
cat api/apidocs.swagger.json \
| jq 'walk( if type == "object" then with_entries( .key |= sub( "api\\."; "") ) else . end )' \
| jq 'walk( if type == "string" then gsub( "api\\."; "") else . end )' \
| jq '.info.version = "$(version)"' \
> api/api.swagger.json
rm api/apidocs.swagger.json
protoc:
protoc -I/usr/local/include \
-Iapi/third_party/ \
-Iapi/ \
api/*.proto \
--go_out=plugins=grpc:api \
--grpc-gateway_out=logtostderr=true,allow_delete_body=true:api \
--swagger_out=allow_merge=true,fqn_for_swagger_name=true,allow_delete_body=true,logtostderr=true,simple_operation_ids=true:api
-Iapi/proto \
--go_out ./api/gen --go_opt paths=source_relative \
--go-grpc_out ./api/gen --go-grpc_opt paths=source_relative \
--go-grpc_opt paths=source_relative \
--grpc-gateway_out ./api/gen \
--grpc-gateway_opt logtostderr=true \
--grpc-gateway_opt allow_delete_body=true \
--grpc-gateway_opt paths=source_relative \
--grpc-gateway_opt generate_unbound_methods=true \
--openapiv2_out ./api \
--openapiv2_opt allow_merge=true \
--openapiv2_opt fqn_for_openapi_name=true \
--openapiv2_opt allow_delete_body=true \
--openapiv2_opt logtostderr=true \
--openapiv2_opt simple_operation_ids=true \
api/proto/*.proto
api: protoc jq
api-internal: init protoc jq
api: init
docker run --rm --mount type=bind,source="${PWD}",target=/root onepanel/helper:v1.0.0 make api-internal version=$(version)
docker-build:
docker build -t onepanel-core .
@@ -25,4 +47,14 @@ docker-build:
docker-push:
docker push onepanel/core:$(COMMIT_HASH)
docker-custom:
docker build -t onepanel-core .
docker tag onepanel-core:latest onepanel/core:$(TAG)
docker push onepanel/core:$(TAG)
docker: docker-build docker-push
run-tests:
docker run --rm --name test-onepanel-postgres -p 5432:5432 -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=tester -e POSTGRES_DB=onepanel -d postgres:12.3
go test github.com/onepanelio/core/pkg -count=1 ||:
docker stop test-onepanel-postgres

View File

@@ -1,10 +1,39 @@
# Onepanel
<img width="200px" src="img/logo.png">
Welcome to Onepanel! This is the main repository for the API and also where you can submit bugs and enhancement requests.
![build](https://img.shields.io/github/workflow/status/onepanelio/onepanel/Publish%20dev%20docker%20image/master?color=01579b)
![code](https://img.shields.io/codacy/grade/d060fc4d1ac64b85b78f85c691ead86a?color=01579b)
[![release](https://img.shields.io/github/v/release/onepanelio/core?color=01579b)](https://github.com/onepanelio/core/releases)
[![sdk](https://img.shields.io/pypi/v/onepanel-sdk?color=01579b&label=sdk)](https://pypi.org/project/onepanel-sdk/)
[![docs](https://img.shields.io/github/v/release/onepanelio/core?color=01579b&label=docs)](https://docs.onepanel.io)
[![issues](https://img.shields.io/github/issues-raw/onepanelio/core?color=01579b&label=issues)](https://github.com/onepanelio/core/issues)
[![lfai](https://img.shields.io/badge/link-LFAI-01579b)](https://landscape.lfai.foundation/?selected=onepanel)
[![license](https://img.shields.io/github/license/onepanelio/core?color=01579b)](https://opensource.org/licenses/Apache-2.0)
## Getting started
See our [deployment guide](https://onepanelio.github.io/core-docs/docs/deployment/overview) to get started.
## End-to-end computer vision platform
Label, build, train, tune, deploy and automate in a unified platform that runs on any cloud and on-premises.
https://user-images.githubusercontent.com/1211823/116489376-afc60000-a849-11eb-8e8b-b0c64c07c144.mp4
## Why Onepanel?
<img width="100%" src="img/features.png">
## Quick start
See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started.
## Community
To submit a feature request, report a bug or documentation issue, please open a GitHub [pull request](https://github.com/onepanelio/core/pulls) or [issue](https://github.com/onepanelio/core/issues).
## Contributing
Onepanel is modular and consists of [multiple repositories](https://docs.onepanel.ai/docs/getting-started/contributing/#project-repositories).
See our [contribution guide](https://onepanelio.github.io/core-docs/docs/getting-started/contributing) to get started.
See [contribution guide](https://docs.onepanel.ai/docs/getting-started/contributing) and `CONTRIBUTING.md` in each repository for additional contribution guidelines.
## Acknowledgments
Onepanel seamlessly integrates the following open source projects under the hood:
[Argo](https://github.com/argoproj/argo-workflows) | [Couler](https://github.com/couler-proj/couler) | [CVAT](https://github.com/opencv/cvat) | [JupyterLab](https://github.com/jupyterlab/jupyterlab) | [NNI](https://github.com/microsoft/nni)
We are grateful for the support these communities provide and do our best to contribute back as much as possible.
## License
Onepanel is licensed under [Apache 2.0](https://github.com/onepanelio/core/blob/master/LICENSE).

View File

@@ -1,86 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// source: api.proto
package api
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_api_proto protoreflect.FileDescriptor
var file_api_proto_rawDesc = []byte{
0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69,
0x1a, 0x2c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x73, 0x77, 0x61,
0x67, 0x67, 0x65, 0x72, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e,
0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x8b,
0x02, 0x92, 0x41, 0x87, 0x02, 0x12, 0x74, 0x0a, 0x0d, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65,
0x6c, 0x20, 0x43, 0x6f, 0x72, 0x65, 0x12, 0x19, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c,
0x20, 0x43, 0x6f, 0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x41, 0x50,
0x49, 0x22, 0x3b, 0x0a, 0x15, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x20, 0x43, 0x6f,
0x72, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x68, 0x74, 0x74, 0x70,
0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x32, 0x0b,
0x31, 0x2e, 0x30, 0x2e, 0x30, 0x2d, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x0e, 0x6c, 0x6f, 0x63,
0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x3a, 0x38, 0x38, 0x38, 0x38, 0x2a, 0x02, 0x01, 0x02, 0x32,
0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f,
0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a,
0x73, 0x6f, 0x6e, 0x5a, 0x49, 0x0a, 0x47, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12,
0x3d, 0x08, 0x02, 0x12, 0x28, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69,
0x78, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x1a, 0x0d, 0x61,
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c,
0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var file_api_proto_goTypes = []interface{}{}
var file_api_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_api_proto_init() }
func file_api_proto_init() {
if File_api_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_api_proto_goTypes,
DependencyIndexes: file_api_proto_depIdxs,
}.Build()
File_api_proto = out.File
file_api_proto_rawDesc = nil
file_api_proto_goTypes = nil
file_api_proto_depIdxs = nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,516 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// source: auth.proto
package api
import (
context "context"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type TokenWrapper struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *TokenWrapper) Reset() {
*x = TokenWrapper{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TokenWrapper) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TokenWrapper) ProtoMessage() {}
func (x *TokenWrapper) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TokenWrapper.ProtoReflect.Descriptor instead.
func (*TokenWrapper) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{0}
}
func (x *TokenWrapper) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type IsValidTokenRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Token *TokenWrapper `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *IsValidTokenRequest) Reset() {
*x = IsValidTokenRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsValidTokenRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenRequest) ProtoMessage() {}
func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsValidTokenRequest.ProtoReflect.Descriptor instead.
func (*IsValidTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{1}
}
func (x *IsValidTokenRequest) GetToken() *TokenWrapper {
if x != nil {
return x.Token
}
return nil
}
type IsValidTokenResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
}
func (x *IsValidTokenResponse) Reset() {
*x = IsValidTokenResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsValidTokenResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenResponse) ProtoMessage() {}
func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsValidTokenResponse.ProtoReflect.Descriptor instead.
func (*IsValidTokenResponse) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{2}
}
func (x *IsValidTokenResponse) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
type IsWorkspaceAuthenticatedRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
FQDN string `protobuf:"bytes,1,opt,name=FQDN,proto3" json:"FQDN,omitempty"`
XOriginalMethod string `protobuf:"bytes,2,opt,name=XOriginalMethod,proto3" json:"XOriginalMethod,omitempty"`
XOriginalAuthority string `protobuf:"bytes,3,opt,name=XOriginalAuthority,proto3" json:"XOriginalAuthority,omitempty"`
XOriginalUri string `protobuf:"bytes,4,opt,name=XOriginalUri,proto3" json:"XOriginalUri,omitempty"`
}
func (x *IsWorkspaceAuthenticatedRequest) Reset() {
*x = IsWorkspaceAuthenticatedRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsWorkspaceAuthenticatedRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsWorkspaceAuthenticatedRequest) ProtoMessage() {}
func (x *IsWorkspaceAuthenticatedRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsWorkspaceAuthenticatedRequest.ProtoReflect.Descriptor instead.
func (*IsWorkspaceAuthenticatedRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{3}
}
func (x *IsWorkspaceAuthenticatedRequest) GetFQDN() string {
if x != nil {
return x.FQDN
}
return ""
}
func (x *IsWorkspaceAuthenticatedRequest) GetXOriginalMethod() string {
if x != nil {
return x.XOriginalMethod
}
return ""
}
func (x *IsWorkspaceAuthenticatedRequest) GetXOriginalAuthority() string {
if x != nil {
return x.XOriginalAuthority
}
return ""
}
func (x *IsWorkspaceAuthenticatedRequest) GetXOriginalUri() string {
if x != nil {
return x.XOriginalUri
}
return ""
}
var File_auth_proto protoreflect.FileDescriptor
var file_auth_proto_rawDesc = []byte{
0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70,
0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x24, 0x0a, 0x0c,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05,
0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x22, 0x3e, 0x0a, 0x13, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x52, 0x05, 0x74, 0x6f, 0x6b,
0x65, 0x6e, 0x22, 0x2e, 0x0a, 0x14, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b,
0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f,
0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61,
0x69, 0x6e, 0x22, 0xb3, 0x01, 0x0a, 0x1f, 0x49, 0x73, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x46, 0x51, 0x44, 0x4e, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x46, 0x51, 0x44, 0x4e, 0x12, 0x28, 0x0a, 0x0f, 0x58, 0x4f,
0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0f, 0x58, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x4d, 0x65,
0x74, 0x68, 0x6f, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x58, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
0x6c, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x12, 0x58, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x41, 0x75, 0x74, 0x68, 0x6f,
0x72, 0x69, 0x74, 0x79, 0x12, 0x22, 0x0a, 0x0c, 0x58, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61,
0x6c, 0x55, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x58, 0x4f, 0x72, 0x69,
0x67, 0x69, 0x6e, 0x61, 0x6c, 0x55, 0x72, 0x69, 0x32, 0x80, 0x02, 0x0a, 0x0b, 0x41, 0x75, 0x74,
0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0c, 0x49, 0x73, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49,
0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82,
0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62,
0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a,
0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x82, 0x01, 0x0a, 0x18, 0x49, 0x73, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61,
0x74, 0x65, 0x64, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x57, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74,
0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x42, 0x20, 0x0a, 0x04, 0x48, 0x45, 0x41,
0x44, 0x12, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_auth_proto_rawDescOnce sync.Once
file_auth_proto_rawDescData = file_auth_proto_rawDesc
)
func file_auth_proto_rawDescGZIP() []byte {
file_auth_proto_rawDescOnce.Do(func() {
file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData)
})
return file_auth_proto_rawDescData
}
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_auth_proto_goTypes = []interface{}{
(*TokenWrapper)(nil), // 0: api.TokenWrapper
(*IsValidTokenRequest)(nil), // 1: api.IsValidTokenRequest
(*IsValidTokenResponse)(nil), // 2: api.IsValidTokenResponse
(*IsWorkspaceAuthenticatedRequest)(nil), // 3: api.IsWorkspaceAuthenticatedRequest
(*empty.Empty)(nil), // 4: google.protobuf.Empty
}
var file_auth_proto_depIdxs = []int32{
0, // 0: api.IsValidTokenRequest.token:type_name -> api.TokenWrapper
1, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest
3, // 2: api.AuthService.IsWorkspaceAuthenticated:input_type -> api.IsWorkspaceAuthenticatedRequest
2, // 3: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse
4, // 4: api.AuthService.IsWorkspaceAuthenticated:output_type -> google.protobuf.Empty
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_auth_proto_init() }
func file_auth_proto_init() {
if File_auth_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TokenWrapper); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsValidTokenRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsValidTokenResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsWorkspaceAuthenticatedRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_auth_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_auth_proto_goTypes,
DependencyIndexes: file_auth_proto_depIdxs,
MessageInfos: file_auth_proto_msgTypes,
}.Build()
File_auth_proto = out.File
file_auth_proto_rawDesc = nil
file_auth_proto_goTypes = nil
file_auth_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// AuthServiceClient is the client API for AuthService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AuthServiceClient interface {
IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error)
IsWorkspaceAuthenticated(ctx context.Context, in *IsWorkspaceAuthenticatedRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type authServiceClient struct {
cc grpc.ClientConnInterface
}
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
return &authServiceClient{cc}
}
func (c *authServiceClient) IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error) {
out := new(IsValidTokenResponse)
err := c.cc.Invoke(ctx, "/api.AuthService/IsValidToken", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *authServiceClient) IsWorkspaceAuthenticated(ctx context.Context, in *IsWorkspaceAuthenticatedRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/api.AuthService/IsWorkspaceAuthenticated", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AuthServiceServer is the server API for AuthService service.
type AuthServiceServer interface {
IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error)
IsWorkspaceAuthenticated(context.Context, *IsWorkspaceAuthenticatedRequest) (*empty.Empty, error)
}
// UnimplementedAuthServiceServer can be embedded to have forward compatible implementations.
type UnimplementedAuthServiceServer struct {
}
func (*UnimplementedAuthServiceServer) IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsValidToken not implemented")
}
func (*UnimplementedAuthServiceServer) IsWorkspaceAuthenticated(context.Context, *IsWorkspaceAuthenticatedRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsWorkspaceAuthenticated not implemented")
}
func RegisterAuthServiceServer(s *grpc.Server, srv AuthServiceServer) {
s.RegisterService(&_AuthService_serviceDesc, srv)
}
func _AuthService_IsValidToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsValidTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).IsValidToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.AuthService/IsValidToken",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).IsValidToken(ctx, req.(*IsValidTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AuthService_IsWorkspaceAuthenticated_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsWorkspaceAuthenticatedRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).IsWorkspaceAuthenticated(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.AuthService/IsWorkspaceAuthenticated",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).IsWorkspaceAuthenticated(ctx, req.(*IsWorkspaceAuthenticatedRequest))
}
return interceptor(ctx, in, info, handler)
}
var _AuthService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.AuthService",
HandlerType: (*AuthServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "IsValidToken",
Handler: _AuthService_IsValidToken_Handler,
},
{
MethodName: "IsWorkspaceAuthenticated",
Handler: _AuthService_IsWorkspaceAuthenticated_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "auth.proto",
}

View File

@@ -1,240 +0,0 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: auth.proto
/*
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package api
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/status"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
func request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsValidTokenRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Token); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.IsValidToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsValidTokenRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Token); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.IsValidToken(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_AuthService_IsWorkspaceAuthenticated_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
)
func request_AuthService_IsWorkspaceAuthenticated_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsWorkspaceAuthenticatedRequest
var metadata runtime.ServerMetadata
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AuthService_IsWorkspaceAuthenticated_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.IsWorkspaceAuthenticated(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AuthService_IsWorkspaceAuthenticated_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsWorkspaceAuthenticatedRequest
var metadata runtime.ServerMetadata
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_AuthService_IsWorkspaceAuthenticated_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.IsWorkspaceAuthenticated(ctx, &protoReq)
return msg, metadata, err
}
// RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux".
// UnaryRPC :call AuthServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error {
mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AuthService_IsValidToken_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("HEAD", pattern_AuthService_IsWorkspaceAuthenticated_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AuthService_IsWorkspaceAuthenticated_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsWorkspaceAuthenticated_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterAuthServiceHandler(ctx, mux, conn)
}
// RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterAuthServiceHandlerClient(ctx, mux, NewAuthServiceClient(conn))
}
// RegisterAuthServiceHandlerClient registers the http handlers for service AuthService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "AuthServiceClient" to call the correct interceptors.
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error {
mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AuthService_IsValidToken_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("HEAD", pattern_AuthService_IsWorkspaceAuthenticated_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AuthService_IsWorkspaceAuthenticated_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsWorkspaceAuthenticated_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_AuthService_IsValidToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "token"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_AuthService_IsWorkspaceAuthenticated_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "token"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
forward_AuthService_IsValidToken_0 = runtime.ForwardResponseMessage
forward_AuthService_IsWorkspaceAuthenticated_0 = runtime.ForwardResponseMessage
)

View File

@@ -1,43 +0,0 @@
syntax = "proto3";
package api;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
service AuthService {
rpc IsValidToken(IsValidTokenRequest) returns (IsValidTokenResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/auth/token"
body: "token"
};
}
rpc IsWorkspaceAuthenticated(IsWorkspaceAuthenticatedRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
custom: {
kind: "HEAD"
path: "/apis/v1beta1/auth/token"
}
};
}
}
message TokenWrapper {
string token = 1;
}
message IsValidTokenRequest {
TokenWrapper token = 1;
}
message IsValidTokenResponse {
string domain = 2;
}
message IsWorkspaceAuthenticatedRequest {
string FQDN = 1;
string XOriginalMethod = 2;
string XOriginalAuthority = 3;
string XOriginalUri = 4;
}

View File

@@ -1,19 +0,0 @@
syntax = "proto3";
package api;
message Parameter {
string name = 1;
string value = 2;
string type = 3;
string displayName = 4;
string hint = 5;
bool required = 6;
repeated ParameterOption options = 7;
}
message ParameterOption {
string name = 1;
string value = 2;
}

View File

@@ -1,986 +0,0 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// source: cron_workflow.proto
package api
import (
context "context"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type CronWorkflow struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Manifest string `protobuf:"bytes,2,opt,name=manifest,proto3" json:"manifest,omitempty"`
WorkflowExecution *WorkflowExecution `protobuf:"bytes,3,opt,name=workflowExecution,proto3" json:"workflowExecution,omitempty"`
Labels []*KeyValue `protobuf:"bytes,4,rep,name=labels,proto3" json:"labels,omitempty"`
}
func (x *CronWorkflow) Reset() {
*x = CronWorkflow{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CronWorkflow) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CronWorkflow) ProtoMessage() {}
func (x *CronWorkflow) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CronWorkflow.ProtoReflect.Descriptor instead.
func (*CronWorkflow) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{0}
}
func (x *CronWorkflow) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CronWorkflow) GetManifest() string {
if x != nil {
return x.Manifest
}
return ""
}
func (x *CronWorkflow) GetWorkflowExecution() *WorkflowExecution {
if x != nil {
return x.WorkflowExecution
}
return nil
}
func (x *CronWorkflow) GetLabels() []*KeyValue {
if x != nil {
return x.Labels
}
return nil
}
type CreateCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
CronWorkflow *CronWorkflow `protobuf:"bytes,2,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"`
}
func (x *CreateCronWorkflowRequest) Reset() {
*x = CreateCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateCronWorkflowRequest) ProtoMessage() {}
func (x *CreateCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*CreateCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{1}
}
func (x *CreateCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *CreateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow {
if x != nil {
return x.CronWorkflow
}
return nil
}
type GetCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetCronWorkflowRequest) Reset() {
*x = GetCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetCronWorkflowRequest) ProtoMessage() {}
func (x *GetCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*GetCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{2}
}
func (x *GetCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *GetCronWorkflowRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type UpdateCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
CronWorkflow *CronWorkflow `protobuf:"bytes,3,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"`
}
func (x *UpdateCronWorkflowRequest) Reset() {
*x = UpdateCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateCronWorkflowRequest) ProtoMessage() {}
func (x *UpdateCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*UpdateCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *UpdateCronWorkflowRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UpdateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow {
if x != nil {
return x.CronWorkflow
}
return nil
}
type TerminateCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *TerminateCronWorkflowRequest) Reset() {
*x = TerminateCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TerminateCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TerminateCronWorkflowRequest) ProtoMessage() {}
func (x *TerminateCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TerminateCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*TerminateCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{4}
}
func (x *TerminateCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *TerminateCronWorkflowRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type ListCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
WorkflowTemplateName string `protobuf:"bytes,2,opt,name=workflow_template_name,json=workflowTemplateName,proto3" json:"workflow_template_name,omitempty"`
PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
}
func (x *ListCronWorkflowRequest) Reset() {
*x = ListCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListCronWorkflowRequest) ProtoMessage() {}
func (x *ListCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*ListCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{5}
}
func (x *ListCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *ListCronWorkflowRequest) GetWorkflowTemplateName() string {
if x != nil {
return x.WorkflowTemplateName
}
return ""
}
func (x *ListCronWorkflowRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListCronWorkflowRequest) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
type ListCronWorkflowsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
CronWorkflows []*CronWorkflow `protobuf:"bytes,2,rep,name=cronWorkflows,proto3" json:"cronWorkflows,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"`
TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
}
func (x *ListCronWorkflowsResponse) Reset() {
*x = ListCronWorkflowsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListCronWorkflowsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListCronWorkflowsResponse) ProtoMessage() {}
func (x *ListCronWorkflowsResponse) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListCronWorkflowsResponse.ProtoReflect.Descriptor instead.
func (*ListCronWorkflowsResponse) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{6}
}
func (x *ListCronWorkflowsResponse) GetCount() int32 {
if x != nil {
return x.Count
}
return 0
}
func (x *ListCronWorkflowsResponse) GetCronWorkflows() []*CronWorkflow {
if x != nil {
return x.CronWorkflows
}
return nil
}
func (x *ListCronWorkflowsResponse) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *ListCronWorkflowsResponse) GetPages() int32 {
if x != nil {
return x.Pages
}
return 0
}
func (x *ListCronWorkflowsResponse) GetTotalCount() int32 {
if x != nil {
return x.TotalCount
}
return 0
}
var File_cron_workflow_proto protoreflect.FileDescriptor
var file_cron_workflow_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66,
0x65, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66,
0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x22, 0x70, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a,
0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x63,
0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x22, 0x4a, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x84,
0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35,
0x0a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x03,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x50, 0x0a, 0x1c, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74,
0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x12, 0x34, 0x0a, 0x16, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65,
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c,
0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74,
0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0d, 0x63,
0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65,
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e,
0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0x8c,
0x06, 0x0a, 0x13, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22, 0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12,
0x8d, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64,
0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f,
0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x3e, 0x1a, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f,
0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
0x7d, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12,
0x79, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x61, 0x70, 0x69,
0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0xc8, 0x01, 0x0a, 0x11, 0x4c,
0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73,
0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x75,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6f, 0x12, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73,
0x5a, 0x43, 0x12, 0x41, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72,
0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x77, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e,
0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12,
0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x43,
0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x3b, 0x2a, 0x39, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72,
0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x6e, 0x61,
0x6d, 0x65, 0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_cron_workflow_proto_rawDescOnce sync.Once
file_cron_workflow_proto_rawDescData = file_cron_workflow_proto_rawDesc
)
func file_cron_workflow_proto_rawDescGZIP() []byte {
file_cron_workflow_proto_rawDescOnce.Do(func() {
file_cron_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_cron_workflow_proto_rawDescData)
})
return file_cron_workflow_proto_rawDescData
}
var file_cron_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_cron_workflow_proto_goTypes = []interface{}{
(*CronWorkflow)(nil), // 0: api.CronWorkflow
(*CreateCronWorkflowRequest)(nil), // 1: api.CreateCronWorkflowRequest
(*GetCronWorkflowRequest)(nil), // 2: api.GetCronWorkflowRequest
(*UpdateCronWorkflowRequest)(nil), // 3: api.UpdateCronWorkflowRequest
(*TerminateCronWorkflowRequest)(nil), // 4: api.TerminateCronWorkflowRequest
(*ListCronWorkflowRequest)(nil), // 5: api.ListCronWorkflowRequest
(*ListCronWorkflowsResponse)(nil), // 6: api.ListCronWorkflowsResponse
(*WorkflowExecution)(nil), // 7: api.WorkflowExecution
(*KeyValue)(nil), // 8: api.KeyValue
(*empty.Empty)(nil), // 9: google.protobuf.Empty
}
var file_cron_workflow_proto_depIdxs = []int32{
7, // 0: api.CronWorkflow.workflowExecution:type_name -> api.WorkflowExecution
8, // 1: api.CronWorkflow.labels:type_name -> api.KeyValue
0, // 2: api.CreateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow
0, // 3: api.UpdateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow
0, // 4: api.ListCronWorkflowsResponse.cronWorkflows:type_name -> api.CronWorkflow
1, // 5: api.CronWorkflowService.CreateCronWorkflow:input_type -> api.CreateCronWorkflowRequest
3, // 6: api.CronWorkflowService.UpdateCronWorkflow:input_type -> api.UpdateCronWorkflowRequest
2, // 7: api.CronWorkflowService.GetCronWorkflow:input_type -> api.GetCronWorkflowRequest
5, // 8: api.CronWorkflowService.ListCronWorkflows:input_type -> api.ListCronWorkflowRequest
4, // 9: api.CronWorkflowService.TerminateCronWorkflow:input_type -> api.TerminateCronWorkflowRequest
0, // 10: api.CronWorkflowService.CreateCronWorkflow:output_type -> api.CronWorkflow
0, // 11: api.CronWorkflowService.UpdateCronWorkflow:output_type -> api.CronWorkflow
0, // 12: api.CronWorkflowService.GetCronWorkflow:output_type -> api.CronWorkflow
6, // 13: api.CronWorkflowService.ListCronWorkflows:output_type -> api.ListCronWorkflowsResponse
9, // 14: api.CronWorkflowService.TerminateCronWorkflow:output_type -> google.protobuf.Empty
10, // [10:15] is the sub-list for method output_type
5, // [5:10] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_cron_workflow_proto_init() }
func file_cron_workflow_proto_init() {
if File_cron_workflow_proto != nil {
return
}
file_workflow_proto_init()
file_label_proto_init()
if !protoimpl.UnsafeEnabled {
file_cron_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CronWorkflow); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TerminateCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListCronWorkflowsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cron_workflow_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_cron_workflow_proto_goTypes,
DependencyIndexes: file_cron_workflow_proto_depIdxs,
MessageInfos: file_cron_workflow_proto_msgTypes,
}.Build()
File_cron_workflow_proto = out.File
file_cron_workflow_proto_rawDesc = nil
file_cron_workflow_proto_goTypes = nil
file_cron_workflow_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// CronWorkflowServiceClient is the client API for CronWorkflowService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CronWorkflowServiceClient interface {
CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error)
UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error)
GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error)
ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error)
TerminateCronWorkflow(ctx context.Context, in *TerminateCronWorkflowRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type cronWorkflowServiceClient struct {
cc grpc.ClientConnInterface
}
func NewCronWorkflowServiceClient(cc grpc.ClientConnInterface) CronWorkflowServiceClient {
return &cronWorkflowServiceClient{cc}
}
func (c *cronWorkflowServiceClient) CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) {
out := new(CronWorkflow)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/CreateCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) {
out := new(CronWorkflow)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/UpdateCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) {
out := new(CronWorkflow)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/GetCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error) {
out := new(ListCronWorkflowsResponse)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/ListCronWorkflows", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) TerminateCronWorkflow(ctx context.Context, in *TerminateCronWorkflowRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/TerminateCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CronWorkflowServiceServer is the server API for CronWorkflowService service.
type CronWorkflowServiceServer interface {
CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error)
UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error)
GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error)
ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error)
TerminateCronWorkflow(context.Context, *TerminateCronWorkflowRequest) (*empty.Empty, error)
}
// UnimplementedCronWorkflowServiceServer can be embedded to have forward compatible implementations.
type UnimplementedCronWorkflowServiceServer struct {
}
func (*UnimplementedCronWorkflowServiceServer) CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCronWorkflow not implemented")
}
func (*UnimplementedCronWorkflowServiceServer) UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCronWorkflow not implemented")
}
func (*UnimplementedCronWorkflowServiceServer) GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCronWorkflow not implemented")
}
func (*UnimplementedCronWorkflowServiceServer) ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCronWorkflows not implemented")
}
func (*UnimplementedCronWorkflowServiceServer) TerminateCronWorkflow(context.Context, *TerminateCronWorkflowRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method TerminateCronWorkflow not implemented")
}
func RegisterCronWorkflowServiceServer(s *grpc.Server, srv CronWorkflowServiceServer) {
s.RegisterService(&_CronWorkflowService_serviceDesc, srv)
}
func _CronWorkflowService_CreateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/CreateCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, req.(*CreateCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_UpdateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/UpdateCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, req.(*UpdateCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_GetCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/GetCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, req.(*GetCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_ListCronWorkflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/ListCronWorkflows",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, req.(*ListCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_TerminateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TerminateCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).TerminateCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/TerminateCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).TerminateCronWorkflow(ctx, req.(*TerminateCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CronWorkflowService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.CronWorkflowService",
HandlerType: (*CronWorkflowServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateCronWorkflow",
Handler: _CronWorkflowService_CreateCronWorkflow_Handler,
},
{
MethodName: "UpdateCronWorkflow",
Handler: _CronWorkflowService_UpdateCronWorkflow_Handler,
},
{
MethodName: "GetCronWorkflow",
Handler: _CronWorkflowService_GetCronWorkflow_Handler,
},
{
MethodName: "ListCronWorkflows",
Handler: _CronWorkflowService_ListCronWorkflows_Handler,
},
{
MethodName: "TerminateCronWorkflow",
Handler: _CronWorkflowService_TerminateCronWorkflow_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cron_workflow.proto",
}

88
api/gen/api.pb.go Normal file
View File

@@ -0,0 +1,88 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: api.proto
package gen
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
var File_api_proto protoreflect.FileDescriptor
var file_api_proto_rawDesc = []byte{
0x0a, 0x09, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69,
0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65,
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x42, 0xad, 0x02, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x92, 0x41, 0x85, 0x02, 0x12, 0x58, 0x0a, 0x08, 0x4f,
0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x12, 0x0c, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65,
0x6c, 0x20, 0x41, 0x50, 0x49, 0x22, 0x36, 0x0a, 0x10, 0x4f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65,
0x6c, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x22, 0x68, 0x74, 0x74, 0x70, 0x73,
0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x32, 0x06, 0x30,
0x2e, 0x31, 0x30, 0x2e, 0x30, 0x1a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74,
0x3a, 0x38, 0x38, 0x38, 0x38, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70,
0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x18, 0x61,
0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6f, 0x63, 0x74, 0x65, 0x74,
0x2d, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5a, 0x49, 0x0a, 0x47, 0x0a, 0x06, 0x42, 0x65, 0x61,
0x72, 0x65, 0x72, 0x12, 0x3d, 0x08, 0x02, 0x12, 0x28, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70,
0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65,
0x72, 0x1a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_api_proto_goTypes = []interface{}{}
var file_api_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_api_proto_init() }
func file_api_proto_init() {
if File_api_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_api_proto_goTypes,
DependencyIndexes: file_api_proto_depIdxs,
}.Build()
File_api_proto = out.File
file_api_proto_rawDesc = nil
file_api_proto_goTypes = nil
file_api_proto_depIdxs = nil
}

662
api/gen/auth.pb.go Normal file
View File

@@ -0,0 +1,662 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: auth.proto
package gen
import (
proto "github.com/golang/protobuf/proto"
_ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type IsValidTokenRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *IsValidTokenRequest) Reset() {
*x = IsValidTokenRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsValidTokenRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenRequest) ProtoMessage() {}
func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsValidTokenRequest.ProtoReflect.Descriptor instead.
func (*IsValidTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{0}
}
func (x *IsValidTokenRequest) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *IsValidTokenRequest) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type IsValidTokenResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
}
func (x *IsValidTokenResponse) Reset() {
*x = IsValidTokenResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsValidTokenResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsValidTokenResponse) ProtoMessage() {}
func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsValidTokenResponse.ProtoReflect.Descriptor instead.
func (*IsValidTokenResponse) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{1}
}
func (x *IsValidTokenResponse) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *IsValidTokenResponse) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
func (x *IsValidTokenResponse) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
type IsAuthorized struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Verb string `protobuf:"bytes,2,opt,name=verb,proto3" json:"verb,omitempty"`
Group string `protobuf:"bytes,3,opt,name=group,proto3" json:"group,omitempty"`
Resource string `protobuf:"bytes,4,opt,name=resource,proto3" json:"resource,omitempty"`
ResourceName string `protobuf:"bytes,5,opt,name=resourceName,proto3" json:"resourceName,omitempty"`
}
func (x *IsAuthorized) Reset() {
*x = IsAuthorized{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsAuthorized) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsAuthorized) ProtoMessage() {}
func (x *IsAuthorized) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsAuthorized.ProtoReflect.Descriptor instead.
func (*IsAuthorized) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{2}
}
func (x *IsAuthorized) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *IsAuthorized) GetVerb() string {
if x != nil {
return x.Verb
}
return ""
}
func (x *IsAuthorized) GetGroup() string {
if x != nil {
return x.Group
}
return ""
}
func (x *IsAuthorized) GetResource() string {
if x != nil {
return x.Resource
}
return ""
}
func (x *IsAuthorized) GetResourceName() string {
if x != nil {
return x.ResourceName
}
return ""
}
type IsAuthorizedRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
IsAuthorized *IsAuthorized `protobuf:"bytes,1,opt,name=isAuthorized,proto3" json:"isAuthorized,omitempty"`
}
func (x *IsAuthorizedRequest) Reset() {
*x = IsAuthorizedRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsAuthorizedRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsAuthorizedRequest) ProtoMessage() {}
func (x *IsAuthorizedRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsAuthorizedRequest.ProtoReflect.Descriptor instead.
func (*IsAuthorizedRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{3}
}
func (x *IsAuthorizedRequest) GetIsAuthorized() *IsAuthorized {
if x != nil {
return x.IsAuthorized
}
return nil
}
type IsAuthorizedResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
}
func (x *IsAuthorizedResponse) Reset() {
*x = IsAuthorizedResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IsAuthorizedResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IsAuthorizedResponse) ProtoMessage() {}
func (x *IsAuthorizedResponse) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IsAuthorizedResponse.ProtoReflect.Descriptor instead.
func (*IsAuthorizedResponse) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{4}
}
func (x *IsAuthorizedResponse) GetAuthorized() bool {
if x != nil {
return x.Authorized
}
return false
}
type GetAccessTokenRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
}
func (x *GetAccessTokenRequest) Reset() {
*x = GetAccessTokenRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAccessTokenRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAccessTokenRequest) ProtoMessage() {}
func (x *GetAccessTokenRequest) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetAccessTokenRequest.ProtoReflect.Descriptor instead.
func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{5}
}
func (x *GetAccessTokenRequest) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
func (x *GetAccessTokenRequest) GetToken() string {
if x != nil {
return x.Token
}
return ""
}
type GetAccessTokenResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
AccessToken string `protobuf:"bytes,2,opt,name=accessToken,proto3" json:"accessToken,omitempty"`
Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"`
}
func (x *GetAccessTokenResponse) Reset() {
*x = GetAccessTokenResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_auth_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAccessTokenResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAccessTokenResponse) ProtoMessage() {}
func (x *GetAccessTokenResponse) ProtoReflect() protoreflect.Message {
mi := &file_auth_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetAccessTokenResponse.ProtoReflect.Descriptor instead.
func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) {
return file_auth_proto_rawDescGZIP(), []int{6}
}
func (x *GetAccessTokenResponse) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *GetAccessTokenResponse) GetAccessToken() string {
if x != nil {
return x.AccessToken
}
return ""
}
func (x *GetAccessTokenResponse) GetUsername() string {
if x != nil {
return x.Username
}
return ""
}
var File_auth_proto protoreflect.FileDescriptor
var file_auth_proto_rawDesc = []byte{
0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70,
0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e,
0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x47, 0x0a, 0x13, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x60, 0x0a, 0x14, 0x49, 0x73, 0x56, 0x61,
0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65,
0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a,
0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0c, 0x49,
0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x65, 0x72,
0x62, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x76, 0x65, 0x72, 0x62, 0x12, 0x14, 0x0a,
0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72,
0x6f, 0x75, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
0x22, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4e,
0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a, 0x13, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x35, 0x0a, 0x0c, 0x69, 0x73,
0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
0x7a, 0x65, 0x64, 0x52, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
0x64, 0x22, 0x36, 0x0a, 0x14, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74,
0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61,
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x15, 0x47, 0x65, 0x74,
0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,
0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x6e, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73,
0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16,
0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73,
0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63,
0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
0x6e, 0x61, 0x6d, 0x65, 0x32, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0c, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c,
0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x88, 0x02, 0x01, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65,
0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01,
0x2a, 0x12, 0x7e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f,
0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63,
0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54,
0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x28, 0x22, 0x23, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65,
0x74, 0x61, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x63, 0x63,
0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x01, 0x2a, 0x92, 0x41, 0x02, 0x62,
0x00, 0x12, 0x6d, 0x0a, 0x0c, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
0x64, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
0x69, 0x7a, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x49, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x12,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x61, 0x75,
0x74, 0x68, 0x3a, 0x0c, 0x69, 0x73, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64,
0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f,
0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_auth_proto_rawDescOnce sync.Once
file_auth_proto_rawDescData = file_auth_proto_rawDesc
)
func file_auth_proto_rawDescGZIP() []byte {
file_auth_proto_rawDescOnce.Do(func() {
file_auth_proto_rawDescData = protoimpl.X.CompressGZIP(file_auth_proto_rawDescData)
})
return file_auth_proto_rawDescData
}
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_auth_proto_goTypes = []interface{}{
(*IsValidTokenRequest)(nil), // 0: api.IsValidTokenRequest
(*IsValidTokenResponse)(nil), // 1: api.IsValidTokenResponse
(*IsAuthorized)(nil), // 2: api.IsAuthorized
(*IsAuthorizedRequest)(nil), // 3: api.IsAuthorizedRequest
(*IsAuthorizedResponse)(nil), // 4: api.IsAuthorizedResponse
(*GetAccessTokenRequest)(nil), // 5: api.GetAccessTokenRequest
(*GetAccessTokenResponse)(nil), // 6: api.GetAccessTokenResponse
}
var file_auth_proto_depIdxs = []int32{
2, // 0: api.IsAuthorizedRequest.isAuthorized:type_name -> api.IsAuthorized
0, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest
5, // 2: api.AuthService.GetAccessToken:input_type -> api.GetAccessTokenRequest
3, // 3: api.AuthService.IsAuthorized:input_type -> api.IsAuthorizedRequest
1, // 4: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse
6, // 5: api.AuthService.GetAccessToken:output_type -> api.GetAccessTokenResponse
4, // 6: api.AuthService.IsAuthorized:output_type -> api.IsAuthorizedResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_auth_proto_init() }
func file_auth_proto_init() {
if File_auth_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_auth_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsValidTokenRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsValidTokenResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorized); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorizedRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IsAuthorizedResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccessTokenRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_auth_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetAccessTokenResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_auth_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_auth_proto_goTypes,
DependencyIndexes: file_auth_proto_depIdxs,
MessageInfos: file_auth_proto_msgTypes,
}.Build()
File_auth_proto = out.File
file_auth_proto_rawDesc = nil
file_auth_proto_goTypes = nil
file_auth_proto_depIdxs = nil
}

329
api/gen/auth.pb.gw.go Normal file
View File

@@ -0,0 +1,329 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: auth.proto
/*
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package gen
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsValidTokenRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.IsValidToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsValidTokenRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.IsValidToken(ctx, &protoReq)
return msg, metadata, err
}
func request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAccessTokenRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAccessToken(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AuthService_GetAccessToken_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAccessTokenRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAccessToken(ctx, &protoReq)
return msg, metadata, err
}
func request_AuthService_IsAuthorized_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsAuthorizedRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.IsAuthorized); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.IsAuthorized(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_AuthService_IsAuthorized_0(ctx context.Context, marshaler runtime.Marshaler, server AuthServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq IsAuthorizedRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.IsAuthorized); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.IsAuthorized(ctx, &protoReq)
return msg, metadata, err
}
// RegisterAuthServiceHandlerServer registers the http handlers for service AuthService to "mux".
// UnaryRPC :call AuthServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAuthServiceHandlerFromEndpoint instead.
func RegisterAuthServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServiceServer) error {
mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.AuthService/IsValidToken")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AuthService_IsValidToken_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_AuthService_GetAccessToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.AuthService/GetAccessToken")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.AuthService/IsAuthorized")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_AuthService_IsAuthorized_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsAuthorized_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterAuthServiceHandlerFromEndpoint is same as RegisterAuthServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterAuthServiceHandler(ctx, mux, conn)
}
// RegisterAuthServiceHandler registers the http handlers for service AuthService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterAuthServiceHandlerClient(ctx, mux, NewAuthServiceClient(conn))
}
// RegisterAuthServiceHandlerClient registers the http handlers for service AuthService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "AuthServiceClient" to call the correct interceptors.
func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthServiceClient) error {
mux.Handle("POST", pattern_AuthService_IsValidToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.AuthService/IsValidToken")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AuthService_IsValidToken_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsValidToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_AuthService_GetAccessToken_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.AuthService/GetAccessToken")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AuthService_GetAccessToken_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_GetAccessToken_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_AuthService_IsAuthorized_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.AuthService/IsAuthorized")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_AuthService_IsAuthorized_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_AuthService_IsAuthorized_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_AuthService_IsValidToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "token"}, ""))
pattern_AuthService_GetAccessToken_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"apis", "v1beta1", "auth", "get_access_token"}, ""))
pattern_AuthService_IsAuthorized_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "auth"}, ""))
)
var (
forward_AuthService_IsValidToken_0 = runtime.ForwardResponseMessage
forward_AuthService_GetAccessToken_0 = runtime.ForwardResponseMessage
forward_AuthService_IsAuthorized_0 = runtime.ForwardResponseMessage
)

172
api/gen/auth_grpc.pb.go Normal file
View File

@@ -0,0 +1,172 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// AuthServiceClient is the client API for AuthService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AuthServiceClient interface {
// Deprecated: Do not use.
IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error)
GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error)
IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error)
}
type authServiceClient struct {
cc grpc.ClientConnInterface
}
func NewAuthServiceClient(cc grpc.ClientConnInterface) AuthServiceClient {
return &authServiceClient{cc}
}
// Deprecated: Do not use.
func (c *authServiceClient) IsValidToken(ctx context.Context, in *IsValidTokenRequest, opts ...grpc.CallOption) (*IsValidTokenResponse, error) {
out := new(IsValidTokenResponse)
err := c.cc.Invoke(ctx, "/api.AuthService/IsValidToken", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *authServiceClient) GetAccessToken(ctx context.Context, in *GetAccessTokenRequest, opts ...grpc.CallOption) (*GetAccessTokenResponse, error) {
out := new(GetAccessTokenResponse)
err := c.cc.Invoke(ctx, "/api.AuthService/GetAccessToken", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *authServiceClient) IsAuthorized(ctx context.Context, in *IsAuthorizedRequest, opts ...grpc.CallOption) (*IsAuthorizedResponse, error) {
out := new(IsAuthorizedResponse)
err := c.cc.Invoke(ctx, "/api.AuthService/IsAuthorized", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AuthServiceServer is the server API for AuthService service.
// All implementations must embed UnimplementedAuthServiceServer
// for forward compatibility
type AuthServiceServer interface {
// Deprecated: Do not use.
IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error)
GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error)
IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error)
mustEmbedUnimplementedAuthServiceServer()
}
// UnimplementedAuthServiceServer must be embedded to have forward compatible implementations.
type UnimplementedAuthServiceServer struct {
}
func (UnimplementedAuthServiceServer) IsValidToken(context.Context, *IsValidTokenRequest) (*IsValidTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsValidToken not implemented")
}
func (UnimplementedAuthServiceServer) GetAccessToken(context.Context, *GetAccessTokenRequest) (*GetAccessTokenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAccessToken not implemented")
}
func (UnimplementedAuthServiceServer) IsAuthorized(context.Context, *IsAuthorizedRequest) (*IsAuthorizedResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method IsAuthorized not implemented")
}
func (UnimplementedAuthServiceServer) mustEmbedUnimplementedAuthServiceServer() {}
// UnsafeAuthServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AuthServiceServer will
// result in compilation errors.
type UnsafeAuthServiceServer interface {
mustEmbedUnimplementedAuthServiceServer()
}
func RegisterAuthServiceServer(s grpc.ServiceRegistrar, srv AuthServiceServer) {
s.RegisterService(&_AuthService_serviceDesc, srv)
}
func _AuthService_IsValidToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsValidTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).IsValidToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.AuthService/IsValidToken",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).IsValidToken(ctx, req.(*IsValidTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AuthService_GetAccessToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAccessTokenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).GetAccessToken(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.AuthService/GetAccessToken",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).GetAccessToken(ctx, req.(*GetAccessTokenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AuthService_IsAuthorized_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IsAuthorizedRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AuthServiceServer).IsAuthorized(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.AuthService/IsAuthorized",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AuthServiceServer).IsAuthorized(ctx, req.(*IsAuthorizedRequest))
}
return interceptor(ctx, in, info, handler)
}
var _AuthService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.AuthService",
HandlerType: (*AuthServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "IsValidToken",
Handler: _AuthService_IsValidToken_Handler,
},
{
MethodName: "GetAccessToken",
Handler: _AuthService_GetAccessToken_Handler,
},
{
MethodName: "IsAuthorized",
Handler: _AuthService_IsAuthorized_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "auth.proto",
}

View File

@@ -1,10 +1,10 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: common.proto
package api
package gen
import (
proto "github.com/golang/protobuf/proto"
@@ -36,7 +36,8 @@ type Parameter struct {
DisplayName string `protobuf:"bytes,4,opt,name=displayName,proto3" json:"displayName,omitempty"`
Hint string `protobuf:"bytes,5,opt,name=hint,proto3" json:"hint,omitempty"`
Required bool `protobuf:"varint,6,opt,name=required,proto3" json:"required,omitempty"`
Options []*ParameterOption `protobuf:"bytes,7,rep,name=options,proto3" json:"options,omitempty"`
Visibility string `protobuf:"bytes,7,opt,name=visibility,proto3" json:"visibility,omitempty"`
Options []*ParameterOption `protobuf:"bytes,8,rep,name=options,proto3" json:"options,omitempty"`
}
func (x *Parameter) Reset() {
@@ -113,6 +114,13 @@ func (x *Parameter) GetRequired() bool {
return false
}
func (x *Parameter) GetVisibility() string {
if x != nil {
return x.Visibility
}
return ""
}
func (x *Parameter) GetOptions() []*ParameterOption {
if x != nil {
return x.Options
@@ -175,11 +183,168 @@ func (x *ParameterOption) GetValue() string {
return ""
}
type LogStreamResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LogEntries []*LogEntry `protobuf:"bytes,1,rep,name=logEntries,proto3" json:"logEntries,omitempty"`
}
func (x *LogStreamResponse) Reset() {
*x = LogStreamResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LogStreamResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LogStreamResponse) ProtoMessage() {}
func (x *LogStreamResponse) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LogStreamResponse.ProtoReflect.Descriptor instead.
func (*LogStreamResponse) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{2}
}
func (x *LogStreamResponse) GetLogEntries() []*LogEntry {
if x != nil {
return x.LogEntries
}
return nil
}
type LogEntry struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timestamp string `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
}
func (x *LogEntry) Reset() {
*x = LogEntry{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LogEntry) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LogEntry) ProtoMessage() {}
func (x *LogEntry) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LogEntry.ProtoReflect.Descriptor instead.
func (*LogEntry) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{3}
}
func (x *LogEntry) GetTimestamp() string {
if x != nil {
return x.Timestamp
}
return ""
}
func (x *LogEntry) GetContent() string {
if x != nil {
return x.Content
}
return ""
}
type MachineType struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *MachineType) Reset() {
*x = MachineType{}
if protoimpl.UnsafeEnabled {
mi := &file_common_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *MachineType) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*MachineType) ProtoMessage() {}
func (x *MachineType) ProtoReflect() protoreflect.Message {
mi := &file_common_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use MachineType.ProtoReflect.Descriptor instead.
func (*MachineType) Descriptor() ([]byte, []int) {
return file_common_proto_rawDescGZIP(), []int{4}
}
func (x *MachineType) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *MachineType) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
var File_common_proto protoreflect.FileDescriptor
var file_common_proto_rawDesc = []byte{
0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03,
0x61, 0x70, 0x69, 0x22, 0xcb, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x61, 0x70, 0x69, 0x22, 0xeb, 0x01, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74,
@@ -189,14 +354,30 @@ var file_common_proto_rawDesc = []byte{
0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x68, 0x69, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
0x64, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03,
0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18,
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
0x79, 0x12, 0x2e, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x22, 0x3b, 0x0a, 0x0f, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x4f, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x42,
0x0a, 0x11, 0x4c, 0x6f, 0x67, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x0a, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69, 0x65,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f,
0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x69,
0x65, 0x73, 0x22, 0x42, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1c,
0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x37, 0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e,
0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -211,18 +392,22 @@ func file_common_proto_rawDescGZIP() []byte {
return file_common_proto_rawDescData
}
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_common_proto_goTypes = []interface{}{
(*Parameter)(nil), // 0: api.Parameter
(*ParameterOption)(nil), // 1: api.ParameterOption
(*Parameter)(nil), // 0: api.Parameter
(*ParameterOption)(nil), // 1: api.ParameterOption
(*LogStreamResponse)(nil), // 2: api.LogStreamResponse
(*LogEntry)(nil), // 3: api.LogEntry
(*MachineType)(nil), // 4: api.MachineType
}
var file_common_proto_depIdxs = []int32{
1, // 0: api.Parameter.options:type_name -> api.ParameterOption
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
3, // 1: api.LogStreamResponse.logEntries:type_name -> api.LogEntry
2, // [2:2] is the sub-list for method output_type
2, // [2:2] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_common_proto_init() }
@@ -255,6 +440,42 @@ func file_common_proto_init() {
return nil
}
}
file_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LogStreamResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LogEntry); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*MachineType); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -262,7 +483,7 @@ func file_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},

477
api/gen/config.pb.go Normal file
View File

@@ -0,0 +1,477 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: config.proto
package gen
import (
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type GetNamespaceConfigRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
}
func (x *GetNamespaceConfigRequest) Reset() {
*x = GetNamespaceConfigRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNamespaceConfigRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNamespaceConfigRequest) ProtoMessage() {}
func (x *GetNamespaceConfigRequest) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNamespaceConfigRequest.ProtoReflect.Descriptor instead.
func (*GetNamespaceConfigRequest) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{0}
}
func (x *GetNamespaceConfigRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
type GetNamespaceConfigResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Bucket string `protobuf:"bytes,1,opt,name=bucket,proto3" json:"bucket,omitempty"`
}
func (x *GetNamespaceConfigResponse) Reset() {
*x = GetNamespaceConfigResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetNamespaceConfigResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetNamespaceConfigResponse) ProtoMessage() {}
func (x *GetNamespaceConfigResponse) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetNamespaceConfigResponse.ProtoReflect.Descriptor instead.
func (*GetNamespaceConfigResponse) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{1}
}
func (x *GetNamespaceConfigResponse) GetBucket() string {
if x != nil {
return x.Bucket
}
return ""
}
type GetConfigResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ApiUrl string `protobuf:"bytes,1,opt,name=apiUrl,proto3" json:"apiUrl,omitempty"`
Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain,omitempty"`
Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"`
NodePool *NodePool `protobuf:"bytes,4,opt,name=nodePool,proto3" json:"nodePool,omitempty"`
}
func (x *GetConfigResponse) Reset() {
*x = GetConfigResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetConfigResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetConfigResponse) ProtoMessage() {}
func (x *GetConfigResponse) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.
func (*GetConfigResponse) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{2}
}
func (x *GetConfigResponse) GetApiUrl() string {
if x != nil {
return x.ApiUrl
}
return ""
}
func (x *GetConfigResponse) GetDomain() string {
if x != nil {
return x.Domain
}
return ""
}
func (x *GetConfigResponse) GetFqdn() string {
if x != nil {
return x.Fqdn
}
return ""
}
func (x *GetConfigResponse) GetNodePool() *NodePool {
if x != nil {
return x.NodePool
}
return nil
}
type NodePoolOption struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *NodePoolOption) Reset() {
*x = NodePoolOption{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodePoolOption) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodePoolOption) ProtoMessage() {}
func (x *NodePoolOption) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodePoolOption.ProtoReflect.Descriptor instead.
func (*NodePoolOption) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{3}
}
func (x *NodePoolOption) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *NodePoolOption) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type NodePool struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
Options []*NodePoolOption `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"`
}
func (x *NodePool) Reset() {
*x = NodePool{}
if protoimpl.UnsafeEnabled {
mi := &file_config_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodePool) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodePool) ProtoMessage() {}
func (x *NodePool) ProtoReflect() protoreflect.Message {
mi := &file_config_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodePool.ProtoReflect.Descriptor instead.
func (*NodePool) Descriptor() ([]byte, []int) {
return file_config_proto_rawDescGZIP(), []int{4}
}
func (x *NodePool) GetLabel() string {
if x != nil {
return x.Label
}
return ""
}
func (x *NodePool) GetOptions() []*NodePoolOption {
if x != nil {
return x.Options
}
return nil
}
var File_config_proto protoreflect.FileDescriptor
var file_config_proto_rawDesc = []byte{
0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03,
0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x39,
0x0a, 0x19, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x34, 0x0a, 0x1a, 0x47, 0x65, 0x74,
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x22,
0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x70, 0x69, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a,
0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64,
0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x18, 0x03, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x71, 0x64, 0x6e, 0x12, 0x29, 0x0a, 0x08, 0x6e, 0x6f, 0x64,
0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65,
0x50, 0x6f, 0x6f, 0x6c, 0x22, 0x3a, 0x0a, 0x0e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c,
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x4f, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x14, 0x0a, 0x05,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62,
0x65, 0x6c, 0x12, 0x2d, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x6f,
0x6f, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x32, 0xeb, 0x01, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x59, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x7f,
0x0a, 0x12, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f,
0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f,
0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_config_proto_rawDescOnce sync.Once
file_config_proto_rawDescData = file_config_proto_rawDesc
)
func file_config_proto_rawDescGZIP() []byte {
file_config_proto_rawDescOnce.Do(func() {
file_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_config_proto_rawDescData)
})
return file_config_proto_rawDescData
}
var file_config_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_config_proto_goTypes = []interface{}{
(*GetNamespaceConfigRequest)(nil), // 0: api.GetNamespaceConfigRequest
(*GetNamespaceConfigResponse)(nil), // 1: api.GetNamespaceConfigResponse
(*GetConfigResponse)(nil), // 2: api.GetConfigResponse
(*NodePoolOption)(nil), // 3: api.NodePoolOption
(*NodePool)(nil), // 4: api.NodePool
(*emptypb.Empty)(nil), // 5: google.protobuf.Empty
}
var file_config_proto_depIdxs = []int32{
4, // 0: api.GetConfigResponse.nodePool:type_name -> api.NodePool
3, // 1: api.NodePool.options:type_name -> api.NodePoolOption
5, // 2: api.ConfigService.GetConfig:input_type -> google.protobuf.Empty
0, // 3: api.ConfigService.GetNamespaceConfig:input_type -> api.GetNamespaceConfigRequest
2, // 4: api.ConfigService.GetConfig:output_type -> api.GetConfigResponse
1, // 5: api.ConfigService.GetNamespaceConfig:output_type -> api.GetNamespaceConfigResponse
4, // [4:6] is the sub-list for method output_type
2, // [2:4] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
}
func init() { file_config_proto_init() }
func file_config_proto_init() {
if File_config_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNamespaceConfigRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetNamespaceConfigResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetConfigResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodePoolOption); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_config_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodePool); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_config_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_config_proto_goTypes,
DependencyIndexes: file_config_proto_depIdxs,
MessageInfos: file_config_proto_msgTypes,
}.Build()
File_config_proto = out.File
file_config_proto_rawDesc = nil
file_config_proto_goTypes = nil
file_config_proto_depIdxs = nil
}

251
api/gen/config.pb.gw.go Normal file
View File

@@ -0,0 +1,251 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: config.proto
/*
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package gen
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/types/known/emptypb"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_ConfigService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.GetConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ConfigService_GetConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.GetConfig(ctx, &protoReq)
return msg, metadata, err
}
func request_ConfigService_GetNamespaceConfig_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetNamespaceConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := client.GetNamespaceConfig(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ConfigService_GetNamespaceConfig_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetNamespaceConfigRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := server.GetNamespaceConfig(ctx, &protoReq)
return msg, metadata, err
}
// RegisterConfigServiceHandlerServer registers the http handlers for service ConfigService to "mux".
// UnaryRPC :call ConfigServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterConfigServiceHandlerFromEndpoint instead.
func RegisterConfigServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ConfigServiceServer) error {
mux.Handle("GET", pattern_ConfigService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ConfigService/GetConfig")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ConfigService_GetConfig_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_ConfigService_GetNamespaceConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ConfigService/GetNamespaceConfig")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ConfigService_GetNamespaceConfig_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigService_GetNamespaceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterConfigServiceHandlerFromEndpoint is same as RegisterConfigServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterConfigServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterConfigServiceHandler(ctx, mux, conn)
}
// RegisterConfigServiceHandler registers the http handlers for service ConfigService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterConfigServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterConfigServiceHandlerClient(ctx, mux, NewConfigServiceClient(conn))
}
// RegisterConfigServiceHandlerClient registers the http handlers for service ConfigService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "ConfigServiceClient" to call the correct interceptors.
func RegisterConfigServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigServiceClient) error {
mux.Handle("GET", pattern_ConfigService_GetConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ConfigService/GetConfig")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ConfigService_GetConfig_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigService_GetConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_ConfigService_GetNamespaceConfig_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ConfigService/GetNamespaceConfig")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ConfigService_GetNamespaceConfig_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigService_GetNamespaceConfig_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_ConfigService_GetConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "config"}, ""))
pattern_ConfigService_GetNamespaceConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "config"}, ""))
)
var (
forward_ConfigService_GetConfig_0 = runtime.ForwardResponseMessage
forward_ConfigService_GetNamespaceConfig_0 = runtime.ForwardResponseMessage
)

134
api/gen/config_grpc.pb.go Normal file
View File

@@ -0,0 +1,134 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// ConfigServiceClient is the client API for ConfigService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ConfigServiceClient interface {
GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error)
GetNamespaceConfig(ctx context.Context, in *GetNamespaceConfigRequest, opts ...grpc.CallOption) (*GetNamespaceConfigResponse, error)
}
type configServiceClient struct {
cc grpc.ClientConnInterface
}
func NewConfigServiceClient(cc grpc.ClientConnInterface) ConfigServiceClient {
return &configServiceClient{cc}
}
func (c *configServiceClient) GetConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetConfigResponse, error) {
out := new(GetConfigResponse)
err := c.cc.Invoke(ctx, "/api.ConfigService/GetConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *configServiceClient) GetNamespaceConfig(ctx context.Context, in *GetNamespaceConfigRequest, opts ...grpc.CallOption) (*GetNamespaceConfigResponse, error) {
out := new(GetNamespaceConfigResponse)
err := c.cc.Invoke(ctx, "/api.ConfigService/GetNamespaceConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ConfigServiceServer is the server API for ConfigService service.
// All implementations must embed UnimplementedConfigServiceServer
// for forward compatibility
type ConfigServiceServer interface {
GetConfig(context.Context, *emptypb.Empty) (*GetConfigResponse, error)
GetNamespaceConfig(context.Context, *GetNamespaceConfigRequest) (*GetNamespaceConfigResponse, error)
mustEmbedUnimplementedConfigServiceServer()
}
// UnimplementedConfigServiceServer must be embedded to have forward compatible implementations.
type UnimplementedConfigServiceServer struct {
}
func (UnimplementedConfigServiceServer) GetConfig(context.Context, *emptypb.Empty) (*GetConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented")
}
func (UnimplementedConfigServiceServer) GetNamespaceConfig(context.Context, *GetNamespaceConfigRequest) (*GetNamespaceConfigResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNamespaceConfig not implemented")
}
func (UnimplementedConfigServiceServer) mustEmbedUnimplementedConfigServiceServer() {}
// UnsafeConfigServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ConfigServiceServer will
// result in compilation errors.
type UnsafeConfigServiceServer interface {
mustEmbedUnimplementedConfigServiceServer()
}
func RegisterConfigServiceServer(s grpc.ServiceRegistrar, srv ConfigServiceServer) {
s.RegisterService(&_ConfigService_serviceDesc, srv)
}
func _ConfigService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigServiceServer).GetConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ConfigService/GetConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigServiceServer).GetConfig(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _ConfigService_GetNamespaceConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetNamespaceConfigRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigServiceServer).GetNamespaceConfig(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ConfigService/GetNamespaceConfig",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigServiceServer).GetNamespaceConfig(ctx, req.(*GetNamespaceConfigRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ConfigService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.ConfigService",
HandlerType: (*ConfigServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetConfig",
Handler: _ConfigService_GetConfig_Handler,
},
{
MethodName: "GetNamespaceConfig",
Handler: _ConfigService_GetNamespaceConfig_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "config.proto",
}

777
api/gen/cron_workflow.pb.go Normal file
View File

@@ -0,0 +1,777 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: cron_workflow.proto
package gen
import (
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type CronWorkflow struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
Manifest string `protobuf:"bytes,3,opt,name=manifest,proto3" json:"manifest,omitempty"`
WorkflowExecution *WorkflowExecution `protobuf:"bytes,4,opt,name=workflowExecution,proto3" json:"workflowExecution,omitempty"`
Labels []*KeyValue `protobuf:"bytes,5,rep,name=labels,proto3" json:"labels,omitempty"`
Namespace string `protobuf:"bytes,6,opt,name=namespace,proto3" json:"namespace,omitempty"`
}
func (x *CronWorkflow) Reset() {
*x = CronWorkflow{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CronWorkflow) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CronWorkflow) ProtoMessage() {}
func (x *CronWorkflow) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CronWorkflow.ProtoReflect.Descriptor instead.
func (*CronWorkflow) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{0}
}
func (x *CronWorkflow) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CronWorkflow) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *CronWorkflow) GetManifest() string {
if x != nil {
return x.Manifest
}
return ""
}
func (x *CronWorkflow) GetWorkflowExecution() *WorkflowExecution {
if x != nil {
return x.WorkflowExecution
}
return nil
}
func (x *CronWorkflow) GetLabels() []*KeyValue {
if x != nil {
return x.Labels
}
return nil
}
func (x *CronWorkflow) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
type CreateCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
CronWorkflow *CronWorkflow `protobuf:"bytes,2,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"`
}
func (x *CreateCronWorkflowRequest) Reset() {
*x = CreateCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateCronWorkflowRequest) ProtoMessage() {}
func (x *CreateCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*CreateCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{1}
}
func (x *CreateCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *CreateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow {
if x != nil {
return x.CronWorkflow
}
return nil
}
type GetCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *GetCronWorkflowRequest) Reset() {
*x = GetCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetCronWorkflowRequest) ProtoMessage() {}
func (x *GetCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*GetCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{2}
}
func (x *GetCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *GetCronWorkflowRequest) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type UpdateCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
CronWorkflow *CronWorkflow `protobuf:"bytes,3,opt,name=cronWorkflow,proto3" json:"cronWorkflow,omitempty"`
}
func (x *UpdateCronWorkflowRequest) Reset() {
*x = UpdateCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateCronWorkflowRequest) ProtoMessage() {}
func (x *UpdateCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*UpdateCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *UpdateCronWorkflowRequest) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
func (x *UpdateCronWorkflowRequest) GetCronWorkflow() *CronWorkflow {
if x != nil {
return x.CronWorkflow
}
return nil
}
type DeleteCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty"`
}
func (x *DeleteCronWorkflowRequest) Reset() {
*x = DeleteCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteCronWorkflowRequest) ProtoMessage() {}
func (x *DeleteCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*DeleteCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{4}
}
func (x *DeleteCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *DeleteCronWorkflowRequest) GetUid() string {
if x != nil {
return x.Uid
}
return ""
}
type ListCronWorkflowRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
WorkflowTemplateName string `protobuf:"bytes,2,opt,name=workflow_template_name,json=workflowTemplateName,proto3" json:"workflow_template_name,omitempty"`
PageSize int32 `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,4,opt,name=page,proto3" json:"page,omitempty"`
}
func (x *ListCronWorkflowRequest) Reset() {
*x = ListCronWorkflowRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListCronWorkflowRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListCronWorkflowRequest) ProtoMessage() {}
func (x *ListCronWorkflowRequest) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListCronWorkflowRequest.ProtoReflect.Descriptor instead.
func (*ListCronWorkflowRequest) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{5}
}
func (x *ListCronWorkflowRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *ListCronWorkflowRequest) GetWorkflowTemplateName() string {
if x != nil {
return x.WorkflowTemplateName
}
return ""
}
func (x *ListCronWorkflowRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListCronWorkflowRequest) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
type ListCronWorkflowsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
CronWorkflows []*CronWorkflow `protobuf:"bytes,2,rep,name=cronWorkflows,proto3" json:"cronWorkflows,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"`
TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
}
func (x *ListCronWorkflowsResponse) Reset() {
*x = ListCronWorkflowsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_cron_workflow_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListCronWorkflowsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListCronWorkflowsResponse) ProtoMessage() {}
func (x *ListCronWorkflowsResponse) ProtoReflect() protoreflect.Message {
mi := &file_cron_workflow_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListCronWorkflowsResponse.ProtoReflect.Descriptor instead.
func (*ListCronWorkflowsResponse) Descriptor() ([]byte, []int) {
return file_cron_workflow_proto_rawDescGZIP(), []int{6}
}
func (x *ListCronWorkflowsResponse) GetCount() int32 {
if x != nil {
return x.Count
}
return 0
}
func (x *ListCronWorkflowsResponse) GetCronWorkflows() []*CronWorkflow {
if x != nil {
return x.CronWorkflows
}
return nil
}
func (x *ListCronWorkflowsResponse) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *ListCronWorkflowsResponse) GetPages() int32 {
if x != nil {
return x.Pages
}
return 0
}
func (x *ListCronWorkflowsResponse) GetTotalCount() int32 {
if x != nil {
return x.TotalCount
}
return 0
}
var File_cron_workflow_proto protoreflect.FileDescriptor
var file_cron_workflow_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xdb, 0x01, 0x0a, 0x0c, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e,
0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e,
0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x44, 0x0a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x06, 0x6c,
0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18,
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x22, 0x70, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a,
0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0c, 0x63,
0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x22, 0x48, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x82, 0x01, 0x0a,
0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x35, 0x0a, 0x0c, 0x63, 0x72,
0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x52, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x22, 0x4b, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c,
0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03,
0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x9d,
0x01, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x77, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61,
0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a,
0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61,
0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xb4,
0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x37, 0x0a, 0x0d, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
0x6f, 0x77, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x0d, 0x63, 0x72,
0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70,
0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12,
0x14, 0x0a, 0x05, 0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05,
0x70, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xf9, 0x05, 0x0a, 0x13, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01,
0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57,
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x3d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x37, 0x22,
0x27, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f,
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x8c, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f,
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x0c, 0x63, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72,
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x78, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x6f, 0x6e,
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f,
0x12, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e,
0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12,
0xc8, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x72,
0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x22, 0x75, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6f, 0x12, 0x28, 0x2f, 0x61, 0x70,
0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b,
0x66, 0x6c, 0x6f, 0x77, 0x73, 0x5a, 0x43, 0x12, 0x41, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
0x73, 0x2f, 0x7b, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70,
0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x84, 0x01, 0x0a, 0x12, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
0x77, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x72,
0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x30, 0x2a, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x72, 0x6f,
0x6e, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64,
0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_cron_workflow_proto_rawDescOnce sync.Once
file_cron_workflow_proto_rawDescData = file_cron_workflow_proto_rawDesc
)
func file_cron_workflow_proto_rawDescGZIP() []byte {
file_cron_workflow_proto_rawDescOnce.Do(func() {
file_cron_workflow_proto_rawDescData = protoimpl.X.CompressGZIP(file_cron_workflow_proto_rawDescData)
})
return file_cron_workflow_proto_rawDescData
}
var file_cron_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_cron_workflow_proto_goTypes = []interface{}{
(*CronWorkflow)(nil), // 0: api.CronWorkflow
(*CreateCronWorkflowRequest)(nil), // 1: api.CreateCronWorkflowRequest
(*GetCronWorkflowRequest)(nil), // 2: api.GetCronWorkflowRequest
(*UpdateCronWorkflowRequest)(nil), // 3: api.UpdateCronWorkflowRequest
(*DeleteCronWorkflowRequest)(nil), // 4: api.DeleteCronWorkflowRequest
(*ListCronWorkflowRequest)(nil), // 5: api.ListCronWorkflowRequest
(*ListCronWorkflowsResponse)(nil), // 6: api.ListCronWorkflowsResponse
(*WorkflowExecution)(nil), // 7: api.WorkflowExecution
(*KeyValue)(nil), // 8: api.KeyValue
(*emptypb.Empty)(nil), // 9: google.protobuf.Empty
}
var file_cron_workflow_proto_depIdxs = []int32{
7, // 0: api.CronWorkflow.workflowExecution:type_name -> api.WorkflowExecution
8, // 1: api.CronWorkflow.labels:type_name -> api.KeyValue
0, // 2: api.CreateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow
0, // 3: api.UpdateCronWorkflowRequest.cronWorkflow:type_name -> api.CronWorkflow
0, // 4: api.ListCronWorkflowsResponse.cronWorkflows:type_name -> api.CronWorkflow
1, // 5: api.CronWorkflowService.CreateCronWorkflow:input_type -> api.CreateCronWorkflowRequest
3, // 6: api.CronWorkflowService.UpdateCronWorkflow:input_type -> api.UpdateCronWorkflowRequest
2, // 7: api.CronWorkflowService.GetCronWorkflow:input_type -> api.GetCronWorkflowRequest
5, // 8: api.CronWorkflowService.ListCronWorkflows:input_type -> api.ListCronWorkflowRequest
4, // 9: api.CronWorkflowService.DeleteCronWorkflow:input_type -> api.DeleteCronWorkflowRequest
0, // 10: api.CronWorkflowService.CreateCronWorkflow:output_type -> api.CronWorkflow
0, // 11: api.CronWorkflowService.UpdateCronWorkflow:output_type -> api.CronWorkflow
0, // 12: api.CronWorkflowService.GetCronWorkflow:output_type -> api.CronWorkflow
6, // 13: api.CronWorkflowService.ListCronWorkflows:output_type -> api.ListCronWorkflowsResponse
9, // 14: api.CronWorkflowService.DeleteCronWorkflow:output_type -> google.protobuf.Empty
10, // [10:15] is the sub-list for method output_type
5, // [5:10] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_cron_workflow_proto_init() }
func file_cron_workflow_proto_init() {
if File_cron_workflow_proto != nil {
return
}
file_workflow_proto_init()
file_label_proto_init()
if !protoimpl.UnsafeEnabled {
file_cron_workflow_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CronWorkflow); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListCronWorkflowRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_cron_workflow_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListCronWorkflowsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cron_workflow_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_cron_workflow_proto_goTypes,
DependencyIndexes: file_cron_workflow_proto_depIdxs,
MessageInfos: file_cron_workflow_proto_msgTypes,
}.Build()
File_cron_workflow_proto = out.File
file_cron_workflow_proto_rawDesc = nil
file_cron_workflow_proto_goTypes = nil
file_cron_workflow_proto_depIdxs = nil
}

View File

@@ -2,25 +2,25 @@
// source: cron_workflow.proto
/*
Package api is a reverse proxy.
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package api
package gen
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
@@ -29,7 +29,7 @@ var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
func request_CronWorkflowService_CreateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateCronWorkflowRequest
@@ -56,7 +56,6 @@ func request_CronWorkflowService_CreateCronWorkflow_0(ctx context.Context, marsh
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -91,7 +90,6 @@ func local_request_CronWorkflowService_CreateCronWorkflow_0(ctx context.Context,
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -126,20 +124,18 @@ func request_CronWorkflowService_UpdateCronWorkflow_0(ctx context.Context, marsh
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.UpdateCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -172,20 +168,18 @@ func local_request_CronWorkflowService_UpdateCronWorkflow_0(ctx context.Context,
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.UpdateCronWorkflow(ctx, &protoReq)
@@ -210,20 +204,18 @@ func request_CronWorkflowService_GetCronWorkflow_0(ctx context.Context, marshale
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.GetCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -248,20 +240,18 @@ func local_request_CronWorkflowService_GetCronWorkflow_0(ctx context.Context, ma
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.GetCronWorkflow(ctx, &protoReq)
@@ -290,7 +280,6 @@ func request_CronWorkflowService_ListCronWorkflows_0(ctx context.Context, marsha
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -324,12 +313,14 @@ func local_request_CronWorkflowService_ListCronWorkflows_0(ctx context.Context,
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_CronWorkflowService_ListCronWorkflows_0); err != nil {
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -359,7 +350,6 @@ func request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context, marsha
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -370,7 +360,6 @@ func request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context, marsha
}
protoReq.WorkflowTemplateName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflow_template_name", err)
}
@@ -404,7 +393,6 @@ func local_request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context,
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -415,12 +403,14 @@ func local_request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context,
}
protoReq.WorkflowTemplateName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "workflow_template_name", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_CronWorkflowService_ListCronWorkflows_1); err != nil {
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_CronWorkflowService_ListCronWorkflows_1); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -429,8 +419,8 @@ func local_request_CronWorkflowService_ListCronWorkflows_1(ctx context.Context,
}
func request_CronWorkflowService_TerminateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq TerminateCronWorkflowRequest
func request_CronWorkflowService_DeleteCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, client CronWorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq DeleteCronWorkflowRequest
var metadata runtime.ServerMetadata
var (
@@ -446,29 +436,27 @@ func request_CronWorkflowService_TerminateCronWorkflow_0(ctx context.Context, ma
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.TerminateCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
msg, err := client.DeleteCronWorkflow(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_CronWorkflowService_TerminateCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq TerminateCronWorkflowRequest
func local_request_CronWorkflowService_DeleteCronWorkflow_0(ctx context.Context, marshaler runtime.Marshaler, server CronWorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq DeleteCronWorkflowRequest
var metadata runtime.ServerMetadata
var (
@@ -484,23 +472,21 @@ func local_request_CronWorkflowService_TerminateCronWorkflow_0(ctx context.Conte
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.TerminateCronWorkflow(ctx, &protoReq)
msg, err := server.DeleteCronWorkflow(ctx, &protoReq)
return msg, metadata, err
}
@@ -508,18 +494,22 @@ func local_request_CronWorkflowService_TerminateCronWorkflow_0(ctx context.Conte
// RegisterCronWorkflowServiceHandlerServer registers the http handlers for service CronWorkflowService to "mux".
// UnaryRPC :call CronWorkflowServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCronWorkflowServiceHandlerFromEndpoint instead.
func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CronWorkflowServiceServer) error {
mux.Handle("POST", pattern_CronWorkflowService_CreateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/CreateCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_CronWorkflowService_CreateCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -533,13 +523,16 @@ func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.
mux.Handle("PUT", pattern_CronWorkflowService_UpdateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/UpdateCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_CronWorkflowService_UpdateCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -553,13 +546,16 @@ func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.
mux.Handle("GET", pattern_CronWorkflowService_GetCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/GetCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_CronWorkflowService_GetCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -573,13 +569,16 @@ func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.
mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_CronWorkflowService_ListCronWorkflows_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -593,13 +592,16 @@ func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.
mux.Handle("GET", pattern_CronWorkflowService_ListCronWorkflows_1, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_CronWorkflowService_ListCronWorkflows_1(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -610,23 +612,26 @@ func RegisterCronWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.
})
mux.Handle("DELETE", pattern_CronWorkflowService_TerminateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("DELETE", pattern_CronWorkflowService_DeleteCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.CronWorkflowService/DeleteCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_CronWorkflowService_TerminateCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams)
resp, md, err := local_request_CronWorkflowService_DeleteCronWorkflow_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_CronWorkflowService_TerminateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_CronWorkflowService_DeleteCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -675,7 +680,7 @@ func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/CreateCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -695,7 +700,7 @@ func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/UpdateCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -715,7 +720,7 @@ func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/GetCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -735,7 +740,7 @@ func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -755,7 +760,7 @@ func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/ListCronWorkflows")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -771,23 +776,23 @@ func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.
})
mux.Handle("DELETE", pattern_CronWorkflowService_TerminateCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
mux.Handle("DELETE", pattern_CronWorkflowService_DeleteCronWorkflow_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.CronWorkflowService/DeleteCronWorkflow")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_CronWorkflowService_TerminateCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams)
resp, md, err := request_CronWorkflowService_DeleteCronWorkflow_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_CronWorkflowService_TerminateCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
forward_CronWorkflowService_DeleteCronWorkflow_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
@@ -795,17 +800,17 @@ func RegisterCronWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.
}
var (
pattern_CronWorkflowService_CreateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflow"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_CronWorkflowService_CreateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflow"}, ""))
pattern_CronWorkflowService_UpdateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_CronWorkflowService_UpdateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "uid"}, ""))
pattern_CronWorkflowService_GetCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_CronWorkflowService_GetCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflow", "uid"}, ""))
pattern_CronWorkflowService_ListCronWorkflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflows"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_CronWorkflowService_ListCronWorkflows_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "cron_workflows"}, ""))
pattern_CronWorkflowService_ListCronWorkflows_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "workflow_template_name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_CronWorkflowService_ListCronWorkflows_1 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "workflow_template_name"}, ""))
pattern_CronWorkflowService_TerminateCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "name", "terminate"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_CronWorkflowService_DeleteCronWorkflow_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "cron_workflows", "uid"}, ""))
)
var (
@@ -819,5 +824,5 @@ var (
forward_CronWorkflowService_ListCronWorkflows_1 = runtime.ForwardResponseMessage
forward_CronWorkflowService_TerminateCronWorkflow_0 = runtime.ForwardResponseMessage
forward_CronWorkflowService_DeleteCronWorkflow_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,242 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// CronWorkflowServiceClient is the client API for CronWorkflowService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CronWorkflowServiceClient interface {
CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error)
UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error)
GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error)
ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error)
DeleteCronWorkflow(ctx context.Context, in *DeleteCronWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type cronWorkflowServiceClient struct {
cc grpc.ClientConnInterface
}
func NewCronWorkflowServiceClient(cc grpc.ClientConnInterface) CronWorkflowServiceClient {
return &cronWorkflowServiceClient{cc}
}
func (c *cronWorkflowServiceClient) CreateCronWorkflow(ctx context.Context, in *CreateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) {
out := new(CronWorkflow)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/CreateCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) UpdateCronWorkflow(ctx context.Context, in *UpdateCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) {
out := new(CronWorkflow)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/UpdateCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) GetCronWorkflow(ctx context.Context, in *GetCronWorkflowRequest, opts ...grpc.CallOption) (*CronWorkflow, error) {
out := new(CronWorkflow)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/GetCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) ListCronWorkflows(ctx context.Context, in *ListCronWorkflowRequest, opts ...grpc.CallOption) (*ListCronWorkflowsResponse, error) {
out := new(ListCronWorkflowsResponse)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/ListCronWorkflows", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *cronWorkflowServiceClient) DeleteCronWorkflow(ctx context.Context, in *DeleteCronWorkflowRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.CronWorkflowService/DeleteCronWorkflow", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CronWorkflowServiceServer is the server API for CronWorkflowService service.
// All implementations must embed UnimplementedCronWorkflowServiceServer
// for forward compatibility
type CronWorkflowServiceServer interface {
CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error)
UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error)
GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error)
ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error)
DeleteCronWorkflow(context.Context, *DeleteCronWorkflowRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedCronWorkflowServiceServer()
}
// UnimplementedCronWorkflowServiceServer must be embedded to have forward compatible implementations.
type UnimplementedCronWorkflowServiceServer struct {
}
func (UnimplementedCronWorkflowServiceServer) CreateCronWorkflow(context.Context, *CreateCronWorkflowRequest) (*CronWorkflow, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateCronWorkflow not implemented")
}
func (UnimplementedCronWorkflowServiceServer) UpdateCronWorkflow(context.Context, *UpdateCronWorkflowRequest) (*CronWorkflow, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateCronWorkflow not implemented")
}
func (UnimplementedCronWorkflowServiceServer) GetCronWorkflow(context.Context, *GetCronWorkflowRequest) (*CronWorkflow, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCronWorkflow not implemented")
}
func (UnimplementedCronWorkflowServiceServer) ListCronWorkflows(context.Context, *ListCronWorkflowRequest) (*ListCronWorkflowsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListCronWorkflows not implemented")
}
func (UnimplementedCronWorkflowServiceServer) DeleteCronWorkflow(context.Context, *DeleteCronWorkflowRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteCronWorkflow not implemented")
}
func (UnimplementedCronWorkflowServiceServer) mustEmbedUnimplementedCronWorkflowServiceServer() {}
// UnsafeCronWorkflowServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CronWorkflowServiceServer will
// result in compilation errors.
type UnsafeCronWorkflowServiceServer interface {
mustEmbedUnimplementedCronWorkflowServiceServer()
}
func RegisterCronWorkflowServiceServer(s grpc.ServiceRegistrar, srv CronWorkflowServiceServer) {
s.RegisterService(&_CronWorkflowService_serviceDesc, srv)
}
func _CronWorkflowService_CreateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/CreateCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).CreateCronWorkflow(ctx, req.(*CreateCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_UpdateCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/UpdateCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).UpdateCronWorkflow(ctx, req.(*UpdateCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_GetCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/GetCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).GetCronWorkflow(ctx, req.(*GetCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_ListCronWorkflows_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/ListCronWorkflows",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).ListCronWorkflows(ctx, req.(*ListCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CronWorkflowService_DeleteCronWorkflow_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteCronWorkflowRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CronWorkflowServiceServer).DeleteCronWorkflow(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.CronWorkflowService/DeleteCronWorkflow",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CronWorkflowServiceServer).DeleteCronWorkflow(ctx, req.(*DeleteCronWorkflowRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CronWorkflowService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.CronWorkflowService",
HandlerType: (*CronWorkflowServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateCronWorkflow",
Handler: _CronWorkflowService_CreateCronWorkflow_Handler,
},
{
MethodName: "UpdateCronWorkflow",
Handler: _CronWorkflowService_UpdateCronWorkflow_Handler,
},
{
MethodName: "GetCronWorkflow",
Handler: _CronWorkflowService_GetCronWorkflow_Handler,
},
{
MethodName: "ListCronWorkflows",
Handler: _CronWorkflowService_ListCronWorkflows_Handler,
},
{
MethodName: "DeleteCronWorkflow",
Handler: _CronWorkflowService_DeleteCronWorkflow_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "cron_workflow.proto",
}

580
api/gen/files.pb.go Normal file
View File

@@ -0,0 +1,580 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: files.proto
package gen
import (
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type File struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Extension string `protobuf:"bytes,3,opt,name=extension,proto3" json:"extension,omitempty"`
Size int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
ContentType string `protobuf:"bytes,5,opt,name=contentType,proto3" json:"contentType,omitempty"`
LastModified string `protobuf:"bytes,6,opt,name=lastModified,proto3" json:"lastModified,omitempty"`
Directory bool `protobuf:"varint,7,opt,name=directory,proto3" json:"directory,omitempty"`
}
func (x *File) Reset() {
*x = File{}
if protoimpl.UnsafeEnabled {
mi := &file_files_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *File) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*File) ProtoMessage() {}
func (x *File) ProtoReflect() protoreflect.Message {
mi := &file_files_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use File.ProtoReflect.Descriptor instead.
func (*File) Descriptor() ([]byte, []int) {
return file_files_proto_rawDescGZIP(), []int{0}
}
func (x *File) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *File) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *File) GetExtension() string {
if x != nil {
return x.Extension
}
return ""
}
func (x *File) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
func (x *File) GetContentType() string {
if x != nil {
return x.ContentType
}
return ""
}
func (x *File) GetLastModified() string {
if x != nil {
return x.LastModified
}
return ""
}
func (x *File) GetDirectory() bool {
if x != nil {
return x.Directory
}
return false
}
type ListFilesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
PerPage int32 `protobuf:"varint,4,opt,name=perPage,proto3" json:"perPage,omitempty"`
}
func (x *ListFilesRequest) Reset() {
*x = ListFilesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_files_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListFilesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListFilesRequest) ProtoMessage() {}
func (x *ListFilesRequest) ProtoReflect() protoreflect.Message {
mi := &file_files_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListFilesRequest.ProtoReflect.Descriptor instead.
func (*ListFilesRequest) Descriptor() ([]byte, []int) {
return file_files_proto_rawDescGZIP(), []int{1}
}
func (x *ListFilesRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *ListFilesRequest) GetPath() string {
if x != nil {
return x.Path
}
return ""
}
func (x *ListFilesRequest) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *ListFilesRequest) GetPerPage() int32 {
if x != nil {
return x.PerPage
}
return 0
}
type ListFilesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
TotalCount int32 `protobuf:"varint,2,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"`
Files []*File `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
ParentPath string `protobuf:"bytes,6,opt,name=parentPath,proto3" json:"parentPath,omitempty"`
}
func (x *ListFilesResponse) Reset() {
*x = ListFilesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_files_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListFilesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListFilesResponse) ProtoMessage() {}
func (x *ListFilesResponse) ProtoReflect() protoreflect.Message {
mi := &file_files_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListFilesResponse.ProtoReflect.Descriptor instead.
func (*ListFilesResponse) Descriptor() ([]byte, []int) {
return file_files_proto_rawDescGZIP(), []int{2}
}
func (x *ListFilesResponse) GetCount() int32 {
if x != nil {
return x.Count
}
return 0
}
func (x *ListFilesResponse) GetTotalCount() int32 {
if x != nil {
return x.TotalCount
}
return 0
}
func (x *ListFilesResponse) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *ListFilesResponse) GetPages() int32 {
if x != nil {
return x.Pages
}
return 0
}
func (x *ListFilesResponse) GetFiles() []*File {
if x != nil {
return x.Files
}
return nil
}
func (x *ListFilesResponse) GetParentPath() string {
if x != nil {
return x.ParentPath
}
return ""
}
type GetObjectPresignedUrlRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}
func (x *GetObjectPresignedUrlRequest) Reset() {
*x = GetObjectPresignedUrlRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_files_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetObjectPresignedUrlRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetObjectPresignedUrlRequest) ProtoMessage() {}
func (x *GetObjectPresignedUrlRequest) ProtoReflect() protoreflect.Message {
mi := &file_files_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetObjectPresignedUrlRequest.ProtoReflect.Descriptor instead.
func (*GetObjectPresignedUrlRequest) Descriptor() ([]byte, []int) {
return file_files_proto_rawDescGZIP(), []int{3}
}
func (x *GetObjectPresignedUrlRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *GetObjectPresignedUrlRequest) GetKey() string {
if x != nil {
return x.Key
}
return ""
}
type GetPresignedUrlResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
}
func (x *GetPresignedUrlResponse) Reset() {
*x = GetPresignedUrlResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_files_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetPresignedUrlResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetPresignedUrlResponse) ProtoMessage() {}
func (x *GetPresignedUrlResponse) ProtoReflect() protoreflect.Message {
mi := &file_files_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetPresignedUrlResponse.ProtoReflect.Descriptor instead.
func (*GetPresignedUrlResponse) Descriptor() ([]byte, []int) {
return file_files_proto_rawDescGZIP(), []int{4}
}
func (x *GetPresignedUrlResponse) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
func (x *GetPresignedUrlResponse) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
var File_files_proto protoreflect.FileDescriptor
var file_files_proto_rawDesc = []byte{
0x0a, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61,
0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0xc4, 0x01, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12,
0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73,
0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79,
0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6c, 0x61, 0x73, 0x74, 0x4d, 0x6f, 0x64,
0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x73,
0x74, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x69, 0x72,
0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x64, 0x69,
0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x72, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x46,
0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a,
0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67,
0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x65, 0x72, 0x50, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x07, 0x70, 0x65, 0x72, 0x50, 0x61, 0x67, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x11,
0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74,
0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70,
0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67, 0x65,
0x73, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x09, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c,
0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68,
0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61,
0x74, 0x68, 0x22, 0x4e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50,
0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
0x65, 0x79, 0x22, 0x3f, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e,
0x65, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12,
0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73,
0x69, 0x7a, 0x65, 0x32, 0xa4, 0x02, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4f, 0x62, 0x6a, 0x65, 0x63,
0x74, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e,
0x65, 0x64, 0x55, 0x52, 0x4c, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4f,
0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72,
0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x50, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x55, 0x72, 0x6c, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x12, 0x36,
0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e,
0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f,
0x70, 0x72, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x2d, 0x75, 0x72, 0x6c, 0x2f, 0x7b, 0x6b,
0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x72, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69,
0x6c, 0x65, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69,
0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x61, 0x70, 0x69,
0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x6c, 0x69, 0x73, 0x74,
0x2f, 0x7b, 0x70, 0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65,
0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_files_proto_rawDescOnce sync.Once
file_files_proto_rawDescData = file_files_proto_rawDesc
)
func file_files_proto_rawDescGZIP() []byte {
file_files_proto_rawDescOnce.Do(func() {
file_files_proto_rawDescData = protoimpl.X.CompressGZIP(file_files_proto_rawDescData)
})
return file_files_proto_rawDescData
}
var file_files_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_files_proto_goTypes = []interface{}{
(*File)(nil), // 0: api.File
(*ListFilesRequest)(nil), // 1: api.ListFilesRequest
(*ListFilesResponse)(nil), // 2: api.ListFilesResponse
(*GetObjectPresignedUrlRequest)(nil), // 3: api.GetObjectPresignedUrlRequest
(*GetPresignedUrlResponse)(nil), // 4: api.GetPresignedUrlResponse
}
var file_files_proto_depIdxs = []int32{
0, // 0: api.ListFilesResponse.files:type_name -> api.File
3, // 1: api.FileService.GetObjectDownloadPresignedURL:input_type -> api.GetObjectPresignedUrlRequest
1, // 2: api.FileService.ListFiles:input_type -> api.ListFilesRequest
4, // 3: api.FileService.GetObjectDownloadPresignedURL:output_type -> api.GetPresignedUrlResponse
2, // 4: api.FileService.ListFiles:output_type -> api.ListFilesResponse
3, // [3:5] is the sub-list for method output_type
1, // [1:3] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_files_proto_init() }
func file_files_proto_init() {
if File_files_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_files_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*File); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_files_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListFilesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_files_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListFilesResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_files_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetObjectPresignedUrlRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_files_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetPresignedUrlResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_files_proto_rawDesc,
NumEnums: 0,
NumMessages: 5,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_files_proto_goTypes,
DependencyIndexes: file_files_proto_depIdxs,
MessageInfos: file_files_proto_msgTypes,
}.Build()
File_files_proto = out.File
file_files_proto_rawDesc = nil
file_files_proto_goTypes = nil
file_files_proto_depIdxs = nil
}

342
api/gen/files.pb.gw.go Normal file
View File

@@ -0,0 +1,342 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: files.proto
/*
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package gen
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_FileService_GetObjectDownloadPresignedURL_0(ctx context.Context, marshaler runtime.Marshaler, client FileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetObjectPresignedUrlRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["key"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key")
}
protoReq.Key, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
}
msg, err := client.GetObjectDownloadPresignedURL(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_FileService_GetObjectDownloadPresignedURL_0(ctx context.Context, marshaler runtime.Marshaler, server FileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetObjectPresignedUrlRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["key"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "key")
}
protoReq.Key, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
}
msg, err := server.GetObjectDownloadPresignedURL(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_FileService_ListFiles_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "path": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
)
func request_FileService_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, client FileServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListFilesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["path"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path")
}
protoReq.Path, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FileService_ListFiles_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListFiles(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_FileService_ListFiles_0(ctx context.Context, marshaler runtime.Marshaler, server FileServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListFilesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["path"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "path")
}
protoReq.Path, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "path", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_FileService_ListFiles_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListFiles(ctx, &protoReq)
return msg, metadata, err
}
// RegisterFileServiceHandlerServer registers the http handlers for service FileService to "mux".
// UnaryRPC :call FileServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFileServiceHandlerFromEndpoint instead.
func RegisterFileServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FileServiceServer) error {
mux.Handle("GET", pattern_FileService_GetObjectDownloadPresignedURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.FileService/GetObjectDownloadPresignedURL")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_FileService_GetObjectDownloadPresignedURL_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_FileService_GetObjectDownloadPresignedURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_FileService_ListFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.FileService/ListFiles")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_FileService_ListFiles_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_FileService_ListFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterFileServiceHandlerFromEndpoint is same as RegisterFileServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFileServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterFileServiceHandler(ctx, mux, conn)
}
// RegisterFileServiceHandler registers the http handlers for service FileService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterFileServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterFileServiceHandlerClient(ctx, mux, NewFileServiceClient(conn))
}
// RegisterFileServiceHandlerClient registers the http handlers for service FileService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FileServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FileServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "FileServiceClient" to call the correct interceptors.
func RegisterFileServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FileServiceClient) error {
mux.Handle("GET", pattern_FileService_GetObjectDownloadPresignedURL_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.FileService/GetObjectDownloadPresignedURL")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_FileService_GetObjectDownloadPresignedURL_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_FileService_GetObjectDownloadPresignedURL_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_FileService_ListFiles_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.FileService/ListFiles")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_FileService_ListFiles_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_FileService_ListFiles_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_FileService_GetObjectDownloadPresignedURL_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 3, 0, 4, 1, 5, 5}, []string{"apis", "v1beta1", "namespace", "files", "presigned-url", "key"}, ""))
pattern_FileService_ListFiles_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 3, 0, 4, 1, 5, 5}, []string{"apis", "v1beta1", "namespace", "files", "list", "path"}, ""))
)
var (
forward_FileService_GetObjectDownloadPresignedURL_0 = runtime.ForwardResponseMessage
forward_FileService_ListFiles_0 = runtime.ForwardResponseMessage
)

133
api/gen/files_grpc.pb.go Normal file
View File

@@ -0,0 +1,133 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// FileServiceClient is the client API for FileService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type FileServiceClient interface {
GetObjectDownloadPresignedURL(ctx context.Context, in *GetObjectPresignedUrlRequest, opts ...grpc.CallOption) (*GetPresignedUrlResponse, error)
ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error)
}
type fileServiceClient struct {
cc grpc.ClientConnInterface
}
func NewFileServiceClient(cc grpc.ClientConnInterface) FileServiceClient {
return &fileServiceClient{cc}
}
func (c *fileServiceClient) GetObjectDownloadPresignedURL(ctx context.Context, in *GetObjectPresignedUrlRequest, opts ...grpc.CallOption) (*GetPresignedUrlResponse, error) {
out := new(GetPresignedUrlResponse)
err := c.cc.Invoke(ctx, "/api.FileService/GetObjectDownloadPresignedURL", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileServiceClient) ListFiles(ctx context.Context, in *ListFilesRequest, opts ...grpc.CallOption) (*ListFilesResponse, error) {
out := new(ListFilesResponse)
err := c.cc.Invoke(ctx, "/api.FileService/ListFiles", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FileServiceServer is the server API for FileService service.
// All implementations must embed UnimplementedFileServiceServer
// for forward compatibility
type FileServiceServer interface {
GetObjectDownloadPresignedURL(context.Context, *GetObjectPresignedUrlRequest) (*GetPresignedUrlResponse, error)
ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error)
mustEmbedUnimplementedFileServiceServer()
}
// UnimplementedFileServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFileServiceServer struct {
}
func (UnimplementedFileServiceServer) GetObjectDownloadPresignedURL(context.Context, *GetObjectPresignedUrlRequest) (*GetPresignedUrlResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetObjectDownloadPresignedURL not implemented")
}
func (UnimplementedFileServiceServer) ListFiles(context.Context, *ListFilesRequest) (*ListFilesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListFiles not implemented")
}
func (UnimplementedFileServiceServer) mustEmbedUnimplementedFileServiceServer() {}
// UnsafeFileServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to FileServiceServer will
// result in compilation errors.
type UnsafeFileServiceServer interface {
mustEmbedUnimplementedFileServiceServer()
}
func RegisterFileServiceServer(s grpc.ServiceRegistrar, srv FileServiceServer) {
s.RegisterService(&_FileService_serviceDesc, srv)
}
func _FileService_GetObjectDownloadPresignedURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetObjectPresignedUrlRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).GetObjectDownloadPresignedURL(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.FileService/GetObjectDownloadPresignedURL",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).GetObjectDownloadPresignedURL(ctx, req.(*GetObjectPresignedUrlRequest))
}
return interceptor(ctx, in, info, handler)
}
func _FileService_ListFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListFilesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServiceServer).ListFiles(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.FileService/ListFiles",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServiceServer).ListFiles(ctx, req.(*ListFilesRequest))
}
return interceptor(ctx, in, info, handler)
}
var _FileService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.FileService",
HandlerType: (*FileServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetObjectDownloadPresignedURL",
Handler: _FileService_GetObjectDownloadPresignedURL_Handler,
},
{
MethodName: "ListFiles",
Handler: _FileService_ListFiles_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "files.proto",
}

View File

@@ -0,0 +1,999 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: inference_service.proto
package gen
import (
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type InferenceServiceIdentifier struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *InferenceServiceIdentifier) Reset() {
*x = InferenceServiceIdentifier{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InferenceServiceIdentifier) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InferenceServiceIdentifier) ProtoMessage() {}
func (x *InferenceServiceIdentifier) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InferenceServiceIdentifier.ProtoReflect.Descriptor instead.
func (*InferenceServiceIdentifier) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{0}
}
func (x *InferenceServiceIdentifier) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *InferenceServiceIdentifier) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type Env struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *Env) Reset() {
*x = Env{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Env) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Env) ProtoMessage() {}
func (x *Env) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Env.ProtoReflect.Descriptor instead.
func (*Env) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{1}
}
func (x *Env) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Env) GetValue() string {
if x != nil {
return x.Value
}
return ""
}
type Container struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Env []*Env `protobuf:"bytes,3,rep,name=env,proto3" json:"env,omitempty"`
}
func (x *Container) Reset() {
*x = Container{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Container) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Container) ProtoMessage() {}
func (x *Container) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Container.ProtoReflect.Descriptor instead.
func (*Container) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{2}
}
func (x *Container) GetImage() string {
if x != nil {
return x.Image
}
return ""
}
func (x *Container) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Container) GetEnv() []*Env {
if x != nil {
return x.Env
}
return nil
}
type InferenceServiceTransformer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Containers []*Container `protobuf:"bytes,1,rep,name=containers,proto3" json:"containers,omitempty"`
MinCpu string `protobuf:"bytes,2,opt,name=minCpu,proto3" json:"minCpu,omitempty"`
MinMemory string `protobuf:"bytes,3,opt,name=minMemory,proto3" json:"minMemory,omitempty"`
MaxCpu string `protobuf:"bytes,4,opt,name=maxCpu,proto3" json:"maxCpu,omitempty"`
MaxMemory string `protobuf:"bytes,5,opt,name=maxMemory,proto3" json:"maxMemory,omitempty"`
}
func (x *InferenceServiceTransformer) Reset() {
*x = InferenceServiceTransformer{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InferenceServiceTransformer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InferenceServiceTransformer) ProtoMessage() {}
func (x *InferenceServiceTransformer) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InferenceServiceTransformer.ProtoReflect.Descriptor instead.
func (*InferenceServiceTransformer) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{3}
}
func (x *InferenceServiceTransformer) GetContainers() []*Container {
if x != nil {
return x.Containers
}
return nil
}
func (x *InferenceServiceTransformer) GetMinCpu() string {
if x != nil {
return x.MinCpu
}
return ""
}
func (x *InferenceServiceTransformer) GetMinMemory() string {
if x != nil {
return x.MinMemory
}
return ""
}
func (x *InferenceServiceTransformer) GetMaxCpu() string {
if x != nil {
return x.MaxCpu
}
return ""
}
func (x *InferenceServiceTransformer) GetMaxMemory() string {
if x != nil {
return x.MaxMemory
}
return ""
}
type InferenceServicePredictor struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
RuntimeVersion string `protobuf:"bytes,2,opt,name=runtimeVersion,proto3" json:"runtimeVersion,omitempty"`
StorageUri string `protobuf:"bytes,3,opt,name=storageUri,proto3" json:"storageUri,omitempty"`
NodeSelector string `protobuf:"bytes,4,opt,name=nodeSelector,proto3" json:"nodeSelector,omitempty"`
MinCpu string `protobuf:"bytes,5,opt,name=minCpu,proto3" json:"minCpu,omitempty"`
MinMemory string `protobuf:"bytes,6,opt,name=minMemory,proto3" json:"minMemory,omitempty"`
MaxCpu string `protobuf:"bytes,7,opt,name=maxCpu,proto3" json:"maxCpu,omitempty"`
MaxMemory string `protobuf:"bytes,8,opt,name=maxMemory,proto3" json:"maxMemory,omitempty"`
}
func (x *InferenceServicePredictor) Reset() {
*x = InferenceServicePredictor{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InferenceServicePredictor) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InferenceServicePredictor) ProtoMessage() {}
func (x *InferenceServicePredictor) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InferenceServicePredictor.ProtoReflect.Descriptor instead.
func (*InferenceServicePredictor) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{4}
}
func (x *InferenceServicePredictor) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *InferenceServicePredictor) GetRuntimeVersion() string {
if x != nil {
return x.RuntimeVersion
}
return ""
}
func (x *InferenceServicePredictor) GetStorageUri() string {
if x != nil {
return x.StorageUri
}
return ""
}
func (x *InferenceServicePredictor) GetNodeSelector() string {
if x != nil {
return x.NodeSelector
}
return ""
}
func (x *InferenceServicePredictor) GetMinCpu() string {
if x != nil {
return x.MinCpu
}
return ""
}
func (x *InferenceServicePredictor) GetMinMemory() string {
if x != nil {
return x.MinMemory
}
return ""
}
func (x *InferenceServicePredictor) GetMaxCpu() string {
if x != nil {
return x.MaxCpu
}
return ""
}
func (x *InferenceServicePredictor) GetMaxMemory() string {
if x != nil {
return x.MaxMemory
}
return ""
}
type CreateInferenceServiceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
DefaultTransformerImage string `protobuf:"bytes,3,opt,name=defaultTransformerImage,proto3" json:"defaultTransformerImage,omitempty"`
Predictor *InferenceServicePredictor `protobuf:"bytes,4,opt,name=predictor,proto3" json:"predictor,omitempty"`
Transformer *InferenceServiceTransformer `protobuf:"bytes,5,opt,name=transformer,proto3" json:"transformer,omitempty"`
}
func (x *CreateInferenceServiceRequest) Reset() {
*x = CreateInferenceServiceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateInferenceServiceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateInferenceServiceRequest) ProtoMessage() {}
func (x *CreateInferenceServiceRequest) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateInferenceServiceRequest.ProtoReflect.Descriptor instead.
func (*CreateInferenceServiceRequest) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{5}
}
func (x *CreateInferenceServiceRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *CreateInferenceServiceRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateInferenceServiceRequest) GetDefaultTransformerImage() string {
if x != nil {
return x.DefaultTransformerImage
}
return ""
}
func (x *CreateInferenceServiceRequest) GetPredictor() *InferenceServicePredictor {
if x != nil {
return x.Predictor
}
return nil
}
func (x *CreateInferenceServiceRequest) GetTransformer() *InferenceServiceTransformer {
if x != nil {
return x.Transformer
}
return nil
}
type DeployModelResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
}
func (x *DeployModelResponse) Reset() {
*x = DeployModelResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeployModelResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeployModelResponse) ProtoMessage() {}
func (x *DeployModelResponse) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeployModelResponse.ProtoReflect.Descriptor instead.
func (*DeployModelResponse) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{6}
}
func (x *DeployModelResponse) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
type InferenceServiceCondition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
LastTransitionTime string `protobuf:"bytes,1,opt,name=lastTransitionTime,proto3" json:"lastTransitionTime,omitempty"`
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
}
func (x *InferenceServiceCondition) Reset() {
*x = InferenceServiceCondition{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InferenceServiceCondition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InferenceServiceCondition) ProtoMessage() {}
func (x *InferenceServiceCondition) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InferenceServiceCondition.ProtoReflect.Descriptor instead.
func (*InferenceServiceCondition) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{7}
}
func (x *InferenceServiceCondition) GetLastTransitionTime() string {
if x != nil {
return x.LastTransitionTime
}
return ""
}
func (x *InferenceServiceCondition) GetStatus() string {
if x != nil {
return x.Status
}
return ""
}
func (x *InferenceServiceCondition) GetType() string {
if x != nil {
return x.Type
}
return ""
}
type GetInferenceServiceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Ready bool `protobuf:"varint,1,opt,name=ready,proto3" json:"ready,omitempty"`
Conditions []*InferenceServiceCondition `protobuf:"bytes,2,rep,name=conditions,proto3" json:"conditions,omitempty"`
PredictUrl string `protobuf:"bytes,3,opt,name=predictUrl,proto3" json:"predictUrl,omitempty"`
}
func (x *GetInferenceServiceResponse) Reset() {
*x = GetInferenceServiceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetInferenceServiceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetInferenceServiceResponse) ProtoMessage() {}
func (x *GetInferenceServiceResponse) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetInferenceServiceResponse.ProtoReflect.Descriptor instead.
func (*GetInferenceServiceResponse) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{8}
}
func (x *GetInferenceServiceResponse) GetReady() bool {
if x != nil {
return x.Ready
}
return false
}
func (x *GetInferenceServiceResponse) GetConditions() []*InferenceServiceCondition {
if x != nil {
return x.Conditions
}
return nil
}
func (x *GetInferenceServiceResponse) GetPredictUrl() string {
if x != nil {
return x.PredictUrl
}
return ""
}
type InferenceServiceEndpoints struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Predict string `protobuf:"bytes,1,opt,name=predict,proto3" json:"predict,omitempty"`
}
func (x *InferenceServiceEndpoints) Reset() {
*x = InferenceServiceEndpoints{}
if protoimpl.UnsafeEnabled {
mi := &file_inference_service_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InferenceServiceEndpoints) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InferenceServiceEndpoints) ProtoMessage() {}
func (x *InferenceServiceEndpoints) ProtoReflect() protoreflect.Message {
mi := &file_inference_service_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InferenceServiceEndpoints.ProtoReflect.Descriptor instead.
func (*InferenceServiceEndpoints) Descriptor() ([]byte, []int) {
return file_inference_service_proto_rawDescGZIP(), []int{9}
}
func (x *InferenceServiceEndpoints) GetPredict() string {
if x != nil {
return x.Predict
}
return ""
}
var File_inference_service_proto protoreflect.FileDescriptor
var file_inference_service_proto_rawDesc = []byte{
0x0a, 0x17, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d,
0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x1a, 0x49, 0x6e, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2f, 0x0a, 0x03, 0x45, 0x6e, 0x76,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x51, 0x0a, 0x09, 0x43, 0x6f,
0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x1a, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x6e, 0x76, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x22, 0xb9, 0x01,
0x0a, 0x1b, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x12, 0x2e, 0x0a,
0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
0x72, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a,
0x06, 0x6d, 0x69, 0x6e, 0x43, 0x70, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d,
0x69, 0x6e, 0x43, 0x70, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f,
0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d,
0x6f, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x18, 0x04, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d,
0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x22, 0x87, 0x02, 0x0a, 0x19, 0x49, 0x6e,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72,
0x65, 0x64, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x72,
0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x56, 0x65, 0x72, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x72,
0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65,
0x55, 0x72, 0x69, 0x12, 0x22, 0x0a, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63,
0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x6f, 0x64, 0x65, 0x53,
0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x69, 0x6e, 0x43, 0x70,
0x75, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x43, 0x70, 0x75, 0x12,
0x1c, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x6d, 0x69, 0x6e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x16, 0x0a,
0x06, 0x6d, 0x61, 0x78, 0x43, 0x70, 0x75, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d,
0x61, 0x78, 0x43, 0x70, 0x75, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d, 0x6f,
0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x78, 0x4d, 0x65, 0x6d,
0x6f, 0x72, 0x79, 0x22, 0x8d, 0x02, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e,
0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75,
0x6c, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x49, 0x6d, 0x61,
0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,
0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67,
0x65, 0x12, 0x3c, 0x0a, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x65, 0x64, 0x69,
0x63, 0x74, 0x6f, 0x72, 0x52, 0x09, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x6f, 0x72, 0x12,
0x42, 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72,
0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73,
0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72,
0x6d, 0x65, 0x72, 0x22, 0x2d, 0x0a, 0x13, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x4d, 0x6f, 0x64,
0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74,
0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74,
0x75, 0x73, 0x22, 0x77, 0x0a, 0x19, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x2e, 0x0a, 0x12, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6c, 0x61, 0x73,
0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12,
0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x1b,
0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72,
0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64,
0x79, 0x12, 0x3e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65,
0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x64,
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x55, 0x72, 0x6c, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x55, 0x72,
0x6c, 0x22, 0x35, 0x0a, 0x19, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18,
0x0a, 0x07, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x70, 0x72, 0x65, 0x64, 0x69, 0x63, 0x74, 0x32, 0xcf, 0x03, 0x0a, 0x10, 0x49, 0x6e, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x95, 0x01,
0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35,
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x22, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31,
0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x93, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0x20,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x8c, 0x01, 0x0a, 0x16,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x49, 0x6e, 0x66,
0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65,
0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,
0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x2a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x7d, 0x2f, 0x69, 0x6e, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69,
0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65,
0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_inference_service_proto_rawDescOnce sync.Once
file_inference_service_proto_rawDescData = file_inference_service_proto_rawDesc
)
func file_inference_service_proto_rawDescGZIP() []byte {
file_inference_service_proto_rawDescOnce.Do(func() {
file_inference_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_inference_service_proto_rawDescData)
})
return file_inference_service_proto_rawDescData
}
var file_inference_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
var file_inference_service_proto_goTypes = []interface{}{
(*InferenceServiceIdentifier)(nil), // 0: api.InferenceServiceIdentifier
(*Env)(nil), // 1: api.Env
(*Container)(nil), // 2: api.Container
(*InferenceServiceTransformer)(nil), // 3: api.InferenceServiceTransformer
(*InferenceServicePredictor)(nil), // 4: api.InferenceServicePredictor
(*CreateInferenceServiceRequest)(nil), // 5: api.CreateInferenceServiceRequest
(*DeployModelResponse)(nil), // 6: api.DeployModelResponse
(*InferenceServiceCondition)(nil), // 7: api.InferenceServiceCondition
(*GetInferenceServiceResponse)(nil), // 8: api.GetInferenceServiceResponse
(*InferenceServiceEndpoints)(nil), // 9: api.InferenceServiceEndpoints
(*emptypb.Empty)(nil), // 10: google.protobuf.Empty
}
var file_inference_service_proto_depIdxs = []int32{
1, // 0: api.Container.env:type_name -> api.Env
2, // 1: api.InferenceServiceTransformer.containers:type_name -> api.Container
4, // 2: api.CreateInferenceServiceRequest.predictor:type_name -> api.InferenceServicePredictor
3, // 3: api.CreateInferenceServiceRequest.transformer:type_name -> api.InferenceServiceTransformer
7, // 4: api.GetInferenceServiceResponse.conditions:type_name -> api.InferenceServiceCondition
5, // 5: api.InferenceService.CreateInferenceService:input_type -> api.CreateInferenceServiceRequest
0, // 6: api.InferenceService.GetInferenceService:input_type -> api.InferenceServiceIdentifier
0, // 7: api.InferenceService.DeleteInferenceService:input_type -> api.InferenceServiceIdentifier
8, // 8: api.InferenceService.CreateInferenceService:output_type -> api.GetInferenceServiceResponse
8, // 9: api.InferenceService.GetInferenceService:output_type -> api.GetInferenceServiceResponse
10, // 10: api.InferenceService.DeleteInferenceService:output_type -> google.protobuf.Empty
8, // [8:11] is the sub-list for method output_type
5, // [5:8] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_inference_service_proto_init() }
func file_inference_service_proto_init() {
if File_inference_service_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_inference_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InferenceServiceIdentifier); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Env); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Container); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InferenceServiceTransformer); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InferenceServicePredictor); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateInferenceServiceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeployModelResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InferenceServiceCondition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetInferenceServiceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_inference_service_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InferenceServiceEndpoints); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_inference_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 10,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_inference_service_proto_goTypes,
DependencyIndexes: file_inference_service_proto_depIdxs,
MessageInfos: file_inference_service_proto_msgTypes,
}.Build()
File_inference_service_proto = out.File
file_inference_service_proto_rawDesc = nil
file_inference_service_proto_goTypes = nil
file_inference_service_proto_depIdxs = nil
}

View File

@@ -0,0 +1,439 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: inference_service.proto
/*
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package gen
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_InferenceService_CreateInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, client InferenceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateInferenceServiceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := client.CreateInferenceService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_InferenceService_CreateInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, server InferenceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateInferenceServiceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := server.CreateInferenceService(ctx, &protoReq)
return msg, metadata, err
}
func request_InferenceService_GetInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, client InferenceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq InferenceServiceIdentifier
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := client.GetInferenceService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_InferenceService_GetInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, server InferenceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq InferenceServiceIdentifier
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := server.GetInferenceService(ctx, &protoReq)
return msg, metadata, err
}
func request_InferenceService_DeleteInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, client InferenceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq InferenceServiceIdentifier
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := client.DeleteInferenceService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_InferenceService_DeleteInferenceService_0(ctx context.Context, marshaler runtime.Marshaler, server InferenceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq InferenceServiceIdentifier
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := server.DeleteInferenceService(ctx, &protoReq)
return msg, metadata, err
}
// RegisterInferenceServiceHandlerServer registers the http handlers for service InferenceService to "mux".
// UnaryRPC :call InferenceServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterInferenceServiceHandlerFromEndpoint instead.
func RegisterInferenceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server InferenceServiceServer) error {
mux.Handle("POST", pattern_InferenceService_CreateInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.InferenceService/CreateInferenceService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_InferenceService_CreateInferenceService_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_InferenceService_CreateInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_InferenceService_GetInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.InferenceService/GetInferenceService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_InferenceService_GetInferenceService_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_InferenceService_GetInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("DELETE", pattern_InferenceService_DeleteInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.InferenceService/DeleteInferenceService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_InferenceService_DeleteInferenceService_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_InferenceService_DeleteInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterInferenceServiceHandlerFromEndpoint is same as RegisterInferenceServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterInferenceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterInferenceServiceHandler(ctx, mux, conn)
}
// RegisterInferenceServiceHandler registers the http handlers for service InferenceService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterInferenceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterInferenceServiceHandlerClient(ctx, mux, NewInferenceServiceClient(conn))
}
// RegisterInferenceServiceHandlerClient registers the http handlers for service InferenceService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "InferenceServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "InferenceServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "InferenceServiceClient" to call the correct interceptors.
func RegisterInferenceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client InferenceServiceClient) error {
mux.Handle("POST", pattern_InferenceService_CreateInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.InferenceService/CreateInferenceService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_InferenceService_CreateInferenceService_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_InferenceService_CreateInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_InferenceService_GetInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.InferenceService/GetInferenceService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_InferenceService_GetInferenceService_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_InferenceService_GetInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("DELETE", pattern_InferenceService_DeleteInferenceService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.InferenceService/DeleteInferenceService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_InferenceService_DeleteInferenceService_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_InferenceService_DeleteInferenceService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_InferenceService_CreateInferenceService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "inferenceservice"}, ""))
pattern_InferenceService_GetInferenceService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "inferenceservice", "name"}, ""))
pattern_InferenceService_DeleteInferenceService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "inferenceservice", "name"}, ""))
)
var (
forward_InferenceService_CreateInferenceService_0 = runtime.ForwardResponseMessage
forward_InferenceService_GetInferenceService_0 = runtime.ForwardResponseMessage
forward_InferenceService_DeleteInferenceService_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,170 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// InferenceServiceClient is the client API for InferenceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type InferenceServiceClient interface {
CreateInferenceService(ctx context.Context, in *CreateInferenceServiceRequest, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error)
GetInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error)
DeleteInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type inferenceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewInferenceServiceClient(cc grpc.ClientConnInterface) InferenceServiceClient {
return &inferenceServiceClient{cc}
}
func (c *inferenceServiceClient) CreateInferenceService(ctx context.Context, in *CreateInferenceServiceRequest, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error) {
out := new(GetInferenceServiceResponse)
err := c.cc.Invoke(ctx, "/api.InferenceService/CreateInferenceService", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *inferenceServiceClient) GetInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*GetInferenceServiceResponse, error) {
out := new(GetInferenceServiceResponse)
err := c.cc.Invoke(ctx, "/api.InferenceService/GetInferenceService", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *inferenceServiceClient) DeleteInferenceService(ctx context.Context, in *InferenceServiceIdentifier, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.InferenceService/DeleteInferenceService", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// InferenceServiceServer is the server API for InferenceService service.
// All implementations must embed UnimplementedInferenceServiceServer
// for forward compatibility
type InferenceServiceServer interface {
CreateInferenceService(context.Context, *CreateInferenceServiceRequest) (*GetInferenceServiceResponse, error)
GetInferenceService(context.Context, *InferenceServiceIdentifier) (*GetInferenceServiceResponse, error)
DeleteInferenceService(context.Context, *InferenceServiceIdentifier) (*emptypb.Empty, error)
mustEmbedUnimplementedInferenceServiceServer()
}
// UnimplementedInferenceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedInferenceServiceServer struct {
}
func (UnimplementedInferenceServiceServer) CreateInferenceService(context.Context, *CreateInferenceServiceRequest) (*GetInferenceServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateInferenceService not implemented")
}
func (UnimplementedInferenceServiceServer) GetInferenceService(context.Context, *InferenceServiceIdentifier) (*GetInferenceServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetInferenceService not implemented")
}
func (UnimplementedInferenceServiceServer) DeleteInferenceService(context.Context, *InferenceServiceIdentifier) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteInferenceService not implemented")
}
func (UnimplementedInferenceServiceServer) mustEmbedUnimplementedInferenceServiceServer() {}
// UnsafeInferenceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to InferenceServiceServer will
// result in compilation errors.
type UnsafeInferenceServiceServer interface {
mustEmbedUnimplementedInferenceServiceServer()
}
func RegisterInferenceServiceServer(s grpc.ServiceRegistrar, srv InferenceServiceServer) {
s.RegisterService(&_InferenceService_serviceDesc, srv)
}
func _InferenceService_CreateInferenceService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateInferenceServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InferenceServiceServer).CreateInferenceService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InferenceService/CreateInferenceService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InferenceServiceServer).CreateInferenceService(ctx, req.(*CreateInferenceServiceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InferenceService_GetInferenceService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InferenceServiceIdentifier)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InferenceServiceServer).GetInferenceService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InferenceService/GetInferenceService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InferenceServiceServer).GetInferenceService(ctx, req.(*InferenceServiceIdentifier))
}
return interceptor(ctx, in, info, handler)
}
func _InferenceService_DeleteInferenceService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(InferenceServiceIdentifier)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InferenceServiceServer).DeleteInferenceService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InferenceService/DeleteInferenceService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InferenceServiceServer).DeleteInferenceService(ctx, req.(*InferenceServiceIdentifier))
}
return interceptor(ctx, in, info, handler)
}
var _InferenceService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.InferenceService",
HandlerType: (*InferenceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateInferenceService",
Handler: _InferenceService_CreateInferenceService_Handler,
},
{
MethodName: "GetInferenceService",
Handler: _InferenceService_GetInferenceService_Handler,
},
{
MethodName: "DeleteInferenceService",
Handler: _InferenceService_DeleteInferenceService_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "inference_service.proto",
}

View File

@@ -1,18 +1,14 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: label.proto
package api
package gen
import (
context "context"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -337,6 +333,77 @@ func (x *GetLabelsRequest) GetUid() string {
return ""
}
type GetAvailableLabelsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Resource string `protobuf:"bytes,2,opt,name=resource,proto3" json:"resource,omitempty"`
KeyLike string `protobuf:"bytes,3,opt,name=keyLike,proto3" json:"keyLike,omitempty"`
SkipKeys string `protobuf:"bytes,4,opt,name=skipKeys,proto3" json:"skipKeys,omitempty"`
}
func (x *GetAvailableLabelsRequest) Reset() {
*x = GetAvailableLabelsRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetAvailableLabelsRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetAvailableLabelsRequest) ProtoMessage() {}
func (x *GetAvailableLabelsRequest) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetAvailableLabelsRequest.ProtoReflect.Descriptor instead.
func (*GetAvailableLabelsRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{5}
}
func (x *GetAvailableLabelsRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *GetAvailableLabelsRequest) GetResource() string {
if x != nil {
return x.Resource
}
return ""
}
func (x *GetAvailableLabelsRequest) GetKeyLike() string {
if x != nil {
return x.KeyLike
}
return ""
}
func (x *GetAvailableLabelsRequest) GetSkipKeys() string {
if x != nil {
return x.SkipKeys
}
return ""
}
type GetLabelsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -348,7 +415,7 @@ type GetLabelsResponse struct {
func (x *GetLabelsResponse) Reset() {
*x = GetLabelsResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[5]
mi := &file_label_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -361,7 +428,7 @@ func (x *GetLabelsResponse) String() string {
func (*GetLabelsResponse) ProtoMessage() {}
func (x *GetLabelsResponse) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[5]
mi := &file_label_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -374,7 +441,7 @@ func (x *GetLabelsResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetLabelsResponse.ProtoReflect.Descriptor instead.
func (*GetLabelsResponse) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{5}
return file_label_proto_rawDescGZIP(), []int{6}
}
func (x *GetLabelsResponse) GetLabels() []*KeyValue {
@@ -398,7 +465,7 @@ type DeleteLabelRequest struct {
func (x *DeleteLabelRequest) Reset() {
*x = DeleteLabelRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_label_proto_msgTypes[6]
mi := &file_label_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -411,7 +478,7 @@ func (x *DeleteLabelRequest) String() string {
func (*DeleteLabelRequest) ProtoMessage() {}
func (x *DeleteLabelRequest) ProtoReflect() protoreflect.Message {
mi := &file_label_proto_msgTypes[6]
mi := &file_label_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -424,7 +491,7 @@ func (x *DeleteLabelRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteLabelRequest.ProtoReflect.Descriptor instead.
func (*DeleteLabelRequest) Descriptor() ([]byte, []int) {
return file_label_proto_rawDescGZIP(), []int{6}
return file_label_proto_rawDescGZIP(), []int{7}
}
func (x *DeleteLabelRequest) GetNamespace() string {
@@ -490,51 +557,71 @@ var file_label_proto_rawDesc = []byte{
0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x75, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b,
0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22,
0x72, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x32, 0x8d, 0x04, 0x0a, 0x0c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x12, 0x75, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b,
0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7d, 0x0a, 0x09, 0x41,
0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41,
0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x22,
0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a, 0x0d, 0x52,
0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76,
0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75,
0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x12, 0x7f, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61,
0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69,
0x75, 0x69, 0x64, 0x22, 0x8b, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c,
0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6b,
0x65, 0x79, 0x4c, 0x69, 0x6b, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65,
0x79, 0x4c, 0x69, 0x6b, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79,
0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x6b, 0x69, 0x70, 0x4b, 0x65, 0x79,
0x73, 0x22, 0x3a, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4b, 0x65, 0x79,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x22, 0x72, 0x0a,
0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x10, 0x0a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
0x79, 0x32, 0x91, 0x05, 0x0a, 0x0c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61,
0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x12, 0x2b, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f,
0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x75, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62,
0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x61, 0x70, 0x69,
0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x61, 0x70, 0x69,
0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d,
0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6b,
0x65, 0x79, 0x7d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x7d, 0x0a,
0x09, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x41, 0x64, 0x64, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x3b, 0x22, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65,
0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x85, 0x01, 0x0a,
0x0d, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x19,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x4c, 0x61, 0x62, 0x65,
0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x1a, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x73,
0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x7d, 0x2f,
0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x3a, 0x06, 0x6c, 0x61,
0x62, 0x65, 0x6c, 0x73, 0x12, 0x7f, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4c, 0x61,
0x62, 0x65, 0x6c, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x2a, 0x37, 0x2f, 0x61,
0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x7d, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f,
0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63,
0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@@ -549,31 +636,34 @@ func file_label_proto_rawDescGZIP() []byte {
return file_label_proto_rawDescData
}
var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_label_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_label_proto_goTypes = []interface{}{
(*KeyValue)(nil), // 0: api.KeyValue
(*Labels)(nil), // 1: api.Labels
(*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest
(*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest
(*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest
(*GetLabelsResponse)(nil), // 5: api.GetLabelsResponse
(*DeleteLabelRequest)(nil), // 6: api.DeleteLabelRequest
(*KeyValue)(nil), // 0: api.KeyValue
(*Labels)(nil), // 1: api.Labels
(*AddLabelsRequest)(nil), // 2: api.AddLabelsRequest
(*ReplaceLabelsRequest)(nil), // 3: api.ReplaceLabelsRequest
(*GetLabelsRequest)(nil), // 4: api.GetLabelsRequest
(*GetAvailableLabelsRequest)(nil), // 5: api.GetAvailableLabelsRequest
(*GetLabelsResponse)(nil), // 6: api.GetLabelsResponse
(*DeleteLabelRequest)(nil), // 7: api.DeleteLabelRequest
}
var file_label_proto_depIdxs = []int32{
0, // 0: api.Labels.items:type_name -> api.KeyValue
1, // 1: api.AddLabelsRequest.labels:type_name -> api.Labels
1, // 2: api.ReplaceLabelsRequest.labels:type_name -> api.Labels
0, // 3: api.GetLabelsResponse.labels:type_name -> api.KeyValue
4, // 4: api.LabelService.GetLabels:input_type -> api.GetLabelsRequest
2, // 5: api.LabelService.AddLabels:input_type -> api.AddLabelsRequest
3, // 6: api.LabelService.ReplaceLabels:input_type -> api.ReplaceLabelsRequest
6, // 7: api.LabelService.DeleteLabel:input_type -> api.DeleteLabelRequest
5, // 8: api.LabelService.GetLabels:output_type -> api.GetLabelsResponse
5, // 9: api.LabelService.AddLabels:output_type -> api.GetLabelsResponse
5, // 10: api.LabelService.ReplaceLabels:output_type -> api.GetLabelsResponse
5, // 11: api.LabelService.DeleteLabel:output_type -> api.GetLabelsResponse
8, // [8:12] is the sub-list for method output_type
4, // [4:8] is the sub-list for method input_type
5, // 4: api.LabelService.GetAvailableLabels:input_type -> api.GetAvailableLabelsRequest
4, // 5: api.LabelService.GetLabels:input_type -> api.GetLabelsRequest
2, // 6: api.LabelService.AddLabels:input_type -> api.AddLabelsRequest
3, // 7: api.LabelService.ReplaceLabels:input_type -> api.ReplaceLabelsRequest
7, // 8: api.LabelService.DeleteLabel:input_type -> api.DeleteLabelRequest
6, // 9: api.LabelService.GetAvailableLabels:output_type -> api.GetLabelsResponse
6, // 10: api.LabelService.GetLabels:output_type -> api.GetLabelsResponse
6, // 11: api.LabelService.AddLabels:output_type -> api.GetLabelsResponse
6, // 12: api.LabelService.ReplaceLabels:output_type -> api.GetLabelsResponse
6, // 13: api.LabelService.DeleteLabel:output_type -> api.GetLabelsResponse
9, // [9:14] is the sub-list for method output_type
4, // [4:9] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
@@ -646,7 +736,7 @@ func file_label_proto_init() {
}
}
file_label_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetLabelsResponse); i {
switch v := v.(*GetAvailableLabelsRequest); i {
case 0:
return &v.state
case 1:
@@ -658,6 +748,18 @@ func file_label_proto_init() {
}
}
file_label_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetLabelsResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_label_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteLabelRequest); i {
case 0:
return &v.state
@@ -676,7 +778,7 @@ func file_label_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_label_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumMessages: 8,
NumExtensions: 0,
NumServices: 1,
},
@@ -689,191 +791,3 @@ func file_label_proto_init() {
file_label_proto_goTypes = nil
file_label_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// LabelServiceClient is the client API for LabelService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type LabelServiceClient interface {
GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
}
type labelServiceClient struct {
cc grpc.ClientConnInterface
}
func NewLabelServiceClient(cc grpc.ClientConnInterface) LabelServiceClient {
return &labelServiceClient{cc}
}
func (c *labelServiceClient) GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/GetLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/AddLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/ReplaceLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/DeleteLabel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LabelServiceServer is the server API for LabelService service.
type LabelServiceServer interface {
GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error)
AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error)
ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error)
DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error)
}
// UnimplementedLabelServiceServer can be embedded to have forward compatible implementations.
type UnimplementedLabelServiceServer struct {
}
func (*UnimplementedLabelServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented")
}
func (*UnimplementedLabelServiceServer) AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddLabels not implemented")
}
func (*UnimplementedLabelServiceServer) ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplaceLabels not implemented")
}
func (*UnimplementedLabelServiceServer) DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteLabel not implemented")
}
func RegisterLabelServiceServer(s *grpc.Server, srv LabelServiceServer) {
s.RegisterService(&_LabelService_serviceDesc, srv)
}
func _LabelService_GetLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).GetLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/GetLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).GetLabels(ctx, req.(*GetLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_AddLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).AddLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/AddLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).AddLabels(ctx, req.(*AddLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_ReplaceLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplaceLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).ReplaceLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/ReplaceLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).ReplaceLabels(ctx, req.(*ReplaceLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_DeleteLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteLabelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).DeleteLabel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/DeleteLabel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).DeleteLabel(ctx, req.(*DeleteLabelRequest))
}
return interceptor(ctx, in, info, handler)
}
var _LabelService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.LabelService",
HandlerType: (*LabelServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetLabels",
Handler: _LabelService_GetLabels_Handler,
},
{
MethodName: "AddLabels",
Handler: _LabelService_AddLabels_Handler,
},
{
MethodName: "ReplaceLabels",
Handler: _LabelService_ReplaceLabels_Handler,
},
{
MethodName: "DeleteLabel",
Handler: _LabelService_DeleteLabel_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "label.proto",
}

View File

@@ -2,25 +2,25 @@
// source: label.proto
/*
Package api is a reverse proxy.
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package api
package gen
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
@@ -29,7 +29,97 @@ var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
var (
filter_LabelService_GetAvailableLabels_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "resource": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
)
func request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAvailableLabelsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["resource"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource")
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LabelService_GetAvailableLabels_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.GetAvailableLabels(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_LabelService_GetAvailableLabels_0(ctx context.Context, marshaler runtime.Marshaler, server LabelServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetAvailableLabelsRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["resource"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "resource")
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_LabelService_GetAvailableLabels_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.GetAvailableLabels(ctx, &protoReq)
return msg, metadata, err
}
func request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Marshaler, client LabelServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetLabelsRequest
@@ -48,7 +138,6 @@ func request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Mar
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -59,7 +148,6 @@ func request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Mar
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -70,7 +158,6 @@ func request_LabelService_GetLabels_0(ctx context.Context, marshaler runtime.Mar
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -97,7 +184,6 @@ func local_request_LabelService_GetLabels_0(ctx context.Context, marshaler runti
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -108,7 +194,6 @@ func local_request_LabelService_GetLabels_0(ctx context.Context, marshaler runti
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -119,7 +204,6 @@ func local_request_LabelService_GetLabels_0(ctx context.Context, marshaler runti
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -154,7 +238,6 @@ func request_LabelService_AddLabels_0(ctx context.Context, marshaler runtime.Mar
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -165,7 +248,6 @@ func request_LabelService_AddLabels_0(ctx context.Context, marshaler runtime.Mar
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -176,7 +258,6 @@ func request_LabelService_AddLabels_0(ctx context.Context, marshaler runtime.Mar
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -211,7 +292,6 @@ func local_request_LabelService_AddLabels_0(ctx context.Context, marshaler runti
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -222,7 +302,6 @@ func local_request_LabelService_AddLabels_0(ctx context.Context, marshaler runti
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -233,7 +312,6 @@ func local_request_LabelService_AddLabels_0(ctx context.Context, marshaler runti
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -268,7 +346,6 @@ func request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler runtime
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -279,7 +356,6 @@ func request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler runtime
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -290,7 +366,6 @@ func request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler runtime
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -325,7 +400,6 @@ func local_request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler r
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -336,7 +410,6 @@ func local_request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler r
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -347,7 +420,6 @@ func local_request_LabelService_ReplaceLabels_0(ctx context.Context, marshaler r
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -374,7 +446,6 @@ func request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.M
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -385,7 +456,6 @@ func request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.M
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -396,7 +466,6 @@ func request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.M
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -407,7 +476,6 @@ func request_LabelService_DeleteLabel_0(ctx context.Context, marshaler runtime.M
}
protoReq.Key, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
}
@@ -434,7 +502,6 @@ func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler run
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -445,7 +512,6 @@ func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler run
}
protoReq.Resource, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "resource", err)
}
@@ -456,7 +522,6 @@ func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler run
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -467,7 +532,6 @@ func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler run
}
protoReq.Key, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
}
@@ -480,18 +544,45 @@ func local_request_LabelService_DeleteLabel_0(ctx context.Context, marshaler run
// RegisterLabelServiceHandlerServer registers the http handlers for service LabelService to "mux".
// UnaryRPC :call LabelServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterLabelServiceHandlerFromEndpoint instead.
func RegisterLabelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server LabelServiceServer) error {
mux.Handle("GET", pattern_LabelService_GetAvailableLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/GetAvailableLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/GetLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_LabelService_GetLabels_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -505,13 +596,16 @@ func RegisterLabelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
mux.Handle("POST", pattern_LabelService_AddLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/AddLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_LabelService_AddLabels_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -525,13 +619,16 @@ func RegisterLabelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
mux.Handle("PUT", pattern_LabelService_ReplaceLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/ReplaceLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_LabelService_ReplaceLabels_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -545,13 +642,16 @@ func RegisterLabelServiceHandlerServer(ctx context.Context, mux *runtime.ServeMu
mux.Handle("DELETE", pattern_LabelService_DeleteLabel_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.LabelService/DeleteLabel")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_LabelService_DeleteLabel_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -603,11 +703,31 @@ func RegisterLabelServiceHandler(ctx context.Context, mux *runtime.ServeMux, con
// "LabelServiceClient" to call the correct interceptors.
func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client LabelServiceClient) error {
mux.Handle("GET", pattern_LabelService_GetAvailableLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/GetAvailableLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_LabelService_GetAvailableLabels_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_LabelService_GetAvailableLabels_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_LabelService_GetLabels_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/GetLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -627,7 +747,7 @@ func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/AddLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -647,7 +767,7 @@ func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/ReplaceLabels")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -667,7 +787,7 @@ func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.LabelService/DeleteLabel")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -687,16 +807,20 @@ func RegisterLabelServiceHandlerClient(ctx context.Context, mux *runtime.ServeMu
}
var (
pattern_LabelService_GetLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_LabelService_GetAvailableLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "resource", "labels"}, ""))
pattern_LabelService_AddLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_LabelService_GetLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, ""))
pattern_LabelService_ReplaceLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_LabelService_AddLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, ""))
pattern_LabelService_DeleteLabel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels", "key"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_LabelService_ReplaceLabels_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels"}, ""))
pattern_LabelService_DeleteLabel_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 1, 0, 4, 1, 5, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "resource", "uid", "labels", "key"}, ""))
)
var (
forward_LabelService_GetAvailableLabels_0 = runtime.ForwardResponseMessage
forward_LabelService_GetLabels_0 = runtime.ForwardResponseMessage
forward_LabelService_AddLabels_0 = runtime.ForwardResponseMessage

241
api/gen/label_grpc.pb.go Normal file
View File

@@ -0,0 +1,241 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// LabelServiceClient is the client API for LabelService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type LabelServiceClient interface {
GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error)
}
type labelServiceClient struct {
cc grpc.ClientConnInterface
}
func NewLabelServiceClient(cc grpc.ClientConnInterface) LabelServiceClient {
return &labelServiceClient{cc}
}
func (c *labelServiceClient) GetAvailableLabels(ctx context.Context, in *GetAvailableLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/GetAvailableLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) GetLabels(ctx context.Context, in *GetLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/GetLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) AddLabels(ctx context.Context, in *AddLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/AddLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) ReplaceLabels(ctx context.Context, in *ReplaceLabelsRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/ReplaceLabels", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *labelServiceClient) DeleteLabel(ctx context.Context, in *DeleteLabelRequest, opts ...grpc.CallOption) (*GetLabelsResponse, error) {
out := new(GetLabelsResponse)
err := c.cc.Invoke(ctx, "/api.LabelService/DeleteLabel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LabelServiceServer is the server API for LabelService service.
// All implementations must embed UnimplementedLabelServiceServer
// for forward compatibility
type LabelServiceServer interface {
GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error)
GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error)
AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error)
ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error)
DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error)
mustEmbedUnimplementedLabelServiceServer()
}
// UnimplementedLabelServiceServer must be embedded to have forward compatible implementations.
type UnimplementedLabelServiceServer struct {
}
func (UnimplementedLabelServiceServer) GetAvailableLabels(context.Context, *GetAvailableLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetAvailableLabels not implemented")
}
func (UnimplementedLabelServiceServer) GetLabels(context.Context, *GetLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetLabels not implemented")
}
func (UnimplementedLabelServiceServer) AddLabels(context.Context, *AddLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddLabels not implemented")
}
func (UnimplementedLabelServiceServer) ReplaceLabels(context.Context, *ReplaceLabelsRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ReplaceLabels not implemented")
}
func (UnimplementedLabelServiceServer) DeleteLabel(context.Context, *DeleteLabelRequest) (*GetLabelsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteLabel not implemented")
}
func (UnimplementedLabelServiceServer) mustEmbedUnimplementedLabelServiceServer() {}
// UnsafeLabelServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LabelServiceServer will
// result in compilation errors.
type UnsafeLabelServiceServer interface {
mustEmbedUnimplementedLabelServiceServer()
}
func RegisterLabelServiceServer(s grpc.ServiceRegistrar, srv LabelServiceServer) {
s.RegisterService(&_LabelService_serviceDesc, srv)
}
func _LabelService_GetAvailableLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetAvailableLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).GetAvailableLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/GetAvailableLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).GetAvailableLabels(ctx, req.(*GetAvailableLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_GetLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).GetLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/GetLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).GetLabels(ctx, req.(*GetLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_AddLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).AddLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/AddLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).AddLabels(ctx, req.(*AddLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_ReplaceLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReplaceLabelsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).ReplaceLabels(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/ReplaceLabels",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).ReplaceLabels(ctx, req.(*ReplaceLabelsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _LabelService_DeleteLabel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteLabelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LabelServiceServer).DeleteLabel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.LabelService/DeleteLabel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LabelServiceServer).DeleteLabel(ctx, req.(*DeleteLabelRequest))
}
return interceptor(ctx, in, info, handler)
}
var _LabelService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.LabelService",
HandlerType: (*LabelServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetAvailableLabels",
Handler: _LabelService_GetAvailableLabels_Handler,
},
{
MethodName: "GetLabels",
Handler: _LabelService_GetLabels_Handler,
},
{
MethodName: "AddLabels",
Handler: _LabelService_AddLabels_Handler,
},
{
MethodName: "ReplaceLabels",
Handler: _LabelService_ReplaceLabels_Handler,
},
{
MethodName: "DeleteLabel",
Handler: _LabelService_DeleteLabel_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "label.proto",
}

View File

@@ -1,10 +1,10 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: metric.proto
package api
package gen
import (
proto "github.com/golang/protobuf/proto"
@@ -96,8 +96,10 @@ var file_metric_proto_rawDesc = []byte{
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01,
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (

View File

@@ -1,18 +1,14 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: namespace.proto
package api
package gen
import (
context "context"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
@@ -224,7 +220,8 @@ type Namespace struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
SourceName string `protobuf:"bytes,2,opt,name=sourceName,proto3" json:"sourceName,omitempty"`
}
func (x *Namespace) Reset() {
@@ -266,6 +263,13 @@ func (x *Namespace) GetName() string {
return ""
}
func (x *Namespace) GetSourceName() string {
if x != nil {
return x.SourceName
}
return ""
}
var File_namespace_proto protoreflect.FileDescriptor
var file_namespace_proto_rawDesc = []byte{
@@ -293,9 +297,11 @@ var file_namespace_proto_rawDesc = []byte{
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x1f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x3f, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65,
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xec, 0x01, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65,
0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6b, 0x0a, 0x0e,
0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x1a,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
@@ -310,7 +316,10 @@ var file_namespace_proto_rawDesc = []byte{
0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x25, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x09, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f,
0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -420,119 +429,3 @@ func file_namespace_proto_init() {
file_namespace_proto_goTypes = nil
file_namespace_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// NamespaceServiceClient is the client API for NamespaceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type NamespaceServiceClient interface {
ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error)
}
type namespaceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient {
return &namespaceServiceClient{cc}
}
func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) {
out := new(ListNamespacesResponse)
err := c.cc.Invoke(ctx, "/api.NamespaceService/ListNamespaces", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *namespaceServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) {
out := new(Namespace)
err := c.cc.Invoke(ctx, "/api.NamespaceService/CreateNamespace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NamespaceServiceServer is the server API for NamespaceService service.
type NamespaceServiceServer interface {
ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error)
}
// UnimplementedNamespaceServiceServer can be embedded to have forward compatible implementations.
type UnimplementedNamespaceServiceServer struct {
}
func (*UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented")
}
func (*UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented")
}
func RegisterNamespaceServiceServer(s *grpc.Server, srv NamespaceServiceServer) {
s.RegisterService(&_NamespaceService_serviceDesc, srv)
}
func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListNamespacesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NamespaceServiceServer).ListNamespaces(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.NamespaceService/ListNamespaces",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NamespaceService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateNamespaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NamespaceServiceServer).CreateNamespace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.NamespaceService/CreateNamespace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NamespaceServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NamespaceService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.NamespaceService",
HandlerType: (*NamespaceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListNamespaces",
Handler: _NamespaceService_ListNamespaces_Handler,
},
{
MethodName: "CreateNamespace",
Handler: _NamespaceService_CreateNamespace_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "namespace.proto",
}

View File

@@ -2,25 +2,25 @@
// source: namespace.proto
/*
Package api is a reverse proxy.
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package api
package gen
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
@@ -29,7 +29,7 @@ var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
var (
filter_NamespaceService_ListNamespaces_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
@@ -55,7 +55,10 @@ func local_request_NamespaceService_ListNamespaces_0(ctx context.Context, marsha
var protoReq ListNamespacesRequest
var metadata runtime.ServerMetadata
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_NamespaceService_ListNamespaces_0); err != nil {
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_ListNamespaces_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -101,18 +104,22 @@ func local_request_NamespaceService_CreateNamespace_0(ctx context.Context, marsh
// RegisterNamespaceServiceHandlerServer registers the http handlers for service NamespaceService to "mux".
// UnaryRPC :call NamespaceServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNamespaceServiceHandlerFromEndpoint instead.
func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServiceServer) error {
mux.Handle("GET", pattern_NamespaceService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.NamespaceService/ListNamespaces")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_NamespaceService_ListNamespaces_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -126,13 +133,16 @@ func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser
mux.Handle("POST", pattern_NamespaceService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.NamespaceService/CreateNamespace")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_NamespaceService_CreateNamespace_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -188,7 +198,7 @@ func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.NamespaceService/ListNamespaces")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -208,7 +218,7 @@ func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.NamespaceService/CreateNamespace")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -228,9 +238,9 @@ func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
}
var (
pattern_NamespaceService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_NamespaceService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, ""))
pattern_NamespaceService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_NamespaceService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"apis", "v1beta1", "namespaces"}, ""))
)
var (

View File

@@ -0,0 +1,133 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// NamespaceServiceClient is the client API for NamespaceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type NamespaceServiceClient interface {
ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error)
CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error)
}
type namespaceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient {
return &namespaceServiceClient{cc}
}
func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) {
out := new(ListNamespacesResponse)
err := c.cc.Invoke(ctx, "/api.NamespaceService/ListNamespaces", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *namespaceServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*Namespace, error) {
out := new(Namespace)
err := c.cc.Invoke(ctx, "/api.NamespaceService/CreateNamespace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NamespaceServiceServer is the server API for NamespaceService service.
// All implementations must embed UnimplementedNamespaceServiceServer
// for forward compatibility
type NamespaceServiceServer interface {
ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error)
CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error)
mustEmbedUnimplementedNamespaceServiceServer()
}
// UnimplementedNamespaceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedNamespaceServiceServer struct {
}
func (UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented")
}
func (UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*Namespace, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented")
}
func (UnimplementedNamespaceServiceServer) mustEmbedUnimplementedNamespaceServiceServer() {}
// UnsafeNamespaceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to NamespaceServiceServer will
// result in compilation errors.
type UnsafeNamespaceServiceServer interface {
mustEmbedUnimplementedNamespaceServiceServer()
}
func RegisterNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer) {
s.RegisterService(&_NamespaceService_serviceDesc, srv)
}
func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListNamespacesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NamespaceServiceServer).ListNamespaces(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.NamespaceService/ListNamespaces",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _NamespaceService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateNamespaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NamespaceServiceServer).CreateNamespace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.NamespaceService/CreateNamespace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NamespaceServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NamespaceService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.NamespaceService",
HandlerType: (*NamespaceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListNamespaces",
Handler: _NamespaceService_ListNamespaces_Handler,
},
{
MethodName: "CreateNamespace",
Handler: _NamespaceService_CreateNamespace_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "namespace.proto",
}

View File

@@ -1,21 +1,17 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.22.0
// protoc v3.11.4
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: secret.proto
package api
package gen
import (
context "context"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
emptypb "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
)
@@ -960,7 +956,10 @@ var file_secret_proto_rawDesc = []byte{
0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73,
0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x73,
0x65, 0x63, 0x72, 0x65, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x3a, 0x06, 0x73, 0x65, 0x63,
0x72, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x72, 0x65, 0x74, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x6f, 0x6e, 0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72,
0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
@@ -993,7 +992,7 @@ var file_secret_proto_goTypes = []interface{}{
(*GetSecretRequest)(nil), // 13: api.GetSecretRequest
(*Secret)(nil), // 14: api.Secret
nil, // 15: api.Secret.DataEntry
(*empty.Empty)(nil), // 16: google.protobuf.Empty
(*emptypb.Empty)(nil), // 16: google.protobuf.Empty
}
var file_secret_proto_depIdxs = []int32{
14, // 0: api.AddSecretKeyValueRequest.secret:type_name -> api.Secret
@@ -1230,335 +1229,3 @@ func file_secret_proto_init() {
file_secret_proto_goTypes = nil
file_secret_proto_depIdxs = nil
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// SecretServiceClient is the client API for SecretService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SecretServiceClient interface {
CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*empty.Empty, error)
SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error)
GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error)
ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error)
DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error)
DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error)
AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error)
UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error)
}
type secretServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSecretServiceClient(cc grpc.ClientConnInterface) SecretServiceClient {
return &secretServiceClient{cc}
}
func (c *secretServiceClient) CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/api.SecretService/CreateSecret", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error) {
out := new(SecretExistsResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/SecretExists", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error) {
out := new(Secret)
err := c.cc.Invoke(ctx, "/api.SecretService/GetSecret", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) {
out := new(ListSecretsResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/ListSecrets", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error) {
out := new(DeleteSecretResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecret", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error) {
out := new(DeleteSecretKeyResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecretKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error) {
out := new(AddSecretKeyValueResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/AddSecretKeyValue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error) {
out := new(UpdateSecretKeyValueResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/UpdateSecretKeyValue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SecretServiceServer is the server API for SecretService service.
type SecretServiceServer interface {
CreateSecret(context.Context, *CreateSecretRequest) (*empty.Empty, error)
SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error)
GetSecret(context.Context, *GetSecretRequest) (*Secret, error)
ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error)
DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error)
DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error)
AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error)
UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error)
}
// UnimplementedSecretServiceServer can be embedded to have forward compatible implementations.
type UnimplementedSecretServiceServer struct {
}
func (*UnimplementedSecretServiceServer) CreateSecret(context.Context, *CreateSecretRequest) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSecret not implemented")
}
func (*UnimplementedSecretServiceServer) SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SecretExists not implemented")
}
func (*UnimplementedSecretServiceServer) GetSecret(context.Context, *GetSecretRequest) (*Secret, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSecret not implemented")
}
func (*UnimplementedSecretServiceServer) ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListSecrets not implemented")
}
func (*UnimplementedSecretServiceServer) DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteSecret not implemented")
}
func (*UnimplementedSecretServiceServer) DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteSecretKey not implemented")
}
func (*UnimplementedSecretServiceServer) AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddSecretKeyValue not implemented")
}
func (*UnimplementedSecretServiceServer) UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSecretKeyValue not implemented")
}
func RegisterSecretServiceServer(s *grpc.Server, srv SecretServiceServer) {
s.RegisterService(&_SecretService_serviceDesc, srv)
}
func _SecretService_CreateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateSecretRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).CreateSecret(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/CreateSecret",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).CreateSecret(ctx, req.(*CreateSecretRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_SecretExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SecretExistsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).SecretExists(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/SecretExists",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).SecretExists(ctx, req.(*SecretExistsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_GetSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSecretRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).GetSecret(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/GetSecret",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).GetSecret(ctx, req.(*GetSecretRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_ListSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSecretsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).ListSecrets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/ListSecrets",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).ListSecrets(ctx, req.(*ListSecretsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_DeleteSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSecretRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).DeleteSecret(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/DeleteSecret",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).DeleteSecret(ctx, req.(*DeleteSecretRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_DeleteSecretKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSecretKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).DeleteSecretKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/DeleteSecretKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).DeleteSecretKey(ctx, req.(*DeleteSecretKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_AddSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddSecretKeyValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).AddSecretKeyValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/AddSecretKeyValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).AddSecretKeyValue(ctx, req.(*AddSecretKeyValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_UpdateSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSecretKeyValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/UpdateSecretKeyValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, req.(*UpdateSecretKeyValueRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SecretService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.SecretService",
HandlerType: (*SecretServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateSecret",
Handler: _SecretService_CreateSecret_Handler,
},
{
MethodName: "SecretExists",
Handler: _SecretService_SecretExists_Handler,
},
{
MethodName: "GetSecret",
Handler: _SecretService_GetSecret_Handler,
},
{
MethodName: "ListSecrets",
Handler: _SecretService_ListSecrets_Handler,
},
{
MethodName: "DeleteSecret",
Handler: _SecretService_DeleteSecret_Handler,
},
{
MethodName: "DeleteSecretKey",
Handler: _SecretService_DeleteSecretKey_Handler,
},
{
MethodName: "AddSecretKeyValue",
Handler: _SecretService_AddSecretKeyValue_Handler,
},
{
MethodName: "UpdateSecretKeyValue",
Handler: _SecretService_UpdateSecretKeyValue_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "secret.proto",
}

View File

@@ -2,25 +2,25 @@
// source: secret.proto
/*
Package api is a reverse proxy.
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package api
package gen
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
@@ -29,7 +29,7 @@ var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
func request_SecretService_CreateSecret_0(ctx context.Context, marshaler runtime.Marshaler, client SecretServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateSecretRequest
@@ -56,7 +56,6 @@ func request_SecretService_CreateSecret_0(ctx context.Context, marshaler runtime
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -91,7 +90,6 @@ func local_request_SecretService_CreateSecret_0(ctx context.Context, marshaler r
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -118,7 +116,6 @@ func request_SecretService_SecretExists_0(ctx context.Context, marshaler runtime
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -129,7 +126,6 @@ func request_SecretService_SecretExists_0(ctx context.Context, marshaler runtime
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
@@ -156,7 +152,6 @@ func local_request_SecretService_SecretExists_0(ctx context.Context, marshaler r
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -167,7 +162,6 @@ func local_request_SecretService_SecretExists_0(ctx context.Context, marshaler r
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
@@ -194,7 +188,6 @@ func request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Ma
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -205,7 +198,6 @@ func request_SecretService_GetSecret_0(ctx context.Context, marshaler runtime.Ma
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
@@ -232,7 +224,6 @@ func local_request_SecretService_GetSecret_0(ctx context.Context, marshaler runt
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -243,7 +234,6 @@ func local_request_SecretService_GetSecret_0(ctx context.Context, marshaler runt
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
@@ -270,7 +260,6 @@ func request_SecretService_ListSecrets_0(ctx context.Context, marshaler runtime.
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -297,7 +286,6 @@ func local_request_SecretService_ListSecrets_0(ctx context.Context, marshaler ru
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -324,7 +312,6 @@ func request_SecretService_DeleteSecret_0(ctx context.Context, marshaler runtime
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -335,7 +322,6 @@ func request_SecretService_DeleteSecret_0(ctx context.Context, marshaler runtime
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
@@ -362,7 +348,6 @@ func local_request_SecretService_DeleteSecret_0(ctx context.Context, marshaler r
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -373,7 +358,6 @@ func local_request_SecretService_DeleteSecret_0(ctx context.Context, marshaler r
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
@@ -400,7 +384,6 @@ func request_SecretService_DeleteSecretKey_0(ctx context.Context, marshaler runt
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -411,7 +394,6 @@ func request_SecretService_DeleteSecretKey_0(ctx context.Context, marshaler runt
}
protoReq.SecretName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secretName", err)
}
@@ -422,7 +404,6 @@ func request_SecretService_DeleteSecretKey_0(ctx context.Context, marshaler runt
}
protoReq.Key, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
}
@@ -449,7 +430,6 @@ func local_request_SecretService_DeleteSecretKey_0(ctx context.Context, marshale
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -460,7 +440,6 @@ func local_request_SecretService_DeleteSecretKey_0(ctx context.Context, marshale
}
protoReq.SecretName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secretName", err)
}
@@ -471,7 +450,6 @@ func local_request_SecretService_DeleteSecretKey_0(ctx context.Context, marshale
}
protoReq.Key, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "key", err)
}
@@ -506,7 +484,6 @@ func request_SecretService_AddSecretKeyValue_0(ctx context.Context, marshaler ru
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -517,7 +494,6 @@ func request_SecretService_AddSecretKeyValue_0(ctx context.Context, marshaler ru
}
err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err)
}
@@ -552,7 +528,6 @@ func local_request_SecretService_AddSecretKeyValue_0(ctx context.Context, marsha
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -563,7 +538,6 @@ func local_request_SecretService_AddSecretKeyValue_0(ctx context.Context, marsha
}
err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err)
}
@@ -598,7 +572,6 @@ func request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, marshaler
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -609,7 +582,6 @@ func request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, marshaler
}
err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err)
}
@@ -644,7 +616,6 @@ func local_request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, mar
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -655,7 +626,6 @@ func local_request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, mar
}
err = runtime.PopulateFieldFromPath(&protoReq, "secret.name", val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "secret.name", err)
}
@@ -668,18 +638,22 @@ func local_request_SecretService_UpdateSecretKeyValue_0(ctx context.Context, mar
// RegisterSecretServiceHandlerServer registers the http handlers for service SecretService to "mux".
// UnaryRPC :call SecretServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSecretServiceHandlerFromEndpoint instead.
func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecretServiceServer) error {
mux.Handle("POST", pattern_SecretService_CreateSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/CreateSecret")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_CreateSecret_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -693,13 +667,16 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
mux.Handle("GET", pattern_SecretService_SecretExists_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/SecretExists")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_SecretExists_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -713,13 +690,16 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
mux.Handle("GET", pattern_SecretService_GetSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/GetSecret")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_GetSecret_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -733,13 +713,16 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
mux.Handle("GET", pattern_SecretService_ListSecrets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/ListSecrets")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_ListSecrets_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -753,13 +736,16 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
mux.Handle("DELETE", pattern_SecretService_DeleteSecret_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/DeleteSecret")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_DeleteSecret_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -773,13 +759,16 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
mux.Handle("DELETE", pattern_SecretService_DeleteSecretKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/DeleteSecretKey")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_DeleteSecretKey_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -793,13 +782,16 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
mux.Handle("POST", pattern_SecretService_AddSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/AddSecretKeyValue")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_AddSecretKeyValue_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -813,13 +805,16 @@ func RegisterSecretServiceHandlerServer(ctx context.Context, mux *runtime.ServeM
mux.Handle("PATCH", pattern_SecretService_UpdateSecretKeyValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.SecretService/UpdateSecretKeyValue")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_SecretService_UpdateSecretKeyValue_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -875,7 +870,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/CreateSecret")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -895,7 +890,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/SecretExists")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -915,7 +910,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/GetSecret")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -935,7 +930,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/ListSecrets")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -955,7 +950,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/DeleteSecret")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -975,7 +970,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/DeleteSecretKey")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -995,7 +990,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/AddSecretKeyValue")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -1015,7 +1010,7 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.SecretService/UpdateSecretKeyValue")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -1035,21 +1030,21 @@ func RegisterSecretServiceHandlerClient(ctx context.Context, mux *runtime.ServeM
}
var (
pattern_SecretService_CreateSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_CreateSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, ""))
pattern_SecretService_SecretExists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "secrets", "name", "exists"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_SecretExists_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "secrets", "name", "exists"}, ""))
pattern_SecretService_GetSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_GetSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, ""))
pattern_SecretService_ListSecrets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_ListSecrets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "secrets"}, ""))
pattern_SecretService_DeleteSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_DeleteSecret_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "name"}, ""))
pattern_SecretService_DeleteSecretKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "secrets", "secretName", "keys", "key"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_DeleteSecretKey_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"apis", "v1beta1", "namespace", "secrets", "secretName", "keys", "key"}, ""))
pattern_SecretService_AddSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_AddSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, ""))
pattern_SecretService_UpdateSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_SecretService_UpdateSecretKeyValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "secrets", "secret.name"}, ""))
)
var (

350
api/gen/secret_grpc.pb.go Normal file
View File

@@ -0,0 +1,350 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// SecretServiceClient is the client API for SecretService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SecretServiceClient interface {
CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error)
GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error)
ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error)
DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error)
DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error)
AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error)
UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error)
}
type secretServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSecretServiceClient(cc grpc.ClientConnInterface) SecretServiceClient {
return &secretServiceClient{cc}
}
func (c *secretServiceClient) CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.SecretService/CreateSecret", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) SecretExists(ctx context.Context, in *SecretExistsRequest, opts ...grpc.CallOption) (*SecretExistsResponse, error) {
out := new(SecretExistsResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/SecretExists", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) GetSecret(ctx context.Context, in *GetSecretRequest, opts ...grpc.CallOption) (*Secret, error) {
out := new(Secret)
err := c.cc.Invoke(ctx, "/api.SecretService/GetSecret", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error) {
out := new(ListSecretsResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/ListSecrets", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error) {
out := new(DeleteSecretResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecret", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) DeleteSecretKey(ctx context.Context, in *DeleteSecretKeyRequest, opts ...grpc.CallOption) (*DeleteSecretKeyResponse, error) {
out := new(DeleteSecretKeyResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/DeleteSecretKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) AddSecretKeyValue(ctx context.Context, in *AddSecretKeyValueRequest, opts ...grpc.CallOption) (*AddSecretKeyValueResponse, error) {
out := new(AddSecretKeyValueResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/AddSecretKeyValue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *secretServiceClient) UpdateSecretKeyValue(ctx context.Context, in *UpdateSecretKeyValueRequest, opts ...grpc.CallOption) (*UpdateSecretKeyValueResponse, error) {
out := new(UpdateSecretKeyValueResponse)
err := c.cc.Invoke(ctx, "/api.SecretService/UpdateSecretKeyValue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SecretServiceServer is the server API for SecretService service.
// All implementations must embed UnimplementedSecretServiceServer
// for forward compatibility
type SecretServiceServer interface {
CreateSecret(context.Context, *CreateSecretRequest) (*emptypb.Empty, error)
SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error)
GetSecret(context.Context, *GetSecretRequest) (*Secret, error)
ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error)
DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error)
DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error)
AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error)
UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error)
mustEmbedUnimplementedSecretServiceServer()
}
// UnimplementedSecretServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSecretServiceServer struct {
}
func (UnimplementedSecretServiceServer) CreateSecret(context.Context, *CreateSecretRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateSecret not implemented")
}
func (UnimplementedSecretServiceServer) SecretExists(context.Context, *SecretExistsRequest) (*SecretExistsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SecretExists not implemented")
}
func (UnimplementedSecretServiceServer) GetSecret(context.Context, *GetSecretRequest) (*Secret, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSecret not implemented")
}
func (UnimplementedSecretServiceServer) ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListSecrets not implemented")
}
func (UnimplementedSecretServiceServer) DeleteSecret(context.Context, *DeleteSecretRequest) (*DeleteSecretResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteSecret not implemented")
}
func (UnimplementedSecretServiceServer) DeleteSecretKey(context.Context, *DeleteSecretKeyRequest) (*DeleteSecretKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteSecretKey not implemented")
}
func (UnimplementedSecretServiceServer) AddSecretKeyValue(context.Context, *AddSecretKeyValueRequest) (*AddSecretKeyValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddSecretKeyValue not implemented")
}
func (UnimplementedSecretServiceServer) UpdateSecretKeyValue(context.Context, *UpdateSecretKeyValueRequest) (*UpdateSecretKeyValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSecretKeyValue not implemented")
}
func (UnimplementedSecretServiceServer) mustEmbedUnimplementedSecretServiceServer() {}
// UnsafeSecretServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SecretServiceServer will
// result in compilation errors.
type UnsafeSecretServiceServer interface {
mustEmbedUnimplementedSecretServiceServer()
}
func RegisterSecretServiceServer(s grpc.ServiceRegistrar, srv SecretServiceServer) {
s.RegisterService(&_SecretService_serviceDesc, srv)
}
func _SecretService_CreateSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateSecretRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).CreateSecret(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/CreateSecret",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).CreateSecret(ctx, req.(*CreateSecretRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_SecretExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SecretExistsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).SecretExists(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/SecretExists",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).SecretExists(ctx, req.(*SecretExistsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_GetSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSecretRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).GetSecret(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/GetSecret",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).GetSecret(ctx, req.(*GetSecretRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_ListSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSecretsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).ListSecrets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/ListSecrets",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).ListSecrets(ctx, req.(*ListSecretsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_DeleteSecret_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSecretRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).DeleteSecret(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/DeleteSecret",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).DeleteSecret(ctx, req.(*DeleteSecretRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_DeleteSecretKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSecretKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).DeleteSecretKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/DeleteSecretKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).DeleteSecretKey(ctx, req.(*DeleteSecretKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_AddSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddSecretKeyValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).AddSecretKeyValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/AddSecretKeyValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).AddSecretKeyValue(ctx, req.(*AddSecretKeyValueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SecretService_UpdateSecretKeyValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSecretKeyValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.SecretService/UpdateSecretKeyValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SecretServiceServer).UpdateSecretKeyValue(ctx, req.(*UpdateSecretKeyValueRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SecretService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.SecretService",
HandlerType: (*SecretServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateSecret",
Handler: _SecretService_CreateSecret_Handler,
},
{
MethodName: "SecretExists",
Handler: _SecretService_SecretExists_Handler,
},
{
MethodName: "GetSecret",
Handler: _SecretService_GetSecret_Handler,
},
{
MethodName: "ListSecrets",
Handler: _SecretService_ListSecrets_Handler,
},
{
MethodName: "DeleteSecret",
Handler: _SecretService_DeleteSecret_Handler,
},
{
MethodName: "DeleteSecretKey",
Handler: _SecretService_DeleteSecretKey_Handler,
},
{
MethodName: "AddSecretKeyValue",
Handler: _SecretService_AddSecretKeyValue_Handler,
},
{
MethodName: "UpdateSecretKeyValue",
Handler: _SecretService_UpdateSecretKeyValue_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "secret.proto",
}

570
api/gen/services.pb.go Normal file
View File

@@ -0,0 +1,570 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0
// protoc v3.14.0
// source: services.proto
package gen
import (
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const _ = proto.ProtoPackageIsVersion4
type Service struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"`
}
func (x *Service) Reset() {
*x = Service{}
if protoimpl.UnsafeEnabled {
mi := &file_services_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Service) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Service) ProtoMessage() {}
func (x *Service) ProtoReflect() protoreflect.Message {
mi := &file_services_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Service.ProtoReflect.Descriptor instead.
func (*Service) Descriptor() ([]byte, []int) {
return file_services_proto_rawDescGZIP(), []int{0}
}
func (x *Service) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Service) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
type GetServiceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *GetServiceRequest) Reset() {
*x = GetServiceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetServiceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetServiceRequest) ProtoMessage() {}
func (x *GetServiceRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetServiceRequest.ProtoReflect.Descriptor instead.
func (*GetServiceRequest) Descriptor() ([]byte, []int) {
return file_services_proto_rawDescGZIP(), []int{1}
}
func (x *GetServiceRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *GetServiceRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type HasServiceRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}
func (x *HasServiceRequest) Reset() {
*x = HasServiceRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HasServiceRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HasServiceRequest) ProtoMessage() {}
func (x *HasServiceRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HasServiceRequest.ProtoReflect.Descriptor instead.
func (*HasServiceRequest) Descriptor() ([]byte, []int) {
return file_services_proto_rawDescGZIP(), []int{2}
}
func (x *HasServiceRequest) GetName() string {
if x != nil {
return x.Name
}
return ""
}
type HasServiceResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
HasService bool `protobuf:"varint,1,opt,name=hasService,proto3" json:"hasService,omitempty"`
}
func (x *HasServiceResponse) Reset() {
*x = HasServiceResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_services_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HasServiceResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HasServiceResponse) ProtoMessage() {}
func (x *HasServiceResponse) ProtoReflect() protoreflect.Message {
mi := &file_services_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HasServiceResponse.ProtoReflect.Descriptor instead.
func (*HasServiceResponse) Descriptor() ([]byte, []int) {
return file_services_proto_rawDescGZIP(), []int{3}
}
func (x *HasServiceResponse) GetHasService() bool {
if x != nil {
return x.HasService
}
return false
}
type ListServicesRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
}
func (x *ListServicesRequest) Reset() {
*x = ListServicesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_services_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListServicesRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListServicesRequest) ProtoMessage() {}
func (x *ListServicesRequest) ProtoReflect() protoreflect.Message {
mi := &file_services_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListServicesRequest.ProtoReflect.Descriptor instead.
func (*ListServicesRequest) Descriptor() ([]byte, []int) {
return file_services_proto_rawDescGZIP(), []int{4}
}
func (x *ListServicesRequest) GetNamespace() string {
if x != nil {
return x.Namespace
}
return ""
}
func (x *ListServicesRequest) GetPageSize() int32 {
if x != nil {
return x.PageSize
}
return 0
}
func (x *ListServicesRequest) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
type ListServicesResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
Services []*Service `protobuf:"bytes,2,rep,name=services,proto3" json:"services,omitempty"`
Page int32 `protobuf:"varint,3,opt,name=page,proto3" json:"page,omitempty"`
Pages int32 `protobuf:"varint,4,opt,name=pages,proto3" json:"pages,omitempty"`
TotalCount int32 `protobuf:"varint,5,opt,name=totalCount,proto3" json:"totalCount,omitempty"`
}
func (x *ListServicesResponse) Reset() {
*x = ListServicesResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_services_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListServicesResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListServicesResponse) ProtoMessage() {}
func (x *ListServicesResponse) ProtoReflect() protoreflect.Message {
mi := &file_services_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListServicesResponse.ProtoReflect.Descriptor instead.
func (*ListServicesResponse) Descriptor() ([]byte, []int) {
return file_services_proto_rawDescGZIP(), []int{5}
}
func (x *ListServicesResponse) GetCount() int32 {
if x != nil {
return x.Count
}
return 0
}
func (x *ListServicesResponse) GetServices() []*Service {
if x != nil {
return x.Services
}
return nil
}
func (x *ListServicesResponse) GetPage() int32 {
if x != nil {
return x.Page
}
return 0
}
func (x *ListServicesResponse) GetPages() int32 {
if x != nil {
return x.Pages
}
return 0
}
func (x *ListServicesResponse) GetTotalCount() int32 {
if x != nil {
return x.TotalCount
}
return 0
}
var File_services_proto protoreflect.FileDescriptor
var file_services_proto_rawDesc = []byte{
0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x2f, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x03, 0x75, 0x72, 0x6c, 0x22, 0x45, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d,
0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61,
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x27, 0x0a, 0x11, 0x48,
0x61, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x34, 0x0a, 0x12, 0x48, 0x61, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x68, 0x61,
0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
0x68, 0x61, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x63, 0x0a, 0x13, 0x4c, 0x69,
0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70,
0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22,
0xa0, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28,
0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08,
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05,
0x70, 0x61, 0x67, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x70, 0x61, 0x67,
0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74,
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x32, 0xca, 0x02, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x2a, 0x12, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x6e, 0x0a, 0x0c, 0x4c,
0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, 0x21, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f,
0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
0x63, 0x65, 0x7d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x62, 0x0a, 0x0a, 0x48,
0x61, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x48, 0x61, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x61, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42,
0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e,
0x65, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x69, 0x6f, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x67, 0x65, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_services_proto_rawDescOnce sync.Once
file_services_proto_rawDescData = file_services_proto_rawDesc
)
func file_services_proto_rawDescGZIP() []byte {
file_services_proto_rawDescOnce.Do(func() {
file_services_proto_rawDescData = protoimpl.X.CompressGZIP(file_services_proto_rawDescData)
})
return file_services_proto_rawDescData
}
var file_services_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_services_proto_goTypes = []interface{}{
(*Service)(nil), // 0: api.Service
(*GetServiceRequest)(nil), // 1: api.GetServiceRequest
(*HasServiceRequest)(nil), // 2: api.HasServiceRequest
(*HasServiceResponse)(nil), // 3: api.HasServiceResponse
(*ListServicesRequest)(nil), // 4: api.ListServicesRequest
(*ListServicesResponse)(nil), // 5: api.ListServicesResponse
}
var file_services_proto_depIdxs = []int32{
0, // 0: api.ListServicesResponse.services:type_name -> api.Service
1, // 1: api.ServiceService.GetService:input_type -> api.GetServiceRequest
4, // 2: api.ServiceService.ListServices:input_type -> api.ListServicesRequest
2, // 3: api.ServiceService.HasService:input_type -> api.HasServiceRequest
0, // 4: api.ServiceService.GetService:output_type -> api.Service
5, // 5: api.ServiceService.ListServices:output_type -> api.ListServicesResponse
3, // 6: api.ServiceService.HasService:output_type -> api.HasServiceResponse
4, // [4:7] is the sub-list for method output_type
1, // [1:4] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_services_proto_init() }
func file_services_proto_init() {
if File_services_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_services_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Service); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetServiceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HasServiceRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HasServiceResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListServicesRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_services_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListServicesResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_services_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_services_proto_goTypes,
DependencyIndexes: file_services_proto_depIdxs,
MessageInfos: file_services_proto_msgTypes,
}.Build()
File_services_proto = out.File
file_services_proto_rawDesc = nil
file_services_proto_goTypes = nil
file_services_proto_depIdxs = nil
}

421
api/gen/services.pb.gw.go Normal file
View File

@@ -0,0 +1,421 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: services.proto
/*
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package gen
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_ServiceService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetServiceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := client.GetService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ServiceService_GetService_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetServiceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := server.GetService(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_ServiceService_ListServices_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_ServiceService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListServicesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceService_ListServices_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListServices(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ServiceService_ListServices_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListServicesRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ServiceService_ListServices_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListServices(ctx, &protoReq)
return msg, metadata, err
}
func request_ServiceService_HasService_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq HasServiceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := client.HasService(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ServiceService_HasService_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq HasServiceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["name"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
}
protoReq.Name, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
}
msg, err := server.HasService(ctx, &protoReq)
return msg, metadata, err
}
// RegisterServiceServiceHandlerServer registers the http handlers for service ServiceService to "mux".
// UnaryRPC :call ServiceServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceServiceHandlerFromEndpoint instead.
func RegisterServiceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServiceServer) error {
mux.Handle("GET", pattern_ServiceService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ServiceService/GetService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ServiceService_GetService_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ServiceService_GetService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_ServiceService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ServiceService/ListServices")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ServiceService_ListServices_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ServiceService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_ServiceService_HasService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.ServiceService/HasService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ServiceService_HasService_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ServiceService_HasService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterServiceServiceHandlerFromEndpoint is same as RegisterServiceServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterServiceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterServiceServiceHandler(ctx, mux, conn)
}
// RegisterServiceServiceHandler registers the http handlers for service ServiceService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterServiceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterServiceServiceHandlerClient(ctx, mux, NewServiceServiceClient(conn))
}
// RegisterServiceServiceHandlerClient registers the http handlers for service ServiceService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "ServiceServiceClient" to call the correct interceptors.
func RegisterServiceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceServiceClient) error {
mux.Handle("GET", pattern_ServiceService_GetService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ServiceService/GetService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ServiceService_GetService_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ServiceService_GetService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_ServiceService_ListServices_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ServiceService/ListServices")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ServiceService_ListServices_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ServiceService_ListServices_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_ServiceService_HasService_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.ServiceService/HasService")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ServiceService_HasService_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ServiceService_HasService_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_ServiceService_GetService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "service", "name"}, ""))
pattern_ServiceService_ListServices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "service"}, ""))
pattern_ServiceService_HasService_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"apis", "v1beta", "service", "name"}, ""))
)
var (
forward_ServiceService_GetService_0 = runtime.ForwardResponseMessage
forward_ServiceService_ListServices_0 = runtime.ForwardResponseMessage
forward_ServiceService_HasService_0 = runtime.ForwardResponseMessage
)

169
api/gen/services_grpc.pb.go Normal file
View File

@@ -0,0 +1,169 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// ServiceServiceClient is the client API for ServiceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ServiceServiceClient interface {
GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error)
ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error)
HasService(ctx context.Context, in *HasServiceRequest, opts ...grpc.CallOption) (*HasServiceResponse, error)
}
type serviceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewServiceServiceClient(cc grpc.ClientConnInterface) ServiceServiceClient {
return &serviceServiceClient{cc}
}
func (c *serviceServiceClient) GetService(ctx context.Context, in *GetServiceRequest, opts ...grpc.CallOption) (*Service, error) {
out := new(Service)
err := c.cc.Invoke(ctx, "/api.ServiceService/GetService", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) {
out := new(ListServicesResponse)
err := c.cc.Invoke(ctx, "/api.ServiceService/ListServices", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serviceServiceClient) HasService(ctx context.Context, in *HasServiceRequest, opts ...grpc.CallOption) (*HasServiceResponse, error) {
out := new(HasServiceResponse)
err := c.cc.Invoke(ctx, "/api.ServiceService/HasService", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ServiceServiceServer is the server API for ServiceService service.
// All implementations must embed UnimplementedServiceServiceServer
// for forward compatibility
type ServiceServiceServer interface {
GetService(context.Context, *GetServiceRequest) (*Service, error)
ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error)
HasService(context.Context, *HasServiceRequest) (*HasServiceResponse, error)
mustEmbedUnimplementedServiceServiceServer()
}
// UnimplementedServiceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedServiceServiceServer struct {
}
func (UnimplementedServiceServiceServer) GetService(context.Context, *GetServiceRequest) (*Service, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetService not implemented")
}
func (UnimplementedServiceServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListServices not implemented")
}
func (UnimplementedServiceServiceServer) HasService(context.Context, *HasServiceRequest) (*HasServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HasService not implemented")
}
func (UnimplementedServiceServiceServer) mustEmbedUnimplementedServiceServiceServer() {}
// UnsafeServiceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ServiceServiceServer will
// result in compilation errors.
type UnsafeServiceServiceServer interface {
mustEmbedUnimplementedServiceServiceServer()
}
func RegisterServiceServiceServer(s grpc.ServiceRegistrar, srv ServiceServiceServer) {
s.RegisterService(&_ServiceService_serviceDesc, srv)
}
func _ServiceService_GetService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServiceServer).GetService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ServiceService/GetService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServiceServer).GetService(ctx, req.(*GetServiceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ServiceService_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListServicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServiceServer).ListServices(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ServiceService/ListServices",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServiceServer).ListServices(ctx, req.(*ListServicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _ServiceService_HasService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HasServiceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServiceServiceServer).HasService(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.ServiceService/HasService",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServiceServiceServer).HasService(ctx, req.(*HasServiceRequest))
}
return interceptor(ctx, in, info, handler)
}
var _ServiceService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.ServiceService",
HandlerType: (*ServiceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetService",
Handler: _ServiceService_GetService_Handler,
},
{
MethodName: "ListServices",
Handler: _ServiceService_ListServices_Handler,
},
{
MethodName: "HasService",
Handler: _ServiceService_HasService_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "services.proto",
}

2685
api/gen/workflow.pb.go Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

697
api/gen/workflow_grpc.pb.go Normal file
View File

@@ -0,0 +1,697 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// WorkflowServiceClient is the client API for WorkflowService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WorkflowServiceClient interface {
// Creates a Workflow
CreateWorkflowExecution(ctx context.Context, in *CreateWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error)
// Clone a Workflow. This is the same as running it again.
CloneWorkflowExecution(ctx context.Context, in *CloneWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error)
GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error)
GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error)
ListWorkflowExecutions(ctx context.Context, in *ListWorkflowExecutionsRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsResponse, error)
WatchWorkflowExecution(ctx context.Context, in *WatchWorkflowExecutionRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowExecutionClient, error)
GetWorkflowExecutionLogs(ctx context.Context, in *GetWorkflowExecutionLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowExecutionLogsClient, error)
GetWorkflowExecutionMetrics(ctx context.Context, in *GetWorkflowExecutionMetricsRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionMetricsResponse, error)
ResubmitWorkflowExecution(ctx context.Context, in *ResubmitWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error)
TerminateWorkflowExecution(ctx context.Context, in *TerminateWorkflowExecutionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
AddWorkflowExecutionStatistics(ctx context.Context, in *AddWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
CronStartWorkflowExecutionStatistic(ctx context.Context, in *CronStartWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
UpdateWorkflowExecutionStatus(ctx context.Context, in *UpdateWorkflowExecutionStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
AddWorkflowExecutionMetrics(ctx context.Context, in *AddWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error)
UpdateWorkflowExecutionMetrics(ctx context.Context, in *UpdateWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error)
ListWorkflowExecutionsField(ctx context.Context, in *ListWorkflowExecutionsFieldRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsFieldResponse, error)
}
type workflowServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWorkflowServiceClient(cc grpc.ClientConnInterface) WorkflowServiceClient {
return &workflowServiceClient{cc}
}
func (c *workflowServiceClient) CreateWorkflowExecution(ctx context.Context, in *CreateWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) {
out := new(WorkflowExecution)
err := c.cc.Invoke(ctx, "/api.WorkflowService/CreateWorkflowExecution", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) CloneWorkflowExecution(ctx context.Context, in *CloneWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) {
out := new(WorkflowExecution)
err := c.cc.Invoke(ctx, "/api.WorkflowService/CloneWorkflowExecution", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, in *GetWorkflowExecutionStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) {
out := new(GetWorkflowExecutionStatisticsForNamespaceResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) GetWorkflowExecution(ctx context.Context, in *GetWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) {
out := new(WorkflowExecution)
err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecution", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) ListWorkflowExecutions(ctx context.Context, in *ListWorkflowExecutionsRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsResponse, error) {
out := new(ListWorkflowExecutionsResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/ListWorkflowExecutions", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) WatchWorkflowExecution(ctx context.Context, in *WatchWorkflowExecutionRequest, opts ...grpc.CallOption) (WorkflowService_WatchWorkflowExecutionClient, error) {
stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[0], "/api.WorkflowService/WatchWorkflowExecution", opts...)
if err != nil {
return nil, err
}
x := &workflowServiceWatchWorkflowExecutionClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type WorkflowService_WatchWorkflowExecutionClient interface {
Recv() (*WorkflowExecution, error)
grpc.ClientStream
}
type workflowServiceWatchWorkflowExecutionClient struct {
grpc.ClientStream
}
func (x *workflowServiceWatchWorkflowExecutionClient) Recv() (*WorkflowExecution, error) {
m := new(WorkflowExecution)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *workflowServiceClient) GetWorkflowExecutionLogs(ctx context.Context, in *GetWorkflowExecutionLogsRequest, opts ...grpc.CallOption) (WorkflowService_GetWorkflowExecutionLogsClient, error) {
stream, err := c.cc.NewStream(ctx, &_WorkflowService_serviceDesc.Streams[1], "/api.WorkflowService/GetWorkflowExecutionLogs", opts...)
if err != nil {
return nil, err
}
x := &workflowServiceGetWorkflowExecutionLogsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type WorkflowService_GetWorkflowExecutionLogsClient interface {
Recv() (*LogStreamResponse, error)
grpc.ClientStream
}
type workflowServiceGetWorkflowExecutionLogsClient struct {
grpc.ClientStream
}
func (x *workflowServiceGetWorkflowExecutionLogsClient) Recv() (*LogStreamResponse, error) {
m := new(LogStreamResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *workflowServiceClient) GetWorkflowExecutionMetrics(ctx context.Context, in *GetWorkflowExecutionMetricsRequest, opts ...grpc.CallOption) (*GetWorkflowExecutionMetricsResponse, error) {
out := new(GetWorkflowExecutionMetricsResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/GetWorkflowExecutionMetrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) ResubmitWorkflowExecution(ctx context.Context, in *ResubmitWorkflowExecutionRequest, opts ...grpc.CallOption) (*WorkflowExecution, error) {
out := new(WorkflowExecution)
err := c.cc.Invoke(ctx, "/api.WorkflowService/ResubmitWorkflowExecution", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) TerminateWorkflowExecution(ctx context.Context, in *TerminateWorkflowExecutionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkflowService/TerminateWorkflowExecution", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) AddWorkflowExecutionStatistics(ctx context.Context, in *AddWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkflowService/AddWorkflowExecutionStatistics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) CronStartWorkflowExecutionStatistic(ctx context.Context, in *CronStartWorkflowExecutionStatisticRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkflowService/CronStartWorkflowExecutionStatistic", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) UpdateWorkflowExecutionStatus(ctx context.Context, in *UpdateWorkflowExecutionStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkflowService/UpdateWorkflowExecutionStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) AddWorkflowExecutionMetrics(ctx context.Context, in *AddWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) {
out := new(WorkflowExecutionsMetricsResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/AddWorkflowExecutionMetrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) UpdateWorkflowExecutionMetrics(ctx context.Context, in *UpdateWorkflowExecutionsMetricsRequest, opts ...grpc.CallOption) (*WorkflowExecutionsMetricsResponse, error) {
out := new(WorkflowExecutionsMetricsResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/UpdateWorkflowExecutionMetrics", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowServiceClient) ListWorkflowExecutionsField(ctx context.Context, in *ListWorkflowExecutionsFieldRequest, opts ...grpc.CallOption) (*ListWorkflowExecutionsFieldResponse, error) {
out := new(ListWorkflowExecutionsFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowService/ListWorkflowExecutionsField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkflowServiceServer is the server API for WorkflowService service.
// All implementations must embed UnimplementedWorkflowServiceServer
// for forward compatibility
type WorkflowServiceServer interface {
// Creates a Workflow
CreateWorkflowExecution(context.Context, *CreateWorkflowExecutionRequest) (*WorkflowExecution, error)
// Clone a Workflow. This is the same as running it again.
CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error)
GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error)
GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error)
ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error)
WatchWorkflowExecution(*WatchWorkflowExecutionRequest, WorkflowService_WatchWorkflowExecutionServer) error
GetWorkflowExecutionLogs(*GetWorkflowExecutionLogsRequest, WorkflowService_GetWorkflowExecutionLogsServer) error
GetWorkflowExecutionMetrics(context.Context, *GetWorkflowExecutionMetricsRequest) (*GetWorkflowExecutionMetricsResponse, error)
ResubmitWorkflowExecution(context.Context, *ResubmitWorkflowExecutionRequest) (*WorkflowExecution, error)
TerminateWorkflowExecution(context.Context, *TerminateWorkflowExecutionRequest) (*emptypb.Empty, error)
AddWorkflowExecutionStatistics(context.Context, *AddWorkflowExecutionStatisticRequest) (*emptypb.Empty, error)
CronStartWorkflowExecutionStatistic(context.Context, *CronStartWorkflowExecutionStatisticRequest) (*emptypb.Empty, error)
UpdateWorkflowExecutionStatus(context.Context, *UpdateWorkflowExecutionStatusRequest) (*emptypb.Empty, error)
AddWorkflowExecutionMetrics(context.Context, *AddWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error)
UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error)
ListWorkflowExecutionsField(context.Context, *ListWorkflowExecutionsFieldRequest) (*ListWorkflowExecutionsFieldResponse, error)
mustEmbedUnimplementedWorkflowServiceServer()
}
// UnimplementedWorkflowServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkflowServiceServer struct {
}
func (UnimplementedWorkflowServiceServer) CreateWorkflowExecution(context.Context, *CreateWorkflowExecutionRequest) (*WorkflowExecution, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowExecution not implemented")
}
func (UnimplementedWorkflowServiceServer) CloneWorkflowExecution(context.Context, *CloneWorkflowExecutionRequest) (*WorkflowExecution, error) {
return nil, status.Errorf(codes.Unimplemented, "method CloneWorkflowExecution not implemented")
}
func (UnimplementedWorkflowServiceServer) GetWorkflowExecutionStatisticsForNamespace(context.Context, *GetWorkflowExecutionStatisticsForNamespaceRequest) (*GetWorkflowExecutionStatisticsForNamespaceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionStatisticsForNamespace not implemented")
}
func (UnimplementedWorkflowServiceServer) GetWorkflowExecution(context.Context, *GetWorkflowExecutionRequest) (*WorkflowExecution, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecution not implemented")
}
func (UnimplementedWorkflowServiceServer) ListWorkflowExecutions(context.Context, *ListWorkflowExecutionsRequest) (*ListWorkflowExecutionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowExecutions not implemented")
}
func (UnimplementedWorkflowServiceServer) WatchWorkflowExecution(*WatchWorkflowExecutionRequest, WorkflowService_WatchWorkflowExecutionServer) error {
return status.Errorf(codes.Unimplemented, "method WatchWorkflowExecution not implemented")
}
func (UnimplementedWorkflowServiceServer) GetWorkflowExecutionLogs(*GetWorkflowExecutionLogsRequest, WorkflowService_GetWorkflowExecutionLogsServer) error {
return status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionLogs not implemented")
}
func (UnimplementedWorkflowServiceServer) GetWorkflowExecutionMetrics(context.Context, *GetWorkflowExecutionMetricsRequest) (*GetWorkflowExecutionMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowExecutionMetrics not implemented")
}
func (UnimplementedWorkflowServiceServer) ResubmitWorkflowExecution(context.Context, *ResubmitWorkflowExecutionRequest) (*WorkflowExecution, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResubmitWorkflowExecution not implemented")
}
func (UnimplementedWorkflowServiceServer) TerminateWorkflowExecution(context.Context, *TerminateWorkflowExecutionRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method TerminateWorkflowExecution not implemented")
}
func (UnimplementedWorkflowServiceServer) AddWorkflowExecutionStatistics(context.Context, *AddWorkflowExecutionStatisticRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddWorkflowExecutionStatistics not implemented")
}
func (UnimplementedWorkflowServiceServer) CronStartWorkflowExecutionStatistic(context.Context, *CronStartWorkflowExecutionStatisticRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CronStartWorkflowExecutionStatistic not implemented")
}
func (UnimplementedWorkflowServiceServer) UpdateWorkflowExecutionStatus(context.Context, *UpdateWorkflowExecutionStatusRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowExecutionStatus not implemented")
}
func (UnimplementedWorkflowServiceServer) AddWorkflowExecutionMetrics(context.Context, *AddWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddWorkflowExecutionMetrics not implemented")
}
func (UnimplementedWorkflowServiceServer) UpdateWorkflowExecutionMetrics(context.Context, *UpdateWorkflowExecutionsMetricsRequest) (*WorkflowExecutionsMetricsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkflowExecutionMetrics not implemented")
}
func (UnimplementedWorkflowServiceServer) ListWorkflowExecutionsField(context.Context, *ListWorkflowExecutionsFieldRequest) (*ListWorkflowExecutionsFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowExecutionsField not implemented")
}
func (UnimplementedWorkflowServiceServer) mustEmbedUnimplementedWorkflowServiceServer() {}
// UnsafeWorkflowServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkflowServiceServer will
// result in compilation errors.
type UnsafeWorkflowServiceServer interface {
mustEmbedUnimplementedWorkflowServiceServer()
}
func RegisterWorkflowServiceServer(s grpc.ServiceRegistrar, srv WorkflowServiceServer) {
s.RegisterService(&_WorkflowService_serviceDesc, srv)
}
func _WorkflowService_CreateWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWorkflowExecutionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).CreateWorkflowExecution(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/CreateWorkflowExecution",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).CreateWorkflowExecution(ctx, req.(*CreateWorkflowExecutionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_CloneWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CloneWorkflowExecutionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).CloneWorkflowExecution(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/CloneWorkflowExecution",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).CloneWorkflowExecution(ctx, req.(*CloneWorkflowExecutionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkflowExecutionStatisticsForNamespaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/GetWorkflowExecutionStatisticsForNamespace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).GetWorkflowExecutionStatisticsForNamespace(ctx, req.(*GetWorkflowExecutionStatisticsForNamespaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_GetWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkflowExecutionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).GetWorkflowExecution(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/GetWorkflowExecution",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).GetWorkflowExecution(ctx, req.(*GetWorkflowExecutionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_ListWorkflowExecutions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowExecutionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).ListWorkflowExecutions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/ListWorkflowExecutions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).ListWorkflowExecutions(ctx, req.(*ListWorkflowExecutionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_WatchWorkflowExecution_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(WatchWorkflowExecutionRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(WorkflowServiceServer).WatchWorkflowExecution(m, &workflowServiceWatchWorkflowExecutionServer{stream})
}
type WorkflowService_WatchWorkflowExecutionServer interface {
Send(*WorkflowExecution) error
grpc.ServerStream
}
type workflowServiceWatchWorkflowExecutionServer struct {
grpc.ServerStream
}
func (x *workflowServiceWatchWorkflowExecutionServer) Send(m *WorkflowExecution) error {
return x.ServerStream.SendMsg(m)
}
func _WorkflowService_GetWorkflowExecutionLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetWorkflowExecutionLogsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(WorkflowServiceServer).GetWorkflowExecutionLogs(m, &workflowServiceGetWorkflowExecutionLogsServer{stream})
}
type WorkflowService_GetWorkflowExecutionLogsServer interface {
Send(*LogStreamResponse) error
grpc.ServerStream
}
type workflowServiceGetWorkflowExecutionLogsServer struct {
grpc.ServerStream
}
func (x *workflowServiceGetWorkflowExecutionLogsServer) Send(m *LogStreamResponse) error {
return x.ServerStream.SendMsg(m)
}
func _WorkflowService_GetWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkflowExecutionMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).GetWorkflowExecutionMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/GetWorkflowExecutionMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).GetWorkflowExecutionMetrics(ctx, req.(*GetWorkflowExecutionMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_ResubmitWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResubmitWorkflowExecutionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).ResubmitWorkflowExecution(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/ResubmitWorkflowExecution",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).ResubmitWorkflowExecution(ctx, req.(*ResubmitWorkflowExecutionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_TerminateWorkflowExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(TerminateWorkflowExecutionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).TerminateWorkflowExecution(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/TerminateWorkflowExecution",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).TerminateWorkflowExecution(ctx, req.(*TerminateWorkflowExecutionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_AddWorkflowExecutionStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddWorkflowExecutionStatisticRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).AddWorkflowExecutionStatistics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/AddWorkflowExecutionStatistics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).AddWorkflowExecutionStatistics(ctx, req.(*AddWorkflowExecutionStatisticRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_CronStartWorkflowExecutionStatistic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CronStartWorkflowExecutionStatisticRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).CronStartWorkflowExecutionStatistic(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/CronStartWorkflowExecutionStatistic",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).CronStartWorkflowExecutionStatistic(ctx, req.(*CronStartWorkflowExecutionStatisticRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_UpdateWorkflowExecutionStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateWorkflowExecutionStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).UpdateWorkflowExecutionStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/UpdateWorkflowExecutionStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).UpdateWorkflowExecutionStatus(ctx, req.(*UpdateWorkflowExecutionStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_AddWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddWorkflowExecutionsMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).AddWorkflowExecutionMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/AddWorkflowExecutionMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).AddWorkflowExecutionMetrics(ctx, req.(*AddWorkflowExecutionsMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_UpdateWorkflowExecutionMetrics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateWorkflowExecutionsMetricsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).UpdateWorkflowExecutionMetrics(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/UpdateWorkflowExecutionMetrics",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).UpdateWorkflowExecutionMetrics(ctx, req.(*UpdateWorkflowExecutionsMetricsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowService_ListWorkflowExecutionsField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowExecutionsFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowServiceServer).ListWorkflowExecutionsField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowService/ListWorkflowExecutionsField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowServiceServer).ListWorkflowExecutionsField(ctx, req.(*ListWorkflowExecutionsFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkflowService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkflowService",
HandlerType: (*WorkflowServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateWorkflowExecution",
Handler: _WorkflowService_CreateWorkflowExecution_Handler,
},
{
MethodName: "CloneWorkflowExecution",
Handler: _WorkflowService_CloneWorkflowExecution_Handler,
},
{
MethodName: "GetWorkflowExecutionStatisticsForNamespace",
Handler: _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler,
},
{
MethodName: "GetWorkflowExecution",
Handler: _WorkflowService_GetWorkflowExecution_Handler,
},
{
MethodName: "ListWorkflowExecutions",
Handler: _WorkflowService_ListWorkflowExecutions_Handler,
},
{
MethodName: "GetWorkflowExecutionMetrics",
Handler: _WorkflowService_GetWorkflowExecutionMetrics_Handler,
},
{
MethodName: "ResubmitWorkflowExecution",
Handler: _WorkflowService_ResubmitWorkflowExecution_Handler,
},
{
MethodName: "TerminateWorkflowExecution",
Handler: _WorkflowService_TerminateWorkflowExecution_Handler,
},
{
MethodName: "AddWorkflowExecutionStatistics",
Handler: _WorkflowService_AddWorkflowExecutionStatistics_Handler,
},
{
MethodName: "CronStartWorkflowExecutionStatistic",
Handler: _WorkflowService_CronStartWorkflowExecutionStatistic_Handler,
},
{
MethodName: "UpdateWorkflowExecutionStatus",
Handler: _WorkflowService_UpdateWorkflowExecutionStatus_Handler,
},
{
MethodName: "AddWorkflowExecutionMetrics",
Handler: _WorkflowService_AddWorkflowExecutionMetrics_Handler,
},
{
MethodName: "UpdateWorkflowExecutionMetrics",
Handler: _WorkflowService_UpdateWorkflowExecutionMetrics_Handler,
},
{
MethodName: "ListWorkflowExecutionsField",
Handler: _WorkflowService_ListWorkflowExecutionsField_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "WatchWorkflowExecution",
Handler: _WorkflowService_WatchWorkflowExecution_Handler,
ServerStreams: true,
},
{
StreamName: "GetWorkflowExecutionLogs",
Handler: _WorkflowService_GetWorkflowExecutionLogs_Handler,
ServerStreams: true,
},
},
Metadata: "workflow.proto",
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,388 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// WorkflowTemplateServiceClient is the client API for WorkflowTemplateService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WorkflowTemplateServiceClient interface {
// Get the generated WorkflowTemplate, applying any modifications based on the content
GenerateWorkflowTemplate(ctx context.Context, in *GenerateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error)
ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error)
CloneWorkflowTemplate(ctx context.Context, in *CloneWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
ArchiveWorkflowTemplate(ctx context.Context, in *ArchiveWorkflowTemplateRequest, opts ...grpc.CallOption) (*ArchiveWorkflowTemplateResponse, error)
ListWorkflowTemplatesField(ctx context.Context, in *ListWorkflowTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesFieldResponse, error)
}
type workflowTemplateServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWorkflowTemplateServiceClient(cc grpc.ClientConnInterface) WorkflowTemplateServiceClient {
return &workflowTemplateServiceClient{cc}
}
func (c *workflowTemplateServiceClient) GenerateWorkflowTemplate(ctx context.Context, in *GenerateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
out := new(WorkflowTemplate)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/GenerateWorkflowTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) CreateWorkflowTemplate(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
out := new(WorkflowTemplate)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CreateWorkflowTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) CreateWorkflowTemplateVersion(ctx context.Context, in *CreateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
out := new(WorkflowTemplate)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) GetWorkflowTemplate(ctx context.Context, in *GetWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
out := new(WorkflowTemplate)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/GetWorkflowTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) ListWorkflowTemplateVersions(ctx context.Context, in *ListWorkflowTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkflowTemplateVersionsResponse, error) {
out := new(ListWorkflowTemplateVersionsResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplateVersions", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) ListWorkflowTemplates(ctx context.Context, in *ListWorkflowTemplatesRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesResponse, error) {
out := new(ListWorkflowTemplatesResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) CloneWorkflowTemplate(ctx context.Context, in *CloneWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
out := new(WorkflowTemplate)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/CloneWorkflowTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) ArchiveWorkflowTemplate(ctx context.Context, in *ArchiveWorkflowTemplateRequest, opts ...grpc.CallOption) (*ArchiveWorkflowTemplateResponse, error) {
out := new(ArchiveWorkflowTemplateResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ArchiveWorkflowTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workflowTemplateServiceClient) ListWorkflowTemplatesField(ctx context.Context, in *ListWorkflowTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkflowTemplatesFieldResponse, error) {
out := new(ListWorkflowTemplatesFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkflowTemplateService/ListWorkflowTemplatesField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkflowTemplateServiceServer is the server API for WorkflowTemplateService service.
// All implementations must embed UnimplementedWorkflowTemplateServiceServer
// for forward compatibility
type WorkflowTemplateServiceServer interface {
// Get the generated WorkflowTemplate, applying any modifications based on the content
GenerateWorkflowTemplate(context.Context, *GenerateWorkflowTemplateRequest) (*WorkflowTemplate, error)
CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error)
GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error)
ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error)
ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error)
CloneWorkflowTemplate(context.Context, *CloneWorkflowTemplateRequest) (*WorkflowTemplate, error)
ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error)
ListWorkflowTemplatesField(context.Context, *ListWorkflowTemplatesFieldRequest) (*ListWorkflowTemplatesFieldResponse, error)
mustEmbedUnimplementedWorkflowTemplateServiceServer()
}
// UnimplementedWorkflowTemplateServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkflowTemplateServiceServer struct {
}
func (UnimplementedWorkflowTemplateServiceServer) GenerateWorkflowTemplate(context.Context, *GenerateWorkflowTemplateRequest) (*WorkflowTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateWorkflowTemplate not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) CreateWorkflowTemplate(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplate not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) CreateWorkflowTemplateVersion(context.Context, *CreateWorkflowTemplateRequest) (*WorkflowTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkflowTemplateVersion not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) GetWorkflowTemplate(context.Context, *GetWorkflowTemplateRequest) (*WorkflowTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkflowTemplate not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplateVersions(context.Context, *ListWorkflowTemplateVersionsRequest) (*ListWorkflowTemplateVersionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplateVersions not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplates(context.Context, *ListWorkflowTemplatesRequest) (*ListWorkflowTemplatesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplates not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) CloneWorkflowTemplate(context.Context, *CloneWorkflowTemplateRequest) (*WorkflowTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method CloneWorkflowTemplate not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) ArchiveWorkflowTemplate(context.Context, *ArchiveWorkflowTemplateRequest) (*ArchiveWorkflowTemplateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ArchiveWorkflowTemplate not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) ListWorkflowTemplatesField(context.Context, *ListWorkflowTemplatesFieldRequest) (*ListWorkflowTemplatesFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkflowTemplatesField not implemented")
}
func (UnimplementedWorkflowTemplateServiceServer) mustEmbedUnimplementedWorkflowTemplateServiceServer() {
}
// UnsafeWorkflowTemplateServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkflowTemplateServiceServer will
// result in compilation errors.
type UnsafeWorkflowTemplateServiceServer interface {
mustEmbedUnimplementedWorkflowTemplateServiceServer()
}
func RegisterWorkflowTemplateServiceServer(s grpc.ServiceRegistrar, srv WorkflowTemplateServiceServer) {
s.RegisterService(&_WorkflowTemplateService_serviceDesc, srv)
}
func _WorkflowTemplateService_GenerateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GenerateWorkflowTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).GenerateWorkflowTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/GenerateWorkflowTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).GenerateWorkflowTemplate(ctx, req.(*GenerateWorkflowTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_CreateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWorkflowTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/CreateWorkflowTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplate(ctx, req.(*CreateWorkflowTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_CreateWorkflowTemplateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWorkflowTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplateVersion(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/CreateWorkflowTemplateVersion",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).CreateWorkflowTemplateVersion(ctx, req.(*CreateWorkflowTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_GetWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkflowTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).GetWorkflowTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/GetWorkflowTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).GetWorkflowTemplate(ctx, req.(*GetWorkflowTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_ListWorkflowTemplateVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowTemplateVersionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplateVersions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplateVersions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplateVersions(ctx, req.(*ListWorkflowTemplateVersionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_ListWorkflowTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowTemplatesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplates(ctx, req.(*ListWorkflowTemplatesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_CloneWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CloneWorkflowTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).CloneWorkflowTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/CloneWorkflowTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).CloneWorkflowTemplate(ctx, req.(*CloneWorkflowTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveWorkflowTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).ArchiveWorkflowTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/ArchiveWorkflowTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).ArchiveWorkflowTemplate(ctx, req.(*ArchiveWorkflowTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkflowTemplateService_ListWorkflowTemplatesField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkflowTemplatesFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplatesField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkflowTemplateService/ListWorkflowTemplatesField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkflowTemplateServiceServer).ListWorkflowTemplatesField(ctx, req.(*ListWorkflowTemplatesFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkflowTemplateService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkflowTemplateService",
HandlerType: (*WorkflowTemplateServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GenerateWorkflowTemplate",
Handler: _WorkflowTemplateService_GenerateWorkflowTemplate_Handler,
},
{
MethodName: "CreateWorkflowTemplate",
Handler: _WorkflowTemplateService_CreateWorkflowTemplate_Handler,
},
{
MethodName: "CreateWorkflowTemplateVersion",
Handler: _WorkflowTemplateService_CreateWorkflowTemplateVersion_Handler,
},
{
MethodName: "GetWorkflowTemplate",
Handler: _WorkflowTemplateService_GetWorkflowTemplate_Handler,
},
{
MethodName: "ListWorkflowTemplateVersions",
Handler: _WorkflowTemplateService_ListWorkflowTemplateVersions_Handler,
},
{
MethodName: "ListWorkflowTemplates",
Handler: _WorkflowTemplateService_ListWorkflowTemplates_Handler,
},
{
MethodName: "CloneWorkflowTemplate",
Handler: _WorkflowTemplateService_CloneWorkflowTemplate_Handler,
},
{
MethodName: "ArchiveWorkflowTemplate",
Handler: _WorkflowTemplateService_ArchiveWorkflowTemplate_Handler,
},
{
MethodName: "ListWorkflowTemplatesField",
Handler: _WorkflowTemplateService_ListWorkflowTemplatesField_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "workflow_template.proto",
}

2185
api/gen/workspace.pb.go Normal file

File diff suppressed because it is too large Load Diff

1513
api/gen/workspace.pb.gw.go Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,522 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// WorkspaceServiceClient is the client API for WorkspaceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WorkspaceServiceClient interface {
CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error)
GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error)
GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error)
ListWorkspaces(ctx context.Context, in *ListWorkspaceRequest, opts ...grpc.CallOption) (*ListWorkspaceResponse, error)
UpdateWorkspaceStatus(ctx context.Context, in *UpdateWorkspaceStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
UpdateWorkspace(ctx context.Context, in *UpdateWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
GetWorkspaceContainerLogs(ctx context.Context, in *GetWorkspaceContainerLogsRequest, opts ...grpc.CallOption) (WorkspaceService_GetWorkspaceContainerLogsClient, error)
ListWorkspacesField(ctx context.Context, in *ListWorkspacesFieldRequest, opts ...grpc.CallOption) (*ListWorkspacesFieldResponse, error)
}
type workspaceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClient {
return &workspaceServiceClient{cc}
}
func (c *workspaceServiceClient) CreateWorkspace(ctx context.Context, in *CreateWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) {
out := new(Workspace)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/CreateWorkspace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) GetWorkspaceStatisticsForNamespace(ctx context.Context, in *GetWorkspaceStatisticsForNamespaceRequest, opts ...grpc.CallOption) (*GetWorkspaceStatisticsForNamespaceResponse, error) {
out := new(GetWorkspaceStatisticsForNamespaceResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) GetWorkspace(ctx context.Context, in *GetWorkspaceRequest, opts ...grpc.CallOption) (*Workspace, error) {
out := new(Workspace)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/GetWorkspace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) ListWorkspaces(ctx context.Context, in *ListWorkspaceRequest, opts ...grpc.CallOption) (*ListWorkspaceResponse, error) {
out := new(ListWorkspaceResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/ListWorkspaces", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) UpdateWorkspaceStatus(ctx context.Context, in *UpdateWorkspaceStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/UpdateWorkspaceStatus", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) UpdateWorkspace(ctx context.Context, in *UpdateWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/UpdateWorkspace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/PauseWorkspace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/ResumeWorkspace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/DeleteWorkspace", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/RetryLastWorkspaceAction", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) GetWorkspaceContainerLogs(ctx context.Context, in *GetWorkspaceContainerLogsRequest, opts ...grpc.CallOption) (WorkspaceService_GetWorkspaceContainerLogsClient, error) {
stream, err := c.cc.NewStream(ctx, &_WorkspaceService_serviceDesc.Streams[0], "/api.WorkspaceService/GetWorkspaceContainerLogs", opts...)
if err != nil {
return nil, err
}
x := &workspaceServiceGetWorkspaceContainerLogsClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type WorkspaceService_GetWorkspaceContainerLogsClient interface {
Recv() (*LogStreamResponse, error)
grpc.ClientStream
}
type workspaceServiceGetWorkspaceContainerLogsClient struct {
grpc.ClientStream
}
func (x *workspaceServiceGetWorkspaceContainerLogsClient) Recv() (*LogStreamResponse, error) {
m := new(LogStreamResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *workspaceServiceClient) ListWorkspacesField(ctx context.Context, in *ListWorkspacesFieldRequest, opts ...grpc.CallOption) (*ListWorkspacesFieldResponse, error) {
out := new(ListWorkspacesFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceService/ListWorkspacesField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkspaceServiceServer is the server API for WorkspaceService service.
// All implementations must embed UnimplementedWorkspaceServiceServer
// for forward compatibility
type WorkspaceServiceServer interface {
CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error)
GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error)
GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error)
ListWorkspaces(context.Context, *ListWorkspaceRequest) (*ListWorkspaceResponse, error)
UpdateWorkspaceStatus(context.Context, *UpdateWorkspaceStatusRequest) (*emptypb.Empty, error)
UpdateWorkspace(context.Context, *UpdateWorkspaceRequest) (*emptypb.Empty, error)
PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*emptypb.Empty, error)
ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*emptypb.Empty, error)
DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*emptypb.Empty, error)
RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*emptypb.Empty, error)
GetWorkspaceContainerLogs(*GetWorkspaceContainerLogsRequest, WorkspaceService_GetWorkspaceContainerLogsServer) error
ListWorkspacesField(context.Context, *ListWorkspacesFieldRequest) (*ListWorkspacesFieldResponse, error)
mustEmbedUnimplementedWorkspaceServiceServer()
}
// UnimplementedWorkspaceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkspaceServiceServer struct {
}
func (UnimplementedWorkspaceServiceServer) CreateWorkspace(context.Context, *CreateWorkspaceRequest) (*Workspace, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspace not implemented")
}
func (UnimplementedWorkspaceServiceServer) GetWorkspaceStatisticsForNamespace(context.Context, *GetWorkspaceStatisticsForNamespaceRequest) (*GetWorkspaceStatisticsForNamespaceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceStatisticsForNamespace not implemented")
}
func (UnimplementedWorkspaceServiceServer) GetWorkspace(context.Context, *GetWorkspaceRequest) (*Workspace, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspace not implemented")
}
func (UnimplementedWorkspaceServiceServer) ListWorkspaces(context.Context, *ListWorkspaceRequest) (*ListWorkspaceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaces not implemented")
}
func (UnimplementedWorkspaceServiceServer) UpdateWorkspaceStatus(context.Context, *UpdateWorkspaceStatusRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceStatus not implemented")
}
func (UnimplementedWorkspaceServiceServer) UpdateWorkspace(context.Context, *UpdateWorkspaceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspace not implemented")
}
func (UnimplementedWorkspaceServiceServer) PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method PauseWorkspace not implemented")
}
func (UnimplementedWorkspaceServiceServer) ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method ResumeWorkspace not implemented")
}
func (UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented")
}
func (UnimplementedWorkspaceServiceServer) RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method RetryLastWorkspaceAction not implemented")
}
func (UnimplementedWorkspaceServiceServer) GetWorkspaceContainerLogs(*GetWorkspaceContainerLogsRequest, WorkspaceService_GetWorkspaceContainerLogsServer) error {
return status.Errorf(codes.Unimplemented, "method GetWorkspaceContainerLogs not implemented")
}
func (UnimplementedWorkspaceServiceServer) ListWorkspacesField(context.Context, *ListWorkspacesFieldRequest) (*ListWorkspacesFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspacesField not implemented")
}
func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {}
// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkspaceServiceServer will
// result in compilation errors.
type UnsafeWorkspaceServiceServer interface {
mustEmbedUnimplementedWorkspaceServiceServer()
}
func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) {
s.RegisterService(&_WorkspaceService_serviceDesc, srv)
}
func _WorkspaceService_CreateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).CreateWorkspace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/CreateWorkspace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).CreateWorkspace(ctx, req.(*CreateWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceStatisticsForNamespaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/GetWorkspaceStatisticsForNamespace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).GetWorkspaceStatisticsForNamespace(ctx, req.(*GetWorkspaceStatisticsForNamespaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_GetWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).GetWorkspace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/GetWorkspace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).GetWorkspace(ctx, req.(*GetWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_ListWorkspaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).ListWorkspaces(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/ListWorkspaces",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).ListWorkspaces(ctx, req.(*ListWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_UpdateWorkspaceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateWorkspaceStatusRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).UpdateWorkspaceStatus(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/UpdateWorkspaceStatus",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).UpdateWorkspaceStatus(ctx, req.(*UpdateWorkspaceStatusRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_UpdateWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).UpdateWorkspace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/UpdateWorkspace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).UpdateWorkspace(ctx, req.(*UpdateWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_PauseWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PauseWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).PauseWorkspace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/PauseWorkspace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).PauseWorkspace(ctx, req.(*PauseWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_ResumeWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ResumeWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).ResumeWorkspace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/ResumeWorkspace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).ResumeWorkspace(ctx, req.(*ResumeWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_DeleteWorkspace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/DeleteWorkspace",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).DeleteWorkspace(ctx, req.(*DeleteWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_RetryLastWorkspaceAction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RetryActionWorkspaceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/RetryLastWorkspaceAction",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).RetryLastWorkspaceAction(ctx, req.(*RetryActionWorkspaceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_GetWorkspaceContainerLogs_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(GetWorkspaceContainerLogsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(WorkspaceServiceServer).GetWorkspaceContainerLogs(m, &workspaceServiceGetWorkspaceContainerLogsServer{stream})
}
type WorkspaceService_GetWorkspaceContainerLogsServer interface {
Send(*LogStreamResponse) error
grpc.ServerStream
}
type workspaceServiceGetWorkspaceContainerLogsServer struct {
grpc.ServerStream
}
func (x *workspaceServiceGetWorkspaceContainerLogsServer) Send(m *LogStreamResponse) error {
return x.ServerStream.SendMsg(m)
}
func _WorkspaceService_ListWorkspacesField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspacesFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).ListWorkspacesField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceService/ListWorkspacesField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).ListWorkspacesField(ctx, req.(*ListWorkspacesFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkspaceService",
HandlerType: (*WorkspaceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CreateWorkspace",
Handler: _WorkspaceService_CreateWorkspace_Handler,
},
{
MethodName: "GetWorkspaceStatisticsForNamespace",
Handler: _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler,
},
{
MethodName: "GetWorkspace",
Handler: _WorkspaceService_GetWorkspace_Handler,
},
{
MethodName: "ListWorkspaces",
Handler: _WorkspaceService_ListWorkspaces_Handler,
},
{
MethodName: "UpdateWorkspaceStatus",
Handler: _WorkspaceService_UpdateWorkspaceStatus_Handler,
},
{
MethodName: "UpdateWorkspace",
Handler: _WorkspaceService_UpdateWorkspace_Handler,
},
{
MethodName: "PauseWorkspace",
Handler: _WorkspaceService_PauseWorkspace_Handler,
},
{
MethodName: "ResumeWorkspace",
Handler: _WorkspaceService_ResumeWorkspace_Handler,
},
{
MethodName: "DeleteWorkspace",
Handler: _WorkspaceService_DeleteWorkspace_Handler,
},
{
MethodName: "RetryLastWorkspaceAction",
Handler: _WorkspaceService_RetryLastWorkspaceAction_Handler,
},
{
MethodName: "ListWorkspacesField",
Handler: _WorkspaceService_ListWorkspacesField_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "GetWorkspaceContainerLogs",
Handler: _WorkspaceService_GetWorkspaceContainerLogs_Handler,
ServerStreams: true,
},
},
Metadata: "workspace.proto",
}

View File

@@ -2,25 +2,25 @@
// source: workspace_template.proto
/*
Package api is a reverse proxy.
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package api
package gen
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
@@ -29,7 +29,7 @@ var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
var _ = metadata.Join
func request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GenerateWorkspaceTemplateWorkflowTemplateRequest
@@ -56,7 +56,6 @@ func request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -67,7 +66,6 @@ func request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -102,7 +100,6 @@ func local_request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTem
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -113,7 +110,6 @@ func local_request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTem
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -148,7 +144,6 @@ func request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx context.Cont
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -183,7 +178,6 @@ func local_request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(ctx contex
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -218,20 +212,18 @@ func request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx context.Cont
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.UpdateWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@@ -264,20 +256,18 @@ func local_request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx contex
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["name"]
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "name")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Name, err = runtime.String(val)
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "name", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.UpdateWorkspaceTemplate(ctx, &protoReq)
@@ -285,6 +275,78 @@ func local_request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(ctx contex
}
func request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ArchiveWorkspaceTemplateRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.ArchiveWorkspaceTemplate(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ArchiveWorkspaceTemplateRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.ArchiveWorkspaceTemplate(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_WorkspaceTemplateService_GetWorkspaceTemplate_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0, "uid": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}}
)
@@ -306,7 +368,6 @@ func request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.Context
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -317,7 +378,6 @@ func request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.Context
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -351,7 +411,6 @@ func local_request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.C
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -362,12 +421,14 @@ func local_request_WorkspaceTemplateService_GetWorkspaceTemplate_0(ctx context.C
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkspaceTemplateService_GetWorkspaceTemplate_0); err != nil {
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_GetWorkspaceTemplate_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -397,7 +458,6 @@ func request_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx context.Conte
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -431,12 +491,14 @@ func local_request_WorkspaceTemplateService_ListWorkspaceTemplates_0(ctx context
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkspaceTemplateService_ListWorkspaceTemplates_0); err != nil {
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceTemplateService_ListWorkspaceTemplates_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
@@ -462,7 +524,6 @@ func request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx contex
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -473,7 +534,6 @@ func request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx contex
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -500,7 +560,6 @@ func local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
@@ -511,7 +570,6 @@ func local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
@@ -521,21 +579,97 @@ func local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(ctx
}
func request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceTemplateServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspaceTemplatesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := client.ListWorkspaceTemplatesField(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceTemplateServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspaceTemplatesFieldRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["fieldName"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "fieldName")
}
protoReq.FieldName, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "fieldName", err)
}
msg, err := server.ListWorkspaceTemplatesField(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWorkspaceTemplateServiceHandlerServer registers the http handlers for service WorkspaceTemplateService to "mux".
// UnaryRPC :call WorkspaceTemplateServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkspaceTemplateServiceHandlerFromEndpoint instead.
func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceTemplateServiceServer) error {
mux.Handle("POST", pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -549,13 +683,16 @@ func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *run
mux.Handle("POST", pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/CreateWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_CreateWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -569,13 +706,16 @@ func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *run
mux.Handle("PUT", pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_UpdateWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -586,16 +726,42 @@ func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *run
})
mux.Handle("PUT", pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/GetWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_GetWorkspaceTemplate_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -609,13 +775,16 @@ func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *run
mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplates")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplates_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -629,13 +798,16 @@ func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *run
mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
@@ -646,6 +818,29 @@ func RegisterWorkspaceTemplateServiceHandlerServer(ctx context.Context, mux *run
})
mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplatesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@@ -691,7 +886,7 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -711,7 +906,7 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/CreateWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -731,7 +926,7 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -747,11 +942,31 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
})
mux.Handle("PUT", pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/GetWorkspaceTemplate")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -771,7 +986,7 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplates")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -791,7 +1006,7 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
@@ -807,21 +1022,45 @@ func RegisterWorkspaceTemplateServiceHandlerClient(ctx context.Context, mux *run
})
mux.Handle("GET", pattern_WorkspaceTemplateService_ListWorkspaceTemplatesField_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req, "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField")
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceTemplateService_ListWorkspaceTemplatesField_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "workflow_template"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "workflow_template"}, ""))
pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceTemplateService_CreateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, ""))
pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "name"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceTemplateService_UpdateWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid"}, ""))
pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "archive"}, ""))
pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceTemplateService_GetWorkspaceTemplate_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid"}, ""))
pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "versions"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspace_templates"}, ""))
pattern_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspace_templates", "uid", "versions"}, ""))
pattern_WorkspaceTemplateService_ListWorkspaceTemplatesField_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"apis", "v1beta", "namespace", "field", "workspace_templates", "fieldName"}, ""))
)
var (
@@ -831,9 +1070,13 @@ var (
forward_WorkspaceTemplateService_UpdateWorkspaceTemplate_0 = runtime.ForwardResponseMessage
forward_WorkspaceTemplateService_ArchiveWorkspaceTemplate_0 = runtime.ForwardResponseMessage
forward_WorkspaceTemplateService_GetWorkspaceTemplate_0 = runtime.ForwardResponseMessage
forward_WorkspaceTemplateService_ListWorkspaceTemplates_0 = runtime.ForwardResponseMessage
forward_WorkspaceTemplateService_ListWorkspaceTemplateVersions_0 = runtime.ForwardResponseMessage
forward_WorkspaceTemplateService_ListWorkspaceTemplatesField_0 = runtime.ForwardResponseMessage
)

View File

@@ -0,0 +1,360 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package gen
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion7
// WorkspaceTemplateServiceClient is the client API for WorkspaceTemplateService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WorkspaceTemplateServiceClient interface {
// Get the generated WorkflowTemplate for a WorkspaceTemplate
GenerateWorkspaceTemplateWorkflowTemplate(ctx context.Context, in *GenerateWorkspaceTemplateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error)
// Creates a WorkspaceTemplate
CreateWorkspaceTemplate(ctx context.Context, in *CreateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error)
// Updates a WorkspaceTemplate
UpdateWorkspaceTemplate(ctx context.Context, in *UpdateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error)
// Archives a WorkspaceTemplate
ArchiveWorkspaceTemplate(ctx context.Context, in *ArchiveWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error)
// Get a WorkspaceTemplate
GetWorkspaceTemplate(ctx context.Context, in *GetWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error)
ListWorkspaceTemplates(ctx context.Context, in *ListWorkspaceTemplatesRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesResponse, error)
ListWorkspaceTemplateVersions(ctx context.Context, in *ListWorkspaceTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplateVersionsResponse, error)
ListWorkspaceTemplatesField(ctx context.Context, in *ListWorkspaceTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesFieldResponse, error)
}
type workspaceTemplateServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWorkspaceTemplateServiceClient(cc grpc.ClientConnInterface) WorkspaceTemplateServiceClient {
return &workspaceTemplateServiceClient{cc}
}
func (c *workspaceTemplateServiceClient) GenerateWorkspaceTemplateWorkflowTemplate(ctx context.Context, in *GenerateWorkspaceTemplateWorkflowTemplateRequest, opts ...grpc.CallOption) (*WorkflowTemplate, error) {
out := new(WorkflowTemplate)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceTemplateServiceClient) CreateWorkspaceTemplate(ctx context.Context, in *CreateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) {
out := new(WorkspaceTemplate)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/CreateWorkspaceTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceTemplateServiceClient) UpdateWorkspaceTemplate(ctx context.Context, in *UpdateWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) {
out := new(WorkspaceTemplate)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceTemplateServiceClient) ArchiveWorkspaceTemplate(ctx context.Context, in *ArchiveWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) {
out := new(WorkspaceTemplate)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceTemplateServiceClient) GetWorkspaceTemplate(ctx context.Context, in *GetWorkspaceTemplateRequest, opts ...grpc.CallOption) (*WorkspaceTemplate, error) {
out := new(WorkspaceTemplate)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/GetWorkspaceTemplate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceTemplateServiceClient) ListWorkspaceTemplates(ctx context.Context, in *ListWorkspaceTemplatesRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesResponse, error) {
out := new(ListWorkspaceTemplatesResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplates", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceTemplateServiceClient) ListWorkspaceTemplateVersions(ctx context.Context, in *ListWorkspaceTemplateVersionsRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplateVersionsResponse, error) {
out := new(ListWorkspaceTemplateVersionsResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceTemplateServiceClient) ListWorkspaceTemplatesField(ctx context.Context, in *ListWorkspaceTemplatesFieldRequest, opts ...grpc.CallOption) (*ListWorkspaceTemplatesFieldResponse, error) {
out := new(ListWorkspaceTemplatesFieldResponse)
err := c.cc.Invoke(ctx, "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkspaceTemplateServiceServer is the server API for WorkspaceTemplateService service.
// All implementations must embed UnimplementedWorkspaceTemplateServiceServer
// for forward compatibility
type WorkspaceTemplateServiceServer interface {
// Get the generated WorkflowTemplate for a WorkspaceTemplate
GenerateWorkspaceTemplateWorkflowTemplate(context.Context, *GenerateWorkspaceTemplateWorkflowTemplateRequest) (*WorkflowTemplate, error)
// Creates a WorkspaceTemplate
CreateWorkspaceTemplate(context.Context, *CreateWorkspaceTemplateRequest) (*WorkspaceTemplate, error)
// Updates a WorkspaceTemplate
UpdateWorkspaceTemplate(context.Context, *UpdateWorkspaceTemplateRequest) (*WorkspaceTemplate, error)
// Archives a WorkspaceTemplate
ArchiveWorkspaceTemplate(context.Context, *ArchiveWorkspaceTemplateRequest) (*WorkspaceTemplate, error)
// Get a WorkspaceTemplate
GetWorkspaceTemplate(context.Context, *GetWorkspaceTemplateRequest) (*WorkspaceTemplate, error)
ListWorkspaceTemplates(context.Context, *ListWorkspaceTemplatesRequest) (*ListWorkspaceTemplatesResponse, error)
ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error)
ListWorkspaceTemplatesField(context.Context, *ListWorkspaceTemplatesFieldRequest) (*ListWorkspaceTemplatesFieldResponse, error)
mustEmbedUnimplementedWorkspaceTemplateServiceServer()
}
// UnimplementedWorkspaceTemplateServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkspaceTemplateServiceServer struct {
}
func (UnimplementedWorkspaceTemplateServiceServer) GenerateWorkspaceTemplateWorkflowTemplate(context.Context, *GenerateWorkspaceTemplateWorkflowTemplateRequest) (*WorkflowTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateWorkspaceTemplateWorkflowTemplate not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) CreateWorkspaceTemplate(context.Context, *CreateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateWorkspaceTemplate not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) UpdateWorkspaceTemplate(context.Context, *UpdateWorkspaceTemplateRequest) (*WorkspaceTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceTemplate not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) ArchiveWorkspaceTemplate(context.Context, *ArchiveWorkspaceTemplateRequest) (*WorkspaceTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method ArchiveWorkspaceTemplate not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) GetWorkspaceTemplate(context.Context, *GetWorkspaceTemplateRequest) (*WorkspaceTemplate, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceTemplate not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplates(context.Context, *ListWorkspaceTemplatesRequest) (*ListWorkspaceTemplatesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplates not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplateVersions(context.Context, *ListWorkspaceTemplateVersionsRequest) (*ListWorkspaceTemplateVersionsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplateVersions not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) ListWorkspaceTemplatesField(context.Context, *ListWorkspaceTemplatesFieldRequest) (*ListWorkspaceTemplatesFieldResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListWorkspaceTemplatesField not implemented")
}
func (UnimplementedWorkspaceTemplateServiceServer) mustEmbedUnimplementedWorkspaceTemplateServiceServer() {
}
// UnsafeWorkspaceTemplateServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkspaceTemplateServiceServer will
// result in compilation errors.
type UnsafeWorkspaceTemplateServiceServer interface {
mustEmbedUnimplementedWorkspaceTemplateServiceServer()
}
func RegisterWorkspaceTemplateServiceServer(s grpc.ServiceRegistrar, srv WorkspaceTemplateServiceServer) {
s.RegisterService(&_WorkspaceTemplateService_serviceDesc, srv)
}
func _WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GenerateWorkspaceTemplateWorkflowTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).GenerateWorkspaceTemplateWorkflowTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/GenerateWorkspaceTemplateWorkflowTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).GenerateWorkspaceTemplateWorkflowTemplate(ctx, req.(*GenerateWorkspaceTemplateWorkflowTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_CreateWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateWorkspaceTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).CreateWorkspaceTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/CreateWorkspaceTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).CreateWorkspaceTemplate(ctx, req.(*CreateWorkspaceTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_UpdateWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateWorkspaceTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).UpdateWorkspaceTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/UpdateWorkspaceTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).UpdateWorkspaceTemplate(ctx, req.(*UpdateWorkspaceTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_ArchiveWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ArchiveWorkspaceTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).ArchiveWorkspaceTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/ArchiveWorkspaceTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).ArchiveWorkspaceTemplate(ctx, req.(*ArchiveWorkspaceTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_GetWorkspaceTemplate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceTemplateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).GetWorkspaceTemplate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/GetWorkspaceTemplate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).GetWorkspaceTemplate(ctx, req.(*GetWorkspaceTemplateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_ListWorkspaceTemplates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspaceTemplatesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplates(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplates",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplates(ctx, req.(*ListWorkspaceTemplatesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspaceTemplateVersionsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplateVersions(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplateVersions",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplateVersions(ctx, req.(*ListWorkspaceTemplateVersionsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceTemplateService_ListWorkspaceTemplatesField_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListWorkspaceTemplatesFieldRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplatesField(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.WorkspaceTemplateService/ListWorkspaceTemplatesField",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceTemplateServiceServer).ListWorkspaceTemplatesField(ctx, req.(*ListWorkspaceTemplatesFieldRequest))
}
return interceptor(ctx, in, info, handler)
}
var _WorkspaceTemplateService_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.WorkspaceTemplateService",
HandlerType: (*WorkspaceTemplateServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GenerateWorkspaceTemplateWorkflowTemplate",
Handler: _WorkspaceTemplateService_GenerateWorkspaceTemplateWorkflowTemplate_Handler,
},
{
MethodName: "CreateWorkspaceTemplate",
Handler: _WorkspaceTemplateService_CreateWorkspaceTemplate_Handler,
},
{
MethodName: "UpdateWorkspaceTemplate",
Handler: _WorkspaceTemplateService_UpdateWorkspaceTemplate_Handler,
},
{
MethodName: "ArchiveWorkspaceTemplate",
Handler: _WorkspaceTemplateService_ArchiveWorkspaceTemplate_Handler,
},
{
MethodName: "GetWorkspaceTemplate",
Handler: _WorkspaceTemplateService_GetWorkspaceTemplate_Handler,
},
{
MethodName: "ListWorkspaceTemplates",
Handler: _WorkspaceTemplateService_ListWorkspaceTemplates_Handler,
},
{
MethodName: "ListWorkspaceTemplateVersions",
Handler: _WorkspaceTemplateService_ListWorkspaceTemplateVersions_Handler,
},
{
MethodName: "ListWorkspaceTemplatesField",
Handler: _WorkspaceTemplateService_ListWorkspaceTemplatesField_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "workspace_template.proto",
}

View File

@@ -1,16 +1,17 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "protoc-gen-swagger/options/annotations.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Onepanel Core";
description: "Onepanel Core project API";
version: "1.0.0-beta1";
title: "Onepanel";
description: "Onepanel API";
version: "0.10.0";
contact: {
name: "Onepanel Core project";
name: "Onepanel project";
url: "https://github.com/onepanelio/core";
};
};
@@ -19,6 +20,7 @@ option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {
schemes: HTTPS;
consumes: "application/json";
produces: "application/json";
produces: "application/octet-stream";
security_definitions: {
security: {
key: "Bearer";

74
api/proto/auth.proto Normal file
View File

@@ -0,0 +1,74 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
service AuthService {
rpc IsValidToken(IsValidTokenRequest) returns (IsValidTokenResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/auth/token"
body: "*"
};
option deprecated = true;
}
rpc GetAccessToken(GetAccessTokenRequest) returns (GetAccessTokenResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/auth/get_access_token"
body: "*"
};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
security: {
}
};
}
rpc IsAuthorized(IsAuthorizedRequest) returns (IsAuthorizedResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/auth"
body: "isAuthorized"
};
}
}
message IsValidTokenRequest {
string username = 1;
string token = 2;
}
message IsValidTokenResponse {
string domain = 1;
string token = 2;
string username = 3;
}
message IsAuthorized {
string namespace = 1;
string verb = 2;
string group = 3;
string resource = 4;
string resourceName = 5;
}
message IsAuthorizedRequest {
IsAuthorized isAuthorized = 1;
}
message IsAuthorizedResponse {
bool authorized = 1;
}
message GetAccessTokenRequest {
string username = 1;
string token = 2;
}
message GetAccessTokenResponse {
string domain = 1;
string accessToken = 2;
string username = 3;
}

35
api/proto/common.proto Normal file
View File

@@ -0,0 +1,35 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
message Parameter {
string name = 1;
string value = 2;
string type = 3;
string displayName = 4;
string hint = 5;
bool required = 6;
string visibility = 7;
repeated ParameterOption options = 8;
}
message ParameterOption {
string name = 1;
string value = 2;
}
message LogStreamResponse {
repeated LogEntry logEntries = 1;
}
message LogEntry {
string timestamp = 1;
string content = 2;
}
message MachineType {
string name = 1;
string value = 2;
}

46
api/proto/config.proto Normal file
View File

@@ -0,0 +1,46 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
service ConfigService {
rpc GetConfig (google.protobuf.Empty) returns (GetConfigResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/config"
};
}
rpc GetNamespaceConfig (GetNamespaceConfigRequest) returns (GetNamespaceConfigResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/config"
};
}
}
message GetNamespaceConfigRequest {
string namespace = 1;
}
message GetNamespaceConfigResponse {
string bucket = 1;
}
message GetConfigResponse {
string apiUrl = 1;
string domain = 2;
string fqdn = 3;
NodePool nodePool = 4;
}
message NodePoolOption {
string name = 1;
string value = 2;
}
message NodePool {
string label = 1;
repeated NodePoolOption options = 2;
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
@@ -17,14 +18,14 @@ service CronWorkflowService {
rpc UpdateCronWorkflow(UpdateCronWorkflowRequest) returns (CronWorkflow) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/cron_workflow/{name}"
put: "/apis/v1beta1/{namespace}/cron_workflow/{uid}"
body: "cronWorkflow"
};
}
rpc GetCronWorkflow(GetCronWorkflowRequest) returns (CronWorkflow) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/cron_workflow/{name}"
get: "/apis/v1beta1/{namespace}/cron_workflow/{uid}"
};
}
@@ -37,20 +38,22 @@ service CronWorkflowService {
};
}
rpc TerminateCronWorkflow (TerminateCronWorkflowRequest) returns (google.protobuf.Empty) {
rpc DeleteCronWorkflow (DeleteCronWorkflowRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/apis/v1beta1/{namespace}/cron_workflows/{name}/terminate"
delete: "/apis/v1beta1/{namespace}/cron_workflows/{uid}"
};
}
}
message CronWorkflow {
string name = 1;
string manifest = 2;
string uid = 2;
string manifest = 3;
WorkflowExecution workflowExecution = 3;
WorkflowExecution workflowExecution = 4;
repeated KeyValue labels = 4;
repeated KeyValue labels = 5;
string namespace = 6;
}
message CreateCronWorkflowRequest {
@@ -60,18 +63,18 @@ message CreateCronWorkflowRequest {
message GetCronWorkflowRequest {
string namespace = 1;
string name = 2;
string uid = 2;
}
message UpdateCronWorkflowRequest {
string namespace = 1 ;
string name = 2;
string uid = 2;
CronWorkflow cronWorkflow = 3;
}
message TerminateCronWorkflowRequest {
message DeleteCronWorkflowRequest {
string namespace = 1;
string name = 2;
string uid = 2;
}
message ListCronWorkflowRequest {

56
api/proto/files.proto Normal file
View File

@@ -0,0 +1,56 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
service FileService {
rpc GetObjectDownloadPresignedURL (GetObjectPresignedUrlRequest) returns (GetPresignedUrlResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/files/presigned-url/{key=**}"
};
}
rpc ListFiles (ListFilesRequest) returns (ListFilesResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/files/list/{path=**}"
};
}
}
message File {
string path = 1;
string name = 2;
string extension = 3;
int64 size = 4;
string contentType = 5;
string lastModified = 6;
bool directory = 7;
}
message ListFilesRequest {
string namespace = 1;
string path = 2;
int32 page = 3;
int32 perPage = 4;
}
message ListFilesResponse {
int32 count = 1;
int32 totalCount = 2;
int32 page = 3;
int32 pages = 4;
repeated File files = 5;
string parentPath = 6;
}
message GetObjectPresignedUrlRequest {
string namespace = 1;
string key = 2;
}
message GetPresignedUrlResponse {
string url = 1;
int64 size = 2;
}

View File

@@ -0,0 +1,92 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
service InferenceService {
rpc CreateInferenceService (CreateInferenceServiceRequest) returns (GetInferenceServiceResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/inferenceservice"
body: "*"
};
}
rpc GetInferenceService(InferenceServiceIdentifier) returns (GetInferenceServiceResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/inferenceservice/{name}"
};
}
rpc DeleteInferenceService (InferenceServiceIdentifier) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/apis/v1beta1/{namespace}/inferenceservice/{name}"
};
}
}
message InferenceServiceIdentifier {
string namespace = 1;
string name = 2;
}
message Env {
string name = 1;
string value = 2;
}
message Container {
string image = 1;
string name = 2;
repeated Env env = 3;
}
message InferenceServiceTransformer {
repeated Container containers = 1;
string minCpu = 2;
string minMemory = 3;
string maxCpu = 4;
string maxMemory = 5;
}
message InferenceServicePredictor {
string name = 1;
string runtimeVersion = 2;
string storageUri = 3;
string nodeSelector = 4;
string minCpu = 5;
string minMemory = 6;
string maxCpu = 7;
string maxMemory = 8;
}
message CreateInferenceServiceRequest {
string namespace = 1;
string name = 2;
string defaultTransformerImage = 3;
InferenceServicePredictor predictor = 4;
InferenceServiceTransformer transformer = 5;
}
message DeployModelResponse {
string status = 1;
}
message InferenceServiceCondition {
string lastTransitionTime = 1;
string status = 2;
string type = 3;
}
message GetInferenceServiceResponse {
bool ready = 1;
repeated InferenceServiceCondition conditions = 2;
string predictUrl = 3;
}
message InferenceServiceEndpoints {
string predict = 1;
}

View File

@@ -1,10 +1,17 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
service LabelService {
rpc GetAvailableLabels (GetAvailableLabelsRequest) returns (GetLabelsResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/{resource}/labels"
};
}
rpc GetLabels (GetLabelsRequest) returns (GetLabelsResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/{resource}/{uid}/labels"
@@ -61,6 +68,13 @@ message GetLabelsRequest {
string uid = 3;
}
message GetAvailableLabelsRequest {
string namespace = 1;
string resource = 2;
string keyLike = 3;
string skipKeys = 4;
}
message GetLabelsResponse {
repeated KeyValue labels = 1;
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
message Metric {
string name = 1;

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
@@ -39,4 +40,5 @@ message CreateNamespaceRequest {
message Namespace {
string name = 1;
string sourceName = 2;
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/protobuf/empty.proto";
import "google/api/annotations.proto";

58
api/proto/services.proto Normal file
View File

@@ -0,0 +1,58 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
service ServiceService {
rpc GetService(GetServiceRequest) returns (Service) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/service/{name}"
};
}
rpc ListServices(ListServicesRequest) returns (ListServicesResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/service"
};
}
rpc HasService(HasServiceRequest) returns (HasServiceResponse) {
option (google.api.http) = {
get: "/apis/v1beta/service/{name}"
};
}
}
message Service {
string name = 1;
string url = 2;
}
message GetServiceRequest {
string namespace = 1;
string name = 2;
}
message HasServiceRequest {
string name = 1;
}
message HasServiceResponse {
bool hasService= 1;
}
message ListServicesRequest {
string namespace = 1;
int32 pageSize = 2;
int32 page = 3;
}
message ListServicesResponse {
int32 count = 1;
repeated Service services = 2;
int32 page = 3;
int32 pages = 4;
int32 totalCount = 5;
}

View File

@@ -1,6 +1,7 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
@@ -14,20 +15,26 @@ service WorkflowService {
rpc CreateWorkflowExecution (CreateWorkflowExecutionRequest) returns (WorkflowExecution) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workflow_executions"
body: "workflowExecution"
body: "body"
};
}
// Clone a Workflow. This is the same as running it again.
rpc CloneWorkflowExecution (CloneWorkflowExecutionRequest) returns (WorkflowExecution) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workflow_executions/{name}"
post: "/apis/v1beta1/{namespace}/workflow_executions/{uid}"
};
}
rpc GetWorkflowExecutionStatisticsForNamespace (GetWorkflowExecutionStatisticsForNamespaceRequest) returns (GetWorkflowExecutionStatisticsForNamespaceResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_execution/statistics"
};
}
rpc GetWorkflowExecution (GetWorkflowExecutionRequest) returns (WorkflowExecution) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{name}"
get: "/apis/v1beta1/{namespace}/workflow_executions/{uid}"
};
}
@@ -39,108 +46,131 @@ service WorkflowService {
rpc WatchWorkflowExecution (WatchWorkflowExecutionRequest) returns (stream WorkflowExecution) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{name}/watch"
get: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/watch"
};
}
rpc GetWorkflowExecutionLogs (GetWorkflowExecutionLogsRequest) returns (stream LogEntry) {
rpc GetWorkflowExecutionLogs (GetWorkflowExecutionLogsRequest) returns (stream LogStreamResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{name}/pods/{podName}/containers/{containerName}/logs"
get: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/pods/{podName}/containers/{containerName}/logs"
};
}
rpc GetWorkflowExecutionMetrics (GetWorkflowExecutionMetricsRequest) returns (GetWorkflowExecutionMetricsResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{name}/pods/{podName}/metrics"
get: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/pods/{podName}/metrics"
};
}
rpc ResubmitWorkflowExecution (ResubmitWorkflowExecutionRequest) returns (WorkflowExecution) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workflow_executions/{name}/resubmit"
put: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/resubmit"
};
}
rpc TerminateWorkflowExecution (TerminateWorkflowExecutionRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workflow_executions/{name}/terminate"
};
}
rpc GetArtifact (GetArtifactRequest) returns (ArtifactResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{name}/artifacts/{key=**}"
};
}
rpc ListFiles (ListFilesRequest) returns (ListFilesResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workflow_executions/{name}/files/{path=**}"
put: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/terminate"
};
}
rpc AddWorkflowExecutionStatistics (AddWorkflowExecutionStatisticRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workflow_executions/{name}/statistics"
post: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/statistics"
body: "statistics"
};
}
rpc CronStartWorkflowExecutionStatistic (CronStartWorkflowExecutionStatisticRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workflow_executions/{name}/cron_start_statistics"
post: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/cron_start_statistics"
body: "statistics"
};
}
rpc UpdateWorkflowExecutionStatus (UpdateWorkflowExecutionStatusRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/status"
body: "status"
};
}
rpc AddWorkflowExecutionMetrics (AddWorkflowExecutionsMetricsRequest) returns (WorkflowExecutionsMetricsResponse) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/metric"
body: "*"
};
}
rpc UpdateWorkflowExecutionMetrics (UpdateWorkflowExecutionsMetricsRequest) returns (WorkflowExecutionsMetricsResponse) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workflow_executions/{uid}/metric"
body: "*"
};
}
rpc ListWorkflowExecutionsField (ListWorkflowExecutionsFieldRequest) returns (ListWorkflowExecutionsFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workflow_executions/{fieldName}"
};
}
}
message CreateWorkflowExecutionRequest {
message CreateWorkflowExecutionBody {
string workflowTemplateUid = 2;
int64 workflowTemplateVersion = 3;
repeated Parameter parameters = 4;
repeated KeyValue labels = 5;
}
message CreateWorkflowExecutionRequest {
string namespace = 1;
WorkflowExecution workflowExecution = 2;
CreateWorkflowExecutionBody body = 2;
}
message CloneWorkflowExecutionRequest {
string namespace = 1;
string name = 2;
string uid = 2;
}
message GetWorkflowExecutionRequest {
string namespace = 1;
string name = 2;
string uid = 2;
}
message GetArtifactRequest {
string namespace = 1;
string name = 2;
string uid = 2;
string key = 3;
}
message WatchWorkflowExecutionRequest {
string namespace = 1;
string name = 2;
string uid = 2;
}
message ResubmitWorkflowExecutionRequest {
string namespace = 1;
string name = 2;
string uid = 2;
}
message TerminateWorkflowExecutionRequest {
string namespace = 1;
string name = 2;
string uid = 2;
}
message GetWorkflowExecutionLogsRequest {
string namespace = 1;
string name = 2;
string uid = 2;
string podName = 3;
string containerName = 4;
}
message GetWorkflowExecutionMetricsRequest {
string namespace = 1;
string name = 2;
string uid = 2;
string podName = 3;
}
@@ -154,6 +184,10 @@ message ListWorkflowExecutionsRequest {
string workflowTemplateVersion = 3;
int32 pageSize = 4;
int32 page = 5;
string order = 6;
string labels = 7;
string phase = 8;
bool includeSystem = 9;
}
message ListWorkflowExecutionsResponse {
@@ -162,11 +196,11 @@ message ListWorkflowExecutionsResponse {
int32 page = 3;
int32 pages = 4;
int32 totalCount = 5;
int32 totalAvailableCount = 6;
}
message LogEntry {
string timestamp = 1;
string content = 2;
message WorkflowExecutionMetadata {
string url = 1;
}
message WorkflowExecution {
@@ -183,31 +217,10 @@ message WorkflowExecution {
WorkflowTemplate workflowTemplate = 9;
repeated KeyValue labels = 10;
}
message ArtifactResponse {
bytes data = 1;
}
WorkflowExecutionMetadata metadata = 11;
message File {
string path = 1;
string name = 2;
string extension = 3;
int64 size = 4;
string contentType = 5;
string lastModified = 6;
bool directory = 7;
}
message ListFilesRequest {
string namespace = 1;
string name = 2;
string path = 3;
}
message ListFilesResponse {
repeated File files = 1;
string parentPath = 2;
repeated Metric metrics = 12;
}
message Statistics {
@@ -217,12 +230,62 @@ message Statistics {
message AddWorkflowExecutionStatisticRequest {
string namespace = 1;
string name = 2;
string uid = 2;
Statistics statistics = 3;
}
message CronStartWorkflowExecutionStatisticRequest {
string namespace = 1;
string name = 2;
string uid = 2;
Statistics statistics = 3;
}
message WorkflowExecutionStatus {
string phase = 1;
}
message UpdateWorkflowExecutionStatusRequest {
string namespace = 1;
string uid = 2;
WorkflowExecutionStatus status = 3;
}
message GetWorkflowExecutionStatisticsForNamespaceRequest {
string namespace = 1;
}
message GetWorkflowExecutionStatisticsForNamespaceResponse {
WorkflowExecutionStatisticReport stats = 1;
}
message AddWorkflowExecutionMetricRequest {
string namespace = 1;
string uid = 2;
Metric metric = 3;
}
message AddWorkflowExecutionsMetricsRequest {
string namespace = 1;
string uid = 2;
bool override = 3;
repeated Metric metrics = 4;
}
message UpdateWorkflowExecutionsMetricsRequest {
string namespace = 1;
string uid = 2;
repeated Metric metrics = 4;
}
message WorkflowExecutionsMetricsResponse {
repeated Metric metrics = 4;
}
message ListWorkflowExecutionsFieldRequest {
string namespace = 1;
string fieldName = 2;
}
message ListWorkflowExecutionsFieldResponse {
repeated string values = 1;
}

View File

@@ -1,21 +1,24 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "label.proto";
import "common.proto";
service WorkflowTemplateService {
rpc CreateWorkflowTemplate (CreateWorkflowTemplateRequest) returns (WorkflowTemplate) {
// Get the generated WorkflowTemplate, applying any modifications based on the content
rpc GenerateWorkflowTemplate (GenerateWorkflowTemplateRequest) returns (WorkflowTemplate) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workflow_templates"
post: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/generate"
body: "workflowTemplate"
};
}
rpc UpdateWorkflowTemplateVersion (UpdateWorkflowTemplateVersionRequest) returns (WorkflowTemplate) {
rpc CreateWorkflowTemplate (CreateWorkflowTemplateRequest) returns (WorkflowTemplate) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions/{workflowTemplate.version}"
post: "/apis/v1beta1/{namespace}/workflow_templates"
body: "workflowTemplate"
};
}
@@ -62,6 +65,18 @@ service WorkflowTemplateService {
put: "/apis/v1beta1/{namespace}/workflow_templates/{uid}/archive"
};
}
rpc ListWorkflowTemplatesField (ListWorkflowTemplatesFieldRequest) returns (ListWorkflowTemplatesFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workflow_templates/{fieldName}"
};
}
}
message GenerateWorkflowTemplateRequest {
string namespace = 1;
string uid = 2;
WorkflowTemplate workflowTemplate = 3;
}
message CreateWorkflowTemplateRequest {
@@ -101,6 +116,8 @@ message ListWorkflowTemplatesRequest {
string namespace = 1;
int32 pageSize = 2;
int32 page = 3;
string labels = 4;
}
message ListWorkflowTemplatesResponse {
@@ -109,6 +126,7 @@ message ListWorkflowTemplatesResponse {
int32 page = 3;
int32 pages = 4;
int32 totalCount = 5;
int32 totalAvailableCount = 6;
}
message ArchiveWorkflowTemplateRequest {
@@ -126,6 +144,7 @@ message WorkflowExecutionStatisticReport {
int32 running = 3;
int32 completed = 4;
int32 failed = 5;
int32 terminated = 6;
}
message CronWorkflowStatisticsReport {
@@ -134,22 +153,34 @@ message CronWorkflowStatisticsReport {
message WorkflowTemplate {
string createdAt = 1;
string uid = 2;
string name = 3;
int64 version = 4;
int64 versions = 5;
string manifest = 6;
bool isLatest = 7;
bool isArchived = 8;
repeated KeyValue labels = 9;
WorkflowExecutionStatisticReport stats = 10;
CronWorkflowStatisticsReport cronStats = 11;
string modifiedAt = 2;
string uid = 3;
string name = 4;
int64 version = 5;
int64 versions = 6;
string manifest = 7;
bool isLatest = 8;
bool isArchived = 9;
repeated KeyValue labels = 10;
WorkflowExecutionStatisticReport stats = 11;
CronWorkflowStatisticsReport cronStats = 12;
repeated Parameter parameters = 13;
string description = 14;
}
message GetWorkflowTemplateLabelsRequest {
string namespace = 1;
string name = 2;
int64 version = 3;
}
message ListWorkflowTemplatesFieldRequest {
string namespace = 1;
string fieldName = 2;
bool isSystem = 3;
}
message ListWorkflowTemplatesFieldResponse {
repeated string values = 1;
}

234
api/proto/workspace.proto Normal file
View File

@@ -0,0 +1,234 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "workspace_template.proto";
import "common.proto";
import "label.proto";
service WorkspaceService {
rpc CreateWorkspace (CreateWorkspaceRequest) returns (Workspace) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workspaces"
body: "body"
};
}
rpc GetWorkspaceStatisticsForNamespace (GetWorkspaceStatisticsForNamespaceRequest) returns (GetWorkspaceStatisticsForNamespaceResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspace/statistics"
};
}
rpc GetWorkspace (GetWorkspaceRequest) returns (Workspace) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspaces/{uid}"
};
}
rpc ListWorkspaces (ListWorkspaceRequest) returns (ListWorkspaceResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspaces"
};
}
rpc UpdateWorkspaceStatus (UpdateWorkspaceStatusRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/status"
body: "status"
};
}
rpc UpdateWorkspace (UpdateWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}"
body: "body"
};
}
rpc PauseWorkspace (PauseWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/pause"
};
}
rpc ResumeWorkspace (ResumeWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/resume"
body: "body"
};
}
rpc DeleteWorkspace (DeleteWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/apis/v1beta1/{namespace}/workspaces/{uid}"
};
}
rpc RetryLastWorkspaceAction (RetryActionWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/retry"
};
}
rpc GetWorkspaceContainerLogs (GetWorkspaceContainerLogsRequest) returns (stream LogStreamResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspaces/{uid}/containers/{containerName}/logs"
};
}
rpc ListWorkspacesField (ListWorkspacesFieldRequest) returns (ListWorkspacesFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workspaces/{fieldName}"
};
}
}
message WorkspaceComponent {
string name = 1;
string url = 2;
}
message Workspace {
string uid = 1;
string name = 2;
int64 version = 3;
string createdAt = 4;
repeated Parameter parameters = 5;
WorkspaceTemplate workspaceTemplate = 6;
WorkspaceStatus status = 7;
repeated KeyValue labels = 8;
string url = 9;
repeated Parameter templateParameters = 10;
repeated WorkspaceComponent workspaceComponents = 11;
MachineType machineType = 12;
}
message WorkspaceStatus {
string phase = 1;
string startedAt = 2;
string pausedAt = 3;
string terminatedAt = 4;
}
message CreateWorkspaceBody {
string workspaceTemplateUid = 1;
int64 workspaceTemplateVersion = 2;
repeated Parameter parameters = 3;
repeated KeyValue labels = 4;
bool captureNode = 5;
}
message CreateWorkspaceRequest {
string namespace = 1;
CreateWorkspaceBody body = 2;
}
message GetWorkspaceRequest {
string namespace = 1;
string uid = 2;
}
message UpdateWorkspaceStatusRequest {
string namespace = 1;
string uid = 2;
WorkspaceStatus status = 3;
}
message UpdateWorkspaceBody {
repeated Parameter parameters = 1;
repeated KeyValue labels = 2;
}
message UpdateWorkspaceRequest {
string namespace = 1;
string uid = 2;
UpdateWorkspaceBody body = 3;
}
message ListWorkspaceRequest {
string namespace = 1;
int32 pageSize = 2;
int32 page = 3;
string order = 4;
string labels = 5;
string phase = 6;
}
message ListWorkspaceResponse {
int32 count = 1;
repeated Workspace workspaces = 2;
int32 page = 3;
int32 pages = 4;
int32 totalCount = 5;
int32 totalAvailableCount = 6;
}
message PauseWorkspaceRequest {
string namespace = 1;
string uid = 2;
}
message ResumeWorkspaceRequest {
string namespace = 1;
string uid = 2;
UpdateWorkspaceBody body = 3;
}
message DeleteWorkspaceRequest {
string namespace = 1;
string uid = 2;
}
message RetryActionWorkspaceRequest {
string namespace = 1;
string uid = 2;
}
message WorkspaceStatisticReport {
int32 total = 1;
string lastCreated = 2;
int32 launching = 3;
int32 running = 4;
int32 updating = 5;
int32 pausing = 6;
int32 paused = 7;
int32 terminating = 8;
int32 terminated = 9;
int32 failedToPause = 10;
int32 failedToResume = 11;
int32 failedToTerminate = 12;
int32 failedToLaunch = 13;
int32 failedToUpdate = 14;
int32 failed = 15;
}
message GetWorkspaceStatisticsForNamespaceRequest {
string namespace = 1;
}
message GetWorkspaceStatisticsForNamespaceResponse {
WorkspaceStatisticReport stats = 1;
}
message GetWorkspaceContainerLogsRequest {
string namespace = 1;
string uid = 2;
string containerName = 3;
int64 sinceTime = 4;
}
message ListWorkspacesFieldRequest {
string namespace = 1;
string fieldName = 2;
}
message ListWorkspacesFieldResponse {
repeated string values = 1;
}

View File

@@ -1,10 +1,11 @@
syntax = "proto3";
package api;
option go_package = "github.com/onepanelio/core/api/gen";
import "google/api/annotations.proto";
import "workflow_template.proto";
import "google/protobuf/empty.proto";
import "label.proto";
service WorkspaceTemplateService {
// Get the generated WorkflowTemplate for a WorkspaceTemplate
@@ -26,11 +27,18 @@ service WorkspaceTemplateService {
// Updates a WorkspaceTemplate
rpc UpdateWorkspaceTemplate (UpdateWorkspaceTemplateRequest) returns (WorkspaceTemplate) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspace_templates/{name}"
put: "/apis/v1beta1/{namespace}/workspace_templates/{uid}"
body: "workspaceTemplate"
};
}
// Archives a WorkspaceTemplate
rpc ArchiveWorkspaceTemplate (ArchiveWorkspaceTemplateRequest) returns (WorkspaceTemplate) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspace_templates/{uid}/archive"
};
}
// Get a WorkspaceTemplate
rpc GetWorkspaceTemplate (GetWorkspaceTemplateRequest) returns (WorkspaceTemplate) {
option (google.api.http) = {
@@ -49,6 +57,12 @@ service WorkspaceTemplateService {
get: "/apis/v1beta1/{namespace}/workspace_templates/{uid}/versions"
};
}
rpc ListWorkspaceTemplatesField (ListWorkspaceTemplatesFieldRequest) returns (ListWorkspaceTemplatesFieldResponse) {
option (google.api.http) = {
get: "/apis/v1beta/{namespace}/field/workspace_templates/{fieldName}"
};
}
}
message WorkspaceTemplate {
@@ -59,6 +73,9 @@ message WorkspaceTemplate {
bool isLatest = 5;
string createdAt = 6;
WorkflowTemplate workflowTemplate = 7;
repeated KeyValue labels = 8;
bool isArchived = 9;
string description = 10;
}
message GenerateWorkspaceTemplateWorkflowTemplateRequest {
@@ -74,7 +91,7 @@ message CreateWorkspaceTemplateRequest {
message UpdateWorkspaceTemplateRequest {
string namespace = 1;
string name = 2;
string uid = 2;
WorkspaceTemplate workspaceTemplate = 3;
}
@@ -84,10 +101,18 @@ message GetWorkspaceTemplateRequest {
int64 version = 3;
}
message ArchiveWorkspaceTemplateRequest {
string namespace = 1;
string uid = 2;
}
message ListWorkspaceTemplatesRequest {
string namespace = 1;
int32 pageSize = 2;
int32 page = 3;
string order = 4;
string labels = 5;
string uid = 6;
}
message ListWorkspaceTemplatesResponse {
@@ -108,4 +133,11 @@ message ListWorkspaceTemplateVersionsResponse {
repeated WorkspaceTemplate workspaceTemplates = 2;
}
message ListWorkspaceTemplatesFieldRequest {
string namespace = 1;
string fieldName = 2;
}
message ListWorkspaceTemplatesFieldResponse {
repeated string values = 1;
}

0
api/third_party/google/LICENSE → api/third_party/LICENSE vendored Executable file → Normal file
View File

23
api/third_party/README.grpc-gateway vendored Normal file
View File

@@ -0,0 +1,23 @@
Google APIs
============
Project: Google APIs
URL: https://github.com/google/googleapis
Revision: 3544ab16c3342d790b00764251e348705991ea4b
License: Apache License 2.0
Imported Files
---------------
- google/api/annotations.proto
- google/api/http.proto
- google/api/httpbody.proto
Generated Files
----------------
They are generated from the .proto files by protoc-gen-go.
- google/api/annotations.pb.go
- google/api/http.pb.go

0
api/third_party/google/api/annotations.proto vendored Executable file → Normal file
View File

View File

@@ -0,0 +1,78 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.api;
import "google/protobuf/descriptor.proto";
option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
option java_multiple_files = true;
option java_outer_classname = "FieldBehaviorProto";
option java_package = "com.google.api";
option objc_class_prefix = "GAPI";
extend google.protobuf.FieldOptions {
// A designation of a specific field behavior (required, output only, etc.)
// in protobuf messages.
//
// Examples:
//
// string name = 1 [(google.api.field_behavior) = REQUIRED];
// State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// google.protobuf.Duration ttl = 1
// [(google.api.field_behavior) = INPUT_ONLY];
// google.protobuf.Timestamp expire_time = 1
// [(google.api.field_behavior) = OUTPUT_ONLY,
// (google.api.field_behavior) = IMMUTABLE];
repeated google.api.FieldBehavior field_behavior = 1052;
}
// An indicator of the behavior of a given field (for example, that a field
// is required in requests, or given as output but ignored as input).
// This **does not** change the behavior in protocol buffers itself; it only
// denotes the behavior and may affect how API tooling handles the field.
//
// Note: This enum **may** receive new values in the future.
enum FieldBehavior {
// Conventional default for enums. Do not use this.
FIELD_BEHAVIOR_UNSPECIFIED = 0;
// Specifically denotes a field as optional.
// While all fields in protocol buffers are optional, this may be specified
// for emphasis if appropriate.
OPTIONAL = 1;
// Denotes a field as required.
// This indicates that the field **must** be provided as part of the request,
// and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
REQUIRED = 2;
// Denotes a field as output only.
// This indicates that the field is provided in responses, but including the
// field in a request does nothing (the server *must* ignore it and
// *must not* throw an error as a result of the field's presence).
OUTPUT_ONLY = 3;
// Denotes a field as input only.
// This indicates that the field is provided in requests, and the
// corresponding field is not included in output.
INPUT_ONLY = 4;
// Denotes a field as immutable.
// This indicates that the field may be set once in a request to create a
// resource, but may not be changed thereafter.
IMMUTABLE = 5;
}

0
api/third_party/google/api/http.proto vendored Executable file → Normal file
View File

0
api/third_party/google/api/httpbody.proto vendored Executable file → Normal file
View File

0
api/third_party/google/rpc/code.proto vendored Executable file → Normal file
View File

0
api/third_party/google/rpc/error_details.proto vendored Executable file → Normal file
View File

0
api/third_party/google/rpc/status.proto vendored Executable file → Normal file
View File

View File

@@ -1,42 +1,42 @@
syntax = "proto3";
package grpc.gateway.protoc_gen_swagger.options;
package grpc.gateway.protoc_gen_openapiv2.options;
option go_package = "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options";
option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";
import "google/protobuf/descriptor.proto";
import "protoc-gen-swagger/options/openapiv2.proto";
import "protoc-gen-openapiv2/options/openapiv2.proto";
extend google.protobuf.FileOptions {
// ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project.
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Swagger openapiv2_swagger = 1042;
}
extend google.protobuf.MethodOptions {
// ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project.
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Operation openapiv2_operation = 1042;
}
extend google.protobuf.MessageOptions {
// ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project.
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Schema openapiv2_schema = 1042;
}
extend google.protobuf.ServiceOptions {
// ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project.
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.
Tag openapiv2_tag = 1042;
}
extend google.protobuf.FieldOptions {
// ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project.
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
//
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
// different descriptor messages.

View File

@@ -0,0 +1,645 @@
syntax = "proto3";
package grpc.gateway.protoc_gen_openapiv2.options;
option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options";
import "google/protobuf/struct.proto";
// Scheme describes the schemes supported by the OpenAPI Swagger
// and Operation objects.
enum Scheme {
UNKNOWN = 0;
HTTP = 1;
HTTPS = 2;
WS = 3;
WSS = 4;
}
// `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
//
// Example:
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
// info: {
// title: "Echo API";
// version: "1.0";
// description: ";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// email: "none@example.com";
// };
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// };
// };
// schemes: HTTPS;
// consumes: "application/json";
// produces: "application/json";
// };
//
message Swagger {
// Specifies the OpenAPI Specification version being used. It can be
// used by the OpenAPI UI and other clients to interpret the API listing. The
// value MUST be "2.0".
string swagger = 1;
// Provides metadata about the API. The metadata can be used by the
// clients if needed.
Info info = 2;
// The host (name or ip) serving the API. This MUST be the host only and does
// not include the scheme nor sub-paths. It MAY include a port. If the host is
// not included, the host serving the documentation is to be used (including
// the port). The host does not support path templating.
string host = 3;
// The base path on which the API is served, which is relative to the host. If
// it is not included, the API is served directly under the host. The value
// MUST start with a leading slash (/). The basePath does not support path
// templating.
// Note that using `base_path` does not change the endpoint paths that are
// generated in the resulting OpenAPI file. If you wish to use `base_path`
// with relatively generated OpenAPI paths, the `base_path` prefix must be
// manually removed from your `google.api.http` paths and your code changed to
// serve the API from the `base_path`.
string base_path = 4;
// The transfer protocol of the API. Values MUST be from the list: "http",
// "https", "ws", "wss". If the schemes is not included, the default scheme to
// be used is the one used to access the OpenAPI definition itself.
repeated Scheme schemes = 5;
// A list of MIME types the APIs can consume. This is global to all APIs but
// can be overridden on specific API calls. Value MUST be as described under
// Mime Types.
repeated string consumes = 6;
// A list of MIME types the APIs can produce. This is global to all APIs but
// can be overridden on specific API calls. Value MUST be as described under
// Mime Types.
repeated string produces = 7;
// field 8 is reserved for 'paths'.
reserved 8;
// field 9 is reserved for 'definitions', which at this time are already
// exposed as and customizable as proto messages.
reserved 9;
// An object to hold responses that can be used across operations. This
// property does not define global responses for all operations.
map<string, Response> responses = 10;
// Security scheme definitions that can be used across the specification.
SecurityDefinitions security_definitions = 11;
// A declaration of which security schemes are applied for the API as a whole.
// The list of values describes alternative security schemes that can be used
// (that is, there is a logical OR between the security requirements).
// Individual operations can override this definition.
repeated SecurityRequirement security = 12;
// field 13 is reserved for 'tags', which are supposed to be exposed as and
// customizable as proto services. TODO(ivucica): add processing of proto
// service objects into OpenAPI v2 Tag objects.
reserved 13;
// Additional external documentation.
ExternalDocumentation external_docs = 14;
map<string, google.protobuf.Value> extensions = 15;
}
// `Operation` is a representation of OpenAPI v2 specification's Operation object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
//
// Example:
//
// service EchoService {
// rpc Echo(SimpleMessage) returns (SimpleMessage) {
// option (google.api.http) = {
// get: "/v1/example/echo/{id}"
// };
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
// summary: "Get a message.";
// operation_id: "getMessage";
// tags: "echo";
// responses: {
// key: "200"
// value: {
// description: "OK";
// }
// }
// };
// }
// }
message Operation {
// A list of tags for API documentation control. Tags can be used for logical
// grouping of operations by resources or any other qualifier.
repeated string tags = 1;
// A short summary of what the operation does. For maximum readability in the
// swagger-ui, this field SHOULD be less than 120 characters.
string summary = 2;
// A verbose explanation of the operation behavior. GFM syntax can be used for
// rich text representation.
string description = 3;
// Additional external documentation for this operation.
ExternalDocumentation external_docs = 4;
// Unique string used to identify the operation. The id MUST be unique among
// all operations described in the API. Tools and libraries MAY use the
// operationId to uniquely identify an operation, therefore, it is recommended
// to follow common programming naming conventions.
string operation_id = 5;
// A list of MIME types the operation can consume. This overrides the consumes
// definition at the OpenAPI Object. An empty value MAY be used to clear the
// global definition. Value MUST be as described under Mime Types.
repeated string consumes = 6;
// A list of MIME types the operation can produce. This overrides the produces
// definition at the OpenAPI Object. An empty value MAY be used to clear the
// global definition. Value MUST be as described under Mime Types.
repeated string produces = 7;
// field 8 is reserved for 'parameters'.
reserved 8;
// The list of possible responses as they are returned from executing this
// operation.
map<string, Response> responses = 9;
// The transfer protocol for the operation. Values MUST be from the list:
// "http", "https", "ws", "wss". The value overrides the OpenAPI Object
// schemes definition.
repeated Scheme schemes = 10;
// Declares this operation to be deprecated. Usage of the declared operation
// should be refrained. Default value is false.
bool deprecated = 11;
// A declaration of which security schemes are applied for this operation. The
// list of values describes alternative security schemes that can be used
// (that is, there is a logical OR between the security requirements). This
// definition overrides any declared top-level security. To remove a top-level
// security declaration, an empty array can be used.
repeated SecurityRequirement security = 12;
map<string, google.protobuf.Value> extensions = 13;
}
// `Header` is a representation of OpenAPI v2 specification's Header object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
//
message Header {
// `Description` is a short description of the header.
string description = 1;
// The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
string type = 2;
// `Format` The extending format for the previously mentioned type.
string format = 3;
// field 4 is reserved for 'items', but in OpenAPI-specific way.
reserved 4;
// field 5 is reserved `Collection Format` Determines the format of the array if type array is used.
reserved 5;
// `Default` Declares the value of the header that the server will use if none is provided.
// See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
// Unlike JSON Schema this value MUST conform to the defined type for the header.
string default = 6;
// field 7 is reserved for 'maximum'.
reserved 7;
// field 8 is reserved for 'exclusiveMaximum'.
reserved 8;
// field 9 is reserved for 'minimum'.
reserved 9;
// field 10 is reserved for 'exclusiveMinimum'.
reserved 10;
// field 11 is reserved for 'maxLength'.
reserved 11;
// field 12 is reserved for 'minLength'.
reserved 12;
// 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
string pattern = 13;
// field 14 is reserved for 'maxItems'.
reserved 14;
// field 15 is reserved for 'minItems'.
reserved 15;
// field 16 is reserved for 'uniqueItems'.
reserved 16;
// field 17 is reserved for 'enum'.
reserved 17;
// field 18 is reserved for 'multipleOf'.
reserved 18;
}
// `Response` is a representation of OpenAPI v2 specification's Response object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
//
message Response {
// `Description` is a short description of the response.
// GFM syntax can be used for rich text representation.
string description = 1;
// `Schema` optionally defines the structure of the response.
// If `Schema` is not provided, it means there is no content to the response.
Schema schema = 2;
// `Headers` A list of headers that are sent with the response.
// `Header` name is expected to be a string in the canonical format of the MIME header key
// See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
map<string, Header> headers = 3;
// `Examples` gives per-mimetype response examples.
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
map<string, string> examples = 4;
map<string, google.protobuf.Value> extensions = 5;
}
// `Info` is a representation of OpenAPI v2 specification's Info object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
//
// Example:
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
// info: {
// title: "Echo API";
// version: "1.0";
// description: ";
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// email: "none@example.com";
// };
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// };
// };
// ...
// };
//
message Info {
// The title of the application.
string title = 1;
// A short description of the application. GFM syntax can be used for rich
// text representation.
string description = 2;
// The Terms of Service for the API.
string terms_of_service = 3;
// The contact information for the exposed API.
Contact contact = 4;
// The license information for the exposed API.
License license = 5;
// Provides the version of the application API (not to be confused
// with the specification version).
string version = 6;
map<string, google.protobuf.Value> extensions = 7;
}
// `Contact` is a representation of OpenAPI v2 specification's Contact object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
//
// Example:
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
// info: {
// ...
// contact: {
// name: "gRPC-Gateway project";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// email: "none@example.com";
// };
// ...
// };
// ...
// };
//
message Contact {
// The identifying name of the contact person/organization.
string name = 1;
// The URL pointing to the contact information. MUST be in the format of a
// URL.
string url = 2;
// The email address of the contact person/organization. MUST be in the format
// of an email address.
string email = 3;
}
// `License` is a representation of OpenAPI v2 specification's License object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
//
// Example:
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
// info: {
// ...
// license: {
// name: "BSD 3-Clause License";
// url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
// };
// ...
// };
// ...
// };
//
message License {
// The license name used for the API.
string name = 1;
// A URL to the license used for the API. MUST be in the format of a URL.
string url = 2;
}
// `ExternalDocumentation` is a representation of OpenAPI v2 specification's
// ExternalDocumentation object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
//
// Example:
//
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
// ...
// external_docs: {
// description: "More about gRPC-Gateway";
// url: "https://github.com/grpc-ecosystem/grpc-gateway";
// }
// ...
// };
//
message ExternalDocumentation {
// A short description of the target documentation. GFM syntax can be used for
// rich text representation.
string description = 1;
// The URL for the target documentation. Value MUST be in the format
// of a URL.
string url = 2;
}
// `Schema` is a representation of OpenAPI v2 specification's Schema object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
//
message Schema {
JSONSchema json_schema = 1;
// Adds support for polymorphism. The discriminator is the schema property
// name that is used to differentiate between other schema that inherit this
// schema. The property name used MUST be defined at this schema and it MUST
// be in the required property list. When used, the value MUST be the name of
// this schema or any schema that inherits it.
string discriminator = 2;
// Relevant only for Schema "properties" definitions. Declares the property as
// "read only". This means that it MAY be sent as part of a response but MUST
// NOT be sent as part of the request. Properties marked as readOnly being
// true SHOULD NOT be in the required list of the defined schema. Default
// value is false.
bool read_only = 3;
// field 4 is reserved for 'xml'.
reserved 4;
// Additional external documentation for this schema.
ExternalDocumentation external_docs = 5;
// A free-form property to include an example of an instance for this schema in JSON.
// This is copied verbatim to the output.
string example = 6;
}
// `JSONSchema` represents properties from JSON Schema taken, and as used, in
// the OpenAPI v2 spec.
//
// This includes changes made by OpenAPI v2.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
//
// See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
//
// Example:
//
// message SimpleMessage {
// option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
// json_schema: {
// title: "SimpleMessage"
// description: "A simple message."
// required: ["id"]
// }
// };
//
// // Id represents the message identifier.
// string id = 1; [
// (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
// {description: "The unique identifier of the simple message."
// }];
// }
//
message JSONSchema {
// field 1 is reserved for '$id', omitted from OpenAPI v2.
reserved 1;
// field 2 is reserved for '$schema', omitted from OpenAPI v2.
reserved 2;
// Ref is used to define an external reference to include in the message.
// This could be a fully qualified proto message reference, and that type must
// be imported into the protofile. If no message is identified, the Ref will
// be used verbatim in the output.
// For example:
// `ref: ".google.protobuf.Timestamp"`.
string ref = 3;
// field 4 is reserved for '$comment', omitted from OpenAPI v2.
reserved 4;
// The title of the schema.
string title = 5;
// A short description of the schema.
string description = 6;
string default = 7;
bool read_only = 8;
// A free-form property to include a JSON example of this field. This is copied
// verbatim to the output swagger.json. Quotes must be escaped.
// This property is the same for 2.0 and 3.0.0 https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/3.0.0.md#schemaObject https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
string example = 9;
double multiple_of = 10;
// Maximum represents an inclusive upper limit for a numeric instance. The
// value of MUST be a number,
double maximum = 11;
bool exclusive_maximum = 12;
// minimum represents an inclusive lower limit for a numeric instance. The
// value of MUST be a number,
double minimum = 13;
bool exclusive_minimum = 14;
uint64 max_length = 15;
uint64 min_length = 16;
string pattern = 17;
// field 18 is reserved for 'additionalItems', omitted from OpenAPI v2.
reserved 18;
// field 19 is reserved for 'items', but in OpenAPI-specific way.
// TODO(ivucica): add 'items'?
reserved 19;
uint64 max_items = 20;
uint64 min_items = 21;
bool unique_items = 22;
// field 23 is reserved for 'contains', omitted from OpenAPI v2.
reserved 23;
uint64 max_properties = 24;
uint64 min_properties = 25;
repeated string required = 26;
// field 27 is reserved for 'additionalProperties', but in OpenAPI-specific
// way. TODO(ivucica): add 'additionalProperties'?
reserved 27;
// field 28 is reserved for 'definitions', omitted from OpenAPI v2.
reserved 28;
// field 29 is reserved for 'properties', but in OpenAPI-specific way.
// TODO(ivucica): add 'additionalProperties'?
reserved 29;
// following fields are reserved, as the properties have been omitted from
// OpenAPI v2:
// patternProperties, dependencies, propertyNames, const
reserved 30 to 33;
// Items in 'array' must be unique.
repeated string array = 34;
enum JSONSchemaSimpleTypes {
UNKNOWN = 0;
ARRAY = 1;
BOOLEAN = 2;
INTEGER = 3;
NULL = 4;
NUMBER = 5;
OBJECT = 6;
STRING = 7;
}
repeated JSONSchemaSimpleTypes type = 35;
// `Format`
string format = 36;
// following fields are reserved, as the properties have been omitted from
// OpenAPI v2: contentMediaType, contentEncoding, if, then, else
reserved 37 to 41;
// field 42 is reserved for 'allOf', but in OpenAPI-specific way.
// TODO(ivucica): add 'allOf'?
reserved 42;
// following fields are reserved, as the properties have been omitted from
// OpenAPI v2:
// anyOf, oneOf, not
reserved 43 to 45;
// Items in `enum` must be unique https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1
repeated string enum = 46;
}
// `Tag` is a representation of OpenAPI v2 specification's Tag object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
//
message Tag {
// field 1 is reserved for 'name'. In our generator, this is (to be) extracted
// from the name of proto service, and thus not exposed to the user, as
// changing tag object's name would break the link to the references to the
// tag in individual operation specifications.
//
// TODO(ivucica): Add 'name' property. Use it to allow override of the name of
// global Tag object, then use that name to reference the tag throughout the
// OpenAPI file.
reserved 1;
// A short description for the tag. GFM syntax can be used for rich text
// representation.
string description = 2;
// Additional external documentation for this tag.
ExternalDocumentation external_docs = 3;
}
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
// Security Definitions object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
//
// A declaration of the security schemes available to be used in the
// specification. This does not enforce the security schemes on the operations
// and only serves to provide the relevant details for each scheme.
message SecurityDefinitions {
// A single security scheme definition, mapping a "name" to the scheme it
// defines.
map<string, SecurityScheme> security = 1;
}
// `SecurityScheme` is a representation of OpenAPI v2 specification's
// Security Scheme object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
//
// Allows the definition of a security scheme that can be used by the
// operations. Supported schemes are basic authentication, an API key (either as
// a header or as a query parameter) and OAuth2's common flows (implicit,
// password, application and access code).
message SecurityScheme {
// The type of the security scheme. Valid values are "basic",
// "apiKey" or "oauth2".
enum Type {
TYPE_INVALID = 0;
TYPE_BASIC = 1;
TYPE_API_KEY = 2;
TYPE_OAUTH2 = 3;
}
// The location of the API key. Valid values are "query" or "header".
enum In {
IN_INVALID = 0;
IN_QUERY = 1;
IN_HEADER = 2;
}
// The flow used by the OAuth2 security scheme. Valid values are
// "implicit", "password", "application" or "accessCode".
enum Flow {
FLOW_INVALID = 0;
FLOW_IMPLICIT = 1;
FLOW_PASSWORD = 2;
FLOW_APPLICATION = 3;
FLOW_ACCESS_CODE = 4;
}
// The type of the security scheme. Valid values are "basic",
// "apiKey" or "oauth2".
Type type = 1;
// A short description for security scheme.
string description = 2;
// The name of the header or query parameter to be used.
// Valid for apiKey.
string name = 3;
// The location of the API key. Valid values are "query" or
// "header".
// Valid for apiKey.
In in = 4;
// The flow used by the OAuth2 security scheme. Valid values are
// "implicit", "password", "application" or "accessCode".
// Valid for oauth2.
Flow flow = 5;
// The authorization URL to be used for this flow. This SHOULD be in
// the form of a URL.
// Valid for oauth2/implicit and oauth2/accessCode.
string authorization_url = 6;
// The token URL to be used for this flow. This SHOULD be in the
// form of a URL.
// Valid for oauth2/password, oauth2/application and oauth2/accessCode.
string token_url = 7;
// The available scopes for the OAuth2 security scheme.
// Valid for oauth2.
Scopes scopes = 8;
map<string, google.protobuf.Value> extensions = 9;
}
// `SecurityRequirement` is a representation of OpenAPI v2 specification's
// Security Requirement object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
//
// Lists the required security schemes to execute this operation. The object can
// have multiple security schemes declared in it which are all required (that
// is, there is a logical AND between the schemes).
//
// The name used for each property MUST correspond to a security scheme
// declared in the Security Definitions.
message SecurityRequirement {
// If the security scheme is of type "oauth2", then the value is a list of
// scope names required for the execution. For other security scheme types,
// the array MUST be empty.
message SecurityRequirementValue {
repeated string scope = 1;
}
// Each name must correspond to a security scheme which is declared in
// the Security Definitions. If the security scheme is of type "oauth2",
// then the value is a list of scope names required for the execution.
// For other security scheme types, the array MUST be empty.
map<string, SecurityRequirementValue> security_requirement = 1;
}
// `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
//
// Lists the available scopes for an OAuth2 security scheme.
message Scopes {
// Maps between a name of a scope to a short description of it (as the value
// of the property).
map<string, string> scope = 1;
}

View File

@@ -1,380 +0,0 @@
syntax = "proto3";
package grpc.gateway.protoc_gen_swagger.options;
option go_package = "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger/options";
import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
// `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
//
// TODO(ivucica): document fields
message Swagger {
string swagger = 1;
Info info = 2;
string host = 3;
// `base_path` is the common prefix path used on all API endpoints (ie. /api, /v1, etc.). By adding this,
// it allows you to remove this portion from the path endpoints in your Swagger file making them easier
// to read. Note that using `base_path` does not change the endpoint paths that are generated in the resulting
// Swagger file. If you wish to use `base_path` with relatively generated Swagger paths, the
// `base_path` prefix must be manually removed from your `google.api.http` paths and your code changed to
// serve the API from the `base_path`.
string base_path = 4;
enum SwaggerScheme {
UNKNOWN = 0;
HTTP = 1;
HTTPS = 2;
WS = 3;
WSS = 4;
}
repeated SwaggerScheme schemes = 5;
repeated string consumes = 6;
repeated string produces = 7;
// field 8 is reserved for 'paths'.
reserved 8;
// field 9 is reserved for 'definitions', which at this time are already
// exposed as and customizable as proto messages.
reserved 9;
map<string, Response> responses = 10;
SecurityDefinitions security_definitions = 11;
repeated SecurityRequirement security = 12;
// field 13 is reserved for 'tags', which are supposed to be exposed as and
// customizable as proto services. TODO(ivucica): add processing of proto
// service objects into OpenAPI v2 Tag objects.
reserved 13;
ExternalDocumentation external_docs = 14;
map<string, google.protobuf.Value> extensions = 15;
}
// `Operation` is a representation of OpenAPI v2 specification's Operation object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
//
// TODO(ivucica): document fields
message Operation {
repeated string tags = 1;
string summary = 2;
string description = 3;
ExternalDocumentation external_docs = 4;
string operation_id = 5;
repeated string consumes = 6;
repeated string produces = 7;
// field 8 is reserved for 'parameters'.
reserved 8;
map<string, Response> responses = 9;
repeated string schemes = 10;
bool deprecated = 11;
repeated SecurityRequirement security = 12;
map<string, google.protobuf.Value> extensions = 13;
}
// `Response` is a representation of OpenAPI v2 specification's Response object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
//
message Response {
// `Description` is a short description of the response.
// GFM syntax can be used for rich text representation.
string description = 1;
// `Schema` optionally defines the structure of the response.
// If `Schema` is not provided, it means there is no content to the response.
Schema schema = 2;
// field 3 is reserved for 'headers'.
reserved 3;
// `Examples` gives per-mimetype response examples.
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
map<string, string> examples = 4;
map<string, google.protobuf.Value> extensions = 5;
}
// `Info` is a representation of OpenAPI v2 specification's Info object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
//
// TODO(ivucica): document fields
message Info {
string title = 1;
string description = 2;
string terms_of_service = 3;
Contact contact = 4;
License license = 5;
string version = 6;
map<string, google.protobuf.Value> extensions = 7;
}
// `Contact` is a representation of OpenAPI v2 specification's Contact object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
//
// TODO(ivucica): document fields
message Contact {
string name = 1;
string url = 2;
string email = 3;
}
// `License` is a representation of OpenAPI v2 specification's License object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
//
message License {
// Required. The license name used for the API.
string name = 1;
// A URL to the license used for the API.
string url = 2;
}
// `ExternalDocumentation` is a representation of OpenAPI v2 specification's
// ExternalDocumentation object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
//
// TODO(ivucica): document fields
message ExternalDocumentation {
string description = 1;
string url = 2;
}
// `Schema` is a representation of OpenAPI v2 specification's Schema object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
//
// TODO(ivucica): document fields
message Schema {
JSONSchema json_schema = 1;
string discriminator = 2;
bool read_only = 3;
// field 4 is reserved for 'xml'.
reserved 4;
ExternalDocumentation external_docs = 5;
google.protobuf.Any example = 6;
}
// `JSONSchema` represents properties from JSON Schema taken, and as used, in
// the OpenAPI v2 spec.
//
// This includes changes made by OpenAPI v2.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
//
// See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
// https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
//
// TODO(ivucica): document fields
message JSONSchema {
// field 1 is reserved for '$id', omitted from OpenAPI v2.
reserved 1;
// field 2 is reserved for '$schema', omitted from OpenAPI v2.
reserved 2;
// Ref is used to define an external reference to include in the message.
// This could be a fully qualified proto message reference, and that type must be imported
// into the protofile. If no message is identified, the Ref will be used verbatim in
// the output.
// For example:
// `ref: ".google.protobuf.Timestamp"`.
string ref = 3;
// field 4 is reserved for '$comment', omitted from OpenAPI v2.
reserved 4;
string title = 5;
string description = 6;
string default = 7;
bool read_only = 8;
// field 9 is reserved for 'examples', which is omitted from OpenAPI v2 in favor of 'example' field.
reserved 9;
double multiple_of = 10;
double maximum = 11;
bool exclusive_maximum = 12;
double minimum = 13;
bool exclusive_minimum = 14;
uint64 max_length = 15;
uint64 min_length = 16;
string pattern = 17;
// field 18 is reserved for 'additionalItems', omitted from OpenAPI v2.
reserved 18;
// field 19 is reserved for 'items', but in OpenAPI-specific way. TODO(ivucica): add 'items'?
reserved 19;
uint64 max_items = 20;
uint64 min_items = 21;
bool unique_items = 22;
// field 23 is reserved for 'contains', omitted from OpenAPI v2.
reserved 23;
uint64 max_properties = 24;
uint64 min_properties = 25;
repeated string required = 26;
// field 27 is reserved for 'additionalProperties', but in OpenAPI-specific way. TODO(ivucica): add 'additionalProperties'?
reserved 27;
// field 28 is reserved for 'definitions', omitted from OpenAPI v2.
reserved 28;
// field 29 is reserved for 'properties', but in OpenAPI-specific way. TODO(ivucica): add 'additionalProperties'?
reserved 29;
// following fields are reserved, as the properties have been omitted from OpenAPI v2:
// patternProperties, dependencies, propertyNames, const
reserved 30 to 33;
// Items in 'array' must be unique.
repeated string array = 34;
enum JSONSchemaSimpleTypes {
UNKNOWN = 0;
ARRAY = 1;
BOOLEAN = 2;
INTEGER = 3;
NULL = 4;
NUMBER = 5;
OBJECT = 6;
STRING = 7;
}
repeated JSONSchemaSimpleTypes type = 35;
// following fields are reserved, as the properties have been omitted from OpenAPI v2:
// format, contentMediaType, contentEncoding, if, then, else
reserved 36 to 41;
// field 42 is reserved for 'allOf', but in OpenAPI-specific way. TODO(ivucica): add 'allOf'?
reserved 42;
// following fields are reserved, as the properties have been omitted from OpenAPI v2:
// anyOf, oneOf, not
reserved 43 to 45;
}
// `Tag` is a representation of OpenAPI v2 specification's Tag object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
//
// TODO(ivucica): document fields
message Tag {
// field 1 is reserved for 'name'. In our generator, this is (to be) extracted
// from the name of proto service, and thus not exposed to the user, as
// changing tag object's name would break the link to the references to the
// tag in individual operation specifications.
//
// TODO(ivucica): Add 'name' property. Use it to allow override of the name of
// global Tag object, then use that name to reference the tag throughout the
// Swagger file.
reserved 1;
// TODO(ivucica): Description should be extracted from comments on the proto
// service object.
string description = 2;
ExternalDocumentation external_docs = 3;
}
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
// Security Definitions object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityDefinitionsObject
//
// A declaration of the security schemes available to be used in the
// specification. This does not enforce the security schemes on the operations
// and only serves to provide the relevant details for each scheme.
message SecurityDefinitions {
// A single security scheme definition, mapping a "name" to the scheme it defines.
map<string, SecurityScheme> security = 1;
}
// `SecurityScheme` is a representation of OpenAPI v2 specification's
// Security Scheme object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securitySchemeObject
//
// Allows the definition of a security scheme that can be used by the
// operations. Supported schemes are basic authentication, an API key (either as
// a header or as a query parameter) and OAuth2's common flows (implicit,
// password, application and access code).
message SecurityScheme {
// Required. The type of the security scheme. Valid values are "basic",
// "apiKey" or "oauth2".
enum Type {
TYPE_INVALID = 0;
TYPE_BASIC = 1;
TYPE_API_KEY = 2;
TYPE_OAUTH2 = 3;
}
// Required. The location of the API key. Valid values are "query" or "header".
enum In {
IN_INVALID = 0;
IN_QUERY = 1;
IN_HEADER = 2;
}
// Required. The flow used by the OAuth2 security scheme. Valid values are
// "implicit", "password", "application" or "accessCode".
enum Flow {
FLOW_INVALID = 0;
FLOW_IMPLICIT = 1;
FLOW_PASSWORD = 2;
FLOW_APPLICATION = 3;
FLOW_ACCESS_CODE = 4;
}
// Required. The type of the security scheme. Valid values are "basic",
// "apiKey" or "oauth2".
Type type = 1;
// A short description for security scheme.
string description = 2;
// Required. The name of the header or query parameter to be used.
//
// Valid for apiKey.
string name = 3;
// Required. The location of the API key. Valid values are "query" or "header".
//
// Valid for apiKey.
In in = 4;
// Required. The flow used by the OAuth2 security scheme. Valid values are
// "implicit", "password", "application" or "accessCode".
//
// Valid for oauth2.
Flow flow = 5;
// Required. The authorization URL to be used for this flow. This SHOULD be in
// the form of a URL.
//
// Valid for oauth2/implicit and oauth2/accessCode.
string authorization_url = 6;
// Required. The token URL to be used for this flow. This SHOULD be in the
// form of a URL.
//
// Valid for oauth2/password, oauth2/application and oauth2/accessCode.
string token_url = 7;
// Required. The available scopes for the OAuth2 security scheme.
//
// Valid for oauth2.
Scopes scopes = 8;
map<string, google.protobuf.Value> extensions = 9;
}
// `SecurityRequirement` is a representation of OpenAPI v2 specification's
// Security Requirement object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#securityRequirementObject
//
// Lists the required security schemes to execute this operation. The object can
// have multiple security schemes declared in it which are all required (that
// is, there is a logical AND between the schemes).
//
// The name used for each property MUST correspond to a security scheme
// declared in the Security Definitions.
message SecurityRequirement {
// If the security scheme is of type "oauth2", then the value is a list of
// scope names required for the execution. For other security scheme types,
// the array MUST be empty.
message SecurityRequirementValue {
repeated string scope = 1;
}
// Each name must correspond to a security scheme which is declared in
// the Security Definitions. If the security scheme is of type "oauth2",
// then the value is a list of scope names required for the execution.
// For other security scheme types, the array MUST be empty.
map<string, SecurityRequirementValue> security_requirement = 1;
}
// `Scopes` is a representation of OpenAPI v2 specification's Scopes object.
//
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#scopesObject
//
// Lists the available scopes for an OAuth2 security scheme.
message Scopes {
// Maps between a name of a scope to a short description of it (as the value
// of the property).
map<string, string> scope = 1;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,809 +0,0 @@
{
"swagger": "2.0",
"info": {
"title": "workflow.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/apis/v1beta1/{namespace}/workflow_executions": {
"post": {
"summary": "Creates a Workflow",
"operationId": "CreateWorkflowExecution",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowExecution"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/apiWorkflowExecution"
}
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/{name}": {
"get": {
"operationId": "GetWorkflowExecution",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowExecution"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/{name}/pods/{podName}/containers/{containerName}/logs": {
"get": {
"operationId": "GetWorkflowExecutionLogs",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/apiLogEntry"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "podName",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "containerName",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/{name}/pods/{podName}/metrics": {
"get": {
"operationId": "GetWorkflowExecutionMetrics",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiGetWorkflowExecutionMetricsResponse"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "podName",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/{name}/resubmit": {
"put": {
"operationId": "ResubmitWorkflowExecution",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowExecution"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/{name}/terminate": {
"put": {
"operationId": "TerminateWorkflowExecution",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"properties": {}
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_executions/{name}/watch": {
"get": {
"operationId": "WatchWorkflowExecution",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/apiWorkflowExecution"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_templates": {
"get": {
"operationId": "ListWorkflowTemplates",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiListWorkflowTemplatesResponse"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
},
"post": {
"operationId": "CreateWorkflowTemplate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_templates/{uid}": {
"get": {
"operationId": "GetWorkflowTemplate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "uid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "version",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_templates/{uid}/archive": {
"put": {
"operationId": "ArchiveWorkflowTemplate",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiArchiveWorkflowTemplateResponse"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "uid",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_templates/{uid}/versions": {
"get": {
"operationId": "ListWorkflowTemplateVersions",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiListWorkflowTemplateVersionsResponse"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "uid",
"in": "path",
"required": true,
"type": "string"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_templates/{uid}/versions/{version}": {
"get": {
"operationId": "GetWorkflowTemplate2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "uid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "version",
"in": "path",
"required": true,
"type": "integer",
"format": "int32"
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions": {
"post": {
"operationId": "CreateWorkflowTemplateVersion",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "workflowTemplate.uid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions/{workflowTemplate.version}": {
"put": {
"operationId": "UpdateWorkflowTemplateVersion",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "workflowTemplate.uid",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "workflowTemplate.version",
"in": "path",
"required": true,
"type": "integer",
"format": "int32"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
],
"tags": [
"WorkflowService"
]
}
},
"/apis/v1beta1/{namespace}/workflows": {
"get": {
"operationId": "ListWorkflowExecutions",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/apiListWorkflowExecutionsResponse"
}
}
},
"parameters": [
{
"name": "namespace",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "workflowTemplateUid",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "workflowTemplateVersion",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pageSize",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "page",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"WorkflowService"
]
}
}
},
"definitions": {
"apiArchiveWorkflowTemplateResponse": {
"type": "object",
"properties": {
"workflowTemplate": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
},
"apiGetWorkflowExecutionMetricsResponse": {
"type": "object",
"properties": {
"metrics": {
"type": "array",
"items": {
"$ref": "#/definitions/apiMetric"
}
}
}
},
"apiListWorkflowExecutionsResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int32"
},
"workflowExecutions": {
"type": "array",
"items": {
"$ref": "#/definitions/apiWorkflowExecution"
}
},
"page": {
"type": "integer",
"format": "int32"
},
"pages": {
"type": "integer",
"format": "int32"
},
"totalCount": {
"type": "integer",
"format": "int32"
}
}
},
"apiListWorkflowTemplateVersionsResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int32"
},
"workflowTemplates": {
"type": "array",
"items": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
}
},
"apiListWorkflowTemplatesResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer",
"format": "int32"
},
"workflowTemplates": {
"type": "array",
"items": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
}
},
"apiLogEntry": {
"type": "object",
"properties": {
"timestamp": {
"type": "string"
},
"content": {
"type": "string"
}
}
},
"apiMetric": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "number",
"format": "double"
},
"format": {
"type": "string"
}
}
},
"apiWorkflowExecution": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"uid": {
"type": "string"
},
"name": {
"type": "string"
},
"phase": {
"type": "string"
},
"startedAt": {
"type": "string"
},
"finishedAt": {
"type": "string"
},
"manifest": {
"type": "string"
},
"parameters": {
"type": "array",
"items": {
"$ref": "#/definitions/apiWorkflowExecutionParameter"
}
},
"workflowTemplate": {
"$ref": "#/definitions/apiWorkflowTemplate"
}
}
},
"apiWorkflowExecutionParameter": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"apiWorkflowTemplate": {
"type": "object",
"properties": {
"createdAt": {
"type": "string"
},
"uid": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"type": "integer",
"format": "int32"
},
"manifest": {
"type": "string"
},
"isLatest": {
"type": "boolean",
"format": "boolean"
},
"isArchived": {
"type": "boolean",
"format": "boolean"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"runtimeStreamError": {
"type": "object",
"properties": {
"grpc_code": {
"type": "integer",
"format": "int32"
},
"http_code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"http_status": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
},
"x-stream-definitions": {
"apiLogEntry": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/apiLogEntry"
},
"error": {
"$ref": "#/definitions/runtimeStreamError"
}
},
"title": "Stream result of apiLogEntry"
},
"apiWorkflowExecution": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/apiWorkflowExecution"
},
"error": {
"$ref": "#/definitions/runtimeStreamError"
}
},
"title": "Stream result of apiWorkflowExecution"
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,688 +0,0 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: workspace.proto
/*
Package api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package api
import (
"context"
"io"
"net/http"
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/grpc-ecosystem/grpc-gateway/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/status"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = descriptor.ForMessage
func request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateWorkspaceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Workspace); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := client.CreateWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq CreateWorkspaceRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Workspace); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
msg, err := server.CreateWorkspace(ctx, &protoReq)
return msg, metadata, err
}
var (
filter_WorkspaceService_ListWorkspaces_0 = &utilities.DoubleArray{Encoding: map[string]int{"namespace": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}}
)
func request_WorkspaceService_ListWorkspaces_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspaceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
if err := req.ParseForm(); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_WorkspaceService_ListWorkspaces_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.ListWorkspaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_ListWorkspaces_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListWorkspaceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
if err := runtime.PopulateQueryParameters(&protoReq, req.URL.Query(), filter_WorkspaceService_ListWorkspaces_0); err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.ListWorkspaces(ctx, &protoReq)
return msg, metadata, err
}
func request_WorkspaceService_UpdateWorkspaceStatus_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateWorkspaceStatusRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.UpdateWorkspaceStatus(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_UpdateWorkspaceStatus_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateWorkspaceStatusRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Status); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.UpdateWorkspaceStatus(ctx, &protoReq)
return msg, metadata, err
}
func request_WorkspaceService_PauseWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PauseWorkspaceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.PauseWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_PauseWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq PauseWorkspaceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.PauseWorkspace(ctx, &protoReq)
return msg, metadata, err
}
func request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq DeleteWorkspaceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := client.DeleteWorkspace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq DeleteWorkspaceRequest
var metadata runtime.ServerMetadata
var (
val string
ok bool
err error
_ = err
)
val, ok = pathParams["namespace"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace")
}
protoReq.Namespace, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace", err)
}
val, ok = pathParams["uid"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "uid")
}
protoReq.Uid, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "uid", err)
}
msg, err := server.DeleteWorkspace(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWorkspaceServiceHandlerServer registers the http handlers for service WorkspaceService to "mux".
// UnaryRPC :call WorkspaceServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceServiceServer) error {
mux.Handle("POST", pattern_WorkspaceService_CreateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_CreateWorkspace_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_CreateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_ListWorkspaces_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_ListWorkspaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspaceStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_UpdateWorkspaceStatus_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_UpdateWorkspaceStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_WorkspaceService_PauseWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_PauseWorkspace_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_PauseWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("DELETE", pattern_WorkspaceService_DeleteWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceService_DeleteWorkspace_0(rctx, inboundMarshaler, server, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_DeleteWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterWorkspaceServiceHandlerFromEndpoint is same as RegisterWorkspaceServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterWorkspaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.Dial(endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterWorkspaceServiceHandler(ctx, mux, conn)
}
// RegisterWorkspaceServiceHandler registers the http handlers for service WorkspaceService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterWorkspaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterWorkspaceServiceHandlerClient(ctx, mux, NewWorkspaceServiceClient(conn))
}
// RegisterWorkspaceServiceHandlerClient registers the http handlers for service WorkspaceService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkspaceServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkspaceServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "WorkspaceServiceClient" to call the correct interceptors.
func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceServiceClient) error {
mux.Handle("POST", pattern_WorkspaceService_CreateWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_CreateWorkspace_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_CreateWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("GET", pattern_WorkspaceService_ListWorkspaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_ListWorkspaces_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_ListWorkspaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_WorkspaceService_UpdateWorkspaceStatus_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_UpdateWorkspaceStatus_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_UpdateWorkspaceStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("PUT", pattern_WorkspaceService_PauseWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_PauseWorkspace_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_PauseWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("DELETE", pattern_WorkspaceService_DeleteWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceService_DeleteWorkspace_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceService_DeleteWorkspace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_WorkspaceService_CreateWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceService_ListWorkspaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workspaces"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceService_UpdateWorkspaceStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "status"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceService_PauseWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid", "pause"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_WorkspaceService_DeleteWorkspace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"apis", "v1beta1", "namespace", "workspaces", "uid"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
forward_WorkspaceService_CreateWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_ListWorkspaces_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_UpdateWorkspaceStatus_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_PauseWorkspace_0 = runtime.ForwardResponseMessage
forward_WorkspaceService_DeleteWorkspace_0 = runtime.ForwardResponseMessage
)

View File

@@ -1,96 +0,0 @@
syntax = "proto3";
package api;
import "google/api/annotations.proto";
import "google/protobuf/empty.proto";
import "workspace_template.proto";
import "common.proto";
import "label.proto";
service WorkspaceService {
rpc CreateWorkspace (CreateWorkspaceRequest) returns (Workspace) {
option (google.api.http) = {
post: "/apis/v1beta1/{namespace}/workspaces"
body: "workspace"
};
}
rpc ListWorkspaces (ListWorkspaceRequest) returns (ListWorkspaceResponse) {
option (google.api.http) = {
get: "/apis/v1beta1/{namespace}/workspaces"
};
}
rpc UpdateWorkspaceStatus (UpdateWorkspaceStatusRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/status"
body: "status"
};
}
rpc PauseWorkspace (PauseWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/pause"
};
}
rpc DeleteWorkspace (DeleteWorkspaceRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
delete: "/apis/v1beta1/{namespace}/workspaces/{uid}"
};
}
}
message Workspace {
string uid = 1;
string name = 2;
int64 version = 3;
string createdAt = 4;
repeated Parameter parameters = 5;
WorkspaceTemplate workspaceTemplate = 6;
WorkspaceStatus status = 7;
repeated KeyValue labels = 8;
}
message WorkspaceStatus {
string phase = 1;
string startedAt = 2;
string pausedAt = 3;
string terminatedAt = 4;
}
message CreateWorkspaceRequest {
string namespace = 1;
Workspace workspace = 2;
}
message UpdateWorkspaceStatusRequest {
string namespace = 1;
string uid = 2;
WorkspaceStatus status = 3;
}
message ListWorkspaceRequest {
string namespace = 1;
int32 pageSize = 2;
int32 page = 3;
}
message ListWorkspaceResponse {
int32 count = 1;
repeated Workspace workspaces = 2;
int32 page = 3;
int32 pages = 4;
int32 totalCount = 5;
}
message PauseWorkspaceRequest {
string namespace = 1;
string uid = 2;
}
message DeleteWorkspaceRequest {
string namespace = 1;
string uid = 2;
}

17
cmd/README.md Normal file
View File

@@ -0,0 +1,17 @@
# Helper scripts
## gen-release-md.go
Generates markdown for releases.
Usage:
```bash
go run cmd/gen-release-md/gen-release-md.go -v=0.10.0 -u=[github-username] > /tmp/release.md
```
## goose.go
Supports both Go and SQL migrations.
```bash
go run cmd/goose/goose up # run up migrations
go run cmd/goose/goose down # run down migrations
```

View File

@@ -0,0 +1,255 @@
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"net/http"
"sort"
"strings"
)
type user struct {
Login string `json:"login"`
URL string `json:"html_url"`
AvatarURL string `json:"avatar_url"`
ContributionsCount int
}
type label struct {
Name string `json:"name"`
}
type pullRequest struct {
URL string `json:"url"`
}
type issue struct {
Number int `json:"number"`
URL string `json:"html_url"`
Title string `json:"title"`
User user `json:"user"`
PullRequest *pullRequest `json:"pull_request"`
Labels []label `json:"labels"`
}
type milestone struct {
Number int `json:"number"`
Title string `json:"title"`
}
const (
apiPrefix = "https://api.github.com/repos/"
)
var releaseTemplate = `# Documentation
See https://docs.onepanel.ai
# CLI Installation
## Linux
` + "```" + `
# Download the binary
curl -sLO https://github.com/onepanelio/onepanel/releases/download/v%s/opctl-linux-amd64
# Make binary executable
chmod +x opctl-linux-amd64
# Move binary to path
mv ./opctl-linux-amd64 /usr/local/bin/opctl
# Test installation
opctl version
` + "```" + `
## macOS
` + "```" + `
# Download the binary
curl -sLO https://github.com/onepanelio/onepanel/releases/download/v%s/opctl-macos-amd64
# Make binary executable
chmod +x opctl-macos-amd64
# Move binary to path
mv ./opctl-macos-amd64 /usr/local/bin/opctl
# Test installation
opctl version
` + "```" + `
## Windows
Download the [attached executable](https://github.com/onepanelio/onepanel/releases/download/v%s/opctl-windows-amd64.exe), rename it to "opctl" and move it to a folder that is in your PATH environment variable.
`
var repositories = []string{
"onepanelio/core",
"onepanelio/core-ui",
"onepanelio/cli",
"onepanelio/manifests",
"onepanelio/core-docs",
}
func getPrefixSection(prefix string) (section string) {
switch prefix {
case "feat":
fallthrough
case "fix":
fallthrough
case "docs":
section = prefix
default:
section = "other"
}
return
}
// Parse issues, pulling only PRs and categorize them based on labels
// Print everything as MD that can be copied into release notes
func printMarkDown(issues []*issue, version *string) {
contributorsMap := make(map[string]user, 0)
sections := make(map[string]string, 0)
for _, iss := range issues {
if iss.PullRequest == nil {
continue
}
parts := strings.Split(iss.Title, ":")
if len(parts) > 0 {
if user, ok := contributorsMap[iss.User.Login]; ok {
user.ContributionsCount++
contributorsMap[iss.User.Login] = user
} else {
iss.User.ContributionsCount = 1
contributorsMap[iss.User.Login] = iss.User
}
sections[getPrefixSection(parts[0])] += fmt.Sprintf("- %s ([#%d](%s))\n", iss.Title, iss.Number, iss.URL)
}
}
releaseTemplate := fmt.Sprintf(releaseTemplate, *version, *version, *version)
fmt.Println(releaseTemplate)
fmt.Println("# Changelog")
if sections["feat"] != "" {
fmt.Println("## Features")
fmt.Println(sections["feat"])
}
if sections["fix"] != "" {
fmt.Println("## Fixes")
fmt.Println(sections["fix"])
}
if sections["docs"] != "" {
fmt.Println("## Docs")
fmt.Println(sections["docs"])
}
if sections["other"] != "" {
fmt.Println("## Other")
fmt.Println(sections["other"])
}
fmt.Println("# Contributors")
contributors := make([]user, 0)
for _, contributor := range contributorsMap {
// Sorry, no bots.
if contributor.Login == "dependabot[bot]" {
continue
}
contributors = append(contributors, contributor)
}
sort.Slice(contributors, func(i, j int) bool { return contributors[i].ContributionsCount > contributors[j].ContributionsCount })
for _, user := range contributors {
fmt.Println(fmt.Sprintf("- <a href=\"%s\"><img src=\"%s\" width=\"12\"/> <strong>%s</strong></a> %s", user.URL, user.AvatarURL, user.Login, user.Login))
}
}
func httpGet(url string, username, token *string) (*http.Response, error) {
client := &http.Client{}
req, err := http.NewRequest(http.MethodGet, url, nil)
if username != nil {
req.SetBasicAuth(*username, *token)
}
res, err := client.Do(req)
if err != nil {
return nil, err
}
return res, nil
}
// Get milestone by title
func getMilestone(repository string, version, username, token *string) (*milestone, error) {
url := fmt.Sprintf("%s%s/milestones", apiPrefix, repository)
res, err := httpGet(url, username, token)
if err != nil {
return nil, err
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
return nil, errors.New("API rate limit exceeded")
}
milestones := make([]*milestone, 0)
if err = json.NewDecoder(res.Body).Decode(&milestones); err != nil {
return nil, err
}
for _, milestone := range milestones {
if milestone.Title == "v"+*version {
return milestone, nil
}
}
return nil, fmt.Errorf("milestone 'v%v' not found for '%v'", *version, repository)
}
// Get issues from repository
func getIssues(repository string, milestone *milestone, username, token *string) ([]*issue, error) {
url := fmt.Sprintf("%s%s/issues?state=closed&direction=asc&milestone=%d", apiPrefix, repository, milestone.Number)
res, err := httpGet(url, username, token)
if err != nil {
return nil, err
}
defer res.Body.Close()
if res.StatusCode != http.StatusOK {
return nil, errors.New("API rate limit exceeded")
}
issues := make([]*issue, 0)
if err = json.NewDecoder(res.Body).Decode(&issues); err != nil {
return nil, err
}
return issues, nil
}
func main() {
version := flag.String("v", "1.0.0", "Version of release, example: -v=1.0.0")
username := flag.String("u", "", "GitHub username for request, example: -u=octocat")
token := flag.String("t", "", "GitHub token for request, example: -t=<token>")
flag.Parse()
issues := make([]*issue, 0)
for _, repository := range repositories {
mil, err := getMilestone(repository, version, username, token)
if err != nil {
fmt.Printf(err.Error())
return
}
iss, err := getIssues(repository, mil, username, token)
if err != nil {
return
}
issues = append(issues, iss...)
}
printMarkDown(issues, version)
}

62
cmd/goose/goose.go Normal file
View File

@@ -0,0 +1,62 @@
// This is custom goose binary to support .go migration files in ./db dir
package main
import (
"flag"
"github.com/jmoiron/sqlx"
migrations "github.com/onepanelio/core/db/go"
v1 "github.com/onepanelio/core/pkg"
"log"
"os"
"path/filepath"
"github.com/pressly/goose"
)
var (
flags = flag.NewFlagSet("goose", flag.ExitOnError)
dir = flags.String("dir", ".", "directory with migration files")
)
func main() {
flags.Parse(os.Args[1:])
args := flags.Args()
if len(args) < 1 {
flags.Usage()
return
}
kubeConfig := v1.NewConfig()
client, err := v1.NewClient(kubeConfig, nil, nil)
if err != nil {
log.Fatalf("Failed to connect to Kubernetes cluster: %v", err)
}
config, err := client.GetSystemConfig()
if err != nil {
log.Fatalf("Failed to get system config: %v", err)
}
dbDriverName, dbDataSourceName := config.DatabaseConnection()
db := sqlx.MustConnect(dbDriverName, dbDataSourceName)
defer db.Close()
command := args[0]
arguments := []string{}
if len(args) > 2 {
arguments = append(arguments, args[2:]...)
}
goose.SetTableName("goose_db_version")
if err := goose.Run(command, db.DB, filepath.Join(*dir, "sql"), arguments...); err != nil {
log.Fatalf("Failed to run database sql migrations: %v %v", command, err)
}
goose.SetTableName("goose_db_go_version")
migrations.Initialize()
if err := goose.Run(command, db.DB, filepath.Join(*dir, "go"), arguments...); err != nil {
log.Fatalf("Failed to run database go migrations: %v %v", command, err)
}
}

View File

@@ -1,7 +0,0 @@
-- +goose Up
ALTER TABLE workflow_templates DROP CONSTRAINT workflow_templates_name_namespace_key;
CREATE UNIQUE INDEX workflow_templates_name_namespace_key ON workflow_templates (name, namespace) WHERE is_archived = false;
-- +goose Down
DROP INDEX workflow_templates_name_namespace_key;
ALTER TABLE workflow_templates ADD CONSTRAINT workflow_templates_name_namespace_key UNIQUE (name, namespace);

Some files were not shown because too many files have changed in this diff Show More