Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kratos-layout
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizifeng
kratos-layout
Commits
35ca3b9a
Commit
35ca3b9a
authored
Jun 08, 2022
by
kzkzzzz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整api proto
parent
cfbfb2f1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
33 deletions
+16
-33
error_reason.pb.go
api/helloworld/v1/error_reason.pb.go
+4
-10
error_reason.proto
api/helloworld/v1/error_reason.proto
+1
-4
greeter.pb.go
api/helloworld/v1/greeter.pb.go
+4
-10
greeter.proto
api/helloworld/v1/greeter.proto
+1
-4
greeter_grpc.pb.go
api/helloworld/v1/greeter_grpc.pb.go
+1
-1
greeter_http.pb.go
api/helloworld/v1/greeter_http.pb.go
+5
-3
openapi.yaml
openapi.yaml
+0
-1
No files found.
api/helloworld/v1/error_reason.pb.go
View file @
35ca3b9a
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.2
7.1
// protoc v3.
19.3
// protoc-gen-go v1.2
8.0
// protoc v3.
20.1
// source: helloworld/v1/error_reason.proto
package
v1
...
...
@@ -75,14 +75,8 @@ var file_helloworld_v1_error_reason_proto_rawDesc = []byte{
0x31
,
0x2a
,
0x39
,
0x0a
,
0x0b
,
0x45
,
0x72
,
0x72
,
0x6f
,
0x72
,
0x52
,
0x65
,
0x61
,
0x73
,
0x6f
,
0x6e
,
0x12
,
0x16
,
0x0a
,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f
,
0x3b
,
0x76
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
api/helloworld/v1/error_reason.proto
View file @
35ca3b9a
...
...
@@ -2,10 +2,7 @@ syntax = "proto3";
package
helloworld
.
v1
;
option
go_package
=
"github.com/go-kratos/kratos-layout/api/helloworld/v1;v1"
;
option
java_multiple_files
=
true
;
option
java_package
=
"helloworld.v1"
;
option
objc_class_prefix
=
"APIHelloworldV1"
;
option
go_package
=
"./;v1"
;
enum
ErrorReason
{
GEETER_UNSPECIFIED
=
0
;
...
...
api/helloworld/v1/greeter.pb.go
View file @
35ca3b9a
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.2
7.1
// protoc v3.
19.3
// protoc-gen-go v1.2
8.0
// protoc v3.
20.1
// source: helloworld/v1/greeter.proto
package
v1
...
...
@@ -136,14 +136,8 @@ var file_helloworld_v1_greeter_proto_rawDesc = []byte{
0x6c
,
0x6f
,
0x77
,
0x6f
,
0x72
,
0x6c
,
0x64
,
0x2e
,
0x76
,
0x31
,
0x2e
,
0x48
,
0x65
,
0x6c
,
0x6c
,
0x6f
,
0x52
,
0x65
,
0x70
,
0x6c
,
0x79
,
0x22
,
0x1a
,
0x82
,
0xd3
,
0xe4
,
0x93
,
0x02
,
0x14
,
0x12
,
0x12
,
0x2f
,
0x68
,
0x65
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x6f
,
0x72
,
0x6c
,
0x64
,
0x2f
,
0x7b
,
0x6e
,
0x61
,
0x6d
,
0x65
,
0x7d
,
0x42
,
0x6c
,
0x0a
,
0x1c
,
0x64
,
0x65
,
0x76
,
0x2e
,
0x6b
,
0x72
,
0x61
,
0x74
,
0x6f
,
0x73
,
0x2e
,
0x61
,
0x70
,
0x69
,
0x2e
,
0x68
,
0x65
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x6f
,
0x72
,
0x6c
,
0x64
,
0x2e
,
0x76
,
0x31
,
0x42
,
0x11
,
0x48
,
0x65
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x6f
,
0x72
,
0x6c
,
0x64
,
0x50
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x56
,
0x31
,
0x50
,
0x01
,
0x5a
,
0x37
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x67
,
0x6f
,
0x2d
,
0x6b
,
0x72
,
0x61
,
0x74
,
0x6f
,
0x73
,
0x2f
,
0x6b
,
0x72
,
0x61
,
0x74
,
0x6f
,
0x73
,
0x2d
,
0x6c
,
0x61
,
0x79
,
0x6f
,
0x75
,
0x74
,
0x2f
,
0x61
,
0x70
,
0x69
,
0x2f
,
0x68
,
0x65
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x6f
,
0x72
,
0x6c
,
0x64
,
0x2f
,
0x76
,
0x31
,
0x3b
,
0x76
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
0x7d
,
0x42
,
0x07
,
0x5a
,
0x05
,
0x2e
,
0x2f
,
0x3b
,
0x76
,
0x31
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
...
...
api/helloworld/v1/greeter.proto
View file @
35ca3b9a
...
...
@@ -4,10 +4,7 @@ package helloworld.v1;
import
"google/api/annotations.proto"
;
option
go_package
=
"github.com/go-kratos/kratos-layout/api/helloworld/v1;v1"
;
option
java_multiple_files
=
true
;
option
java_package
=
"dev.kratos.api.helloworld.v1"
;
option
java_outer_classname
=
"HelloworldProtoV1"
;
option
go_package
=
"./;v1"
;
// The greeting service definition.
service
Greeter
{
...
...
api/helloworld/v1/greeter_grpc.pb.go
View file @
35ca3b9a
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.
19.3
// - protoc v3.
20.1
// source: helloworld/v1/greeter.proto
package
v1
...
...
api/helloworld/v1/greeter_http.pb.go
View file @
35ca3b9a
// Code generated by protoc-gen-go-http. DO NOT EDIT.
// versions:
// protoc-gen-go-http v2.
1.3
// protoc-gen-go-http v2.
3.1
package
v1
...
...
@@ -17,6 +17,8 @@ var _ = binding.EncodeURL
const
_
=
http
.
SupportPackageIsVersion1
const
OperationGreeterSayHello
=
"/helloworld.v1.Greeter/SayHello"
type
GreeterHTTPServer
interface
{
SayHello
(
context
.
Context
,
*
HelloRequest
)
(
*
HelloReply
,
error
)
}
...
...
@@ -35,7 +37,7 @@ func _Greeter_SayHello0_HTTP_Handler(srv GreeterHTTPServer) func(ctx http.Contex
if
err
:=
ctx
.
BindVars
(
&
in
);
err
!=
nil
{
return
err
}
http
.
SetOperation
(
ctx
,
"/helloworld.v1.Greeter/SayHello"
)
http
.
SetOperation
(
ctx
,
OperationGreeterSayHello
)
h
:=
ctx
.
Middleware
(
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
SayHello
(
ctx
,
req
.
(
*
HelloRequest
))
})
...
...
@@ -64,7 +66,7 @@ func (c *GreeterHTTPClientImpl) SayHello(ctx context.Context, in *HelloRequest,
var
out
HelloReply
pattern
:=
"/helloworld/{name}"
path
:=
binding
.
EncodeURL
(
pattern
,
in
,
true
)
opts
=
append
(
opts
,
http
.
Operation
(
"/helloworld.v1.Greeter/SayHello"
))
opts
=
append
(
opts
,
http
.
Operation
(
OperationGreeterSayHello
))
opts
=
append
(
opts
,
http
.
PathTemplate
(
pattern
))
err
:=
c
.
cc
.
Invoke
(
ctx
,
"GET"
,
path
,
nil
,
&
out
,
opts
...
)
if
err
!=
nil
{
...
...
openapi.yaml
View file @
35ca3b9a
...
...
@@ -11,7 +11,6 @@ paths:
get
:
tags
:
-
Greeter
-
subgroup
description
:
Sends a greeting
operationId
:
Greeter_SayHello
parameters
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment