fix error code and regenerate proto (#954)

* fix error code and regenerate proto
pull/956/head
Tony Chen 4 years ago committed by GitHub
parent 637af7f4b0
commit 7dec80ccfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 164
      api/metadata/metadata.pb.go
  2. 2
      api/metadata/metadata_grpc.pb.go
  3. 12
      api/metadata/metadata_http.pb.go
  4. 2
      api/metadata/server.go
  5. 2
      cmd/kratos/main.go
  6. 2
      cmd/protoc-gen-go-http/main.go
  7. 10
      cmd/protoc-gen-go-http/template.go
  8. 19
      errors/errors.go
  9. 89
      examples/blog/Makefile
  10. 354
      examples/blog/api/blog/v1/blog.pb.go
  11. 6
      examples/blog/api/blog/v1/blog.proto
  12. 24
      examples/blog/api/blog/v1/blog_grpc.pb.go
  13. 79
      examples/blog/api/blog/v1/error_reason.pb.go
  14. 293
      examples/blog/internal/conf/conf.pb.go
  15. 4
      examples/blog/internal/conf/conf.proto
  16. 2
      examples/helloworld/client/main.go
  17. 104
      examples/helloworld/helloworld/helloworld.pb.go
  18. 2
      examples/helloworld/helloworld/helloworld_grpc.pb.go
  19. 10
      examples/helloworld/helloworld/helloworld_http.pb.go
  20. 18
      examples/proto/echo_service_http.pb.go
  21. 4
      examples/proto/echo_service_test.go
  22. 8
      examples/proto/stream_http.pb.go
  23. 2
      examples/registry/consul/client/main.go
  24. 136
      examples/traces/api/message/message.pb.go
  25. 2
      examples/traces/api/message/message_grpc.pb.go
  26. 128
      examples/traces/api/user/user.pb.go
  27. 2
      examples/traces/api/user/user_grpc.pb.go

@ -2,7 +2,7 @@
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: metadata/metadata.proto
// source: metadata.proto
package metadata
@ -31,7 +31,7 @@ type ListServicesRequest struct {
func (x *ListServicesRequest) Reset() {
*x = ListServicesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_metadata_metadata_proto_msgTypes[0]
mi := &file_metadata_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -44,7 +44,7 @@ func (x *ListServicesRequest) String() string {
func (*ListServicesRequest) ProtoMessage() {}
func (x *ListServicesRequest) ProtoReflect() protoreflect.Message {
mi := &file_metadata_metadata_proto_msgTypes[0]
mi := &file_metadata_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -57,7 +57,7 @@ func (x *ListServicesRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListServicesRequest.ProtoReflect.Descriptor instead.
func (*ListServicesRequest) Descriptor() ([]byte, []int) {
return file_metadata_metadata_proto_rawDescGZIP(), []int{0}
return file_metadata_proto_rawDescGZIP(), []int{0}
}
type ListServicesReply struct {
@ -72,7 +72,7 @@ type ListServicesReply struct {
func (x *ListServicesReply) Reset() {
*x = ListServicesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_metadata_metadata_proto_msgTypes[1]
mi := &file_metadata_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -85,7 +85,7 @@ func (x *ListServicesReply) String() string {
func (*ListServicesReply) ProtoMessage() {}
func (x *ListServicesReply) ProtoReflect() protoreflect.Message {
mi := &file_metadata_metadata_proto_msgTypes[1]
mi := &file_metadata_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -98,7 +98,7 @@ func (x *ListServicesReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListServicesReply.ProtoReflect.Descriptor instead.
func (*ListServicesReply) Descriptor() ([]byte, []int) {
return file_metadata_metadata_proto_rawDescGZIP(), []int{1}
return file_metadata_proto_rawDescGZIP(), []int{1}
}
func (x *ListServicesReply) GetServices() []string {
@ -126,7 +126,7 @@ type GetServiceDescRequest struct {
func (x *GetServiceDescRequest) Reset() {
*x = GetServiceDescRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_metadata_metadata_proto_msgTypes[2]
mi := &file_metadata_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -139,7 +139,7 @@ func (x *GetServiceDescRequest) String() string {
func (*GetServiceDescRequest) ProtoMessage() {}
func (x *GetServiceDescRequest) ProtoReflect() protoreflect.Message {
mi := &file_metadata_metadata_proto_msgTypes[2]
mi := &file_metadata_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -152,7 +152,7 @@ func (x *GetServiceDescRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetServiceDescRequest.ProtoReflect.Descriptor instead.
func (*GetServiceDescRequest) Descriptor() ([]byte, []int) {
return file_metadata_metadata_proto_rawDescGZIP(), []int{2}
return file_metadata_proto_rawDescGZIP(), []int{2}
}
func (x *GetServiceDescRequest) GetName() string {
@ -173,7 +173,7 @@ type GetServiceDescReply struct {
func (x *GetServiceDescReply) Reset() {
*x = GetServiceDescReply{}
if protoimpl.UnsafeEnabled {
mi := &file_metadata_metadata_proto_msgTypes[3]
mi := &file_metadata_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -186,7 +186,7 @@ func (x *GetServiceDescReply) String() string {
func (*GetServiceDescReply) ProtoMessage() {}
func (x *GetServiceDescReply) ProtoReflect() protoreflect.Message {
mi := &file_metadata_metadata_proto_msgTypes[3]
mi := &file_metadata_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -199,7 +199,7 @@ func (x *GetServiceDescReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetServiceDescReply.ProtoReflect.Descriptor instead.
func (*GetServiceDescReply) Descriptor() ([]byte, []int) {
return file_metadata_metadata_proto_rawDescGZIP(), []int{3}
return file_metadata_proto_rawDescGZIP(), []int{3}
}
func (x *GetServiceDescReply) GetFileDescSet() *descriptorpb.FileDescriptorSet {
@ -209,74 +209,74 @@ func (x *GetServiceDescReply) GetFileDescSet() *descriptorpb.FileDescriptorSet {
return nil
}
var File_metadata_metadata_proto protoreflect.FileDescriptor
var file_metadata_metadata_proto_rawDesc = []byte{
0x0a, 0x17, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6b, 0x72, 0x61, 0x74, 0x6f,
0x73, 0x2e, 0x61, 0x70, 0x69, 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, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x11,
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a,
0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07,
0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x2b, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65,
0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x46, 0x0a, 0x0d, 0x66,
0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x0b, 0x66, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63,
0x53, 0x65, 0x74, 0x32, 0xdd, 0x01, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x12, 0x61, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
0x12, 0x1f, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69,
0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x1d, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c,
0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x44, 0x65, 0x73, 0x63, 0x12, 0x21, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73,
0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f,
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x44, 0x65, 0x73, 0x63, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x12, 0x12, 0x10, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61,
0x6d, 0x65, 0x7d, 0x42, 0x63, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75,
0x62, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x50, 0x01, 0x5a, 0x3c,
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, 0x2f, 0x76, 0x32, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f,
0x61, 0x70, 0x69, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xa2, 0x02, 0x09, 0x4b,
0x72, 0x61, 0x74, 0x6f, 0x73, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var File_metadata_proto protoreflect.FileDescriptor
var file_metadata_proto_rawDesc = []byte{
0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0a, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 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, 0x1a, 0x1c,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, 0x0a, 0x13,
0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x22, 0x49, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76,
0x69, 0x63, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18,
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x2b,
0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5d, 0x0a, 0x13, 0x47,
0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x52, 0x65, 0x70,
0x6c, 0x79, 0x12, 0x46, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x5f,
0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65,
0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x52, 0x0b, 0x66,
0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x53, 0x65, 0x74, 0x32, 0xdd, 0x01, 0x0a, 0x08, 0x4d,
0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x61, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f,
0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x11, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12,
0x09, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x0e, 0x47, 0x65,
0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x12, 0x21, 0x2e, 0x6b,
0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1f, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x63, 0x0a, 0x15, 0x63, 0x6f,
0x6d, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e,
0x61, 0x70, 0x69, 0x50, 0x01, 0x5a, 0x3c, 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, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x6d, 0x65, 0x74, 0x61, 0x64,
0x61, 0x74, 0x61, 0xa2, 0x02, 0x09, 0x4b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x41, 0x50, 0x49, 0x62,
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_metadata_metadata_proto_rawDescOnce sync.Once
file_metadata_metadata_proto_rawDescData = file_metadata_metadata_proto_rawDesc
file_metadata_proto_rawDescOnce sync.Once
file_metadata_proto_rawDescData = file_metadata_proto_rawDesc
)
func file_metadata_metadata_proto_rawDescGZIP() []byte {
file_metadata_metadata_proto_rawDescOnce.Do(func() {
file_metadata_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_metadata_metadata_proto_rawDescData)
func file_metadata_proto_rawDescGZIP() []byte {
file_metadata_proto_rawDescOnce.Do(func() {
file_metadata_proto_rawDescData = protoimpl.X.CompressGZIP(file_metadata_proto_rawDescData)
})
return file_metadata_metadata_proto_rawDescData
return file_metadata_proto_rawDescData
}
var file_metadata_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_metadata_metadata_proto_goTypes = []interface{}{
var file_metadata_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_metadata_proto_goTypes = []interface{}{
(*ListServicesRequest)(nil), // 0: kratos.api.ListServicesRequest
(*ListServicesReply)(nil), // 1: kratos.api.ListServicesReply
(*GetServiceDescRequest)(nil), // 2: kratos.api.GetServiceDescRequest
(*GetServiceDescReply)(nil), // 3: kratos.api.GetServiceDescReply
(*descriptorpb.FileDescriptorSet)(nil), // 4: google.protobuf.FileDescriptorSet
}
var file_metadata_metadata_proto_depIdxs = []int32{
var file_metadata_proto_depIdxs = []int32{
4, // 0: kratos.api.GetServiceDescReply.file_desc_set:type_name -> google.protobuf.FileDescriptorSet
0, // 1: kratos.api.Metadata.ListServices:input_type -> kratos.api.ListServicesRequest
2, // 2: kratos.api.Metadata.GetServiceDesc:input_type -> kratos.api.GetServiceDescRequest
@ -289,13 +289,13 @@ var file_metadata_metadata_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_metadata_metadata_proto_init() }
func file_metadata_metadata_proto_init() {
if File_metadata_metadata_proto != nil {
func init() { file_metadata_proto_init() }
func file_metadata_proto_init() {
if File_metadata_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_metadata_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_metadata_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListServicesRequest); i {
case 0:
return &v.state
@ -307,7 +307,7 @@ func file_metadata_metadata_proto_init() {
return nil
}
}
file_metadata_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_metadata_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListServicesReply); i {
case 0:
return &v.state
@ -319,7 +319,7 @@ func file_metadata_metadata_proto_init() {
return nil
}
}
file_metadata_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_metadata_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetServiceDescRequest); i {
case 0:
return &v.state
@ -331,7 +331,7 @@ func file_metadata_metadata_proto_init() {
return nil
}
}
file_metadata_metadata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_metadata_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetServiceDescReply); i {
case 0:
return &v.state
@ -348,18 +348,18 @@ func file_metadata_metadata_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_metadata_metadata_proto_rawDesc,
RawDescriptor: file_metadata_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_metadata_metadata_proto_goTypes,
DependencyIndexes: file_metadata_metadata_proto_depIdxs,
MessageInfos: file_metadata_metadata_proto_msgTypes,
GoTypes: file_metadata_proto_goTypes,
DependencyIndexes: file_metadata_proto_depIdxs,
MessageInfos: file_metadata_proto_msgTypes,
}.Build()
File_metadata_metadata_proto = out.File
file_metadata_metadata_proto_rawDesc = nil
file_metadata_metadata_proto_goTypes = nil
file_metadata_metadata_proto_depIdxs = nil
File_metadata_proto = out.File
file_metadata_proto_rawDesc = nil
file_metadata_proto_goTypes = nil
file_metadata_proto_depIdxs = nil
}

@ -137,5 +137,5 @@ var Metadata_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "metadata/metadata.proto",
Metadata: "metadata.proto",
}

@ -88,21 +88,21 @@ func NewMetadataHandler(srv MetadataHandler, opts ...http1.HandleOption) http.Ha
return r
}
type MetadataHttpClient interface {
type MetadataHTTPClient interface {
GetServiceDesc(ctx context.Context, req *GetServiceDescRequest, opts ...http1.CallOption) (rsp *GetServiceDescReply, err error)
ListServices(ctx context.Context, req *ListServicesRequest, opts ...http1.CallOption) (rsp *ListServicesReply, err error)
}
type MetadataHttpClientImpl struct {
type MetadataHTTPClientImpl struct {
cc *http1.Client
}
func NewMetadataHttpClient(client *http1.Client) MetadataHttpClient {
return &MetadataHttpClientImpl{client}
func NewMetadataHTTPClient(client *http1.Client) MetadataHTTPClient {
return &MetadataHTTPClientImpl{client}
}
func (c *MetadataHttpClientImpl) GetServiceDesc(ctx context.Context, in *GetServiceDescRequest, opts ...http1.CallOption) (out *GetServiceDescReply, err error) {
func (c *MetadataHTTPClientImpl) GetServiceDesc(ctx context.Context, in *GetServiceDescRequest, opts ...http1.CallOption) (out *GetServiceDescReply, err error) {
path := binding.EncodePath("GET", "/services/{name}", in)
out = &GetServiceDescReply{}
@ -114,7 +114,7 @@ func (c *MetadataHttpClientImpl) GetServiceDesc(ctx context.Context, in *GetServ
return
}
func (c *MetadataHttpClientImpl) ListServices(ctx context.Context, in *ListServicesRequest, opts ...http1.CallOption) (out *ListServicesReply, err error) {
func (c *MetadataHTTPClientImpl) ListServices(ctx context.Context, in *ListServicesRequest, opts ...http1.CallOption) (out *ListServicesReply, err error) {
path := binding.EncodePath("GET", "/services", in)
out = &ListServicesReply{}

@ -16,6 +16,8 @@ import (
descriptorpb "google.golang.org/protobuf/types/descriptorpb"
)
//go:generate protoc --proto_path=. --proto_path=../../third_party --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. --go-http_out=paths=source_relative:. metadata.proto
// Server is api meta server
type Server struct {
UnimplementedMetadataServer

@ -10,7 +10,7 @@ import (
)
var (
version string = "v2.0.0-beta4"
version string = "v2.0.0-rc1"
rootCmd = &cobra.Command{
Use: "kratos",

@ -8,7 +8,7 @@ import (
"google.golang.org/protobuf/types/pluginpb"
)
const version = "v2.0.0-beta4"
const version = "v2.0.0-rc1"
func main() {
showVersion := flag.Bool("version", false, "print the version and exit")

@ -52,24 +52,24 @@ func New{{.ServiceType}}Handler(srv {{.ServiceType}}Handler, opts ...http1.Handl
return r
}
type {{.ServiceType}}HttpClient interface {
type {{.ServiceType}}HTTPClient interface {
{{range .MethodSets}}
{{.Name}}(ctx context.Context, req *{{.Request}}, opts ...http1.CallOption) (rsp *{{.Reply}}, err error)
{{end}}
}
type {{.ServiceType}}HttpClientImpl struct{
type {{.ServiceType}}HTTPClientImpl struct{
cc *http1.Client
}
func New{{.ServiceType}}HttpClient (client *http1.Client) {{.ServiceType}}HttpClient {
return &{{.ServiceType}}HttpClientImpl{client}
func New{{.ServiceType}}HTTPClient (client *http1.Client) {{.ServiceType}}HTTPClient {
return &{{.ServiceType}}HTTPClientImpl{client}
}
{{$svrType := .ServiceType}}
{{$svrName := .ServiceName}}
{{range .MethodSets}}
func (c *{{$svrType}}HttpClientImpl) {{.Name}}(ctx context.Context, in *{{.Request}}, opts ...http1.CallOption) (out *{{.Reply}}, err error) {
func (c *{{$svrType}}HTTPClientImpl) {{.Name}}(ctx context.Context, in *{{.Request}}, opts ...http1.CallOption) (out *{{.Reply}}, err error) {
path := binding.EncodePath("{{.Method}}", "{{.Path}}", in)
out = &{{.Reply}}{}
{{if .HasBody }}

@ -6,13 +6,16 @@ import (
"github.com/go-kratos/kratos/v2/internal/httputil"
"google.golang.org/genproto/googleapis/rpc/errdetails"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// UnknownReason is unknown reason for error info.
const UnknownReason = ""
const (
// UnknownCode is unknown code for error info.
UnknownCode = 500
// UnknownReason is unknown reason for error info.
UnknownReason = ""
)
//go:generate protoc -I. --go_out=paths=source_relative:. errors.proto
@ -71,14 +74,14 @@ func Errorf(code int, reason, format string, a ...interface{}) error {
// Code returns the code for a particular error.
// It supports wrapped errors.
func Code(err error) codes.Code {
func Code(err error) int {
if err == nil {
return codes.OK
return 0
}
if se := FromError(err); err != nil {
return codes.Code(se.Code)
return int(se.Code)
}
return codes.Unknown
return UnknownCode
}
// Reason returns the reason for a particular error.
@ -112,5 +115,5 @@ func FromError(err error) *Error {
}
}
}
return New(httputil.StatusFromGRPCCode(gs.Code()), UnknownReason, err.Error())
return New(UnknownCode, UnknownReason, err.Error())
}

@ -1,65 +1,96 @@
GOPATH:=$(shell go env GOPATH)
VERSION=$(shell git describe --tags --always)
PROTO_FILES=$(shell find . -name *.proto)
INTERNAL_PROTO_FILES=$(shell find internal -name *.proto)
API_PROTO_FILES=$(shell find api -name *.proto)
KRATOS_VERSION=$(shell go mod graph |grep go-kratos/kratos/v2 |head -n 1 |awk -F '@' '{print $$2}')
KRATOS=$(GOPATH)/pkg/mod/github.com/go-kratos/kratos/v2@$(KRATOS_VERSION)
.PHONY: init
# init env
init:
go get -u github.com/go-kratos/kratos/cmd/kratos/v2
go get -u github.com/go-kratos/kratos/cmd/protoc-gen-go-http/v2
go get -u github.com/go-kratos/kratos/cmd/protoc-gen-go-errors/v2
go get -u google.golang.org/protobuf/cmd/protoc-gen-go
go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc
go get -u github.com/go-kratos/kratos/cmd/protoc-gen-go-http/v2
go get -u github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2
go get -u github.com/google/wire/cmd/wire
.PHONY: proto
# generate proto
proto:
.PHONY: grpc
# generate grpc code
grpc:
protoc --proto_path=. \
--proto_path=$(KRATOS)/api \
--proto_path=$(KRATOS)/third_party \
--proto_path=$(GOPATH)/src \
--go_out=paths=source_relative:. \
--go-grpc_out=paths=source_relative:. \
$(API_PROTO_FILES)
.PHONY: http
# generate http code
http:
protoc --proto_path=. \
--proto_path=$(KRATOS)/third_party \
--go_out=paths=source_relative:. \
--go-http_out=paths=source_relative:. \
--go-errors_out=paths=source_relative:. $(PROTO_FILES)
$(API_PROTO_FILES)
.PHONY: validate
# generate pb validate for proto
validate:
.PHONY: proto
# generate internal proto
proto:
protoc --proto_path=. \
--proto_path=$(KRATOS)/third_party \
--proto_path=$(KRATOS)/third_party \
--go_out=paths=source_relative:. \
--validate_out="lang=go:." \
$(PROTO_FILES)
$(INTERNAL_PROTO_FILES)
.PHONY: swagger
# generate swagger file
swagger:
protoc --proto_path=. \
--proto_path=$(KRATOS)/third_party \
--openapiv2_out . \
--openapiv2_opt logtostderr=true \
$(PROTO_FILES)
.PHONY: run
run:
cd cmd/blog/ && go run .
.PHONY: ent
ent:
cd internal/data/ && ent generate ./ent/schema
--proto_path=$(KRATOS)/third_party \
--openapiv2_out . \
--openapiv2_opt logtostderr=true \
$(API_PROTO_FILES)
.PHONY: generate
# generate client code
generate:
go generate ./...
.PHONY: build
# build
build:
mkdir -p bin/ && go build -ldflags "-X main.Version=$(VERSION)" -o ./bin/ ./...
.PHONY: test
# test
test:
go test -v ./... -cover
.PHONY: all
# generate all
all:
make generate;
make grpc;
make http;
make proto;
make swagger;
make build;
make test;
# show help
help:
@echo ''
@echo 'Usage:'
@echo ' make [target]'
@echo ''
@echo 'Targets:'
@awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^# (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 2, RLENGTH); \
printf "\033[36m%-22s\033[0m %s\n", helpCommand,helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.15.8
// source: blog.proto
// protoc v3.14.0
// source: api/blog/v1/blog.proto
package v1
@ -36,7 +36,7 @@ type Article struct {
func (x *Article) Reset() {
*x = Article{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[0]
mi := &file_api_blog_v1_blog_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -49,7 +49,7 @@ func (x *Article) String() string {
func (*Article) ProtoMessage() {}
func (x *Article) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[0]
mi := &file_api_blog_v1_blog_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -62,7 +62,7 @@ func (x *Article) ProtoReflect() protoreflect.Message {
// Deprecated: Use Article.ProtoReflect.Descriptor instead.
func (*Article) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{0}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{0}
}
func (x *Article) GetId() int64 {
@ -105,7 +105,7 @@ type CreateArticleRequest struct {
func (x *CreateArticleRequest) Reset() {
*x = CreateArticleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[1]
mi := &file_api_blog_v1_blog_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -118,7 +118,7 @@ func (x *CreateArticleRequest) String() string {
func (*CreateArticleRequest) ProtoMessage() {}
func (x *CreateArticleRequest) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[1]
mi := &file_api_blog_v1_blog_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -131,7 +131,7 @@ func (x *CreateArticleRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateArticleRequest.ProtoReflect.Descriptor instead.
func (*CreateArticleRequest) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{1}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{1}
}
func (x *CreateArticleRequest) GetTitle() string {
@ -159,7 +159,7 @@ type CreateArticleReply struct {
func (x *CreateArticleReply) Reset() {
*x = CreateArticleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[2]
mi := &file_api_blog_v1_blog_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -172,7 +172,7 @@ func (x *CreateArticleReply) String() string {
func (*CreateArticleReply) ProtoMessage() {}
func (x *CreateArticleReply) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[2]
mi := &file_api_blog_v1_blog_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -185,7 +185,7 @@ func (x *CreateArticleReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateArticleReply.ProtoReflect.Descriptor instead.
func (*CreateArticleReply) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{2}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{2}
}
func (x *CreateArticleReply) GetArticle() *Article {
@ -208,7 +208,7 @@ type UpdateArticleRequest struct {
func (x *UpdateArticleRequest) Reset() {
*x = UpdateArticleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[3]
mi := &file_api_blog_v1_blog_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -221,7 +221,7 @@ func (x *UpdateArticleRequest) String() string {
func (*UpdateArticleRequest) ProtoMessage() {}
func (x *UpdateArticleRequest) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[3]
mi := &file_api_blog_v1_blog_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -234,7 +234,7 @@ func (x *UpdateArticleRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateArticleRequest.ProtoReflect.Descriptor instead.
func (*UpdateArticleRequest) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{3}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{3}
}
func (x *UpdateArticleRequest) GetId() int64 {
@ -269,7 +269,7 @@ type UpdateArticleReply struct {
func (x *UpdateArticleReply) Reset() {
*x = UpdateArticleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[4]
mi := &file_api_blog_v1_blog_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -282,7 +282,7 @@ func (x *UpdateArticleReply) String() string {
func (*UpdateArticleReply) ProtoMessage() {}
func (x *UpdateArticleReply) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[4]
mi := &file_api_blog_v1_blog_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -295,7 +295,7 @@ func (x *UpdateArticleReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateArticleReply.ProtoReflect.Descriptor instead.
func (*UpdateArticleReply) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{4}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{4}
}
func (x *UpdateArticleReply) GetArticle() *Article {
@ -316,7 +316,7 @@ type DeleteArticleRequest struct {
func (x *DeleteArticleRequest) Reset() {
*x = DeleteArticleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[5]
mi := &file_api_blog_v1_blog_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -329,7 +329,7 @@ func (x *DeleteArticleRequest) String() string {
func (*DeleteArticleRequest) ProtoMessage() {}
func (x *DeleteArticleRequest) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[5]
mi := &file_api_blog_v1_blog_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -342,7 +342,7 @@ func (x *DeleteArticleRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteArticleRequest.ProtoReflect.Descriptor instead.
func (*DeleteArticleRequest) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{5}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{5}
}
func (x *DeleteArticleRequest) GetId() int64 {
@ -361,7 +361,7 @@ type DeleteArticleReply struct {
func (x *DeleteArticleReply) Reset() {
*x = DeleteArticleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[6]
mi := &file_api_blog_v1_blog_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -374,7 +374,7 @@ func (x *DeleteArticleReply) String() string {
func (*DeleteArticleReply) ProtoMessage() {}
func (x *DeleteArticleReply) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[6]
mi := &file_api_blog_v1_blog_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -387,7 +387,7 @@ func (x *DeleteArticleReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteArticleReply.ProtoReflect.Descriptor instead.
func (*DeleteArticleReply) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{6}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{6}
}
type GetArticleRequest struct {
@ -401,7 +401,7 @@ type GetArticleRequest struct {
func (x *GetArticleRequest) Reset() {
*x = GetArticleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[7]
mi := &file_api_blog_v1_blog_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -414,7 +414,7 @@ func (x *GetArticleRequest) String() string {
func (*GetArticleRequest) ProtoMessage() {}
func (x *GetArticleRequest) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[7]
mi := &file_api_blog_v1_blog_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -427,7 +427,7 @@ func (x *GetArticleRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetArticleRequest.ProtoReflect.Descriptor instead.
func (*GetArticleRequest) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{7}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{7}
}
func (x *GetArticleRequest) GetId() int64 {
@ -448,7 +448,7 @@ type GetArticleReply struct {
func (x *GetArticleReply) Reset() {
*x = GetArticleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[8]
mi := &file_api_blog_v1_blog_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -461,7 +461,7 @@ func (x *GetArticleReply) String() string {
func (*GetArticleReply) ProtoMessage() {}
func (x *GetArticleReply) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[8]
mi := &file_api_blog_v1_blog_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -474,7 +474,7 @@ func (x *GetArticleReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetArticleReply.ProtoReflect.Descriptor instead.
func (*GetArticleReply) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{8}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{8}
}
func (x *GetArticleReply) GetArticle() *Article {
@ -493,7 +493,7 @@ type ListArticleRequest struct {
func (x *ListArticleRequest) Reset() {
*x = ListArticleRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[9]
mi := &file_api_blog_v1_blog_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -506,7 +506,7 @@ func (x *ListArticleRequest) String() string {
func (*ListArticleRequest) ProtoMessage() {}
func (x *ListArticleRequest) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[9]
mi := &file_api_blog_v1_blog_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -519,7 +519,7 @@ func (x *ListArticleRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListArticleRequest.ProtoReflect.Descriptor instead.
func (*ListArticleRequest) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{9}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{9}
}
type ListArticleReply struct {
@ -533,7 +533,7 @@ type ListArticleReply struct {
func (x *ListArticleReply) Reset() {
*x = ListArticleReply{}
if protoimpl.UnsafeEnabled {
mi := &file_blog_proto_msgTypes[10]
mi := &file_api_blog_v1_blog_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -546,7 +546,7 @@ func (x *ListArticleReply) String() string {
func (*ListArticleReply) ProtoMessage() {}
func (x *ListArticleReply) ProtoReflect() protoreflect.Message {
mi := &file_blog_proto_msgTypes[10]
mi := &file_api_blog_v1_blog_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -559,7 +559,7 @@ func (x *ListArticleReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use ListArticleReply.ProtoReflect.Descriptor instead.
func (*ListArticleReply) Descriptor() ([]byte, []int) {
return file_blog_proto_rawDescGZIP(), []int{10}
return file_api_blog_v1_blog_proto_rawDescGZIP(), []int{10}
}
func (x *ListArticleReply) GetResults() []*Article {
@ -569,132 +569,140 @@ func (x *ListArticleReply) GetResults() []*Article {
return nil
}
var File_blog_proto protoreflect.FileDescriptor
var file_blog_proto_rawDesc = []byte{
0x0a, 0x0a, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c,
0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x07, 0x41,
0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x04,
0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x05, 0x18, 0x32, 0x52, 0x05, 0x74, 0x69,
0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3f, 0x0a,
0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72,
0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x6a,
0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20, 0x00, 0x52, 0x02, 0x69, 0x64, 0x12,
0x1f, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x09,
0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x05, 0x18, 0x32, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3f, 0x0a, 0x12, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x12, 0x29, 0x0a, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x63,
0x6c, 0x65, 0x52, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x26, 0x0a, 0x14, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52,
0x02, 0x69, 0x64, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74,
0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74,
var File_api_blog_v1_blog_proto protoreflect.FileDescriptor
var file_api_blog_v1_blog_proto_rawDesc = []byte{
0x0a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6c,
0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70,
0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61,
0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5d, 0x0a, 0x07,
0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x6c, 0x69, 0x6b, 0x65, 0x22, 0x51, 0x0a, 0x14, 0x43,
0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x05, 0x18, 0x32, 0x52, 0x05, 0x74,
0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x44,
0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x41, 0x72, 0x74,
0x69, 0x63, 0x6c, 0x65, 0x22, 0x6a, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72,
0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x02,
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x22, 0x02, 0x20,
0x00, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1f, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x42, 0x09, 0xfa, 0x42, 0x06, 0x72, 0x04, 0x10, 0x05, 0x18, 0x32, 0x52,
0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74,
0x22, 0x44, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x41,
0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3c,
0x0a, 0x0f, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x12, 0x29, 0x0a, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x14,
0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x41, 0x0a, 0x0f, 0x47, 0x65, 0x74,
0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x07,
0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69,
0x63, 0x6c, 0x65, 0x52, 0x07, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x22, 0x14, 0x0a, 0x12,
0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x22, 0x3d, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x29, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31,
0x2e, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x73, 0x32, 0xf5, 0x03, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x62, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63,
0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x17, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x11, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c,
0x65, 0x2f, 0x3a, 0x01, 0x2a, 0x12, 0x66, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e,
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70,
0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x1a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72,
0x74, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x63, 0x0a,
0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x1c,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72,
0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61,
0x73, 0x74, 0x22, 0x42, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74,
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x07, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x32, 0xa7, 0x04, 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x67, 0x53,
0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6c, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69,
0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x6c, 0x6f,
0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x17, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x11, 0x22, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65,
0x2f, 0x3a, 0x01, 0x2a, 0x12, 0x70, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72,
0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c,
0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x72, 0x74,
0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02,
0x15, 0x1a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x7b,
0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x6d, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x21, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x72, 0x74, 0x69,
0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12,
0x2a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x7b, 0x69,
0x64, 0x7d, 0x12, 0x5a, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65,
0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74,
0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76,
0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x59,
0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x1a, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63,
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31,
0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x42, 0x11, 0x0a, 0x06, 0x61, 0x70, 0x69,
0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x05, 0x2e, 0x2f, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x62, 0x6c, 0x6f,
0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41,
0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x12, 0x2a, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65,
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x64, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69,
0x63, 0x6c, 0x65, 0x12, 0x1e, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x61,
0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x63, 0x0a, 0x0b, 0x4c,
0x69, 0x73, 0x74, 0x41, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x12, 0x1f, 0x2e, 0x62, 0x6c, 0x6f,
0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72, 0x74,
0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x6c,
0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x72,
0x74, 0x69, 0x63, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x72, 0x74, 0x69, 0x63, 0x6c, 0x65, 0x2f,
0x42, 0x44, 0x0a, 0x0b, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x50,
0x01, 0x5a, 0x33, 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, 0x2f, 0x65,
0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_blog_proto_rawDescOnce sync.Once
file_blog_proto_rawDescData = file_blog_proto_rawDesc
file_api_blog_v1_blog_proto_rawDescOnce sync.Once
file_api_blog_v1_blog_proto_rawDescData = file_api_blog_v1_blog_proto_rawDesc
)
func file_blog_proto_rawDescGZIP() []byte {
file_blog_proto_rawDescOnce.Do(func() {
file_blog_proto_rawDescData = protoimpl.X.CompressGZIP(file_blog_proto_rawDescData)
func file_api_blog_v1_blog_proto_rawDescGZIP() []byte {
file_api_blog_v1_blog_proto_rawDescOnce.Do(func() {
file_api_blog_v1_blog_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_blog_v1_blog_proto_rawDescData)
})
return file_blog_proto_rawDescData
}
var file_blog_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_blog_proto_goTypes = []interface{}{
(*Article)(nil), // 0: api.v1.Article
(*CreateArticleRequest)(nil), // 1: api.v1.CreateArticleRequest
(*CreateArticleReply)(nil), // 2: api.v1.CreateArticleReply
(*UpdateArticleRequest)(nil), // 3: api.v1.UpdateArticleRequest
(*UpdateArticleReply)(nil), // 4: api.v1.UpdateArticleReply
(*DeleteArticleRequest)(nil), // 5: api.v1.DeleteArticleRequest
(*DeleteArticleReply)(nil), // 6: api.v1.DeleteArticleReply
(*GetArticleRequest)(nil), // 7: api.v1.GetArticleRequest
(*GetArticleReply)(nil), // 8: api.v1.GetArticleReply
(*ListArticleRequest)(nil), // 9: api.v1.ListArticleRequest
(*ListArticleReply)(nil), // 10: api.v1.ListArticleReply
}
var file_blog_proto_depIdxs = []int32{
0, // 0: api.v1.CreateArticleReply.Article:type_name -> api.v1.Article
0, // 1: api.v1.UpdateArticleReply.Article:type_name -> api.v1.Article
0, // 2: api.v1.GetArticleReply.Article:type_name -> api.v1.Article
0, // 3: api.v1.ListArticleReply.results:type_name -> api.v1.Article
1, // 4: api.v1.BlogService.CreateArticle:input_type -> api.v1.CreateArticleRequest
3, // 5: api.v1.BlogService.UpdateArticle:input_type -> api.v1.UpdateArticleRequest
5, // 6: api.v1.BlogService.DeleteArticle:input_type -> api.v1.DeleteArticleRequest
7, // 7: api.v1.BlogService.GetArticle:input_type -> api.v1.GetArticleRequest
9, // 8: api.v1.BlogService.ListArticle:input_type -> api.v1.ListArticleRequest
2, // 9: api.v1.BlogService.CreateArticle:output_type -> api.v1.CreateArticleReply
4, // 10: api.v1.BlogService.UpdateArticle:output_type -> api.v1.UpdateArticleReply
6, // 11: api.v1.BlogService.DeleteArticle:output_type -> api.v1.DeleteArticleReply
8, // 12: api.v1.BlogService.GetArticle:output_type -> api.v1.GetArticleReply
10, // 13: api.v1.BlogService.ListArticle:output_type -> api.v1.ListArticleReply
return file_api_blog_v1_blog_proto_rawDescData
}
var file_api_blog_v1_blog_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_api_blog_v1_blog_proto_goTypes = []interface{}{
(*Article)(nil), // 0: blog.api.v1.Article
(*CreateArticleRequest)(nil), // 1: blog.api.v1.CreateArticleRequest
(*CreateArticleReply)(nil), // 2: blog.api.v1.CreateArticleReply
(*UpdateArticleRequest)(nil), // 3: blog.api.v1.UpdateArticleRequest
(*UpdateArticleReply)(nil), // 4: blog.api.v1.UpdateArticleReply
(*DeleteArticleRequest)(nil), // 5: blog.api.v1.DeleteArticleRequest
(*DeleteArticleReply)(nil), // 6: blog.api.v1.DeleteArticleReply
(*GetArticleRequest)(nil), // 7: blog.api.v1.GetArticleRequest
(*GetArticleReply)(nil), // 8: blog.api.v1.GetArticleReply
(*ListArticleRequest)(nil), // 9: blog.api.v1.ListArticleRequest
(*ListArticleReply)(nil), // 10: blog.api.v1.ListArticleReply
}
var file_api_blog_v1_blog_proto_depIdxs = []int32{
0, // 0: blog.api.v1.CreateArticleReply.Article:type_name -> blog.api.v1.Article
0, // 1: blog.api.v1.UpdateArticleReply.Article:type_name -> blog.api.v1.Article
0, // 2: blog.api.v1.GetArticleReply.Article:type_name -> blog.api.v1.Article
0, // 3: blog.api.v1.ListArticleReply.results:type_name -> blog.api.v1.Article
1, // 4: blog.api.v1.BlogService.CreateArticle:input_type -> blog.api.v1.CreateArticleRequest
3, // 5: blog.api.v1.BlogService.UpdateArticle:input_type -> blog.api.v1.UpdateArticleRequest
5, // 6: blog.api.v1.BlogService.DeleteArticle:input_type -> blog.api.v1.DeleteArticleRequest
7, // 7: blog.api.v1.BlogService.GetArticle:input_type -> blog.api.v1.GetArticleRequest
9, // 8: blog.api.v1.BlogService.ListArticle:input_type -> blog.api.v1.ListArticleRequest
2, // 9: blog.api.v1.BlogService.CreateArticle:output_type -> blog.api.v1.CreateArticleReply
4, // 10: blog.api.v1.BlogService.UpdateArticle:output_type -> blog.api.v1.UpdateArticleReply
6, // 11: blog.api.v1.BlogService.DeleteArticle:output_type -> blog.api.v1.DeleteArticleReply
8, // 12: blog.api.v1.BlogService.GetArticle:output_type -> blog.api.v1.GetArticleReply
10, // 13: blog.api.v1.BlogService.ListArticle:output_type -> blog.api.v1.ListArticleReply
9, // [9:14] is the sub-list for method output_type
4, // [4:9] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
@ -702,13 +710,13 @@ var file_blog_proto_depIdxs = []int32{
0, // [0:4] is the sub-list for field type_name
}
func init() { file_blog_proto_init() }
func file_blog_proto_init() {
if File_blog_proto != nil {
func init() { file_api_blog_v1_blog_proto_init() }
func file_api_blog_v1_blog_proto_init() {
if File_api_blog_v1_blog_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_blog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Article); i {
case 0:
return &v.state
@ -720,7 +728,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateArticleRequest); i {
case 0:
return &v.state
@ -732,7 +740,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateArticleReply); i {
case 0:
return &v.state
@ -744,7 +752,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateArticleRequest); i {
case 0:
return &v.state
@ -756,7 +764,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateArticleReply); i {
case 0:
return &v.state
@ -768,7 +776,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteArticleRequest); i {
case 0:
return &v.state
@ -780,7 +788,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteArticleReply); i {
case 0:
return &v.state
@ -792,7 +800,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetArticleRequest); i {
case 0:
return &v.state
@ -804,7 +812,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetArticleReply); i {
case 0:
return &v.state
@ -816,7 +824,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListArticleRequest); i {
case 0:
return &v.state
@ -828,7 +836,7 @@ func file_blog_proto_init() {
return nil
}
}
file_blog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
file_api_blog_v1_blog_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListArticleReply); i {
case 0:
return &v.state
@ -845,18 +853,18 @@ func file_blog_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_blog_proto_rawDesc,
RawDescriptor: file_api_blog_v1_blog_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_blog_proto_goTypes,
DependencyIndexes: file_blog_proto_depIdxs,
MessageInfos: file_blog_proto_msgTypes,
GoTypes: file_api_blog_v1_blog_proto_goTypes,
DependencyIndexes: file_api_blog_v1_blog_proto_depIdxs,
MessageInfos: file_api_blog_v1_blog_proto_msgTypes,
}.Build()
File_blog_proto = out.File
file_blog_proto_rawDesc = nil
file_blog_proto_goTypes = nil
file_blog_proto_depIdxs = nil
File_api_blog_v1_blog_proto = out.File
file_api_blog_v1_blog_proto_rawDesc = nil
file_api_blog_v1_blog_proto_goTypes = nil
file_api_blog_v1_blog_proto_depIdxs = nil
}

@ -1,10 +1,10 @@
syntax = "proto3";
package api.v1;
package blog.api.v1;
option go_package = "github.com/go-kratos/kratos/examples/blog/api/v1;v1";
option java_multiple_files = true;
option java_package = "api.v1";
option java_package = "blog.api.v1";
import "google/api/annotations.proto";
// the validate rules:
@ -86,4 +86,4 @@ message ListArticleRequest {
message ListArticleReply {
repeated Article results = 1;
}
}

@ -35,7 +35,7 @@ func NewBlogServiceClient(cc grpc.ClientConnInterface) BlogServiceClient {
func (c *blogServiceClient) CreateArticle(ctx context.Context, in *CreateArticleRequest, opts ...grpc.CallOption) (*CreateArticleReply, error) {
out := new(CreateArticleReply)
err := c.cc.Invoke(ctx, "/api.v1.BlogService/CreateArticle", in, out, opts...)
err := c.cc.Invoke(ctx, "/blog.api.v1.BlogService/CreateArticle", in, out, opts...)
if err != nil {
return nil, err
}
@ -44,7 +44,7 @@ func (c *blogServiceClient) CreateArticle(ctx context.Context, in *CreateArticle
func (c *blogServiceClient) UpdateArticle(ctx context.Context, in *UpdateArticleRequest, opts ...grpc.CallOption) (*UpdateArticleReply, error) {
out := new(UpdateArticleReply)
err := c.cc.Invoke(ctx, "/api.v1.BlogService/UpdateArticle", in, out, opts...)
err := c.cc.Invoke(ctx, "/blog.api.v1.BlogService/UpdateArticle", in, out, opts...)
if err != nil {
return nil, err
}
@ -53,7 +53,7 @@ func (c *blogServiceClient) UpdateArticle(ctx context.Context, in *UpdateArticle
func (c *blogServiceClient) DeleteArticle(ctx context.Context, in *DeleteArticleRequest, opts ...grpc.CallOption) (*DeleteArticleReply, error) {
out := new(DeleteArticleReply)
err := c.cc.Invoke(ctx, "/api.v1.BlogService/DeleteArticle", in, out, opts...)
err := c.cc.Invoke(ctx, "/blog.api.v1.BlogService/DeleteArticle", in, out, opts...)
if err != nil {
return nil, err
}
@ -62,7 +62,7 @@ func (c *blogServiceClient) DeleteArticle(ctx context.Context, in *DeleteArticle
func (c *blogServiceClient) GetArticle(ctx context.Context, in *GetArticleRequest, opts ...grpc.CallOption) (*GetArticleReply, error) {
out := new(GetArticleReply)
err := c.cc.Invoke(ctx, "/api.v1.BlogService/GetArticle", in, out, opts...)
err := c.cc.Invoke(ctx, "/blog.api.v1.BlogService/GetArticle", in, out, opts...)
if err != nil {
return nil, err
}
@ -71,7 +71,7 @@ func (c *blogServiceClient) GetArticle(ctx context.Context, in *GetArticleReques
func (c *blogServiceClient) ListArticle(ctx context.Context, in *ListArticleRequest, opts ...grpc.CallOption) (*ListArticleReply, error) {
out := new(ListArticleReply)
err := c.cc.Invoke(ctx, "/api.v1.BlogService/ListArticle", in, out, opts...)
err := c.cc.Invoke(ctx, "/blog.api.v1.BlogService/ListArticle", in, out, opts...)
if err != nil {
return nil, err
}
@ -132,7 +132,7 @@ func _BlogService_CreateArticle_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.v1.BlogService/CreateArticle",
FullMethod: "/blog.api.v1.BlogService/CreateArticle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlogServiceServer).CreateArticle(ctx, req.(*CreateArticleRequest))
@ -150,7 +150,7 @@ func _BlogService_UpdateArticle_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.v1.BlogService/UpdateArticle",
FullMethod: "/blog.api.v1.BlogService/UpdateArticle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlogServiceServer).UpdateArticle(ctx, req.(*UpdateArticleRequest))
@ -168,7 +168,7 @@ func _BlogService_DeleteArticle_Handler(srv interface{}, ctx context.Context, de
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.v1.BlogService/DeleteArticle",
FullMethod: "/blog.api.v1.BlogService/DeleteArticle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlogServiceServer).DeleteArticle(ctx, req.(*DeleteArticleRequest))
@ -186,7 +186,7 @@ func _BlogService_GetArticle_Handler(srv interface{}, ctx context.Context, dec f
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.v1.BlogService/GetArticle",
FullMethod: "/blog.api.v1.BlogService/GetArticle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlogServiceServer).GetArticle(ctx, req.(*GetArticleRequest))
@ -204,7 +204,7 @@ func _BlogService_ListArticle_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.v1.BlogService/ListArticle",
FullMethod: "/blog.api.v1.BlogService/ListArticle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(BlogServiceServer).ListArticle(ctx, req.(*ListArticleRequest))
@ -216,7 +216,7 @@ func _BlogService_ListArticle_Handler(srv interface{}, ctx context.Context, dec
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var BlogService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.v1.BlogService",
ServiceName: "blog.api.v1.BlogService",
HandlerType: (*BlogServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
@ -241,5 +241,5 @@ var BlogService_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "blog.proto",
Metadata: "api/blog/v1/blog.proto",
}

@ -2,7 +2,7 @@
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: error_reason.proto
// source: api/blog/v1/error_reason.proto
package v1
@ -50,11 +50,11 @@ func (x ErrorReason) String() string {
}
func (ErrorReason) Descriptor() protoreflect.EnumDescriptor {
return file_error_reason_proto_enumTypes[0].Descriptor()
return file_api_blog_v1_error_reason_proto_enumTypes[0].Descriptor()
}
func (ErrorReason) Type() protoreflect.EnumType {
return &file_error_reason_proto_enumTypes[0]
return &file_api_blog_v1_error_reason_proto_enumTypes[0]
}
func (x ErrorReason) Number() protoreflect.EnumNumber {
@ -63,43 +63,44 @@ func (x ErrorReason) Number() protoreflect.EnumNumber {
// Deprecated: Use ErrorReason.Descriptor instead.
func (ErrorReason) EnumDescriptor() ([]byte, []int) {
return file_error_reason_proto_rawDescGZIP(), []int{0}
return file_api_blog_v1_error_reason_proto_rawDescGZIP(), []int{0}
}
var File_error_reason_proto protoreflect.FileDescriptor
var file_error_reason_proto_rawDesc = []byte{
0x0a, 0x12, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x76,
0x31, 0x2a, 0x34, 0x0a, 0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e,
0x12, 0x11, 0x0a, 0x0d, 0x54, 0x49, 0x54, 0x4c, 0x45, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e,
0x47, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x4d, 0x49,
0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x42, 0x57, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x67, 0x2e,
0x76, 0x31, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x50, 0x01, 0x5a, 0x33, 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, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31,
0xa2, 0x02, 0x0d, 0x41, 0x50, 0x49, 0x42, 0x6c, 0x6f, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
var File_api_blog_v1_error_reason_proto protoreflect.FileDescriptor
var file_api_blog_v1_error_reason_proto_rawDesc = []byte{
0x0a, 0x1e, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x72,
0x72, 0x6f, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x2a, 0x34, 0x0a,
0x0b, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x11, 0x0a, 0x0d,
0x54, 0x49, 0x54, 0x4c, 0x45, 0x5f, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12,
0x12, 0x0a, 0x0e, 0x43, 0x4f, 0x4e, 0x54, 0x45, 0x4e, 0x54, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4e,
0x47, 0x10, 0x01, 0x42, 0x57, 0x0a, 0x0e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x65,
0x72, 0x72, 0x6f, 0x72, 0x73, 0x50, 0x01, 0x5a, 0x33, 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, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x62, 0x6c,
0x6f, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0xa2, 0x02, 0x0d, 0x41,
0x50, 0x49, 0x42, 0x6c, 0x6f, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
}
var (
file_error_reason_proto_rawDescOnce sync.Once
file_error_reason_proto_rawDescData = file_error_reason_proto_rawDesc
file_api_blog_v1_error_reason_proto_rawDescOnce sync.Once
file_api_blog_v1_error_reason_proto_rawDescData = file_api_blog_v1_error_reason_proto_rawDesc
)
func file_error_reason_proto_rawDescGZIP() []byte {
file_error_reason_proto_rawDescOnce.Do(func() {
file_error_reason_proto_rawDescData = protoimpl.X.CompressGZIP(file_error_reason_proto_rawDescData)
func file_api_blog_v1_error_reason_proto_rawDescGZIP() []byte {
file_api_blog_v1_error_reason_proto_rawDescOnce.Do(func() {
file_api_blog_v1_error_reason_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_blog_v1_error_reason_proto_rawDescData)
})
return file_error_reason_proto_rawDescData
return file_api_blog_v1_error_reason_proto_rawDescData
}
var file_error_reason_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_error_reason_proto_goTypes = []interface{}{
var file_api_blog_v1_error_reason_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_api_blog_v1_error_reason_proto_goTypes = []interface{}{
(ErrorReason)(0), // 0: api.blog.v1.ErrorReason
}
var file_error_reason_proto_depIdxs = []int32{
var file_api_blog_v1_error_reason_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
@ -107,27 +108,27 @@ var file_error_reason_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_error_reason_proto_init() }
func file_error_reason_proto_init() {
if File_error_reason_proto != nil {
func init() { file_api_blog_v1_error_reason_proto_init() }
func file_api_blog_v1_error_reason_proto_init() {
if File_api_blog_v1_error_reason_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_error_reason_proto_rawDesc,
RawDescriptor: file_api_blog_v1_error_reason_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_error_reason_proto_goTypes,
DependencyIndexes: file_error_reason_proto_depIdxs,
EnumInfos: file_error_reason_proto_enumTypes,
GoTypes: file_api_blog_v1_error_reason_proto_goTypes,
DependencyIndexes: file_api_blog_v1_error_reason_proto_depIdxs,
EnumInfos: file_api_blog_v1_error_reason_proto_enumTypes,
}.Build()
File_error_reason_proto = out.File
file_error_reason_proto_rawDesc = nil
file_error_reason_proto_goTypes = nil
file_error_reason_proto_depIdxs = nil
File_api_blog_v1_error_reason_proto = out.File
file_api_blog_v1_error_reason_proto_rawDesc = nil
file_api_blog_v1_error_reason_proto_goTypes = nil
file_api_blog_v1_error_reason_proto_depIdxs = nil
}

@ -1,16 +1,15 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.25.0-devel
// protoc v3.6.1
// source: conf.proto
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: internal/conf/conf.proto
package conf
import (
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
durationpb "google.golang.org/protobuf/types/known/durationpb"
reflect "reflect"
sync "sync"
)
@ -22,10 +21,6 @@ const (
_ = 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
type Bootstrap struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -38,7 +33,7 @@ type Bootstrap struct {
func (x *Bootstrap) Reset() {
*x = Bootstrap{}
if protoimpl.UnsafeEnabled {
mi := &file_conf_proto_msgTypes[0]
mi := &file_internal_conf_conf_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -51,7 +46,7 @@ func (x *Bootstrap) String() string {
func (*Bootstrap) ProtoMessage() {}
func (x *Bootstrap) ProtoReflect() protoreflect.Message {
mi := &file_conf_proto_msgTypes[0]
mi := &file_internal_conf_conf_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -64,7 +59,7 @@ func (x *Bootstrap) ProtoReflect() protoreflect.Message {
// Deprecated: Use Bootstrap.ProtoReflect.Descriptor instead.
func (*Bootstrap) Descriptor() ([]byte, []int) {
return file_conf_proto_rawDescGZIP(), []int{0}
return file_internal_conf_conf_proto_rawDescGZIP(), []int{0}
}
func (x *Bootstrap) GetServer() *Server {
@ -93,7 +88,7 @@ type Server struct {
func (x *Server) Reset() {
*x = Server{}
if protoimpl.UnsafeEnabled {
mi := &file_conf_proto_msgTypes[1]
mi := &file_internal_conf_conf_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -106,7 +101,7 @@ func (x *Server) String() string {
func (*Server) ProtoMessage() {}
func (x *Server) ProtoReflect() protoreflect.Message {
mi := &file_conf_proto_msgTypes[1]
mi := &file_internal_conf_conf_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -119,7 +114,7 @@ func (x *Server) ProtoReflect() protoreflect.Message {
// Deprecated: Use Server.ProtoReflect.Descriptor instead.
func (*Server) Descriptor() ([]byte, []int) {
return file_conf_proto_rawDescGZIP(), []int{1}
return file_internal_conf_conf_proto_rawDescGZIP(), []int{1}
}
func (x *Server) GetHttp() *Server_HTTP {
@ -148,7 +143,7 @@ type Data struct {
func (x *Data) Reset() {
*x = Data{}
if protoimpl.UnsafeEnabled {
mi := &file_conf_proto_msgTypes[2]
mi := &file_internal_conf_conf_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -161,7 +156,7 @@ func (x *Data) String() string {
func (*Data) ProtoMessage() {}
func (x *Data) ProtoReflect() protoreflect.Message {
mi := &file_conf_proto_msgTypes[2]
mi := &file_internal_conf_conf_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -174,7 +169,7 @@ func (x *Data) ProtoReflect() protoreflect.Message {
// Deprecated: Use Data.ProtoReflect.Descriptor instead.
func (*Data) Descriptor() ([]byte, []int) {
return file_conf_proto_rawDescGZIP(), []int{2}
return file_internal_conf_conf_proto_rawDescGZIP(), []int{2}
}
func (x *Data) GetDatabase() *Data_Database {
@ -196,15 +191,15 @@ type Server_HTTP struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
}
func (x *Server_HTTP) Reset() {
*x = Server_HTTP{}
if protoimpl.UnsafeEnabled {
mi := &file_conf_proto_msgTypes[3]
mi := &file_internal_conf_conf_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -217,7 +212,7 @@ func (x *Server_HTTP) String() string {
func (*Server_HTTP) ProtoMessage() {}
func (x *Server_HTTP) ProtoReflect() protoreflect.Message {
mi := &file_conf_proto_msgTypes[3]
mi := &file_internal_conf_conf_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -230,7 +225,7 @@ func (x *Server_HTTP) ProtoReflect() protoreflect.Message {
// Deprecated: Use Server_HTTP.ProtoReflect.Descriptor instead.
func (*Server_HTTP) Descriptor() ([]byte, []int) {
return file_conf_proto_rawDescGZIP(), []int{1, 0}
return file_internal_conf_conf_proto_rawDescGZIP(), []int{1, 0}
}
func (x *Server_HTTP) GetNetwork() string {
@ -247,7 +242,7 @@ func (x *Server_HTTP) GetAddr() string {
return ""
}
func (x *Server_HTTP) GetTimeout() *duration.Duration {
func (x *Server_HTTP) GetTimeout() *durationpb.Duration {
if x != nil {
return x.Timeout
}
@ -259,15 +254,15 @@ type Server_GRPC struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Timeout *duration.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Timeout *durationpb.Duration `protobuf:"bytes,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
}
func (x *Server_GRPC) Reset() {
*x = Server_GRPC{}
if protoimpl.UnsafeEnabled {
mi := &file_conf_proto_msgTypes[4]
mi := &file_internal_conf_conf_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -280,7 +275,7 @@ func (x *Server_GRPC) String() string {
func (*Server_GRPC) ProtoMessage() {}
func (x *Server_GRPC) ProtoReflect() protoreflect.Message {
mi := &file_conf_proto_msgTypes[4]
mi := &file_internal_conf_conf_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -293,7 +288,7 @@ func (x *Server_GRPC) ProtoReflect() protoreflect.Message {
// Deprecated: Use Server_GRPC.ProtoReflect.Descriptor instead.
func (*Server_GRPC) Descriptor() ([]byte, []int) {
return file_conf_proto_rawDescGZIP(), []int{1, 1}
return file_internal_conf_conf_proto_rawDescGZIP(), []int{1, 1}
}
func (x *Server_GRPC) GetNetwork() string {
@ -310,7 +305,7 @@ func (x *Server_GRPC) GetAddr() string {
return ""
}
func (x *Server_GRPC) GetTimeout() *duration.Duration {
func (x *Server_GRPC) GetTimeout() *durationpb.Duration {
if x != nil {
return x.Timeout
}
@ -329,7 +324,7 @@ type Data_Database struct {
func (x *Data_Database) Reset() {
*x = Data_Database{}
if protoimpl.UnsafeEnabled {
mi := &file_conf_proto_msgTypes[5]
mi := &file_internal_conf_conf_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -342,7 +337,7 @@ func (x *Data_Database) String() string {
func (*Data_Database) ProtoMessage() {}
func (x *Data_Database) ProtoReflect() protoreflect.Message {
mi := &file_conf_proto_msgTypes[5]
mi := &file_internal_conf_conf_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -355,7 +350,7 @@ func (x *Data_Database) ProtoReflect() protoreflect.Message {
// Deprecated: Use Data_Database.ProtoReflect.Descriptor instead.
func (*Data_Database) Descriptor() ([]byte, []int) {
return file_conf_proto_rawDescGZIP(), []int{2, 0}
return file_internal_conf_conf_proto_rawDescGZIP(), []int{2, 0}
}
func (x *Data_Database) GetDriver() string {
@ -377,19 +372,19 @@ type Data_Redis struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
Db int32 `protobuf:"varint,4,opt,name=db,proto3" json:"db,omitempty"`
DialTimeout *duration.Duration `protobuf:"bytes,5,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"`
ReadTimeout *duration.Duration `protobuf:"bytes,6,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"`
WriteTimeout *duration.Duration `protobuf:"bytes,7,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"`
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
Db int32 `protobuf:"varint,4,opt,name=db,proto3" json:"db,omitempty"`
DialTimeout *durationpb.Duration `protobuf:"bytes,5,opt,name=dial_timeout,json=dialTimeout,proto3" json:"dial_timeout,omitempty"`
ReadTimeout *durationpb.Duration `protobuf:"bytes,6,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"`
WriteTimeout *durationpb.Duration `protobuf:"bytes,7,opt,name=write_timeout,json=writeTimeout,proto3" json:"write_timeout,omitempty"`
}
func (x *Data_Redis) Reset() {
*x = Data_Redis{}
if protoimpl.UnsafeEnabled {
mi := &file_conf_proto_msgTypes[6]
mi := &file_internal_conf_conf_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -402,7 +397,7 @@ func (x *Data_Redis) String() string {
func (*Data_Redis) ProtoMessage() {}
func (x *Data_Redis) ProtoReflect() protoreflect.Message {
mi := &file_conf_proto_msgTypes[6]
mi := &file_internal_conf_conf_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -415,7 +410,7 @@ func (x *Data_Redis) ProtoReflect() protoreflect.Message {
// Deprecated: Use Data_Redis.ProtoReflect.Descriptor instead.
func (*Data_Redis) Descriptor() ([]byte, []int) {
return file_conf_proto_rawDescGZIP(), []int{2, 1}
return file_internal_conf_conf_proto_rawDescGZIP(), []int{2, 1}
}
func (x *Data_Redis) GetNetwork() string {
@ -446,120 +441,124 @@ func (x *Data_Redis) GetDb() int32 {
return 0
}
func (x *Data_Redis) GetDialTimeout() *duration.Duration {
func (x *Data_Redis) GetDialTimeout() *durationpb.Duration {
if x != nil {
return x.DialTimeout
}
return nil
}
func (x *Data_Redis) GetReadTimeout() *duration.Duration {
func (x *Data_Redis) GetReadTimeout() *durationpb.Duration {
if x != nil {
return x.ReadTimeout
}
return nil
}
func (x *Data_Redis) GetWriteTimeout() *duration.Duration {
func (x *Data_Redis) GetWriteTimeout() *durationpb.Duration {
if x != nil {
return x.WriteTimeout
}
return nil
}
var File_conf_proto protoreflect.FileDescriptor
var File_internal_conf_conf_proto protoreflect.FileDescriptor
var file_conf_proto_rawDesc = []byte{
0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6b, 0x72,
0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f,
0x6e, 0x66, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0x71, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12,
0x34, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1c, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73,
0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52,
0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xcc, 0x02, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
0x12, 0x35, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x48, 0x54, 0x54,
0x50, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x35, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69,
0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72,
0x76, 0x65, 0x72, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x69,
0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72,
0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b,
0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x61, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x69, 0x0a, 0x04, 0x47, 0x52, 0x50,
0x43, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61,
0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12,
0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x22, 0xdb, 0x03, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a,
0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x23, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61,
0x62, 0x61, 0x73, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x36,
0x0a, 0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e,
var file_internal_conf_conf_proto_rawDesc = []byte{
0x0a, 0x18, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x2f,
0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6b, 0x72, 0x61, 0x74,
0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66,
0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x71, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x12, 0x34, 0x0a,
0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e,
0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x52,
0x05, 0x72, 0x65, 0x64, 0x69, 0x73, 0x1a, 0x3a, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f,
0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x1a, 0x9d, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07,
0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e,
0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02,
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61,
0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x02, 0x64, 0x62, 0x12, 0x3c, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x74,
0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x54, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72,
0x76, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64,
0x61, 0x74, 0x61, 0x22, 0xcc, 0x02, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x35,
0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6b,
0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63,
0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x52,
0x04, 0x68, 0x74, 0x74, 0x70, 0x12, 0x35, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x02, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65,
0x72, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x1a, 0x69, 0x0a, 0x04,
0x48, 0x54, 0x54, 0x50, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12,
0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64,
0x64, 0x72, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07,
0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x1a, 0x69, 0x0a, 0x04, 0x47, 0x52, 0x50, 0x43, 0x12,
0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64,
0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x33, 0x0a,
0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x22, 0xdb, 0x03, 0x0a, 0x04, 0x44, 0x61, 0x74, 0x61, 0x12, 0x3f, 0x0a, 0x08, 0x64,
0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e,
0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
0x63, 0x6f, 0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,
0x73, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05,
0x72, 0x65, 0x64, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6b, 0x72,
0x61, 0x74, 0x6f, 0x73, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x63, 0x6f,
0x6e, 0x66, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x64, 0x69, 0x73, 0x52, 0x05, 0x72,
0x65, 0x64, 0x69, 0x73, 0x1a, 0x3a, 0x0a, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65,
0x12, 0x16, 0x0a, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
0x52, 0x06, 0x64, 0x72, 0x69, 0x76, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72,
0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x1a, 0x9d, 0x02, 0x0a, 0x05, 0x52, 0x65, 0x64, 0x69, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65,
0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74,
0x77, 0x6f, 0x72, 0x6b, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73,
0x77, 0x6f, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x64, 0x62, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x64, 0x62, 0x12, 0x3c, 0x0a, 0x0c, 0x64, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d,
0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
0x6f, 0x75, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61,
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, 0x63, 0x6f, 0x6e, 0x66, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f,
0x75, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x72, 0x65, 0x61, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x12, 0x3e, 0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x52, 0x0c, 0x77, 0x72, 0x69, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
0x42, 0x3e, 0x5a, 0x3c, 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, 0x2f,
0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2f, 0x69, 0x6e,
0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x3b, 0x63, 0x6f, 0x6e, 0x66,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_conf_proto_rawDescOnce sync.Once
file_conf_proto_rawDescData = file_conf_proto_rawDesc
file_internal_conf_conf_proto_rawDescOnce sync.Once
file_internal_conf_conf_proto_rawDescData = file_internal_conf_conf_proto_rawDesc
)
func file_conf_proto_rawDescGZIP() []byte {
file_conf_proto_rawDescOnce.Do(func() {
file_conf_proto_rawDescData = protoimpl.X.CompressGZIP(file_conf_proto_rawDescData)
func file_internal_conf_conf_proto_rawDescGZIP() []byte {
file_internal_conf_conf_proto_rawDescOnce.Do(func() {
file_internal_conf_conf_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_conf_conf_proto_rawDescData)
})
return file_conf_proto_rawDescData
return file_internal_conf_conf_proto_rawDescData
}
var file_conf_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_conf_proto_goTypes = []interface{}{
(*Bootstrap)(nil), // 0: kratos.internal.conf.Bootstrap
(*Server)(nil), // 1: kratos.internal.conf.Server
(*Data)(nil), // 2: kratos.internal.conf.Data
(*Server_HTTP)(nil), // 3: kratos.internal.conf.Server.HTTP
(*Server_GRPC)(nil), // 4: kratos.internal.conf.Server.GRPC
(*Data_Database)(nil), // 5: kratos.internal.conf.Data.Database
(*Data_Redis)(nil), // 6: kratos.internal.conf.Data.Redis
(*duration.Duration)(nil), // 7: google.protobuf.Duration
var file_internal_conf_conf_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_internal_conf_conf_proto_goTypes = []interface{}{
(*Bootstrap)(nil), // 0: kratos.internal.conf.Bootstrap
(*Server)(nil), // 1: kratos.internal.conf.Server
(*Data)(nil), // 2: kratos.internal.conf.Data
(*Server_HTTP)(nil), // 3: kratos.internal.conf.Server.HTTP
(*Server_GRPC)(nil), // 4: kratos.internal.conf.Server.GRPC
(*Data_Database)(nil), // 5: kratos.internal.conf.Data.Database
(*Data_Redis)(nil), // 6: kratos.internal.conf.Data.Redis
(*durationpb.Duration)(nil), // 7: google.protobuf.Duration
}
var file_conf_proto_depIdxs = []int32{
var file_internal_conf_conf_proto_depIdxs = []int32{
1, // 0: kratos.internal.conf.Bootstrap.server:type_name -> kratos.internal.conf.Server
2, // 1: kratos.internal.conf.Bootstrap.data:type_name -> kratos.internal.conf.Data
3, // 2: kratos.internal.conf.Server.http:type_name -> kratos.internal.conf.Server.HTTP
@ -578,13 +577,13 @@ var file_conf_proto_depIdxs = []int32{
0, // [0:11] is the sub-list for field type_name
}
func init() { file_conf_proto_init() }
func file_conf_proto_init() {
if File_conf_proto != nil {
func init() { file_internal_conf_conf_proto_init() }
func file_internal_conf_conf_proto_init() {
if File_internal_conf_conf_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_conf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_internal_conf_conf_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Bootstrap); i {
case 0:
return &v.state
@ -596,7 +595,7 @@ func file_conf_proto_init() {
return nil
}
}
file_conf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_internal_conf_conf_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Server); i {
case 0:
return &v.state
@ -608,7 +607,7 @@ func file_conf_proto_init() {
return nil
}
}
file_conf_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_internal_conf_conf_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Data); i {
case 0:
return &v.state
@ -620,7 +619,7 @@ func file_conf_proto_init() {
return nil
}
}
file_conf_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
file_internal_conf_conf_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Server_HTTP); i {
case 0:
return &v.state
@ -632,7 +631,7 @@ func file_conf_proto_init() {
return nil
}
}
file_conf_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
file_internal_conf_conf_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Server_GRPC); i {
case 0:
return &v.state
@ -644,7 +643,7 @@ func file_conf_proto_init() {
return nil
}
}
file_conf_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
file_internal_conf_conf_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Data_Database); i {
case 0:
return &v.state
@ -656,7 +655,7 @@ func file_conf_proto_init() {
return nil
}
}
file_conf_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
file_internal_conf_conf_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Data_Redis); i {
case 0:
return &v.state
@ -673,18 +672,18 @@ func file_conf_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_conf_proto_rawDesc,
RawDescriptor: file_internal_conf_conf_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_conf_proto_goTypes,
DependencyIndexes: file_conf_proto_depIdxs,
MessageInfos: file_conf_proto_msgTypes,
GoTypes: file_internal_conf_conf_proto_goTypes,
DependencyIndexes: file_internal_conf_conf_proto_depIdxs,
MessageInfos: file_internal_conf_conf_proto_msgTypes,
}.Build()
File_conf_proto = out.File
file_conf_proto_rawDesc = nil
file_conf_proto_goTypes = nil
file_conf_proto_depIdxs = nil
File_internal_conf_conf_proto = out.File
file_internal_conf_conf_proto_rawDesc = nil
file_internal_conf_conf_proto_goTypes = nil
file_internal_conf_conf_proto_depIdxs = nil
}

@ -1,7 +1,7 @@
syntax = "proto3";
package kratos.internal.conf;
option go_package = ".;conf";
option go_package = "github.com/go-kratos/kratos/examples/blog/internal/conf;conf";
import "google/protobuf/duration.proto";
@ -41,4 +41,4 @@ message Data {
}
Database database = 1;
Redis redis = 2;
}
}

@ -29,7 +29,7 @@ func callHTTP() {
if err != nil {
log.Fatal(err)
}
client := pb.NewGreeterHttpClient(conn)
client := pb.NewGreeterHTTPClient(conn)
reply, err := client.SayHello(context.Background(), &pb.HelloRequest{Name: "kratos"})
if err != nil {
log.Fatal(err)

@ -2,7 +2,7 @@
// versions:
// protoc-gen-go v1.26.0
// protoc v3.14.0
// source: helloworld.proto
// source: helloworld/helloworld.proto
package helloworld
@ -33,7 +33,7 @@ type HelloRequest struct {
func (x *HelloRequest) Reset() {
*x = HelloRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_helloworld_proto_msgTypes[0]
mi := &file_helloworld_helloworld_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -46,7 +46,7 @@ func (x *HelloRequest) String() string {
func (*HelloRequest) ProtoMessage() {}
func (x *HelloRequest) ProtoReflect() protoreflect.Message {
mi := &file_helloworld_proto_msgTypes[0]
mi := &file_helloworld_helloworld_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -59,7 +59,7 @@ func (x *HelloRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) Descriptor() ([]byte, []int) {
return file_helloworld_proto_rawDescGZIP(), []int{0}
return file_helloworld_helloworld_proto_rawDescGZIP(), []int{0}
}
func (x *HelloRequest) GetName() string {
@ -81,7 +81,7 @@ type HelloReply struct {
func (x *HelloReply) Reset() {
*x = HelloReply{}
if protoimpl.UnsafeEnabled {
mi := &file_helloworld_proto_msgTypes[1]
mi := &file_helloworld_helloworld_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -94,7 +94,7 @@ func (x *HelloReply) String() string {
func (*HelloReply) ProtoMessage() {}
func (x *HelloReply) ProtoReflect() protoreflect.Message {
mi := &file_helloworld_proto_msgTypes[1]
mi := &file_helloworld_helloworld_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -107,7 +107,7 @@ func (x *HelloReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) Descriptor() ([]byte, []int) {
return file_helloworld_proto_rawDescGZIP(), []int{1}
return file_helloworld_helloworld_proto_rawDescGZIP(), []int{1}
}
func (x *HelloReply) GetMessage() string {
@ -117,49 +117,49 @@ func (x *HelloReply) GetMessage() string {
return ""
}
var File_helloworld_proto protoreflect.FileDescriptor
var file_helloworld_proto_rawDesc = []byte{
0x0a, 0x10, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x0a, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x1a, 0x1c,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x0c,
0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x22, 0x26, 0x0a, 0x0a, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18,
0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0x63, 0x0a, 0x07, 0x47, 0x72, 0x65, 0x65,
0x74, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12,
0x18, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x48, 0x65, 0x6c,
0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x68, 0x65, 0x6c, 0x6c,
0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 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, 0x3c, 0x5a,
0x3a, 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, 0x2f, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64,
0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
var File_helloworld_helloworld_proto protoreflect.FileDescriptor
var file_helloworld_helloworld_proto_rawDesc = []byte{
0x0a, 0x1b, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2f, 0x68, 0x65, 0x6c,
0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x68,
0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x0c, 0x48, 0x65, 0x6c, 0x6c, 0x6f,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x26, 0x0a, 0x0a, 0x48,
0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x32, 0x63, 0x0a, 0x07, 0x47, 0x72, 0x65, 0x65, 0x74, 0x65, 0x72, 0x12, 0x58,
0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x18, 0x2e, 0x68, 0x65, 0x6c,
0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c,
0x64, 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, 0x3c, 0x5a, 0x3a, 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, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73,
0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x2f, 0x68, 0x65, 0x6c, 0x6c,
0x6f, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_helloworld_proto_rawDescOnce sync.Once
file_helloworld_proto_rawDescData = file_helloworld_proto_rawDesc
file_helloworld_helloworld_proto_rawDescOnce sync.Once
file_helloworld_helloworld_proto_rawDescData = file_helloworld_helloworld_proto_rawDesc
)
func file_helloworld_proto_rawDescGZIP() []byte {
file_helloworld_proto_rawDescOnce.Do(func() {
file_helloworld_proto_rawDescData = protoimpl.X.CompressGZIP(file_helloworld_proto_rawDescData)
func file_helloworld_helloworld_proto_rawDescGZIP() []byte {
file_helloworld_helloworld_proto_rawDescOnce.Do(func() {
file_helloworld_helloworld_proto_rawDescData = protoimpl.X.CompressGZIP(file_helloworld_helloworld_proto_rawDescData)
})
return file_helloworld_proto_rawDescData
return file_helloworld_helloworld_proto_rawDescData
}
var file_helloworld_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_helloworld_proto_goTypes = []interface{}{
var file_helloworld_helloworld_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_helloworld_helloworld_proto_goTypes = []interface{}{
(*HelloRequest)(nil), // 0: helloworld.HelloRequest
(*HelloReply)(nil), // 1: helloworld.HelloReply
}
var file_helloworld_proto_depIdxs = []int32{
var file_helloworld_helloworld_proto_depIdxs = []int32{
0, // 0: helloworld.Greeter.SayHello:input_type -> helloworld.HelloRequest
1, // 1: helloworld.Greeter.SayHello:output_type -> helloworld.HelloReply
1, // [1:2] is the sub-list for method output_type
@ -169,13 +169,13 @@ var file_helloworld_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for field type_name
}
func init() { file_helloworld_proto_init() }
func file_helloworld_proto_init() {
if File_helloworld_proto != nil {
func init() { file_helloworld_helloworld_proto_init() }
func file_helloworld_helloworld_proto_init() {
if File_helloworld_helloworld_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_helloworld_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_helloworld_helloworld_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HelloRequest); i {
case 0:
return &v.state
@ -187,7 +187,7 @@ func file_helloworld_proto_init() {
return nil
}
}
file_helloworld_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_helloworld_helloworld_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HelloReply); i {
case 0:
return &v.state
@ -204,18 +204,18 @@ func file_helloworld_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_helloworld_proto_rawDesc,
RawDescriptor: file_helloworld_helloworld_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_helloworld_proto_goTypes,
DependencyIndexes: file_helloworld_proto_depIdxs,
MessageInfos: file_helloworld_proto_msgTypes,
GoTypes: file_helloworld_helloworld_proto_goTypes,
DependencyIndexes: file_helloworld_helloworld_proto_depIdxs,
MessageInfos: file_helloworld_helloworld_proto_msgTypes,
}.Build()
File_helloworld_proto = out.File
file_helloworld_proto_rawDesc = nil
file_helloworld_proto_goTypes = nil
file_helloworld_proto_depIdxs = nil
File_helloworld_helloworld_proto = out.File
file_helloworld_helloworld_proto_rawDesc = nil
file_helloworld_helloworld_proto_goTypes = nil
file_helloworld_helloworld_proto_depIdxs = nil
}

@ -99,5 +99,5 @@ var Greeter_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "helloworld.proto",
Metadata: "helloworld/helloworld.proto",
}

@ -62,19 +62,19 @@ func NewGreeterHandler(srv GreeterHandler, opts ...http1.HandleOption) http.Hand
return r
}
type GreeterHttpClient interface {
type GreeterHTTPClient interface {
SayHello(ctx context.Context, req *HelloRequest, opts ...http1.CallOption) (rsp *HelloReply, err error)
}
type GreeterHttpClientImpl struct {
type GreeterHTTPClientImpl struct {
cc *http1.Client
}
func NewGreeterHttpClient(client *http1.Client) GreeterHttpClient {
return &GreeterHttpClientImpl{client}
func NewGreeterHTTPClient(client *http1.Client) GreeterHTTPClient {
return &GreeterHTTPClientImpl{client}
}
func (c *GreeterHttpClientImpl) SayHello(ctx context.Context, in *HelloRequest, opts ...http1.CallOption) (out *HelloReply, err error) {
func (c *GreeterHTTPClientImpl) SayHello(ctx context.Context, in *HelloRequest, opts ...http1.CallOption) (out *HelloReply, err error) {
path := binding.EncodePath("GET", "/helloworld/{name}", in)
out = &HelloReply{}

@ -287,7 +287,7 @@ func NewEchoServiceHandler(srv EchoServiceHandler, opts ...http1.HandleOption) h
return r
}
type EchoServiceHttpClient interface {
type EchoServiceHTTPClient interface {
Echo(ctx context.Context, req *SimpleMessage, opts ...http1.CallOption) (rsp *SimpleMessage, err error)
EchoBody(ctx context.Context, req *SimpleMessage, opts ...http1.CallOption) (rsp *SimpleMessage, err error)
@ -299,15 +299,15 @@ type EchoServiceHttpClient interface {
EchoResponseBody(ctx context.Context, req *DynamicMessageUpdate, opts ...http1.CallOption) (rsp *DynamicMessageUpdate, err error)
}
type EchoServiceHttpClientImpl struct {
type EchoServiceHTTPClientImpl struct {
cc *http1.Client
}
func NewEchoServiceHttpClient(client *http1.Client) EchoServiceHttpClient {
return &EchoServiceHttpClientImpl{client}
func NewEchoServiceHTTPClient(client *http1.Client) EchoServiceHTTPClient {
return &EchoServiceHTTPClientImpl{client}
}
func (c *EchoServiceHttpClientImpl) Echo(ctx context.Context, in *SimpleMessage, opts ...http1.CallOption) (out *SimpleMessage, err error) {
func (c *EchoServiceHTTPClientImpl) Echo(ctx context.Context, in *SimpleMessage, opts ...http1.CallOption) (out *SimpleMessage, err error) {
path := binding.EncodePath("POST", "/v1/example/echo/{id}", in)
out = &SimpleMessage{}
@ -319,7 +319,7 @@ func (c *EchoServiceHttpClientImpl) Echo(ctx context.Context, in *SimpleMessage,
return
}
func (c *EchoServiceHttpClientImpl) EchoBody(ctx context.Context, in *SimpleMessage, opts ...http1.CallOption) (out *SimpleMessage, err error) {
func (c *EchoServiceHTTPClientImpl) EchoBody(ctx context.Context, in *SimpleMessage, opts ...http1.CallOption) (out *SimpleMessage, err error) {
path := binding.EncodePath("POST", "/v1/example/echo_body", in)
out = &SimpleMessage{}
@ -331,7 +331,7 @@ func (c *EchoServiceHttpClientImpl) EchoBody(ctx context.Context, in *SimpleMess
return
}
func (c *EchoServiceHttpClientImpl) EchoDelete(ctx context.Context, in *SimpleMessage, opts ...http1.CallOption) (out *SimpleMessage, err error) {
func (c *EchoServiceHTTPClientImpl) EchoDelete(ctx context.Context, in *SimpleMessage, opts ...http1.CallOption) (out *SimpleMessage, err error) {
path := binding.EncodePath("DELETE", "/v1/example/echo_delete/{id}/{num}", in)
out = &SimpleMessage{}
@ -343,7 +343,7 @@ func (c *EchoServiceHttpClientImpl) EchoDelete(ctx context.Context, in *SimpleMe
return
}
func (c *EchoServiceHttpClientImpl) EchoPatch(ctx context.Context, in *DynamicMessageUpdate, opts ...http1.CallOption) (out *DynamicMessageUpdate, err error) {
func (c *EchoServiceHTTPClientImpl) EchoPatch(ctx context.Context, in *DynamicMessageUpdate, opts ...http1.CallOption) (out *DynamicMessageUpdate, err error) {
path := binding.EncodePath("PATCH", "/v1/example/echo_patch", in)
out = &DynamicMessageUpdate{}
@ -355,7 +355,7 @@ func (c *EchoServiceHttpClientImpl) EchoPatch(ctx context.Context, in *DynamicMe
return
}
func (c *EchoServiceHttpClientImpl) EchoResponseBody(ctx context.Context, in *DynamicMessageUpdate, opts ...http1.CallOption) (out *DynamicMessageUpdate, err error) {
func (c *EchoServiceHTTPClientImpl) EchoResponseBody(ctx context.Context, in *DynamicMessageUpdate, opts ...http1.CallOption) (out *DynamicMessageUpdate, err error) {
path := binding.EncodePath("POST", "/v1/example/echo_response_body", in)
out = &DynamicMessageUpdate{}

@ -37,7 +37,7 @@ func (s *echoService) EchoResponseBody(ctx context.Context, m *DynamicMessageUpd
}
type echoClient struct {
client EchoServiceHttpClient
client EchoServiceHTTPClient
}
// post: /v1/example/echo/{id}
@ -96,7 +96,7 @@ func testEchoClient(t *testing.T, addr string) {
}
cc, _ := tr.NewClient(context.Background(), tr.WithEndpoint(addr))
cli := &echoClient{client: NewEchoServiceHttpClient(cc)}
cli := &echoClient{client: NewEchoServiceHTTPClient(cc)}
if out, err = cli.Echo(context.Background(), in); err != nil {
t.Fatal(err)

@ -32,13 +32,13 @@ func NewStreamServiceHandler(srv StreamServiceHandler, opts ...http1.HandleOptio
return r
}
type StreamServiceHttpClient interface {
type StreamServiceHTTPClient interface {
}
type StreamServiceHttpClientImpl struct {
type StreamServiceHTTPClientImpl struct {
cc *http1.Client
}
func NewStreamServiceHttpClient(client *http1.Client) StreamServiceHttpClient {
return &StreamServiceHttpClientImpl{client}
func NewStreamServiceHTTPClient(client *http1.Client) StreamServiceHTTPClient {
return &StreamServiceHTTPClientImpl{client}
}

@ -55,7 +55,7 @@ func callHTTP(cli *api.Client) {
log.Fatal(err)
}
time.Sleep(time.Millisecond * 250)
client := helloworld.NewGreeterHttpClient(conn)
client := helloworld.NewGreeterHTTPClient(conn)
reply, err := client.SayHello(context.Background(), &helloworld.HelloRequest{Name: "kratos_http"})
if err != nil {
log.Fatal(err)

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.13.0
// source: message.proto
// protoc v3.14.0
// source: message/message.proto
package v1
@ -33,7 +33,7 @@ type GetUserMessageRequest struct {
func (x *GetUserMessageRequest) Reset() {
*x = GetUserMessageRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_message_proto_msgTypes[0]
mi := &file_message_message_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -46,7 +46,7 @@ func (x *GetUserMessageRequest) String() string {
func (*GetUserMessageRequest) ProtoMessage() {}
func (x *GetUserMessageRequest) ProtoReflect() protoreflect.Message {
mi := &file_message_proto_msgTypes[0]
mi := &file_message_message_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -59,7 +59,7 @@ func (x *GetUserMessageRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUserMessageRequest.ProtoReflect.Descriptor instead.
func (*GetUserMessageRequest) Descriptor() ([]byte, []int) {
return file_message_proto_rawDescGZIP(), []int{0}
return file_message_message_proto_rawDescGZIP(), []int{0}
}
func (x *GetUserMessageRequest) GetId() int64 {
@ -87,7 +87,7 @@ type GetUserMessageReply struct {
func (x *GetUserMessageReply) Reset() {
*x = GetUserMessageReply{}
if protoimpl.UnsafeEnabled {
mi := &file_message_proto_msgTypes[1]
mi := &file_message_message_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -100,7 +100,7 @@ func (x *GetUserMessageReply) String() string {
func (*GetUserMessageReply) ProtoMessage() {}
func (x *GetUserMessageReply) ProtoReflect() protoreflect.Message {
mi := &file_message_proto_msgTypes[1]
mi := &file_message_message_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -113,7 +113,7 @@ func (x *GetUserMessageReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetUserMessageReply.ProtoReflect.Descriptor instead.
func (*GetUserMessageReply) Descriptor() ([]byte, []int) {
return file_message_proto_rawDescGZIP(), []int{1}
return file_message_message_proto_rawDescGZIP(), []int{1}
}
func (x *GetUserMessageReply) GetMessages() []*Message {
@ -134,7 +134,7 @@ type Message struct {
func (x *Message) Reset() {
*x = Message{}
if protoimpl.UnsafeEnabled {
mi := &file_message_proto_msgTypes[2]
mi := &file_message_message_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -147,7 +147,7 @@ func (x *Message) String() string {
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_message_proto_msgTypes[2]
mi := &file_message_message_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -160,7 +160,7 @@ func (x *Message) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_message_proto_rawDescGZIP(), []int{2}
return file_message_message_proto_rawDescGZIP(), []int{2}
}
func (x *Message) GetContent() string {
@ -170,61 +170,61 @@ func (x *Message) GetContent() string {
return ""
}
var File_message_proto protoreflect.FileDescriptor
var file_message_proto_rawDesc = []byte{
0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x0e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a,
0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f,
0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a,
0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x13,
0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65,
0x70, 0x6c, 0x79, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x23, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x32, 0x99, 0x01,
0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
0x12, 0x86, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69,
0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55,
0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x51, 0x0a, 0x0e, 0x61, 0x70, 0x69,
0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x3d, 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, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70,
0x6c, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x33,
var File_message_message_proto protoreflect.FileDescriptor
var file_message_message_proto_rawDesc = []byte{
0x0a, 0x15, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3d, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14,
0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x22, 0x4a, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x33, 0x0a, 0x08, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73,
0x22, 0x23, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x32, 0x99, 0x01, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x0e, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70,
0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74,
0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61,
0x67, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x12,
0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x75, 0x73, 0x65,
0x72, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x3a, 0x01,
0x2a, 0x42, 0x51, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x3d, 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, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x74, 0x72, 0x61, 0x63,
0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x76,
0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_message_proto_rawDescOnce sync.Once
file_message_proto_rawDescData = file_message_proto_rawDesc
file_message_message_proto_rawDescOnce sync.Once
file_message_message_proto_rawDescData = file_message_message_proto_rawDesc
)
func file_message_proto_rawDescGZIP() []byte {
file_message_proto_rawDescOnce.Do(func() {
file_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_proto_rawDescData)
func file_message_message_proto_rawDescGZIP() []byte {
file_message_message_proto_rawDescOnce.Do(func() {
file_message_message_proto_rawDescData = protoimpl.X.CompressGZIP(file_message_message_proto_rawDescData)
})
return file_message_proto_rawDescData
return file_message_message_proto_rawDescData
}
var file_message_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_message_proto_goTypes = []interface{}{
var file_message_message_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_message_message_proto_goTypes = []interface{}{
(*GetUserMessageRequest)(nil), // 0: api.message.v1.GetUserMessageRequest
(*GetUserMessageReply)(nil), // 1: api.message.v1.GetUserMessageReply
(*Message)(nil), // 2: api.message.v1.Message
}
var file_message_proto_depIdxs = []int32{
var file_message_message_proto_depIdxs = []int32{
2, // 0: api.message.v1.GetUserMessageReply.messages:type_name -> api.message.v1.Message
0, // 1: api.message.v1.MessageService.GetUserMessage:input_type -> api.message.v1.GetUserMessageRequest
1, // 2: api.message.v1.MessageService.GetUserMessage:output_type -> api.message.v1.GetUserMessageReply
@ -235,13 +235,13 @@ var file_message_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_message_proto_init() }
func file_message_proto_init() {
if File_message_proto != nil {
func init() { file_message_message_proto_init() }
func file_message_message_proto_init() {
if File_message_message_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_message_message_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserMessageRequest); i {
case 0:
return &v.state
@ -253,7 +253,7 @@ func file_message_proto_init() {
return nil
}
}
file_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_message_message_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetUserMessageReply); i {
case 0:
return &v.state
@ -265,7 +265,7 @@ func file_message_proto_init() {
return nil
}
}
file_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_message_message_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Message); i {
case 0:
return &v.state
@ -282,18 +282,18 @@ func file_message_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_message_proto_rawDesc,
RawDescriptor: file_message_message_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_message_proto_goTypes,
DependencyIndexes: file_message_proto_depIdxs,
MessageInfos: file_message_proto_msgTypes,
GoTypes: file_message_message_proto_goTypes,
DependencyIndexes: file_message_message_proto_depIdxs,
MessageInfos: file_message_message_proto_msgTypes,
}.Build()
File_message_proto = out.File
file_message_proto_rawDesc = nil
file_message_proto_goTypes = nil
file_message_proto_depIdxs = nil
File_message_message_proto = out.File
file_message_message_proto_rawDesc = nil
file_message_message_proto_goTypes = nil
file_message_message_proto_depIdxs = nil
}

@ -97,5 +97,5 @@ var MessageService_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "message.proto",
Metadata: "message/message.proto",
}

@ -1,8 +1,8 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.26.0
// protoc v3.13.0
// source: user.proto
// protoc v3.14.0
// source: user/user.proto
package v1
@ -32,7 +32,7 @@ type GetMyMessagesRequest struct {
func (x *GetMyMessagesRequest) Reset() {
*x = GetMyMessagesRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_user_proto_msgTypes[0]
mi := &file_user_user_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -45,7 +45,7 @@ func (x *GetMyMessagesRequest) String() string {
func (*GetMyMessagesRequest) ProtoMessage() {}
func (x *GetMyMessagesRequest) ProtoReflect() protoreflect.Message {
mi := &file_user_proto_msgTypes[0]
mi := &file_user_user_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -58,7 +58,7 @@ func (x *GetMyMessagesRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetMyMessagesRequest.ProtoReflect.Descriptor instead.
func (*GetMyMessagesRequest) Descriptor() ([]byte, []int) {
return file_user_proto_rawDescGZIP(), []int{0}
return file_user_user_proto_rawDescGZIP(), []int{0}
}
func (x *GetMyMessagesRequest) GetCount() int64 {
@ -79,7 +79,7 @@ type GetMyMessagesReply struct {
func (x *GetMyMessagesReply) Reset() {
*x = GetMyMessagesReply{}
if protoimpl.UnsafeEnabled {
mi := &file_user_proto_msgTypes[1]
mi := &file_user_user_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -92,7 +92,7 @@ func (x *GetMyMessagesReply) String() string {
func (*GetMyMessagesReply) ProtoMessage() {}
func (x *GetMyMessagesReply) ProtoReflect() protoreflect.Message {
mi := &file_user_proto_msgTypes[1]
mi := &file_user_user_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -105,7 +105,7 @@ func (x *GetMyMessagesReply) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetMyMessagesReply.ProtoReflect.Descriptor instead.
func (*GetMyMessagesReply) Descriptor() ([]byte, []int) {
return file_user_proto_rawDescGZIP(), []int{1}
return file_user_user_proto_rawDescGZIP(), []int{1}
}
func (x *GetMyMessagesReply) GetMessages() []*Message {
@ -126,7 +126,7 @@ type Message struct {
func (x *Message) Reset() {
*x = Message{}
if protoimpl.UnsafeEnabled {
mi := &file_user_proto_msgTypes[2]
mi := &file_user_user_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@ -139,7 +139,7 @@ func (x *Message) String() string {
func (*Message) ProtoMessage() {}
func (x *Message) ProtoReflect() protoreflect.Message {
mi := &file_user_proto_msgTypes[2]
mi := &file_user_user_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@ -152,7 +152,7 @@ func (x *Message) ProtoReflect() protoreflect.Message {
// Deprecated: Use Message.ProtoReflect.Descriptor instead.
func (*Message) Descriptor() ([]byte, []int) {
return file_user_proto_rawDescGZIP(), []int{2}
return file_user_user_proto_rawDescGZIP(), []int{2}
}
func (x *Message) GetContent() string {
@ -162,58 +162,58 @@ func (x *Message) GetContent() string {
return ""
}
var File_user_proto protoreflect.FileDescriptor
var file_user_proto_rawDesc = []byte{
0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x61, 0x70,
0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4d, 0x79,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x46, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x4d, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x30, 0x0a, 0x08, 0x6d,
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, 0x23, 0x0a,
0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74,
0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
0x6e, 0x74, 0x32, 0x84, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x7c, 0x0a, 0x0d, 0x47,
0x65, 0x74, 0x4d, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79,
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,
var File_user_user_proto protoreflect.FileDescriptor
var file_user_user_proto_rawDesc = []byte{
0x0a, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x1a, 0x1c,
0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2c, 0x0a, 0x14,
0x47, 0x65, 0x74, 0x4d, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x46, 0x0a, 0x12, 0x47, 0x65,
0x74, 0x4d, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73,
0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2f, 0x7b,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x55, 0x0a, 0x0b, 0x61, 0x70, 0x69,
0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a, 0x44, 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, 0x2f, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73,
0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x67, 0x72, 0x70,
0x63, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x12, 0x30, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31,
0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x73, 0x22, 0x23, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a,
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x32, 0x84, 0x01, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72,
0x12, 0x7c, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
0x73, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e,
0x47, 0x65, 0x74, 0x4d, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e,
0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1c, 0x2f,
0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x67, 0x65, 0x74, 0x2f, 0x6d, 0x65, 0x73, 0x73,
0x61, 0x67, 0x65, 0x2f, 0x7b, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x55,
0x0a, 0x0b, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x50, 0x01, 0x5a,
0x44, 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, 0x2f, 0x65, 0x78, 0x61,
0x6d, 0x70, 0x6c, 0x65, 0x73, 0x2f, 0x6b, 0x72, 0x61, 0x74, 0x6f, 0x73, 0x2d, 0x68, 0x74, 0x74,
0x70, 0x2d, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f,
0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_user_proto_rawDescOnce sync.Once
file_user_proto_rawDescData = file_user_proto_rawDesc
file_user_user_proto_rawDescOnce sync.Once
file_user_user_proto_rawDescData = file_user_user_proto_rawDesc
)
func file_user_proto_rawDescGZIP() []byte {
file_user_proto_rawDescOnce.Do(func() {
file_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_proto_rawDescData)
func file_user_user_proto_rawDescGZIP() []byte {
file_user_user_proto_rawDescOnce.Do(func() {
file_user_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_user_user_proto_rawDescData)
})
return file_user_proto_rawDescData
return file_user_user_proto_rawDescData
}
var file_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_user_proto_goTypes = []interface{}{
var file_user_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_user_user_proto_goTypes = []interface{}{
(*GetMyMessagesRequest)(nil), // 0: api.user.v1.GetMyMessagesRequest
(*GetMyMessagesReply)(nil), // 1: api.user.v1.GetMyMessagesReply
(*Message)(nil), // 2: api.user.v1.Message
}
var file_user_proto_depIdxs = []int32{
var file_user_user_proto_depIdxs = []int32{
2, // 0: api.user.v1.GetMyMessagesReply.messages:type_name -> api.user.v1.Message
0, // 1: api.user.v1.User.GetMyMessages:input_type -> api.user.v1.GetMyMessagesRequest
1, // 2: api.user.v1.User.GetMyMessages:output_type -> api.user.v1.GetMyMessagesReply
@ -224,13 +224,13 @@ var file_user_proto_depIdxs = []int32{
0, // [0:1] is the sub-list for field type_name
}
func init() { file_user_proto_init() }
func file_user_proto_init() {
if File_user_proto != nil {
func init() { file_user_user_proto_init() }
func file_user_user_proto_init() {
if File_user_user_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
file_user_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetMyMessagesRequest); i {
case 0:
return &v.state
@ -242,7 +242,7 @@ func file_user_proto_init() {
return nil
}
}
file_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
file_user_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetMyMessagesReply); i {
case 0:
return &v.state
@ -254,7 +254,7 @@ func file_user_proto_init() {
return nil
}
}
file_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
file_user_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Message); i {
case 0:
return &v.state
@ -271,18 +271,18 @@ func file_user_proto_init() {
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_user_proto_rawDesc,
RawDescriptor: file_user_user_proto_rawDesc,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_user_proto_goTypes,
DependencyIndexes: file_user_proto_depIdxs,
MessageInfos: file_user_proto_msgTypes,
GoTypes: file_user_user_proto_goTypes,
DependencyIndexes: file_user_user_proto_depIdxs,
MessageInfos: file_user_user_proto_msgTypes,
}.Build()
File_user_proto = out.File
file_user_proto_rawDesc = nil
file_user_proto_goTypes = nil
file_user_proto_depIdxs = nil
File_user_user_proto = out.File
file_user_user_proto_rawDesc = nil
file_user_user_proto_goTypes = nil
file_user_user_proto_depIdxs = nil
}

@ -97,5 +97,5 @@ var User_ServiceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
Metadata: "user.proto",
Metadata: "user/user.proto",
}

Loading…
Cancel
Save