core-system-grpc 0.2.55__py3-none-any.whl
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.
- core_system_grpc-0.2.55.dist-info/METADATA +143 -0
- core_system_grpc-0.2.55.dist-info/RECORD +26 -0
- core_system_grpc-0.2.55.dist-info/WHEEL +4 -0
- generated/python/__init__.py +23 -0
- generated/python/messages/__init__.py +0 -0
- generated/python/messages/common/__init__.py +0 -0
- generated/python/messages/common/pagination_pb2.py +38 -0
- generated/python/messages/common/pagination_pb2.pyi +23 -0
- generated/python/messages/common/pagination_pb2_grpc.py +24 -0
- generated/python/messages/common/search_pb2.py +40 -0
- generated/python/messages/common/search_pb2.pyi +29 -0
- generated/python/messages/common/search_pb2_grpc.py +24 -0
- generated/python/messages/product/__init__.py +0 -0
- generated/python/messages/product/common_pb2.py +36 -0
- generated/python/messages/product/common_pb2.pyi +15 -0
- generated/python/messages/product/common_pb2_grpc.py +24 -0
- generated/python/messages/product/request_pb2.py +38 -0
- generated/python/messages/product/request_pb2.pyi +26 -0
- generated/python/messages/product/request_pb2_grpc.py +24 -0
- generated/python/messages/product/response_pb2.py +38 -0
- generated/python/messages/product/response_pb2.pyi +17 -0
- generated/python/messages/product/response_pb2_grpc.py +24 -0
- generated/python/services/__init__.py +0 -0
- generated/python/services/product_service_pb2.py +40 -0
- generated/python/services/product_service_pb2.pyi +11 -0
- generated/python/services/product_service_pb2_grpc.py +101 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: core_system_grpc
|
|
3
|
+
Version: 0.2.55
|
|
4
|
+
Summary: Core System gRPC Package - Python Proto Specifications and Client Libraries
|
|
5
|
+
Project-URL: Repository, https://github.com/your-org/core-system-grpc-package
|
|
6
|
+
Project-URL: Issues, https://github.com/your-org/core-system-grpc-package/issues
|
|
7
|
+
Author-email: Core System Team <dev@example.com>
|
|
8
|
+
License: MIT
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Requires-Dist: grpcio>=1.50.0
|
|
11
|
+
Requires-Dist: protobuf>=4.21.0
|
|
12
|
+
Provides-Extra: dev
|
|
13
|
+
Requires-Dist: grpcio-tools>=1.50.0; extra == 'dev'
|
|
14
|
+
Requires-Dist: hatch; extra == 'dev'
|
|
15
|
+
Requires-Dist: hatchling; extra == 'dev'
|
|
16
|
+
Requires-Dist: mypy-protobuf>=3.4.0; extra == 'dev'
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# Core System gRPC Package
|
|
20
|
+
|
|
21
|
+
이 패키지는 Core System의 gRPC 프로토 파일과 생성된 Python 클라이언트 라이브러리를 관리합니다.
|
|
22
|
+
|
|
23
|
+
## 구조
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Core-System-gRPC-Package/
|
|
27
|
+
├── proto/ # 프로토 파일들
|
|
28
|
+
│ ├── customer.proto
|
|
29
|
+
│ └── ...
|
|
30
|
+
├── generated/ # 생성된 클라이언트 라이브러리
|
|
31
|
+
│ └── python/
|
|
32
|
+
├── scripts/ # 빌드 스크립트들
|
|
33
|
+
└── docs/ # API 문서
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 사용법
|
|
37
|
+
|
|
38
|
+
### 1. GitHub Packages에서 설치
|
|
39
|
+
|
|
40
|
+
#### Python
|
|
41
|
+
```bash
|
|
42
|
+
# PyPI에서 설치
|
|
43
|
+
pip install core-system-grpc
|
|
44
|
+
|
|
45
|
+
# 또는 requirements.txt에 추가
|
|
46
|
+
core-system-grpc==0.2.44
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 2. 로컬에서 빌드
|
|
50
|
+
|
|
51
|
+
#### 의존성 설치
|
|
52
|
+
```bash
|
|
53
|
+
# uv를 사용한 의존성 설치
|
|
54
|
+
uv sync --dev
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### 패키지 빌드
|
|
58
|
+
```bash
|
|
59
|
+
# hatch를 사용한 패키지 빌드
|
|
60
|
+
uv run hatch build
|
|
61
|
+
|
|
62
|
+
# 또는 Makefile 사용
|
|
63
|
+
make build-package
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Proto 파일 컴파일만
|
|
67
|
+
```bash
|
|
68
|
+
make build-python
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 버전 관리
|
|
72
|
+
|
|
73
|
+
이 패키지는 시멘틱 버저닝을 따릅니다:
|
|
74
|
+
- Major: Breaking changes
|
|
75
|
+
- Minor: 새로운 서비스/메시지 추가
|
|
76
|
+
- Patch: 버그 수정, 문서 업데이트
|
|
77
|
+
|
|
78
|
+
## 배포
|
|
79
|
+
|
|
80
|
+
### 새 버전 배포하기
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# 1. 의존성 설치
|
|
84
|
+
uv sync --dev
|
|
85
|
+
|
|
86
|
+
# 2. 패키지 빌드
|
|
87
|
+
uv run hatch build
|
|
88
|
+
|
|
89
|
+
# 3. PyPI에 배포
|
|
90
|
+
uv run hatch publish
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Makefile 사용
|
|
94
|
+
```bash
|
|
95
|
+
make install-deps # 의존성 설치
|
|
96
|
+
make build-package # 패키지 빌드
|
|
97
|
+
make publish-package # PyPI 배포
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 인증 설정
|
|
101
|
+
|
|
102
|
+
PyPI 배포를 위한 인증 설정:
|
|
103
|
+
|
|
104
|
+
### 방법 1: .pypirc 파일 사용
|
|
105
|
+
```bash
|
|
106
|
+
# ~/.pypirc 파일에 PyPI 토큰 설정
|
|
107
|
+
[pypi]
|
|
108
|
+
username = __token__
|
|
109
|
+
password = your_pypi_token
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 방법 2: 환경 변수 사용
|
|
113
|
+
```bash
|
|
114
|
+
export TWINE_PASSWORD=your_pypi_token
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 방법 3: GitHub Actions에서 자동 배포
|
|
118
|
+
```bash
|
|
119
|
+
# v* 태그 푸시 시 자동 배포
|
|
120
|
+
git tag v1.0.0
|
|
121
|
+
git push origin v1.0.0
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## 개발 도구
|
|
125
|
+
|
|
126
|
+
- **uv**: Python 패키지 관리 및 의존성 해결
|
|
127
|
+
- **hatch**: Python 패키지 빌드 및 배포
|
|
128
|
+
- **grpcio-tools**: Proto 파일 컴파일
|
|
129
|
+
|
|
130
|
+
## 문제 해결
|
|
131
|
+
|
|
132
|
+
### 빌드 시 인증 오류
|
|
133
|
+
```bash
|
|
134
|
+
# EOFError: EOF when reading a line 오류 해결
|
|
135
|
+
make setup-auth # .pypirc 설정 가이드 표시
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 의존성 문제
|
|
139
|
+
```bash
|
|
140
|
+
# uv 캐시 정리
|
|
141
|
+
uv cache clean
|
|
142
|
+
uv sync --dev
|
|
143
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
generated/python/__init__.py,sha256=rmbl8F_v5kNIRSfrGtFDpveTbjQbQWKrcx4UqV7R9ZQ,655
|
|
2
|
+
generated/python/messages/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
generated/python/messages/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
generated/python/messages/common/pagination_pb2.py,sha256=VPx5DTGP4QSxPJBe9NfXqSeGFy2CJVel6jzUSl5hvyo,1666
|
|
5
|
+
generated/python/messages/common/pagination_pb2.pyi,sha256=5Knivgh7Q0dk90bJLkpXJWWDmRRbri_uVENUDIruZ4k,893
|
|
6
|
+
generated/python/messages/common/pagination_pb2_grpc.py,sha256=B28DXSyQoUrOuVEofDGg7qc7R6WMSzs55JYRpSkSkrA,907
|
|
7
|
+
generated/python/messages/common/search_pb2.py,sha256=BfpQSASNB8AYLc1VT0iLFV5d3SG55SvfypPH2TI3H_k,1978
|
|
8
|
+
generated/python/messages/common/search_pb2.pyi,sha256=9qHDVL3aal8PV6C5w7mfSU3SakYSqIlW0lVbc3bnrPA,1245
|
|
9
|
+
generated/python/messages/common/search_pb2_grpc.py,sha256=BwP1AMeFxh7J8QydfH_z52FPyNhVsVgC9h9MsVot7Kc,903
|
|
10
|
+
generated/python/messages/product/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
generated/python/messages/product/common_pb2.py,sha256=V3HY1I900RBSFnhhnA2wsjyR4B3MYPNW1VH0ORdF9jI,1412
|
|
12
|
+
generated/python/messages/product/common_pb2.pyi,sha256=RChT6fPL20j_aTfZqsEkckGHslNanK9f8frWTJID-pg,593
|
|
13
|
+
generated/python/messages/product/common_pb2_grpc.py,sha256=5mdy_2FU4MabpHNflwor-VIRYPx_XuA5DTuc3cpm4y4,904
|
|
14
|
+
generated/python/messages/product/request_pb2.py,sha256=EojPdcRUVsimH1Ursyrb2Gu0jEwMPTJFx9rYTQ5LRms,2125
|
|
15
|
+
generated/python/messages/product/request_pb2.pyi,sha256=CgTilt341pnb3DkXOPU0NCexzJV4lFkXYfbbqbOLcIA,1331
|
|
16
|
+
generated/python/messages/product/request_pb2_grpc.py,sha256=u-_TZjchznnNgjJijclFcYev2ZM9LnIFZu2LgA9Xp34,905
|
|
17
|
+
generated/python/messages/product/response_pb2.py,sha256=G6H-_yLz60vjq2yneP6Ko-01GdNfuCqcZPQwm6Ei-t0,1769
|
|
18
|
+
generated/python/messages/product/response_pb2.pyi,sha256=o0uHiwxWI1TsAheV7Xi_LwpxIBdXJ1hnRqVRN6Jrl6s,981
|
|
19
|
+
generated/python/messages/product/response_pb2_grpc.py,sha256=4bqnzEtZ-SRu0Az2-9rB7l06jbYrv-S8un7DHNDOXZ0,906
|
|
20
|
+
generated/python/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
|
+
generated/python/services/product_service_pb2.py,sha256=3a-nQDgLKgBo65DjAhgdkotXfJlNDmAL2OmPyLqXtBg,1888
|
|
22
|
+
generated/python/services/product_service_pb2.pyi,sha256=LQzzAnNQgbjtzo4nb6a5OWfM7VipGL9AreTKDDbXT0s,392
|
|
23
|
+
generated/python/services/product_service_pb2_grpc.py,sha256=Ulp79l9H3rqQn2H8nTVZ1eFZkIcAbnHLFsTVEl9YRA0,3830
|
|
24
|
+
core_system_grpc-0.2.55.dist-info/METADATA,sha256=fbU60L2o-HBoFjUqbsrlfW8OgU2UQKeB5lVqKJlw1rg,3055
|
|
25
|
+
core_system_grpc-0.2.55.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
core_system_grpc-0.2.55.dist-info/RECORD,,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Core System gRPC Package - Python Client Library"""
|
|
2
|
+
|
|
3
|
+
from .services.product_service_pb2 import *
|
|
4
|
+
from .services.product_service_pb2_grpc import *
|
|
5
|
+
from .messages.common.pagination_pb2 import *
|
|
6
|
+
from .messages.common.search_pb2 import *
|
|
7
|
+
from .messages.product.common_pb2 import *
|
|
8
|
+
from .messages.product.request_pb2 import *
|
|
9
|
+
from .messages.product.response_pb2 import *
|
|
10
|
+
|
|
11
|
+
__version__ = "0.2.44"
|
|
12
|
+
__all__ = [
|
|
13
|
+
"GetProductsByShopRequest",
|
|
14
|
+
"GetProductsByShopResponse",
|
|
15
|
+
"ProductServiceStub",
|
|
16
|
+
"ProductServiceServicer",
|
|
17
|
+
"PaginationRequest",
|
|
18
|
+
"PaginationResponse",
|
|
19
|
+
"SearchRequest",
|
|
20
|
+
"SortRequest",
|
|
21
|
+
"SortDirection",
|
|
22
|
+
"Product",
|
|
23
|
+
]
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: messages/common/pagination.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'messages/common/pagination.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n messages/common/pagination.proto\x12\x14\x61lpha.core.common.v1\"2\n\x11PaginationRequest\x12\x0e\n\x06offset\x18\x01 \x01(\x05\x12\r\n\x05limit\x18\x02 \x01(\x05\"H\n\x12PaginationResponse\x12\x13\n\x0btotal_count\x18\x01 \x01(\x05\x12\x0e\n\x06offset\x18\x02 \x01(\x05\x12\r\n\x05limit\x18\x03 \x01(\x05\x62\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.common.pagination_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_PAGINATIONREQUEST']._serialized_start=58
|
|
35
|
+
_globals['_PAGINATIONREQUEST']._serialized_end=108
|
|
36
|
+
_globals['_PAGINATIONRESPONSE']._serialized_start=110
|
|
37
|
+
_globals['_PAGINATIONRESPONSE']._serialized_end=182
|
|
38
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from google.protobuf import descriptor as _descriptor
|
|
2
|
+
from google.protobuf import message as _message
|
|
3
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional
|
|
4
|
+
|
|
5
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
6
|
+
|
|
7
|
+
class PaginationRequest(_message.Message):
|
|
8
|
+
__slots__ = ("offset", "limit")
|
|
9
|
+
OFFSET_FIELD_NUMBER: _ClassVar[int]
|
|
10
|
+
LIMIT_FIELD_NUMBER: _ClassVar[int]
|
|
11
|
+
offset: int
|
|
12
|
+
limit: int
|
|
13
|
+
def __init__(self, offset: _Optional[int] = ..., limit: _Optional[int] = ...) -> None: ...
|
|
14
|
+
|
|
15
|
+
class PaginationResponse(_message.Message):
|
|
16
|
+
__slots__ = ("total_count", "offset", "limit")
|
|
17
|
+
TOTAL_COUNT_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
OFFSET_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
LIMIT_FIELD_NUMBER: _ClassVar[int]
|
|
20
|
+
total_count: int
|
|
21
|
+
offset: int
|
|
22
|
+
limit: int
|
|
23
|
+
def __init__(self, total_count: _Optional[int] = ..., offset: _Optional[int] = ..., limit: _Optional[int] = ...) -> None: ...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
|
8
|
+
GRPC_VERSION = grpc.__version__
|
|
9
|
+
_version_not_supported = False
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from grpc._utilities import first_version_is_lower
|
|
13
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
+
except ImportError:
|
|
15
|
+
_version_not_supported = True
|
|
16
|
+
|
|
17
|
+
if _version_not_supported:
|
|
18
|
+
raise RuntimeError(
|
|
19
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
+
+ f' but the generated code in messages/common/pagination_pb2_grpc.py depends on'
|
|
21
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
+
)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: messages/common/search.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'messages/common/search.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cmessages/common/search.proto\x12\x14\x61lpha.core.common.v1\"?\n\rSearchRequest\x12\x1b\n\x0esearch_keyword\x18\x01 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_search_keyword\"\x8a\x01\n\x0bSortRequest\x12\x17\n\nsort_field\x18\x01 \x01(\tH\x00\x88\x01\x01\x12@\n\x0esort_direction\x18\x02 \x01(\x0e\x32#.alpha.core.common.v1.SortDirectionH\x01\x88\x01\x01\x42\r\n\x0b_sort_fieldB\x11\n\x0f_sort_direction*`\n\rSortDirection\x12\x1e\n\x1aSORT_DIRECTION_UNSPECIFIED\x10\x00\x12\x16\n\x12SORT_DIRECTION_ASC\x10\x01\x12\x17\n\x13SORT_DIRECTION_DESC\x10\x02\x62\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.common.search_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_SORTDIRECTION']._serialized_start=260
|
|
35
|
+
_globals['_SORTDIRECTION']._serialized_end=356
|
|
36
|
+
_globals['_SEARCHREQUEST']._serialized_start=54
|
|
37
|
+
_globals['_SEARCHREQUEST']._serialized_end=117
|
|
38
|
+
_globals['_SORTREQUEST']._serialized_start=120
|
|
39
|
+
_globals['_SORTREQUEST']._serialized_end=258
|
|
40
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper
|
|
2
|
+
from google.protobuf import descriptor as _descriptor
|
|
3
|
+
from google.protobuf import message as _message
|
|
4
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
5
|
+
|
|
6
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
7
|
+
|
|
8
|
+
class SortDirection(int, metaclass=_enum_type_wrapper.EnumTypeWrapper):
|
|
9
|
+
__slots__ = ()
|
|
10
|
+
SORT_DIRECTION_UNSPECIFIED: _ClassVar[SortDirection]
|
|
11
|
+
SORT_DIRECTION_ASC: _ClassVar[SortDirection]
|
|
12
|
+
SORT_DIRECTION_DESC: _ClassVar[SortDirection]
|
|
13
|
+
SORT_DIRECTION_UNSPECIFIED: SortDirection
|
|
14
|
+
SORT_DIRECTION_ASC: SortDirection
|
|
15
|
+
SORT_DIRECTION_DESC: SortDirection
|
|
16
|
+
|
|
17
|
+
class SearchRequest(_message.Message):
|
|
18
|
+
__slots__ = ("search_keyword",)
|
|
19
|
+
SEARCH_KEYWORD_FIELD_NUMBER: _ClassVar[int]
|
|
20
|
+
search_keyword: str
|
|
21
|
+
def __init__(self, search_keyword: _Optional[str] = ...) -> None: ...
|
|
22
|
+
|
|
23
|
+
class SortRequest(_message.Message):
|
|
24
|
+
__slots__ = ("sort_field", "sort_direction")
|
|
25
|
+
SORT_FIELD_FIELD_NUMBER: _ClassVar[int]
|
|
26
|
+
SORT_DIRECTION_FIELD_NUMBER: _ClassVar[int]
|
|
27
|
+
sort_field: str
|
|
28
|
+
sort_direction: SortDirection
|
|
29
|
+
def __init__(self, sort_field: _Optional[str] = ..., sort_direction: _Optional[_Union[SortDirection, str]] = ...) -> None: ...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
|
8
|
+
GRPC_VERSION = grpc.__version__
|
|
9
|
+
_version_not_supported = False
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from grpc._utilities import first_version_is_lower
|
|
13
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
+
except ImportError:
|
|
15
|
+
_version_not_supported = True
|
|
16
|
+
|
|
17
|
+
if _version_not_supported:
|
|
18
|
+
raise RuntimeError(
|
|
19
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
+
+ f' but the generated code in messages/common/search_pb2_grpc.py depends on'
|
|
21
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: messages/product/common.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'messages/product/common.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1dmessages/product/common.proto\x12\x15\x61lpha.core.product.v1\"<\n\x07Product\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0f\n\x07shop_id\x18\x02 \x01(\x05\x12\x14\n\x0cproduct_name\x18\x03 \x01(\tb\x06proto3')
|
|
28
|
+
|
|
29
|
+
_globals = globals()
|
|
30
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
31
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.product.common_pb2', _globals)
|
|
32
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
33
|
+
DESCRIPTOR._loaded_options = None
|
|
34
|
+
_globals['_PRODUCT']._serialized_start=56
|
|
35
|
+
_globals['_PRODUCT']._serialized_end=116
|
|
36
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from google.protobuf import descriptor as _descriptor
|
|
2
|
+
from google.protobuf import message as _message
|
|
3
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional
|
|
4
|
+
|
|
5
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
6
|
+
|
|
7
|
+
class Product(_message.Message):
|
|
8
|
+
__slots__ = ("id", "shop_id", "product_name")
|
|
9
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
10
|
+
SHOP_ID_FIELD_NUMBER: _ClassVar[int]
|
|
11
|
+
PRODUCT_NAME_FIELD_NUMBER: _ClassVar[int]
|
|
12
|
+
id: int
|
|
13
|
+
shop_id: int
|
|
14
|
+
product_name: str
|
|
15
|
+
def __init__(self, id: _Optional[int] = ..., shop_id: _Optional[int] = ..., product_name: _Optional[str] = ...) -> None: ...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
|
8
|
+
GRPC_VERSION = grpc.__version__
|
|
9
|
+
_version_not_supported = False
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from grpc._utilities import first_version_is_lower
|
|
13
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
+
except ImportError:
|
|
15
|
+
_version_not_supported = True
|
|
16
|
+
|
|
17
|
+
if _version_not_supported:
|
|
18
|
+
raise RuntimeError(
|
|
19
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
+
+ f' but the generated code in messages/product/common_pb2_grpc.py depends on'
|
|
21
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
+
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: messages/product/request.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'messages/product/request.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from messages.common import pagination_pb2 as messages_dot_common_dot_pagination__pb2
|
|
26
|
+
from messages.common import search_pb2 as messages_dot_common_dot_search__pb2
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1emessages/product/request.proto\x12\x15\x61lpha.core.product.v1\x1a messages/common/pagination.proto\x1a\x1cmessages/common/search.proto\"\xb1\x02\n\x18GetProductsByShopRequest\x12\x0f\n\x07shop_id\x18\x01 \x01(\x05\x12;\n\npagination\x18\x02 \x01(\x0b\x32\'.alpha.core.common.v1.PaginationRequest\x12\x38\n\x06search\x18\x03 \x01(\x0b\x32#.alpha.core.common.v1.SearchRequestH\x00\x88\x01\x01\x12\x13\n\x06\x66ields\x18\x04 \x01(\tH\x01\x88\x01\x01\x12\x12\n\x05\x65mbed\x18\x05 \x01(\tH\x02\x88\x01\x01\x12\x14\n\x07\x66ilters\x18\x06 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08order_by\x18\x07 \x01(\tH\x04\x88\x01\x01\x42\t\n\x07_searchB\t\n\x07_fieldsB\x08\n\x06_embedB\n\n\x08_filtersB\x0b\n\t_order_byb\x06proto3')
|
|
30
|
+
|
|
31
|
+
_globals = globals()
|
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.product.request_pb2', _globals)
|
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
|
+
DESCRIPTOR._loaded_options = None
|
|
36
|
+
_globals['_GETPRODUCTSBYSHOPREQUEST']._serialized_start=122
|
|
37
|
+
_globals['_GETPRODUCTSBYSHOPREQUEST']._serialized_end=427
|
|
38
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from messages.common import pagination_pb2 as _pagination_pb2
|
|
2
|
+
from messages.common import search_pb2 as _search_pb2
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import message as _message
|
|
5
|
+
from collections.abc import Mapping as _Mapping
|
|
6
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
7
|
+
|
|
8
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
9
|
+
|
|
10
|
+
class GetProductsByShopRequest(_message.Message):
|
|
11
|
+
__slots__ = ("shop_id", "pagination", "search", "fields", "embed", "filters", "order_by")
|
|
12
|
+
SHOP_ID_FIELD_NUMBER: _ClassVar[int]
|
|
13
|
+
PAGINATION_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
SEARCH_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
FIELDS_FIELD_NUMBER: _ClassVar[int]
|
|
16
|
+
EMBED_FIELD_NUMBER: _ClassVar[int]
|
|
17
|
+
FILTERS_FIELD_NUMBER: _ClassVar[int]
|
|
18
|
+
ORDER_BY_FIELD_NUMBER: _ClassVar[int]
|
|
19
|
+
shop_id: int
|
|
20
|
+
pagination: _pagination_pb2.PaginationRequest
|
|
21
|
+
search: _search_pb2.SearchRequest
|
|
22
|
+
fields: str
|
|
23
|
+
embed: str
|
|
24
|
+
filters: str
|
|
25
|
+
order_by: str
|
|
26
|
+
def __init__(self, shop_id: _Optional[int] = ..., pagination: _Optional[_Union[_pagination_pb2.PaginationRequest, _Mapping]] = ..., search: _Optional[_Union[_search_pb2.SearchRequest, _Mapping]] = ..., fields: _Optional[str] = ..., embed: _Optional[str] = ..., filters: _Optional[str] = ..., order_by: _Optional[str] = ...) -> None: ...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
|
8
|
+
GRPC_VERSION = grpc.__version__
|
|
9
|
+
_version_not_supported = False
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from grpc._utilities import first_version_is_lower
|
|
13
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
+
except ImportError:
|
|
15
|
+
_version_not_supported = True
|
|
16
|
+
|
|
17
|
+
if _version_not_supported:
|
|
18
|
+
raise RuntimeError(
|
|
19
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
+
+ f' but the generated code in messages/product/request_pb2_grpc.py depends on'
|
|
21
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
+
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: messages/product/response.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'messages/product/response.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from messages.product import common_pb2 as messages_dot_product_dot_common__pb2
|
|
26
|
+
from messages.common import pagination_pb2 as messages_dot_common_dot_pagination__pb2
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fmessages/product/response.proto\x12\x15\x61lpha.core.product.v1\x1a\x1dmessages/product/common.proto\x1a messages/common/pagination.proto\"\x8b\x01\n\x19GetProductsByShopResponse\x12\x30\n\x08products\x18\x01 \x03(\x0b\x32\x1e.alpha.core.product.v1.Product\x12<\n\npagination\x18\x02 \x01(\x0b\x32(.alpha.core.common.v1.PaginationResponseb\x06proto3')
|
|
30
|
+
|
|
31
|
+
_globals = globals()
|
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'messages.product.response_pb2', _globals)
|
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
|
+
DESCRIPTOR._loaded_options = None
|
|
36
|
+
_globals['_GETPRODUCTSBYSHOPRESPONSE']._serialized_start=124
|
|
37
|
+
_globals['_GETPRODUCTSBYSHOPRESPONSE']._serialized_end=263
|
|
38
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from messages.product import common_pb2 as _common_pb2
|
|
2
|
+
from messages.common import pagination_pb2 as _pagination_pb2
|
|
3
|
+
from google.protobuf.internal import containers as _containers
|
|
4
|
+
from google.protobuf import descriptor as _descriptor
|
|
5
|
+
from google.protobuf import message as _message
|
|
6
|
+
from collections.abc import Iterable as _Iterable, Mapping as _Mapping
|
|
7
|
+
from typing import ClassVar as _ClassVar, Optional as _Optional, Union as _Union
|
|
8
|
+
|
|
9
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
10
|
+
|
|
11
|
+
class GetProductsByShopResponse(_message.Message):
|
|
12
|
+
__slots__ = ("products", "pagination")
|
|
13
|
+
PRODUCTS_FIELD_NUMBER: _ClassVar[int]
|
|
14
|
+
PAGINATION_FIELD_NUMBER: _ClassVar[int]
|
|
15
|
+
products: _containers.RepeatedCompositeFieldContainer[_common_pb2.Product]
|
|
16
|
+
pagination: _pagination_pb2.PaginationResponse
|
|
17
|
+
def __init__(self, products: _Optional[_Iterable[_Union[_common_pb2.Product, _Mapping]]] = ..., pagination: _Optional[_Union[_pagination_pb2.PaginationResponse, _Mapping]] = ...) -> None: ...
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
|
8
|
+
GRPC_VERSION = grpc.__version__
|
|
9
|
+
_version_not_supported = False
|
|
10
|
+
|
|
11
|
+
try:
|
|
12
|
+
from grpc._utilities import first_version_is_lower
|
|
13
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
14
|
+
except ImportError:
|
|
15
|
+
_version_not_supported = True
|
|
16
|
+
|
|
17
|
+
if _version_not_supported:
|
|
18
|
+
raise RuntimeError(
|
|
19
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
20
|
+
+ f' but the generated code in messages/product/response_pb2_grpc.py depends on'
|
|
21
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
22
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
23
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
24
|
+
)
|
|
File without changes
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# NO CHECKED-IN PROTOBUF GENCODE
|
|
4
|
+
# source: services/product_service.proto
|
|
5
|
+
# Protobuf Python Version: 6.31.1
|
|
6
|
+
"""Generated protocol buffer code."""
|
|
7
|
+
from google.protobuf import descriptor as _descriptor
|
|
8
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
9
|
+
from google.protobuf import runtime_version as _runtime_version
|
|
10
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
11
|
+
from google.protobuf.internal import builder as _builder
|
|
12
|
+
_runtime_version.ValidateProtobufRuntimeVersion(
|
|
13
|
+
_runtime_version.Domain.PUBLIC,
|
|
14
|
+
6,
|
|
15
|
+
31,
|
|
16
|
+
1,
|
|
17
|
+
'',
|
|
18
|
+
'services/product_service.proto'
|
|
19
|
+
)
|
|
20
|
+
# @@protoc_insertion_point(imports)
|
|
21
|
+
|
|
22
|
+
_sym_db = _symbol_database.Default()
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
from messages.product import request_pb2 as messages_dot_product_dot_request__pb2
|
|
26
|
+
from messages.product import response_pb2 as messages_dot_product_dot_response__pb2
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1eservices/product_service.proto\x12\x16\x63ore_system.product.v1\x1a\x1emessages/product/request.proto\x1a\x1fmessages/product/response.proto2\x8a\x01\n\x0eProductService\x12x\n\x11GetProductsByShop\x12\x30.core_system.product.v1.GetProductsByShopRequest\x1a\x31.core_system.product.v1.GetProductsByShopResponseB\x03\x90\x01\x01\x62\x06proto3')
|
|
30
|
+
|
|
31
|
+
_globals = globals()
|
|
32
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
33
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'services.product_service_pb2', _globals)
|
|
34
|
+
if not _descriptor._USE_C_DESCRIPTORS:
|
|
35
|
+
_globals['DESCRIPTOR']._loaded_options = None
|
|
36
|
+
_globals['DESCRIPTOR']._serialized_options = b'\220\001\001'
|
|
37
|
+
_globals['_PRODUCTSERVICE']._serialized_start=124
|
|
38
|
+
_globals['_PRODUCTSERVICE']._serialized_end=262
|
|
39
|
+
_builder.BuildServices(DESCRIPTOR, 'services.product_service_pb2', _globals)
|
|
40
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
from messages.product import request_pb2 as _request_pb2
|
|
2
|
+
from messages.product import response_pb2 as _response_pb2
|
|
3
|
+
from google.protobuf import descriptor as _descriptor
|
|
4
|
+
from google.protobuf import service as _service
|
|
5
|
+
from typing import ClassVar as _ClassVar
|
|
6
|
+
|
|
7
|
+
DESCRIPTOR: _descriptor.FileDescriptor
|
|
8
|
+
|
|
9
|
+
class ProductService(_service.service): ...
|
|
10
|
+
|
|
11
|
+
class ProductService_Stub(ProductService): ...
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
|
|
2
|
+
"""Client and server classes corresponding to protobuf-defined services."""
|
|
3
|
+
import grpc
|
|
4
|
+
import warnings
|
|
5
|
+
|
|
6
|
+
from messages.product from . import request_pb2 as messages_dot_product_dot_request__pb2
|
|
7
|
+
from messages.product from . import response_pb2 as messages_dot_product_dot_response__pb2
|
|
8
|
+
|
|
9
|
+
GRPC_GENERATED_VERSION = '1.74.0'
|
|
10
|
+
GRPC_VERSION = grpc.__version__
|
|
11
|
+
_version_not_supported = False
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
from grpc._utilities import first_version_is_lower
|
|
15
|
+
_version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
|
|
16
|
+
except ImportError:
|
|
17
|
+
_version_not_supported = True
|
|
18
|
+
|
|
19
|
+
if _version_not_supported:
|
|
20
|
+
raise RuntimeError(
|
|
21
|
+
f'The grpc package installed is at version {GRPC_VERSION},'
|
|
22
|
+
+ f' but the generated code in services/product_service_pb2_grpc.py depends on'
|
|
23
|
+
+ f' grpcio>={GRPC_GENERATED_VERSION}.'
|
|
24
|
+
+ f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
|
|
25
|
+
+ f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class ProductServiceStub(object):
|
|
30
|
+
"""ProductService 정의
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
def __init__(self, channel):
|
|
34
|
+
"""Constructor.
|
|
35
|
+
|
|
36
|
+
Args:
|
|
37
|
+
channel: A grpc.Channel.
|
|
38
|
+
"""
|
|
39
|
+
self.GetProductsByShop = channel.unary_unary(
|
|
40
|
+
'/core_system.product.v1.ProductService/GetProductsByShop',
|
|
41
|
+
request_serializer=messages_dot_product_dot_request__pb2.GetProductsByShopRequest.SerializeToString,
|
|
42
|
+
response_deserializer=messages_dot_product_dot_response__pb2.GetProductsByShopResponse.FromString,
|
|
43
|
+
_registered_method=True)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class ProductServiceServicer(object):
|
|
47
|
+
"""ProductService 정의
|
|
48
|
+
"""
|
|
49
|
+
|
|
50
|
+
def GetProductsByShop(self, request, context):
|
|
51
|
+
"""Missing associated documentation comment in .proto file."""
|
|
52
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
53
|
+
context.set_details('Method not implemented!')
|
|
54
|
+
raise NotImplementedError('Method not implemented!')
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def add_ProductServiceServicer_to_server(servicer, server):
|
|
58
|
+
rpc_method_handlers = {
|
|
59
|
+
'GetProductsByShop': grpc.unary_unary_rpc_method_handler(
|
|
60
|
+
servicer.GetProductsByShop,
|
|
61
|
+
request_deserializer=messages_dot_product_dot_request__pb2.GetProductsByShopRequest.FromString,
|
|
62
|
+
response_serializer=messages_dot_product_dot_response__pb2.GetProductsByShopResponse.SerializeToString,
|
|
63
|
+
),
|
|
64
|
+
}
|
|
65
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
66
|
+
'core_system.product.v1.ProductService', rpc_method_handlers)
|
|
67
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
68
|
+
server.add_registered_method_handlers('core_system.product.v1.ProductService', rpc_method_handlers)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# This class is part of an EXPERIMENTAL API.
|
|
72
|
+
class ProductService(object):
|
|
73
|
+
"""ProductService 정의
|
|
74
|
+
"""
|
|
75
|
+
|
|
76
|
+
@staticmethod
|
|
77
|
+
def GetProductsByShop(request,
|
|
78
|
+
target,
|
|
79
|
+
options=(),
|
|
80
|
+
channel_credentials=None,
|
|
81
|
+
call_credentials=None,
|
|
82
|
+
insecure=False,
|
|
83
|
+
compression=None,
|
|
84
|
+
wait_for_ready=None,
|
|
85
|
+
timeout=None,
|
|
86
|
+
metadata=None):
|
|
87
|
+
return grpc.experimental.unary_unary(
|
|
88
|
+
request,
|
|
89
|
+
target,
|
|
90
|
+
'/core_system.product.v1.ProductService/GetProductsByShop',
|
|
91
|
+
messages_dot_product_dot_request__pb2.GetProductsByShopRequest.SerializeToString,
|
|
92
|
+
messages_dot_product_dot_response__pb2.GetProductsByShopResponse.FromString,
|
|
93
|
+
options,
|
|
94
|
+
channel_credentials,
|
|
95
|
+
insecure,
|
|
96
|
+
call_credentials,
|
|
97
|
+
compression,
|
|
98
|
+
wait_for_ready,
|
|
99
|
+
timeout,
|
|
100
|
+
metadata,
|
|
101
|
+
_registered_method=True)
|