mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-04 13:22:41 +08:00
Compare commits
247 Commits
v0.12.0-rc
...
v0.13.1-rc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6c5b6c877e | ||
![]() |
67e684a715 | ||
![]() |
20c4950b69 | ||
![]() |
5e5c3cca67 | ||
![]() |
575a33c272 | ||
![]() |
8e9b95aa12 | ||
![]() |
38f1aafaec | ||
![]() |
30ebda4918 | ||
![]() |
ce972f2988 | ||
![]() |
ede4c67c8f | ||
![]() |
68ddec78c8 | ||
![]() |
c42997a643 | ||
![]() |
5bd2feaa86 | ||
![]() |
de4302d226 | ||
![]() |
7150f24631 | ||
![]() |
0e1e48dfc8 | ||
![]() |
dd0f1f7705 | ||
![]() |
03f8f47664 | ||
![]() |
c85496d216 | ||
![]() |
5f6415548d | ||
![]() |
c641c17a8c | ||
![]() |
83a2543b13 | ||
![]() |
e8dae0f2e9 | ||
![]() |
b85bf4d688 | ||
![]() |
7fe0ab2654 | ||
![]() |
dfa6eb2fe6 | ||
![]() |
cc2c51ace5 | ||
![]() |
897462ede7 | ||
![]() |
4e3c24fd89 | ||
![]() |
276e105f20 | ||
![]() |
656026ac84 | ||
![]() |
95bea11e43 | ||
![]() |
c6f65510d8 | ||
![]() |
d6e279dde5 | ||
![]() |
e99b0e943d | ||
![]() |
22a7c31f1d | ||
![]() |
b6c0f24170 | ||
![]() |
9c04ee066d | ||
![]() |
29c3e808e1 | ||
![]() |
3ded40a477 | ||
![]() |
559d52b033 | ||
![]() |
0ea527ec0a | ||
![]() |
1a67e07d20 | ||
![]() |
49b9bc4f93 | ||
![]() |
4def4aa529 | ||
![]() |
5d114e1d27 | ||
![]() |
1ed3b3e740 | ||
![]() |
571de0b40e | ||
![]() |
463a8eea60 | ||
![]() |
5105ad373a | ||
![]() |
afa675dc28 | ||
![]() |
335301396e | ||
![]() |
995b1171e6 | ||
![]() |
d497058f20 | ||
![]() |
63bcd60d84 | ||
![]() |
ecf0a82a62 | ||
![]() |
f31c998349 | ||
![]() |
b6e5626a19 | ||
![]() |
77ca0939e4 | ||
![]() |
83a4238153 | ||
![]() |
77716ba56b | ||
![]() |
541747d232 | ||
![]() |
0956afdabe | ||
![]() |
8b4a70d958 | ||
![]() |
91b97d9243 | ||
![]() |
be62f41e20 | ||
![]() |
5fa34f7870 | ||
![]() |
65f49113a8 | ||
![]() |
8a874ec3f2 | ||
![]() |
ada6cfd413 | ||
![]() |
e7cef240c4 | ||
![]() |
1b7e96cab9 | ||
![]() |
dca6db842c | ||
![]() |
f7770618ca | ||
![]() |
bafd371e11 | ||
![]() |
274a1c2e84 | ||
![]() |
77812419d2 | ||
![]() |
6fa123b122 | ||
![]() |
b1d0ab1d59 | ||
![]() |
0d5cd95ccb | ||
![]() |
9d7172c920 | ||
![]() |
d04c17eee1 | ||
![]() |
78269c2b2c | ||
![]() |
3e17318512 | ||
![]() |
011fcc590e | ||
![]() |
c45231c106 | ||
![]() |
9ec45e4f34 | ||
![]() |
48e2050e97 | ||
![]() |
478b9a1c76 | ||
![]() |
d42f88e04c | ||
![]() |
6dd7c0ac70 | ||
![]() |
31076bc70d | ||
![]() |
7bbb57ca09 | ||
![]() |
7b404ff0b6 | ||
![]() |
aaf20b4ab6 | ||
![]() |
3e87376feb | ||
![]() |
7bc1056bc6 | ||
![]() |
880e8ba082 | ||
![]() |
ec634b66ca | ||
![]() |
15fc40a3e9 | ||
![]() |
96747f1dc0 | ||
![]() |
b7395a1ffa | ||
![]() |
a5f34b4f3b | ||
![]() |
a28b5101fd | ||
![]() |
688302c58e | ||
![]() |
49e19eb135 | ||
![]() |
0a676dff6f | ||
![]() |
d524c3cb66 | ||
![]() |
a9953683a9 | ||
![]() |
d4d4884e5b | ||
![]() |
d29290945c | ||
![]() |
3343f2f74b | ||
![]() |
837291a52a | ||
![]() |
122593fdbe | ||
![]() |
cd40edb16a | ||
![]() |
b27ca42e42 | ||
![]() |
3af4273541 | ||
![]() |
197fb06f4c | ||
![]() |
0b6a6e0af3 | ||
![]() |
ba3c2e22a9 | ||
![]() |
5955876c49 | ||
![]() |
767643a51a | ||
![]() |
5100efdd2d | ||
![]() |
a5e358ea61 | ||
![]() |
a3ef3d410a | ||
![]() |
c270283c42 | ||
![]() |
2093b565eb | ||
![]() |
0b4b5c8050 | ||
![]() |
1781e2774d | ||
![]() |
d87e6e49db | ||
![]() |
a1c58477bd | ||
![]() |
f90b45437a | ||
![]() |
85fb89862b | ||
![]() |
c30f48811d | ||
![]() |
0170252659 | ||
![]() |
498eed6aca | ||
![]() |
e01842c922 | ||
![]() |
8f12351761 | ||
![]() |
a22bdcc6f5 | ||
![]() |
766815da1f | ||
![]() |
a84d74d256 | ||
![]() |
6e6b70aeb7 | ||
![]() |
a78138c562 | ||
![]() |
6167d5ef65 | ||
![]() |
ce52f9914e | ||
![]() |
ed54cb9a3f | ||
![]() |
fc7ef5ffac | ||
![]() |
1c16a5e743 | ||
![]() |
9b25fd4190 | ||
![]() |
076422e8ac | ||
![]() |
5464dc71ac | ||
![]() |
3a0af4c727 | ||
![]() |
f4879a4228 | ||
![]() |
4135b86928 | ||
![]() |
ac51146dbc | ||
![]() |
575dbc1507 | ||
![]() |
8810b2c226 | ||
![]() |
95cc0c3622 | ||
![]() |
48a68083dc | ||
![]() |
029469e031 | ||
![]() |
c2d665ac8b | ||
![]() |
0fff409d0f | ||
![]() |
abf301093e | ||
![]() |
91b79a1d33 | ||
![]() |
c92781b5c8 | ||
![]() |
858c299604 | ||
![]() |
94a91fc543 | ||
![]() |
18a7c3fa99 | ||
![]() |
06fe267366 | ||
![]() |
35e4d1fc5b | ||
![]() |
b54e464c4a | ||
![]() |
735baac10d | ||
![]() |
edd1d474b1 | ||
![]() |
150da5654b | ||
![]() |
ee67c8713b | ||
![]() |
4a16b4e031 | ||
![]() |
0e3626b25a | ||
![]() |
597a03ffc2 | ||
![]() |
88595d6b4c | ||
![]() |
f1bbd0e884 | ||
![]() |
4ee679cf9f | ||
![]() |
26b6e045de | ||
![]() |
4a3a754585 | ||
![]() |
4543c84170 | ||
![]() |
b2a70c46d3 | ||
![]() |
3ede228aa9 | ||
![]() |
4a67aa103f | ||
![]() |
4129466236 | ||
![]() |
79b3ed6a49 | ||
![]() |
853c50dea2 | ||
![]() |
f23aa928d8 | ||
![]() |
a1872b8554 | ||
![]() |
99c42034b7 | ||
![]() |
5e5f6bd51b | ||
![]() |
a33c18c479 | ||
![]() |
e882d4270f | ||
![]() |
86fc90cd6b | ||
![]() |
4a93177b5c | ||
![]() |
7239e6620b | ||
![]() |
cbecaf6fa1 | ||
![]() |
de7f060c81 | ||
![]() |
c723a3270f | ||
![]() |
24bb7cb0a5 | ||
![]() |
a51d4b662e | ||
![]() |
6e72b550b1 | ||
![]() |
1f95b87699 | ||
![]() |
8258c5f19b | ||
![]() |
e61341c50a | ||
![]() |
8c0a763404 | ||
![]() |
76bc226a2e | ||
![]() |
e1dd4b8ed1 | ||
![]() |
1e3b9ca278 | ||
![]() |
cde5b54830 | ||
![]() |
d2adb109e1 | ||
![]() |
6eac7f2c74 | ||
![]() |
9e4eb59cec | ||
![]() |
0ccd871e54 | ||
![]() |
4bb205257a | ||
![]() |
bbbf1c0d6a | ||
![]() |
f9b23a7d2a | ||
![]() |
53c88c8390 | ||
![]() |
b7e4281eeb | ||
![]() |
f533ce01b3 | ||
![]() |
abba7b5476 | ||
![]() |
96861e19d3 | ||
![]() |
f797e93821 | ||
![]() |
e5586fcf76 | ||
![]() |
93d1b4a2c0 | ||
![]() |
62b3e64df5 | ||
![]() |
0ffa3aee32 | ||
![]() |
35982bf85a | ||
![]() |
ecadd189a2 | ||
![]() |
b68de30418 | ||
![]() |
dedc295441 | ||
![]() |
2108691f68 | ||
![]() |
0262a9ec90 | ||
![]() |
c6c8e80516 | ||
![]() |
9381dd0a85 | ||
![]() |
b6f7118a43 | ||
![]() |
f7b941f8a0 | ||
![]() |
e00a54c24e | ||
![]() |
8d29cd0c5c | ||
![]() |
dafaadd80a | ||
![]() |
4f036468b0 | ||
![]() |
8df966fcee | ||
![]() |
cfd9bc6f43 | ||
![]() |
3ee8497cac |
27
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
27
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal 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
4
.github/issue_label_bot.yaml
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
label-alias:
|
||||
bug: 'kind/bug'
|
||||
feature_request: 'kind/enhancement'
|
||||
question: 'kind/question'
|
1
.github/semantic.yml
vendored
Normal file
1
.github/semantic.yml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
titleOnly: true
|
24
.github/workflows/push_dev_branch.yaml
vendored
24
.github/workflows/push_dev_branch.yaml
vendored
@@ -2,9 +2,30 @@ name: Publish dev docker image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- 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
|
||||
@@ -12,5 +33,6 @@ jobs:
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: onepanel/core
|
||||
tags: "dev"
|
||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
@@ -1,32 +1,24 @@
|
||||
name: Build and publish to Docker Hub
|
||||
name: Publish docker image on tag push
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '*'
|
||||
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 }}"
|
||||
- uses: olegtarasov/get-tag@v2
|
||||
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 }}
|
||||
buildargs: VERSION
|
||||
tags: ${{ steps.version_bump.outputs.new_tag }}, latest
|
||||
tags: "${{ env.GIT_TAG_NAME }}"
|
||||
- name: Set Slack Message
|
||||
run: echo "::set-env name=SLACK_MESSAGE::Version $VERSION. Docker Tag onepanel/core:$VERSION"
|
||||
run: echo "::set-env name=SLACK_MESSAGE::Tag $GIT_TAG_NAME. Docker Tag onepanel/core:$GIT_TAG_NAME"
|
||||
- name: Notify Slack Channels
|
||||
uses: rtCamp/action-slack-notify@v2.0.0
|
||||
env:
|
||||
@@ -35,5 +27,3 @@ jobs:
|
||||
SLACK_TITLE: New Core Version
|
||||
SLACK_USERNAME: opBot
|
||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
|
||||
|
||||
|
26
.github/workflows/run_unit_tests.yaml
vendored
26
.github/workflows/run_unit_tests.yaml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Run Unit Tests
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- test/docker.database
|
||||
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
|
2
LICENSE
2
LICENSE
@@ -1,3 +1,5 @@
|
||||
Copyright 2020 Onepanel, Inc. All rights reserved.
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
106
README.md
106
README.md
@@ -1,13 +1,107 @@
|
||||
# Onepanel
|
||||
<img width="240px" src="img/logo.png">
|
||||
|
||||
Welcome to Onepanel! This is the main repository for the API. It is also where you can submit bugs and enhancement requests.
|
||||

|
||||

|
||||
[](https://github.com/onepanelio/core/releases)
|
||||
[](https://pypi.org/project/onepanel-sdk/)
|
||||
[](https://docs.onepanel.io)
|
||||
[](https://github.com/onepanelio/core/issues)
|
||||
[](https://onepanel-ce.slack.com/join/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg#/)
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
|
||||
## Getting started
|
||||
See our [Quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started.
|
||||
Production scale, Kubernetes-native vision AI platform, with fully integrated components for model building, automated labeling, data processing and model training pipelines.
|
||||
|
||||
## Why Onepanel?
|
||||
|
||||
- End-to-end workflow and infrastructure automation for production scale vision AI
|
||||
- Automatic resource management and on-demand scaling of CPU and GPU nodes
|
||||
- Easily scale your data processing and training pipelines to multiple nodes
|
||||
- Collaborate on all your deep learning tools and workflows through a unified web interface and SDKs
|
||||
- Scalability, flexibility and resiliency of Kubernetes without the deployment and configuration complexities
|
||||
|
||||
## Features
|
||||
<table>
|
||||
<tr>
|
||||
<td width="50%" align="center">
|
||||
<h3>Image and video annotation with automatic annotation</h3>
|
||||
<img width="100%" src="img/auto-annotation.gif">
|
||||
<p>
|
||||
Annotate images and video with automatic annotation of bounding boxes and polygon masks, integrated with training pipelines to iteratively improve models for pre-annotation and inference
|
||||
</p>
|
||||
</td>
|
||||
<td width="50%" align="center">
|
||||
<h3>JupyterLab with TensorFlow, PyTorch and GPU support</h3>
|
||||
<img width="100%" src="img/jupyterlab.gif">
|
||||
<p>
|
||||
JupyterLab configured with extensions for debugging, Git/GitHub, notebook diffing and TensorBoard and support for Conda, OpenCV, Tensorflow and PyTorch with GPU and <a href="https://github.com/onepanelio/templates/tree/master/workspaces/jupyterlab">much more</a>
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="50%" align="center">
|
||||
<h3>Auto scaling, distributed and parallel data processing and training pipelines</h3>
|
||||
<img width="100%" src="img/pipelines.gif">
|
||||
<p>
|
||||
Build fully reproducible, distributed and parallel data processing and training pipelines with real-time logs and output snapshots
|
||||
</p>
|
||||
</td>
|
||||
<td width="50%" align="center">
|
||||
<h3>Version controlled pipelines and environments as code</h3>
|
||||
<img width="100%" src="img/tools.gif">
|
||||
<p>
|
||||
Bring your own IDEs, annotation tools and pipelines with a version controlled YAML and Docker based template engine
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
- Track and visualize model metrics and experiments with TensorBoard or bring your own experiment tracking tools.
|
||||
- Access and share tools like AirSim, Carla, Gazebo or OpenAI Gym through your browser with VNC enabled workspaces.
|
||||
- Extend Onepanel with powerful REST APIs and SDKs to further automate your pipelines and environments.
|
||||
- Workflows, environments and infrastructure are all defined as code and version controlled, making them reproducible and portable.
|
||||
- Powered by Kubernetes so you can deploy anywhere Kubernetes can run.
|
||||
|
||||
## Quick start
|
||||
See [quick start guide](https://docs.onepanel.ai/docs/getting-started/quickstart) to get started with the platform of your choice.
|
||||
|
||||
### Quick start videos
|
||||
[Getting started with Microsoft Azure](https://youtu.be/CQBIYfBk3Zk)\
|
||||
[Getting started with Amazon EKS](https://youtu.be/Ipdd8f6D6IM)\
|
||||
[Getting started with Google GKE](https://youtu.be/pZRO63SnQ8A)
|
||||
|
||||
## Community
|
||||
See [documentation](https://docs.onepanel.ai) to get started or for more detailed operational and user guides.
|
||||
|
||||
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).
|
||||
|
||||
For help, questions, release announcements and contribution discussions, join us on [Slack](https://join.slack.com/t/onepanel-ce/shared_invite/zt-eyjnwec0-nLaHhjif9Y~gA05KuX6AUg).
|
||||
|
||||
## Contributing
|
||||
|
||||
See our [Contribution guide](https://docs.onepanel.ai/docs/getting-started/contributing) to get started.
|
||||
Onepanel is modular and consists of the following repositories:
|
||||
|
||||
[Core API](https://github.com/onepanelio/core/) (this repository) - Code base for backend (Go)\
|
||||
[Core UI](https://github.com/onepanelio/core-ui/) - Code base for UI (Angular + TypeScript)\
|
||||
[CLI](https://github.com/onepanelio/cli/) - Code base for Go CLI for installation and management (Go)\
|
||||
[Manifests](https://github.com/onepanelio/core-ui/) - Kustomize manifests used by CLI for installation and management (YAML)\
|
||||
[Python SDK](https://github.com/onepanelio/python-sdk/) - Python SDK code and documentation\
|
||||
[Templates](https://github.com/onepanelio/templates) - Various Workspace, Workflow, Task and Sidecar Templates\
|
||||
[Documentation](https://github.com/onepanelio/core-docs/) - The repository for documentation site\
|
||||
[API Documentation](https://github.com/onepanelio/core-api-docs/) - API documentation if you choose to use the API directly
|
||||
|
||||
See `CONTRIBUTING.md` in each repository for development guidelines. Also, see [contribution guide](https://docs.onepanel.ai/docs/getting-started/contributing) for additional guidelines.
|
||||
|
||||
|
||||
## Acknowledgments
|
||||
Onepanel uses the excellent [Argo](https://github.com/argoproj/argo) project under the hood to orchestrate workflows.
|
||||
Onepanel seamlessly integrates the following excellent open source projects. We are grateful for the support these communities provide and do our best to contribute back as much as possible.
|
||||
|
||||
[Argo](https://github.com/argoproj/argo)\
|
||||
[CVAT](https://github.com/opencv/cvat)\
|
||||
[JupyterLab](https://github.com/jupyterlab/jupyterlab)
|
||||
|
||||
|
||||
## License
|
||||
Onepanel is licensed under [Apache 2.0](https://github.com/onepanelio/core/blob/master/LICENSE).
|
||||
|
||||
## Need a managed solution?
|
||||
Visit our [website](https://www.onepanel.io/) for more information about our managed offerings.
|
||||
|
@@ -3,7 +3,7 @@
|
||||
"info": {
|
||||
"title": "Onepanel",
|
||||
"description": "Onepanel API",
|
||||
"version": "0.12.0-rc.0",
|
||||
"version": "0.14.0",
|
||||
"contact": {
|
||||
"name": "Onepanel project",
|
||||
"url": "https://github.com/onepanelio/core"
|
||||
@@ -77,7 +77,7 @@
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/TokenWrapper"
|
||||
"$ref": "#/definitions/IsValidTokenRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@@ -863,6 +863,31 @@
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "labels",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "phase",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "includeSystem",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "boolean",
|
||||
"format": "boolean"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -906,6 +931,36 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/workflow_executions/statistics": {
|
||||
"get": {
|
||||
"operationId": "GetWorkflowExecutionStatisticsForNamespace",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetWorkflowExecutionStatisticsForNamespaceResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/grpc.gateway.runtime.Error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"WorkflowService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/workflow_executions/{uid}": {
|
||||
"get": {
|
||||
"operationId": "GetWorkflowExecution",
|
||||
@@ -1794,6 +1849,36 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/workspace/statistics": {
|
||||
"get": {
|
||||
"operationId": "GetWorkspaceStatisticsForNamespace",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GetWorkspaceStatisticsForNamespaceResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/grpc.gateway.runtime.Error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"WorkspaceService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/workspace_templates": {
|
||||
"get": {
|
||||
"operationId": "ListWorkspaceTemplates",
|
||||
@@ -1831,6 +1916,24 @@
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "labels",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "uid",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -2112,6 +2215,24 @@
|
||||
"required": false,
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
{
|
||||
"name": "order",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "labels",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "phase",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
@@ -2339,6 +2460,42 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/workspaces/{uid}/retry": {
|
||||
"put": {
|
||||
"operationId": "RetryLastWorkspaceAction",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"properties": {}
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/grpc.gateway.runtime.Error"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "namespace",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"name": "uid",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"WorkspaceService"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/apis/v1beta1/{namespace}/workspaces/{uid}/status": {
|
||||
"put": {
|
||||
"operationId": "UpdateWorkspaceStatus",
|
||||
@@ -2765,6 +2922,22 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"GetWorkflowExecutionStatisticsForNamespaceResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"stats": {
|
||||
"$ref": "#/definitions/WorkflowExecutionStatisticReport"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GetWorkspaceStatisticsForNamespaceResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"stats": {
|
||||
"$ref": "#/definitions/WorkspaceStatisticReport"
|
||||
}
|
||||
}
|
||||
},
|
||||
"IsAuthorized": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2794,11 +2967,28 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"IsValidTokenRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"IsValidTokenResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"domain": {
|
||||
"type": "string"
|
||||
},
|
||||
"token": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3221,14 +3411,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"TokenWrapper": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UpdateSecretKeyValueResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3442,6 +3624,70 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"WorkspaceStatisticReport": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"lastCreated": {
|
||||
"type": "string"
|
||||
},
|
||||
"launching": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"running": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"updating": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"pausing": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"paused": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"terminating": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"terminated": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"failedToPause": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"failedToResume": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"failedToTerminate": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"failedToLaunch": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"failedToUpdate": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"failed": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"WorkspaceStatus": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
186
api/auth.pb.go
186
api/auth.pb.go
@@ -204,65 +204,19 @@ func (x *IsAuthorizedResponse) GetAuthorized() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
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[3]
|
||||
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[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 TokenWrapper.ProtoReflect.Descriptor instead.
|
||||
func (*TokenWrapper) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
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"`
|
||||
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[4]
|
||||
mi := &file_auth_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -275,7 +229,7 @@ func (x *IsValidTokenRequest) String() string {
|
||||
func (*IsValidTokenRequest) ProtoMessage() {}
|
||||
|
||||
func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_proto_msgTypes[4]
|
||||
mi := &file_auth_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -288,14 +242,21 @@ func (x *IsValidTokenRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use IsValidTokenRequest.ProtoReflect.Descriptor instead.
|
||||
func (*IsValidTokenRequest) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{4}
|
||||
return file_auth_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *IsValidTokenRequest) GetToken() *TokenWrapper {
|
||||
func (x *IsValidTokenRequest) GetUsername() string {
|
||||
if x != nil {
|
||||
return x.Username
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *IsValidTokenRequest) GetToken() string {
|
||||
if x != nil {
|
||||
return x.Token
|
||||
}
|
||||
return nil
|
||||
return ""
|
||||
}
|
||||
|
||||
type IsValidTokenResponse struct {
|
||||
@@ -303,13 +264,15 @@ type IsValidTokenResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
|
||||
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[5]
|
||||
mi := &file_auth_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -322,7 +285,7 @@ func (x *IsValidTokenResponse) String() string {
|
||||
func (*IsValidTokenResponse) ProtoMessage() {}
|
||||
|
||||
func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_auth_proto_msgTypes[5]
|
||||
mi := &file_auth_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -335,7 +298,7 @@ func (x *IsValidTokenResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use IsValidTokenResponse.ProtoReflect.Descriptor instead.
|
||||
func (*IsValidTokenResponse) Descriptor() ([]byte, []int) {
|
||||
return file_auth_proto_rawDescGZIP(), []int{5}
|
||||
return file_auth_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *IsValidTokenResponse) GetDomain() string {
|
||||
@@ -345,6 +308,20 @@ func (x *IsValidTokenResponse) GetDomain() string {
|
||||
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 ""
|
||||
}
|
||||
|
||||
var File_auth_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_auth_proto_rawDesc = []byte{
|
||||
@@ -370,32 +347,33 @@ var file_auth_proto_rawDesc = []byte{
|
||||
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, 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, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69,
|
||||
0x6e, 0x32, 0xea, 0x01, 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,
|
||||
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, 0x62, 0x06,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 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, 0x32, 0xe6, 0x01, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x68, 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, 0x23, 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, 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, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -410,27 +388,25 @@ func file_auth_proto_rawDescGZIP() []byte {
|
||||
return file_auth_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_auth_proto_goTypes = []interface{}{
|
||||
(*IsAuthorized)(nil), // 0: api.IsAuthorized
|
||||
(*IsAuthorizedRequest)(nil), // 1: api.IsAuthorizedRequest
|
||||
(*IsAuthorizedResponse)(nil), // 2: api.IsAuthorizedResponse
|
||||
(*TokenWrapper)(nil), // 3: api.TokenWrapper
|
||||
(*IsValidTokenRequest)(nil), // 4: api.IsValidTokenRequest
|
||||
(*IsValidTokenResponse)(nil), // 5: api.IsValidTokenResponse
|
||||
(*IsValidTokenRequest)(nil), // 3: api.IsValidTokenRequest
|
||||
(*IsValidTokenResponse)(nil), // 4: api.IsValidTokenResponse
|
||||
}
|
||||
var file_auth_proto_depIdxs = []int32{
|
||||
0, // 0: api.IsAuthorizedRequest.isAuthorized:type_name -> api.IsAuthorized
|
||||
3, // 1: api.IsValidTokenRequest.token:type_name -> api.TokenWrapper
|
||||
4, // 2: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest
|
||||
1, // 3: api.AuthService.IsAuthorized:input_type -> api.IsAuthorizedRequest
|
||||
5, // 4: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse
|
||||
2, // 5: api.AuthService.IsAuthorized:output_type -> api.IsAuthorizedResponse
|
||||
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
|
||||
3, // 1: api.AuthService.IsValidToken:input_type -> api.IsValidTokenRequest
|
||||
1, // 2: api.AuthService.IsAuthorized:input_type -> api.IsAuthorizedRequest
|
||||
4, // 3: api.AuthService.IsValidToken:output_type -> api.IsValidTokenResponse
|
||||
2, // 4: api.AuthService.IsAuthorized:output_type -> api.IsAuthorizedResponse
|
||||
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() }
|
||||
@@ -476,18 +452,6 @@ func file_auth_proto_init() {
|
||||
}
|
||||
}
|
||||
file_auth_proto_msgTypes[3].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[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*IsValidTokenRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -499,7 +463,7 @@ func file_auth_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_auth_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
file_auth_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*IsValidTokenResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
@@ -518,7 +482,7 @@ func file_auth_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_auth_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
@@ -39,7 +39,7 @@ func request_AuthService_IsValidToken_0(ctx context.Context, marshaler runtime.M
|
||||
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 {
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ func local_request_AuthService_IsValidToken_0(ctx context.Context, marshaler run
|
||||
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 {
|
||||
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
|
@@ -9,13 +9,13 @@ service AuthService {
|
||||
rpc IsValidToken(IsValidTokenRequest) returns (IsValidTokenResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/apis/v1beta1/auth/token"
|
||||
body: "token"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc IsAuthorized(IsAuthorizedRequest) returns (IsAuthorizedResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/apis/v1beta1/auth",
|
||||
post: "/apis/v1beta1/auth"
|
||||
body: "isAuthorized"
|
||||
};
|
||||
}
|
||||
@@ -37,14 +37,13 @@ message IsAuthorizedResponse {
|
||||
bool authorized = 1;
|
||||
}
|
||||
|
||||
message TokenWrapper {
|
||||
string token = 1;
|
||||
}
|
||||
|
||||
message IsValidTokenRequest {
|
||||
TokenWrapper token = 1;
|
||||
string username = 1;
|
||||
string token = 2;
|
||||
}
|
||||
|
||||
message IsValidTokenResponse {
|
||||
string domain = 1;
|
||||
string token = 2;
|
||||
string username = 3;
|
||||
}
|
@@ -686,6 +686,10 @@ type ListWorkflowExecutionsRequest struct {
|
||||
WorkflowTemplateVersion string `protobuf:"bytes,3,opt,name=workflowTemplateVersion,proto3" json:"workflowTemplateVersion,omitempty"`
|
||||
PageSize int32 `protobuf:"varint,4,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
|
||||
Page int32 `protobuf:"varint,5,opt,name=page,proto3" json:"page,omitempty"`
|
||||
Order string `protobuf:"bytes,6,opt,name=order,proto3" json:"order,omitempty"`
|
||||
Labels string `protobuf:"bytes,7,opt,name=labels,proto3" json:"labels,omitempty"`
|
||||
Phase string `protobuf:"bytes,8,opt,name=phase,proto3" json:"phase,omitempty"`
|
||||
IncludeSystem bool `protobuf:"varint,9,opt,name=includeSystem,proto3" json:"includeSystem,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListWorkflowExecutionsRequest) Reset() {
|
||||
@@ -755,6 +759,34 @@ func (x *ListWorkflowExecutionsRequest) GetPage() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListWorkflowExecutionsRequest) GetOrder() string {
|
||||
if x != nil {
|
||||
return x.Order
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListWorkflowExecutionsRequest) GetLabels() string {
|
||||
if x != nil {
|
||||
return x.Labels
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListWorkflowExecutionsRequest) GetPhase() string {
|
||||
if x != nil {
|
||||
return x.Phase
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListWorkflowExecutionsRequest) GetIncludeSystem() bool {
|
||||
if x != nil {
|
||||
return x.IncludeSystem
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type ListWorkflowExecutionsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -1614,6 +1646,100 @@ func (x *UpdateWorkflowExecutionStatusRequest) GetStatus() *WorkflowExecutionSta
|
||||
return nil
|
||||
}
|
||||
|
||||
type GetWorkflowExecutionStatisticsForNamespaceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) Reset() {
|
||||
*x = GetWorkflowExecutionStatisticsForNamespaceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_workflow_proto_msgTypes[25]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_workflow_proto_msgTypes[25]
|
||||
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 GetWorkflowExecutionStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetWorkflowExecutionStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_workflow_proto_rawDescGZIP(), []int{25}
|
||||
}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceRequest) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetWorkflowExecutionStatisticsForNamespaceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Stats *WorkflowExecutionStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) Reset() {
|
||||
*x = GetWorkflowExecutionStatisticsForNamespaceResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_workflow_proto_msgTypes[26]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_workflow_proto_msgTypes[26]
|
||||
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 GetWorkflowExecutionStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetWorkflowExecutionStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_workflow_proto_rawDescGZIP(), []int{26}
|
||||
}
|
||||
|
||||
func (x *GetWorkflowExecutionStatisticsForNamespaceResponse) GetStats() *WorkflowExecutionStatisticReport {
|
||||
if x != nil {
|
||||
return x.Stats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_workflow_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_workflow_proto_rawDesc = []byte{
|
||||
@@ -1700,7 +1826,7 @@ var file_workflow_proto_rawDesc = []byte{
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x72,
|
||||
0x69, 0x63, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x22,
|
||||
0xd9, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0xc3, 0x02, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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,
|
||||
@@ -1713,115 +1839,134 @@ var file_workflow_proto_rawDesc = []byte{
|
||||
0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x70,
|
||||
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70,
|
||||
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x22, 0xc8, 0x01, 0x0a, 0x1e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 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, 0x2d, 0x0a, 0x19, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
|
||||
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x11, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61,
|
||||
0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74,
|
||||
0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73,
|
||||
0x68, 0x65, 0x64, 0x41, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e,
|
||||
0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66,
|
||||
0x65, 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66,
|
||||
0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72,
|
||||
0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
|
||||
0x65, 0x72, 0x73, 0x12, 0x41, 0x0a, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x52, 0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
|
||||
0x18, 0x0a, 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, 0x3a, 0x0a,
|
||||
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,
|
||||
0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x41, 0x72, 0x74,
|
||||
0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74,
|
||||
0x61, 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, 0x56, 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, 0x10, 0x0a, 0x03, 0x75, 0x69,
|
||||
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
|
||||
0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01,
|
||||
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, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65,
|
||||
0x6e, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x12,
|
||||
0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65,
|
||||
0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61,
|
||||
0x73, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x12,
|
||||
0x24, 0x0a, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53,
|
||||
0x79, 0x73, 0x74, 0x65, 0x6d, 0x22, 0xc8, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x46,
|
||||
0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 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, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 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,
|
||||
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, 0x2d, 0x0a, 0x19, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x75, 0x72, 0x6c, 0x22, 0x9d, 0x03, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
|
||||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68,
|
||||
0x61, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41, 0x74,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x41,
|
||||
0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41, 0x74, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x41,
|
||||
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x6e, 0x69, 0x66, 0x65, 0x73, 0x74, 0x12, 0x2e, 0x0a,
|
||||
0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65,
|
||||
0x72, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x41, 0x0a,
|
||||
0x10, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x10,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x87, 0x01, 0x0a,
|
||||
0x24, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65,
|
||||
0x12, 0x25, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x0a, 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, 0x3a, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x22, 0x26, 0x0a, 0x10, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 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, 0x56, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x54, 0x0a, 0x11, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||
0x1f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 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, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x50, 0x61, 0x74, 0x68,
|
||||
0x22, 0x64, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x26,
|
||||
0x0a, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x03, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x24, 0x41, 0x64, 0x64, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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,
|
||||
0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
|
||||
0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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,
|
||||
0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
|
||||
0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70,
|
||||
0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61, 0x73,
|
||||
0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74,
|
||||
0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x22, 0x51, 0x0a, 0x31, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
|
||||
0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
|
||||
0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74,
|
||||
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x8d, 0x01, 0x0a, 0x2a, 0x43, 0x72, 0x6f, 0x6e, 0x53,
|
||||
0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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, 0x2f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
|
||||
0x69, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74,
|
||||
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x22, 0x2f, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x70, 0x68, 0x61, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 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, 0x10,
|
||||
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
|
||||
0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06,
|
||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0xa7, 0x12, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66,
|
||||
0x61, 0x63, 0x65, 0x22, 0x71, 0x0a, 0x32, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69,
|
||||
0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x73, 0x74, 0x61,
|
||||
0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52,
|
||||
0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0x89, 0x14, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x66,
|
||||
0x6c, 0x6f, 0x77, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x17, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65,
|
||||
@@ -1841,134 +1986,148 @@ var file_workflow_proto_rawDesc = []byte{
|
||||
0x33, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66,
|
||||
0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b,
|
||||
0x75, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12,
|
||||
0x33, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66,
|
||||
0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b,
|
||||
0x75, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
|
||||
0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f,
|
||||
0x12, 0x2d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f,
|
||||
0x75, 0x69, 0x64, 0x7d, 0x12, 0xdf, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x12, 0x36, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
|
||||
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
|
||||
0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, 0x12, 0x38, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74,
|
||||
0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||
0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
|
||||
0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x35, 0x12, 0x33, 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, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73,
|
||||
0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x12, 0x99, 0x01, 0x0a, 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66,
|
||||
0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b,
|
||||
0x12, 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, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
|
||||
0x99, 0x01, 0x0a, 0x16, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
|
||||
0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x57, 0x61, 0x74, 0x63, 0x68, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
|
||||
0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01,
|
||||
0x0a, 0x18, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x0d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22,
|
||||
0x6a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x64, 0x12, 0x62, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64,
|
||||
0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01,
|
||||
0x0a, 0x1b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x52, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x12, 0x4a, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f,
|
||||
0x64, 0x73, 0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74,
|
||||
0x72, 0x69, 0x63, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69,
|
||||
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69,
|
||||
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x1a, 0x3c, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72,
|
||||
0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d,
|
||||
0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72,
|
||||
0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78,
|
||||
0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x41, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3b, 0x12, 0x39,
|
||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d,
|
||||
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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75,
|
||||
0x69, 0x64, 0x7d, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30, 0x01, 0x12, 0xbd, 0x01, 0x0a, 0x18,
|
||||
0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47,
|
||||
0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x4c, 0x6f, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x6a, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x64, 0x12, 0x62, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62,
|
||||
0x69, 0x64, 0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01,
|
||||
0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74,
|
||||
0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x48, 0x12, 0x46, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73, 0x2f,
|
||||
0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69,
|
||||
0x6e, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x4e,
|
||||
0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6c, 0x6f, 0x67, 0x73, 0x30, 0x01, 0x12, 0xc4, 0x01, 0x0a, 0x1b,
|
||||
0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x12, 0x27, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
|
||||
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x12, 0x4a, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x6f, 0x64, 0x73,
|
||||
0x2f, 0x7b, 0x70, 0x6f, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69,
|
||||
0x63, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x19, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66,
|
||||
0x61, 0x63, 0x74, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01,
|
||||
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, 0x4b, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x45, 0x12, 0x43, 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, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70,
|
||||
0x61, 0x74, 0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x57,
|
||||
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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, 0x52, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x4c, 0x22, 0x3e, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69,
|
||||
0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
|
||||
0x73, 0x12, 0xcd, 0x01, 0x0a, 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x22,
|
||||
0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x1a, 0x3c, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73,
|
||||
0x75, 0x62, 0x6d, 0x69, 0x74, 0x12, 0xa3, 0x01, 0x0a, 0x1a, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x6e, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63,
|
||||
0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x45, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3f, 0x1a, 0x3d, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64,
|
||||
0x7d, 0x2f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x12, 0x8d, 0x01, 0x0a, 0x0b,
|
||||
0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x17, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66,
|
||||
0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x48, 0x12, 0x46, 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, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63,
|
||||
0x74, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0x87, 0x01, 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, 0x4b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x45,
|
||||
0x12, 0x43, 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, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f,
|
||||
0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x74,
|
||||
0x68, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xb7, 0x01, 0x0a, 0x1e, 0x41, 0x64, 0x64, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
|
||||
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41,
|
||||
0x64, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 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, 0x52, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x4c, 0x22, 0x3e, 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, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
|
||||
0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12,
|
||||
0xcd, 0x01, 0x0a, 0x23, 0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
|
||||
0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72,
|
||||
0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
|
||||
0x63, 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, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x49, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65,
|
||||
0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x63, 0x72,
|
||||
0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
|
||||
0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12,
|
||||
0xae, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
|
||||
0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
|
||||
0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64,
|
||||
0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x12, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x43, 0x72, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f,
|
||||
0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x63, 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, 0x5d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x57, 0x22, 0x49, 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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x65,
|
||||
0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f,
|
||||
0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x69,
|
||||
0x73, 0x74, 0x69, 0x63, 0x73, 0x3a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
|
||||
0x73, 0x12, 0xae, 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x1a, 0x3a,
|
||||
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, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
|
||||
0x6f, 0x77, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x75,
|
||||
0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -1983,86 +2142,92 @@ func file_workflow_proto_rawDescGZIP() []byte {
|
||||
return file_workflow_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
|
||||
var file_workflow_proto_msgTypes = make([]protoimpl.MessageInfo, 27)
|
||||
var file_workflow_proto_goTypes = []interface{}{
|
||||
(*CreateWorkflowExecutionBody)(nil), // 0: api.CreateWorkflowExecutionBody
|
||||
(*CreateWorkflowExecutionRequest)(nil), // 1: api.CreateWorkflowExecutionRequest
|
||||
(*CloneWorkflowExecutionRequest)(nil), // 2: api.CloneWorkflowExecutionRequest
|
||||
(*GetWorkflowExecutionRequest)(nil), // 3: api.GetWorkflowExecutionRequest
|
||||
(*GetArtifactRequest)(nil), // 4: api.GetArtifactRequest
|
||||
(*WatchWorkflowExecutionRequest)(nil), // 5: api.WatchWorkflowExecutionRequest
|
||||
(*ResubmitWorkflowExecutionRequest)(nil), // 6: api.ResubmitWorkflowExecutionRequest
|
||||
(*TerminateWorkflowExecutionRequest)(nil), // 7: api.TerminateWorkflowExecutionRequest
|
||||
(*GetWorkflowExecutionLogsRequest)(nil), // 8: api.GetWorkflowExecutionLogsRequest
|
||||
(*GetWorkflowExecutionMetricsRequest)(nil), // 9: api.GetWorkflowExecutionMetricsRequest
|
||||
(*GetWorkflowExecutionMetricsResponse)(nil), // 10: api.GetWorkflowExecutionMetricsResponse
|
||||
(*ListWorkflowExecutionsRequest)(nil), // 11: api.ListWorkflowExecutionsRequest
|
||||
(*ListWorkflowExecutionsResponse)(nil), // 12: api.ListWorkflowExecutionsResponse
|
||||
(*LogEntry)(nil), // 13: api.LogEntry
|
||||
(*WorkflowExecutionMetadata)(nil), // 14: api.WorkflowExecutionMetadata
|
||||
(*WorkflowExecution)(nil), // 15: api.WorkflowExecution
|
||||
(*ArtifactResponse)(nil), // 16: api.ArtifactResponse
|
||||
(*File)(nil), // 17: api.File
|
||||
(*ListFilesRequest)(nil), // 18: api.ListFilesRequest
|
||||
(*ListFilesResponse)(nil), // 19: api.ListFilesResponse
|
||||
(*Statistics)(nil), // 20: api.Statistics
|
||||
(*AddWorkflowExecutionStatisticRequest)(nil), // 21: api.AddWorkflowExecutionStatisticRequest
|
||||
(*CronStartWorkflowExecutionStatisticRequest)(nil), // 22: api.CronStartWorkflowExecutionStatisticRequest
|
||||
(*WorkflowExecutionStatus)(nil), // 23: api.WorkflowExecutionStatus
|
||||
(*UpdateWorkflowExecutionStatusRequest)(nil), // 24: api.UpdateWorkflowExecutionStatusRequest
|
||||
(*Parameter)(nil), // 25: api.Parameter
|
||||
(*KeyValue)(nil), // 26: api.KeyValue
|
||||
(*Metric)(nil), // 27: api.Metric
|
||||
(*WorkflowTemplate)(nil), // 28: api.WorkflowTemplate
|
||||
(*empty.Empty)(nil), // 29: google.protobuf.Empty
|
||||
(*CreateWorkflowExecutionBody)(nil), // 0: api.CreateWorkflowExecutionBody
|
||||
(*CreateWorkflowExecutionRequest)(nil), // 1: api.CreateWorkflowExecutionRequest
|
||||
(*CloneWorkflowExecutionRequest)(nil), // 2: api.CloneWorkflowExecutionRequest
|
||||
(*GetWorkflowExecutionRequest)(nil), // 3: api.GetWorkflowExecutionRequest
|
||||
(*GetArtifactRequest)(nil), // 4: api.GetArtifactRequest
|
||||
(*WatchWorkflowExecutionRequest)(nil), // 5: api.WatchWorkflowExecutionRequest
|
||||
(*ResubmitWorkflowExecutionRequest)(nil), // 6: api.ResubmitWorkflowExecutionRequest
|
||||
(*TerminateWorkflowExecutionRequest)(nil), // 7: api.TerminateWorkflowExecutionRequest
|
||||
(*GetWorkflowExecutionLogsRequest)(nil), // 8: api.GetWorkflowExecutionLogsRequest
|
||||
(*GetWorkflowExecutionMetricsRequest)(nil), // 9: api.GetWorkflowExecutionMetricsRequest
|
||||
(*GetWorkflowExecutionMetricsResponse)(nil), // 10: api.GetWorkflowExecutionMetricsResponse
|
||||
(*ListWorkflowExecutionsRequest)(nil), // 11: api.ListWorkflowExecutionsRequest
|
||||
(*ListWorkflowExecutionsResponse)(nil), // 12: api.ListWorkflowExecutionsResponse
|
||||
(*LogEntry)(nil), // 13: api.LogEntry
|
||||
(*WorkflowExecutionMetadata)(nil), // 14: api.WorkflowExecutionMetadata
|
||||
(*WorkflowExecution)(nil), // 15: api.WorkflowExecution
|
||||
(*ArtifactResponse)(nil), // 16: api.ArtifactResponse
|
||||
(*File)(nil), // 17: api.File
|
||||
(*ListFilesRequest)(nil), // 18: api.ListFilesRequest
|
||||
(*ListFilesResponse)(nil), // 19: api.ListFilesResponse
|
||||
(*Statistics)(nil), // 20: api.Statistics
|
||||
(*AddWorkflowExecutionStatisticRequest)(nil), // 21: api.AddWorkflowExecutionStatisticRequest
|
||||
(*CronStartWorkflowExecutionStatisticRequest)(nil), // 22: api.CronStartWorkflowExecutionStatisticRequest
|
||||
(*WorkflowExecutionStatus)(nil), // 23: api.WorkflowExecutionStatus
|
||||
(*UpdateWorkflowExecutionStatusRequest)(nil), // 24: api.UpdateWorkflowExecutionStatusRequest
|
||||
(*GetWorkflowExecutionStatisticsForNamespaceRequest)(nil), // 25: api.GetWorkflowExecutionStatisticsForNamespaceRequest
|
||||
(*GetWorkflowExecutionStatisticsForNamespaceResponse)(nil), // 26: api.GetWorkflowExecutionStatisticsForNamespaceResponse
|
||||
(*Parameter)(nil), // 27: api.Parameter
|
||||
(*KeyValue)(nil), // 28: api.KeyValue
|
||||
(*Metric)(nil), // 29: api.Metric
|
||||
(*WorkflowTemplate)(nil), // 30: api.WorkflowTemplate
|
||||
(*WorkflowExecutionStatisticReport)(nil), // 31: api.WorkflowExecutionStatisticReport
|
||||
(*empty.Empty)(nil), // 32: google.protobuf.Empty
|
||||
}
|
||||
var file_workflow_proto_depIdxs = []int32{
|
||||
25, // 0: api.CreateWorkflowExecutionBody.parameters:type_name -> api.Parameter
|
||||
26, // 1: api.CreateWorkflowExecutionBody.labels:type_name -> api.KeyValue
|
||||
27, // 0: api.CreateWorkflowExecutionBody.parameters:type_name -> api.Parameter
|
||||
28, // 1: api.CreateWorkflowExecutionBody.labels:type_name -> api.KeyValue
|
||||
0, // 2: api.CreateWorkflowExecutionRequest.body:type_name -> api.CreateWorkflowExecutionBody
|
||||
27, // 3: api.GetWorkflowExecutionMetricsResponse.metrics:type_name -> api.Metric
|
||||
29, // 3: api.GetWorkflowExecutionMetricsResponse.metrics:type_name -> api.Metric
|
||||
15, // 4: api.ListWorkflowExecutionsResponse.workflowExecutions:type_name -> api.WorkflowExecution
|
||||
25, // 5: api.WorkflowExecution.parameters:type_name -> api.Parameter
|
||||
28, // 6: api.WorkflowExecution.workflowTemplate:type_name -> api.WorkflowTemplate
|
||||
26, // 7: api.WorkflowExecution.labels:type_name -> api.KeyValue
|
||||
27, // 5: api.WorkflowExecution.parameters:type_name -> api.Parameter
|
||||
30, // 6: api.WorkflowExecution.workflowTemplate:type_name -> api.WorkflowTemplate
|
||||
28, // 7: api.WorkflowExecution.labels:type_name -> api.KeyValue
|
||||
14, // 8: api.WorkflowExecution.metadata:type_name -> api.WorkflowExecutionMetadata
|
||||
17, // 9: api.ListFilesResponse.files:type_name -> api.File
|
||||
20, // 10: api.AddWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics
|
||||
20, // 11: api.CronStartWorkflowExecutionStatisticRequest.statistics:type_name -> api.Statistics
|
||||
23, // 12: api.UpdateWorkflowExecutionStatusRequest.status:type_name -> api.WorkflowExecutionStatus
|
||||
1, // 13: api.WorkflowService.CreateWorkflowExecution:input_type -> api.CreateWorkflowExecutionRequest
|
||||
2, // 14: api.WorkflowService.CloneWorkflowExecution:input_type -> api.CloneWorkflowExecutionRequest
|
||||
3, // 15: api.WorkflowService.GetWorkflowExecution:input_type -> api.GetWorkflowExecutionRequest
|
||||
11, // 16: api.WorkflowService.ListWorkflowExecutions:input_type -> api.ListWorkflowExecutionsRequest
|
||||
5, // 17: api.WorkflowService.WatchWorkflowExecution:input_type -> api.WatchWorkflowExecutionRequest
|
||||
8, // 18: api.WorkflowService.GetWorkflowExecutionLogs:input_type -> api.GetWorkflowExecutionLogsRequest
|
||||
9, // 19: api.WorkflowService.GetWorkflowExecutionMetrics:input_type -> api.GetWorkflowExecutionMetricsRequest
|
||||
6, // 20: api.WorkflowService.ResubmitWorkflowExecution:input_type -> api.ResubmitWorkflowExecutionRequest
|
||||
7, // 21: api.WorkflowService.TerminateWorkflowExecution:input_type -> api.TerminateWorkflowExecutionRequest
|
||||
4, // 22: api.WorkflowService.GetArtifact:input_type -> api.GetArtifactRequest
|
||||
18, // 23: api.WorkflowService.ListFiles:input_type -> api.ListFilesRequest
|
||||
21, // 24: api.WorkflowService.AddWorkflowExecutionStatistics:input_type -> api.AddWorkflowExecutionStatisticRequest
|
||||
22, // 25: api.WorkflowService.CronStartWorkflowExecutionStatistic:input_type -> api.CronStartWorkflowExecutionStatisticRequest
|
||||
24, // 26: api.WorkflowService.UpdateWorkflowExecutionStatus:input_type -> api.UpdateWorkflowExecutionStatusRequest
|
||||
15, // 27: api.WorkflowService.CreateWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
15, // 28: api.WorkflowService.CloneWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
15, // 29: api.WorkflowService.GetWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
12, // 30: api.WorkflowService.ListWorkflowExecutions:output_type -> api.ListWorkflowExecutionsResponse
|
||||
15, // 31: api.WorkflowService.WatchWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
13, // 32: api.WorkflowService.GetWorkflowExecutionLogs:output_type -> api.LogEntry
|
||||
10, // 33: api.WorkflowService.GetWorkflowExecutionMetrics:output_type -> api.GetWorkflowExecutionMetricsResponse
|
||||
15, // 34: api.WorkflowService.ResubmitWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
29, // 35: api.WorkflowService.TerminateWorkflowExecution:output_type -> google.protobuf.Empty
|
||||
16, // 36: api.WorkflowService.GetArtifact:output_type -> api.ArtifactResponse
|
||||
19, // 37: api.WorkflowService.ListFiles:output_type -> api.ListFilesResponse
|
||||
29, // 38: api.WorkflowService.AddWorkflowExecutionStatistics:output_type -> google.protobuf.Empty
|
||||
29, // 39: api.WorkflowService.CronStartWorkflowExecutionStatistic:output_type -> google.protobuf.Empty
|
||||
29, // 40: api.WorkflowService.UpdateWorkflowExecutionStatus:output_type -> google.protobuf.Empty
|
||||
27, // [27:41] is the sub-list for method output_type
|
||||
13, // [13:27] is the sub-list for method input_type
|
||||
13, // [13:13] is the sub-list for extension type_name
|
||||
13, // [13:13] is the sub-list for extension extendee
|
||||
0, // [0:13] is the sub-list for field type_name
|
||||
31, // 13: api.GetWorkflowExecutionStatisticsForNamespaceResponse.stats:type_name -> api.WorkflowExecutionStatisticReport
|
||||
1, // 14: api.WorkflowService.CreateWorkflowExecution:input_type -> api.CreateWorkflowExecutionRequest
|
||||
2, // 15: api.WorkflowService.CloneWorkflowExecution:input_type -> api.CloneWorkflowExecutionRequest
|
||||
25, // 16: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:input_type -> api.GetWorkflowExecutionStatisticsForNamespaceRequest
|
||||
3, // 17: api.WorkflowService.GetWorkflowExecution:input_type -> api.GetWorkflowExecutionRequest
|
||||
11, // 18: api.WorkflowService.ListWorkflowExecutions:input_type -> api.ListWorkflowExecutionsRequest
|
||||
5, // 19: api.WorkflowService.WatchWorkflowExecution:input_type -> api.WatchWorkflowExecutionRequest
|
||||
8, // 20: api.WorkflowService.GetWorkflowExecutionLogs:input_type -> api.GetWorkflowExecutionLogsRequest
|
||||
9, // 21: api.WorkflowService.GetWorkflowExecutionMetrics:input_type -> api.GetWorkflowExecutionMetricsRequest
|
||||
6, // 22: api.WorkflowService.ResubmitWorkflowExecution:input_type -> api.ResubmitWorkflowExecutionRequest
|
||||
7, // 23: api.WorkflowService.TerminateWorkflowExecution:input_type -> api.TerminateWorkflowExecutionRequest
|
||||
4, // 24: api.WorkflowService.GetArtifact:input_type -> api.GetArtifactRequest
|
||||
18, // 25: api.WorkflowService.ListFiles:input_type -> api.ListFilesRequest
|
||||
21, // 26: api.WorkflowService.AddWorkflowExecutionStatistics:input_type -> api.AddWorkflowExecutionStatisticRequest
|
||||
22, // 27: api.WorkflowService.CronStartWorkflowExecutionStatistic:input_type -> api.CronStartWorkflowExecutionStatisticRequest
|
||||
24, // 28: api.WorkflowService.UpdateWorkflowExecutionStatus:input_type -> api.UpdateWorkflowExecutionStatusRequest
|
||||
15, // 29: api.WorkflowService.CreateWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
15, // 30: api.WorkflowService.CloneWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
26, // 31: api.WorkflowService.GetWorkflowExecutionStatisticsForNamespace:output_type -> api.GetWorkflowExecutionStatisticsForNamespaceResponse
|
||||
15, // 32: api.WorkflowService.GetWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
12, // 33: api.WorkflowService.ListWorkflowExecutions:output_type -> api.ListWorkflowExecutionsResponse
|
||||
15, // 34: api.WorkflowService.WatchWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
13, // 35: api.WorkflowService.GetWorkflowExecutionLogs:output_type -> api.LogEntry
|
||||
10, // 36: api.WorkflowService.GetWorkflowExecutionMetrics:output_type -> api.GetWorkflowExecutionMetricsResponse
|
||||
15, // 37: api.WorkflowService.ResubmitWorkflowExecution:output_type -> api.WorkflowExecution
|
||||
32, // 38: api.WorkflowService.TerminateWorkflowExecution:output_type -> google.protobuf.Empty
|
||||
16, // 39: api.WorkflowService.GetArtifact:output_type -> api.ArtifactResponse
|
||||
19, // 40: api.WorkflowService.ListFiles:output_type -> api.ListFilesResponse
|
||||
32, // 41: api.WorkflowService.AddWorkflowExecutionStatistics:output_type -> google.protobuf.Empty
|
||||
32, // 42: api.WorkflowService.CronStartWorkflowExecutionStatistic:output_type -> google.protobuf.Empty
|
||||
32, // 43: api.WorkflowService.UpdateWorkflowExecutionStatus:output_type -> google.protobuf.Empty
|
||||
29, // [29:44] is the sub-list for method output_type
|
||||
14, // [14:29] is the sub-list for method input_type
|
||||
14, // [14:14] is the sub-list for extension type_name
|
||||
14, // [14:14] is the sub-list for extension extendee
|
||||
0, // [0:14] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_workflow_proto_init() }
|
||||
@@ -2375,6 +2540,30 @@ func file_workflow_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_workflow_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_workflow_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetWorkflowExecutionStatisticsForNamespaceResponse); 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{
|
||||
@@ -2382,7 +2571,7 @@ func file_workflow_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_workflow_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 25,
|
||||
NumMessages: 27,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
@@ -2412,6 +2601,7 @@ type WorkflowServiceClient interface {
|
||||
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)
|
||||
@@ -2452,6 +2642,15 @@ func (c *workflowServiceClient) CloneWorkflowExecution(ctx context.Context, in *
|
||||
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...)
|
||||
@@ -2612,6 +2811,7 @@ type WorkflowServiceServer interface {
|
||||
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
|
||||
@@ -2636,6 +2836,9 @@ func (*UnimplementedWorkflowServiceServer) CreateWorkflowExecution(context.Conte
|
||||
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")
|
||||
}
|
||||
@@ -2713,6 +2916,24 @@ func _WorkflowService_CloneWorkflowExecution_Handler(srv interface{}, ctx contex
|
||||
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 {
|
||||
@@ -2947,6 +3168,10 @@ var _WorkflowService_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "CloneWorkflowExecution",
|
||||
Handler: _WorkflowService_CloneWorkflowExecution_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetWorkflowExecutionStatisticsForNamespace",
|
||||
Handler: _WorkflowService_GetWorkflowExecutionStatisticsForNamespace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetWorkflowExecution",
|
||||
Handler: _WorkflowService_GetWorkflowExecution_Handler,
|
||||
|
@@ -177,6 +177,60 @@ func local_request_WorkflowService_CloneWorkflowExecution_0(ctx context.Context,
|
||||
|
||||
}
|
||||
|
||||
func request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest
|
||||
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.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkflowServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetWorkflowExecutionStatisticsForNamespaceRequest
|
||||
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.GetWorkflowExecutionStatisticsForNamespace(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_WorkflowService_GetWorkflowExecution_0(ctx context.Context, marshaler runtime.Marshaler, client WorkflowServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetWorkflowExecutionRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -1203,6 +1257,26 @@ func RegisterWorkflowServiceHandlerServer(ctx context.Context, mux *runtime.Serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_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_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -1498,6 +1572,26 @@ func RegisterWorkflowServiceHandlerClient(ctx context.Context, mux *runtime.Serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_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_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkflowService_GetWorkflowExecution_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -1746,6 +1840,8 @@ var (
|
||||
|
||||
pattern_WorkflowService_CloneWorkflowExecution_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", "workflow_executions", "uid"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workflow_executions", "statistics"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_WorkflowService_GetWorkflowExecution_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", "workflow_executions", "uid"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_WorkflowService_ListWorkflowExecutions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"apis", "v1beta1", "namespace", "workflow_executions"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
@@ -1776,6 +1872,8 @@ var (
|
||||
|
||||
forward_WorkflowService_CloneWorkflowExecution_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkflowService_GetWorkflowExecutionStatisticsForNamespace_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkflowService_GetWorkflowExecution_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkflowService_ListWorkflowExecutions_0 = runtime.ForwardResponseMessage
|
||||
|
@@ -25,6 +25,12 @@ service WorkflowService {
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetWorkflowExecutionStatisticsForNamespace (GetWorkflowExecutionStatisticsForNamespaceRequest) returns (GetWorkflowExecutionStatisticsForNamespaceResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/apis/v1beta1/{namespace}/workflow_executions/statistics"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetWorkflowExecution (GetWorkflowExecutionRequest) returns (WorkflowExecution) {
|
||||
option (google.api.http) = {
|
||||
get: "/apis/v1beta1/{namespace}/workflow_executions/{uid}"
|
||||
@@ -169,6 +175,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 {
|
||||
@@ -256,4 +266,12 @@ message UpdateWorkflowExecutionStatusRequest {
|
||||
string namespace = 1;
|
||||
string uid = 2;
|
||||
WorkflowExecutionStatus status = 3;
|
||||
}
|
||||
|
||||
message GetWorkflowExecutionStatisticsForNamespaceRequest {
|
||||
string namespace = 1;
|
||||
}
|
||||
|
||||
message GetWorkflowExecutionStatisticsForNamespaceResponse {
|
||||
WorkflowExecutionStatisticReport stats = 1;
|
||||
}
|
@@ -591,6 +591,9 @@ type ListWorkspaceRequest struct {
|
||||
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"`
|
||||
Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"`
|
||||
Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"`
|
||||
Phase string `protobuf:"bytes,6,opt,name=phase,proto3" json:"phase,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceRequest) Reset() {
|
||||
@@ -646,6 +649,27 @@ func (x *ListWorkspaceRequest) GetPage() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceRequest) GetOrder() string {
|
||||
if x != nil {
|
||||
return x.Order
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceRequest) GetLabels() string {
|
||||
if x != nil {
|
||||
return x.Labels
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceRequest) GetPhase() string {
|
||||
if x != nil {
|
||||
return x.Phase
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListWorkspaceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -890,6 +914,314 @@ func (x *DeleteWorkspaceRequest) GetUid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
type RetryActionWorkspaceRequest 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 *RetryActionWorkspaceRequest) Reset() {
|
||||
*x = RetryActionWorkspaceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_workspace_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *RetryActionWorkspaceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*RetryActionWorkspaceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RetryActionWorkspaceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_workspace_proto_msgTypes[13]
|
||||
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 RetryActionWorkspaceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*RetryActionWorkspaceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_workspace_proto_rawDescGZIP(), []int{13}
|
||||
}
|
||||
|
||||
func (x *RetryActionWorkspaceRequest) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RetryActionWorkspaceRequest) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type WorkspaceStatisticReport struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
|
||||
LastCreated string `protobuf:"bytes,2,opt,name=lastCreated,proto3" json:"lastCreated,omitempty"`
|
||||
Launching int32 `protobuf:"varint,3,opt,name=launching,proto3" json:"launching,omitempty"`
|
||||
Running int32 `protobuf:"varint,4,opt,name=running,proto3" json:"running,omitempty"`
|
||||
Updating int32 `protobuf:"varint,5,opt,name=updating,proto3" json:"updating,omitempty"`
|
||||
Pausing int32 `protobuf:"varint,6,opt,name=pausing,proto3" json:"pausing,omitempty"`
|
||||
Paused int32 `protobuf:"varint,7,opt,name=paused,proto3" json:"paused,omitempty"`
|
||||
Terminating int32 `protobuf:"varint,8,opt,name=terminating,proto3" json:"terminating,omitempty"`
|
||||
Terminated int32 `protobuf:"varint,9,opt,name=terminated,proto3" json:"terminated,omitempty"`
|
||||
FailedToPause int32 `protobuf:"varint,10,opt,name=failedToPause,proto3" json:"failedToPause,omitempty"`
|
||||
FailedToResume int32 `protobuf:"varint,11,opt,name=failedToResume,proto3" json:"failedToResume,omitempty"`
|
||||
FailedToTerminate int32 `protobuf:"varint,12,opt,name=failedToTerminate,proto3" json:"failedToTerminate,omitempty"`
|
||||
FailedToLaunch int32 `protobuf:"varint,13,opt,name=failedToLaunch,proto3" json:"failedToLaunch,omitempty"`
|
||||
FailedToUpdate int32 `protobuf:"varint,14,opt,name=failedToUpdate,proto3" json:"failedToUpdate,omitempty"`
|
||||
Failed int32 `protobuf:"varint,15,opt,name=failed,proto3" json:"failed,omitempty"`
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) Reset() {
|
||||
*x = WorkspaceStatisticReport{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_workspace_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*WorkspaceStatisticReport) ProtoMessage() {}
|
||||
|
||||
func (x *WorkspaceStatisticReport) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_workspace_proto_msgTypes[14]
|
||||
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 WorkspaceStatisticReport.ProtoReflect.Descriptor instead.
|
||||
func (*WorkspaceStatisticReport) Descriptor() ([]byte, []int) {
|
||||
return file_workspace_proto_rawDescGZIP(), []int{14}
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetTotal() int32 {
|
||||
if x != nil {
|
||||
return x.Total
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetLastCreated() string {
|
||||
if x != nil {
|
||||
return x.LastCreated
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetLaunching() int32 {
|
||||
if x != nil {
|
||||
return x.Launching
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetRunning() int32 {
|
||||
if x != nil {
|
||||
return x.Running
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetUpdating() int32 {
|
||||
if x != nil {
|
||||
return x.Updating
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetPausing() int32 {
|
||||
if x != nil {
|
||||
return x.Pausing
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetPaused() int32 {
|
||||
if x != nil {
|
||||
return x.Paused
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetTerminating() int32 {
|
||||
if x != nil {
|
||||
return x.Terminating
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetTerminated() int32 {
|
||||
if x != nil {
|
||||
return x.Terminated
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetFailedToPause() int32 {
|
||||
if x != nil {
|
||||
return x.FailedToPause
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetFailedToResume() int32 {
|
||||
if x != nil {
|
||||
return x.FailedToResume
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetFailedToTerminate() int32 {
|
||||
if x != nil {
|
||||
return x.FailedToTerminate
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetFailedToLaunch() int32 {
|
||||
if x != nil {
|
||||
return x.FailedToLaunch
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetFailedToUpdate() int32 {
|
||||
if x != nil {
|
||||
return x.FailedToUpdate
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *WorkspaceStatisticReport) GetFailed() int32 {
|
||||
if x != nil {
|
||||
return x.Failed
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type GetWorkspaceStatisticsForNamespaceRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceRequest) Reset() {
|
||||
*x = GetWorkspaceStatisticsForNamespaceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_workspace_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetWorkspaceStatisticsForNamespaceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_workspace_proto_msgTypes[15]
|
||||
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 GetWorkspaceStatisticsForNamespaceRequest.ProtoReflect.Descriptor instead.
|
||||
func (*GetWorkspaceStatisticsForNamespaceRequest) Descriptor() ([]byte, []int) {
|
||||
return file_workspace_proto_rawDescGZIP(), []int{15}
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceRequest) GetNamespace() string {
|
||||
if x != nil {
|
||||
return x.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type GetWorkspaceStatisticsForNamespaceResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Stats *WorkspaceStatisticReport `protobuf:"bytes,1,opt,name=stats,proto3" json:"stats,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceResponse) Reset() {
|
||||
*x = GetWorkspaceStatisticsForNamespaceResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_workspace_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GetWorkspaceStatisticsForNamespaceResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_workspace_proto_msgTypes[16]
|
||||
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 GetWorkspaceStatisticsForNamespaceResponse.ProtoReflect.Descriptor instead.
|
||||
func (*GetWorkspaceStatisticsForNamespaceResponse) Descriptor() ([]byte, []int) {
|
||||
return file_workspace_proto_rawDescGZIP(), []int{16}
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceStatisticsForNamespaceResponse) GetStats() *WorkspaceStatisticReport {
|
||||
if x != nil {
|
||||
return x.Stats
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_workspace_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_workspace_proto_rawDesc = []byte{
|
||||
@@ -981,103 +1313,176 @@ var file_workspace_proto_rawDesc = []byte{
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x04, 0x62, 0x6f, 0x64,
|
||||
0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x42, 0x6f, 0x64,
|
||||
0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x64, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 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, 0xa7, 0x01,
|
||||
0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x2e, 0x0a,
|
||||
0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 0x22, 0x47, 0x0a, 0x15, 0x50, 0x61, 0x75, 0x73, 0x65,
|
||||
0x79, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0xa8, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 0x10,
|
||||
0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
|
||||
0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x75, 0x69, 0x64, 0x32, 0x86, 0x08, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0f, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x2c, 0x22, 0x24, 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, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x6c, 0x0a,
|
||||
0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12,
|
||||
0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x7b,
|
||||
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, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x05,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x14, 0x0a, 0x05,
|
||||
0x70, 0x68, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x61,
|
||||
0x73, 0x65, 0x22, 0xa7, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 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, 0x2e, 0x0a, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 0x22, 0x47, 0x0a, 0x15,
|
||||
0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x48, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22,
|
||||
0x48, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1b, 0x52, 0x65, 0x74,
|
||||
0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xfe, 0x03, 0x0a, 0x18, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52,
|
||||
0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x6c,
|
||||
0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0b, 0x6c, 0x61, 0x73, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x09, 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x72,
|
||||
0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x75,
|
||||
0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x75, 0x70, 0x64, 0x61, 0x74, 0x69, 0x6e,
|
||||
0x67, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x07, 0x70, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x70,
|
||||
0x61, 0x75, 0x73, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x70, 0x61, 0x75,
|
||||
0x73, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69,
|
||||
0x6e, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e,
|
||||
0x61, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61,
|
||||
0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x74, 0x65, 0x72, 0x6d, 0x69,
|
||||
0x6e, 0x61, 0x74, 0x65, 0x64, 0x12, 0x24, 0x0a, 0x0d, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54,
|
||||
0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x66, 0x61,
|
||||
0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x50, 0x61, 0x75, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66,
|
||||
0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x52, 0x65, 0x73,
|
||||
0x75, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54,
|
||||
0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11,
|
||||
0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74,
|
||||
0x65, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75,
|
||||
0x6e, 0x63, 0x68, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65,
|
||||
0x64, 0x54, 0x6f, 0x4c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x12, 0x26, 0x0a, 0x0e, 0x66, 0x61, 0x69,
|
||||
0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x0e, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x54, 0x6f, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x18, 0x0f, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x06, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x22, 0x49, 0x0a, 0x29, 0x47, 0x65, 0x74,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
|
||||
0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 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, 0x22, 0x61, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f,
|
||||
0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x33, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74,
|
||||
0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x73, 0x32, 0xd7, 0x0a, 0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0f,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
|
||||
0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x2c, 0x22, 0x24, 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,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
||||
0x12, 0xbd, 0x01, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61,
|
||||
0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
|
||||
0x74, 0x69, 0x63, 0x73, 0x46, 0x6f, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
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, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
|
||||
0x12, 0x6c, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93,
|
||||
0x02, 0x2c, 0x12, 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, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x75,
|
||||
0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73,
|
||||
0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12,
|
||||
0x24, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x12, 0x75, 0x0a, 0x0e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x19, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x21, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x74, 0x61, 0x74,
|
||||
0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x55,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 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, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x7e, 0x0a,
|
||||
0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
|
||||
0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 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, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x30, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, 0x73, 0x65, 0x12, 0x81, 0x01,
|
||||
0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f,
|
||||
0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x95, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
|
||||
0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 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, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x80, 0x01,
|
||||
0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x1a, 0x31,
|
||||
0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x75, 0x6d,
|
||||
0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x62, 0x6f, 0x64, 0x79,
|
||||
0x12, 0x7e, 0x0a, 0x0e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a, 0x30,
|
||||
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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x70, 0x61, 0x75, 0x73, 0x65,
|
||||
0x12, 0x81, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d,
|
||||
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x2c, 0x2a, 0x2a, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31,
|
||||
0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02,
|
||||
0x33, 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, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65,
|
||||
0x73, 0x75, 0x6d, 0x65, 0x12, 0x7a, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x32, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x2c, 0x2a, 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,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d,
|
||||
0x12, 0x8e, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x74, 0x72, 0x79, 0x4c, 0x61, 0x73, 0x74, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 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, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x1a,
|
||||
0x30, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x72, 0x65, 0x74, 0x72,
|
||||
0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -1092,61 +1497,70 @@ func file_workspace_proto_rawDescGZIP() []byte {
|
||||
return file_workspace_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_workspace_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
|
||||
var file_workspace_proto_goTypes = []interface{}{
|
||||
(*Workspace)(nil), // 0: api.Workspace
|
||||
(*WorkspaceStatus)(nil), // 1: api.WorkspaceStatus
|
||||
(*CreateWorkspaceBody)(nil), // 2: api.CreateWorkspaceBody
|
||||
(*CreateWorkspaceRequest)(nil), // 3: api.CreateWorkspaceRequest
|
||||
(*GetWorkspaceRequest)(nil), // 4: api.GetWorkspaceRequest
|
||||
(*UpdateWorkspaceStatusRequest)(nil), // 5: api.UpdateWorkspaceStatusRequest
|
||||
(*UpdateWorkspaceBody)(nil), // 6: api.UpdateWorkspaceBody
|
||||
(*UpdateWorkspaceRequest)(nil), // 7: api.UpdateWorkspaceRequest
|
||||
(*ListWorkspaceRequest)(nil), // 8: api.ListWorkspaceRequest
|
||||
(*ListWorkspaceResponse)(nil), // 9: api.ListWorkspaceResponse
|
||||
(*PauseWorkspaceRequest)(nil), // 10: api.PauseWorkspaceRequest
|
||||
(*ResumeWorkspaceRequest)(nil), // 11: api.ResumeWorkspaceRequest
|
||||
(*DeleteWorkspaceRequest)(nil), // 12: api.DeleteWorkspaceRequest
|
||||
(*Parameter)(nil), // 13: api.Parameter
|
||||
(*WorkspaceTemplate)(nil), // 14: api.WorkspaceTemplate
|
||||
(*KeyValue)(nil), // 15: api.KeyValue
|
||||
(*empty.Empty)(nil), // 16: google.protobuf.Empty
|
||||
(*Workspace)(nil), // 0: api.Workspace
|
||||
(*WorkspaceStatus)(nil), // 1: api.WorkspaceStatus
|
||||
(*CreateWorkspaceBody)(nil), // 2: api.CreateWorkspaceBody
|
||||
(*CreateWorkspaceRequest)(nil), // 3: api.CreateWorkspaceRequest
|
||||
(*GetWorkspaceRequest)(nil), // 4: api.GetWorkspaceRequest
|
||||
(*UpdateWorkspaceStatusRequest)(nil), // 5: api.UpdateWorkspaceStatusRequest
|
||||
(*UpdateWorkspaceBody)(nil), // 6: api.UpdateWorkspaceBody
|
||||
(*UpdateWorkspaceRequest)(nil), // 7: api.UpdateWorkspaceRequest
|
||||
(*ListWorkspaceRequest)(nil), // 8: api.ListWorkspaceRequest
|
||||
(*ListWorkspaceResponse)(nil), // 9: api.ListWorkspaceResponse
|
||||
(*PauseWorkspaceRequest)(nil), // 10: api.PauseWorkspaceRequest
|
||||
(*ResumeWorkspaceRequest)(nil), // 11: api.ResumeWorkspaceRequest
|
||||
(*DeleteWorkspaceRequest)(nil), // 12: api.DeleteWorkspaceRequest
|
||||
(*RetryActionWorkspaceRequest)(nil), // 13: api.RetryActionWorkspaceRequest
|
||||
(*WorkspaceStatisticReport)(nil), // 14: api.WorkspaceStatisticReport
|
||||
(*GetWorkspaceStatisticsForNamespaceRequest)(nil), // 15: api.GetWorkspaceStatisticsForNamespaceRequest
|
||||
(*GetWorkspaceStatisticsForNamespaceResponse)(nil), // 16: api.GetWorkspaceStatisticsForNamespaceResponse
|
||||
(*Parameter)(nil), // 17: api.Parameter
|
||||
(*WorkspaceTemplate)(nil), // 18: api.WorkspaceTemplate
|
||||
(*KeyValue)(nil), // 19: api.KeyValue
|
||||
(*empty.Empty)(nil), // 20: google.protobuf.Empty
|
||||
}
|
||||
var file_workspace_proto_depIdxs = []int32{
|
||||
13, // 0: api.Workspace.parameters:type_name -> api.Parameter
|
||||
14, // 1: api.Workspace.workspaceTemplate:type_name -> api.WorkspaceTemplate
|
||||
17, // 0: api.Workspace.parameters:type_name -> api.Parameter
|
||||
18, // 1: api.Workspace.workspaceTemplate:type_name -> api.WorkspaceTemplate
|
||||
1, // 2: api.Workspace.status:type_name -> api.WorkspaceStatus
|
||||
15, // 3: api.Workspace.labels:type_name -> api.KeyValue
|
||||
13, // 4: api.Workspace.templateParameters:type_name -> api.Parameter
|
||||
13, // 5: api.CreateWorkspaceBody.parameters:type_name -> api.Parameter
|
||||
15, // 6: api.CreateWorkspaceBody.labels:type_name -> api.KeyValue
|
||||
19, // 3: api.Workspace.labels:type_name -> api.KeyValue
|
||||
17, // 4: api.Workspace.templateParameters:type_name -> api.Parameter
|
||||
17, // 5: api.CreateWorkspaceBody.parameters:type_name -> api.Parameter
|
||||
19, // 6: api.CreateWorkspaceBody.labels:type_name -> api.KeyValue
|
||||
2, // 7: api.CreateWorkspaceRequest.body:type_name -> api.CreateWorkspaceBody
|
||||
1, // 8: api.UpdateWorkspaceStatusRequest.status:type_name -> api.WorkspaceStatus
|
||||
13, // 9: api.UpdateWorkspaceBody.parameters:type_name -> api.Parameter
|
||||
15, // 10: api.UpdateWorkspaceBody.labels:type_name -> api.KeyValue
|
||||
17, // 9: api.UpdateWorkspaceBody.parameters:type_name -> api.Parameter
|
||||
19, // 10: api.UpdateWorkspaceBody.labels:type_name -> api.KeyValue
|
||||
6, // 11: api.UpdateWorkspaceRequest.body:type_name -> api.UpdateWorkspaceBody
|
||||
0, // 12: api.ListWorkspaceResponse.workspaces:type_name -> api.Workspace
|
||||
3, // 13: api.WorkspaceService.CreateWorkspace:input_type -> api.CreateWorkspaceRequest
|
||||
4, // 14: api.WorkspaceService.GetWorkspace:input_type -> api.GetWorkspaceRequest
|
||||
8, // 15: api.WorkspaceService.ListWorkspaces:input_type -> api.ListWorkspaceRequest
|
||||
5, // 16: api.WorkspaceService.UpdateWorkspaceStatus:input_type -> api.UpdateWorkspaceStatusRequest
|
||||
7, // 17: api.WorkspaceService.UpdateWorkspace:input_type -> api.UpdateWorkspaceRequest
|
||||
10, // 18: api.WorkspaceService.PauseWorkspace:input_type -> api.PauseWorkspaceRequest
|
||||
11, // 19: api.WorkspaceService.ResumeWorkspace:input_type -> api.ResumeWorkspaceRequest
|
||||
12, // 20: api.WorkspaceService.DeleteWorkspace:input_type -> api.DeleteWorkspaceRequest
|
||||
0, // 21: api.WorkspaceService.CreateWorkspace:output_type -> api.Workspace
|
||||
0, // 22: api.WorkspaceService.GetWorkspace:output_type -> api.Workspace
|
||||
9, // 23: api.WorkspaceService.ListWorkspaces:output_type -> api.ListWorkspaceResponse
|
||||
16, // 24: api.WorkspaceService.UpdateWorkspaceStatus:output_type -> google.protobuf.Empty
|
||||
16, // 25: api.WorkspaceService.UpdateWorkspace:output_type -> google.protobuf.Empty
|
||||
16, // 26: api.WorkspaceService.PauseWorkspace:output_type -> google.protobuf.Empty
|
||||
16, // 27: api.WorkspaceService.ResumeWorkspace:output_type -> google.protobuf.Empty
|
||||
16, // 28: api.WorkspaceService.DeleteWorkspace:output_type -> google.protobuf.Empty
|
||||
21, // [21:29] is the sub-list for method output_type
|
||||
13, // [13:21] is the sub-list for method input_type
|
||||
13, // [13:13] is the sub-list for extension type_name
|
||||
13, // [13:13] is the sub-list for extension extendee
|
||||
0, // [0:13] is the sub-list for field type_name
|
||||
14, // 13: api.GetWorkspaceStatisticsForNamespaceResponse.stats:type_name -> api.WorkspaceStatisticReport
|
||||
3, // 14: api.WorkspaceService.CreateWorkspace:input_type -> api.CreateWorkspaceRequest
|
||||
15, // 15: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:input_type -> api.GetWorkspaceStatisticsForNamespaceRequest
|
||||
4, // 16: api.WorkspaceService.GetWorkspace:input_type -> api.GetWorkspaceRequest
|
||||
8, // 17: api.WorkspaceService.ListWorkspaces:input_type -> api.ListWorkspaceRequest
|
||||
5, // 18: api.WorkspaceService.UpdateWorkspaceStatus:input_type -> api.UpdateWorkspaceStatusRequest
|
||||
7, // 19: api.WorkspaceService.UpdateWorkspace:input_type -> api.UpdateWorkspaceRequest
|
||||
10, // 20: api.WorkspaceService.PauseWorkspace:input_type -> api.PauseWorkspaceRequest
|
||||
11, // 21: api.WorkspaceService.ResumeWorkspace:input_type -> api.ResumeWorkspaceRequest
|
||||
12, // 22: api.WorkspaceService.DeleteWorkspace:input_type -> api.DeleteWorkspaceRequest
|
||||
13, // 23: api.WorkspaceService.RetryLastWorkspaceAction:input_type -> api.RetryActionWorkspaceRequest
|
||||
0, // 24: api.WorkspaceService.CreateWorkspace:output_type -> api.Workspace
|
||||
16, // 25: api.WorkspaceService.GetWorkspaceStatisticsForNamespace:output_type -> api.GetWorkspaceStatisticsForNamespaceResponse
|
||||
0, // 26: api.WorkspaceService.GetWorkspace:output_type -> api.Workspace
|
||||
9, // 27: api.WorkspaceService.ListWorkspaces:output_type -> api.ListWorkspaceResponse
|
||||
20, // 28: api.WorkspaceService.UpdateWorkspaceStatus:output_type -> google.protobuf.Empty
|
||||
20, // 29: api.WorkspaceService.UpdateWorkspace:output_type -> google.protobuf.Empty
|
||||
20, // 30: api.WorkspaceService.PauseWorkspace:output_type -> google.protobuf.Empty
|
||||
20, // 31: api.WorkspaceService.ResumeWorkspace:output_type -> google.protobuf.Empty
|
||||
20, // 32: api.WorkspaceService.DeleteWorkspace:output_type -> google.protobuf.Empty
|
||||
20, // 33: api.WorkspaceService.RetryLastWorkspaceAction:output_type -> google.protobuf.Empty
|
||||
24, // [24:34] is the sub-list for method output_type
|
||||
14, // [14:24] is the sub-list for method input_type
|
||||
14, // [14:14] is the sub-list for extension type_name
|
||||
14, // [14:14] is the sub-list for extension extendee
|
||||
0, // [0:14] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_workspace_proto_init() }
|
||||
@@ -1314,6 +1728,54 @@ func file_workspace_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_workspace_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RetryActionWorkspaceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_workspace_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*WorkspaceStatisticReport); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_workspace_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetWorkspaceStatisticsForNamespaceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_workspace_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetWorkspaceStatisticsForNamespaceResponse); 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{
|
||||
@@ -1321,7 +1783,7 @@ func file_workspace_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_workspace_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 13,
|
||||
NumMessages: 17,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
@@ -1348,6 +1810,7 @@ const _ = grpc.SupportPackageIsVersion6
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#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) (*empty.Empty, error)
|
||||
@@ -1355,6 +1818,7 @@ type WorkspaceServiceClient interface {
|
||||
PauseWorkspace(ctx context.Context, in *PauseWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
ResumeWorkspace(ctx context.Context, in *ResumeWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
DeleteWorkspace(ctx context.Context, in *DeleteWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
||||
}
|
||||
|
||||
type workspaceServiceClient struct {
|
||||
@@ -1374,6 +1838,15 @@ func (c *workspaceServiceClient) CreateWorkspace(ctx context.Context, in *Create
|
||||
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...)
|
||||
@@ -1437,9 +1910,19 @@ func (c *workspaceServiceClient) DeleteWorkspace(ctx context.Context, in *Delete
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *workspaceServiceClient) RetryLastWorkspaceAction(ctx context.Context, in *RetryActionWorkspaceRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
||||
out := new(empty.Empty)
|
||||
err := c.cc.Invoke(ctx, "/api.WorkspaceService/RetryLastWorkspaceAction", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// WorkspaceServiceServer is the server API for WorkspaceService service.
|
||||
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) (*empty.Empty, error)
|
||||
@@ -1447,6 +1930,7 @@ type WorkspaceServiceServer interface {
|
||||
PauseWorkspace(context.Context, *PauseWorkspaceRequest) (*empty.Empty, error)
|
||||
ResumeWorkspace(context.Context, *ResumeWorkspaceRequest) (*empty.Empty, error)
|
||||
DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*empty.Empty, error)
|
||||
RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*empty.Empty, error)
|
||||
}
|
||||
|
||||
// UnimplementedWorkspaceServiceServer can be embedded to have forward compatible implementations.
|
||||
@@ -1456,6 +1940,9 @@ 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")
|
||||
}
|
||||
@@ -1477,6 +1964,9 @@ func (*UnimplementedWorkspaceServiceServer) ResumeWorkspace(context.Context, *Re
|
||||
func (*UnimplementedWorkspaceServiceServer) DeleteWorkspace(context.Context, *DeleteWorkspaceRequest) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteWorkspace not implemented")
|
||||
}
|
||||
func (*UnimplementedWorkspaceServiceServer) RetryLastWorkspaceAction(context.Context, *RetryActionWorkspaceRequest) (*empty.Empty, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RetryLastWorkspaceAction not implemented")
|
||||
}
|
||||
|
||||
func RegisterWorkspaceServiceServer(s *grpc.Server, srv WorkspaceServiceServer) {
|
||||
s.RegisterService(&_WorkspaceService_serviceDesc, srv)
|
||||
@@ -1500,6 +1990,24 @@ func _WorkspaceService_CreateWorkspace_Handler(srv interface{}, ctx context.Cont
|
||||
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 {
|
||||
@@ -1626,6 +2134,24 @@ func _WorkspaceService_DeleteWorkspace_Handler(srv interface{}, ctx context.Cont
|
||||
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)
|
||||
}
|
||||
|
||||
var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "api.WorkspaceService",
|
||||
HandlerType: (*WorkspaceServiceServer)(nil),
|
||||
@@ -1634,6 +2160,10 @@ var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "CreateWorkspace",
|
||||
Handler: _WorkspaceService_CreateWorkspace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetWorkspaceStatisticsForNamespace",
|
||||
Handler: _WorkspaceService_GetWorkspaceStatisticsForNamespace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetWorkspace",
|
||||
Handler: _WorkspaceService_GetWorkspace_Handler,
|
||||
@@ -1662,6 +2192,10 @@ var _WorkspaceService_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "DeleteWorkspace",
|
||||
Handler: _WorkspaceService_DeleteWorkspace_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RetryLastWorkspaceAction",
|
||||
Handler: _WorkspaceService_RetryLastWorkspaceAction_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "workspace.proto",
|
||||
|
@@ -101,6 +101,60 @@ func local_request_WorkspaceService_CreateWorkspace_0(ctx context.Context, marsh
|
||||
|
||||
}
|
||||
|
||||
func request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetWorkspaceStatisticsForNamespaceRequest
|
||||
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.GetWorkspaceStatisticsForNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WorkspaceService_GetWorkspaceStatisticsForNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetWorkspaceStatisticsForNamespaceRequest
|
||||
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.GetWorkspaceStatisticsForNamespace(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_WorkspaceService_GetWorkspace_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq GetWorkspaceRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
@@ -658,6 +712,82 @@ func local_request_WorkspaceService_DeleteWorkspace_0(ctx context.Context, marsh
|
||||
|
||||
}
|
||||
|
||||
func request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RetryActionWorkspaceRequest
|
||||
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.RetryLastWorkspaceAction(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_WorkspaceService_RetryLastWorkspaceAction_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq RetryActionWorkspaceRequest
|
||||
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.RetryLastWorkspaceAction(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.
|
||||
@@ -683,6 +813,26 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_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_GetWorkspaceStatisticsForNamespace_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_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -823,6 +973,26 @@ func RegisterWorkspaceServiceHandlerServer(ctx context.Context, mux *runtime.Ser
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_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_RetryLastWorkspaceAction_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_RetryLastWorkspaceAction_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -884,6 +1054,26 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkspaceService_GetWorkspaceStatisticsForNamespace_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_GetWorkspaceStatisticsForNamespace_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_GetWorkspaceStatisticsForNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_WorkspaceService_GetWorkspace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@@ -1024,12 +1214,34 @@ func RegisterWorkspaceServiceHandlerClient(ctx context.Context, mux *runtime.Ser
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("PUT", pattern_WorkspaceService_RetryLastWorkspaceAction_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_RetryLastWorkspaceAction_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_RetryLastWorkspaceAction_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_GetWorkspaceStatisticsForNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"apis", "v1beta1", "namespace", "workspace", "statistics"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
|
||||
pattern_WorkspaceService_GetWorkspace_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)))
|
||||
|
||||
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)))
|
||||
@@ -1043,11 +1255,15 @@ var (
|
||||
pattern_WorkspaceService_ResumeWorkspace_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", "resume"}, "", 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)))
|
||||
|
||||
pattern_WorkspaceService_RetryLastWorkspaceAction_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", "retry"}, "", runtime.AssumeColonVerbOpt(true)))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_WorkspaceService_CreateWorkspace_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkspaceService_GetWorkspaceStatisticsForNamespace_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkspaceService_GetWorkspace_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkspaceService_ListWorkspaces_0 = runtime.ForwardResponseMessage
|
||||
@@ -1061,4 +1277,6 @@ var (
|
||||
forward_WorkspaceService_ResumeWorkspace_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkspaceService_DeleteWorkspace_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_WorkspaceService_RetryLastWorkspaceAction_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
@@ -16,6 +16,12 @@ service WorkspaceService {
|
||||
};
|
||||
}
|
||||
|
||||
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}"
|
||||
@@ -59,6 +65,12 @@ service WorkspaceService {
|
||||
delete: "/apis/v1beta1/{namespace}/workspaces/{uid}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc RetryLastWorkspaceAction (RetryActionWorkspaceRequest) returns (google.protobuf.Empty) {
|
||||
option (google.api.http) = {
|
||||
put: "/apis/v1beta1/{namespace}/workspaces/{uid}/retry"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message Workspace {
|
||||
@@ -121,6 +133,9 @@ message ListWorkspaceRequest {
|
||||
string namespace = 1;
|
||||
int32 pageSize = 2;
|
||||
int32 page = 3;
|
||||
string order = 4;
|
||||
string labels = 5;
|
||||
string phase = 6;
|
||||
}
|
||||
|
||||
message ListWorkspaceResponse {
|
||||
@@ -144,4 +159,35 @@ message ResumeWorkspaceRequest {
|
||||
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;
|
||||
}
|
@@ -457,6 +457,9 @@ type ListWorkspaceTemplatesRequest struct {
|
||||
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"`
|
||||
Order string `protobuf:"bytes,4,opt,name=order,proto3" json:"order,omitempty"`
|
||||
Labels string `protobuf:"bytes,5,opt,name=labels,proto3" json:"labels,omitempty"`
|
||||
Uid string `protobuf:"bytes,6,opt,name=uid,proto3" json:"uid,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceTemplatesRequest) Reset() {
|
||||
@@ -512,6 +515,27 @@ func (x *ListWorkspaceTemplatesRequest) GetPage() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceTemplatesRequest) GetOrder() string {
|
||||
if x != nil {
|
||||
return x.Order
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceTemplatesRequest) GetLabels() string {
|
||||
if x != nil {
|
||||
return x.Labels
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ListWorkspaceTemplatesRequest) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ListWorkspaceTemplatesResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@@ -774,118 +798,122 @@ var file_workspace_template_proto_rawDesc = []byte{
|
||||
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,
|
||||
0x6d, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 0xc8,
|
||||
0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20,
|
||||
0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 0x22, 0x56, 0x0a, 0x24, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0xad, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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,
|
||||
0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69,
|
||||
0x64, 0x22, 0x85, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
|
||||
0x6f, 0x6e, 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, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x32, 0xce, 0x09, 0x0a, 0x18, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53,
|
||||
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdb, 0x01, 0x0a, 0x29, 0x47, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72,
|
||||
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x22, 0x45, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f,
|
||||
0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57,
|
||||
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, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
||||
0x6f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x10, 0x0a,
|
||||
0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x22,
|
||||
0xc8, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 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, 0x22, 0x56, 0x0a, 0x24, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 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, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75,
|
||||
0x69, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73,
|
||||
0x69, 0x6f, 0x6e, 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, 0x46, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x32, 0xce, 0x09, 0x0a, 0x18, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x48, 0x82,
|
||||
0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x73, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61,
|
||||
0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x1a, 0x33, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x11, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
|
||||
0x12, 0x9d, 0x01, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x24, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4,
|
||||
0x93, 0x02, 0x3d, 0x1a, 0x3b, 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, 0x77,
|
||||
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65,
|
||||
0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x61, 0x70,
|
||||
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xdb, 0x01, 0x0a, 0x29, 0x47, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x6e, 0x65,
|
||||
0x72, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x54, 0x65, 0x6d, 0x70, 0x6c,
|
||||
0x61, 0x74, 0x65, 0x22, 0x60, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5a, 0x22, 0x45, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d,
|
||||
0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xbc, 0x01, 0x0a, 0x1d,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 0x2f, 0x61,
|
||||
0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x6f,
|
||||
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x48,
|
||||
0x82, 0xd3, 0xe4, 0x93, 0x02, 0x42, 0x22, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x17, 0x55, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
|
||||
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x22, 0x4e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x48, 0x1a, 0x33, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74,
|
||||
0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x3a, 0x11,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
|
||||
0x65, 0x12, 0x9d, 0x01, 0x0a, 0x18, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72,
|
||||
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x24,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x57, 0x6f, 0x72, 0x6b,
|
||||
0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x43, 0x82, 0xd3,
|
||||
0xe4, 0x93, 0x02, 0x3d, 0x1a, 0x3b, 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,
|
||||
0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
|
||||
0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76,
|
||||
0x65, 0x12, 0x8d, 0x01, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70,
|
||||
0x6c, 0x61, 0x74, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
|
||||
0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69, 0x64,
|
||||
0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x7d, 0x12, 0x98, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
|
||||
0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
|
||||
0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
|
||||
0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0xbc, 0x01, 0x0a,
|
||||
0x1d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65,
|
||||
0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x54, 0x65, 0x6d,
|
||||
0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3e, 0x12, 0x3c, 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, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
|
||||
0x63, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x75, 0x69,
|
||||
0x64, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@@ -104,6 +104,9 @@ message ListWorkspaceTemplatesRequest {
|
||||
string namespace = 1;
|
||||
int32 pageSize = 2;
|
||||
int32 page = 3;
|
||||
string order = 4;
|
||||
string labels = 5;
|
||||
string uid = 6;
|
||||
}
|
||||
|
||||
message ListWorkspaceTemplatesResponse {
|
||||
|
@@ -155,6 +155,10 @@ func printMarkDown(issues []*issue, version *string) {
|
||||
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 })
|
||||
|
@@ -152,13 +152,14 @@ func Up20200626113635(tx *sql.Tx) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate2,
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate2,
|
||||
}
|
||||
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@@ -154,13 +154,13 @@ func Up20200704151301(tx *sql.Tx) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate3,
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate3,
|
||||
}
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
|
@@ -172,11 +172,6 @@ func Up20200724220450(tx *sql.Tx) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate4,
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
artifactRepositoryType := "s3"
|
||||
@@ -187,6 +182,12 @@ func Up20200724220450(tx *sql.Tx) error {
|
||||
if nsConfig.ArtifactRepository.GCS != nil {
|
||||
artifactRepositoryType = "gcs"
|
||||
}
|
||||
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate4,
|
||||
}
|
||||
workspaceTemplate.Manifest = strings.NewReplacer(
|
||||
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workspaceTemplate.Manifest)
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
|
@@ -3,7 +3,7 @@ package migration
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
|
@@ -144,7 +144,7 @@ templates:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
s3:
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-annotation-path}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
@@ -157,7 +157,7 @@ templates:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
s3:
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-output-path}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
@@ -348,12 +348,12 @@ templates:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
s3:
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-annotation-path}}'
|
||||
- name: models
|
||||
path: /mnt/data/models/
|
||||
optional: true
|
||||
s3:
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-finetune-checkpoint}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
@@ -371,7 +371,7 @@ templates:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
s3:
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.sys-output-path}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
@@ -411,7 +411,7 @@ volumeClaimTemplates:
|
||||
requests:
|
||||
storage: 200Gi`
|
||||
|
||||
const tensorflowObjectDetectionWorkflowTemplateName = "TensorFlow Object Detection Training"
|
||||
const tensorflowObjectDetectionWorkflowTemplateName = "TF Object Detection Training"
|
||||
|
||||
func initialize20200812104328() {
|
||||
if _, ok := initializedMigrations[20200812104328]; !ok {
|
||||
@@ -469,13 +469,16 @@ func Up20200812104328(tx *sql.Tx) error {
|
||||
log.Printf("Skipping creating template '%v'. It already exists in namespace '%v'", workflowTemplate.Name, namespace.Name)
|
||||
continue
|
||||
}
|
||||
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.CreateWorkflowTemplate(namespace.Name, workflowTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
// Update tf-od
|
||||
// Create tf-od
|
||||
workflowTemplate = &v1.WorkflowTemplate{
|
||||
Name: tensorflowObjectDetectionWorkflowTemplateName,
|
||||
Manifest: tensorflowObjectDetectionWorkflowTemplate,
|
||||
@@ -488,7 +491,11 @@ func Up20200812104328(tx *sql.Tx) error {
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
if _, err := client.CreateWorkflowTemplateVersion(namespace.Name, workflowTemplate); err != nil {
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.CreateWorkflowTemplate(namespace.Name, workflowTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
@@ -180,12 +180,6 @@ func Up20200812113316(tx *sql.Tx) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate5,
|
||||
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
artifactRepositoryType := "s3"
|
||||
@@ -196,6 +190,12 @@ func Up20200812113316(tx *sql.Tx) error {
|
||||
if nsConfig.ArtifactRepository.GCS != nil {
|
||||
artifactRepositoryType = "gcs"
|
||||
}
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate5,
|
||||
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
|
||||
}
|
||||
workspaceTemplate.Manifest = strings.NewReplacer(
|
||||
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workspaceTemplate.Manifest)
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
|
155
db/go/20200821162630_update_jupyter_workspace_template.go
Normal file
155
db/go/20200821162630_update_jupyter_workspace_template.go
Normal file
@@ -0,0 +1,155 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const jupyterWorkspaceTemplate2 = `# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab-tensorflow
|
||||
image: onepanel/jupyterlab:1.0.1
|
||||
command: ["/bin/bash", "-c", "start.sh jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * \'self\'\"}}' --notebook-dir='/data' --allow-root"]
|
||||
env:
|
||||
- name: tornado
|
||||
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'"
|
||||
args:
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
name: jupyterlab
|
||||
- containerPort: 6006
|
||||
name: tensorboard
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
ports:
|
||||
- name: jupyterlab
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
- name: tensorboard
|
||||
port: 6006
|
||||
protocol: TCP
|
||||
targetPort: 6006
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /tensorboard
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 6006
|
||||
- match:
|
||||
- uri:
|
||||
prefix: / #jupyter runs at the default route
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
`
|
||||
|
||||
func initialize20200821162630() {
|
||||
if _, ok := initializedMigrations[20200821162630]; !ok {
|
||||
goose.AddMigration(Up20200821162630, Down20200821162630)
|
||||
initializedMigrations[20200821162630] = true
|
||||
}
|
||||
}
|
||||
|
||||
//Up20200821162630 updates jupyterlab workspace with new features.
|
||||
// Tensorflow 2.3 compiled to support CUDA 10.2 and cudnn8
|
||||
// Pytorch with GPU support.
|
||||
// OpenCV compiled from source with CUDA support.
|
||||
// Miniconda, Jupyterlab 2.2+, and lots of neat extensions.
|
||||
func Up20200821162630(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200821162630]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: jupyterLabTemplateName,
|
||||
Manifest: jupyterWorkspaceTemplate2,
|
||||
}
|
||||
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200821162630 removes the JupyterLab template update
|
||||
func Down20200821162630(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: jupyterLabTemplateName,
|
||||
Manifest: jupyterWorkspaceTemplate,
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
251
db/go/20200824095513_update_mask_rcnn.go
Normal file
251
db/go/20200824095513_update_mask_rcnn.go
Normal file
@@ -0,0 +1,251 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const maskRCNNTemplate2 = `arguments:
|
||||
parameters:
|
||||
- name: source
|
||||
value: https://github.com/onepanelio/Mask_RCNN.git
|
||||
displayName: Model source code
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: cvat-annotation-path
|
||||
value: annotation-dump/sample_dataset
|
||||
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Dataset path
|
||||
visibility: private
|
||||
|
||||
- name: cvat-output-path
|
||||
value: workflow-data/output/sample_output
|
||||
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Workflow output path
|
||||
visibility: private
|
||||
|
||||
- name: cvat-finetune-checkpoint
|
||||
value: ''
|
||||
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
|
||||
displayName: Checkpoint path
|
||||
visibility: public
|
||||
|
||||
- name: cvat-num-classes
|
||||
displayName: Number of classes
|
||||
hint: Number of classes (i.e in CVAT taks) + 1 for background
|
||||
value: 81
|
||||
visibility: private
|
||||
|
||||
- name: hyperparameters
|
||||
displayName: Hyperparameters
|
||||
visibility: public
|
||||
type: textarea.textarea
|
||||
value: |-
|
||||
stage-1-epochs=1 # Epochs for network heads
|
||||
stage-2-epochs=2 # Epochs for finetune layers
|
||||
stage-3-epochs=3 # Epochs for all layers
|
||||
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
|
||||
|
||||
- name: dump-format
|
||||
value: cvat_coco
|
||||
displayName: CVAT dump format
|
||||
visibility: public
|
||||
|
||||
- name: tf-image
|
||||
visibility: public
|
||||
value: tensorflow/tensorflow:1.13.1-py3
|
||||
type: select.select
|
||||
displayName: Select TensorFlow image
|
||||
hint: Select the GPU image if you are running on a GPU node pool
|
||||
options:
|
||||
- name: 'TensorFlow 1.13.1 CPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-py3'
|
||||
- name: 'TensorFlow 1.13.1 GPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-gpu-py3'
|
||||
|
||||
- displayName: Node pool
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.select
|
||||
visibility: public
|
||||
name: sys-node-pool
|
||||
value: Standard_D4s_v3
|
||||
required: true
|
||||
options:
|
||||
- name: 'CPU: 2, RAM: 8GB'
|
||||
value: Standard_D2s_v3
|
||||
- name: 'CPU: 4, RAM: 16GB'
|
||||
value: Standard_D4s_v3
|
||||
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
|
||||
value: Standard_NC6
|
||||
|
||||
entrypoint: main
|
||||
templates:
|
||||
- dag:
|
||||
tasks:
|
||||
- name: train-model
|
||||
template: tensorflow
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
# - arguments:
|
||||
# artifacts:
|
||||
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
|
||||
# name: metrics
|
||||
# parameters:
|
||||
# - name: status
|
||||
# value: '{{tasks.train-model.status}}'
|
||||
# dependencies:
|
||||
# - train-model
|
||||
# name: notify-in-slack
|
||||
# template: slack-notify-success
|
||||
name: main
|
||||
- container:
|
||||
args:
|
||||
- |
|
||||
apt-get update \
|
||||
&& apt-get install -y git wget libglib2.0-0 libsm6 libxext6 libxrender-dev \
|
||||
&& pip install -r requirements.txt \
|
||||
&& pip install boto3 pyyaml google-cloud-storage \
|
||||
&& git clone https://github.com/waleedka/coco \
|
||||
&& cd coco/PythonAPI \
|
||||
&& python setup.py build_ext install \
|
||||
&& rm -rf build \
|
||||
&& cd ../../ \
|
||||
&& wget https://github.com/matterport/Mask_RCNN/releases/download/v2.0/mask_rcnn_coco.h5 \
|
||||
&& python setup.py install && ls \
|
||||
&& python samples/coco/cvat.py train --dataset=/mnt/data/datasets \
|
||||
--model=workflow_maskrcnn \
|
||||
--extras="{{workflow.parameters.hyperparameters}}" \
|
||||
--ref_model_path="{{workflow.parameters.cvat-finetune-checkpoint}}" \
|
||||
--num_classes="{{workflow.parameters.cvat-num-classes}}" \
|
||||
&& cd /mnt/src/ \
|
||||
&& python prepare_dataset.py /mnt/data/datasets/annotations/instances_default.json
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
image: '{{workflow.parameters.tf-image}}'
|
||||
volumeMounts:
|
||||
- mountPath: /mnt/data
|
||||
name: data
|
||||
- mountPath: /mnt/output
|
||||
name: output
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
revision: "no-boto"
|
||||
name: src
|
||||
path: /mnt/src
|
||||
name: tensorflow
|
||||
outputs:
|
||||
artifacts:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
# args:
|
||||
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
|
||||
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
|
||||
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
# image: technosophos/slack-notify
|
||||
# inputs:
|
||||
# artifacts:
|
||||
# - name: metrics
|
||||
# optional: true
|
||||
# path: /tmp/metrics.json
|
||||
# parameters:
|
||||
# - name: status
|
||||
# name: slack-notify-success
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: output
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi`
|
||||
|
||||
func initialize20200824095513() {
|
||||
if _, ok := initializedMigrations[20200824095513]; !ok {
|
||||
goose.AddMigration(Up20200824095513, Down20200824095513)
|
||||
initializedMigrations[20200824095513] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200824095513 updates the maskrcnn workflow template
|
||||
func Up20200824095513(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200824095513]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Update maskrcnn
|
||||
workflowTemplate := &v1.WorkflowTemplate{
|
||||
Name: maskRCNNWorkflowTemplateName,
|
||||
Manifest: maskRCNNTemplate2,
|
||||
Labels: map[string]string{
|
||||
"used-by": "cvat",
|
||||
},
|
||||
}
|
||||
if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.CreateWorkflowTemplateVersion(namespace.Name, workflowTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200824095513 does nothing
|
||||
func Down20200824095513(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
return nil
|
||||
}
|
281
db/go/20200824101019_update_tf_object_detection_training.go
Normal file
281
db/go/20200824101019_update_tf_object_detection_training.go
Normal file
@@ -0,0 +1,281 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const tensorflowObjectDetectionTraining2 = `arguments:
|
||||
parameters:
|
||||
- name: source
|
||||
value: https://github.com/tensorflow/models.git
|
||||
displayName: Model source code
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: trainingsource
|
||||
value: https://github.com/onepanelio/cvat-training.git
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: revision
|
||||
value: v1.13.0
|
||||
type: hidden
|
||||
visibility: private
|
||||
|
||||
- name: cvat-annotation-path
|
||||
value: annotation-dump/sample_dataset
|
||||
displayName: Dataset path
|
||||
hint: Path to annotated data in default object storage (i.e S3). In CVAT, this parameter will be pre-populated.
|
||||
visibility: private
|
||||
|
||||
- name: cvat-output-path
|
||||
value: workflow-data/output/sample_output
|
||||
hint: Path to store output artifacts in default object storage (i.e s3). In CVAT, this parameter will be pre-populated.
|
||||
displayName: Workflow output path
|
||||
visibility: private
|
||||
|
||||
- name: cvat-model
|
||||
value: frcnn-res50-coco
|
||||
displayName: Model
|
||||
hint: TF Detection API's model to use for training.
|
||||
type: select.select
|
||||
visibility: public
|
||||
options:
|
||||
- name: 'Faster RCNN-ResNet 101-COCO'
|
||||
value: frcnn-res101-coco
|
||||
- name: 'Faster RCNN-ResNet 101-Low Proposal-COCO'
|
||||
value: frcnn-res101-low
|
||||
- name: 'Faster RCNN-ResNet 50-COCO'
|
||||
value: frcnn-res50-coco
|
||||
- name: 'Faster RCNN-NAS-COCO'
|
||||
value: frcnn-nas-coco
|
||||
- name: 'SSD MobileNet V1-COCO'
|
||||
value: ssd-mobilenet-v1-coco2
|
||||
- name: 'SSD MobileNet V2-COCO'
|
||||
value: ssd-mobilenet-v2-coco
|
||||
- name: 'SSDLite MobileNet-COCO'
|
||||
value: ssdlite-mobilenet-coco
|
||||
|
||||
- name: hyperparameters
|
||||
value: |-
|
||||
num-steps=10000
|
||||
displayName: Hyperparameters
|
||||
visibility: public
|
||||
type: textarea.textarea
|
||||
hint: "Please refer to our <a href='https://docs.onepanel.ai/docs/getting-started/use-cases/computervision/annotation/cvat/cvat_annotation_model#arguments-optional' target='_blank'>documentation</a> for more information on parameters. Number of classes will be automatically populated if you had 'sys-num-classes' parameter in a workflow."
|
||||
|
||||
- name: cvat-finetune-checkpoint
|
||||
value: ''
|
||||
hint: Select the last fine-tune checkpoint for this model. It may take up to 5 minutes for a recent checkpoint show here. Leave empty if this is the first time you're training this model.
|
||||
displayName: Checkpoint path
|
||||
visibility: public
|
||||
|
||||
- name: cvat-num-classes
|
||||
value: 81
|
||||
hint: Number of classes
|
||||
displayName: Number of classes
|
||||
visibility: private
|
||||
|
||||
- name: tf-image
|
||||
value: tensorflow/tensorflow:1.13.1-py3
|
||||
type: select.select
|
||||
displayName: Select TensorFlow image
|
||||
visibility: public
|
||||
hint: Select the GPU image if you are running on a GPU node pool
|
||||
options:
|
||||
- name: 'TensorFlow 1.13.1 CPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-py3'
|
||||
- name: 'TensorFlow 1.13.1 GPU Image'
|
||||
value: 'tensorflow/tensorflow:1.13.1-gpu-py3'
|
||||
|
||||
- displayName: Node pool
|
||||
hint: Name of node pool or group to run this workflow task
|
||||
type: select.select
|
||||
name: sys-node-pool
|
||||
value: Standard_D4s_v3
|
||||
visibility: public
|
||||
required: true
|
||||
options:
|
||||
- name: 'CPU: 2, RAM: 8GB'
|
||||
value: Standard_D2s_v3
|
||||
- name: 'CPU: 4, RAM: 16GB'
|
||||
value: Standard_D4s_v3
|
||||
- name: 'GPU: 1xK80, CPU: 6, RAM: 56GB'
|
||||
value: Standard_NC6
|
||||
- name: dump-format
|
||||
value: cvat_tfrecord
|
||||
visibility: public
|
||||
entrypoint: main
|
||||
templates:
|
||||
- dag:
|
||||
tasks:
|
||||
- name: train-model
|
||||
template: tensorflow
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
# - arguments:
|
||||
# artifacts:
|
||||
# - from: '{{tasks.train-model.outputs.artifacts.sys-metrics}}'
|
||||
# name: metrics
|
||||
# parameters:
|
||||
# - name: status
|
||||
# value: '{{tasks.train-model.status}}'
|
||||
# dependencies:
|
||||
# - train-model
|
||||
# name: notify-in-slack
|
||||
# template: slack-notify-success
|
||||
name: main
|
||||
- container:
|
||||
args:
|
||||
- |
|
||||
apt-get update && \
|
||||
apt-get install -y python3-pip git wget unzip libglib2.0-0 libsm6 libxext6 libxrender-dev && \
|
||||
pip install pillow lxml Cython contextlib2 jupyter matplotlib numpy scipy boto3 pycocotools pyyaml google-cloud-storage && \
|
||||
cd /mnt/src/tf/research && \
|
||||
export PYTHONPATH=$PYTHONPATH:` + "`pwd`:`pwd`" + `/slim && \
|
||||
cd /mnt/src/train && \
|
||||
python convert_workflow.py \
|
||||
--extras="{{workflow.parameters.hyperparameters}}" \
|
||||
--model="{{workflow.parameters.cvat-model}}" \
|
||||
--num_classes="{{workflow.parameters.cvat-num-classes}}" \
|
||||
--sys_finetune_checkpoint={{workflow.parameters.cvat-finetune-checkpoint}}
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
image: '{{workflow.parameters.tf-image}}'
|
||||
volumeMounts:
|
||||
- mountPath: /mnt/data
|
||||
name: data
|
||||
- mountPath: /mnt/output
|
||||
name: output
|
||||
workingDir: /mnt/src
|
||||
nodeSelector:
|
||||
beta.kubernetes.io/instance-type: '{{workflow.parameters.sys-node-pool}}'
|
||||
inputs:
|
||||
artifacts:
|
||||
- name: data
|
||||
path: /mnt/data/datasets/
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-annotation-path}}'
|
||||
- name: models
|
||||
path: /mnt/data/models/
|
||||
optional: true
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-finetune-checkpoint}}'
|
||||
- git:
|
||||
repo: '{{workflow.parameters.source}}'
|
||||
revision: '{{workflow.parameters.revision}}'
|
||||
name: src
|
||||
path: /mnt/src/tf
|
||||
- git:
|
||||
repo: '{{workflow.parameters.trainingsource}}'
|
||||
revision: 'optional-artifacts'
|
||||
name: tsrc
|
||||
path: /mnt/src/train
|
||||
name: tensorflow
|
||||
outputs:
|
||||
artifacts:
|
||||
- name: model
|
||||
optional: true
|
||||
path: /mnt/output
|
||||
{{.ArtifactRepositoryType}}:
|
||||
key: '{{workflow.namespace}}/{{workflow.parameters.cvat-output-path}}/{{workflow.name}}'
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#- container:
|
||||
# args:
|
||||
# - SLACK_USERNAME=Onepanel SLACK_TITLE="{{workflow.name}} {{inputs.parameters.status}}"
|
||||
# SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd
|
||||
# SLACK_MESSAGE=$(cat /tmp/metrics.json)} ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
# image: technosophos/slack-notify
|
||||
# inputs:
|
||||
# artifacts:
|
||||
# - name: metrics
|
||||
# optional: true
|
||||
# path: /tmp/metrics.json
|
||||
# parameters:
|
||||
# - name: status
|
||||
# name: slack-notify-success
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: data
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi
|
||||
- metadata:
|
||||
creationTimestamp: null
|
||||
name: output
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Gi`
|
||||
|
||||
func initialize20200824101019() {
|
||||
if _, ok := initializedMigrations[20200824101019]; !ok {
|
||||
goose.AddMigration(Up20200824101019, Down20200824101019)
|
||||
initializedMigrations[20200824101019] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200824101019 updates the tf object detection training workflow template
|
||||
func Up20200824101019(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200824101019]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Update tfObjectDetectionTraining
|
||||
workflowTemplate := &v1.WorkflowTemplate{
|
||||
Name: tensorflowObjectDetectionWorkflowTemplateName,
|
||||
Manifest: tensorflowObjectDetectionTraining2,
|
||||
Labels: map[string]string{
|
||||
"used-by": "cvat",
|
||||
},
|
||||
}
|
||||
if err := workflowTemplate.GenerateUID(workflowTemplate.Name); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, workflowTemplate, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.CreateWorkflowTemplateVersion(namespace.Name, workflowTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200824101019 does nothing
|
||||
func Down20200824101019(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
return nil
|
||||
}
|
206
db/go/20200824101905_update_cvat_template.go
Normal file
206
db/go/20200824101905_update_cvat_template.go
Normal file
@@ -0,0 +1,206 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const cvatWorkspaceTemplate6 = `# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.0-rc.6_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.0-rc.1_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c`
|
||||
|
||||
func initialize20200824101905() {
|
||||
if _, ok := initializedMigrations[20200824101905]; !ok {
|
||||
goose.AddMigration(Up20200824101905, Down20200824101905)
|
||||
initializedMigrations[20200824101905] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200824101905 updates the cvat workspace template
|
||||
func Up20200824101905(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200824101905]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate6,
|
||||
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
|
||||
}
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200824101905 does nothing
|
||||
func Down20200824101905(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
return nil
|
||||
}
|
206
db/go/20200825154403_update_cvat_version.go
Normal file
206
db/go/20200825154403_update_cvat_version.go
Normal file
@@ -0,0 +1,206 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const cvatWorkspaceTemplate7 = `# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.0_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.0_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c`
|
||||
|
||||
func initialize20200825154403() {
|
||||
if _, ok := initializedMigrations[20200825154403]; !ok {
|
||||
goose.AddMigration(Up20200825154403, Down20200825154403)
|
||||
initializedMigrations[20200825154403] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200825154403 runs the migration to upgrade the cvat workspace template
|
||||
func Up20200825154403(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200825154403]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate7,
|
||||
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
|
||||
}
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200825154403 does nothing
|
||||
func Down20200825154403(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
return nil
|
||||
}
|
218
db/go/20200826185926_upgrade_cvat.go
Normal file
218
db/go/20200826185926_upgrade_cvat.go
Normal file
@@ -0,0 +1,218 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const cvatWorkspaceTemplate8 = `# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.0_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.0_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
- -server-prefix=/sys/filesyncer
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: fs
|
||||
port: 8888
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /sys/filesyncer
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8888
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
timeout: 600s
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
timeout: 600s
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c`
|
||||
|
||||
func initialize20200826185926() {
|
||||
if _, ok := initializedMigrations[20200826185926]; !ok {
|
||||
goose.AddMigration(Up20200826185926, Down20200826185926)
|
||||
initializedMigrations[20200826185926] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200826185926 runs the migration to upgrade the cvat workspace template
|
||||
func Up20200826185926(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200826185926]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate8,
|
||||
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
|
||||
}
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200826185926 does nothing
|
||||
func Down20200826185926(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
return nil
|
||||
}
|
68
db/go/20200922103448_add_jupyter_lab_description.go
Normal file
68
db/go/20200922103448_add_jupyter_lab_description.go
Normal file
@@ -0,0 +1,68 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
func initialize20200922103448() {
|
||||
if _, ok := initializedMigrations[20200922103448]; !ok {
|
||||
goose.AddMigration(Up20200922103448, Down20200922103448)
|
||||
initializedMigrations[20200922103448] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200922103448 adds a description to the jupyterlab workspace template
|
||||
func Up20200922103448(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200922103448]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate, err := client.GetWorkspaceTemplate(namespace.Name, uid, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if workspaceTemplate == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
// Adding description
|
||||
workspaceTemplate.Description = "Interactive development environment for notebooks"
|
||||
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200922103448 does nothing
|
||||
func Down20200922103448(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
return nil
|
||||
}
|
123
db/go/20200929144301_add_vscode_workspace_template.go
Normal file
123
db/go/20200929144301_add_vscode_workspace_template.go
Normal file
@@ -0,0 +1,123 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const vscodeWorkspaceTemplate = `
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: vscode
|
||||
image: onepanel/vscode:1.0.0
|
||||
command: ["/bin/bash", "-c", "pip install onepanel-sdk && /usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 --auth none ."]
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: vscode
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
ports:
|
||||
- name: vscode
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: / #vscode runs at the default route
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
`
|
||||
|
||||
const vscodeWorkspaceTemplateName = "Visual Studio Code"
|
||||
|
||||
func initialize20200929144301() {
|
||||
if _, ok := initializedMigrations[20200929144301]; !ok {
|
||||
goose.AddMigration(Up20200929144301, Down20200929144301)
|
||||
initializedMigrations[20200929144301] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200929144301 adds Visual Studio Code as a workspace template.
|
||||
func Up20200929144301(tx *sql.Tx) error {
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200929144301]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
Name: vscodeWorkspaceTemplateName,
|
||||
Manifest: vscodeWorkspaceTemplate,
|
||||
}
|
||||
|
||||
// Adding description
|
||||
workspaceTemplate.Description = "Open source code editor"
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
if _, err := client.CreateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200929144301 removes Visual Studio Code from workspace templates.
|
||||
func Down20200929144301(tx *sql.Tx) error {
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
uid, err := uid2.GenerateUID(vscodeWorkspaceTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, namespace := range namespaces {
|
||||
if _, err := client.ArchiveWorkspaceTemplate(namespace.Name, uid); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
148
db/go/20200929153931_update_jupyter_lab_workspace_command.go
Normal file
148
db/go/20200929153931_update_jupyter_lab_workspace_command.go
Normal file
@@ -0,0 +1,148 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const jupyterWorkspaceTemplate3 = `
|
||||
# Docker containers that are part of the Workspace
|
||||
containers:
|
||||
- name: jupyterlab-tensorflow
|
||||
image: onepanel/jupyterlab:1.0.1
|
||||
command: ["/bin/bash", "-c", "pip install onepanel-sdk && start.sh jupyter lab --LabApp.token='' --LabApp.allow_remote_access=True --LabApp.allow_origin=\"*\" --LabApp.disable_check_xsrf=True --LabApp.trust_xheaders=True --LabApp.base_url=/ --LabApp.tornado_settings='{\"headers\":{\"Content-Security-Policy\":\"frame-ancestors * \'self\'\"}}' --notebook-dir='/data' --allow-root"]
|
||||
env:
|
||||
- name: tornado
|
||||
value: "'{'headers':{'Content-Security-Policy':\"frame-ancestors\ *\ \'self'\"}}'"
|
||||
args:
|
||||
ports:
|
||||
- containerPort: 8888
|
||||
name: jupyterlab
|
||||
- containerPort: 6006
|
||||
name: tensorboard
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
ports:
|
||||
- name: jupyterlab
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
- name: tensorboard
|
||||
port: 6006
|
||||
protocol: TCP
|
||||
targetPort: 6006
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /tensorboard
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 6006
|
||||
- match:
|
||||
- uri:
|
||||
prefix: / #jupyter runs at the default route
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c
|
||||
`
|
||||
|
||||
func initialize20200929153931() {
|
||||
if _, ok := initializedMigrations[20200929153931]; !ok {
|
||||
goose.AddMigration(Up20200929153931, Down20200929153931)
|
||||
initializedMigrations[20200929153931] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20200929153931 updates jupyterlab workspace to include the onepanel-sdk
|
||||
func Up20200929153931(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200929153931]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, namespace := range namespaces {
|
||||
if _, err := client.UpdateWorkspaceTemplateManifest(namespace.Name, uid, jupyterWorkspaceTemplate3); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20200929153931 removes the onepanel-sdk addition.
|
||||
func Down20200929153931(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20200929153931]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(jupyterLabTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
if _, err := client.UpdateWorkspaceTemplateManifest(namespace.Name, uid, jupyterWorkspaceTemplate2); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
216
db/go/20201001070806_update_cvat.go
Normal file
216
db/go/20201001070806_update_cvat.go
Normal file
@@ -0,0 +1,216 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/pressly/goose"
|
||||
)
|
||||
|
||||
const cvatWorkspaceTemplate9 = `# Workspace arguments
|
||||
arguments:
|
||||
parameters:
|
||||
- name: sync-directory
|
||||
displayName: Directory to sync raw input and training output
|
||||
value: workflow-data
|
||||
hint: Location to sync raw input, models and checkpoints from default object storage. Note that this will be relative to the current namespace.
|
||||
containers:
|
||||
- name: cvat-db
|
||||
image: postgres:10-alpine
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
value: root
|
||||
- name: POSTGRES_DB
|
||||
value: cvat
|
||||
- name: POSTGRES_HOST_AUTH_METHOD
|
||||
value: trust
|
||||
- name: PGDATA
|
||||
value: /var/lib/psql/data
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
name: tcp
|
||||
volumeMounts:
|
||||
- name: db
|
||||
mountPath: /var/lib/psql
|
||||
- name: cvat-redis
|
||||
image: redis:4.0-alpine
|
||||
ports:
|
||||
- containerPort: 6379
|
||||
name: tcp
|
||||
- name: cvat
|
||||
image: onepanel/cvat:0.12.1_cvat.1.0.0
|
||||
env:
|
||||
- name: DJANGO_MODWSGI_EXTRA_ARGS
|
||||
value: ""
|
||||
- name: ALLOWED_HOSTS
|
||||
value: '*'
|
||||
- name: CVAT_REDIS_HOST
|
||||
value: localhost
|
||||
- name: CVAT_POSTGRES_HOST
|
||||
value: localhost
|
||||
- name: CVAT_SHARE_URL
|
||||
value: /home/django/data
|
||||
- name: ONEPANEL_SYNC_DIRECTORY
|
||||
value: '{{workspace.parameters.sync-directory}}'
|
||||
- name: NVIDIA_VISIBLE_DEVICES
|
||||
value: all
|
||||
- name: NVIDIA_DRIVER_CAPABILITIES
|
||||
value: compute,utility
|
||||
- name: NVIDIA_REQUIRE_CUDA
|
||||
value: "cuda>=10.0 brand=tesla,driver>=384,driver<385 brand=tesla,driver>=410,driver<411"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /home/django/data
|
||||
- name: keys
|
||||
mountPath: /home/django/keys
|
||||
- name: logs
|
||||
mountPath: /home/django/logs
|
||||
- name: models
|
||||
mountPath: /home/django/models
|
||||
- name: share
|
||||
mountPath: /home/django/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
- name: cvat-ui
|
||||
image: onepanel/cvat-ui:0.12.1_cvat.1.0.0
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
# You can add multiple FileSyncer sidecar containers if needed
|
||||
- name: filesyncer
|
||||
image: onepanel/filesyncer:{{.ArtifactRepositoryType}}
|
||||
imagePullPolicy: Always
|
||||
args:
|
||||
- download
|
||||
- -server-prefix=/sys/filesyncer
|
||||
env:
|
||||
- name: FS_PATH
|
||||
value: /mnt/share
|
||||
- name: FS_PREFIX
|
||||
value: '{{workflow.namespace}}/{{workspace.parameters.sync-directory}}'
|
||||
volumeMounts:
|
||||
- name: share
|
||||
mountPath: /mnt/share
|
||||
- name: sys-namespace-config
|
||||
mountPath: /etc/onepanel
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: cvat-ui
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: cvat
|
||||
port: 8080
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
- name: fs
|
||||
port: 8888
|
||||
protocol: TCP
|
||||
targetPort: 8888
|
||||
routes:
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /sys/filesyncer
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8888
|
||||
- match:
|
||||
- uri:
|
||||
regex: /api/.*|/git/.*|/tensorflow/.*|/onepanelio/.*|/tracking/.*|/auto_annotation/.*|/analytics/.*|/static/.*|/admin/.*|/documentation/.*|/dextr/.*|/reid/.*
|
||||
- queryParams:
|
||||
id:
|
||||
regex: \d+.*
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 8080
|
||||
- match:
|
||||
- uri:
|
||||
prefix: /
|
||||
route:
|
||||
- destination:
|
||||
port:
|
||||
number: 80
|
||||
# DAG Workflow to be executed once a Workspace action completes (optional)
|
||||
# Uncomment the lines below if you want to send Slack notifications
|
||||
#postExecutionWorkflow:
|
||||
# entrypoint: main
|
||||
# templates:
|
||||
# - name: main
|
||||
# dag:
|
||||
# tasks:
|
||||
# - name: slack-notify
|
||||
# template: slack-notify
|
||||
# - name: slack-notify
|
||||
# container:
|
||||
# image: technosophos/slack-notify
|
||||
# args:
|
||||
# - SLACK_USERNAME=onepanel SLACK_TITLE="Your workspace is ready" SLACK_ICON=https://www.gravatar.com/avatar/5c4478592fe00878f62f0027be59c1bd SLACK_MESSAGE="Your workspace is now running" ./slack-notify
|
||||
# command:
|
||||
# - sh
|
||||
# - -c`
|
||||
|
||||
func initialize20201001070806() {
|
||||
if _, ok := initializedMigrations[20201001070806]; !ok {
|
||||
goose.AddMigration(Up20201001070806, Down20201001070806)
|
||||
initializedMigrations[20201001070806] = true
|
||||
}
|
||||
}
|
||||
|
||||
// Up20201001070806 updates the cvat workspace
|
||||
func Up20201001070806(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is applied.
|
||||
client, err := getClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer client.DB.Close()
|
||||
|
||||
migrationsRan, err := getRanSQLMigrations(client)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if _, ok := migrationsRan[20201001070806]; ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
namespaces, err := client.ListOnepanelEnabledNamespaces()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
uid, err := uid2.GenerateUID(cvatTemplateName, 30)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, namespace := range namespaces {
|
||||
workspaceTemplate := &v1.WorkspaceTemplate{
|
||||
UID: uid,
|
||||
Name: cvatTemplateName,
|
||||
Manifest: cvatWorkspaceTemplate9,
|
||||
Description: "Powerful and efficient Computer Vision Annotation Tool (CVAT)",
|
||||
}
|
||||
err = ReplaceArtifactRepositoryType(client, namespace, nil, workspaceTemplate)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err := client.UpdateWorkspaceTemplate(namespace.Name, workspaceTemplate); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Down20201001070806 does nothing
|
||||
func Down20201001070806(tx *sql.Tx) error {
|
||||
// This code is executed when the migration is rolled back.
|
||||
return nil
|
||||
}
|
38
db/go/db.go
38
db/go/db.go
@@ -1,10 +1,12 @@
|
||||
package migration
|
||||
|
||||
import (
|
||||
"errors"
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
"github.com/jmoiron/sqlx"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// initializedMigrations is used to keep track of which migrations have been initialized.
|
||||
@@ -48,6 +50,16 @@ func Initialize() {
|
||||
initialize20200812104328()
|
||||
initialize20200812113316()
|
||||
initialize20200814160856()
|
||||
initialize20200821162630()
|
||||
initialize20200824095513()
|
||||
initialize20200824101019()
|
||||
initialize20200824101905()
|
||||
initialize20200825154403()
|
||||
initialize20200826185926()
|
||||
initialize20200922103448()
|
||||
initialize20200929144301()
|
||||
initialize20200929153931()
|
||||
initialize20201001070806()
|
||||
|
||||
if err := client.DB.Close(); err != nil {
|
||||
log.Printf("[error] closing db %v", err)
|
||||
@@ -90,3 +102,29 @@ func getRanSQLMigrations(client *v1.Client) (map[uint64]bool, error) {
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// ReplaceArtifactRepositoryType will look for {{.ArtifactRepositoryType}} in the migration and replace it based on config.
|
||||
func ReplaceArtifactRepositoryType(client *v1.Client, namespace *v1.Namespace, workflowTemplate *v1.WorkflowTemplate, workspaceTemplate *v1.WorkspaceTemplate) error {
|
||||
artifactRepositoryType := "s3"
|
||||
nsConfig, err := client.GetNamespaceConfig(namespace.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if nsConfig.ArtifactRepository.GCS != nil {
|
||||
artifactRepositoryType = "gcs"
|
||||
}
|
||||
|
||||
if workflowTemplate != nil {
|
||||
workflowTemplate.Manifest = strings.NewReplacer(
|
||||
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workflowTemplate.Manifest)
|
||||
}
|
||||
if workspaceTemplate != nil {
|
||||
workspaceTemplate.Manifest = strings.NewReplacer(
|
||||
"{{.ArtifactRepositoryType}}", artifactRepositoryType).Replace(workspaceTemplate.Manifest)
|
||||
}
|
||||
if workflowTemplate == nil && workspaceTemplate == nil {
|
||||
return errors.New("workflow and workspace template cannot be nil")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
1
go.mod
1
go.mod
@@ -43,4 +43,5 @@ require (
|
||||
k8s.io/apimachinery v0.16.7-beta.0
|
||||
k8s.io/client-go v0.16.4
|
||||
sigs.k8s.io/yaml v1.2.0
|
||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible
|
||||
)
|
||||
|
BIN
img/auto-annotation.gif
Normal file
BIN
img/auto-annotation.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 MiB |
BIN
img/jupyterlab.gif
Normal file
BIN
img/jupyterlab.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.0 MiB |
BIN
img/logo.png
Normal file
BIN
img/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
BIN
img/pipelines.gif
Normal file
BIN
img/pipelines.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 657 KiB |
BIN
img/tools.gif
Normal file
BIN
img/tools.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 620 KiB |
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
argoprojv1alpha1 "github.com/argoproj/argo/pkg/client/clientset/versioned/typed/workflow/v1alpha1"
|
||||
"github.com/jmoiron/sqlx"
|
||||
"github.com/onepanelio/core/pkg/util/gcs"
|
||||
"github.com/onepanelio/core/pkg/util/router"
|
||||
"github.com/onepanelio/core/pkg/util/s3"
|
||||
@@ -38,6 +39,24 @@ func NewConfig() (config *Config) {
|
||||
return
|
||||
}
|
||||
|
||||
// GetDefaultClient loads a default k8s client
|
||||
func GetDefaultClient() (*Client, error) {
|
||||
kubeConfig := NewConfig()
|
||||
client, err := NewClient(kubeConfig, nil, nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
config, err := client.GetSystemConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
dbDriverName, dbDataSourceName := config.DatabaseConnection()
|
||||
client.DB = NewDB(sqlx.MustConnect(dbDriverName, dbDataSourceName))
|
||||
|
||||
return client, nil
|
||||
}
|
||||
|
||||
// NewClient creates a client to interact with the Onepanel system.
|
||||
// It includes access to the database, kubernetes, argo, and configuration.
|
||||
func NewClient(config *Config, db *DB, systemConfig SystemConfig) (client *Client, err error) {
|
||||
|
@@ -100,7 +100,6 @@ func DefaultTestClient() *Client {
|
||||
func clearDatabase(t *testing.T) {
|
||||
// We do not delete from goose_db_version as we need it to mark the migrations as ran.
|
||||
query := `
|
||||
DELETE FROM labels;
|
||||
DELETE FROM workspaces;
|
||||
DELETE FROM workflow_executions;
|
||||
DELETE FROM cron_workflows;
|
||||
|
@@ -48,8 +48,8 @@ func TestParseParametersFromManifest(t *testing.T) {
|
||||
// Make sure visibility is set
|
||||
assert.Equal(t, *keyedParameters["dataset-path"].Visibility, "public")
|
||||
|
||||
// Make sure visibility is not set if omitted
|
||||
assert.Nil(t, keyedParameters["tf-image"].Visibility)
|
||||
// Make sure visibility is public if omitted
|
||||
assert.Equal(t, *keyedParameters["tf-image"].Visibility, "public")
|
||||
|
||||
// Make sure numbers, slashes, dashes, and letters are parsed correctly
|
||||
assert.Equal(t, *keyedParameters["tf-image"].Value, "tensorflow/tensorflow:1.13.1-py3")
|
||||
|
@@ -38,6 +38,12 @@ func NewSystemConfig(configMap *ConfigMap, secret *Secret) (config SystemConfig,
|
||||
}
|
||||
config["databasePassword"] = string(databasePassword)
|
||||
|
||||
hmac, err := base64.StdEncoding.DecodeString(secret.Data["hmac"])
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
config["hmac"] = string(hmac)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -183,6 +189,16 @@ func (s SystemConfig) UpdateNodePoolOptions(parameters []Parameter) ([]Parameter
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// HMACKey gets the HMAC value, or nil.
|
||||
func (s SystemConfig) HMACKey() []byte {
|
||||
hmac := s.GetValue("hmac")
|
||||
if hmac == nil {
|
||||
return []byte{}
|
||||
}
|
||||
|
||||
return []byte(*hmac)
|
||||
}
|
||||
|
||||
// ArtifactRepositoryS3Provider is meant to be used
|
||||
// by the CLI. CLI will marshal this struct into the correct
|
||||
// YAML structure for k8s configmap / secret.
|
||||
|
@@ -7,7 +7,7 @@ import (
|
||||
argojson "github.com/argoproj/pkg/json"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/pkg/util/label"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
@@ -433,7 +433,6 @@ func (c *Client) createCronWorkflow(namespace string, workflowTemplateId *uint64
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
createdCronWorkflow, err = c.ArgoprojV1alpha1().CronWorkflows(namespace).Create(cwf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
@@ -3,8 +3,8 @@ package v1
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/onepanelio/core/pkg/util/mapping"
|
||||
"github.com/onepanelio/core/pkg/util/sql"
|
||||
"github.com/onepanelio/core/pkg/util/types"
|
||||
"github.com/onepanelio/core/util/sql"
|
||||
"gopkg.in/yaml.v2"
|
||||
"time"
|
||||
)
|
||||
|
28
pkg/filter.go
Normal file
28
pkg/filter.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package v1
|
||||
|
||||
import sq "github.com/Masterminds/squirrel"
|
||||
|
||||
// LabelFilter represents a filter that has labels
|
||||
type LabelFilter interface {
|
||||
// GetLabels returns the labels to filter by. These are assumed to be ANDed together.
|
||||
GetLabels() []*Label
|
||||
}
|
||||
|
||||
// ApplyLabelSelectQuery returns a query builder that adds where statements to filter by labels in the filter, if there are any
|
||||
// labelSelector is the database column that has the labels, such as "we.labels" for workflowExecutions aliased by "we".
|
||||
func ApplyLabelSelectQuery(labelSelector string, sb sq.SelectBuilder, filter LabelFilter) (sq.SelectBuilder, error) {
|
||||
labels := filter.GetLabels()
|
||||
|
||||
if len(labels) == 0 {
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
labelsJSON, err := LabelsToJSONString(labels)
|
||||
if err != nil {
|
||||
return sb, err
|
||||
}
|
||||
|
||||
sb = sb.Where("%v @> ?", labelSelector, labelsJSON)
|
||||
|
||||
return sb, nil
|
||||
}
|
21
pkg/types.go
21
pkg/types.go
@@ -67,13 +67,32 @@ type Metric struct {
|
||||
type WorkflowExecutionStatisticReport struct {
|
||||
WorkflowTemplateId uint64 `db:"workflow_template_id"`
|
||||
Total int32
|
||||
LastExecuted time.Time `db:"last_executed"`
|
||||
LastExecuted *time.Time `db:"last_executed"`
|
||||
Running int32
|
||||
Completed int32
|
||||
Failed int32
|
||||
Terminated int32
|
||||
}
|
||||
|
||||
// WorkspaceStatisticReport contains stats on the phases the workspaces in the system are in
|
||||
type WorkspaceStatisticReport struct {
|
||||
LastCreated *time.Time `db:"last_created"`
|
||||
Launching int32
|
||||
Running int32
|
||||
Updating int32
|
||||
Pausing int32
|
||||
Paused int32
|
||||
Terminating int32
|
||||
Terminated int32
|
||||
FailedToPause int32 `db:"failed_to_pause" json:"failedToPause"`
|
||||
FailedToResume int32 `db:"failed_to_resume" json:"failedToResume"`
|
||||
FailedToTerminate int32 `db:"failed_to_terminate" json:"failedToTerminate"`
|
||||
FailedToLaunch int32 `db:"failed_to_launch" json:"failedToLaunch"`
|
||||
FailedToUpdate int32 `db:"failed_to_update" json:"failedToUpdate"`
|
||||
Failed int32
|
||||
Total int32
|
||||
}
|
||||
|
||||
type CronWorkflowStatisticReport struct {
|
||||
WorkflowTemplateId uint64 `db:"workflow_template_id"`
|
||||
Total int32
|
||||
|
@@ -10,6 +10,14 @@ type PaginationRequest struct {
|
||||
PageSize uint64
|
||||
}
|
||||
|
||||
// New creates a new pagination request from the page and page size.
|
||||
func New(page, pageSize int32) *PaginationRequest {
|
||||
pr := NewRequest(page, pageSize)
|
||||
|
||||
return &pr
|
||||
}
|
||||
|
||||
// NewRequest creates a new pagination request (not pointer) from the page and page size
|
||||
func NewRequest(page, pageSize int32) PaginationRequest {
|
||||
if page == 0 {
|
||||
page = 1
|
36
pkg/util/request/request.go
Normal file
36
pkg/util/request/request.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package request
|
||||
|
||||
import (
|
||||
"github.com/Masterminds/squirrel"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/request/sort"
|
||||
)
|
||||
|
||||
// Request creates a new resource request with criteria to pagination, filter, and sort the results.
|
||||
type Request struct {
|
||||
Pagination *pagination.PaginationRequest
|
||||
Filter interface{}
|
||||
Sort *sort.Criteria
|
||||
}
|
||||
|
||||
// HasSorting returns true if there are any sorting criteria in the request
|
||||
func (r *Request) HasSorting() bool {
|
||||
return r != nil &&
|
||||
r.Sort != nil &&
|
||||
len(r.Sort.Properties) > 0
|
||||
}
|
||||
|
||||
// HasFilter returns true if there is any filtering criteria in the request
|
||||
func (r *Request) HasFilter() bool {
|
||||
return r != nil &&
|
||||
r.Filter != nil
|
||||
}
|
||||
|
||||
// ApplyPaginationToSelect applies the pagination to the selectBuilder, if there is a pagination.
|
||||
func (r *Request) ApplyPaginationToSelect(sb *squirrel.SelectBuilder) *squirrel.SelectBuilder {
|
||||
if r == nil || r.Pagination == nil {
|
||||
return sb
|
||||
}
|
||||
|
||||
return r.Pagination.ApplyToSelect(sb)
|
||||
}
|
65
pkg/util/request/sort/sort.go
Normal file
65
pkg/util/request/sort/sort.go
Normal file
@@ -0,0 +1,65 @@
|
||||
package sort
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Order represents a sorting order such as created_at, desc
|
||||
type Order struct {
|
||||
Property string
|
||||
Direction string
|
||||
}
|
||||
|
||||
// Criteria represents the sorting criteria for a list of resources
|
||||
type Criteria struct {
|
||||
Properties []Order
|
||||
}
|
||||
|
||||
// New parses the properties, represented as comma delimited fields, into a Criteria struct
|
||||
// The first part is the properties, the second part is the delimiter used between properties. If none is provided,
|
||||
// a semi-colon (;) is used.
|
||||
// Each property is assumed to be of the form: propertyName,desc;propertyName2;asc
|
||||
// example: createdAt,desc;name,asc
|
||||
func New(parts ...string) (*Criteria, error) {
|
||||
if len(parts) == 0 {
|
||||
return nil, fmt.Errorf("no properties provided to create a Criteria")
|
||||
}
|
||||
|
||||
separator := ";"
|
||||
if len(parts) > 1 {
|
||||
separator = parts[1]
|
||||
}
|
||||
|
||||
criteria := &Criteria{
|
||||
Properties: make([]Order, 0),
|
||||
}
|
||||
|
||||
if parts[0] == "" {
|
||||
return criteria, nil
|
||||
}
|
||||
|
||||
items := strings.Split(parts[0], separator)
|
||||
|
||||
for _, item := range items {
|
||||
parts := strings.Split(item, ",")
|
||||
if len(parts) != 2 {
|
||||
return nil, fmt.Errorf("badly formatted sort: '%v'", item)
|
||||
}
|
||||
|
||||
direction := strings.ToLower(parts[1])
|
||||
|
||||
if direction != "asc" && direction != "desc" {
|
||||
return nil, fmt.Errorf("unknown sort '%v'", parts[1])
|
||||
}
|
||||
|
||||
newSort := Order{
|
||||
Property: parts[0],
|
||||
Direction: direction,
|
||||
}
|
||||
|
||||
criteria.Properties = append(criteria.Properties, newSort)
|
||||
}
|
||||
|
||||
return criteria, nil
|
||||
}
|
36
pkg/util/router/api.go
Normal file
36
pkg/util/router/api.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package router
|
||||
|
||||
import "fmt"
|
||||
|
||||
// API provides methods to generate urls for the API
|
||||
type API interface {
|
||||
UpdateWorkspaceStatus(namespace, uid string) string
|
||||
}
|
||||
|
||||
// api is a basic implementation of router.API
|
||||
type api struct {
|
||||
protocol string
|
||||
fqdn string
|
||||
}
|
||||
|
||||
// UpdateWorkspaceStatus generates a url to update the status of a workspace
|
||||
func (a *api) UpdateWorkspaceStatus(namespace, uid string) string {
|
||||
// <protocol><fqdn>/apis/v1beta1/{namespace}/workspaces/{uid}/status
|
||||
return fmt.Sprintf("%v%v/apis/v1beta1/%v/workspaces/%v/status", a.protocol, a.fqdn, namespace, uid)
|
||||
}
|
||||
|
||||
// NewAPIRouter creates a new api router used to generate urls for the api
|
||||
func NewAPIRouter(protocol, fqdn string) (API, error) {
|
||||
return &api{
|
||||
protocol: protocol,
|
||||
fqdn: fqdn,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// NewRelativeAPIRouter creates an api router that does relative routes, with no protocol or fqdn
|
||||
func NewRelativeAPIRouter() (API, error) {
|
||||
return &api{
|
||||
protocol: "",
|
||||
fqdn: "",
|
||||
}, nil
|
||||
}
|
@@ -10,7 +10,7 @@ type Web interface {
|
||||
WorkflowExecution(namespace, uid string) string
|
||||
}
|
||||
|
||||
// web is a basic implementation of WebRouter
|
||||
// web is a basic implementation of router.Web
|
||||
type web struct {
|
||||
protocol string
|
||||
fqdn string
|
||||
@@ -18,7 +18,7 @@ type web struct {
|
||||
|
||||
// WorkflowExecution generates a url to view a specific workflow
|
||||
func (w *web) WorkflowExecution(namespace, uid string) string {
|
||||
// <protocol>:<fqdn>/<namespace>/workflows/<uid>
|
||||
// <protocol><fqdn>/<namespace>/workflows/<uid>
|
||||
return fmt.Sprintf("%v%v/%v/workflows/%v", w.protocol, w.fqdn, namespace, uid)
|
||||
}
|
||||
|
||||
@@ -29,3 +29,11 @@ func NewWebRouter(protocol, fqdn string) (Web, error) {
|
||||
fqdn: fqdn,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// NewRelativeWebRouter creates a web router that does relative routes, with no protocol or fqdn
|
||||
func NewRelativeWebRouter() (Web, error) {
|
||||
return &web{
|
||||
protocol: "",
|
||||
fqdn: "",
|
||||
}, nil
|
||||
}
|
||||
|
@@ -10,8 +10,8 @@ import (
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
"github.com/onepanelio/core/pkg/util/gcs"
|
||||
"github.com/onepanelio/core/pkg/util/label"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/ptr"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
"github.com/onepanelio/core/pkg/util/types"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"golang.org/x/net/context"
|
||||
@@ -62,6 +62,63 @@ func typeWorkflow(wf *wfv1.Workflow) (workflow *WorkflowExecution) {
|
||||
return
|
||||
}
|
||||
|
||||
// WorkflowExecutionFilter represents the available ways we can filter WorkflowExecutions
|
||||
type WorkflowExecutionFilter struct {
|
||||
Labels []*Label
|
||||
Phase string // empty string means none
|
||||
}
|
||||
|
||||
// GetLabels returns the labels in the filter
|
||||
func (wf *WorkflowExecutionFilter) GetLabels() []*Label {
|
||||
return wf.Labels
|
||||
}
|
||||
|
||||
func applyWorkflowExecutionFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) {
|
||||
if !request.HasFilter() {
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
filter, ok := request.Filter.(WorkflowExecutionFilter)
|
||||
if !ok {
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
sb, err := ApplyLabelSelectQuery("we.labels", sb, &filter)
|
||||
if err != nil {
|
||||
return sb, err
|
||||
}
|
||||
|
||||
switch filter.Phase {
|
||||
case "":
|
||||
return sb, nil
|
||||
case "running":
|
||||
sb = sb.Where(sq.Eq{
|
||||
"we.finished_at": nil,
|
||||
"we.phase": []string{"Running", "Pending"},
|
||||
})
|
||||
case "completed":
|
||||
sb = sb.Where(sq.NotEq{
|
||||
"we.finished_at": nil,
|
||||
}).Where(sq.Eq{
|
||||
"we.phase": "Succeeded",
|
||||
})
|
||||
case "failed":
|
||||
sb = sb.Where(sq.NotEq{
|
||||
"we.finished_at": nil,
|
||||
}).Where(sq.Eq{
|
||||
"we.phase": []string{"Failed", "Error"},
|
||||
})
|
||||
case "stopped":
|
||||
sb = sb.Where(sq.Eq{
|
||||
"we.phase": "Terminated",
|
||||
})
|
||||
default:
|
||||
return sb, fmt.Errorf("unknown workflow execution phase filter '%v'", filter.Phase)
|
||||
}
|
||||
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
func UnmarshalWorkflows(wfBytes []byte, strict bool) (wfs []wfv1.Workflow, err error) {
|
||||
if len(wfBytes) == 0 {
|
||||
return nil, fmt.Errorf("UnmarshalWorkflows unable to work on empty bytes")
|
||||
@@ -130,7 +187,7 @@ func injectArtifactRepositoryConfig(artifact *wfv1.Artifact, namespaceConfig *Na
|
||||
artifact.GCS.Bucket = gcsConfig.Bucket
|
||||
artifact.GCS.Key = gcsConfig.KeyFormat
|
||||
artifact.GCS.ServiceAccountKeySecret.Name = "onepanel"
|
||||
artifact.GCS.ServiceAccountKeySecret.Key = "serviceAccountKey"
|
||||
artifact.GCS.ServiceAccountKeySecret.Key = "artifactRepositoryGCSServiceAccountKey"
|
||||
}
|
||||
|
||||
// Default to no compression for artifacts
|
||||
@@ -139,47 +196,23 @@ func injectArtifactRepositoryConfig(artifact *wfv1.Artifact, namespaceConfig *Na
|
||||
}
|
||||
}
|
||||
|
||||
// injectContainerResourceQuotas adds resource requests and limits if they exist
|
||||
func injectContainerResourceQuotas(wf *wfv1.Workflow, template *wfv1.Template, systemConfig SystemConfig) {
|
||||
// injectHostPortToContainer adds a hostPort to the template container, if a nodeSelector is present.
|
||||
// Kubernetes will ensure that multiple containers with the same hostPort do not share the same node.
|
||||
func (c *Client) injectHostPortToContainer(template *wfv1.Template) error {
|
||||
if template.NodeSelector == nil {
|
||||
return
|
||||
return nil
|
||||
}
|
||||
|
||||
var value string
|
||||
for k, v := range template.NodeSelector {
|
||||
if k == *systemConfig.NodePoolLabel() {
|
||||
value = v
|
||||
break
|
||||
}
|
||||
ports := []corev1.ContainerPort{
|
||||
{Name: "node-capturer", HostPort: 80, ContainerPort: 80},
|
||||
}
|
||||
if value == "" {
|
||||
return
|
||||
if template.Container != nil {
|
||||
template.Container.Ports = ports
|
||||
}
|
||||
if strings.Contains(value, "{{workflow.") {
|
||||
parts := strings.Split(strings.Replace(value, "}}", "", -1), ".")
|
||||
paramName := parts[len(parts)-1]
|
||||
for _, param := range wf.Spec.Arguments.Parameters {
|
||||
if param.Name == paramName && param.Value != nil {
|
||||
value = *param.Value
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
option, err := systemConfig.NodePoolOptionByValue(value)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if option != nil && option.Resources.Limits != nil {
|
||||
// If a node is selected specifically, match the resources request to limits
|
||||
option.Resources.Requests = option.Resources.Limits
|
||||
if template.Container != nil {
|
||||
template.Container.Resources = option.Resources
|
||||
}
|
||||
if template.Script != nil {
|
||||
template.Script.Container.Resources = option.Resources
|
||||
}
|
||||
if template.Script != nil {
|
||||
template.Script.Container.Ports = ports
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func injectEnvironmentVariables(container *corev1.Container, systemConfig SystemConfig) {
|
||||
@@ -249,15 +282,18 @@ func (c *Client) injectAutomatedFields(namespace string, wf *wfv1.Workflow, opts
|
||||
Name: "sys-dshm",
|
||||
MountPath: "/dev/shm",
|
||||
})
|
||||
|
||||
injectContainerResourceQuotas(wf, template, systemConfig)
|
||||
|
||||
err = c.injectHostPortToContainer(template)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
injectEnvironmentVariables(template.Container, systemConfig)
|
||||
}
|
||||
|
||||
if template.Script != nil {
|
||||
injectContainerResourceQuotas(wf, template, systemConfig)
|
||||
|
||||
err = c.injectHostPortToContainer(template)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
injectEnvironmentVariables(&template.Script.Container, systemConfig)
|
||||
}
|
||||
|
||||
@@ -401,6 +437,51 @@ func (c *Client) createWorkflow(namespace string, workflowTemplateID uint64, wor
|
||||
return
|
||||
}
|
||||
|
||||
func ensureWorkflowRunsOnDedicatedNode(wf *wfv1.Workflow, config SystemConfig) (*wfv1.Workflow, error) {
|
||||
antiAffinityLabelKey := "onepanel.io/reserves-instance-type"
|
||||
nodeSelectorVal := ""
|
||||
addPodAffinity := false
|
||||
for i := range wf.Spec.Templates {
|
||||
template := &wf.Spec.Templates[i]
|
||||
if template.NodeSelector == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, v := range template.NodeSelector {
|
||||
if strings.Contains(v, "{{workflow.") {
|
||||
parts := strings.Split(strings.Replace(v, "}}", "", -1), ".")
|
||||
paramName := parts[len(parts)-1]
|
||||
for _, param := range wf.Spec.Arguments.Parameters {
|
||||
if param.Name == paramName && param.Value != nil {
|
||||
nodeSelectorVal = *param.Value
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
template.Metadata.Labels = map[string]string{antiAffinityLabelKey: nodeSelectorVal}
|
||||
addPodAffinity = true
|
||||
}
|
||||
if addPodAffinity {
|
||||
wf.Spec.Affinity = &corev1.Affinity{
|
||||
PodAntiAffinity: &corev1.PodAntiAffinity{
|
||||
RequiredDuringSchedulingIgnoredDuringExecution: []corev1.PodAffinityTerm{
|
||||
{
|
||||
LabelSelector: &metav1.LabelSelector{
|
||||
MatchExpressions: []metav1.LabelSelectorRequirement{
|
||||
{Key: antiAffinityLabelKey, Operator: "In", Values: []string{nodeSelectorVal}},
|
||||
},
|
||||
},
|
||||
TopologyKey: "kubernetes.io/hostname",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
return wf, nil
|
||||
}
|
||||
|
||||
func (c *Client) ValidateWorkflowExecution(namespace string, manifest []byte) (err error) {
|
||||
manifest, err = filterOutCustomTypesFromManifest(manifest)
|
||||
if err != nil {
|
||||
@@ -688,11 +769,30 @@ func (c *Client) GetWorkflowExecution(namespace, uid string) (workflow *Workflow
|
||||
}
|
||||
|
||||
// ListWorkflowExecutions gets a list of WorkflowExecutions ordered by most recently created first.
|
||||
func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string, paginator *pagination.PaginationRequest) (workflows []*WorkflowExecution, err error) {
|
||||
sb := workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion).
|
||||
OrderBy("we.created_at DESC")
|
||||
sb = *paginator.ApplyToSelect(&sb)
|
||||
func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool, request *request.Request) (workflows []*WorkflowExecution, err error) {
|
||||
sb := workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion, includeSystem)
|
||||
|
||||
if request.HasSorting() {
|
||||
properties := getWorkflowExecutionColumnsMap(true)
|
||||
for _, order := range request.Sort.Properties {
|
||||
if columnName, ok := properties[order.Property]; ok {
|
||||
nullSort := "NULLS FIRST"
|
||||
if order.Direction == "desc" {
|
||||
nullSort = "NULLS LAST" // default in postgres, but let's be explicit
|
||||
}
|
||||
sb = sb.OrderBy(fmt.Sprintf("we.%v %v %v", columnName, order.Direction, nullSort))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sb = sb.OrderBy("we.created_at DESC")
|
||||
}
|
||||
|
||||
sb, err = applyWorkflowExecutionFilter(sb, request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sb = *request.ApplyPaginationToSelect(&sb)
|
||||
if err := c.DB.Selectx(&workflows, sb); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -701,10 +801,16 @@ func (c *Client) ListWorkflowExecutions(namespace, workflowTemplateUID, workflow
|
||||
}
|
||||
|
||||
// CountWorkflowExecutions returns the number of workflow executions
|
||||
func (c *Client) CountWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string) (count int, err error) {
|
||||
err = workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion).
|
||||
Columns("COUNT(*)").
|
||||
RunWith(c.DB).
|
||||
func (c *Client) CountWorkflowExecutions(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool, request *request.Request) (count int, err error) {
|
||||
sb := workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion, includeSystem).
|
||||
Columns("COUNT(*)")
|
||||
|
||||
sb, err = applyWorkflowExecutionFilter(sb, request)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
err = sb.RunWith(c.DB).
|
||||
QueryRow().
|
||||
Scan(&count)
|
||||
|
||||
@@ -1482,6 +1588,33 @@ func (c *Client) SetWorkflowTemplateLabels(namespace, uid, prefix string, keyVal
|
||||
return filteredMap, nil
|
||||
}
|
||||
|
||||
// GetWorkflowExecutionStatisticsForNamespace loads statistics on workflow executions for the provided namespace
|
||||
func (c *Client) GetWorkflowExecutionStatisticsForNamespace(namespace string) (report *WorkflowExecutionStatisticReport, err error) {
|
||||
statsSelect := `
|
||||
MAX(we.created_at) last_executed,
|
||||
COUNT(*) FILTER (WHERE finished_at IS NULL AND (phase = 'Running' OR phase = 'Pending')) running,
|
||||
COUNT(*) FILTER (WHERE finished_at IS NOT NULL AND phase = 'Succeeded') completed,
|
||||
COUNT(*) FILTER (WHERE finished_at IS NOT NULL AND (phase = 'Failed' OR phase = 'Error')) failed,
|
||||
COUNT(*) FILTER (WHERE phase = 'Terminated') terminated,
|
||||
COUNT(*) total`
|
||||
|
||||
query := sb.Select(statsSelect).
|
||||
From("workflow_executions we").
|
||||
LeftJoin("workflow_template_versions wtv ON we.workflow_template_version_id = wtv.id").
|
||||
LeftJoin("workflow_templates wt ON wtv.workflow_template_id = wt.id").
|
||||
Where(sq.Eq{
|
||||
"we.namespace": namespace,
|
||||
"wt.is_system": false,
|
||||
})
|
||||
|
||||
report = &WorkflowExecutionStatisticReport{}
|
||||
err = c.DB.Getx(report, query)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// GetWorkflowExecutionStatisticsForTemplates loads statistics on workflow executions for the provided
|
||||
// workflowTemplates and sets it as the WorkflowExecutionStatisticReport property
|
||||
func (c *Client) GetWorkflowExecutionStatisticsForTemplates(workflowTemplates ...*WorkflowTemplate) (err error) {
|
||||
if len(workflowTemplates) == 0 {
|
||||
return nil
|
||||
@@ -1492,16 +1625,6 @@ func (c *Client) GetWorkflowExecutionStatisticsForTemplates(workflowTemplates ..
|
||||
return err
|
||||
}
|
||||
|
||||
whereIn := "wtv.workflow_template_id IN (?"
|
||||
for i := range workflowTemplates {
|
||||
if i == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
whereIn += ",?"
|
||||
}
|
||||
whereIn += ")"
|
||||
|
||||
ids := make([]interface{}, len(workflowTemplates))
|
||||
for i, workflowTemplate := range workflowTemplates {
|
||||
ids[i] = workflowTemplate.ID
|
||||
@@ -1521,7 +1644,9 @@ func (c *Client) GetWorkflowExecutionStatisticsForTemplates(workflowTemplates ..
|
||||
query, args, err := sb.Select(statsSelect).
|
||||
From("workflow_executions we").
|
||||
Join("workflow_template_versions wtv ON wtv.id = we.workflow_template_version_id").
|
||||
Where(whereIn, ids...).
|
||||
Where(sq.Eq{
|
||||
"wtv.workflow_template_id": ids,
|
||||
}).
|
||||
GroupBy("wtv.workflow_template_id").
|
||||
ToSql()
|
||||
|
||||
@@ -1697,14 +1822,22 @@ func injectWorkflowExecutionStatusCaller(wf *wfv1.Workflow, phase wfv1.NodePhase
|
||||
return nil
|
||||
}
|
||||
|
||||
func workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion string) sq.SelectBuilder {
|
||||
func workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool) sq.SelectBuilder {
|
||||
whereMap := sq.Eq{
|
||||
"wt.namespace": namespace,
|
||||
"wt.uid": workflowTemplateUID,
|
||||
"we.is_archived": false,
|
||||
}
|
||||
if workflowTemplateVersion != "" {
|
||||
whereMap["wtv.version"] = workflowTemplateVersion
|
||||
|
||||
if !includeSystem {
|
||||
whereMap["wt.is_system"] = false
|
||||
}
|
||||
|
||||
if workflowTemplateUID != "" {
|
||||
whereMap["wt.uid"] = workflowTemplateUID
|
||||
|
||||
if workflowTemplateVersion != "" {
|
||||
whereMap["wtv.version"] = workflowTemplateVersion
|
||||
}
|
||||
}
|
||||
|
||||
sb := sb.Select().
|
||||
@@ -1716,16 +1849,16 @@ func workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, wo
|
||||
return sb
|
||||
}
|
||||
|
||||
func workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion string) sq.SelectBuilder {
|
||||
sb := workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion)
|
||||
sb = sb.Columns(getWorkflowExecutionColumns("we", "")...).
|
||||
Columns(`wtv.version "workflow_template.version"`, `wtv.created_at "workflow_template.created_at"`)
|
||||
func workflowExecutionsSelectBuilder(namespace, workflowTemplateUID, workflowTemplateVersion string, includeSystem bool) sq.SelectBuilder {
|
||||
sb := workflowExecutionsSelectBuilderNoColumns(namespace, workflowTemplateUID, workflowTemplateVersion, includeSystem)
|
||||
sb = sb.Columns(getWorkflowExecutionColumns("we")...).
|
||||
Columns(`wtv.version "workflow_template.version"`, `wtv.created_at "workflow_template.created_at"`, `wt.name "workflow_template.name"`, `wt.uid "workflow_template.uid"`)
|
||||
|
||||
return sb
|
||||
}
|
||||
|
||||
func (c *Client) getWorkflowExecutionAndTemplate(namespace string, uid string) (workflow *WorkflowExecution, err error) {
|
||||
sb := sb.Select(getWorkflowExecutionColumns("we", "")...).
|
||||
sb := sb.Select(getWorkflowExecutionColumns("we")...).
|
||||
Columns(getWorkflowTemplateColumns("wt", "workflow_template")...).
|
||||
Columns(`wtv.manifest "workflow_template.manifest"`, `wtv.version "workflow_template.version"`).
|
||||
From("workflow_executions we").
|
||||
|
@@ -3,9 +3,9 @@ package v1
|
||||
import (
|
||||
"encoding/json"
|
||||
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/onepanelio/core/pkg/util/sql"
|
||||
"github.com/onepanelio/core/pkg/util/types"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/onepanelio/core/util/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -108,3 +108,28 @@ func getWorkflowExecutionColumns(aliasAndDestination ...string) []string {
|
||||
columns := []string{"id", "created_at", "uid", "name", "parameters", "phase", "started_at", "finished_at", "labels"}
|
||||
return sql.FormatColumnSelect(columns, aliasAndDestination...)
|
||||
}
|
||||
|
||||
// getWorkflowExecutionColumnsMap returns a map where the keys are the columns of the workflow execution table
|
||||
// the value is the raw column name as it is in the database
|
||||
func getWorkflowExecutionColumnsMap(camelCase bool) map[string]string {
|
||||
result := map[string]string{
|
||||
"id": "id",
|
||||
"uid": "uid",
|
||||
"name": "name",
|
||||
"parameters": "parameters",
|
||||
"phase": "phase",
|
||||
"labels": "labels",
|
||||
}
|
||||
|
||||
if camelCase {
|
||||
result["createdAt"] = "created_at"
|
||||
result["startedAt"] = "started_at"
|
||||
result["finishedAt"] = "finished_at"
|
||||
} else {
|
||||
result["created_at"] = "created_at"
|
||||
result["started_at"] = "started_at"
|
||||
result["finished_at"] = "finished_at"
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
@@ -5,7 +5,8 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
pagination "github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -26,6 +27,24 @@ type WorkflowTemplateFilter struct {
|
||||
Labels []*Label
|
||||
}
|
||||
|
||||
// applyLabelSelectQuery returns a query builder that adds where statements to filter by labels in the request,
|
||||
// if there are any
|
||||
func applyLabelSelectQuery(sb sq.SelectBuilder, request *request.Request) sq.SelectBuilder {
|
||||
if request.Filter != nil {
|
||||
filter, ok := request.Filter.(WorkflowTemplateFilter)
|
||||
if ok && len(filter.Labels) > 0 {
|
||||
labelsJSON, err := LabelsToJSONString(filter.Labels)
|
||||
if err != nil {
|
||||
log.Printf("[error] %v", err)
|
||||
} else {
|
||||
sb = sb.Where("wt.labels @> ?", labelsJSON)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return sb
|
||||
}
|
||||
|
||||
// createWorkflowTemplateVersionDB inserts a record into workflow_template_versions using the current time accurate to nanoseconds
|
||||
// the data is returned in the resulting WorkflowTemplateVersion struct.
|
||||
func createWorkflowTemplateVersionDB(runner sq.BaseRunner, workflowTemplateVersion *WorkflowTemplateVersion, parameters []Parameter) (err error) {
|
||||
@@ -152,6 +171,7 @@ func (c *Client) createWorkflowTemplate(namespace string, workflowTemplate *Work
|
||||
workflowTemplateVersion := &WorkflowTemplateVersion{
|
||||
WorkflowTemplate: workflowTemplate,
|
||||
Manifest: workflowTemplate.Manifest,
|
||||
Labels: workflowTemplate.Labels,
|
||||
}
|
||||
err = createWorkflowTemplateVersionDB(tx, workflowTemplateVersion, params)
|
||||
if err != nil {
|
||||
@@ -159,13 +179,6 @@ func (c *Client) createWorkflowTemplate(namespace string, workflowTemplate *Work
|
||||
}
|
||||
workflowTemplate.WorkflowTemplateVersionID = workflowTemplateVersion.ID
|
||||
|
||||
// TODO remove this labels or update it to a generic version so we can update the labels table with recent data
|
||||
//_, err = c.InsertLabelsRunner(tx, TypeWorkflowTemplateVersion, workflowTemplateVersion.ID, workflowTemplate.Labels)
|
||||
//if err != nil {
|
||||
// return nil, nil, err
|
||||
//}
|
||||
//
|
||||
|
||||
argoWft, err := createArgoWorkflowTemplate(workflowTemplate, workflowTemplateVersion.Version)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
@@ -401,32 +414,25 @@ func (c *Client) listWorkflowTemplateVersions(namespace, uid string) (workflowTe
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Client) selectWorkflowTemplatesQuery(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (sb sq.SelectBuilder) {
|
||||
func (c *Client) selectWorkflowTemplatesQuery(namespace string, request *request.Request) (sb sq.SelectBuilder) {
|
||||
sb = c.workflowTemplatesSelectBuilder(namespace).
|
||||
Column("COUNT(wtv.*) versions, MAX(wtv.id) workflow_template_version_id").
|
||||
Join("workflow_template_versions wtv ON wtv.workflow_template_id = wt.id").
|
||||
GroupBy("wt.id", "wt.created_at", "wt.uid", "wt.name", "wt.is_archived").
|
||||
OrderBy("wt.created_at DESC")
|
||||
|
||||
if filter != nil && len(filter.Labels) > 0 {
|
||||
labelsJSON, err := LabelsToJSONString(filter.Labels)
|
||||
if err != nil {
|
||||
log.Printf("[error] %v", err)
|
||||
} else {
|
||||
sb = sb.Where("wt.labels @> ?", labelsJSON)
|
||||
}
|
||||
}
|
||||
sb = *paginator.ApplyToSelect(&sb)
|
||||
sb = applyLabelSelectQuery(sb, request)
|
||||
sb = *request.ApplyPaginationToSelect(&sb)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// selectWorkflowTemplatesDB loads non-archived and non-system workflow templates from the database for the input namespace
|
||||
// it also selects the total number of versions and latest version id
|
||||
func (c *Client) selectWorkflowTemplatesDB(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplates []*WorkflowTemplate, err error) {
|
||||
func (c *Client) selectWorkflowTemplatesDB(namespace string, request *request.Request) (workflowTemplates []*WorkflowTemplate, err error) {
|
||||
workflowTemplates = make([]*WorkflowTemplate, 0)
|
||||
|
||||
sb := c.selectWorkflowTemplatesQuery(namespace, paginator, filter).
|
||||
sb := c.selectWorkflowTemplatesQuery(namespace, request).
|
||||
Where(sq.Eq{
|
||||
"wt.is_archived": false,
|
||||
"wt.is_system": false,
|
||||
@@ -439,10 +445,10 @@ func (c *Client) selectWorkflowTemplatesDB(namespace string, paginator *paginati
|
||||
|
||||
// selectAllWorkflowTemplatesDB loads all workflow templates from the database for the input namespace
|
||||
// it also selects the total number of versions and latest version id
|
||||
func (c *Client) selectAllWorkflowTemplatesDB(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplates []*WorkflowTemplate, err error) {
|
||||
func (c *Client) selectAllWorkflowTemplatesDB(namespace string, request *request.Request) (workflowTemplates []*WorkflowTemplate, err error) {
|
||||
workflowTemplates = make([]*WorkflowTemplate, 0)
|
||||
|
||||
sb := c.selectWorkflowTemplatesQuery(namespace, paginator, filter)
|
||||
sb := c.selectWorkflowTemplatesQuery(namespace, request)
|
||||
err = c.DB.Selectx(&workflowTemplates, sb)
|
||||
|
||||
return
|
||||
@@ -450,7 +456,7 @@ func (c *Client) selectAllWorkflowTemplatesDB(namespace string, paginator *pagin
|
||||
|
||||
// CountWorkflowTemplates counts the total number of workflow templates for the given namespace
|
||||
// archived, and system templates are ignored.
|
||||
func (c *Client) CountWorkflowTemplates(namespace string, filter *WorkflowTemplateFilter) (count int, err error) {
|
||||
func (c *Client) CountWorkflowTemplates(namespace string, request *request.Request) (count int, err error) {
|
||||
sb := sb.Select("COUNT(*)").
|
||||
From("workflow_templates wt").
|
||||
Where(sq.Eq{
|
||||
@@ -459,14 +465,7 @@ func (c *Client) CountWorkflowTemplates(namespace string, filter *WorkflowTempla
|
||||
"wt.is_system": false,
|
||||
})
|
||||
|
||||
if filter != nil && len(filter.Labels) > 0 {
|
||||
labelsJSON, err := LabelsToJSONString(filter.Labels)
|
||||
if err != nil {
|
||||
log.Printf("[error] %v", err)
|
||||
} else {
|
||||
sb = sb.Where("wt.labels @> ?", labelsJSON)
|
||||
}
|
||||
}
|
||||
sb = applyLabelSelectQuery(sb, request)
|
||||
|
||||
err = sb.RunWith(c.DB).
|
||||
QueryRow().
|
||||
@@ -738,8 +737,8 @@ func (c *Client) ListWorkflowTemplateVersionsAll(paginator *pagination.Paginatio
|
||||
}
|
||||
|
||||
// ListAllWorkflowTemplates lists all of the workflow templates, including archived and system specific
|
||||
func (c *Client) ListAllWorkflowTemplates(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplateVersions []*WorkflowTemplate, err error) {
|
||||
workflowTemplateVersions, err = c.selectAllWorkflowTemplatesDB(namespace, paginator, filter)
|
||||
func (c *Client) ListAllWorkflowTemplates(namespace string, request *request.Request) (workflowTemplateVersions []*WorkflowTemplate, err error) {
|
||||
workflowTemplateVersions, err = c.selectAllWorkflowTemplatesDB(namespace, request)
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
"Namespace": namespace,
|
||||
@@ -755,8 +754,8 @@ func (c *Client) ListAllWorkflowTemplates(namespace string, paginator *paginatio
|
||||
|
||||
// ListWorkflowTemplates returns all WorkflowTemplates where the results
|
||||
// are filtered by is_archived and is_System is false.
|
||||
func (c *Client) ListWorkflowTemplates(namespace string, paginator *pagination.PaginationRequest, filter *WorkflowTemplateFilter) (workflowTemplateVersions []*WorkflowTemplate, err error) {
|
||||
workflowTemplateVersions, err = c.selectWorkflowTemplatesDB(namespace, paginator, filter)
|
||||
func (c *Client) ListWorkflowTemplates(namespace string, request *request.Request) (workflowTemplateVersions []*WorkflowTemplate, err error) {
|
||||
workflowTemplateVersions, err = c.selectWorkflowTemplatesDB(namespace, request)
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
"Namespace": namespace,
|
||||
@@ -855,7 +854,8 @@ func (c *Client) ArchiveWorkflowTemplate(namespace, uid string) (archived bool,
|
||||
workflowTemplateName := uid + "-v" + wfTempVer
|
||||
|
||||
for {
|
||||
wfs, err := c.ListWorkflowExecutions(namespace, uid, wfTempVer, &paginator)
|
||||
req := &request.Request{Pagination: &paginator}
|
||||
wfs, err := c.ListWorkflowExecutions(namespace, uid, wfTempVer, true, req)
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
"Namespace": namespace,
|
||||
|
@@ -4,9 +4,9 @@ import (
|
||||
"encoding/json"
|
||||
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/onepanelio/core/pkg/util/mapping"
|
||||
"github.com/onepanelio/core/pkg/util/sql"
|
||||
"github.com/onepanelio/core/pkg/util/types"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/onepanelio/core/util/sql"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"gopkg.in/yaml.v2"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
@@ -1,8 +1,8 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/onepanelio/core/pkg/util/sql"
|
||||
"github.com/onepanelio/core/pkg/util/types"
|
||||
"github.com/onepanelio/core/util/sql"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
384
pkg/workspace.go
384
pkg/workspace.go
@@ -3,19 +3,61 @@ package v1
|
||||
import (
|
||||
"database/sql"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/asaskevich/govalidator"
|
||||
"github.com/ghodss/yaml"
|
||||
"github.com/lib/pq"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/ptr"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// WorkspaceFilter represents the available ways we can filter Workspaces
|
||||
type WorkspaceFilter struct {
|
||||
Labels []*Label
|
||||
Phase string // empty string means none
|
||||
}
|
||||
|
||||
// GetLabels gets the labels of the filter
|
||||
func (wf *WorkspaceFilter) GetLabels() []*Label {
|
||||
return wf.Labels
|
||||
}
|
||||
|
||||
func applyWorkspaceFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) {
|
||||
if !request.HasFilter() {
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
filter, ok := request.Filter.(WorkspaceFilter)
|
||||
if !ok {
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
if filter.Phase != "" {
|
||||
sb = sb.Where(sq.Eq{
|
||||
"phase": filter.Phase,
|
||||
})
|
||||
} else {
|
||||
sb = sb.Where(sq.NotEq{
|
||||
"phase": WorkspaceTerminated,
|
||||
})
|
||||
}
|
||||
|
||||
sb, err := ApplyLabelSelectQuery("w.labels", sb, &filter)
|
||||
if err != nil {
|
||||
return sb, err
|
||||
}
|
||||
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
func (c *Client) workspacesSelectBuilder(namespace string) sq.SelectBuilder {
|
||||
sb := sb.Select(getWorkspaceColumns("w")...).
|
||||
Columns(getWorkspaceStatusColumns("w", "status")...).
|
||||
@@ -43,20 +85,16 @@ func workspaceStatusToFieldMap(status *WorkspaceStatus) sq.Eq {
|
||||
case WorkspaceLaunching:
|
||||
fieldMap["paused_at"] = pq.NullTime{}
|
||||
fieldMap["started_at"] = time.Now().UTC()
|
||||
break
|
||||
case WorkspacePausing:
|
||||
fieldMap["started_at"] = pq.NullTime{}
|
||||
fieldMap["paused_at"] = time.Now().UTC()
|
||||
break
|
||||
case WorkspaceUpdating:
|
||||
fieldMap["paused_at"] = pq.NullTime{}
|
||||
fieldMap["updated_at"] = time.Now().UTC()
|
||||
break
|
||||
case WorkspaceTerminating:
|
||||
fieldMap["started_at"] = pq.NullTime{}
|
||||
fieldMap["paused_at"] = pq.NullTime{}
|
||||
fieldMap["terminated_at"] = time.Now().UTC()
|
||||
break
|
||||
}
|
||||
|
||||
return fieldMap
|
||||
@@ -66,6 +104,7 @@ func workspaceStatusToFieldMap(status *WorkspaceStatus) sq.Eq {
|
||||
func updateWorkspaceStatusBuilder(namespace, uid string, status *WorkspaceStatus) sq.UpdateBuilder {
|
||||
fieldMap := workspaceStatusToFieldMap(status)
|
||||
|
||||
// Failed, Error, Succeeded
|
||||
ub := sb.Update("workspaces").
|
||||
SetMap(fieldMap).
|
||||
Where(sq.And{
|
||||
@@ -181,6 +220,17 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace
|
||||
}
|
||||
}
|
||||
|
||||
templates := argoTemplate.Spec.Templates
|
||||
for i, t := range templates {
|
||||
if t.Name == WorkspaceStatefulSetResource {
|
||||
resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
templates[i].Resource.Manifest = string(resultManifest)
|
||||
}
|
||||
}
|
||||
|
||||
_, err = c.CreateWorkflowExecution(namespace, &WorkflowExecution{
|
||||
Parameters: workspace.Parameters,
|
||||
}, workflowTemplate)
|
||||
@@ -215,17 +265,167 @@ func (c *Client) createWorkspace(namespace string, parameters []byte, workspace
|
||||
return workspace, nil
|
||||
}
|
||||
|
||||
// CreateWorkspace creates a workspace by triggering the corresponding workflow
|
||||
func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Workspace, error) {
|
||||
config, err := c.GetSystemConfig()
|
||||
// addResourceRequestsAndLimitsToWorkspaceTemplate will take the workspace statefulset resource
|
||||
// and attempt to figure out the resources it requests, based on the Node selected.
|
||||
func (c *Client) addResourceRequestsAndLimitsToWorkspaceTemplate(t wfv1.Template, argoTemplate *wfv1.WorkflowTemplate, workspace *Workspace) ([]byte, error) {
|
||||
//due to placeholders, we can't unmarshal into a k8s statefulset
|
||||
statefulSet := map[string]interface{}{}
|
||||
if err := yaml.Unmarshal([]byte(t.Resource.Manifest), &statefulSet); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
spec, ok := statefulSet["spec"].(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.New("unable to type check statefulset manifest")
|
||||
}
|
||||
template, ok := spec["template"].(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.New("unable to type check statefulset manifest")
|
||||
}
|
||||
templateSpec, ok := template["spec"].(map[string]interface{})
|
||||
if !ok {
|
||||
return nil, errors.New("unable to type check statefulset manifest")
|
||||
}
|
||||
extraContainer := generateExtraContainerWithHostPortToSequesterNode()
|
||||
if extraContainer != nil {
|
||||
containers, ok := templateSpec["containers"].([]interface{})
|
||||
if !ok {
|
||||
return nil, errors.New("unable to type check statefulset manifest")
|
||||
}
|
||||
|
||||
templateSpec["containers"] = append([]interface{}{extraContainer}, containers...)
|
||||
}
|
||||
resultManifest, err := yaml.Marshal(statefulSet)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return resultManifest, nil
|
||||
}
|
||||
|
||||
// generateExtraContainerWithHostPortToSequesterNode will add an extra container to a workspace.
|
||||
// The extra container have a hostPort set. Kubernetes will ensure the hostPort does not get conflict
|
||||
// between containers, scheduling a new node as needed.
|
||||
// The container will sleep once started, and generally consume negligible resources.
|
||||
func generateExtraContainerWithHostPortToSequesterNode() map[string]interface{} {
|
||||
extraContainer := map[string]interface{}{
|
||||
"image": "alpine:latest",
|
||||
"name": "node-capturer",
|
||||
"command": []interface{}{"/bin/sh"},
|
||||
"args": []interface{}{"-c", "while :; do sleep 2073600; done"},
|
||||
"ports": []interface{}{
|
||||
map[string]interface{}{
|
||||
"name": "node-capturer",
|
||||
"hostPort": 80,
|
||||
"containerPort": 80,
|
||||
},
|
||||
},
|
||||
}
|
||||
return extraContainer
|
||||
}
|
||||
|
||||
// startWorkspace starts a workspace and related resources. It assumes a DB record already exists
|
||||
// The following are required on the workspace:
|
||||
// WorkspaceTemplate.WorkflowTemplate.UID
|
||||
// WorkspaceTemplate.WorkflowTemplate.Version
|
||||
func (c *Client) startWorkspace(namespace string, parameters []byte, workspace *Workspace) (*Workspace, error) {
|
||||
if workspace == nil {
|
||||
return nil, fmt.Errorf("workspace is nil")
|
||||
}
|
||||
if workspace.WorkspaceTemplate == nil {
|
||||
return nil, fmt.Errorf("workspace.WorkspaceTemplate is nil")
|
||||
}
|
||||
if workspace.WorkspaceTemplate.WorkflowTemplate == nil {
|
||||
return nil, fmt.Errorf("workspace.WorkspaceTemplate.WorkflowTemplate is nil")
|
||||
}
|
||||
|
||||
systemConfig, err := c.GetSystemConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
workflowTemplate, err := c.GetWorkflowTemplate(namespace, workspace.WorkspaceTemplate.WorkflowTemplate.UID, workspace.WorkspaceTemplate.WorkflowTemplate.Version)
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
"Namespace": namespace,
|
||||
"Workspace": workspace,
|
||||
"Error": err.Error(),
|
||||
}).Error("Error with getting workflow template.")
|
||||
return nil, util.NewUserError(codes.NotFound, "Error with getting workflow template.")
|
||||
}
|
||||
|
||||
runtimeParameters, err := generateRuntimeParameters(systemConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
runtimeParametersMap := make(map[string]*string)
|
||||
for _, p := range runtimeParameters {
|
||||
runtimeParametersMap[p.Name] = p.Value
|
||||
}
|
||||
|
||||
argoTemplate := workflowTemplate.ArgoWorkflowTemplate
|
||||
for i, p := range argoTemplate.Spec.Arguments.Parameters {
|
||||
value := runtimeParametersMap[p.Name]
|
||||
if value != nil {
|
||||
argoTemplate.Spec.Arguments.Parameters[i].Value = value
|
||||
}
|
||||
}
|
||||
|
||||
templates := argoTemplate.Spec.Templates
|
||||
for i, t := range templates {
|
||||
if t.Name == WorkspaceStatefulSetResource {
|
||||
resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
templates[i].Resource.Manifest = string(resultManifest)
|
||||
}
|
||||
}
|
||||
|
||||
_, err = c.CreateWorkflowExecution(namespace, &WorkflowExecution{
|
||||
Parameters: workspace.Parameters,
|
||||
}, workflowTemplate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
_, err = sb.Update("workspaces").
|
||||
SetMap(sq.Eq{
|
||||
"phase": WorkspaceLaunching,
|
||||
"started_at": time.Now().UTC(),
|
||||
}).
|
||||
Where(sq.Eq{"id": workspace.ID}).
|
||||
RunWith(c.DB).
|
||||
Exec()
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "invalid input syntax for type json") {
|
||||
return nil, util.NewUserError(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
|
||||
return nil, util.NewUserError(codes.Unknown, err.Error())
|
||||
}
|
||||
|
||||
return workspace, nil
|
||||
}
|
||||
|
||||
// CreateWorkspace creates a workspace by triggering the corresponding workflow
|
||||
func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Workspace, error) {
|
||||
if err := workspace.GenerateUID(workspace.Name); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
existingWorkspace, err := c.GetWorkspace(namespace, workspace.UID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if existingWorkspace != nil {
|
||||
return nil, util.NewUserError(codes.AlreadyExists, "Workspace already exists.")
|
||||
}
|
||||
|
||||
config, err := c.GetSystemConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parameters, err := json.Marshal(workspace.Parameters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -245,12 +445,55 @@ func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Works
|
||||
return nil, fmt.Errorf("sys-host parameter not found")
|
||||
}
|
||||
|
||||
existingWorkspace, err := c.GetWorkspace(namespace, workspace.UID)
|
||||
// Validate workspace fields
|
||||
valid, err := govalidator.ValidateStruct(workspace)
|
||||
if err != nil || !valid {
|
||||
return nil, util.NewUserError(codes.InvalidArgument, err.Error())
|
||||
}
|
||||
|
||||
workspaceTemplate, err := c.GetWorkspaceTemplate(namespace, workspace.WorkspaceTemplate.UID, workspace.WorkspaceTemplate.Version)
|
||||
if err != nil || workspaceTemplate == nil {
|
||||
return nil, util.NewUserError(codes.NotFound, "Workspace template not found.")
|
||||
}
|
||||
workspace.WorkspaceTemplate = workspaceTemplate
|
||||
|
||||
workspace, err = c.createWorkspace(namespace, parameters, workspace)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if existingWorkspace != nil {
|
||||
return nil, util.NewUserError(codes.AlreadyExists, "Workspace already exists.")
|
||||
|
||||
return workspace, nil
|
||||
}
|
||||
|
||||
// StartWorkspace starts a workspace
|
||||
func (c *Client) StartWorkspace(namespace string, workspace *Workspace) (*Workspace, error) {
|
||||
// If already started and not failed, return an error
|
||||
if workspace.ID != 0 && workspace.Status.Phase != WorkspaceFailedToLaunch {
|
||||
return workspace, fmt.Errorf("unable to start a workspace with phase %v", workspace.Status.Phase)
|
||||
}
|
||||
|
||||
config, err := c.GetSystemConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parameters, err := json.Marshal(workspace.Parameters)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = injectWorkspaceSystemParameters(namespace, workspace, "create", "apply", config)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
workspace.Parameters = append(workspace.Parameters, Parameter{
|
||||
Name: "sys-uid",
|
||||
Value: ptr.String(workspace.UID),
|
||||
})
|
||||
|
||||
sysHost := workspace.GetParameterValue("sys-host")
|
||||
if sysHost == nil {
|
||||
return nil, fmt.Errorf("sys-host parameter not found")
|
||||
}
|
||||
|
||||
// Validate workspace fields
|
||||
@@ -265,7 +508,7 @@ func (c *Client) CreateWorkspace(namespace string, workspace *Workspace) (*Works
|
||||
}
|
||||
workspace.WorkspaceTemplate = workspaceTemplate
|
||||
|
||||
workspace, err = c.createWorkspace(namespace, parameters, workspace)
|
||||
workspace, err = c.startWorkspace(namespace, parameters, workspace)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -312,6 +555,30 @@ func (c *Client) GetWorkspace(namespace, uid string) (workspace *Workspace, err
|
||||
|
||||
// UpdateWorkspaceStatus updates workspace status and times based on phase
|
||||
func (c *Client) UpdateWorkspaceStatus(namespace, uid string, status *WorkspaceStatus) (err error) {
|
||||
// A succeeded status is passed in when a DAG succeeds. We don't need to do anything in this case.
|
||||
if status.Phase == "Succeeded" {
|
||||
return nil
|
||||
}
|
||||
|
||||
if status.Phase == "Failed" || status.Phase == "Error" {
|
||||
workspace, err := c.GetWorkspace(namespace, uid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if workspace.Status.Phase == WorkspaceLaunching && workspace.Status.PausedAt == nil {
|
||||
status.Phase = WorkspaceFailedToLaunch
|
||||
} else if workspace.Status.Phase == WorkspaceLaunching && workspace.Status.PausedAt != nil {
|
||||
status.Phase = WorkspaceFailedToResume
|
||||
} else if workspace.Status.Phase == WorkspacePausing {
|
||||
status.Phase = WorkspaceFailedToPause
|
||||
} else if workspace.Status.Phase == WorkspaceTerminating {
|
||||
status.Phase = WorkspaceFailedToTerminate
|
||||
} else if workspace.Status.Phase == WorkspaceUpdating {
|
||||
status.Phase = WorkspaceFailedToUpdate
|
||||
}
|
||||
}
|
||||
|
||||
result, err := updateWorkspaceStatusBuilder(namespace, uid, status).
|
||||
RunWith(c.DB).
|
||||
Exec()
|
||||
@@ -355,22 +622,36 @@ func (c *Client) ListWorkspacesByTemplateID(namespace string, templateID uint64)
|
||||
return
|
||||
}
|
||||
|
||||
func (c *Client) ListWorkspaces(namespace string, paginator *pagination.PaginationRequest) (workspaces []*Workspace, err error) {
|
||||
// ListWorkspaces returns a list of workspaces that satisfy the conditions in the request
|
||||
func (c *Client) ListWorkspaces(namespace string, request *request.Request) (workspaces []*Workspace, err error) {
|
||||
sb := sb.Select(getWorkspaceColumns("w")...).
|
||||
Columns(getWorkspaceStatusColumns("w", "status")...).
|
||||
Columns(getWorkspaceTemplateColumns("wt", "workspace_template")...).
|
||||
From("workspaces w").
|
||||
Join("workspace_templates wt ON wt.id = w.workspace_template_id").
|
||||
OrderBy("w.created_at DESC").
|
||||
Where(sq.And{
|
||||
sq.Eq{
|
||||
"w.namespace": namespace,
|
||||
},
|
||||
sq.NotEq{
|
||||
"phase": WorkspaceTerminated,
|
||||
},
|
||||
})
|
||||
sb = *paginator.ApplyToSelect(&sb)
|
||||
Where(sq.Eq{"w.namespace": namespace})
|
||||
|
||||
if request.HasSorting() {
|
||||
properties := getWorkspaceColumnsMap(true)
|
||||
for _, order := range request.Sort.Properties {
|
||||
if columnName, ok := properties[order.Property]; ok {
|
||||
nullSort := "NULLS FIRST"
|
||||
if order.Direction == "desc" {
|
||||
nullSort = "NULLS LAST" // default in postgres, but let's be explicit
|
||||
}
|
||||
sb = sb.OrderBy(fmt.Sprintf("w.%v %v %v", columnName, order.Direction, nullSort))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sb = sb.OrderBy("w.created_at DESC")
|
||||
}
|
||||
|
||||
sb, err = applyWorkspaceFilter(sb, request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sb = *request.ApplyPaginationToSelect(&sb)
|
||||
|
||||
if err := c.DB.Selectx(&workspaces, sb); err != nil {
|
||||
return nil, err
|
||||
@@ -380,8 +661,8 @@ func (c *Client) ListWorkspaces(namespace string, paginator *pagination.Paginati
|
||||
}
|
||||
|
||||
// CountWorkspaces returns the total number of workspaces in the given namespace that are not terminated
|
||||
func (c *Client) CountWorkspaces(namespace string) (count int, err error) {
|
||||
err = sb.Select("COUNT( DISTINCT( w.id ))").
|
||||
func (c *Client) CountWorkspaces(namespace string, request *request.Request) (count int, err error) {
|
||||
query := sb.Select("COUNT( DISTINCT( w.id ))").
|
||||
From("workspaces w").
|
||||
Join("workspace_templates wt ON w.workspace_template_id = wt.id").
|
||||
Where(sq.And{
|
||||
@@ -391,8 +672,14 @@ func (c *Client) CountWorkspaces(namespace string) (count int, err error) {
|
||||
sq.NotEq{
|
||||
"phase": WorkspaceTerminated,
|
||||
},
|
||||
}).
|
||||
RunWith(c.DB).
|
||||
})
|
||||
|
||||
query, err = applyWorkspaceFilter(query, request)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
err = query.RunWith(c.DB).
|
||||
QueryRow().
|
||||
Scan(&count)
|
||||
|
||||
@@ -446,6 +733,18 @@ func (c *Client) updateWorkspace(namespace, uid, workspaceAction, resourceAction
|
||||
workspaceTemplate.WorkflowTemplate = workflowTemplate
|
||||
workspace.WorkspaceTemplate = workspaceTemplate
|
||||
|
||||
templates := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate.Spec.Templates
|
||||
argoTemplate := workspace.WorkspaceTemplate.WorkflowTemplate.ArgoWorkflowTemplate
|
||||
for i, t := range templates {
|
||||
if t.Name == WorkspaceStatefulSetResource {
|
||||
resultManifest, err := c.addResourceRequestsAndLimitsToWorkspaceTemplate(t, argoTemplate, workspace)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
templates[i].Resource.Manifest = string(resultManifest)
|
||||
}
|
||||
}
|
||||
|
||||
_, err = c.CreateWorkflowExecution(namespace, &WorkflowExecution{
|
||||
Parameters: workspace.Parameters,
|
||||
}, workspaceTemplate.WorkflowTemplate)
|
||||
@@ -487,3 +786,34 @@ func (c *Client) DeleteWorkspace(namespace, uid string) (err error) {
|
||||
func (c *Client) ArchiveWorkspace(namespace, uid string, parameters ...Parameter) (err error) {
|
||||
return c.updateWorkspace(namespace, uid, "delete", "delete", &WorkspaceStatus{Phase: WorkspaceTerminating}, parameters...)
|
||||
}
|
||||
|
||||
// GetWorkspaceStatisticsForNamespace loads statistics for workspaces for the provided namespace
|
||||
func (c *Client) GetWorkspaceStatisticsForNamespace(namespace string) (report *WorkspaceStatisticReport, err error) {
|
||||
statsSelect := `
|
||||
MAX(w.created_at) last_created,
|
||||
COUNT(*) FILTER (WHERE phase = 'Launching') launching,
|
||||
COUNT(*) FILTER (WHERE phase = 'Running') running,
|
||||
COUNT(*) FILTER (WHERE phase = 'Updating') updating,
|
||||
COUNT(*) FILTER (WHERE phase = 'Pausing') pausing,
|
||||
COUNT(*) FILTER (WHERE phase = 'Paused') paused,
|
||||
COUNT(*) FILTER (WHERE phase = 'Terminating') terminating,
|
||||
COUNT(*) FILTER (WHERE phase = 'Terminated') terminated,
|
||||
COUNT(*) FILTER (WHERE phase = 'Failed to pause') failed_to_pause,
|
||||
COUNT(*) FILTER (WHERE phase = 'Failed to resume') failed_to_resume,
|
||||
COUNT(*) FILTER (WHERE phase = 'Failed to terminate') failed_to_terminate,
|
||||
COUNT(*) FILTER (WHERE phase = 'Failed to launch') failed_to_launch,
|
||||
COUNT(*) FILTER (WHERE phase = 'Failed to update') failed_to_update,
|
||||
COUNT(*) FILTER (WHERE phase LIKE 'Failed%') failed,
|
||||
COUNT(*) total`
|
||||
|
||||
query := sb.Select(statsSelect).
|
||||
From("workspaces w").
|
||||
Where(sq.Eq{
|
||||
"w.namespace": namespace,
|
||||
})
|
||||
|
||||
report = &WorkspaceStatisticReport{}
|
||||
err = c.DB.Getx(report, query)
|
||||
|
||||
return
|
||||
}
|
||||
|
@@ -10,8 +10,9 @@ import (
|
||||
"github.com/asaskevich/govalidator"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/pkg/util/env"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/ptr"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
"github.com/onepanelio/core/pkg/util/router"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc/codes"
|
||||
networking "istio.io/api/networking/v1alpha3"
|
||||
@@ -22,6 +23,95 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
// WorkspaceDAGTemplateCreateStatefulSet is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateCreateStatefulSet = "create-stateful-set"
|
||||
|
||||
// WorkspaceDAGTemplateGetStatefulSet is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateGetStatefulSet = "get-stateful-set"
|
||||
|
||||
// WorkspaceDAGTemplateService is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateService = "service"
|
||||
|
||||
// WorkspaceDAGTemplateVirtualService is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateVirtualService = "virtual-service"
|
||||
|
||||
// WorkspaceDAGTemplateCreateWorkspace is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateCreateWorkspace = "create-workspace"
|
||||
|
||||
// WorkspaceDAGTemplateDeleteStatefulSet is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateDeleteStatefulSet = "delete-stateful-set"
|
||||
|
||||
// WorkspaceDAGTemplateDeleteWorkspace is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateDeleteWorkspace = "delete-workspace"
|
||||
|
||||
// WorkspaceDAGTemplateDeletePVC is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateDeletePVC = "delete-pvc"
|
||||
|
||||
// WorkspaceDAGTemplateSysSetPhaseRunning is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateSysSetPhaseRunning = "sys-set-phase-running"
|
||||
|
||||
// WorkspaceDAGTemplateSysSetPhasePaused is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateSysSetPhasePaused = "sys-set-phase-paused"
|
||||
|
||||
// WorkspaceDAGTemplateSysSetPhaseTerminated is used inside the DAG creation for the workspace.
|
||||
const WorkspaceDAGTemplateSysSetPhaseTerminated = "sys-set-phase-terminated"
|
||||
|
||||
// WorkspaceServiceResource is resource used in workspace template creation.
|
||||
const WorkspaceServiceResource = "service-resource"
|
||||
|
||||
// WorkspaceVirtualServiceResource is resource used in workspace template creation.
|
||||
const WorkspaceVirtualServiceResource = "virtual-service-resource"
|
||||
|
||||
// WorkspaceStatefulSetResource is resource used in workspace template creation.
|
||||
const WorkspaceStatefulSetResource = "stateful-set-resource"
|
||||
|
||||
// WorkspaceGetStatefulSetResource is resource used in workspace template creation.
|
||||
const WorkspaceGetStatefulSetResource = "get-stateful-set-resource"
|
||||
|
||||
// WorkspaceDeleteStatefulSetResource is resource used in workspace template creation.
|
||||
const WorkspaceDeleteStatefulSetResource = "delete-stateful-set-resource"
|
||||
|
||||
// WorkspaceResource is resource used in workspace template creation.
|
||||
const WorkspaceResource = "workspace-resource"
|
||||
|
||||
// WorkspaceDeletePVCResource is resource used in workspace template creation.
|
||||
const WorkspaceDeletePVCResource = "delete-pvc-resource"
|
||||
|
||||
// WorkspaceTemplateFilter represents the available ways we can filter WorkspaceTemplates
|
||||
type WorkspaceTemplateFilter struct {
|
||||
Labels []*Label
|
||||
UID string // empty string means none
|
||||
}
|
||||
|
||||
// GetLabels gets the labels of the filter
|
||||
func (wt *WorkspaceTemplateFilter) GetLabels() []*Label {
|
||||
return wt.Labels
|
||||
}
|
||||
|
||||
func applyWorkspaceTemplateFilter(sb sq.SelectBuilder, request *request.Request) (sq.SelectBuilder, error) {
|
||||
if !request.HasFilter() {
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
filter, ok := request.Filter.(WorkspaceTemplateFilter)
|
||||
if !ok {
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
if filter.UID != "" {
|
||||
sb = sb.Where(sq.Eq{
|
||||
"uid": filter.UID,
|
||||
})
|
||||
}
|
||||
|
||||
sb, err := ApplyLabelSelectQuery("wt.labels", sb, &filter)
|
||||
if err != nil {
|
||||
return sb, err
|
||||
}
|
||||
|
||||
return sb, nil
|
||||
}
|
||||
|
||||
// createWorkspaceTemplateVersionDB creates a workspace template version in the database.
|
||||
func createWorkspaceTemplateVersionDB(tx sq.BaseRunner, template *WorkspaceTemplate) (err error) {
|
||||
err = sb.Insert("workspace_template_versions").
|
||||
@@ -467,31 +557,43 @@ kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{inputs.parameters.sys-pvc-name}}-{{workflow.parameters.sys-uid}}-0
|
||||
`
|
||||
|
||||
templates := []wfv1.Template{
|
||||
{
|
||||
Name: "handleExit",
|
||||
DAG: &wfv1.DAGTemplate{
|
||||
Tasks: []wfv1.DAGTask{
|
||||
{
|
||||
Name: "exit-handler",
|
||||
Template: "sys-update-workspace-status",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "workspace",
|
||||
DAG: &wfv1.DAGTemplate{
|
||||
FailFast: ptr.Bool(false),
|
||||
Tasks: []wfv1.DAGTask{
|
||||
{
|
||||
Name: "service",
|
||||
Template: "service-resource",
|
||||
Name: WorkspaceDAGTemplateService,
|
||||
Template: WorkspaceServiceResource,
|
||||
},
|
||||
{
|
||||
Name: "virtual-service",
|
||||
Template: "virtual-service-resource",
|
||||
Dependencies: []string{"service"},
|
||||
Name: WorkspaceDAGTemplateVirtualService,
|
||||
Template: WorkspaceVirtualServiceResource,
|
||||
Dependencies: []string{WorkspaceDAGTemplateService},
|
||||
},
|
||||
{
|
||||
Name: "create-stateful-set",
|
||||
Template: "stateful-set-resource",
|
||||
Dependencies: []string{"virtual-service"},
|
||||
Name: WorkspaceDAGTemplateCreateStatefulSet,
|
||||
Template: WorkspaceStatefulSetResource,
|
||||
Dependencies: []string{WorkspaceDAGTemplateVirtualService},
|
||||
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
|
||||
},
|
||||
{
|
||||
Name: "get-stateful-set",
|
||||
Template: "get-stateful-set-resource",
|
||||
Dependencies: []string{"create-stateful-set"},
|
||||
Name: WorkspaceDAGTemplateGetStatefulSet,
|
||||
Template: WorkspaceGetStatefulSetResource,
|
||||
Dependencies: []string{WorkspaceDAGTemplateCreateStatefulSet},
|
||||
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
|
||||
Arguments: wfv1.Arguments{
|
||||
Parameters: []wfv1.Parameter{
|
||||
@@ -503,27 +605,27 @@ metadata:
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "create-workspace",
|
||||
Template: "workspace-resource",
|
||||
Dependencies: []string{"get-stateful-set"},
|
||||
Name: WorkspaceDAGTemplateCreateWorkspace,
|
||||
Template: WorkspaceResource,
|
||||
Dependencies: []string{WorkspaceDAGTemplateGetStatefulSet},
|
||||
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
|
||||
},
|
||||
{
|
||||
Name: "delete-stateful-set",
|
||||
Template: "delete-stateful-set-resource",
|
||||
Dependencies: []string{"virtual-service"},
|
||||
Name: WorkspaceDAGTemplateDeleteStatefulSet,
|
||||
Template: WorkspaceDeleteStatefulSetResource,
|
||||
Dependencies: []string{WorkspaceDAGTemplateVirtualService},
|
||||
When: "{{workflow.parameters.sys-workspace-action}} == pause || {{workflow.parameters.sys-workspace-action}} == delete",
|
||||
},
|
||||
{
|
||||
Name: "delete-workspace",
|
||||
Template: "workspace-resource",
|
||||
Dependencies: []string{"delete-stateful-set"},
|
||||
Name: WorkspaceDAGTemplateDeleteWorkspace,
|
||||
Template: WorkspaceResource,
|
||||
Dependencies: []string{WorkspaceDAGTemplateDeleteStatefulSet},
|
||||
When: "{{workflow.parameters.sys-workspace-action}} == pause || {{workflow.parameters.sys-workspace-action}} == delete",
|
||||
},
|
||||
{
|
||||
Name: "delete-pvc",
|
||||
Template: "delete-pvc-resource",
|
||||
Dependencies: []string{"delete-workspace"},
|
||||
Name: WorkspaceDAGTemplateDeletePVC,
|
||||
Template: WorkspaceDeletePVCResource,
|
||||
Dependencies: []string{WorkspaceDAGTemplateDeleteWorkspace},
|
||||
Arguments: wfv1.Arguments{
|
||||
Parameters: []wfv1.Parameter{
|
||||
{
|
||||
@@ -536,9 +638,9 @@ metadata:
|
||||
WithItems: volumeClaimItems,
|
||||
},
|
||||
{
|
||||
Name: "sys-set-phase-running",
|
||||
Name: WorkspaceDAGTemplateSysSetPhaseRunning,
|
||||
Template: "sys-update-status",
|
||||
Dependencies: []string{"create-workspace"},
|
||||
Dependencies: []string{WorkspaceDAGTemplateCreateWorkspace},
|
||||
Arguments: wfv1.Arguments{
|
||||
Parameters: []wfv1.Parameter{
|
||||
{
|
||||
@@ -550,9 +652,9 @@ metadata:
|
||||
When: "{{workflow.parameters.sys-workspace-action}} == create || {{workflow.parameters.sys-workspace-action}} == update",
|
||||
},
|
||||
{
|
||||
Name: "sys-set-phase-paused",
|
||||
Name: WorkspaceDAGTemplateSysSetPhasePaused,
|
||||
Template: "sys-update-status",
|
||||
Dependencies: []string{"delete-workspace"},
|
||||
Dependencies: []string{WorkspaceDAGTemplateDeleteWorkspace},
|
||||
Arguments: wfv1.Arguments{
|
||||
Parameters: []wfv1.Parameter{
|
||||
{
|
||||
@@ -564,9 +666,9 @@ metadata:
|
||||
When: "{{workflow.parameters.sys-workspace-action}} == pause",
|
||||
},
|
||||
{
|
||||
Name: "sys-set-phase-terminated",
|
||||
Name: WorkspaceDAGTemplateSysSetPhaseTerminated,
|
||||
Template: "sys-update-status",
|
||||
Dependencies: []string{"delete-pvc"},
|
||||
Dependencies: []string{WorkspaceDAGTemplateDeletePVC},
|
||||
Arguments: wfv1.Arguments{
|
||||
Parameters: []wfv1.Parameter{
|
||||
{
|
||||
@@ -581,21 +683,21 @@ metadata:
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "service-resource",
|
||||
Name: WorkspaceServiceResource,
|
||||
Resource: &wfv1.ResourceTemplate{
|
||||
Action: "{{workflow.parameters.sys-resource-action}}",
|
||||
Manifest: serviceManifest,
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "virtual-service-resource",
|
||||
Name: WorkspaceVirtualServiceResource,
|
||||
Resource: &wfv1.ResourceTemplate{
|
||||
Action: "{{workflow.parameters.sys-resource-action}}",
|
||||
Manifest: virtualServiceManifest,
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "stateful-set-resource",
|
||||
Name: WorkspaceStatefulSetResource,
|
||||
Resource: &wfv1.ResourceTemplate{
|
||||
Action: "{{workflow.parameters.sys-resource-action}}",
|
||||
Manifest: statefulSetManifest,
|
||||
@@ -613,7 +715,7 @@ metadata:
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "get-stateful-set-resource",
|
||||
Name: WorkspaceGetStatefulSetResource,
|
||||
Inputs: wfv1.Inputs{
|
||||
Parameters: []wfv1.Parameter{{Name: "update-revision"}},
|
||||
},
|
||||
@@ -624,21 +726,21 @@ metadata:
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "delete-stateful-set-resource",
|
||||
Name: WorkspaceDeleteStatefulSetResource,
|
||||
Resource: &wfv1.ResourceTemplate{
|
||||
Action: "{{workflow.parameters.sys-resource-action}}",
|
||||
Manifest: statefulSetManifest,
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "workspace-resource",
|
||||
Name: WorkspaceResource,
|
||||
Resource: &wfv1.ResourceTemplate{
|
||||
Action: "{{workflow.parameters.sys-resource-action}}",
|
||||
Manifest: workspaceManifest,
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "delete-pvc-resource",
|
||||
Name: WorkspaceDeletePVCResource,
|
||||
Inputs: wfv1.Inputs{
|
||||
Parameters: []wfv1.Parameter{{Name: "sys-pvc-name"}},
|
||||
},
|
||||
@@ -648,16 +750,36 @@ metadata:
|
||||
},
|
||||
},
|
||||
}
|
||||
// Add curl template
|
||||
curlPath := fmt.Sprintf("/apis/v1beta1/{{workflow.namespace}}/workspaces/{{workflow.parameters.sys-uid}}/status")
|
||||
|
||||
webRouter, err := router.NewRelativeAPIRouter()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
curlUpdateWorkspaceStatusPath := webRouter.UpdateWorkspaceStatus("{{workflow.namespace}}", "{{workflow.parameters.sys-uid}}")
|
||||
status := map[string]interface{}{
|
||||
"phase": "{{inputs.parameters.sys-workspace-phase}}",
|
||||
"phase": "{{workflow.status}}",
|
||||
}
|
||||
statusBytes, err := json.Marshal(status)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
inputs := wfv1.Inputs{
|
||||
inputs := wfv1.Inputs{}
|
||||
curlUpdateWorkspaceNodeTemplate, err := getCURLNodeTemplate("sys-update-workspace-status", http.MethodPut, curlUpdateWorkspaceStatusPath, string(statusBytes), inputs)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
templates = append(templates, *curlUpdateWorkspaceNodeTemplate)
|
||||
|
||||
// Add curl template
|
||||
curlPath := fmt.Sprintf("/apis/v1beta1/{{workflow.namespace}}/workspaces/{{workflow.parameters.sys-uid}}/status")
|
||||
status = map[string]interface{}{
|
||||
"phase": "{{inputs.parameters.sys-workspace-phase}}",
|
||||
}
|
||||
statusBytes, err = json.Marshal(status)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
inputs = wfv1.Inputs{
|
||||
Parameters: []wfv1.Parameter{
|
||||
{Name: "sys-workspace-phase"},
|
||||
},
|
||||
@@ -672,10 +794,10 @@ metadata:
|
||||
dag := wfv1.DAGTask{
|
||||
Name: spec.PostExecutionWorkflow.Entrypoint,
|
||||
Template: spec.PostExecutionWorkflow.Entrypoint,
|
||||
Dependencies: []string{"sys-set-phase-running", "sys-set-phase-paused", "sys-set-phase-terminated"},
|
||||
Dependencies: []string{WorkspaceDAGTemplateSysSetPhaseRunning, WorkspaceDAGTemplateSysSetPhasePaused, WorkspaceDAGTemplateSysSetPhaseTerminated},
|
||||
}
|
||||
|
||||
templates[0].DAG.Tasks = append(templates[0].DAG.Tasks, dag)
|
||||
templates[1].DAG.Tasks = append(templates[1].DAG.Tasks, dag)
|
||||
|
||||
templates = append(templates, spec.PostExecutionWorkflow.Templates...)
|
||||
}
|
||||
@@ -683,6 +805,7 @@ metadata:
|
||||
workflowTemplateSpec := map[string]interface{}{
|
||||
"arguments": spec.Arguments,
|
||||
"entrypoint": "workspace",
|
||||
"onExit": "handleExit",
|
||||
"templates": templates,
|
||||
}
|
||||
|
||||
@@ -1035,15 +1158,47 @@ func (c *Client) UpdateWorkspaceTemplate(namespace string, workspaceTemplate *Wo
|
||||
return workspaceTemplate, nil
|
||||
}
|
||||
|
||||
// UpdateWorkspaceTemplateManifest updates a workspace template by creating a new version where the only difference is the manifest
|
||||
func (c *Client) UpdateWorkspaceTemplateManifest(namespace, uid string, manifest string) (*WorkspaceTemplate, error) {
|
||||
existingTemplate, err := c.GetWorkspaceTemplate(namespace, uid, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
existingTemplate.UID = uid
|
||||
existingTemplate.Manifest = manifest
|
||||
|
||||
return c.UpdateWorkspaceTemplate(namespace, existingTemplate)
|
||||
}
|
||||
|
||||
// ListWorkspaceTemplates returns a list of workspace templates that are not archived, sorted by most recent created first
|
||||
func (c *Client) ListWorkspaceTemplates(namespace string, paginator *pagination.PaginationRequest) (workspaceTemplates []*WorkspaceTemplate, err error) {
|
||||
func (c *Client) ListWorkspaceTemplates(namespace string, request *request.Request) (workspaceTemplates []*WorkspaceTemplate, err error) {
|
||||
sb := c.workspaceTemplatesSelectBuilder(namespace).
|
||||
Where(sq.Eq{
|
||||
"wt.is_archived": false,
|
||||
}).
|
||||
OrderBy("wt.created_at DESC")
|
||||
})
|
||||
|
||||
sb = *paginator.ApplyToSelect(&sb)
|
||||
if request.HasSorting() {
|
||||
properties := getWorkspaceTemplateColumnsMap(true)
|
||||
for _, order := range request.Sort.Properties {
|
||||
if columnName, ok := properties[order.Property]; ok {
|
||||
nullSort := "NULLS FIRST"
|
||||
if order.Direction == "desc" {
|
||||
nullSort = "NULLS LAST" // default in postgres, but let's be explicit
|
||||
}
|
||||
sb = sb.OrderBy(fmt.Sprintf("wt.%v %v %v", columnName, order.Direction, nullSort))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sb = sb.OrderBy("wt.created_at DESC")
|
||||
}
|
||||
|
||||
sb, err = applyWorkspaceTemplateFilter(sb, request)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sb = *request.ApplyPaginationToSelect(&sb)
|
||||
|
||||
err = c.DB.Selectx(&workspaceTemplates, sb)
|
||||
|
||||
|
@@ -3,9 +3,9 @@ package v1
|
||||
import (
|
||||
"fmt"
|
||||
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/onepanelio/core/pkg/util/sql"
|
||||
"github.com/onepanelio/core/pkg/util/types"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/onepanelio/core/util/sql"
|
||||
"sigs.k8s.io/yaml"
|
||||
"time"
|
||||
)
|
||||
@@ -110,3 +110,28 @@ func getWorkspaceTemplateColumnsWithoutLabels(aliasAndDestination ...string) []s
|
||||
columns := []string{"id", "uid", "created_at", "modified_at", "name", "description", "namespace", "is_archived", "workflow_template_id"}
|
||||
return sql.FormatColumnSelect(columns, aliasAndDestination...)
|
||||
}
|
||||
|
||||
// getWorkspaceTemplateColumnsMap returns a map where the keys are the columns of the workspace_templates table
|
||||
// the value is the raw column name as it is in the database
|
||||
func getWorkspaceTemplateColumnsMap(camelCase bool) map[string]string {
|
||||
result := map[string]string{
|
||||
"id": "id",
|
||||
"labels": "labels",
|
||||
"name": "name",
|
||||
"uid": "uid",
|
||||
"namespace": "namespace",
|
||||
"description": "description",
|
||||
}
|
||||
|
||||
if camelCase {
|
||||
result["createdAt"] = "created_at"
|
||||
result["modifiedAt"] = "modified_at"
|
||||
result["isArchived"] = "is_archived"
|
||||
} else {
|
||||
result["created_at"] = "created_at"
|
||||
result["modified_at"] = "modified_at"
|
||||
result["is_archived"] = "is_archived"
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
@@ -3,9 +3,9 @@ package v1
|
||||
import (
|
||||
"fmt"
|
||||
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/onepanelio/core/pkg/util/sql"
|
||||
"github.com/onepanelio/core/pkg/util/types"
|
||||
uid2 "github.com/onepanelio/core/pkg/util/uid"
|
||||
"github.com/onepanelio/core/util/sql"
|
||||
networking "istio.io/api/networking/v1alpha3"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"time"
|
||||
@@ -15,13 +15,18 @@ type WorkspacePhase string
|
||||
|
||||
// Workspace phases
|
||||
const (
|
||||
WorkspaceLaunching WorkspacePhase = "Launching"
|
||||
WorkspaceRunning WorkspacePhase = "Running"
|
||||
WorkspaceUpdating WorkspacePhase = "Updating"
|
||||
WorkspacePausing WorkspacePhase = "Pausing"
|
||||
WorkspacePaused WorkspacePhase = "Paused"
|
||||
WorkspaceTerminating WorkspacePhase = "Terminating"
|
||||
WorkspaceTerminated WorkspacePhase = "Terminated"
|
||||
WorkspaceLaunching WorkspacePhase = "Launching"
|
||||
WorkspaceRunning WorkspacePhase = "Running"
|
||||
WorkspaceUpdating WorkspacePhase = "Updating"
|
||||
WorkspacePausing WorkspacePhase = "Pausing"
|
||||
WorkspacePaused WorkspacePhase = "Paused"
|
||||
WorkspaceTerminating WorkspacePhase = "Terminating"
|
||||
WorkspaceTerminated WorkspacePhase = "Terminated"
|
||||
WorkspaceFailedToPause WorkspacePhase = "Failed to pause"
|
||||
WorkspaceFailedToResume WorkspacePhase = "Failed to resume"
|
||||
WorkspaceFailedToTerminate WorkspacePhase = "Failed to terminate"
|
||||
WorkspaceFailedToLaunch WorkspacePhase = "Failed to launch"
|
||||
WorkspaceFailedToUpdate WorkspacePhase = "Failed to upgrade"
|
||||
)
|
||||
|
||||
type WorkspaceStatus struct {
|
||||
@@ -117,3 +122,27 @@ func WorkspacesToIDs(resources []*Workspace) (ids []uint64) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// getWorkspaceColumnsMap returns a map where the keys are the columns of the workspaces table
|
||||
// the value is the raw column name as it is in the database
|
||||
func getWorkspaceColumnsMap(camelCase bool) map[string]string {
|
||||
result := map[string]string{
|
||||
"id": "id",
|
||||
"labels": "labels",
|
||||
"name": "name",
|
||||
"uid": "uid",
|
||||
"namespace": "namespace",
|
||||
"phase": "phase",
|
||||
"parameters": "parameters",
|
||||
}
|
||||
|
||||
if camelCase {
|
||||
result["createdAt"] = "created_at"
|
||||
result["modifiedAt"] = "modified_at"
|
||||
} else {
|
||||
result["created_at"] = "created_at"
|
||||
result["modified_at"] = "modified_at"
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
@@ -2,8 +2,13 @@ package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/md5"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/onepanelio/core/api"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
v12 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@@ -35,6 +40,9 @@ func getBearerToken(ctx context.Context) (*string, bool) {
|
||||
return nil, false
|
||||
}
|
||||
t = strings.ReplaceAll(t, prefix, "")
|
||||
if t == "null" {
|
||||
return nil, false
|
||||
}
|
||||
return &t, true
|
||||
}
|
||||
|
||||
@@ -63,7 +71,12 @@ func getClient(ctx context.Context, kubeConfig *v1.Config, db *v1.DB, sysConfig
|
||||
return nil, status.Error(codes.Unauthenticated, `Missing or invalid "authorization" header.`)
|
||||
}
|
||||
|
||||
if sysConfig["token"] != *bearerToken {
|
||||
sysConfig["token"] = *bearerToken
|
||||
}
|
||||
|
||||
kubeConfig.BearerToken = *bearerToken
|
||||
|
||||
client, err := v1.NewClient(kubeConfig, db, sysConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -85,17 +98,55 @@ func IsAuthorized(c *v1.Client, namespace, verb, group, resource, name string) (
|
||||
},
|
||||
})
|
||||
|
||||
deniedMsg := fmt.Sprintf(`Permission denied. Namespace: '%v', Verb: '%v', Group: '%v', Resource '%v', Name: '%v'`, namespace, verb, group, resource, name)
|
||||
if err != nil {
|
||||
return false, status.Error(codes.PermissionDenied, "Permission denied.")
|
||||
return false, status.Error(codes.PermissionDenied, deniedMsg)
|
||||
}
|
||||
allowed = review.Status.Allowed
|
||||
if !allowed {
|
||||
return false, status.Error(codes.PermissionDenied, "Permission denied.")
|
||||
return false, status.Error(codes.PermissionDenied, deniedMsg)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func verifyLogin(client *v1.Client, tokenRequest *api.IsValidTokenRequest) (rawToken string, err error) {
|
||||
accountsList, err := client.CoreV1().ServiceAccounts("onepanel").List(v1.ListOptions{})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
authTokenSecretName := ""
|
||||
for _, serviceAccount := range accountsList.Items {
|
||||
if serviceAccount.Name != tokenRequest.Username {
|
||||
continue
|
||||
}
|
||||
for _, secret := range serviceAccount.Secrets {
|
||||
if strings.Contains(secret.Name, "-token-") {
|
||||
authTokenSecretName = secret.Name
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if authTokenSecretName == "" {
|
||||
return "", util.NewUserError(codes.InvalidArgument, fmt.Sprintf("unknown service account '%v'", tokenRequest.Username))
|
||||
}
|
||||
|
||||
secret, err := client.CoreV1().Secrets("onepanel").Get(authTokenSecretName, v12.GetOptions{})
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
currentTokenBytes := md5.Sum(secret.Data["token"])
|
||||
currentTokenString := hex.EncodeToString(currentTokenBytes[:])
|
||||
|
||||
if tokenRequest.Token != fmt.Sprintf("%s", currentTokenString) {
|
||||
return "", util.NewUserError(codes.InvalidArgument, "token doesn't match what's on record")
|
||||
}
|
||||
|
||||
return string(secret.Data["token"]), nil
|
||||
}
|
||||
|
||||
// UnaryInterceptor performs authentication checks.
|
||||
// The two main cases are:
|
||||
// 1. Is the token valid? This is used for logging in.
|
||||
@@ -111,10 +162,25 @@ func UnaryInterceptor(kubeConfig *v1.Config, db *v1.DB, sysConfig v1.SystemConfi
|
||||
|
||||
tokenRequest, ok := req.(*api.IsValidTokenRequest)
|
||||
if !ok {
|
||||
return resp, errors.New("IsValidToken does not have correct request type")
|
||||
return resp, errors.New("LogInRequest does not have correct request type")
|
||||
}
|
||||
|
||||
md.Set("authorization", tokenRequest.Token.Token)
|
||||
defaultClient, err := v1.GetDefaultClient()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
rawToken, err := verifyLogin(defaultClient, tokenRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sysConfig, err := defaultClient.GetSystemConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
md.Set("onepanel-auth-token", rawToken)
|
||||
|
||||
ctx, err = getClient(ctx, kubeConfig, db, sysConfig)
|
||||
if err != nil {
|
||||
|
@@ -2,8 +2,10 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/onepanelio/core/api"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/server/auth"
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc/codes"
|
||||
@@ -41,7 +43,7 @@ func (a *AuthServer) IsAuthorized(ctx context.Context, request *api.IsAuthorized
|
||||
allowed, err := auth.IsAuthorized(client, request.IsAuthorized.Namespace, request.IsAuthorized.Verb, request.IsAuthorized.Group, request.IsAuthorized.Resource, request.IsAuthorized.ResourceName)
|
||||
if err != nil {
|
||||
res.Authorized = false
|
||||
return res, err
|
||||
return res, util.NewUserError(codes.PermissionDenied, fmt.Sprintf("Namespace: %v, Verb: %v, Group: \"%v\", Resource: %v. Source: %v", request.IsAuthorized.Namespace, request.IsAuthorized.Verb, request.IsAuthorized.Group, request.IsAuthorized.ResourceName, err))
|
||||
}
|
||||
|
||||
res.Authorized = allowed
|
||||
@@ -64,8 +66,10 @@ func (a *AuthServer) IsValidToken(ctx context.Context, req *api.IsValidTokenRequ
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
res = &api.IsValidTokenResponse{}
|
||||
res.Domain = config["ONEPANEL_DOMAIN"]
|
||||
res = &api.IsValidTokenResponse{
|
||||
Domain: config["ONEPANEL_DOMAIN"],
|
||||
Token: config["token"],
|
||||
}
|
||||
|
||||
return res, nil
|
||||
}
|
||||
|
@@ -147,3 +147,48 @@ func TimestampToAPIString(ts *time.Time) string {
|
||||
|
||||
return ts.UTC().Format(time.RFC3339)
|
||||
}
|
||||
|
||||
// WorkflowExecutionStatisticsReportToAPI converts v1.WorkflowExecutionStatisticReport to api.WorkflowExecutionStatisticReport
|
||||
func WorkflowExecutionStatisticsReportToAPI(report *v1.WorkflowExecutionStatisticReport) *api.WorkflowExecutionStatisticReport {
|
||||
if report == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
stats := &api.WorkflowExecutionStatisticReport{
|
||||
Total: report.Total,
|
||||
Running: report.Running,
|
||||
Completed: report.Completed,
|
||||
Failed: report.Failed,
|
||||
Terminated: report.Terminated,
|
||||
LastExecuted: TimestampToAPIString(report.LastExecuted),
|
||||
}
|
||||
|
||||
return stats
|
||||
}
|
||||
|
||||
// WorkspaceStatisticsReportToAPI converts v1.WorkspaceStatisticReport to api.WorkspaceStatisticReport
|
||||
func WorkspaceStatisticsReportToAPI(report *v1.WorkspaceStatisticReport) *api.WorkspaceStatisticReport {
|
||||
if report == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
stats := &api.WorkspaceStatisticReport{
|
||||
LastCreated: TimestampToAPIString(report.LastCreated),
|
||||
Launching: report.Launching,
|
||||
Running: report.Running,
|
||||
Updating: report.Updating,
|
||||
Pausing: report.Pausing,
|
||||
Paused: report.Paused,
|
||||
Terminating: report.Terminating,
|
||||
Terminated: report.Terminated,
|
||||
FailedToPause: report.FailedToPause,
|
||||
FailedToResume: report.FailedToResume,
|
||||
FailedToTerminate: report.FailedToTerminate,
|
||||
FailedToLaunch: report.FailedToLaunch,
|
||||
FailedToUpdate: report.FailedToUpdate,
|
||||
Failed: report.Failed,
|
||||
Total: report.Total,
|
||||
}
|
||||
|
||||
return stats
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@ import (
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/onepanelio/core/api"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/ptr"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
"github.com/onepanelio/core/server/auth"
|
||||
"github.com/onepanelio/core/server/converter"
|
||||
)
|
||||
|
@@ -7,21 +7,22 @@ import (
|
||||
"github.com/onepanelio/core/server/auth"
|
||||
)
|
||||
|
||||
func resourceIdentifierToArgoResource(identifier string) string {
|
||||
func getGroupAndResourceByIdentifier(identifier string) (group, resource string) {
|
||||
group = "argoproj.io"
|
||||
switch identifier {
|
||||
case v1.TypeWorkflowTemplate:
|
||||
return "workflowtemplates"
|
||||
return group, "workflowtemplates"
|
||||
case v1.TypeWorkflowTemplateVersion:
|
||||
return "workflowtemplates"
|
||||
return group, "workflowtemplates"
|
||||
case v1.TypeWorkflowExecution:
|
||||
return "workflows"
|
||||
return group, "workflows"
|
||||
case v1.TypeCronWorkflow:
|
||||
return "cronworkflows"
|
||||
return group, "cronworkflows"
|
||||
case v1.TypeWorkspace:
|
||||
return "statefulset"
|
||||
return "onepanel.io", "workspaces"
|
||||
}
|
||||
|
||||
return ""
|
||||
return "", ""
|
||||
}
|
||||
|
||||
func mapLabelsToKeyValue(labels []*v1.Label) []*api.KeyValue {
|
||||
@@ -54,10 +55,10 @@ func NewLabelServer() *LabelServer {
|
||||
}
|
||||
|
||||
func (s *LabelServer) GetLabels(ctx context.Context, req *api.GetLabelsRequest) (*api.GetLabelsResponse, error) {
|
||||
argoResource := resourceIdentifierToArgoResource(req.Resource)
|
||||
group, resource := getGroupAndResourceByIdentifier(req.Resource)
|
||||
|
||||
client := getClient(ctx)
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", "argoproj.io", argoResource, "")
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "get", group, resource, "")
|
||||
if err != nil || !allowed {
|
||||
return nil, err
|
||||
}
|
||||
@@ -73,10 +74,10 @@ func (s *LabelServer) GetLabels(ctx context.Context, req *api.GetLabelsRequest)
|
||||
}
|
||||
|
||||
func (s *LabelServer) AddLabels(ctx context.Context, req *api.AddLabelsRequest) (*api.GetLabelsResponse, error) {
|
||||
argoResource := resourceIdentifierToArgoResource(req.Resource)
|
||||
group, resource := getGroupAndResourceByIdentifier(req.Resource)
|
||||
|
||||
client := getClient(ctx)
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "create", "argoproj.io", argoResource, "")
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "create", group, resource, "")
|
||||
if err != nil || !allowed {
|
||||
return nil, err
|
||||
}
|
||||
@@ -97,10 +98,10 @@ func (s *LabelServer) AddLabels(ctx context.Context, req *api.AddLabelsRequest)
|
||||
}
|
||||
|
||||
func (s *LabelServer) ReplaceLabels(ctx context.Context, req *api.ReplaceLabelsRequest) (*api.GetLabelsResponse, error) {
|
||||
argoResource := resourceIdentifierToArgoResource(req.Resource)
|
||||
group, resource := getGroupAndResourceByIdentifier(req.Resource)
|
||||
|
||||
client := getClient(ctx)
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "argoproj.io", argoResource, "")
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", group, resource, "")
|
||||
if err != nil || !allowed {
|
||||
return nil, err
|
||||
}
|
||||
@@ -121,11 +122,11 @@ func (s *LabelServer) ReplaceLabels(ctx context.Context, req *api.ReplaceLabelsR
|
||||
}
|
||||
|
||||
func (s *LabelServer) DeleteLabel(ctx context.Context, req *api.DeleteLabelRequest) (*api.GetLabelsResponse, error) {
|
||||
argoResource := resourceIdentifierToArgoResource(req.Resource)
|
||||
group, resource := getGroupAndResourceByIdentifier(req.Resource)
|
||||
|
||||
client := getClient(ctx)
|
||||
// update verb here since we are not deleting the resource, but labels
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", "argoproj.io", argoResource, "")
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "update", group, resource, "")
|
||||
if err != nil || !allowed {
|
||||
return nil, err
|
||||
}
|
||||
|
@@ -5,7 +5,8 @@ import (
|
||||
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
wfv1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/router"
|
||||
"github.com/onepanelio/core/server/converter"
|
||||
"google.golang.org/grpc/codes"
|
||||
@@ -19,6 +20,8 @@ import (
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util/ptr"
|
||||
"github.com/onepanelio/core/server/auth"
|
||||
|
||||
requestSort "github.com/onepanelio/core/pkg/util/request/sort"
|
||||
)
|
||||
|
||||
type WorkflowServer struct{}
|
||||
@@ -178,6 +181,9 @@ func (s *WorkflowServer) GetWorkflowExecution(ctx context.Context, req *api.GetW
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if wf == nil {
|
||||
return nil, util.NewUserError(codes.NotFound, "Workflow not found")
|
||||
}
|
||||
|
||||
wf.Namespace = req.Namespace
|
||||
|
||||
@@ -275,6 +281,7 @@ func (s *WorkflowServer) GetWorkflowExecutionMetrics(ctx context.Context, req *a
|
||||
return &api.GetWorkflowExecutionMetricsResponse{Metrics: apiMetrics}, nil
|
||||
}
|
||||
|
||||
// ListWorkflowExecutions returns a list of workflow executions that are specified by the criteria in the ListWorkflowExecutionsRequest
|
||||
func (s *WorkflowServer) ListWorkflowExecutions(ctx context.Context, req *api.ListWorkflowExecutionsRequest) (*api.ListWorkflowExecutionsResponse, error) {
|
||||
client := getClient(ctx)
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "argoproj.io", "workflows", "")
|
||||
@@ -282,8 +289,25 @@ func (s *WorkflowServer) ListWorkflowExecutions(ctx context.Context, req *api.Li
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paginator := pagination.NewRequest(req.Page, req.PageSize)
|
||||
workflows, err := client.ListWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion, &paginator)
|
||||
labelFilter, err := v1.LabelsFromString(req.Labels)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqSort, err := requestSort.New(req.Order)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resourceRequest := &request.Request{
|
||||
Pagination: pagination.New(req.Page, req.PageSize),
|
||||
Filter: v1.WorkflowExecutionFilter{
|
||||
Labels: labelFilter,
|
||||
Phase: req.Phase,
|
||||
},
|
||||
Sort: reqSort,
|
||||
}
|
||||
|
||||
workflows, err := client.ListWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion, req.IncludeSystem, resourceRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -299,11 +323,12 @@ func (s *WorkflowServer) ListWorkflowExecutions(ctx context.Context, req *api.Li
|
||||
apiWorkflowExecutions = append(apiWorkflowExecutions, apiWorkflowExecution(wf, webRouter))
|
||||
}
|
||||
|
||||
count, err := client.CountWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion)
|
||||
count, err := client.CountWorkflowExecutions(req.Namespace, req.WorkflowTemplateUid, req.WorkflowTemplateVersion, req.IncludeSystem, resourceRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paginator := resourceRequest.Pagination
|
||||
return &api.ListWorkflowExecutionsResponse{
|
||||
Count: int32(len(apiWorkflowExecutions)),
|
||||
WorkflowExecutions: apiWorkflowExecutions,
|
||||
@@ -424,3 +449,22 @@ func (s *WorkflowServer) UpdateWorkflowExecutionStatus(ctx context.Context, req
|
||||
|
||||
return &empty.Empty{}, err
|
||||
}
|
||||
|
||||
// GetWorkflowExecutionStatisticsForNamespace returns statistics on workflow executions for a given namespace
|
||||
func (s *WorkflowServer) GetWorkflowExecutionStatisticsForNamespace(ctx context.Context, req *api.GetWorkflowExecutionStatisticsForNamespaceRequest) (*api.GetWorkflowExecutionStatisticsForNamespaceResponse, error) {
|
||||
client := getClient(ctx)
|
||||
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "argoproj.io", "workflows", "")
|
||||
if err != nil || !allowed {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
report, err := client.GetWorkflowExecutionStatisticsForNamespace(req.Namespace)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &api.GetWorkflowExecutionStatisticsForNamespaceResponse{
|
||||
Stats: converter.WorkflowExecutionStatisticsReportToAPI(report),
|
||||
}, nil
|
||||
}
|
||||
|
@@ -5,10 +5,10 @@ import (
|
||||
"errors"
|
||||
"github.com/onepanelio/core/api"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
"github.com/onepanelio/core/server/auth"
|
||||
"github.com/onepanelio/core/server/converter"
|
||||
"time"
|
||||
)
|
||||
|
||||
type WorkflowTemplateServer struct{}
|
||||
@@ -31,17 +31,7 @@ func apiWorkflowTemplate(wft *v1.WorkflowTemplate) *api.WorkflowTemplate {
|
||||
IsArchived: wft.IsArchived,
|
||||
Labels: converter.MappingToKeyValue(wft.Labels),
|
||||
Parameters: converter.ParametersToAPI(wft.Parameters),
|
||||
}
|
||||
|
||||
if wft.WorkflowExecutionStatisticReport != nil {
|
||||
res.Stats = &api.WorkflowExecutionStatisticReport{
|
||||
Total: wft.WorkflowExecutionStatisticReport.Total,
|
||||
LastExecuted: wft.WorkflowExecutionStatisticReport.LastExecuted.Format(time.RFC3339),
|
||||
Running: wft.WorkflowExecutionStatisticReport.Running,
|
||||
Completed: wft.WorkflowExecutionStatisticReport.Completed,
|
||||
Failed: wft.WorkflowExecutionStatisticReport.Failed,
|
||||
Terminated: wft.WorkflowExecutionStatisticReport.Terminated,
|
||||
}
|
||||
Stats: converter.WorkflowExecutionStatisticsReportToAPI(wft.WorkflowExecutionStatisticReport),
|
||||
}
|
||||
|
||||
if wft.CronWorkflowsStatisticsReport != nil {
|
||||
@@ -192,12 +182,15 @@ func (s *WorkflowTemplateServer) ListWorkflowTemplates(ctx context.Context, req
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
filter := v1.WorkflowTemplateFilter{
|
||||
Labels: labelFilter,
|
||||
|
||||
resourceRequest := &request.Request{
|
||||
Pagination: pagination.New(req.Page, req.PageSize),
|
||||
Filter: v1.WorkflowTemplateFilter{
|
||||
Labels: labelFilter,
|
||||
},
|
||||
}
|
||||
|
||||
paginator := pagination.NewRequest(req.Page, req.PageSize)
|
||||
workflowTemplates, err := client.ListWorkflowTemplates(req.Namespace, &paginator, &filter)
|
||||
workflowTemplates, err := client.ListWorkflowTemplates(req.Namespace, resourceRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -207,11 +200,12 @@ func (s *WorkflowTemplateServer) ListWorkflowTemplates(ctx context.Context, req
|
||||
apiWorkflowTemplates = append(apiWorkflowTemplates, apiWorkflowTemplate(wtv))
|
||||
}
|
||||
|
||||
count, err := client.CountWorkflowTemplates(req.Namespace, &filter)
|
||||
count, err := client.CountWorkflowTemplates(req.Namespace, resourceRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paginator := resourceRequest.Pagination
|
||||
return &api.ListWorkflowTemplatesResponse{
|
||||
Count: int32(len(apiWorkflowTemplates)),
|
||||
WorkflowTemplates: apiWorkflowTemplates,
|
||||
|
@@ -6,8 +6,10 @@ import (
|
||||
"github.com/onepanelio/core/api"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/ptr"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
requestSort "github.com/onepanelio/core/pkg/util/request/sort"
|
||||
"github.com/onepanelio/core/server/auth"
|
||||
"github.com/onepanelio/core/server/converter"
|
||||
log "github.com/sirupsen/logrus"
|
||||
@@ -177,6 +179,7 @@ func (s *WorkspaceServer) UpdateWorkspaceStatus(ctx context.Context, req *api.Up
|
||||
status := &v1.WorkspaceStatus{
|
||||
Phase: v1.WorkspacePhase(req.Status.Phase),
|
||||
}
|
||||
|
||||
err = client.UpdateWorkspaceStatus(req.Namespace, req.Uid, status)
|
||||
|
||||
return &empty.Empty{}, err
|
||||
@@ -212,8 +215,25 @@ func (s *WorkspaceServer) ListWorkspaces(ctx context.Context, req *api.ListWorks
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paginator := pagination.NewRequest(req.Page, req.PageSize)
|
||||
workspaces, err := client.ListWorkspaces(req.Namespace, &paginator)
|
||||
labelFilter, err := v1.LabelsFromString(req.Labels)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqSort, err := requestSort.New(req.Order)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resourceRequest := &request.Request{
|
||||
Pagination: pagination.New(req.Page, req.PageSize),
|
||||
Filter: v1.WorkspaceFilter{
|
||||
Labels: labelFilter,
|
||||
Phase: req.Phase,
|
||||
},
|
||||
Sort: reqSort,
|
||||
}
|
||||
|
||||
workspaces, err := client.ListWorkspaces(req.Namespace, resourceRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -227,11 +247,12 @@ func (s *WorkspaceServer) ListWorkspaces(ctx context.Context, req *api.ListWorks
|
||||
apiWorkspaces = append(apiWorkspaces, apiWorkspace(w, sysConfig))
|
||||
}
|
||||
|
||||
count, err := client.CountWorkspaces(req.Namespace)
|
||||
count, err := client.CountWorkspaces(req.Namespace, resourceRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paginator := resourceRequest.Pagination
|
||||
return &api.ListWorkspaceResponse{
|
||||
Count: int32(len(apiWorkspaces)),
|
||||
Workspaces: apiWorkspaces,
|
||||
@@ -276,3 +297,83 @@ func (s *WorkspaceServer) DeleteWorkspace(ctx context.Context, req *api.DeleteWo
|
||||
|
||||
return &empty.Empty{}, err
|
||||
}
|
||||
|
||||
// RetryLastWorkspaceAction will attempt the last action on the workspace again.
|
||||
func (s *WorkspaceServer) RetryLastWorkspaceAction(ctx context.Context, req *api.RetryActionWorkspaceRequest) (*empty.Empty, error) {
|
||||
client := getClient(ctx)
|
||||
|
||||
workspace, err := client.GetWorkspace(req.Namespace, req.Uid)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if workspace == nil {
|
||||
return nil, util.NewUserError(codes.NotFound, "workspace not found")
|
||||
}
|
||||
|
||||
verb := ""
|
||||
switch workspace.Status.Phase {
|
||||
case v1.WorkspaceFailedToLaunch:
|
||||
verb = "create"
|
||||
case v1.WorkspaceFailedToPause:
|
||||
verb = "update"
|
||||
case v1.WorkspaceFailedToResume:
|
||||
verb = "update"
|
||||
case v1.WorkspaceFailedToTerminate:
|
||||
verb = "delete"
|
||||
case v1.WorkspaceFailedToUpdate:
|
||||
verb = "update"
|
||||
default:
|
||||
return nil, util.NewUserError(codes.InvalidArgument, "Workspace is not in a failed state")
|
||||
}
|
||||
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, verb, "onepanel.io", "workspaces", req.Uid)
|
||||
if err != nil || !allowed {
|
||||
return &empty.Empty{}, err
|
||||
}
|
||||
|
||||
switch workspace.Status.Phase {
|
||||
case v1.WorkspaceFailedToLaunch:
|
||||
if _, err := client.StartWorkspace(req.Namespace, workspace); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
case v1.WorkspaceFailedToPause:
|
||||
if err := client.PauseWorkspace(req.Namespace, workspace.UID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
case v1.WorkspaceFailedToResume:
|
||||
if err := client.ResumeWorkspace(req.Namespace, workspace.UID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
case v1.WorkspaceFailedToTerminate:
|
||||
if err := client.DeleteWorkspace(req.Namespace, workspace.UID); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
case v1.WorkspaceFailedToUpdate:
|
||||
if err := client.UpdateWorkspace(req.Namespace, workspace.UID, workspace.Parameters); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
default:
|
||||
return nil, util.NewUserError(codes.InvalidArgument, "Workspace is not in a failed state")
|
||||
}
|
||||
|
||||
return &empty.Empty{}, err
|
||||
}
|
||||
|
||||
// GetWorkspaceStatisticsForNamespace returns statistics on workflow executions for a given namespace
|
||||
func (s *WorkspaceServer) GetWorkspaceStatisticsForNamespace(ctx context.Context, req *api.GetWorkspaceStatisticsForNamespaceRequest) (*api.GetWorkspaceStatisticsForNamespaceResponse, error) {
|
||||
client := getClient(ctx)
|
||||
|
||||
allowed, err := auth.IsAuthorized(client, req.Namespace, "list", "onepanel.io", "workspaces", "")
|
||||
if err != nil || !allowed {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
report, err := client.GetWorkspaceStatisticsForNamespace(req.Namespace)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &api.GetWorkspaceStatisticsForNamespaceResponse{
|
||||
Stats: converter.WorkspaceStatisticsReportToAPI(report),
|
||||
}, nil
|
||||
}
|
||||
|
@@ -5,7 +5,9 @@ import (
|
||||
"github.com/onepanelio/core/api"
|
||||
v1 "github.com/onepanelio/core/pkg"
|
||||
"github.com/onepanelio/core/pkg/util"
|
||||
"github.com/onepanelio/core/pkg/util/pagination"
|
||||
"github.com/onepanelio/core/pkg/util/request"
|
||||
"github.com/onepanelio/core/pkg/util/request/pagination"
|
||||
requestSort "github.com/onepanelio/core/pkg/util/request/sort"
|
||||
"github.com/onepanelio/core/server/auth"
|
||||
"github.com/onepanelio/core/server/converter"
|
||||
"google.golang.org/grpc/codes"
|
||||
@@ -135,8 +137,25 @@ func (s *WorkspaceTemplateServer) ListWorkspaceTemplates(ctx context.Context, re
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paginator := pagination.NewRequest(req.Page, req.PageSize)
|
||||
workspaceTemplates, err := client.ListWorkspaceTemplates(req.Namespace, &paginator)
|
||||
labelFilter, err := v1.LabelsFromString(req.Labels)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
reqSort, err := requestSort.New(req.Order)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
resourceRequest := &request.Request{
|
||||
Pagination: pagination.New(req.Page, req.PageSize),
|
||||
Filter: v1.WorkspaceTemplateFilter{
|
||||
Labels: labelFilter,
|
||||
UID: req.Uid,
|
||||
},
|
||||
Sort: reqSort,
|
||||
}
|
||||
|
||||
workspaceTemplates, err := client.ListWorkspaceTemplates(req.Namespace, resourceRequest)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -151,6 +170,7 @@ func (s *WorkspaceTemplateServer) ListWorkspaceTemplates(ctx context.Context, re
|
||||
return nil, err
|
||||
}
|
||||
|
||||
paginator := resourceRequest.Pagination
|
||||
return &api.ListWorkspaceTemplatesResponse{
|
||||
Count: int32(len(apiWorkspaceTemplates)),
|
||||
WorkspaceTemplates: apiWorkspaceTemplates,
|
||||
|
Reference in New Issue
Block a user