Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
5831ac4b4e | |||
48f95b1ea9 | |||
6646697a9b | |||
8e6b0f5e13 | |||
455ce89440 | |||
0774a0db69 | |||
ecfaeaede8 | |||
6a59a1918e | |||
969c6d5dbf | |||
acc73e64d8 | |||
adb7c3c597 | |||
74f8928625 | |||
02aa11ff16 |
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: For reporting bugs in go-micro
|
||||||
|
title: "[BUG]"
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Describe the bug**
|
||||||
|
|
||||||
|
1. What are you trying to do?
|
||||||
|
2. What did you expect to happen?
|
||||||
|
3. What happens instead?
|
||||||
|
|
||||||
|
**How to reproduce the bug:**
|
||||||
|
|
||||||
|
If possible, please include a minimal code snippet here.
|
||||||
|
|
||||||
|
**Environment:**
|
||||||
|
Go Version: please paste `go version` output here
|
||||||
|
```
|
||||||
|
please paste `go env` output here
|
||||||
|
```
|
17
.github/ISSUE_TEMPLATE/feature-request---enhancement.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE/feature-request---enhancement.md
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
---
|
||||||
|
name: Feature request / Enhancement
|
||||||
|
about: If you have a need not served by go-micro
|
||||||
|
title: "[FEATURE]"
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Is your feature request related to a problem? Please describe.**
|
||||||
|
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||||
|
|
||||||
|
**Describe the solution you'd like**
|
||||||
|
A clear and concise description of what you want to happen.
|
||||||
|
|
||||||
|
**Additional context**
|
||||||
|
Add any other context or screenshots about the feature request here.
|
14
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
14
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
name: Question
|
||||||
|
about: Ask a question about go-micro
|
||||||
|
title: ''
|
||||||
|
labels: ''
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Before asking, please check if your question has already been answered:
|
||||||
|
|
||||||
|
1. Check the documentation - https://micro.mu/docs/
|
||||||
|
2. Check the examples and plugins - https://github.com/micro/examples & https://github.com/micro/go-plugins
|
||||||
|
3. Search existing issues
|
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
9
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
## Pull Request template
|
||||||
|
Please, go through these steps before clicking submit on this PR.
|
||||||
|
|
||||||
|
1. Give a descriptive title to your PR.
|
||||||
|
2. Provide a description of your changes.
|
||||||
|
3. Make sure you have some relevant tests.
|
||||||
|
4. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if applicable).
|
||||||
|
|
||||||
|
**PLEASE REMOVE THIS TEMPLATE BEFORE SUBMITTING**
|
19
.github/dependabot.yml
vendored
Normal file
19
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# To get started with Dependabot version updates, you'll need to specify which
|
||||||
|
# package ecosystems to update and where the package manifests are located.
|
||||||
|
# Please see the documentation for all configuration options:
|
||||||
|
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
|
||||||
|
# Maintain dependencies for GitHub Actions
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
|
||||||
|
# Maintain dependencies for Golang
|
||||||
|
- package-ecosystem: "gomod"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
46
.github/workflows/build.yml
vendored
Normal file
46
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: build
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: setup
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: ${{ runner.os }}-go-
|
||||||
|
- name: deps
|
||||||
|
run: go get -v -t -d ./...
|
||||||
|
- name: test
|
||||||
|
env:
|
||||||
|
INTEGRATION_TESTS: yes
|
||||||
|
run: go test -mod readonly -v ./...
|
||||||
|
lint:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: lint
|
||||||
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||||
|
version: v1.30
|
||||||
|
# Optional: working directory, useful for monorepos
|
||||||
|
# working-directory: somedir
|
||||||
|
# Optional: golangci-lint command line arguments.
|
||||||
|
# args: --issues-exit-code=0
|
||||||
|
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||||
|
# only-new-issues: true
|
75
.github/workflows/codeql-analysis.yml
vendored
Normal file
75
.github/workflows/codeql-analysis.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
|
#
|
||||||
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
|
# or to provide custom queries or build logic.
|
||||||
|
#
|
||||||
|
# ******** NOTE ********
|
||||||
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
|
# supported CodeQL languages.
|
||||||
|
#
|
||||||
|
name: "CodeQL"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["prbuild"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ master ]
|
||||||
|
schedule:
|
||||||
|
- cron: '34 1 * * 0'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
analyze:
|
||||||
|
name: Analyze
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
contents: read
|
||||||
|
security-events: write
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
language: [ 'go' ]
|
||||||
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
|
# Learn more:
|
||||||
|
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# Initializes the CodeQL tools for scanning.
|
||||||
|
- name: Initialize CodeQL
|
||||||
|
uses: github/codeql-action/init@v1
|
||||||
|
with:
|
||||||
|
languages: ${{ matrix.language }}
|
||||||
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
|
# and modify them (or add more) to build your code if your project
|
||||||
|
# uses a compiled language
|
||||||
|
|
||||||
|
#- run: |
|
||||||
|
# make bootstrap
|
||||||
|
# make release
|
||||||
|
|
||||||
|
- name: Perform CodeQL Analysis
|
||||||
|
uses: github/codeql-action/analyze@v1
|
66
.github/workflows/dependabot-automerge.yml
vendored
Normal file
66
.github/workflows/dependabot-automerge.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
name: "prautomerge"
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["prbuild"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Dependabot-Automerge:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# Contains workaround to execute if dependabot updates the PR by checking for the base branch in the linked PR
|
||||||
|
# The the github.event.workflow_run.event value is 'push' and not 'pull_request'
|
||||||
|
# dont work with multiple workflows when last returns success
|
||||||
|
if: >-
|
||||||
|
github.event.workflow_run.conclusion == 'success'
|
||||||
|
&& github.actor == 'dependabot[bot]'
|
||||||
|
&& github.event.sender.login == 'dependabot[bot]'
|
||||||
|
&& github.event.sender.type == 'Bot'
|
||||||
|
&& (github.event.workflow_run.event == 'pull_request'
|
||||||
|
|| (github.event.workflow_run.event == 'push' && github.event.workflow_run.pull_requests[0].base.ref == github.event.repository.default_branch ))
|
||||||
|
steps:
|
||||||
|
- name: Approve Changes and Merge changes if label 'dependencies' is set
|
||||||
|
uses: actions/github-script@v4
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
script: |
|
||||||
|
console.log(context.payload.workflow_run);
|
||||||
|
|
||||||
|
var labelNames = await github.paginate(
|
||||||
|
github.issues.listLabelsOnIssue,
|
||||||
|
{
|
||||||
|
repo: context.repo.repo,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
issue_number: context.payload.workflow_run.pull_requests[0].number,
|
||||||
|
},
|
||||||
|
(response) => response.data.map(
|
||||||
|
(label) => label.name
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
console.log(labelNames);
|
||||||
|
|
||||||
|
if (labelNames.includes('dependencies')) {
|
||||||
|
console.log('Found label');
|
||||||
|
|
||||||
|
await github.pulls.createReview({
|
||||||
|
repo: context.repo.repo,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
pull_number: context.payload.workflow_run.pull_requests[0].number,
|
||||||
|
event: 'APPROVE'
|
||||||
|
});
|
||||||
|
console.log('Approved PR');
|
||||||
|
|
||||||
|
await github.pulls.merge({
|
||||||
|
repo: context.repo.repo,
|
||||||
|
owner: context.repo.owner,
|
||||||
|
pull_number: context.payload.workflow_run.pull_requests[0].number,
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log('Merged PR');
|
||||||
|
}
|
46
.github/workflows/pr.yml
vendored
Normal file
46
.github/workflows/pr.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
name: prbuild
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: setup
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: cache
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: ${{ runner.os }}-go-
|
||||||
|
- name: deps
|
||||||
|
run: go get -v -t -d ./...
|
||||||
|
- name: test
|
||||||
|
env:
|
||||||
|
INTEGRATION_TESTS: yes
|
||||||
|
run: go test -mod readonly -v ./...
|
||||||
|
lint:
|
||||||
|
name: lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: lint
|
||||||
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
|
||||||
|
version: v1.30
|
||||||
|
# Optional: working directory, useful for monorepos
|
||||||
|
# working-directory: somedir
|
||||||
|
# Optional: golangci-lint command line arguments.
|
||||||
|
# args: --issues-exit-code=0
|
||||||
|
# Optional: show only new issues if it's a pull request. The default value is `false`.
|
||||||
|
# only-new-issues: true
|
@@ -14,17 +14,16 @@
|
|||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0-devel
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.6.1
|
// protoc v3.17.3
|
||||||
// source: api/annotations.proto
|
// source: api/annotations.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -35,27 +34,51 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
|
||||||
// of the legacy proto package is being used.
|
|
||||||
const _ = proto.ProtoPackageIsVersion4
|
|
||||||
|
|
||||||
var file_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
|
var file_api_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
|
||||||
{
|
{
|
||||||
ExtendedType: (*descriptor.MethodOptions)(nil),
|
ExtendedType: (*descriptorpb.MethodOptions)(nil),
|
||||||
ExtensionType: (*HttpRule)(nil),
|
ExtensionType: (*HttpRule)(nil),
|
||||||
Field: 72295728,
|
Field: 65535654,
|
||||||
Name: "micro.api.http",
|
Name: "micro.api.http",
|
||||||
Tag: "bytes,72295728,opt,name=http",
|
Tag: "bytes,65535654,opt,name=http",
|
||||||
|
Filename: "api/annotations.proto",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ExtendedType: (*descriptorpb.MethodOptions)(nil),
|
||||||
|
ExtensionType: (*MicroMethod)(nil),
|
||||||
|
Field: 65535655,
|
||||||
|
Name: "micro.api.micro_method",
|
||||||
|
Tag: "bytes,65535655,opt,name=micro_method",
|
||||||
|
Filename: "api/annotations.proto",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
|
||||||
|
ExtensionType: (*MicroService)(nil),
|
||||||
|
Field: 65535655,
|
||||||
|
Name: "micro.api.micro_service",
|
||||||
|
Tag: "bytes,65535655,opt,name=micro_service",
|
||||||
Filename: "api/annotations.proto",
|
Filename: "api/annotations.proto",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extension fields to descriptor.MethodOptions.
|
// Extension fields to descriptorpb.MethodOptions.
|
||||||
var (
|
var (
|
||||||
// See `HttpRule`.
|
// See `HttpRule`.
|
||||||
//
|
//
|
||||||
// optional micro.api.HttpRule http = 72295728;
|
// optional micro.api.HttpRule http = 65535654;
|
||||||
E_Http = &file_api_annotations_proto_extTypes[0]
|
E_Http = &file_api_annotations_proto_extTypes[0]
|
||||||
|
// See `MicroMethod`.
|
||||||
|
//
|
||||||
|
// optional micro.api.MicroMethod micro_method = 65535655;
|
||||||
|
E_MicroMethod = &file_api_annotations_proto_extTypes[1]
|
||||||
|
)
|
||||||
|
|
||||||
|
// Extension fields to descriptorpb.ServiceOptions.
|
||||||
|
var (
|
||||||
|
// See `MicroService`
|
||||||
|
//
|
||||||
|
// optional micro.api.MicroService micro_service = 65535655;
|
||||||
|
E_MicroService = &file_api_annotations_proto_extTypes[2]
|
||||||
)
|
)
|
||||||
|
|
||||||
var File_api_annotations_proto protoreflect.FileDescriptor
|
var File_api_annotations_proto protoreflect.FileDescriptor
|
||||||
@@ -64,32 +87,52 @@ var file_api_annotations_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x0a, 0x15, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61,
|
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61,
|
||||||
0x70, 0x69, 0x1a, 0x0e, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f,
|
0x70, 0x69, 0x1a, 0x0e, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x74, 0x6f, 0x1a, 0x0f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x70, 0x72,
|
||||||
0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70,
|
0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x4a, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e, 0x67,
|
0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e,
|
||||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d,
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x4a, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x1e, 0x2e,
|
||||||
0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0xca, 0xbc,
|
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
|
||||||
0x22, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70,
|
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xa6, 0xfd,
|
||||||
0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70,
|
0x9f, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61,
|
||||||
0x42, 0x53, 0x0a, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x10, 0x41,
|
0x70, 0x69, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x04, 0x68, 0x74, 0x74,
|
||||||
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
0x70, 0x3a, 0x5c, 0x0a, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
|
||||||
0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e,
|
0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f,
|
0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2, 0x02,
|
0x73, 0x18, 0xa7, 0xfd, 0x9f, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x69, 0x63,
|
||||||
0x04, 0x4d, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x4d, 0x65, 0x74, 0x68,
|
||||||
|
0x6f, 0x64, 0x52, 0x0b, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x3a,
|
||||||
|
0x60, 0x0a, 0x0d, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||||
|
0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||||
|
0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
|
0x73, 0x18, 0xa7, 0xfd, 0x9f, 0x1f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x69, 0x63,
|
||||||
|
0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x53, 0x65, 0x72, 0x76,
|
||||||
|
0x69, 0x63, 0x65, 0x52, 0x0c, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
|
0x65, 0x42, 0x4e, 0x0a, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x10,
|
||||||
|
0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
|
0x50, 0x01, 0x5a, 0x26, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e,
|
||||||
|
0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
|
||||||
|
0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50,
|
||||||
|
0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_api_annotations_proto_goTypes = []interface{}{
|
var file_api_annotations_proto_goTypes = []interface{}{
|
||||||
(*descriptor.MethodOptions)(nil), // 0: google.protobuf.MethodOptions
|
(*descriptorpb.MethodOptions)(nil), // 0: google.protobuf.MethodOptions
|
||||||
(*HttpRule)(nil), // 1: micro.api.HttpRule
|
(*descriptorpb.ServiceOptions)(nil), // 1: google.protobuf.ServiceOptions
|
||||||
|
(*HttpRule)(nil), // 2: micro.api.HttpRule
|
||||||
|
(*MicroMethod)(nil), // 3: micro.api.MicroMethod
|
||||||
|
(*MicroService)(nil), // 4: micro.api.MicroService
|
||||||
}
|
}
|
||||||
var file_api_annotations_proto_depIdxs = []int32{
|
var file_api_annotations_proto_depIdxs = []int32{
|
||||||
0, // 0: micro.api.http:extendee -> google.protobuf.MethodOptions
|
0, // 0: micro.api.http:extendee -> google.protobuf.MethodOptions
|
||||||
1, // 1: micro.api.http:type_name -> micro.api.HttpRule
|
0, // 1: micro.api.micro_method:extendee -> google.protobuf.MethodOptions
|
||||||
2, // [2:2] is the sub-list for method output_type
|
1, // 2: micro.api.micro_service:extendee -> google.protobuf.ServiceOptions
|
||||||
2, // [2:2] is the sub-list for method input_type
|
2, // 3: micro.api.http:type_name -> micro.api.HttpRule
|
||||||
1, // [1:2] is the sub-list for extension type_name
|
3, // 4: micro.api.micro_method:type_name -> micro.api.MicroMethod
|
||||||
0, // [0:1] is the sub-list for extension extendee
|
4, // 5: micro.api.micro_service:type_name -> micro.api.MicroService
|
||||||
|
6, // [6:6] is the sub-list for method output_type
|
||||||
|
6, // [6:6] is the sub-list for method input_type
|
||||||
|
3, // [3:6] is the sub-list for extension type_name
|
||||||
|
0, // [0:3] is the sub-list for extension extendee
|
||||||
0, // [0:0] is the sub-list for field type_name
|
0, // [0:0] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -99,6 +142,7 @@ func file_api_annotations_proto_init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_api_http_proto_init()
|
file_api_http_proto_init()
|
||||||
|
file_api_micro_proto_init()
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
@@ -106,7 +150,7 @@ func file_api_annotations_proto_init() {
|
|||||||
RawDescriptor: file_api_annotations_proto_rawDesc,
|
RawDescriptor: file_api_annotations_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 0,
|
NumMessages: 0,
|
||||||
NumExtensions: 1,
|
NumExtensions: 3,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_api_annotations_proto_goTypes,
|
GoTypes: file_api_annotations_proto_goTypes,
|
||||||
|
@@ -17,9 +17,10 @@ syntax = "proto3";
|
|||||||
package micro.api;
|
package micro.api;
|
||||||
|
|
||||||
import "api/http.proto";
|
import "api/http.proto";
|
||||||
|
import "api/micro.proto";
|
||||||
import "google/protobuf/descriptor.proto";
|
import "google/protobuf/descriptor.proto";
|
||||||
|
|
||||||
option go_package = "github.com/unistack-org/micro-proto/api;api";
|
option go_package = "go.unistack.org/micro-proto/v3/api;api";
|
||||||
option java_multiple_files = true;
|
option java_multiple_files = true;
|
||||||
option java_outer_classname = "AnnotationsProto";
|
option java_outer_classname = "AnnotationsProto";
|
||||||
option java_package = "micro.api";
|
option java_package = "micro.api";
|
||||||
@@ -27,5 +28,15 @@ option objc_class_prefix = "MAPI";
|
|||||||
|
|
||||||
extend google.protobuf.MethodOptions {
|
extend google.protobuf.MethodOptions {
|
||||||
// See `HttpRule`.
|
// See `HttpRule`.
|
||||||
HttpRule http = 72295728;
|
HttpRule http = 65535654;
|
||||||
|
}
|
||||||
|
|
||||||
|
extend google.protobuf.MethodOptions {
|
||||||
|
// See `MicroMethod`.
|
||||||
|
MicroMethod micro_method = 65535655;
|
||||||
|
}
|
||||||
|
|
||||||
|
extend google.protobuf.ServiceOptions {
|
||||||
|
// See `MicroService`
|
||||||
|
MicroService micro_service = 65535655;
|
||||||
}
|
}
|
||||||
|
1
api/api.go
Normal file
1
api/api.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package api // import "go.unistack.org/micro-proto/v3/api"
|
@@ -14,17 +14,16 @@
|
|||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0-devel
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.6.1
|
// protoc v3.17.3
|
||||||
// source: api/field_behavior.proto
|
// source: api/field_behavior.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
)
|
)
|
||||||
@@ -36,10 +35,6 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
|
||||||
// of the legacy proto package is being used.
|
|
||||||
const _ = proto.ProtoPackageIsVersion4
|
|
||||||
|
|
||||||
// An indicator of the behavior of a given field (for example, that a field
|
// An indicator of the behavior of a given field (for example, that a field
|
||||||
// is required in requests, or given as output but ignored as input).
|
// is required in requests, or given as output but ignored as input).
|
||||||
// This **does not** change the behavior in protocol buffers itself; it only
|
// This **does not** change the behavior in protocol buffers itself; it only
|
||||||
@@ -130,16 +125,16 @@ func (FieldBehavior) EnumDescriptor() ([]byte, []int) {
|
|||||||
|
|
||||||
var file_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{
|
var file_api_field_behavior_proto_extTypes = []protoimpl.ExtensionInfo{
|
||||||
{
|
{
|
||||||
ExtendedType: (*descriptor.FieldOptions)(nil),
|
ExtendedType: (*descriptorpb.FieldOptions)(nil),
|
||||||
ExtensionType: ([]FieldBehavior)(nil),
|
ExtensionType: ([]FieldBehavior)(nil),
|
||||||
Field: 1052,
|
Field: 651052,
|
||||||
Name: "micro.api.field_behavior",
|
Name: "micro.api.field_behavior",
|
||||||
Tag: "varint,1052,rep,name=field_behavior,enum=micro.api.FieldBehavior",
|
Tag: "varint,651052,rep,name=field_behavior,enum=micro.api.FieldBehavior",
|
||||||
Filename: "api/field_behavior.proto",
|
Filename: "api/field_behavior.proto",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extension fields to descriptor.FieldOptions.
|
// Extension fields to descriptorpb.FieldOptions.
|
||||||
var (
|
var (
|
||||||
// A designation of a specific field behavior (required, output only, etc.)
|
// A designation of a specific field behavior (required, output only, etc.)
|
||||||
// in protobuf messages.
|
// in protobuf messages.
|
||||||
@@ -154,7 +149,7 @@ var (
|
|||||||
// [(google.api.field_behavior) = OUTPUT_ONLY,
|
// [(google.api.field_behavior) = OUTPUT_ONLY,
|
||||||
// (google.api.field_behavior) = IMMUTABLE];
|
// (google.api.field_behavior) = IMMUTABLE];
|
||||||
//
|
//
|
||||||
// repeated micro.api.FieldBehavior field_behavior = 1052;
|
// repeated micro.api.FieldBehavior field_behavior = 651052;
|
||||||
E_FieldBehavior = &file_api_field_behavior_proto_extTypes[0]
|
E_FieldBehavior = &file_api_field_behavior_proto_extTypes[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -174,19 +169,19 @@ var file_api_field_behavior_proto_rawDesc = []byte{
|
|||||||
0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f,
|
0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x4e, 0x50, 0x55, 0x54, 0x5f,
|
||||||
0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41,
|
0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4d, 0x4d, 0x55, 0x54, 0x41,
|
||||||
0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52,
|
0x42, 0x4c, 0x45, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x4f, 0x52, 0x44, 0x45, 0x52,
|
||||||
0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x06, 0x3a, 0x5f, 0x0a, 0x0e, 0x66, 0x69, 0x65,
|
0x45, 0x44, 0x5f, 0x4c, 0x49, 0x53, 0x54, 0x10, 0x06, 0x3a, 0x60, 0x0a, 0x0e, 0x66, 0x69, 0x65,
|
||||||
0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f,
|
0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x12, 0x1d, 0x2e, 0x67, 0x6f,
|
||||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69,
|
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69,
|
||||||
0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9c, 0x08, 0x20, 0x03, 0x28,
|
0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xac, 0xde, 0x27, 0x20, 0x03,
|
||||||
0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69,
|
0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x46,
|
||||||
0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x0d, 0x66, 0x69, 0x65,
|
0x69, 0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x52, 0x0d, 0x66, 0x69,
|
||||||
0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x55, 0x0a, 0x09, 0x6d, 0x69,
|
0x65, 0x6c, 0x64, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x42, 0x50, 0x0a, 0x09, 0x6d,
|
||||||
0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x65,
|
0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x12, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42,
|
||||||
0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67,
|
0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26,
|
||||||
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61,
|
0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f,
|
||||||
0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f,
|
0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x61,
|
||||||
0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50,
|
0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70,
|
||||||
0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -203,8 +198,8 @@ func file_api_field_behavior_proto_rawDescGZIP() []byte {
|
|||||||
|
|
||||||
var file_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
var file_api_field_behavior_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
||||||
var file_api_field_behavior_proto_goTypes = []interface{}{
|
var file_api_field_behavior_proto_goTypes = []interface{}{
|
||||||
(FieldBehavior)(0), // 0: micro.api.FieldBehavior
|
(FieldBehavior)(0), // 0: micro.api.FieldBehavior
|
||||||
(*descriptor.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
|
(*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
|
||||||
}
|
}
|
||||||
var file_api_field_behavior_proto_depIdxs = []int32{
|
var file_api_field_behavior_proto_depIdxs = []int32{
|
||||||
1, // 0: micro.api.field_behavior:extendee -> google.protobuf.FieldOptions
|
1, // 0: micro.api.field_behavior:extendee -> google.protobuf.FieldOptions
|
||||||
|
@@ -18,7 +18,7 @@ package micro.api;
|
|||||||
|
|
||||||
import "google/protobuf/descriptor.proto";
|
import "google/protobuf/descriptor.proto";
|
||||||
|
|
||||||
option go_package = "github.com/unistack-org/micro-proto/api;api";
|
option go_package = "go.unistack.org/micro-proto/v3/api;api";
|
||||||
option java_multiple_files = true;
|
option java_multiple_files = true;
|
||||||
option java_outer_classname = "FieldBehaviorProto";
|
option java_outer_classname = "FieldBehaviorProto";
|
||||||
option java_package = "micro.api";
|
option java_package = "micro.api";
|
||||||
@@ -37,7 +37,7 @@ extend google.protobuf.FieldOptions {
|
|||||||
// google.protobuf.Timestamp expire_time = 1
|
// google.protobuf.Timestamp expire_time = 1
|
||||||
// [(google.api.field_behavior) = OUTPUT_ONLY,
|
// [(google.api.field_behavior) = OUTPUT_ONLY,
|
||||||
// (google.api.field_behavior) = IMMUTABLE];
|
// (google.api.field_behavior) = IMMUTABLE];
|
||||||
repeated micro.api.FieldBehavior field_behavior = 1052;
|
repeated micro.api.FieldBehavior field_behavior = 651052;
|
||||||
}
|
}
|
||||||
|
|
||||||
// An indicator of the behavior of a given field (for example, that a field
|
// An indicator of the behavior of a given field (for example, that a field
|
||||||
|
@@ -14,14 +14,13 @@
|
|||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0-devel
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.6.1
|
// protoc v3.17.3
|
||||||
// source: api/http.proto
|
// source: api/http.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
@@ -35,10 +34,6 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
|
||||||
// of the legacy proto package is being used.
|
|
||||||
const _ = proto.ProtoPackageIsVersion4
|
|
||||||
|
|
||||||
// Defines the HTTP configuration for an API service. It contains a list of
|
// Defines the HTTP configuration for an API service. It contains a list of
|
||||||
// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
|
// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
|
||||||
// to one or more HTTP REST API methods.
|
// to one or more HTTP REST API methods.
|
||||||
@@ -670,13 +665,13 @@ var file_api_http_proto_rawDesc = []byte{
|
|||||||
0x22, 0x3b, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61,
|
0x22, 0x3b, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x74, 0x74, 0x70, 0x50, 0x61,
|
||||||
0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
|
0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
|
0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74,
|
||||||
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x4f, 0x0a,
|
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x4a, 0x0a,
|
||||||
0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70,
|
0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70,
|
||||||
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
|
0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73,
|
||||||
0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67,
|
0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70,
|
||||||
0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69,
|
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xf8,
|
||||||
0x3b, 0x61, 0x70, 0x69, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50, 0x49, 0x62, 0x06,
|
0x01, 0x01, 0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@@ -17,7 +17,7 @@ syntax = "proto3";
|
|||||||
package micro.api;
|
package micro.api;
|
||||||
|
|
||||||
option cc_enable_arenas = true;
|
option cc_enable_arenas = true;
|
||||||
option go_package = "github.com/unistack-org/micro-proto/api;api";
|
option go_package = "go.unistack.org/micro-proto/v3/api;api";
|
||||||
option java_multiple_files = true;
|
option java_multiple_files = true;
|
||||||
option java_outer_classname = "HttpProto";
|
option java_outer_classname = "HttpProto";
|
||||||
option java_package = "micro.api";
|
option java_package = "micro.api";
|
||||||
|
@@ -14,17 +14,16 @@
|
|||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0-devel
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.6.1
|
// protoc v3.17.3
|
||||||
// source: api/httpbody.proto
|
// source: api/httpbody.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
any "github.com/golang/protobuf/ptypes/any"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
anypb "google.golang.org/protobuf/types/known/anypb"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
)
|
)
|
||||||
@@ -36,10 +35,6 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
|
||||||
// of the legacy proto package is being used.
|
|
||||||
const _ = proto.ProtoPackageIsVersion4
|
|
||||||
|
|
||||||
// Message that represents an arbitrary HTTP body. It should only be used for
|
// Message that represents an arbitrary HTTP body. It should only be used for
|
||||||
// payload formats that can't be represented as JSON, such as raw binary or
|
// payload formats that can't be represented as JSON, such as raw binary or
|
||||||
// an HTML page.
|
// an HTML page.
|
||||||
@@ -90,7 +85,7 @@ type HttpBody struct {
|
|||||||
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
|
||||||
// Application specific response metadata. Must be set in the first response
|
// Application specific response metadata. Must be set in the first response
|
||||||
// for streaming APIs.
|
// for streaming APIs.
|
||||||
Extensions []*any.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty"`
|
Extensions []*anypb.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HttpBody) Reset() {
|
func (x *HttpBody) Reset() {
|
||||||
@@ -139,7 +134,7 @@ func (x *HttpBody) GetData() []byte {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HttpBody) GetExtensions() []*any.Any {
|
func (x *HttpBody) GetExtensions() []*anypb.Any {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Extensions
|
return x.Extensions
|
||||||
}
|
}
|
||||||
@@ -160,12 +155,12 @@ var file_api_httpbody_proto_rawDesc = []byte{
|
|||||||
0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
|
||||||
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
|
0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
|
||||||
0x6f, 0x6e, 0x73, 0x42, 0x53, 0x0a, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69,
|
0x6f, 0x6e, 0x73, 0x42, 0x4e, 0x0a, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69,
|
||||||
0x42, 0x0d, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
0x42, 0x0d, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
|
||||||
0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e,
|
0x01, 0x5a, 0x26, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f,
|
||||||
0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f,
|
0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76,
|
||||||
0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xf8, 0x01,
|
0x33, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x4d,
|
||||||
0x01, 0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -182,8 +177,8 @@ func file_api_httpbody_proto_rawDescGZIP() []byte {
|
|||||||
|
|
||||||
var file_api_httpbody_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
var file_api_httpbody_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||||
var file_api_httpbody_proto_goTypes = []interface{}{
|
var file_api_httpbody_proto_goTypes = []interface{}{
|
||||||
(*HttpBody)(nil), // 0: micro.api.HttpBody
|
(*HttpBody)(nil), // 0: micro.api.HttpBody
|
||||||
(*any.Any)(nil), // 1: google.protobuf.Any
|
(*anypb.Any)(nil), // 1: google.protobuf.Any
|
||||||
}
|
}
|
||||||
var file_api_httpbody_proto_depIdxs = []int32{
|
var file_api_httpbody_proto_depIdxs = []int32{
|
||||||
1, // 0: micro.api.HttpBody.extensions:type_name -> google.protobuf.Any
|
1, // 0: micro.api.HttpBody.extensions:type_name -> google.protobuf.Any
|
||||||
|
@@ -19,7 +19,7 @@ package micro.api;
|
|||||||
import "google/protobuf/any.proto";
|
import "google/protobuf/any.proto";
|
||||||
|
|
||||||
option cc_enable_arenas = true;
|
option cc_enable_arenas = true;
|
||||||
option go_package = "github.com/unistack-org/micro-proto/api;api";
|
option go_package = "go.unistack.org/micro-proto/v3/api;api";
|
||||||
option java_multiple_files = true;
|
option java_multiple_files = true;
|
||||||
option java_outer_classname = "HttpBodyProto";
|
option java_outer_classname = "HttpBodyProto";
|
||||||
option java_package = "micro.api";
|
option java_package = "micro.api";
|
||||||
|
274
api/micro.pb.go
Normal file
274
api/micro.pb.go
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
// Copyright 2020 Unistack LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.27.1
|
||||||
|
// protoc v3.17.3
|
||||||
|
// source: api/micro.proto
|
||||||
|
|
||||||
|
package api
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
// Defines the Micro configuration for a method. It contains a
|
||||||
|
// [MicroMethod][micro.api.MicroMethod]
|
||||||
|
type MicroMethod struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// Timeout for handler
|
||||||
|
Timeout int32 `protobuf:"varint,1,opt,name=timeout,proto3" json:"timeout,omitempty"`
|
||||||
|
// ServerOptions contains options for server
|
||||||
|
ServerOptions []string `protobuf:"bytes,2,rep,name=server_options,json=serverOptions,proto3" json:"server_options,omitempty"`
|
||||||
|
// ClientOptions contains options for client
|
||||||
|
ClientOptions []string `protobuf:"bytes,3,rep,name=client_options,json=clientOptions,proto3" json:"client_options,omitempty"`
|
||||||
|
// Type rpc/pub/sub
|
||||||
|
Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroMethod) Reset() {
|
||||||
|
*x = MicroMethod{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_api_micro_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroMethod) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MicroMethod) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MicroMethod) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_api_micro_proto_msgTypes[0]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MicroMethod.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MicroMethod) Descriptor() ([]byte, []int) {
|
||||||
|
return file_api_micro_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroMethod) GetTimeout() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Timeout
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroMethod) GetServerOptions() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServerOptions
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroMethod) GetClientOptions() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ClientOptions
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroMethod) GetType() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Type
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defines the Micro configuration for a method. It contains a
|
||||||
|
// [MicroService][micro.api.MicroService]
|
||||||
|
type MicroService struct {
|
||||||
|
state protoimpl.MessageState
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// ServerWrappers contains wrappers for server
|
||||||
|
ServerWrappers []string `protobuf:"bytes,1,rep,name=server_wrappers,json=serverWrappers,proto3" json:"server_wrappers,omitempty"`
|
||||||
|
// ClientWrappers contains wrappers for client
|
||||||
|
ClientWrappers []string `protobuf:"bytes,2,rep,name=client_wrappers,json=clientWrappers,proto3" json:"client_wrappers,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroService) Reset() {
|
||||||
|
*x = MicroService{}
|
||||||
|
if protoimpl.UnsafeEnabled {
|
||||||
|
mi := &file_api_micro_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroService) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MicroService) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MicroService) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_api_micro_proto_msgTypes[1]
|
||||||
|
if protoimpl.UnsafeEnabled && x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MicroService.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MicroService) Descriptor() ([]byte, []int) {
|
||||||
|
return file_api_micro_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroService) GetServerWrappers() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServerWrappers
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MicroService) GetClientWrappers() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ClientWrappers
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_api_micro_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_api_micro_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x0f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
|
0x6f, 0x12, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x22, 0x89, 0x01, 0x0a,
|
||||||
|
0x0b, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07,
|
||||||
|
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x74,
|
||||||
|
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||||
|
0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d,
|
||||||
|
0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a,
|
||||||
|
0x0e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||||
|
0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4f, 0x70, 0x74,
|
||||||
|
0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||||
|
0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x60, 0x0a, 0x0c, 0x4d, 0x69, 0x63, 0x72,
|
||||||
|
0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76,
|
||||||
|
0x65, 0x72, 0x5f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
|
||||||
|
0x09, 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72,
|
||||||
|
0x73, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x77, 0x72, 0x61, 0x70,
|
||||||
|
0x70, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6c, 0x69, 0x65,
|
||||||
|
0x6e, 0x74, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x42, 0x4b, 0x0a, 0x09, 0x6d, 0x69,
|
||||||
|
0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0a, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x50, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x67, 0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61,
|
||||||
|
0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f,
|
||||||
|
0x74, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, 0x70, 0x69, 0xf8, 0x01, 0x01,
|
||||||
|
0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_api_micro_proto_rawDescOnce sync.Once
|
||||||
|
file_api_micro_proto_rawDescData = file_api_micro_proto_rawDesc
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_api_micro_proto_rawDescGZIP() []byte {
|
||||||
|
file_api_micro_proto_rawDescOnce.Do(func() {
|
||||||
|
file_api_micro_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_micro_proto_rawDescData)
|
||||||
|
})
|
||||||
|
return file_api_micro_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_api_micro_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
|
var file_api_micro_proto_goTypes = []interface{}{
|
||||||
|
(*MicroMethod)(nil), // 0: micro.api.MicroMethod
|
||||||
|
(*MicroService)(nil), // 1: micro.api.MicroService
|
||||||
|
}
|
||||||
|
var file_api_micro_proto_depIdxs = []int32{
|
||||||
|
0, // [0:0] is the sub-list for method output_type
|
||||||
|
0, // [0:0] is the sub-list for method input_type
|
||||||
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
0, // [0:0] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_api_micro_proto_init() }
|
||||||
|
func file_api_micro_proto_init() {
|
||||||
|
if File_api_micro_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if !protoimpl.UnsafeEnabled {
|
||||||
|
file_api_micro_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*MicroMethod); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
file_api_micro_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||||
|
switch v := v.(*MicroService); i {
|
||||||
|
case 0:
|
||||||
|
return &v.state
|
||||||
|
case 1:
|
||||||
|
return &v.sizeCache
|
||||||
|
case 2:
|
||||||
|
return &v.unknownFields
|
||||||
|
default:
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_api_micro_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 2,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_api_micro_proto_goTypes,
|
||||||
|
DependencyIndexes: file_api_micro_proto_depIdxs,
|
||||||
|
MessageInfos: file_api_micro_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_api_micro_proto = out.File
|
||||||
|
file_api_micro_proto_rawDesc = nil
|
||||||
|
file_api_micro_proto_goTypes = nil
|
||||||
|
file_api_micro_proto_depIdxs = nil
|
||||||
|
}
|
46
api/micro.proto
Normal file
46
api/micro.proto
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
// Copyright 2020 Unistack LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package micro.api;
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option go_package = "go.unistack.org/micro-proto/v3/api;api";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "MicroProto";
|
||||||
|
option java_package = "micro.api";
|
||||||
|
option objc_class_prefix = "MAPI";
|
||||||
|
|
||||||
|
// Defines the Micro configuration for a method. It contains a
|
||||||
|
// [MicroMethod][micro.api.MicroMethod]
|
||||||
|
message MicroMethod {
|
||||||
|
// Timeout for handler
|
||||||
|
int32 timeout = 1;
|
||||||
|
// ServerOptions contains options for server
|
||||||
|
repeated string server_options = 2;
|
||||||
|
// ClientOptions contains options for client
|
||||||
|
repeated string client_options = 3;
|
||||||
|
// Type rpc/pub/sub
|
||||||
|
string type = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defines the Micro configuration for a method. It contains a
|
||||||
|
// [MicroService][micro.api.MicroService]
|
||||||
|
message MicroService {
|
||||||
|
// ServerWrappers contains wrappers for server
|
||||||
|
repeated string server_wrappers = 1;
|
||||||
|
// ClientWrappers contains wrappers for client
|
||||||
|
repeated string client_wrappers = 2;
|
||||||
|
}
|
@@ -4,5 +4,7 @@ package main
|
|||||||
//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/http.proto
|
//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/http.proto
|
||||||
//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/field_behavior.proto
|
//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/field_behavior.proto
|
||||||
//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/httpbody.proto
|
//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/httpbody.proto
|
||||||
|
//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/micro.proto
|
||||||
//go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/annotations.proto
|
//go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/annotations.proto
|
||||||
//go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/openapiv2.proto
|
//go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/gopenapiv2.proto
|
||||||
|
//go:generate protoc -I. -I./tag --go_out=paths=source_relative:. ./tag/tag.proto
|
||||||
|
7
go.mod
7
go.mod
@@ -1,8 +1,5 @@
|
|||||||
module github.com/unistack-org/micro-proto
|
module go.unistack.org/micro-proto/v3
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
require (
|
require google.golang.org/protobuf v1.27.1
|
||||||
github.com/golang/protobuf v1.4.3
|
|
||||||
google.golang.org/protobuf v1.25.0
|
|
||||||
)
|
|
||||||
|
71
go.sum
71
go.sum
@@ -1,67 +1,8 @@
|
|||||||
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
|
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
|
||||||
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
|
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||||
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
|
|
||||||
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
|
|
||||||
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
|
|
||||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
|
|
||||||
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
|
||||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
|
||||||
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
|
|
||||||
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
|
|
||||||
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
||||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
|
|
||||||
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
|
||||||
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
|
|
||||||
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
|
|
||||||
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
|
|
||||||
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
|
||||||
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
|
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
|
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
||||||
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
|
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
||||||
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
|
||||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
||||||
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
|
|
||||||
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
|
|
||||||
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
|
|
||||||
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
|
|
||||||
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
|
||||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
|
||||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
|
||||||
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
|
|
||||||
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
|
|
||||||
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
|
||||||
|
@@ -1,16 +1,15 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0-devel
|
// protoc-gen-go v1.27.1
|
||||||
// protoc v3.6.1
|
// protoc v3.17.3
|
||||||
// source: openapiv2/annotations.proto
|
// source: openapiv2/annotations.proto
|
||||||
|
|
||||||
package openapiv2
|
package openapiv2
|
||||||
|
|
||||||
import (
|
import (
|
||||||
proto "github.com/golang/protobuf/proto"
|
|
||||||
descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -21,105 +20,101 @@ const (
|
|||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
// This is a compile-time assertion that a sufficiently up-to-date version
|
|
||||||
// of the legacy proto package is being used.
|
|
||||||
const _ = proto.ProtoPackageIsVersion4
|
|
||||||
|
|
||||||
var file_openapiv2_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
|
var file_openapiv2_annotations_proto_extTypes = []protoimpl.ExtensionInfo{
|
||||||
{
|
{
|
||||||
ExtendedType: (*descriptor.FileOptions)(nil),
|
ExtendedType: (*descriptorpb.FileOptions)(nil),
|
||||||
ExtensionType: (*Swagger)(nil),
|
ExtensionType: (*Document)(nil),
|
||||||
Field: 1042,
|
Field: 847940,
|
||||||
Name: "micro.openapiv2.openapiv2_swagger",
|
Name: "micro.openapiv2.openapiv2_swagger",
|
||||||
Tag: "bytes,1042,opt,name=openapiv2_swagger",
|
Tag: "bytes,847940,opt,name=openapiv2_swagger",
|
||||||
Filename: "openapiv2/annotations.proto",
|
Filename: "openapiv2/annotations.proto",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ExtendedType: (*descriptor.MethodOptions)(nil),
|
ExtendedType: (*descriptorpb.MethodOptions)(nil),
|
||||||
ExtensionType: (*Operation)(nil),
|
ExtensionType: (*Operation)(nil),
|
||||||
Field: 1042,
|
Field: 847940,
|
||||||
Name: "micro.openapiv2.openapiv2_operation",
|
Name: "micro.openapiv2.openapiv2_operation",
|
||||||
Tag: "bytes,1042,opt,name=openapiv2_operation",
|
Tag: "bytes,847940,opt,name=openapiv2_operation",
|
||||||
Filename: "openapiv2/annotations.proto",
|
Filename: "openapiv2/annotations.proto",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ExtendedType: (*descriptor.MessageOptions)(nil),
|
ExtendedType: (*descriptorpb.MessageOptions)(nil),
|
||||||
ExtensionType: (*Schema)(nil),
|
ExtensionType: (*Schema)(nil),
|
||||||
Field: 1042,
|
Field: 847940,
|
||||||
Name: "micro.openapiv2.openapiv2_schema",
|
Name: "micro.openapiv2.openapiv2_schema",
|
||||||
Tag: "bytes,1042,opt,name=openapiv2_schema",
|
Tag: "bytes,847940,opt,name=openapiv2_schema",
|
||||||
Filename: "openapiv2/annotations.proto",
|
Filename: "openapiv2/annotations.proto",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ExtendedType: (*descriptor.ServiceOptions)(nil),
|
ExtendedType: (*descriptorpb.ServiceOptions)(nil),
|
||||||
ExtensionType: (*Tag)(nil),
|
ExtensionType: (*Tag)(nil),
|
||||||
Field: 1042,
|
Field: 847940,
|
||||||
Name: "micro.openapiv2.openapiv2_tag",
|
Name: "micro.openapiv2.openapiv2_tag",
|
||||||
Tag: "bytes,1042,opt,name=openapiv2_tag",
|
Tag: "bytes,847940,opt,name=openapiv2_tag",
|
||||||
Filename: "openapiv2/annotations.proto",
|
Filename: "openapiv2/annotations.proto",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ExtendedType: (*descriptor.FieldOptions)(nil),
|
ExtendedType: (*descriptorpb.FieldOptions)(nil),
|
||||||
ExtensionType: (*JSONSchema)(nil),
|
ExtensionType: (*Schema)(nil),
|
||||||
Field: 1042,
|
Field: 847940,
|
||||||
Name: "micro.openapiv2.openapiv2_field",
|
Name: "micro.openapiv2.openapiv2_field",
|
||||||
Tag: "bytes,1042,opt,name=openapiv2_field",
|
Tag: "bytes,847940,opt,name=openapiv2_field",
|
||||||
Filename: "openapiv2/annotations.proto",
|
Filename: "openapiv2/annotations.proto",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extension fields to descriptor.FileOptions.
|
// Extension fields to descriptorpb.FileOptions.
|
||||||
var (
|
var (
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
//
|
//
|
||||||
// optional micro.openapiv2.Swagger openapiv2_swagger = 1042;
|
// optional micro.openapiv2.Document openapiv2_swagger = 847940;
|
||||||
E_Openapiv2Swagger = &file_openapiv2_annotations_proto_extTypes[0]
|
E_Openapiv2Swagger = &file_openapiv2_annotations_proto_extTypes[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
// Extension fields to descriptor.MethodOptions.
|
// Extension fields to descriptorpb.MethodOptions.
|
||||||
var (
|
var (
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
//
|
//
|
||||||
// optional micro.openapiv2.Operation openapiv2_operation = 1042;
|
// optional micro.openapiv2.Operation openapiv2_operation = 847940;
|
||||||
E_Openapiv2Operation = &file_openapiv2_annotations_proto_extTypes[1]
|
E_Openapiv2Operation = &file_openapiv2_annotations_proto_extTypes[1]
|
||||||
)
|
)
|
||||||
|
|
||||||
// Extension fields to descriptor.MessageOptions.
|
// Extension fields to descriptorpb.MessageOptions.
|
||||||
var (
|
var (
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
//
|
//
|
||||||
// optional micro.openapiv2.Schema openapiv2_schema = 1042;
|
// optional micro.openapiv2.Schema openapiv2_schema = 847940;
|
||||||
E_Openapiv2Schema = &file_openapiv2_annotations_proto_extTypes[2]
|
E_Openapiv2Schema = &file_openapiv2_annotations_proto_extTypes[2]
|
||||||
)
|
)
|
||||||
|
|
||||||
// Extension fields to descriptor.ServiceOptions.
|
// Extension fields to descriptorpb.ServiceOptions.
|
||||||
var (
|
var (
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
//
|
//
|
||||||
// optional micro.openapiv2.Tag openapiv2_tag = 1042;
|
// optional micro.openapiv2.Tag openapiv2_tag = 847940;
|
||||||
E_Openapiv2Tag = &file_openapiv2_annotations_proto_extTypes[3]
|
E_Openapiv2Tag = &file_openapiv2_annotations_proto_extTypes[3]
|
||||||
)
|
)
|
||||||
|
|
||||||
// Extension fields to descriptor.FieldOptions.
|
// Extension fields to descriptorpb.FieldOptions.
|
||||||
var (
|
var (
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
//
|
//
|
||||||
// optional micro.openapiv2.JSONSchema openapiv2_field = 1042;
|
// optional micro.openapiv2.Schema openapiv2_field = 847940;
|
||||||
E_Openapiv2Field = &file_openapiv2_annotations_proto_extTypes[4]
|
E_Openapiv2Field = &file_openapiv2_annotations_proto_extTypes[4]
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -131,57 +126,56 @@ var file_openapiv2_annotations_proto_rawDesc = []byte{
|
|||||||
0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x1a, 0x20,
|
0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x1a, 0x20,
|
||||||
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
|
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
|
||||||
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x1a, 0x19, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x65, 0x6e,
|
0x1a, 0x1a, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x67, 0x6f, 0x70, 0x65,
|
||||||
0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x64, 0x0a, 0x11, 0x6f,
|
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x66, 0x0a, 0x11,
|
||||||
0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72,
|
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x77, 0x61, 0x67, 0x67, 0x65,
|
||||||
0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
0x72, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||||
0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92,
|
0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18,
|
||||||
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70,
|
0xc4, 0xe0, 0x33, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e,
|
||||||
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65, 0x72, 0x52,
|
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65,
|
||||||
0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61, 0x67, 0x67, 0x65,
|
0x6e, 0x74, 0x52, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53, 0x77, 0x61,
|
||||||
0x72, 0x3a, 0x6c, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x6f,
|
0x67, 0x67, 0x65, 0x72, 0x3a, 0x6d, 0x0a, 0x13, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
|
||||||
0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
|
0x32, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x67, 0x6f,
|
||||||
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f,
|
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65,
|
||||||
0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc4, 0xe0, 0x33, 0x20,
|
||||||
0x1a, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
|
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e,
|
||||||
0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x12, 0x6f, 0x70, 0x65,
|
0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||||
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a,
|
0x12, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74,
|
||||||
0x64, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x73, 0x63, 0x68,
|
0x69, 0x6f, 0x6e, 0x3a, 0x65, 0x0a, 0x10, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
|
||||||
0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
|
||||||
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74,
|
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x69,
|
0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc4, 0xe0, 0x33, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x53, 0x63,
|
0x32, 0x17, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
|
||||||
0x68, 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x53,
|
0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61,
|
||||||
0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x5b, 0x0a, 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69,
|
0x70, 0x69, 0x76, 0x32, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x3a, 0x5c, 0x0a, 0x0d, 0x6f, 0x70,
|
||||||
0x76, 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x74, 0x61, 0x67, 0x12, 0x1f, 0x2e, 0x67, 0x6f,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65,
|
||||||
0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc4, 0xe0, 0x33,
|
||||||
0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65,
|
||||||
0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x54,
|
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x54, 0x61, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e,
|
||||||
0x61, 0x67, 0x3a, 0x64, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x5f,
|
0x61, 0x70, 0x69, 0x76, 0x32, 0x54, 0x61, 0x67, 0x3a, 0x61, 0x0a, 0x0f, 0x6f, 0x70, 0x65, 0x6e,
|
||||||
0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
0x61, 0x70, 0x69, 0x76, 0x32, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74,
|
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69,
|
||||||
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x92, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x6d, 0x69,
|
0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc4, 0xe0, 0x33, 0x20, 0x01,
|
||||||
0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2e, 0x4a, 0x53,
|
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x61,
|
||||||
0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
|
0x70, 0x69, 0x76, 0x32, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x0e, 0x6f, 0x70, 0x65,
|
||||||
0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68,
|
0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x42, 0x34, 0x5a, 0x32, 0x67,
|
||||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d,
|
0x6f, 0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d,
|
||||||
0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
|
0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x6f, 0x70,
|
||||||
0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70,
|
0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x3b, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76,
|
||||||
0x69, 0x76, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_openapiv2_annotations_proto_goTypes = []interface{}{
|
var file_openapiv2_annotations_proto_goTypes = []interface{}{
|
||||||
(*descriptor.FileOptions)(nil), // 0: google.protobuf.FileOptions
|
(*descriptorpb.FileOptions)(nil), // 0: google.protobuf.FileOptions
|
||||||
(*descriptor.MethodOptions)(nil), // 1: google.protobuf.MethodOptions
|
(*descriptorpb.MethodOptions)(nil), // 1: google.protobuf.MethodOptions
|
||||||
(*descriptor.MessageOptions)(nil), // 2: google.protobuf.MessageOptions
|
(*descriptorpb.MessageOptions)(nil), // 2: google.protobuf.MessageOptions
|
||||||
(*descriptor.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions
|
(*descriptorpb.ServiceOptions)(nil), // 3: google.protobuf.ServiceOptions
|
||||||
(*descriptor.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
|
(*descriptorpb.FieldOptions)(nil), // 4: google.protobuf.FieldOptions
|
||||||
(*Swagger)(nil), // 5: micro.openapiv2.Swagger
|
(*Document)(nil), // 5: micro.openapiv2.Document
|
||||||
(*Operation)(nil), // 6: micro.openapiv2.Operation
|
(*Operation)(nil), // 6: micro.openapiv2.Operation
|
||||||
(*Schema)(nil), // 7: micro.openapiv2.Schema
|
(*Schema)(nil), // 7: micro.openapiv2.Schema
|
||||||
(*Tag)(nil), // 8: micro.openapiv2.Tag
|
(*Tag)(nil), // 8: micro.openapiv2.Tag
|
||||||
(*JSONSchema)(nil), // 9: micro.openapiv2.JSONSchema
|
|
||||||
}
|
}
|
||||||
var file_openapiv2_annotations_proto_depIdxs = []int32{
|
var file_openapiv2_annotations_proto_depIdxs = []int32{
|
||||||
0, // 0: micro.openapiv2.openapiv2_swagger:extendee -> google.protobuf.FileOptions
|
0, // 0: micro.openapiv2.openapiv2_swagger:extendee -> google.protobuf.FileOptions
|
||||||
@@ -189,11 +183,11 @@ var file_openapiv2_annotations_proto_depIdxs = []int32{
|
|||||||
2, // 2: micro.openapiv2.openapiv2_schema:extendee -> google.protobuf.MessageOptions
|
2, // 2: micro.openapiv2.openapiv2_schema:extendee -> google.protobuf.MessageOptions
|
||||||
3, // 3: micro.openapiv2.openapiv2_tag:extendee -> google.protobuf.ServiceOptions
|
3, // 3: micro.openapiv2.openapiv2_tag:extendee -> google.protobuf.ServiceOptions
|
||||||
4, // 4: micro.openapiv2.openapiv2_field:extendee -> google.protobuf.FieldOptions
|
4, // 4: micro.openapiv2.openapiv2_field:extendee -> google.protobuf.FieldOptions
|
||||||
5, // 5: micro.openapiv2.openapiv2_swagger:type_name -> micro.openapiv2.Swagger
|
5, // 5: micro.openapiv2.openapiv2_swagger:type_name -> micro.openapiv2.Document
|
||||||
6, // 6: micro.openapiv2.openapiv2_operation:type_name -> micro.openapiv2.Operation
|
6, // 6: micro.openapiv2.openapiv2_operation:type_name -> micro.openapiv2.Operation
|
||||||
7, // 7: micro.openapiv2.openapiv2_schema:type_name -> micro.openapiv2.Schema
|
7, // 7: micro.openapiv2.openapiv2_schema:type_name -> micro.openapiv2.Schema
|
||||||
8, // 8: micro.openapiv2.openapiv2_tag:type_name -> micro.openapiv2.Tag
|
8, // 8: micro.openapiv2.openapiv2_tag:type_name -> micro.openapiv2.Tag
|
||||||
9, // 9: micro.openapiv2.openapiv2_field:type_name -> micro.openapiv2.JSONSchema
|
7, // 9: micro.openapiv2.openapiv2_field:type_name -> micro.openapiv2.Schema
|
||||||
10, // [10:10] is the sub-list for method output_type
|
10, // [10:10] is the sub-list for method output_type
|
||||||
10, // [10:10] is the sub-list for method input_type
|
10, // [10:10] is the sub-list for method input_type
|
||||||
5, // [5:10] is the sub-list for extension type_name
|
5, // [5:10] is the sub-list for extension type_name
|
||||||
@@ -206,7 +200,7 @@ func file_openapiv2_annotations_proto_init() {
|
|||||||
if File_openapiv2_annotations_proto != nil {
|
if File_openapiv2_annotations_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_openapiv2_openapiv2_proto_init()
|
file_openapiv2_gopenapiv2_proto_init()
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@@ -2,43 +2,43 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package micro.openapiv2;
|
package micro.openapiv2;
|
||||||
|
|
||||||
option go_package = "github.com/unistack-org/micro-proto/openapiv2;openapiv2";
|
option go_package = "go.unistack.org/micro-proto/v3/openapiv2;openapiv2";
|
||||||
|
|
||||||
import "google/protobuf/descriptor.proto";
|
import "google/protobuf/descriptor.proto";
|
||||||
import "openapiv2/openapiv2.proto";
|
import "openapiv2/gopenapiv2.proto";
|
||||||
|
|
||||||
extend google.protobuf.FileOptions {
|
extend google.protobuf.FileOptions {
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
Swagger openapiv2_swagger = 1042;
|
Document openapiv2_swagger = 847940;
|
||||||
}
|
}
|
||||||
extend google.protobuf.MethodOptions {
|
extend google.protobuf.MethodOptions {
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
Operation openapiv2_operation = 1042;
|
Operation openapiv2_operation = 847940;
|
||||||
}
|
}
|
||||||
extend google.protobuf.MessageOptions {
|
extend google.protobuf.MessageOptions {
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
Schema openapiv2_schema = 1042;
|
Schema openapiv2_schema = 847940;
|
||||||
}
|
}
|
||||||
extend google.protobuf.ServiceOptions {
|
extend google.protobuf.ServiceOptions {
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
Tag openapiv2_tag = 1042;
|
Tag openapiv2_tag = 847940;
|
||||||
}
|
}
|
||||||
extend google.protobuf.FieldOptions {
|
extend google.protobuf.FieldOptions {
|
||||||
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
// ID assigned by protobuf-global-extension-registry@google.com for gRPC-Gateway project.
|
||||||
//
|
//
|
||||||
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
// All IDs are the same, as assigned. It is okay that they are the same, as they extend
|
||||||
// different descriptor messages.
|
// different descriptor messages.
|
||||||
JSONSchema openapiv2_field = 1042;
|
Schema openapiv2_field = 847940;
|
||||||
}
|
}
|
||||||
|
7386
openapiv2/gopenapiv2.pb.go
Normal file
7386
openapiv2/gopenapiv2.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
665
openapiv2/gopenapiv2.proto
Normal file
665
openapiv2/gopenapiv2.proto
Normal file
@@ -0,0 +1,665 @@
|
|||||||
|
// Copyright 2020 Google LLC. All Rights Reserved.
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// THIS FILE IS AUTOMATICALLY GENERATED.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package micro.openapiv2;
|
||||||
|
|
||||||
|
import "google/protobuf/any.proto";
|
||||||
|
|
||||||
|
// This option lets the proto compiler generate Java code inside the package
|
||||||
|
// name (see below) instead of inside an outer class. It creates a simpler
|
||||||
|
// developer experience by reducing one-level of name nesting and be
|
||||||
|
// consistent with most programming languages that don't support outer classes.
|
||||||
|
option java_multiple_files = true;
|
||||||
|
|
||||||
|
// The Java outer classname should be the filename in UpperCamelCase. This
|
||||||
|
// class is only used to hold proto descriptor, so developers don't need to
|
||||||
|
// work with it directly.
|
||||||
|
option java_outer_classname = "OpenAPIProto";
|
||||||
|
|
||||||
|
// The Java package name must be proto package name with proper prefix.
|
||||||
|
option java_package = "micro.openapiv2";
|
||||||
|
|
||||||
|
// A reasonable prefix for the Objective-C symbols generated from the package.
|
||||||
|
// It should at a minimum be 3 characters long, all uppercase, and convention
|
||||||
|
// is to use an abbreviation of the package name. Something short, but
|
||||||
|
// hopefully unique enough to not conflict with things that may come along in
|
||||||
|
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
|
||||||
|
option objc_class_prefix = "OAS";
|
||||||
|
|
||||||
|
// The Go package name.
|
||||||
|
option go_package = "go.unistack.org/micro-proto/v3/openapiv2;openapiv2";
|
||||||
|
|
||||||
|
message AdditionalPropertiesItem {
|
||||||
|
oneof oneof {
|
||||||
|
Schema schema = 1;
|
||||||
|
bool boolean = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message Any {
|
||||||
|
google.protobuf.Any value = 1;
|
||||||
|
string yaml = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ApiKeySecurity {
|
||||||
|
string type = 1;
|
||||||
|
string name = 2;
|
||||||
|
string in = 3;
|
||||||
|
string description = 4;
|
||||||
|
repeated NamedAny vendor_extension = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BasicAuthenticationSecurity {
|
||||||
|
string type = 1;
|
||||||
|
string description = 2;
|
||||||
|
repeated NamedAny vendor_extension = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BodyParameter {
|
||||||
|
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
|
||||||
|
string description = 1;
|
||||||
|
// The name of the parameter.
|
||||||
|
string name = 2;
|
||||||
|
// Determines the location of the parameter.
|
||||||
|
string in = 3;
|
||||||
|
// Determines whether or not this parameter is required or optional.
|
||||||
|
bool required = 4;
|
||||||
|
Schema schema = 5;
|
||||||
|
repeated NamedAny vendor_extension = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Contact information for the owners of the API.
|
||||||
|
message Contact {
|
||||||
|
// The identifying name of the contact person/organization.
|
||||||
|
string name = 1;
|
||||||
|
// The URL pointing to the contact information.
|
||||||
|
string url = 2;
|
||||||
|
// The email address of the contact person/organization.
|
||||||
|
string email = 3;
|
||||||
|
repeated NamedAny vendor_extension = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Default {
|
||||||
|
repeated NamedAny additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// One or more JSON objects describing the schemas being consumed and produced by the API.
|
||||||
|
message Definitions {
|
||||||
|
repeated NamedSchema additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Document {
|
||||||
|
// The Swagger version of this document.
|
||||||
|
string swagger = 1;
|
||||||
|
Info info = 2;
|
||||||
|
// The host (name or ip) of the API. Example: 'swagger.io'
|
||||||
|
string host = 3;
|
||||||
|
// The base path to the API. Example: '/api'.
|
||||||
|
string base_path = 4;
|
||||||
|
// The transfer protocol of the API.
|
||||||
|
repeated string schemes = 5;
|
||||||
|
// A list of MIME types accepted by the API.
|
||||||
|
repeated string consumes = 6;
|
||||||
|
// A list of MIME types the API can produce.
|
||||||
|
repeated string produces = 7;
|
||||||
|
Paths paths = 8;
|
||||||
|
Definitions definitions = 9;
|
||||||
|
ParameterDefinitions parameters = 10;
|
||||||
|
ResponseDefinitions responses = 11;
|
||||||
|
repeated SecurityRequirement security = 12;
|
||||||
|
SecurityDefinitions security_definitions = 13;
|
||||||
|
repeated Tag tags = 14;
|
||||||
|
ExternalDocs external_docs = 15;
|
||||||
|
repeated NamedAny vendor_extension = 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Examples {
|
||||||
|
repeated NamedAny additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// information about external documentation
|
||||||
|
message ExternalDocs {
|
||||||
|
string description = 1;
|
||||||
|
string url = 2;
|
||||||
|
repeated NamedAny vendor_extension = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A deterministic version of a JSON Schema object.
|
||||||
|
message FileSchema {
|
||||||
|
string format = 1;
|
||||||
|
string title = 2;
|
||||||
|
string description = 3;
|
||||||
|
Any default = 4;
|
||||||
|
repeated string required = 5;
|
||||||
|
string type = 6;
|
||||||
|
bool read_only = 7;
|
||||||
|
ExternalDocs external_docs = 8;
|
||||||
|
Any example = 9;
|
||||||
|
repeated NamedAny vendor_extension = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
message FormDataParameterSubSchema {
|
||||||
|
// Determines whether or not this parameter is required or optional.
|
||||||
|
bool required = 1;
|
||||||
|
// Determines the location of the parameter.
|
||||||
|
string in = 2;
|
||||||
|
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
|
||||||
|
string description = 3;
|
||||||
|
// The name of the parameter.
|
||||||
|
string name = 4;
|
||||||
|
// allows sending a parameter by name only or with an empty value.
|
||||||
|
bool allow_empty_value = 5;
|
||||||
|
string type = 6;
|
||||||
|
string format = 7;
|
||||||
|
PrimitivesItems items = 8;
|
||||||
|
string collection_format = 9;
|
||||||
|
Any default = 10;
|
||||||
|
double maximum = 11;
|
||||||
|
bool exclusive_maximum = 12;
|
||||||
|
double minimum = 13;
|
||||||
|
bool exclusive_minimum = 14;
|
||||||
|
int64 max_length = 15;
|
||||||
|
int64 min_length = 16;
|
||||||
|
string pattern = 17;
|
||||||
|
int64 max_items = 18;
|
||||||
|
int64 min_items = 19;
|
||||||
|
bool unique_items = 20;
|
||||||
|
repeated Any enum = 21;
|
||||||
|
double multiple_of = 22;
|
||||||
|
repeated NamedAny vendor_extension = 23;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Header {
|
||||||
|
string type = 1;
|
||||||
|
string format = 2;
|
||||||
|
PrimitivesItems items = 3;
|
||||||
|
string collection_format = 4;
|
||||||
|
Any default = 5;
|
||||||
|
double maximum = 6;
|
||||||
|
bool exclusive_maximum = 7;
|
||||||
|
double minimum = 8;
|
||||||
|
bool exclusive_minimum = 9;
|
||||||
|
int64 max_length = 10;
|
||||||
|
int64 min_length = 11;
|
||||||
|
string pattern = 12;
|
||||||
|
int64 max_items = 13;
|
||||||
|
int64 min_items = 14;
|
||||||
|
bool unique_items = 15;
|
||||||
|
repeated Any enum = 16;
|
||||||
|
double multiple_of = 17;
|
||||||
|
string description = 18;
|
||||||
|
repeated NamedAny vendor_extension = 19;
|
||||||
|
}
|
||||||
|
|
||||||
|
message HeaderParameterSubSchema {
|
||||||
|
// Determines whether or not this parameter is required or optional.
|
||||||
|
bool required = 1;
|
||||||
|
// Determines the location of the parameter.
|
||||||
|
string in = 2;
|
||||||
|
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
|
||||||
|
string description = 3;
|
||||||
|
// The name of the parameter.
|
||||||
|
string name = 4;
|
||||||
|
string type = 5;
|
||||||
|
string format = 6;
|
||||||
|
PrimitivesItems items = 7;
|
||||||
|
string collection_format = 8;
|
||||||
|
Any default = 9;
|
||||||
|
double maximum = 10;
|
||||||
|
bool exclusive_maximum = 11;
|
||||||
|
double minimum = 12;
|
||||||
|
bool exclusive_minimum = 13;
|
||||||
|
int64 max_length = 14;
|
||||||
|
int64 min_length = 15;
|
||||||
|
string pattern = 16;
|
||||||
|
int64 max_items = 17;
|
||||||
|
int64 min_items = 18;
|
||||||
|
bool unique_items = 19;
|
||||||
|
repeated Any enum = 20;
|
||||||
|
double multiple_of = 21;
|
||||||
|
repeated NamedAny vendor_extension = 22;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Headers {
|
||||||
|
repeated NamedHeader additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// General information about the API.
|
||||||
|
message Info {
|
||||||
|
// A unique and precise title of the API.
|
||||||
|
string title = 1;
|
||||||
|
// A semantic version number of the API.
|
||||||
|
string version = 2;
|
||||||
|
// A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.
|
||||||
|
string description = 3;
|
||||||
|
// The terms of service for the API.
|
||||||
|
string terms_of_service = 4;
|
||||||
|
Contact contact = 5;
|
||||||
|
License license = 6;
|
||||||
|
repeated NamedAny vendor_extension = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ItemsItem {
|
||||||
|
repeated Schema schema = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message JsonReference {
|
||||||
|
string _ref = 1;
|
||||||
|
string description = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message License {
|
||||||
|
// The name of the license type. It's encouraged to use an OSI compatible license.
|
||||||
|
string name = 1;
|
||||||
|
// The URL pointing to the license.
|
||||||
|
string url = 2;
|
||||||
|
repeated NamedAny vendor_extension = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
|
||||||
|
message NamedAny {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
Any value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of Header as ordered (name,value) pairs.
|
||||||
|
message NamedHeader {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
Header value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
|
||||||
|
message NamedParameter {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
Parameter value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
|
||||||
|
message NamedPathItem {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
PathItem value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of Response as ordered (name,value) pairs.
|
||||||
|
message NamedResponse {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
Response value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs.
|
||||||
|
message NamedResponseValue {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
ResponseValue value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
|
||||||
|
message NamedSchema {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
Schema value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs.
|
||||||
|
message NamedSecurityDefinitionsItem {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
SecurityDefinitionsItem value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
|
||||||
|
message NamedString {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
string value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
|
||||||
|
message NamedStringArray {
|
||||||
|
// Map key
|
||||||
|
string name = 1;
|
||||||
|
// Mapped value
|
||||||
|
StringArray value = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NonBodyParameter {
|
||||||
|
oneof oneof {
|
||||||
|
HeaderParameterSubSchema header_parameter_sub_schema = 1;
|
||||||
|
FormDataParameterSubSchema form_data_parameter_sub_schema = 2;
|
||||||
|
QueryParameterSubSchema query_parameter_sub_schema = 3;
|
||||||
|
PathParameterSubSchema path_parameter_sub_schema = 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message Oauth2AccessCodeSecurity {
|
||||||
|
string type = 1;
|
||||||
|
string flow = 2;
|
||||||
|
Oauth2Scopes scopes = 3;
|
||||||
|
string authorization_url = 4;
|
||||||
|
string token_url = 5;
|
||||||
|
string description = 6;
|
||||||
|
repeated NamedAny vendor_extension = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Oauth2ApplicationSecurity {
|
||||||
|
string type = 1;
|
||||||
|
string flow = 2;
|
||||||
|
Oauth2Scopes scopes = 3;
|
||||||
|
string token_url = 4;
|
||||||
|
string description = 5;
|
||||||
|
repeated NamedAny vendor_extension = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Oauth2ImplicitSecurity {
|
||||||
|
string type = 1;
|
||||||
|
string flow = 2;
|
||||||
|
Oauth2Scopes scopes = 3;
|
||||||
|
string authorization_url = 4;
|
||||||
|
string description = 5;
|
||||||
|
repeated NamedAny vendor_extension = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Oauth2PasswordSecurity {
|
||||||
|
string type = 1;
|
||||||
|
string flow = 2;
|
||||||
|
Oauth2Scopes scopes = 3;
|
||||||
|
string token_url = 4;
|
||||||
|
string description = 5;
|
||||||
|
repeated NamedAny vendor_extension = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Oauth2Scopes {
|
||||||
|
repeated NamedString additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Operation {
|
||||||
|
repeated string tags = 1;
|
||||||
|
// A brief summary of the operation.
|
||||||
|
string summary = 2;
|
||||||
|
// A longer description of the operation, GitHub Flavored Markdown is allowed.
|
||||||
|
string description = 3;
|
||||||
|
ExternalDocs external_docs = 4;
|
||||||
|
// A unique identifier of the operation.
|
||||||
|
string operation_id = 5;
|
||||||
|
// A list of MIME types the API can produce.
|
||||||
|
repeated string produces = 6;
|
||||||
|
// A list of MIME types the API can consume.
|
||||||
|
repeated string consumes = 7;
|
||||||
|
// The parameters needed to send a valid API call.
|
||||||
|
repeated ParametersItem parameters = 8;
|
||||||
|
Responses responses = 9;
|
||||||
|
// The transfer protocol of the API.
|
||||||
|
repeated string schemes = 10;
|
||||||
|
bool deprecated = 11;
|
||||||
|
repeated SecurityRequirement security = 12;
|
||||||
|
repeated NamedAny vendor_extension = 13;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Parameter {
|
||||||
|
oneof oneof {
|
||||||
|
BodyParameter body_parameter = 1;
|
||||||
|
NonBodyParameter non_body_parameter = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// One or more JSON representations for parameters
|
||||||
|
message ParameterDefinitions {
|
||||||
|
repeated NamedParameter additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ParametersItem {
|
||||||
|
oneof oneof {
|
||||||
|
Parameter parameter = 1;
|
||||||
|
JsonReference json_reference = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message PathItem {
|
||||||
|
string _ref = 1;
|
||||||
|
Operation get = 2;
|
||||||
|
Operation put = 3;
|
||||||
|
Operation post = 4;
|
||||||
|
Operation delete = 5;
|
||||||
|
Operation options = 6;
|
||||||
|
Operation head = 7;
|
||||||
|
Operation patch = 8;
|
||||||
|
// The parameters needed to send a valid API call.
|
||||||
|
repeated ParametersItem parameters = 9;
|
||||||
|
repeated NamedAny vendor_extension = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PathParameterSubSchema {
|
||||||
|
// Determines whether or not this parameter is required or optional.
|
||||||
|
bool required = 1;
|
||||||
|
// Determines the location of the parameter.
|
||||||
|
string in = 2;
|
||||||
|
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
|
||||||
|
string description = 3;
|
||||||
|
// The name of the parameter.
|
||||||
|
string name = 4;
|
||||||
|
string type = 5;
|
||||||
|
string format = 6;
|
||||||
|
PrimitivesItems items = 7;
|
||||||
|
string collection_format = 8;
|
||||||
|
Any default = 9;
|
||||||
|
double maximum = 10;
|
||||||
|
bool exclusive_maximum = 11;
|
||||||
|
double minimum = 12;
|
||||||
|
bool exclusive_minimum = 13;
|
||||||
|
int64 max_length = 14;
|
||||||
|
int64 min_length = 15;
|
||||||
|
string pattern = 16;
|
||||||
|
int64 max_items = 17;
|
||||||
|
int64 min_items = 18;
|
||||||
|
bool unique_items = 19;
|
||||||
|
repeated Any enum = 20;
|
||||||
|
double multiple_of = 21;
|
||||||
|
repeated NamedAny vendor_extension = 22;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Relative paths to the individual endpoints. They must be relative to the 'basePath'.
|
||||||
|
message Paths {
|
||||||
|
repeated NamedAny vendor_extension = 1;
|
||||||
|
repeated NamedPathItem path = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message PrimitivesItems {
|
||||||
|
string type = 1;
|
||||||
|
string format = 2;
|
||||||
|
PrimitivesItems items = 3;
|
||||||
|
string collection_format = 4;
|
||||||
|
Any default = 5;
|
||||||
|
double maximum = 6;
|
||||||
|
bool exclusive_maximum = 7;
|
||||||
|
double minimum = 8;
|
||||||
|
bool exclusive_minimum = 9;
|
||||||
|
int64 max_length = 10;
|
||||||
|
int64 min_length = 11;
|
||||||
|
string pattern = 12;
|
||||||
|
int64 max_items = 13;
|
||||||
|
int64 min_items = 14;
|
||||||
|
bool unique_items = 15;
|
||||||
|
repeated Any enum = 16;
|
||||||
|
double multiple_of = 17;
|
||||||
|
repeated NamedAny vendor_extension = 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Properties {
|
||||||
|
repeated NamedSchema additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message QueryParameterSubSchema {
|
||||||
|
// Determines whether or not this parameter is required or optional.
|
||||||
|
bool required = 1;
|
||||||
|
// Determines the location of the parameter.
|
||||||
|
string in = 2;
|
||||||
|
// A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
|
||||||
|
string description = 3;
|
||||||
|
// The name of the parameter.
|
||||||
|
string name = 4;
|
||||||
|
// allows sending a parameter by name only or with an empty value.
|
||||||
|
bool allow_empty_value = 5;
|
||||||
|
string type = 6;
|
||||||
|
string format = 7;
|
||||||
|
PrimitivesItems items = 8;
|
||||||
|
string collection_format = 9;
|
||||||
|
Any default = 10;
|
||||||
|
double maximum = 11;
|
||||||
|
bool exclusive_maximum = 12;
|
||||||
|
double minimum = 13;
|
||||||
|
bool exclusive_minimum = 14;
|
||||||
|
int64 max_length = 15;
|
||||||
|
int64 min_length = 16;
|
||||||
|
string pattern = 17;
|
||||||
|
int64 max_items = 18;
|
||||||
|
int64 min_items = 19;
|
||||||
|
bool unique_items = 20;
|
||||||
|
repeated Any enum = 21;
|
||||||
|
double multiple_of = 22;
|
||||||
|
repeated NamedAny vendor_extension = 23;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Response {
|
||||||
|
string description = 1;
|
||||||
|
SchemaItem schema = 2;
|
||||||
|
Headers headers = 3;
|
||||||
|
Examples examples = 4;
|
||||||
|
repeated NamedAny vendor_extension = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// One or more JSON representations for responses
|
||||||
|
message ResponseDefinitions {
|
||||||
|
repeated NamedResponse additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ResponseValue {
|
||||||
|
oneof oneof {
|
||||||
|
Response response = 1;
|
||||||
|
JsonReference json_reference = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Response objects names can either be any valid HTTP status code or 'default'.
|
||||||
|
message Responses {
|
||||||
|
repeated NamedResponseValue response_code = 1;
|
||||||
|
repeated NamedAny vendor_extension = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// A deterministic version of a JSON Schema object.
|
||||||
|
message Schema {
|
||||||
|
string _ref = 1;
|
||||||
|
string format = 2;
|
||||||
|
string title = 3;
|
||||||
|
string description = 4;
|
||||||
|
Any default = 5;
|
||||||
|
double multiple_of = 6;
|
||||||
|
double maximum = 7;
|
||||||
|
bool exclusive_maximum = 8;
|
||||||
|
double minimum = 9;
|
||||||
|
bool exclusive_minimum = 10;
|
||||||
|
int64 max_length = 11;
|
||||||
|
int64 min_length = 12;
|
||||||
|
string pattern = 13;
|
||||||
|
int64 max_items = 14;
|
||||||
|
int64 min_items = 15;
|
||||||
|
bool unique_items = 16;
|
||||||
|
int64 max_properties = 17;
|
||||||
|
int64 min_properties = 18;
|
||||||
|
repeated string required = 19;
|
||||||
|
repeated Any enum = 20;
|
||||||
|
AdditionalPropertiesItem additional_properties = 21;
|
||||||
|
TypeItem type = 22;
|
||||||
|
ItemsItem items = 23;
|
||||||
|
repeated Schema all_of = 24;
|
||||||
|
Properties properties = 25;
|
||||||
|
string discriminator = 26;
|
||||||
|
bool read_only = 27;
|
||||||
|
Xml xml = 28;
|
||||||
|
ExternalDocs external_docs = 29;
|
||||||
|
Any example = 30;
|
||||||
|
repeated NamedAny vendor_extension = 31;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SchemaItem {
|
||||||
|
oneof oneof {
|
||||||
|
Schema schema = 1;
|
||||||
|
FileSchema file_schema = 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message SecurityDefinitions {
|
||||||
|
repeated NamedSecurityDefinitionsItem additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SecurityDefinitionsItem {
|
||||||
|
oneof oneof {
|
||||||
|
BasicAuthenticationSecurity basic_authentication_security = 1;
|
||||||
|
ApiKeySecurity api_key_security = 2;
|
||||||
|
Oauth2ImplicitSecurity oauth2_implicit_security = 3;
|
||||||
|
Oauth2PasswordSecurity oauth2_password_security = 4;
|
||||||
|
Oauth2ApplicationSecurity oauth2_application_security = 5;
|
||||||
|
Oauth2AccessCodeSecurity oauth2_access_code_security = 6;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message SecurityRequirement {
|
||||||
|
repeated NamedStringArray additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message StringArray {
|
||||||
|
repeated string value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Tag {
|
||||||
|
string name = 1;
|
||||||
|
string description = 2;
|
||||||
|
ExternalDocs external_docs = 3;
|
||||||
|
repeated NamedAny vendor_extension = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message TypeItem {
|
||||||
|
repeated string value = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Any property starting with x- is valid.
|
||||||
|
message VendorExtension {
|
||||||
|
repeated NamedAny additional_properties = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Xml {
|
||||||
|
string name = 1;
|
||||||
|
string namespace = 2;
|
||||||
|
string prefix = 3;
|
||||||
|
bool attribute = 4;
|
||||||
|
bool wrapped = 5;
|
||||||
|
repeated NamedAny vendor_extension = 6;
|
||||||
|
}
|
1
openapiv2/openapiv2.go
Normal file
1
openapiv2/openapiv2.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package openapiv2 // import "go.unistack.org/micro-proto/v3/openapiv2"
|
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@ syntax = "proto3";
|
|||||||
|
|
||||||
package micro.openapiv2;
|
package micro.openapiv2;
|
||||||
|
|
||||||
option go_package = "github.com/unistack-org/micro-proto/openapiv2;openapiv2";
|
option go_package = "go.unistack.org/micro-proto/v3/openapiv2;openapiv2";
|
||||||
|
|
||||||
import "google/protobuf/struct.proto";
|
import "google/protobuf/struct.proto";
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ message Swagger {
|
|||||||
// service objects into OpenAPI v2 Tag objects.
|
// service objects into OpenAPI v2 Tag objects.
|
||||||
reserved 13;
|
reserved 13;
|
||||||
// Additional external documentation.
|
// Additional external documentation.
|
||||||
ExternalDocumentation external_docs = 14;
|
ExternalDocs external_docs = 14;
|
||||||
map<string, google.protobuf.Value> extensions = 15;
|
map<string, google.protobuf.Value> extensions = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ message Operation {
|
|||||||
// rich text representation.
|
// rich text representation.
|
||||||
string description = 3;
|
string description = 3;
|
||||||
// Additional external documentation for this operation.
|
// Additional external documentation for this operation.
|
||||||
ExternalDocumentation external_docs = 4;
|
ExternalDocs external_docs = 4;
|
||||||
// Unique string used to identify the operation. The id MUST be unique among
|
// Unique string used to identify the operation. The id MUST be unique among
|
||||||
// all operations described in the API. Tools and libraries MAY use the
|
// all operations described in the API. Tools and libraries MAY use the
|
||||||
// operationId to uniquely identify an operation, therefore, it is recommended
|
// operationId to uniquely identify an operation, therefore, it is recommended
|
||||||
@@ -299,16 +299,6 @@ message Info {
|
|||||||
// ...
|
// ...
|
||||||
// };
|
// };
|
||||||
//
|
//
|
||||||
message Contact {
|
|
||||||
// The identifying name of the contact person/organization.
|
|
||||||
string name = 1;
|
|
||||||
// The URL pointing to the contact information. MUST be in the format of a
|
|
||||||
// URL.
|
|
||||||
string url = 2;
|
|
||||||
// The email address of the contact person/organization. MUST be in the format
|
|
||||||
// of an email address.
|
|
||||||
string email = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// `License` is a representation of OpenAPI v2 specification's License object.
|
// `License` is a representation of OpenAPI v2 specification's License object.
|
||||||
//
|
//
|
||||||
@@ -328,15 +318,8 @@ message Contact {
|
|||||||
// ...
|
// ...
|
||||||
// };
|
// };
|
||||||
//
|
//
|
||||||
message License {
|
|
||||||
// The license name used for the API.
|
|
||||||
string name = 1;
|
|
||||||
// A URL to the license used for the API. MUST be in the format of a URL.
|
|
||||||
string url = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// `ExternalDocumentation` is a representation of OpenAPI v2 specification's
|
// ExternalDocs object.
|
||||||
// ExternalDocumentation object.
|
|
||||||
//
|
//
|
||||||
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
|
// See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
|
||||||
//
|
//
|
||||||
@@ -351,14 +334,6 @@ message License {
|
|||||||
// ...
|
// ...
|
||||||
// };
|
// };
|
||||||
//
|
//
|
||||||
message ExternalDocumentation {
|
|
||||||
// A short description of the target documentation. GFM syntax can be used for
|
|
||||||
// rich text representation.
|
|
||||||
string description = 1;
|
|
||||||
// The URL for the target documentation. Value MUST be in the format
|
|
||||||
// of a URL.
|
|
||||||
string url = 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// `Schema` is a representation of OpenAPI v2 specification's Schema object.
|
// `Schema` is a representation of OpenAPI v2 specification's Schema object.
|
||||||
//
|
//
|
||||||
@@ -381,7 +356,7 @@ message Schema {
|
|||||||
// field 4 is reserved for 'xml'.
|
// field 4 is reserved for 'xml'.
|
||||||
reserved 4;
|
reserved 4;
|
||||||
// Additional external documentation for this schema.
|
// Additional external documentation for this schema.
|
||||||
ExternalDocumentation external_docs = 5;
|
ExternalDocs external_docs = 5;
|
||||||
// A free-form property to include an example of an instance for this schema in JSON.
|
// A free-form property to include an example of an instance for this schema in JSON.
|
||||||
// This is copied verbatim to the output.
|
// This is copied verbatim to the output.
|
||||||
string example = 6;
|
string example = 6;
|
||||||
@@ -525,7 +500,7 @@ message Tag {
|
|||||||
// representation.
|
// representation.
|
||||||
string description = 2;
|
string description = 2;
|
||||||
// Additional external documentation for this tag.
|
// Additional external documentation for this tag.
|
||||||
ExternalDocumentation external_docs = 3;
|
ExternalDocs external_docs = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
|
// `SecurityDefinitions` is a representation of OpenAPI v2 specification's
|
||||||
|
8087
openapiv3/gopenapiv3.pb.go
Normal file
8087
openapiv3/gopenapiv3.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
1
openapiv3/openapiv3.go
Normal file
1
openapiv3/openapiv3.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package openapiv3 // import "go.unistack.org/micro-proto/v3/openapiv3"
|
1
tag/tag.go
Normal file
1
tag/tag.go
Normal file
@@ -0,0 +1 @@
|
|||||||
|
package tag // import "go.unistack.org/micro-proto/v3/tag"
|
131
tag/tag.pb.go
Normal file
131
tag/tag.pb.go
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
// Copyright 2020 Unistack LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.27.1
|
||||||
|
// protoc v3.17.3
|
||||||
|
// source: tag/tag.proto
|
||||||
|
|
||||||
|
package tag
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
|
||||||
|
reflect "reflect"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
var file_tag_tag_proto_extTypes = []protoimpl.ExtensionInfo{
|
||||||
|
{
|
||||||
|
ExtendedType: (*descriptorpb.FieldOptions)(nil),
|
||||||
|
ExtensionType: (*string)(nil),
|
||||||
|
Field: 847939,
|
||||||
|
Name: "micro.tag.tags",
|
||||||
|
Tag: "bytes,847939,opt,name=tags",
|
||||||
|
Filename: "tag/tag.proto",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
ExtendedType: (*descriptorpb.OneofOptions)(nil),
|
||||||
|
ExtensionType: (*string)(nil),
|
||||||
|
Field: 847939,
|
||||||
|
Name: "micro.tag.oneof_tags",
|
||||||
|
Tag: "bytes,847939,opt,name=oneof_tags",
|
||||||
|
Filename: "tag/tag.proto",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extension fields to descriptorpb.FieldOptions.
|
||||||
|
var (
|
||||||
|
// Multiple Tags can be spcified.
|
||||||
|
//
|
||||||
|
// optional string tags = 847939;
|
||||||
|
E_Tags = &file_tag_tag_proto_extTypes[0]
|
||||||
|
)
|
||||||
|
|
||||||
|
// Extension fields to descriptorpb.OneofOptions.
|
||||||
|
var (
|
||||||
|
// Multiple Tags can be spcified.
|
||||||
|
//
|
||||||
|
// optional string oneof_tags = 847939;
|
||||||
|
E_OneofTags = &file_tag_tag_proto_extTypes[1]
|
||||||
|
)
|
||||||
|
|
||||||
|
var File_tag_tag_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
var file_tag_tag_proto_rawDesc = []byte{
|
||||||
|
0x0a, 0x0d, 0x74, 0x61, 0x67, 0x2f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||||
|
0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x74, 0x61, 0x67, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67,
|
||||||
|
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63,
|
||||||
|
0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, 0x33, 0x0a, 0x04,
|
||||||
|
0x74, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||||
|
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x73, 0x18, 0xc3, 0xe0, 0x33, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67,
|
||||||
|
0x73, 0x3a, 0x3e, 0x0a, 0x0a, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x12,
|
||||||
|
0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||||
|
0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc3,
|
||||||
|
0xe0, 0x33, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x54, 0x61, 0x67,
|
||||||
|
0x73, 0x42, 0x4b, 0x0a, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x74, 0x61, 0x67, 0x42, 0x0a,
|
||||||
|
0x4d, 0x69, 0x63, 0x72, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x26, 0x67, 0x6f,
|
||||||
|
0x2e, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6d, 0x69,
|
||||||
|
0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x33, 0x2f, 0x74, 0x61, 0x67,
|
||||||
|
0x3b, 0x74, 0x61, 0x67, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x04, 0x4d, 0x54, 0x41, 0x47, 0x62, 0x06,
|
||||||
|
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_tag_tag_proto_goTypes = []interface{}{
|
||||||
|
(*descriptorpb.FieldOptions)(nil), // 0: google.protobuf.FieldOptions
|
||||||
|
(*descriptorpb.OneofOptions)(nil), // 1: google.protobuf.OneofOptions
|
||||||
|
}
|
||||||
|
var file_tag_tag_proto_depIdxs = []int32{
|
||||||
|
0, // 0: micro.tag.tags:extendee -> google.protobuf.FieldOptions
|
||||||
|
1, // 1: micro.tag.oneof_tags:extendee -> google.protobuf.OneofOptions
|
||||||
|
2, // [2:2] is the sub-list for method output_type
|
||||||
|
2, // [2:2] is the sub-list for method input_type
|
||||||
|
2, // [2:2] is the sub-list for extension type_name
|
||||||
|
0, // [0:2] is the sub-list for extension extendee
|
||||||
|
0, // [0:0] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_tag_tag_proto_init() }
|
||||||
|
func file_tag_tag_proto_init() {
|
||||||
|
if File_tag_tag_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: file_tag_tag_proto_rawDesc,
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 0,
|
||||||
|
NumExtensions: 2,
|
||||||
|
NumServices: 0,
|
||||||
|
},
|
||||||
|
GoTypes: file_tag_tag_proto_goTypes,
|
||||||
|
DependencyIndexes: file_tag_tag_proto_depIdxs,
|
||||||
|
ExtensionInfos: file_tag_tag_proto_extTypes,
|
||||||
|
}.Build()
|
||||||
|
File_tag_tag_proto = out.File
|
||||||
|
file_tag_tag_proto_rawDesc = nil
|
||||||
|
file_tag_tag_proto_goTypes = nil
|
||||||
|
file_tag_tag_proto_depIdxs = nil
|
||||||
|
}
|
37
tag/tag.proto
Normal file
37
tag/tag.proto
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
// Copyright 2020 Unistack LLC
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package micro.tag;
|
||||||
|
|
||||||
|
import "google/protobuf/descriptor.proto";
|
||||||
|
|
||||||
|
option cc_enable_arenas = true;
|
||||||
|
option go_package = "go.unistack.org/micro-proto/v3/tag;tag";
|
||||||
|
option java_multiple_files = true;
|
||||||
|
option java_outer_classname = "MicroProto";
|
||||||
|
option java_package = "micro.tag";
|
||||||
|
option objc_class_prefix = "MTAG";
|
||||||
|
|
||||||
|
// Tags are applied at the field level
|
||||||
|
extend google.protobuf.FieldOptions {
|
||||||
|
// Multiple Tags can be spcified.
|
||||||
|
string tags = 847939;
|
||||||
|
}
|
||||||
|
|
||||||
|
extend google.protobuf.OneofOptions {
|
||||||
|
// Multiple Tags can be spcified.
|
||||||
|
string oneof_tags = 847939;
|
||||||
|
}
|
Reference in New Issue
Block a user