keeps-learn-nexus-proto 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- keeps_learn_nexus_proto-0.4.0/.github/workflows/publish.yml +44 -0
- keeps_learn_nexus_proto-0.4.0/.gitignore +8 -0
- keeps_learn_nexus_proto-0.4.0/.npmrc +2 -0
- keeps_learn_nexus_proto-0.4.0/MANIFEST.in +4 -0
- keeps_learn_nexus_proto-0.4.0/PKG-INFO +67 -0
- keeps_learn_nexus_proto-0.4.0/PUBLISH.md +51 -0
- keeps_learn_nexus_proto-0.4.0/PYTHON_USAGE.md +129 -0
- keeps_learn_nexus_proto-0.4.0/README.md +38 -0
- keeps_learn_nexus_proto-0.4.0/keeps_learn_nexus_proto.egg-info/PKG-INFO +67 -0
- keeps_learn_nexus_proto-0.4.0/keeps_learn_nexus_proto.egg-info/SOURCES.txt +21 -0
- keeps_learn_nexus_proto-0.4.0/keeps_learn_nexus_proto.egg-info/dependency_links.txt +1 -0
- keeps_learn_nexus_proto-0.4.0/keeps_learn_nexus_proto.egg-info/top_level.txt +1 -0
- keeps_learn_nexus_proto-0.4.0/nexus_proto/__init__.py +37 -0
- keeps_learn_nexus_proto-0.4.0/package.json +23 -0
- keeps_learn_nexus_proto-0.4.0/protos/certificate-manager/custom_certificates.proto +37 -0
- keeps_learn_nexus_proto-0.4.0/protos/custom-sections/sections.proto +39 -0
- keeps_learn_nexus_proto-0.4.0/protos/konquest/mission.proto +27 -0
- keeps_learn_nexus_proto-0.4.0/protos/konquest/mission_enrollment.proto +74 -0
- keeps_learn_nexus_proto-0.4.0/protos/myaccount/users.proto +113 -0
- keeps_learn_nexus_proto-0.4.0/protos/myaccount/workspaces.proto +37 -0
- keeps_learn_nexus_proto-0.4.0/pyproject.toml +40 -0
- keeps_learn_nexus_proto-0.4.0/setup.cfg +4 -0
- keeps_learn_nexus_proto-0.4.0/setup.py +41 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Publish npm and PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish-npm:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: '18'
|
|
17
|
+
registry-url: 'https://registry.npmjs.org'
|
|
18
|
+
|
|
19
|
+
- name: Publish to npm
|
|
20
|
+
run: npm publish --access public
|
|
21
|
+
env:
|
|
22
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
23
|
+
|
|
24
|
+
publish-pypi:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- uses: actions/setup-python@v4
|
|
30
|
+
with:
|
|
31
|
+
python-version: '3.11'
|
|
32
|
+
|
|
33
|
+
- name: Install build dependencies
|
|
34
|
+
run: pip install build twine
|
|
35
|
+
|
|
36
|
+
- name: Build distribution
|
|
37
|
+
run: python -m build
|
|
38
|
+
|
|
39
|
+
- name: Publish to PyPI
|
|
40
|
+
run: twine upload dist/*
|
|
41
|
+
env:
|
|
42
|
+
TWINE_USERNAME: __token__
|
|
43
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
44
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: keeps-learn-nexus-proto
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Shared Protocol Buffer definitions for Nexus microservices
|
|
5
|
+
Home-page: https://github.com/Keeps-Learn/nexus-proto
|
|
6
|
+
Author: Keeps
|
|
7
|
+
Author-email: Keeps <dev@keeps.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://github.com/Keeps-Learn/nexus-proto
|
|
10
|
+
Project-URL: Repository, https://github.com/Keeps-Learn/nexus-proto.git
|
|
11
|
+
Project-URL: Issues, https://github.com/Keeps-Learn/nexus-proto/issues
|
|
12
|
+
Keywords: grpc,protobuf,proto,microservices
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
23
|
+
Classifier: Topic :: Communications
|
|
24
|
+
Requires-Python: >=3.7
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: home-page
|
|
28
|
+
Dynamic: requires-python
|
|
29
|
+
|
|
30
|
+
# Nexus Proto
|
|
31
|
+
|
|
32
|
+
Shared Protocol Buffer definitions for Nexus microservices.
|
|
33
|
+
|
|
34
|
+
## Why "Nexus"?
|
|
35
|
+
|
|
36
|
+
The name **Nexus** was chosen to represent the **central connection** between microservices. In many languages, "nexus" refers to a point of intersection or link, which is exactly what this project provides: an efficient hub for communication between distributed services built in different technologies. The idea is to create a convergence point that makes it easier to integrate systems, ensuring consistent and scalable communication, no matter the language or framework used. **Nexus** is the solution that connects and unites services in a simple and effective way.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- **Centralized Protocol Definitions**: All communication contracts are defined in a shared repository of `.proto` files.
|
|
41
|
+
- **Multi-Language Support**: Easily integrate microservices written in different programming languages (e.g., Python, Node.js, Java, etc.).
|
|
42
|
+
- **Scalable Communication**: Easily extend the system as new microservices are added to the architecture.
|
|
43
|
+
- **gRPC-powered**: Leveraging gRPC for high-performance communication with built-in support for multiple programming languages.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install @Keeps-Learn/nexus-proto
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
Access proto files from `protos/` directory:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
node_modules/@keeps-learn/nexus-proto/protos/users.proto
|
|
57
|
+
node_modules/@keeps-learn/nexus-proto/protos/workspaces.proto
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Publishing
|
|
61
|
+
|
|
62
|
+
1. Update version in `package.json`
|
|
63
|
+
2. Commit: `git commit -m "Bump version to X.Y.Z"`
|
|
64
|
+
3. Tag: `git tag vX.Y.Z`
|
|
65
|
+
4. Push: `git push origin vX.Y.Z`
|
|
66
|
+
|
|
67
|
+
GitHub Actions publishes automatically to `npmjs.com`
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Como Publicar
|
|
2
|
+
|
|
3
|
+
## 1. Atualizar versão
|
|
4
|
+
|
|
5
|
+
Editar `package.json` e atualizar o campo `version`:
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"version": "0.2.0"
|
|
10
|
+
}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 2. Commit
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git add .
|
|
17
|
+
git commit -m "Bump version to 0.2.0"
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 3. Tag
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
git tag v0.2.0
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 4. Push
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git push origin main
|
|
30
|
+
git push origin v0.2.0
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## 5. Pronto!
|
|
34
|
+
|
|
35
|
+
GitHub Actions publica automaticamente em `npm.pkg.github.com`
|
|
36
|
+
|
|
37
|
+
Verificar em: https://github.com/keeps/nexus-proto/actions
|
|
38
|
+
|
|
39
|
+
## Instalar
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm install @Keeps-Learn/nexus-proto
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Usar
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
node_modules/@keeps/nexus-proto/protos/users.proto
|
|
49
|
+
node_modules/@keeps/nexus-proto/protos/workspaces.proto
|
|
50
|
+
```
|
|
51
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Como Usar keeps-learn-nexus-proto (Python)
|
|
2
|
+
|
|
3
|
+
## 1. Instalar o Pacote
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install keeps-learn-nexus-proto
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 2. Nenhuma Configuração Necessária!
|
|
10
|
+
|
|
11
|
+
O pacote está publicado em PyPI público, então não precisa de token ou configuração especial.
|
|
12
|
+
|
|
13
|
+
Basta instalar e usar!
|
|
14
|
+
|
|
15
|
+
## 3. Usar nos Arquivos
|
|
16
|
+
|
|
17
|
+
### Opção A: Obter Caminho do Proto
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from keeps_learn_nexus_proto import get_proto_path, get_proto_dir
|
|
21
|
+
|
|
22
|
+
# Obter caminho de um proto específico
|
|
23
|
+
users_proto = get_proto_path('users')
|
|
24
|
+
workspaces_proto = get_proto_path('workspaces')
|
|
25
|
+
|
|
26
|
+
print(f"Users proto: {users_proto}")
|
|
27
|
+
print(f"Workspaces proto: {workspaces_proto}")
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Opção B: Usar com gRPC
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from grpc_tools import protoc
|
|
34
|
+
from keeps_learn_nexus_proto import get_proto_dir
|
|
35
|
+
|
|
36
|
+
# Compilar proto files
|
|
37
|
+
protoc.main((
|
|
38
|
+
'grpc_tools.protoc',
|
|
39
|
+
'-I' + get_proto_dir(),
|
|
40
|
+
'--python_out=.',
|
|
41
|
+
'--grpc_python_out=.',
|
|
42
|
+
'users.proto',
|
|
43
|
+
))
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Opção C: Usar com FastAPI + gRPC
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
from keeps_learn_nexus_proto import get_proto_path
|
|
50
|
+
import grpc
|
|
51
|
+
from concurrent import futures
|
|
52
|
+
|
|
53
|
+
# Usar o caminho do proto
|
|
54
|
+
proto_path = get_proto_path('users')
|
|
55
|
+
|
|
56
|
+
# Configurar seu servidor gRPC
|
|
57
|
+
server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
|
|
58
|
+
# ... adicionar seus serviços
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 4. Estrutura de Arquivos
|
|
62
|
+
|
|
63
|
+
Os arquivos proto estão em:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
site-packages/keeps_learn_nexus_proto/
|
|
67
|
+
├── __init__.py
|
|
68
|
+
└── ../protos/
|
|
69
|
+
├── users.proto
|
|
70
|
+
├── workspaces.proto
|
|
71
|
+
├── certificate-manager/
|
|
72
|
+
├── custom-sections/
|
|
73
|
+
├── konquest/
|
|
74
|
+
├── myaccount/
|
|
75
|
+
├── notification/
|
|
76
|
+
├── search/
|
|
77
|
+
└── sisyphus/
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## 5. Atualizar Quando Houver Novas Versões
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
pip install --upgrade keeps-learn-nexus-proto
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## 6. Verificar Versão Instalada
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip show keeps-learn-nexus-proto
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Benefícios
|
|
93
|
+
|
|
94
|
+
✓ Nenhum token necessário
|
|
95
|
+
✓ Qualquer desenvolvedor consegue usar
|
|
96
|
+
✓ Fácil atualizar versão
|
|
97
|
+
✓ Compartilhado entre múltiplos projetos
|
|
98
|
+
✓ Sem duplicação de código
|
|
99
|
+
✓ Funciona com Python 3.7+
|
|
100
|
+
|
|
101
|
+
## Troubleshooting
|
|
102
|
+
|
|
103
|
+
### Erro: "ModuleNotFoundError: No module named 'keeps_learn_nexus_proto'"
|
|
104
|
+
|
|
105
|
+
Verifique se o pacote está instalado:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pip list | grep keeps-learn-nexus-proto
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Se não estiver, instale:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
pip install keeps-learn-nexus-proto
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Erro: "Proto file not found"
|
|
118
|
+
|
|
119
|
+
Verifique o caminho do arquivo proto:
|
|
120
|
+
|
|
121
|
+
```python
|
|
122
|
+
from keeps_learn_nexus_proto import get_proto_dir
|
|
123
|
+
import os
|
|
124
|
+
|
|
125
|
+
proto_dir = get_proto_dir()
|
|
126
|
+
print(f"Proto directory: {proto_dir}")
|
|
127
|
+
print(f"Files: {os.listdir(proto_dir)}")
|
|
128
|
+
```
|
|
129
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Nexus Proto
|
|
2
|
+
|
|
3
|
+
Shared Protocol Buffer definitions for Nexus microservices.
|
|
4
|
+
|
|
5
|
+
## Why "Nexus"?
|
|
6
|
+
|
|
7
|
+
The name **Nexus** was chosen to represent the **central connection** between microservices. In many languages, "nexus" refers to a point of intersection or link, which is exactly what this project provides: an efficient hub for communication between distributed services built in different technologies. The idea is to create a convergence point that makes it easier to integrate systems, ensuring consistent and scalable communication, no matter the language or framework used. **Nexus** is the solution that connects and unites services in a simple and effective way.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Centralized Protocol Definitions**: All communication contracts are defined in a shared repository of `.proto` files.
|
|
12
|
+
- **Multi-Language Support**: Easily integrate microservices written in different programming languages (e.g., Python, Node.js, Java, etc.).
|
|
13
|
+
- **Scalable Communication**: Easily extend the system as new microservices are added to the architecture.
|
|
14
|
+
- **gRPC-powered**: Leveraging gRPC for high-performance communication with built-in support for multiple programming languages.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm install @Keeps-Learn/nexus-proto
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
Access proto files from `protos/` directory:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node_modules/@keeps-learn/nexus-proto/protos/users.proto
|
|
28
|
+
node_modules/@keeps-learn/nexus-proto/protos/workspaces.proto
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Publishing
|
|
32
|
+
|
|
33
|
+
1. Update version in `package.json`
|
|
34
|
+
2. Commit: `git commit -m "Bump version to X.Y.Z"`
|
|
35
|
+
3. Tag: `git tag vX.Y.Z`
|
|
36
|
+
4. Push: `git push origin vX.Y.Z`
|
|
37
|
+
|
|
38
|
+
GitHub Actions publishes automatically to `npmjs.com`
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: keeps-learn-nexus-proto
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Shared Protocol Buffer definitions for Nexus microservices
|
|
5
|
+
Home-page: https://github.com/Keeps-Learn/nexus-proto
|
|
6
|
+
Author: Keeps
|
|
7
|
+
Author-email: Keeps <dev@keeps.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Homepage, https://github.com/Keeps-Learn/nexus-proto
|
|
10
|
+
Project-URL: Repository, https://github.com/Keeps-Learn/nexus-proto.git
|
|
11
|
+
Project-URL: Issues, https://github.com/Keeps-Learn/nexus-proto/issues
|
|
12
|
+
Keywords: grpc,protobuf,proto,microservices
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
23
|
+
Classifier: Topic :: Communications
|
|
24
|
+
Requires-Python: >=3.7
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
Dynamic: author
|
|
27
|
+
Dynamic: home-page
|
|
28
|
+
Dynamic: requires-python
|
|
29
|
+
|
|
30
|
+
# Nexus Proto
|
|
31
|
+
|
|
32
|
+
Shared Protocol Buffer definitions for Nexus microservices.
|
|
33
|
+
|
|
34
|
+
## Why "Nexus"?
|
|
35
|
+
|
|
36
|
+
The name **Nexus** was chosen to represent the **central connection** between microservices. In many languages, "nexus" refers to a point of intersection or link, which is exactly what this project provides: an efficient hub for communication between distributed services built in different technologies. The idea is to create a convergence point that makes it easier to integrate systems, ensuring consistent and scalable communication, no matter the language or framework used. **Nexus** is the solution that connects and unites services in a simple and effective way.
|
|
37
|
+
|
|
38
|
+
## Features
|
|
39
|
+
|
|
40
|
+
- **Centralized Protocol Definitions**: All communication contracts are defined in a shared repository of `.proto` files.
|
|
41
|
+
- **Multi-Language Support**: Easily integrate microservices written in different programming languages (e.g., Python, Node.js, Java, etc.).
|
|
42
|
+
- **Scalable Communication**: Easily extend the system as new microservices are added to the architecture.
|
|
43
|
+
- **gRPC-powered**: Leveraging gRPC for high-performance communication with built-in support for multiple programming languages.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install @Keeps-Learn/nexus-proto
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Usage
|
|
52
|
+
|
|
53
|
+
Access proto files from `protos/` directory:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
node_modules/@keeps-learn/nexus-proto/protos/users.proto
|
|
57
|
+
node_modules/@keeps-learn/nexus-proto/protos/workspaces.proto
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Publishing
|
|
61
|
+
|
|
62
|
+
1. Update version in `package.json`
|
|
63
|
+
2. Commit: `git commit -m "Bump version to X.Y.Z"`
|
|
64
|
+
3. Tag: `git tag vX.Y.Z`
|
|
65
|
+
4. Push: `git push origin vX.Y.Z`
|
|
66
|
+
|
|
67
|
+
GitHub Actions publishes automatically to `npmjs.com`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmrc
|
|
3
|
+
MANIFEST.in
|
|
4
|
+
PUBLISH.md
|
|
5
|
+
PYTHON_USAGE.md
|
|
6
|
+
README.md
|
|
7
|
+
package.json
|
|
8
|
+
pyproject.toml
|
|
9
|
+
setup.py
|
|
10
|
+
.github/workflows/publish.yml
|
|
11
|
+
keeps_learn_nexus_proto.egg-info/PKG-INFO
|
|
12
|
+
keeps_learn_nexus_proto.egg-info/SOURCES.txt
|
|
13
|
+
keeps_learn_nexus_proto.egg-info/dependency_links.txt
|
|
14
|
+
keeps_learn_nexus_proto.egg-info/top_level.txt
|
|
15
|
+
nexus_proto/__init__.py
|
|
16
|
+
protos/certificate-manager/custom_certificates.proto
|
|
17
|
+
protos/custom-sections/sections.proto
|
|
18
|
+
protos/konquest/mission.proto
|
|
19
|
+
protos/konquest/mission_enrollment.proto
|
|
20
|
+
protos/myaccount/users.proto
|
|
21
|
+
protos/myaccount/workspaces.proto
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nexus_proto
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Nexus Proto - Shared Protocol Buffer definitions for Nexus microservices
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
__version__ = "0.4.0"
|
|
6
|
+
__author__ = "Keeps"
|
|
7
|
+
__license__ = "MIT"
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
# Get the path to the protos directory
|
|
13
|
+
PROTO_DIR = os.path.join(os.path.dirname(__file__), '..', 'protos')
|
|
14
|
+
|
|
15
|
+
def get_proto_path(proto_name: str) -> str:
|
|
16
|
+
"""
|
|
17
|
+
Get the full path to a proto file.
|
|
18
|
+
|
|
19
|
+
Args:
|
|
20
|
+
proto_name: Name of the proto file (e.g., 'users', 'workspaces')
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
Full path to the proto file
|
|
24
|
+
"""
|
|
25
|
+
return os.path.join(PROTO_DIR, f'{proto_name}.proto')
|
|
26
|
+
|
|
27
|
+
def get_proto_dir() -> str:
|
|
28
|
+
"""
|
|
29
|
+
Get the path to the protos directory.
|
|
30
|
+
|
|
31
|
+
Returns:
|
|
32
|
+
Path to the protos directory
|
|
33
|
+
"""
|
|
34
|
+
return PROTO_DIR
|
|
35
|
+
|
|
36
|
+
__all__ = ['get_proto_path', 'get_proto_dir', 'PROTO_DIR']
|
|
37
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@keeps-learn/nexus-proto",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Shared Protocol Buffer definitions for Nexus microservices",
|
|
5
|
+
"files": [
|
|
6
|
+
"protos/**/*.proto"
|
|
7
|
+
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Keeps-Learn/nexus-proto.git"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"grpc",
|
|
14
|
+
"protobuf",
|
|
15
|
+
"proto",
|
|
16
|
+
"microservices"
|
|
17
|
+
],
|
|
18
|
+
"author": "Keeps",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"registry": "https://registry.npmjs.org"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package custom_certificates;
|
|
4
|
+
|
|
5
|
+
enum CertificateTemplate {
|
|
6
|
+
MISSION = 0;
|
|
7
|
+
TRAIL = 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message CertificateData {
|
|
11
|
+
optional string learn_content_id = 1;
|
|
12
|
+
CertificateTemplate template = 2;
|
|
13
|
+
optional string language = 3;
|
|
14
|
+
string user_name = 4;
|
|
15
|
+
string performance = 5;
|
|
16
|
+
string time = 6;
|
|
17
|
+
string date_finish = 7;
|
|
18
|
+
string course_name = 8;
|
|
19
|
+
repeated CourseContent contents = 9;
|
|
20
|
+
string workspace_id = 10;
|
|
21
|
+
optional string signed_by = 11;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message CourseContent {
|
|
25
|
+
string title = 1;
|
|
26
|
+
string time = 2;
|
|
27
|
+
string description = 3;
|
|
28
|
+
string performance = 4;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message GenerateCertificateResponse {
|
|
32
|
+
string url = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
service PdfService {
|
|
36
|
+
rpc GenerateCertificate (CertificateData) returns (GenerateCertificateResponse);
|
|
37
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package sections;
|
|
4
|
+
|
|
5
|
+
service SectionService {
|
|
6
|
+
rpc Get (ListSectionsRequest) returns (ListSectionsResponse);
|
|
7
|
+
rpc GetById (GetSectionByIdRequest) returns (GetSectionByIdResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message ListSectionsRequest {
|
|
11
|
+
map<string, FilterValues> filters = 2;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message FilterValues {
|
|
15
|
+
repeated string values = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message Section {
|
|
19
|
+
string id = 1;
|
|
20
|
+
string title = 2;
|
|
21
|
+
string description = 3;
|
|
22
|
+
string learningObjectType = 4;
|
|
23
|
+
string startDate = 5;
|
|
24
|
+
string endDate = 6;
|
|
25
|
+
int32 order = 7;
|
|
26
|
+
map<string, FilterValues> filters = 8;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message ListSectionsResponse {
|
|
30
|
+
repeated Section items = 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message GetSectionByIdRequest {
|
|
34
|
+
string id = 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message GetSectionByIdResponse {
|
|
38
|
+
Section section = 1;
|
|
39
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package mission;
|
|
4
|
+
|
|
5
|
+
message Filters {
|
|
6
|
+
repeated string mission_model = 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message Mission {
|
|
10
|
+
string id = 1;
|
|
11
|
+
string name = 2;
|
|
12
|
+
string description = 3;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message MissionListRecommendationResponse {
|
|
16
|
+
repeated Mission items = 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message MissionRecommendationRequest {
|
|
20
|
+
string user_id = 1;
|
|
21
|
+
string language = 2;
|
|
22
|
+
optional Filters filters = 3;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
service MissionRecommendationService {
|
|
26
|
+
rpc Get(MissionRecommendationRequest) returns (MissionListRecommendationResponse);
|
|
27
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package mission_enrollment;
|
|
4
|
+
|
|
5
|
+
message Filters {
|
|
6
|
+
string status = 1;
|
|
7
|
+
float performance__gte = 2;
|
|
8
|
+
float performance__lte = 3;
|
|
9
|
+
string start_date__gte = 4;
|
|
10
|
+
string start_date__lte = 5;
|
|
11
|
+
string end_date__gte = 6;
|
|
12
|
+
string end_date__lte = 7;
|
|
13
|
+
string goal_date__gte = 8;
|
|
14
|
+
string goal_date__lte = 9;
|
|
15
|
+
string job_position = 10;
|
|
16
|
+
string job_function = 11;
|
|
17
|
+
string director = 12;
|
|
18
|
+
string manager = 13;
|
|
19
|
+
string area_of_activity = 14;
|
|
20
|
+
string end_date__range = 15;
|
|
21
|
+
string start_date__range = 16;
|
|
22
|
+
string goal_date__range = 17;
|
|
23
|
+
string id = 18;
|
|
24
|
+
int32 days_late = 19;
|
|
25
|
+
string mission = 20;
|
|
26
|
+
string user = 21;
|
|
27
|
+
string mission__user_creator = 22;
|
|
28
|
+
string mission_id = 23;
|
|
29
|
+
string end_date = 24;
|
|
30
|
+
string start_date = 25;
|
|
31
|
+
string give_up = 26;
|
|
32
|
+
string performance = 27;
|
|
33
|
+
string goal_date = 28;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message Mission {
|
|
37
|
+
string id = 1;
|
|
38
|
+
string name = 2;
|
|
39
|
+
string mission_model = 3;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message User {
|
|
43
|
+
string id = 1;
|
|
44
|
+
string name = 2;
|
|
45
|
+
string email = 3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message MissionEnrollment {
|
|
49
|
+
string id = 1;
|
|
50
|
+
string status = 2;
|
|
51
|
+
bool in_progress = 3;
|
|
52
|
+
Mission mission = 4;
|
|
53
|
+
User user = 5;
|
|
54
|
+
bool evaluated = 6;
|
|
55
|
+
optional string created_date = 7;
|
|
56
|
+
string updated_date = 8;
|
|
57
|
+
optional float points = 9;
|
|
58
|
+
optional float performance = 10;
|
|
59
|
+
optional string start_date = 11;
|
|
60
|
+
optional string end_date = 12;
|
|
61
|
+
optional string goal_date = 13;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message MissionEnrollmentRequest {
|
|
65
|
+
Filters filters = 2;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message MissionEnrollmentListResponse {
|
|
69
|
+
repeated MissionEnrollment items = 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
service MissionEnrollmentService {
|
|
73
|
+
rpc Get (MissionEnrollmentRequest) returns (MissionEnrollmentListResponse);
|
|
74
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package users;
|
|
4
|
+
|
|
5
|
+
service UserService {
|
|
6
|
+
rpc Get(GetUsersRequest) returns (UserListResponse);
|
|
7
|
+
rpc CreateUser(CreateUsersRequest) returns (CreateUsersResponse);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message CreateUsersRequest {
|
|
11
|
+
repeated UserData users = 1;
|
|
12
|
+
repeated string permissions = 2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message CreateUsersResponse {
|
|
16
|
+
repeated BatchResultDto users = 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message BatchResultDto {
|
|
20
|
+
string email = 1;
|
|
21
|
+
optional string error = 2;
|
|
22
|
+
optional string id = 3;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message UserData {
|
|
26
|
+
string email = 1;
|
|
27
|
+
string name = 2;
|
|
28
|
+
optional string ein = 3;
|
|
29
|
+
optional string job = 4;
|
|
30
|
+
optional string password = 5;
|
|
31
|
+
optional IdentityProvider identity_provider = 6;
|
|
32
|
+
optional EmployeeInfoCreate profile = 7;
|
|
33
|
+
optional string additional_data = 8;
|
|
34
|
+
optional string nickname = 9;
|
|
35
|
+
optional string secondary_email = 10;
|
|
36
|
+
optional string phone = 11;
|
|
37
|
+
optional string gender = 12;
|
|
38
|
+
optional string birthday = 13;
|
|
39
|
+
optional string address = 14;
|
|
40
|
+
optional string avatar = 15;
|
|
41
|
+
optional bool status = 16;
|
|
42
|
+
optional bool is_user_integration = 17;
|
|
43
|
+
optional string language_id = 18;
|
|
44
|
+
optional string country = 19;
|
|
45
|
+
optional string related_user_leader_id = 20;
|
|
46
|
+
optional string related_user_leader = 21;
|
|
47
|
+
optional bool email_verified = 22;
|
|
48
|
+
optional string time_zone = 23;
|
|
49
|
+
optional string admission_date = 24;
|
|
50
|
+
optional string contract_type = 25;
|
|
51
|
+
optional string cpf = 26;
|
|
52
|
+
optional string education = 27;
|
|
53
|
+
optional string ethnicity = 28;
|
|
54
|
+
optional string hierarchical_level = 29;
|
|
55
|
+
optional string marital_status = 30;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message IdentityProvider {
|
|
59
|
+
optional string alias = 1;
|
|
60
|
+
optional string user_id = 2;
|
|
61
|
+
optional string user_name = 3;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
message EmployeeInfoCreate {
|
|
65
|
+
optional string id = 1;
|
|
66
|
+
optional string job_function_id = 2;
|
|
67
|
+
optional string job_position_id = 3;
|
|
68
|
+
optional string director = 4;
|
|
69
|
+
optional string manager = 5;
|
|
70
|
+
optional string area_of_activity = 6;
|
|
71
|
+
optional string user_id = 7;
|
|
72
|
+
optional string workspace_id = 8;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
service InvitationService {
|
|
76
|
+
rpc ResendInvitation(ResendInvitationRequest) returns (ResendInvitationResponse);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message GetUsersRequest {
|
|
80
|
+
int32 page = 1;
|
|
81
|
+
int32 limit = 2;
|
|
82
|
+
string search = 3;
|
|
83
|
+
repeated string search_by = 4;
|
|
84
|
+
repeated string select = 5;
|
|
85
|
+
repeated string sort_by = 6;
|
|
86
|
+
map<string, FilterValues> filters = 7;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
message FilterValues {
|
|
90
|
+
repeated string values = 1;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message UserListResponse {
|
|
94
|
+
repeated User items = 1;
|
|
95
|
+
int32 total = 2;
|
|
96
|
+
int32 page = 3;
|
|
97
|
+
int32 limit = 4;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
message User {
|
|
101
|
+
string id = 1;
|
|
102
|
+
string email = 2;
|
|
103
|
+
string name = 3;
|
|
104
|
+
bool status = 4;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
message ResendInvitationRequest {
|
|
108
|
+
string userId = 1;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message ResendInvitationResponse {
|
|
112
|
+
string status = 1;
|
|
113
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package workspaces;
|
|
4
|
+
|
|
5
|
+
service WorkspacesService {
|
|
6
|
+
rpc Get(GetWorkspacesRequest) returns (WorkspaceListResponse);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message GetWorkspacesRequest {
|
|
10
|
+
map<string, FilterValues> filters = 7;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message FilterValues {
|
|
14
|
+
repeated string values = 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message WorkspaceListResponse {
|
|
18
|
+
repeated Workspace items = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message Workspace {
|
|
22
|
+
string id = 1;
|
|
23
|
+
string name = 2;
|
|
24
|
+
string description = 3;
|
|
25
|
+
string address = 4;
|
|
26
|
+
string city = 5;
|
|
27
|
+
string country = 6;
|
|
28
|
+
string iconUrl = 7;
|
|
29
|
+
string logoUrl = 8;
|
|
30
|
+
string postCode = 9;
|
|
31
|
+
string state = 10;
|
|
32
|
+
string themeId = 11;
|
|
33
|
+
bool themeDark = 12;
|
|
34
|
+
string companyId = 13;
|
|
35
|
+
bool status = 14;
|
|
36
|
+
string hashId = 15;
|
|
37
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "keeps-learn-nexus-proto"
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "Shared Protocol Buffer definitions for Nexus microservices"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.7"
|
|
11
|
+
license = {text = "MIT"}
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Keeps", email = "dev@keeps.com"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["grpc", "protobuf", "proto", "microservices"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.7",
|
|
22
|
+
"Programming Language :: Python :: 3.8",
|
|
23
|
+
"Programming Language :: Python :: 3.9",
|
|
24
|
+
"Programming Language :: Python :: 3.10",
|
|
25
|
+
"Programming Language :: Python :: 3.11",
|
|
26
|
+
"Topic :: Software Development :: Libraries",
|
|
27
|
+
"Topic :: Communications",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/Keeps-Learn/nexus-proto"
|
|
32
|
+
Repository = "https://github.com/Keeps-Learn/nexus-proto.git"
|
|
33
|
+
Issues = "https://github.com/Keeps-Learn/nexus-proto/issues"
|
|
34
|
+
|
|
35
|
+
[tool.setuptools]
|
|
36
|
+
packages = ["nexus_proto"]
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.package-data]
|
|
39
|
+
nexus_proto = ["**/*.proto"]
|
|
40
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from setuptools import find_packages, setup
|
|
4
|
+
|
|
5
|
+
# Read the contents of README file
|
|
6
|
+
this_directory = os.path.abspath(os.path.dirname(__file__))
|
|
7
|
+
with open(os.path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
|
8
|
+
long_description = f.read()
|
|
9
|
+
|
|
10
|
+
setup(
|
|
11
|
+
name='keeps-learn-nexus-proto',
|
|
12
|
+
version='0.4.0',
|
|
13
|
+
description='Shared Protocol Buffer definitions for Nexus microservices',
|
|
14
|
+
long_description=long_description,
|
|
15
|
+
long_description_content_type='text/markdown',
|
|
16
|
+
author='Keeps',
|
|
17
|
+
author_email='dev@keeps.com',
|
|
18
|
+
url='https://github.com/Keeps-Learn/nexus-proto',
|
|
19
|
+
license='MIT',
|
|
20
|
+
packages=find_packages(),
|
|
21
|
+
package_data={
|
|
22
|
+
'': ['**/*.proto'],
|
|
23
|
+
},
|
|
24
|
+
include_package_data=True,
|
|
25
|
+
python_requires='>=3.7',
|
|
26
|
+
classifiers=[
|
|
27
|
+
'Development Status :: 4 - Beta',
|
|
28
|
+
'Intended Audience :: Developers',
|
|
29
|
+
'License :: OSI Approved :: MIT License',
|
|
30
|
+
'Programming Language :: Python :: 3',
|
|
31
|
+
'Programming Language :: Python :: 3.7',
|
|
32
|
+
'Programming Language :: Python :: 3.8',
|
|
33
|
+
'Programming Language :: Python :: 3.9',
|
|
34
|
+
'Programming Language :: Python :: 3.10',
|
|
35
|
+
'Programming Language :: Python :: 3.11',
|
|
36
|
+
'Topic :: Software Development :: Libraries',
|
|
37
|
+
'Topic :: Communications',
|
|
38
|
+
],
|
|
39
|
+
keywords='grpc protobuf proto microservices',
|
|
40
|
+
)
|
|
41
|
+
|