From 87348d1908c5781ab0e2b77a1dea6dd67096871d Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 27 Jan 2021 14:47:22 +0000 Subject: [PATCH] update blog/posts and go mod --- blog/handler/blog.go | 14 + blog/proto/blog.pb.go | 343 +++++++------- blog/proto/blog.pb.micro.go | 21 + blog/proto/blog.proto | 15 +- go.mod | 4 +- go.sum | 2 + posts/proto/posts.pb.go | 887 +++++++++++++----------------------- posts/proto/posts.proto | 1 - 8 files changed, 545 insertions(+), 742 deletions(-) diff --git a/blog/handler/blog.go b/blog/handler/blog.go index 42ce602..b7128ec 100644 --- a/blog/handler/blog.go +++ b/blog/handler/blog.go @@ -39,3 +39,17 @@ func (e *Blog) Latest(ctx context.Context, req *proto.LatestRequest, rsp *proto. return nil } + +func (e *Blog) Posts(ctx context.Context, req *proto.PostsRequest, rsp *proto.PostsResponse) error { + resp, err := e.ps.Query(ctx, &posts.QueryRequest{ + Limit: req.Limit, + Offset: req.Offset, + }) + + if err != nil { + return err + } + + rsp.Posts = resp.Posts + return nil +} diff --git a/blog/proto/blog.pb.go b/blog/proto/blog.pb.go index 066875d..65b6671 100644 --- a/blog/proto/blog.pb.go +++ b/blog/proto/blog.pb.go @@ -1,211 +1,206 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.6.1 // source: proto/blog.proto package blog import ( + fmt "fmt" proto "github.com/golang/protobuf/proto" proto1 "github.com/micro/services/posts/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + math "math" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type LatestRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *LatestRequest) Reset() { - *x = LatestRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_blog_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LatestRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LatestRequest) ProtoMessage() {} - -func (x *LatestRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_blog_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LatestRequest.ProtoReflect.Descriptor instead. +func (m *LatestRequest) Reset() { *m = LatestRequest{} } +func (m *LatestRequest) String() string { return proto.CompactTextString(m) } +func (*LatestRequest) ProtoMessage() {} func (*LatestRequest) Descriptor() ([]byte, []int) { - return file_proto_blog_proto_rawDescGZIP(), []int{0} + return fileDescriptor_fc5203cdc85000bc, []int{0} } +func (m *LatestRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LatestRequest.Unmarshal(m, b) +} +func (m *LatestRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LatestRequest.Marshal(b, m, deterministic) +} +func (m *LatestRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LatestRequest.Merge(m, src) +} +func (m *LatestRequest) XXX_Size() int { + return xxx_messageInfo_LatestRequest.Size(m) +} +func (m *LatestRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LatestRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LatestRequest proto.InternalMessageInfo + type LatestResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Latest *proto1.Post `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"` + Latest *proto1.Post `protobuf:"bytes,1,opt,name=latest,proto3" json:"latest,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *LatestResponse) Reset() { - *x = LatestResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_blog_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LatestResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LatestResponse) ProtoMessage() {} - -func (x *LatestResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_blog_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LatestResponse.ProtoReflect.Descriptor instead. +func (m *LatestResponse) Reset() { *m = LatestResponse{} } +func (m *LatestResponse) String() string { return proto.CompactTextString(m) } +func (*LatestResponse) ProtoMessage() {} func (*LatestResponse) Descriptor() ([]byte, []int) { - return file_proto_blog_proto_rawDescGZIP(), []int{1} + return fileDescriptor_fc5203cdc85000bc, []int{1} } -func (x *LatestResponse) GetLatest() *proto1.Post { - if x != nil { - return x.Latest +func (m *LatestResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LatestResponse.Unmarshal(m, b) +} +func (m *LatestResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LatestResponse.Marshal(b, m, deterministic) +} +func (m *LatestResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LatestResponse.Merge(m, src) +} +func (m *LatestResponse) XXX_Size() int { + return xxx_messageInfo_LatestResponse.Size(m) +} +func (m *LatestResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LatestResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LatestResponse proto.InternalMessageInfo + +func (m *LatestResponse) GetLatest() *proto1.Post { + if m != nil { + return m.Latest } return nil } -var File_proto_blog_proto protoreflect.FileDescriptor - -var file_proto_blog_proto_rawDesc = []byte{ - 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x04, 0x62, 0x6c, 0x6f, 0x67, 0x1a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x67, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0x35, 0x0a, 0x0e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x50, 0x6f, 0x73, 0x74, - 0x52, 0x06, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x32, 0x3d, 0x0a, 0x04, 0x42, 0x6c, 0x6f, 0x67, - 0x12, 0x35, 0x0a, 0x06, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x12, 0x13, 0x2e, 0x62, 0x6c, 0x6f, - 0x67, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x14, 0x2e, 0x62, 0x6c, 0x6f, 0x67, 0x2e, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +type PostsRequest struct { + Limit int64 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` + Offset int64 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -var ( - file_proto_blog_proto_rawDescOnce sync.Once - file_proto_blog_proto_rawDescData = file_proto_blog_proto_rawDesc -) - -func file_proto_blog_proto_rawDescGZIP() []byte { - file_proto_blog_proto_rawDescOnce.Do(func() { - file_proto_blog_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_blog_proto_rawDescData) - }) - return file_proto_blog_proto_rawDescData +func (m *PostsRequest) Reset() { *m = PostsRequest{} } +func (m *PostsRequest) String() string { return proto.CompactTextString(m) } +func (*PostsRequest) ProtoMessage() {} +func (*PostsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fc5203cdc85000bc, []int{2} } -var file_proto_blog_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_proto_blog_proto_goTypes = []interface{}{ - (*LatestRequest)(nil), // 0: blog.LatestRequest - (*LatestResponse)(nil), // 1: blog.LatestResponse - (*proto1.Post)(nil), // 2: posts.Post +func (m *PostsRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PostsRequest.Unmarshal(m, b) } -var file_proto_blog_proto_depIdxs = []int32{ - 2, // 0: blog.LatestResponse.latest:type_name -> posts.Post - 0, // 1: blog.Blog.Latest:input_type -> blog.LatestRequest - 1, // 2: blog.Blog.Latest:output_type -> blog.LatestResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name +func (m *PostsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PostsRequest.Marshal(b, m, deterministic) +} +func (m *PostsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PostsRequest.Merge(m, src) +} +func (m *PostsRequest) XXX_Size() int { + return xxx_messageInfo_PostsRequest.Size(m) +} +func (m *PostsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PostsRequest.DiscardUnknown(m) } -func init() { file_proto_blog_proto_init() } -func file_proto_blog_proto_init() { - if File_proto_blog_proto != nil { - return +var xxx_messageInfo_PostsRequest proto.InternalMessageInfo + +func (m *PostsRequest) GetLimit() int64 { + if m != nil { + return m.Limit } - if !protoimpl.UnsafeEnabled { - file_proto_blog_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LatestRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_blog_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LatestResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_blog_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_blog_proto_goTypes, - DependencyIndexes: file_proto_blog_proto_depIdxs, - MessageInfos: file_proto_blog_proto_msgTypes, - }.Build() - File_proto_blog_proto = out.File - file_proto_blog_proto_rawDesc = nil - file_proto_blog_proto_goTypes = nil - file_proto_blog_proto_depIdxs = nil + return 0 +} + +func (m *PostsRequest) GetOffset() int64 { + if m != nil { + return m.Offset + } + return 0 +} + +type PostsResponse struct { + Posts []*proto1.Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PostsResponse) Reset() { *m = PostsResponse{} } +func (m *PostsResponse) String() string { return proto.CompactTextString(m) } +func (*PostsResponse) ProtoMessage() {} +func (*PostsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fc5203cdc85000bc, []int{3} +} + +func (m *PostsResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PostsResponse.Unmarshal(m, b) +} +func (m *PostsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PostsResponse.Marshal(b, m, deterministic) +} +func (m *PostsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PostsResponse.Merge(m, src) +} +func (m *PostsResponse) XXX_Size() int { + return xxx_messageInfo_PostsResponse.Size(m) +} +func (m *PostsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PostsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PostsResponse proto.InternalMessageInfo + +func (m *PostsResponse) GetPosts() []*proto1.Post { + if m != nil { + return m.Posts + } + return nil +} + +func init() { + proto.RegisterType((*LatestRequest)(nil), "blog.LatestRequest") + proto.RegisterType((*LatestResponse)(nil), "blog.LatestResponse") + proto.RegisterType((*PostsRequest)(nil), "blog.PostsRequest") + proto.RegisterType((*PostsResponse)(nil), "blog.PostsResponse") +} + +func init() { proto.RegisterFile("proto/blog.proto", fileDescriptor_fc5203cdc85000bc) } + +var fileDescriptor_fc5203cdc85000bc = []byte{ + // 238 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x50, 0xb1, 0x4e, 0xc3, 0x30, + 0x10, 0x25, 0xb4, 0xc9, 0x70, 0xa5, 0x80, 0xae, 0x15, 0x8a, 0x32, 0x15, 0xb3, 0x30, 0xc5, 0x22, + 0xa8, 0x1b, 0x13, 0x33, 0x03, 0xca, 0x1f, 0x90, 0xc8, 0x0d, 0x96, 0x1c, 0x2e, 0xcd, 0xb9, 0x7c, + 0x3f, 0xaa, 0xcf, 0x91, 0x48, 0xb7, 0xf7, 0xde, 0xf9, 0xbd, 0x77, 0x3e, 0xb8, 0x1f, 0x46, 0xf2, + 0xa4, 0x1b, 0x47, 0x5d, 0x19, 0x20, 0x2e, 0xcf, 0xb8, 0x78, 0xe9, 0xac, 0xff, 0x3e, 0x35, 0x65, + 0x4b, 0xbd, 0xee, 0x6d, 0x3b, 0x92, 0x66, 0x33, 0xfe, 0xda, 0xd6, 0xb0, 0x1e, 0x88, 0x3d, 0x6b, + 0xf1, 0x05, 0x2c, 0x46, 0x75, 0x07, 0xeb, 0x8f, 0x2f, 0x6f, 0xd8, 0xd7, 0xe6, 0x78, 0x32, 0xec, + 0xd5, 0x1e, 0x6e, 0x27, 0x81, 0x07, 0xfa, 0x61, 0x83, 0x4f, 0x90, 0xb9, 0xa0, 0xe4, 0xc9, 0x2e, + 0x79, 0x5e, 0x55, 0xab, 0x52, 0x02, 0x3e, 0x89, 0x7d, 0x1d, 0x47, 0xea, 0x0d, 0x6e, 0xce, 0x9c, + 0x63, 0x0c, 0x6e, 0x21, 0x75, 0xb6, 0xb7, 0xe2, 0x59, 0xd4, 0x42, 0xf0, 0x01, 0x32, 0x3a, 0x1c, + 0xd8, 0xf8, 0xfc, 0x3a, 0xc8, 0x91, 0xa9, 0x0a, 0xd6, 0xd1, 0x1d, 0x3b, 0x1f, 0x21, 0x0d, 0x25, + 0x79, 0xb2, 0x5b, 0x5c, 0x56, 0xca, 0xa4, 0x3a, 0xc2, 0xf2, 0xdd, 0x51, 0x87, 0x7b, 0xc8, 0x64, + 0x61, 0xdc, 0x94, 0xe1, 0x22, 0xb3, 0xff, 0x14, 0xdb, 0xb9, 0x28, 0xf9, 0xea, 0x0a, 0x2b, 0x48, + 0x43, 0x25, 0xa2, 0x3c, 0xf8, 0xbf, 0x7d, 0xb1, 0x99, 0x69, 0x93, 0xa7, 0xc9, 0xc2, 0xcd, 0x5e, + 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x04, 0x74, 0x9b, 0x75, 0x80, 0x01, 0x00, 0x00, } diff --git a/blog/proto/blog.pb.micro.go b/blog/proto/blog.pb.micro.go index 8b2be42..98efb27 100644 --- a/blog/proto/blog.pb.micro.go +++ b/blog/proto/blog.pb.micro.go @@ -43,7 +43,10 @@ func NewBlogEndpoints() []*api.Endpoint { // Client API for Blog service type BlogService interface { + // Latest returns the latest blog post Latest(ctx context.Context, in *LatestRequest, opts ...client.CallOption) (*LatestResponse, error) + // Posts returns all the posts + Posts(ctx context.Context, in *PostsRequest, opts ...client.CallOption) (*PostsResponse, error) } type blogService struct { @@ -68,15 +71,29 @@ func (c *blogService) Latest(ctx context.Context, in *LatestRequest, opts ...cli return out, nil } +func (c *blogService) Posts(ctx context.Context, in *PostsRequest, opts ...client.CallOption) (*PostsResponse, error) { + req := c.c.NewRequest(c.name, "Blog.Posts", in) + out := new(PostsResponse) + err := c.c.Call(ctx, req, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for Blog service type BlogHandler interface { + // Latest returns the latest blog post Latest(context.Context, *LatestRequest, *LatestResponse) error + // Posts returns all the posts + Posts(context.Context, *PostsRequest, *PostsResponse) error } func RegisterBlogHandler(s server.Server, hdlr BlogHandler, opts ...server.HandlerOption) error { type blog interface { Latest(ctx context.Context, in *LatestRequest, out *LatestResponse) error + Posts(ctx context.Context, in *PostsRequest, out *PostsResponse) error } type Blog struct { blog @@ -92,3 +109,7 @@ type blogHandler struct { func (h *blogHandler) Latest(ctx context.Context, in *LatestRequest, out *LatestResponse) error { return h.BlogHandler.Latest(ctx, in, out) } + +func (h *blogHandler) Posts(ctx context.Context, in *PostsRequest, out *PostsResponse) error { + return h.BlogHandler.Posts(ctx, in, out) +} diff --git a/blog/proto/blog.proto b/blog/proto/blog.proto index 56e2002..9dd8b38 100644 --- a/blog/proto/blog.proto +++ b/blog/proto/blog.proto @@ -1,16 +1,27 @@ syntax = "proto3"; package blog; -option go_package = "proto;blog"; import "github.com/micro/services/posts/proto/posts.proto"; service Blog { + // Latest returns the latest blog post rpc Latest(LatestRequest) returns (LatestResponse) {} + // Posts returns all the posts + rpc Posts(PostsRequest) returns (PostsResponse) {}; } message LatestRequest {} message LatestResponse{ posts.Post latest = 1; -} \ No newline at end of file +} + +message PostsRequest { + int64 limit = 1; + int64 offset = 2; +} + +message PostsResponse { + repeated posts.Post posts = 1; +} diff --git a/go.mod b/go.mod index c994b8b..ece116e 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/gosimple/slug v1.9.0 github.com/hailocab/go-geoindex v0.0.0-20160127134810-64631bfe9711 github.com/micro/dev v0.0.0-20201117163752-d3cfc9788dfa - github.com/micro/micro/v3 v3.0.5-0.20210127125609-3c95b22d9553 + github.com/micro/micro/v3 v3.0.5-0.20210127143903-789ea1c27f67 github.com/miekg/dns v1.1.31 // indirect github.com/stoewer/go-strcase v1.2.0 github.com/stretchr/testify v1.6.1 @@ -20,7 +20,7 @@ require ( golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 // indirect golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f // indirect google.golang.org/genproto v0.0.0-20201001141541-efaab9d3c4f7 // indirect - google.golang.org/grpc v1.32.0 // indirect + google.golang.org/grpc v1.32.0 google.golang.org/protobuf v1.25.0 googlemaps.github.io/maps v1.3.1 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect diff --git a/go.sum b/go.sum index c07cd42..47e83b8 100644 --- a/go.sum +++ b/go.sum @@ -423,6 +423,8 @@ github.com/micro/micro/v3 v3.0.5-0.20210127114057-8b4be865b86a h1:2dOu2GU5PPy8BL github.com/micro/micro/v3 v3.0.5-0.20210127114057-8b4be865b86a/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= github.com/micro/micro/v3 v3.0.5-0.20210127125609-3c95b22d9553 h1:Ucgp8KlMJeaGzOZOfDnZCxBd0xkoBf6v1Vtv7LByJP0= github.com/micro/micro/v3 v3.0.5-0.20210127125609-3c95b22d9553/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= +github.com/micro/micro/v3 v3.0.5-0.20210127143903-789ea1c27f67 h1:cw9gVgwpc0p2/MqRGDFO22JOpr01d4QJ8JL5ZeXk3T4= +github.com/micro/micro/v3 v3.0.5-0.20210127143903-789ea1c27f67/go.mod h1:+WoC+lHuRy8FIgJlNuLkhpmsFbylYb0vYcEgMpKT4Z4= github.com/miekg/dns v1.1.15/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.22/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= diff --git a/posts/proto/posts.pb.go b/posts/proto/posts.pb.go index 779cbf5..d7eaf47 100644 --- a/posts/proto/posts.pb.go +++ b/posts/proto/posts.pb.go @@ -1,145 +1,132 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.25.0 -// protoc v3.6.1 // source: proto/posts.proto package posts import ( + fmt "fmt" proto "github.com/golang/protobuf/proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + math "math" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type Post struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` - Slug string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"` - Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` - Created int64 `protobuf:"varint,5,opt,name=created,proto3" json:"created,omitempty"` - Updated int64 `protobuf:"varint,6,opt,name=updated,proto3" json:"updated,omitempty"` - Author string `protobuf:"bytes,7,opt,name=author,proto3" json:"author,omitempty"` - Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` - Metadata map[string]string `protobuf:"bytes,9,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Image string `protobuf:"bytes,19,opt,name=image,proto3" json:"image,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + Slug string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"` + Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"` + Created int64 `protobuf:"varint,5,opt,name=created,proto3" json:"created,omitempty"` + Updated int64 `protobuf:"varint,6,opt,name=updated,proto3" json:"updated,omitempty"` + Author string `protobuf:"bytes,7,opt,name=author,proto3" json:"author,omitempty"` + Tags []string `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"` + Metadata map[string]string `protobuf:"bytes,9,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Image string `protobuf:"bytes,19,opt,name=image,proto3" json:"image,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *Post) Reset() { - *x = Post{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Post) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Post) ProtoMessage() {} - -func (x *Post) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Post.ProtoReflect.Descriptor instead. +func (m *Post) Reset() { *m = Post{} } +func (m *Post) String() string { return proto.CompactTextString(m) } +func (*Post) ProtoMessage() {} func (*Post) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{0} + return fileDescriptor_e93dc7d934d9dc10, []int{0} } -func (x *Post) GetId() string { - if x != nil { - return x.Id +func (m *Post) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Post.Unmarshal(m, b) +} +func (m *Post) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Post.Marshal(b, m, deterministic) +} +func (m *Post) XXX_Merge(src proto.Message) { + xxx_messageInfo_Post.Merge(m, src) +} +func (m *Post) XXX_Size() int { + return xxx_messageInfo_Post.Size(m) +} +func (m *Post) XXX_DiscardUnknown() { + xxx_messageInfo_Post.DiscardUnknown(m) +} + +var xxx_messageInfo_Post proto.InternalMessageInfo + +func (m *Post) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *Post) GetTitle() string { - if x != nil { - return x.Title +func (m *Post) GetTitle() string { + if m != nil { + return m.Title } return "" } -func (x *Post) GetSlug() string { - if x != nil { - return x.Slug +func (m *Post) GetSlug() string { + if m != nil { + return m.Slug } return "" } -func (x *Post) GetContent() string { - if x != nil { - return x.Content +func (m *Post) GetContent() string { + if m != nil { + return m.Content } return "" } -func (x *Post) GetCreated() int64 { - if x != nil { - return x.Created +func (m *Post) GetCreated() int64 { + if m != nil { + return m.Created } return 0 } -func (x *Post) GetUpdated() int64 { - if x != nil { - return x.Updated +func (m *Post) GetUpdated() int64 { + if m != nil { + return m.Updated } return 0 } -func (x *Post) GetAuthor() string { - if x != nil { - return x.Author +func (m *Post) GetAuthor() string { + if m != nil { + return m.Author } return "" } -func (x *Post) GetTags() []string { - if x != nil { - return x.Tags +func (m *Post) GetTags() []string { + if m != nil { + return m.Tags } return nil } -func (x *Post) GetMetadata() map[string]string { - if x != nil { - return x.Metadata +func (m *Post) GetMetadata() map[string]string { + if m != nil { + return m.Metadata } return nil } -func (x *Post) GetImage() string { - if x != nil { - return x.Image +func (m *Post) GetImage() string { + if m != nil { + return m.Image } return "" } @@ -147,136 +134,116 @@ func (x *Post) GetImage() string { // Query posts. Acts as a listing when no id or slug provided. // Gets a single post by id or slug if any of them provided. type QueryRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` - Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` - Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` - Limit int64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Slug string `protobuf:"bytes,2,opt,name=slug,proto3" json:"slug,omitempty"` + Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"` + Offset int64 `protobuf:"varint,4,opt,name=offset,proto3" json:"offset,omitempty"` + Limit int64 `protobuf:"varint,5,opt,name=limit,proto3" json:"limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *QueryRequest) Reset() { - *x = QueryRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryRequest) ProtoMessage() {} - -func (x *QueryRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. +func (m *QueryRequest) Reset() { *m = QueryRequest{} } +func (m *QueryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRequest) ProtoMessage() {} func (*QueryRequest) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{1} + return fileDescriptor_e93dc7d934d9dc10, []int{1} } -func (x *QueryRequest) GetId() string { - if x != nil { - return x.Id +func (m *QueryRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryRequest.Unmarshal(m, b) +} +func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic) +} +func (m *QueryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRequest.Merge(m, src) +} +func (m *QueryRequest) XXX_Size() int { + return xxx_messageInfo_QueryRequest.Size(m) +} +func (m *QueryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryRequest proto.InternalMessageInfo + +func (m *QueryRequest) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *QueryRequest) GetSlug() string { - if x != nil { - return x.Slug +func (m *QueryRequest) GetSlug() string { + if m != nil { + return m.Slug } return "" } -func (x *QueryRequest) GetTag() string { - if x != nil { - return x.Tag +func (m *QueryRequest) GetTag() string { + if m != nil { + return m.Tag } return "" } -func (x *QueryRequest) GetOffset() int64 { - if x != nil { - return x.Offset +func (m *QueryRequest) GetOffset() int64 { + if m != nil { + return m.Offset } return 0 } -func (x *QueryRequest) GetLimit() int64 { - if x != nil { - return x.Limit +func (m *QueryRequest) GetLimit() int64 { + if m != nil { + return m.Limit } return 0 } type QueryResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` + Posts []*Post `protobuf:"bytes,1,rep,name=posts,proto3" json:"posts,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *QueryResponse) Reset() { - *x = QueryResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryResponse) ProtoMessage() {} - -func (x *QueryResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QueryResponse.ProtoReflect.Descriptor instead. +func (m *QueryResponse) Reset() { *m = QueryResponse{} } +func (m *QueryResponse) String() string { return proto.CompactTextString(m) } +func (*QueryResponse) ProtoMessage() {} func (*QueryResponse) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{2} + return fileDescriptor_e93dc7d934d9dc10, []int{2} } -func (x *QueryResponse) GetPosts() []*Post { - if x != nil { - return x.Posts +func (m *QueryResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_QueryResponse.Unmarshal(m, b) +} +func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic) +} +func (m *QueryResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryResponse.Merge(m, src) +} +func (m *QueryResponse) XXX_Size() int { + return xxx_messageInfo_QueryResponse.Size(m) +} +func (m *QueryResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryResponse proto.InternalMessageInfo + +func (m *QueryResponse) GetPosts() []*Post { + if m != nil { + return m.Posts } return nil } type SaveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Slug string `protobuf:"bytes,3,opt,name=slug,proto3" json:"slug,omitempty"` @@ -284,453 +251,247 @@ type SaveRequest struct { Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // When updating a post and wanting to delete all tags, // send a list of tags with only one member being an empty string [""] - Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` - Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - Image string `protobuf:"bytes,8,opt,name=image,proto3" json:"image,omitempty"` + Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"` + Metadata map[string]string `protobuf:"bytes,7,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Image string `protobuf:"bytes,8,opt,name=image,proto3" json:"image,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *SaveRequest) Reset() { - *x = SaveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveRequest) ProtoMessage() {} - -func (x *SaveRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SaveRequest.ProtoReflect.Descriptor instead. +func (m *SaveRequest) Reset() { *m = SaveRequest{} } +func (m *SaveRequest) String() string { return proto.CompactTextString(m) } +func (*SaveRequest) ProtoMessage() {} func (*SaveRequest) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{3} + return fileDescriptor_e93dc7d934d9dc10, []int{3} } -func (x *SaveRequest) GetId() string { - if x != nil { - return x.Id +func (m *SaveRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SaveRequest.Unmarshal(m, b) +} +func (m *SaveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SaveRequest.Marshal(b, m, deterministic) +} +func (m *SaveRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SaveRequest.Merge(m, src) +} +func (m *SaveRequest) XXX_Size() int { + return xxx_messageInfo_SaveRequest.Size(m) +} +func (m *SaveRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SaveRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SaveRequest proto.InternalMessageInfo + +func (m *SaveRequest) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *SaveRequest) GetTitle() string { - if x != nil { - return x.Title +func (m *SaveRequest) GetTitle() string { + if m != nil { + return m.Title } return "" } -func (x *SaveRequest) GetSlug() string { - if x != nil { - return x.Slug +func (m *SaveRequest) GetSlug() string { + if m != nil { + return m.Slug } return "" } -func (x *SaveRequest) GetContent() string { - if x != nil { - return x.Content +func (m *SaveRequest) GetContent() string { + if m != nil { + return m.Content } return "" } -func (x *SaveRequest) GetTimestamp() int64 { - if x != nil { - return x.Timestamp +func (m *SaveRequest) GetTimestamp() int64 { + if m != nil { + return m.Timestamp } return 0 } -func (x *SaveRequest) GetTags() []string { - if x != nil { - return x.Tags +func (m *SaveRequest) GetTags() []string { + if m != nil { + return m.Tags } return nil } -func (x *SaveRequest) GetMetadata() map[string]string { - if x != nil { - return x.Metadata +func (m *SaveRequest) GetMetadata() map[string]string { + if m != nil { + return m.Metadata } return nil } -func (x *SaveRequest) GetImage() string { - if x != nil { - return x.Image +func (m *SaveRequest) GetImage() string { + if m != nil { + return m.Image } return "" } type SaveResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *SaveResponse) Reset() { - *x = SaveResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SaveResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SaveResponse) ProtoMessage() {} - -func (x *SaveResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SaveResponse.ProtoReflect.Descriptor instead. +func (m *SaveResponse) Reset() { *m = SaveResponse{} } +func (m *SaveResponse) String() string { return proto.CompactTextString(m) } +func (*SaveResponse) ProtoMessage() {} func (*SaveResponse) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{4} + return fileDescriptor_e93dc7d934d9dc10, []int{4} } -func (x *SaveResponse) GetId() string { - if x != nil { - return x.Id +func (m *SaveResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SaveResponse.Unmarshal(m, b) +} +func (m *SaveResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SaveResponse.Marshal(b, m, deterministic) +} +func (m *SaveResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SaveResponse.Merge(m, src) +} +func (m *SaveResponse) XXX_Size() int { + return xxx_messageInfo_SaveResponse.Size(m) +} +func (m *SaveResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SaveResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SaveResponse proto.InternalMessageInfo + +func (m *SaveResponse) GetId() string { + if m != nil { + return m.Id } return "" } type DeleteRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *DeleteRequest) Reset() { - *x = DeleteRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteRequest) ProtoMessage() {} - -func (x *DeleteRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead. +func (m *DeleteRequest) Reset() { *m = DeleteRequest{} } +func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{5} + return fileDescriptor_e93dc7d934d9dc10, []int{5} } -func (x *DeleteRequest) GetId() string { - if x != nil { - return x.Id +func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteRequest.Unmarshal(m, b) +} +func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteRequest.Marshal(b, m, deterministic) +} +func (m *DeleteRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteRequest.Merge(m, src) +} +func (m *DeleteRequest) XXX_Size() int { + return xxx_messageInfo_DeleteRequest.Size(m) +} +func (m *DeleteRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteRequest proto.InternalMessageInfo + +func (m *DeleteRequest) GetId() string { + if m != nil { + return m.Id } return "" } type DeleteResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *DeleteResponse) Reset() { - *x = DeleteResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_posts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResponse) ProtoMessage() {} - -func (x *DeleteResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_posts_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead. +func (m *DeleteResponse) Reset() { *m = DeleteResponse{} } +func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } +func (*DeleteResponse) ProtoMessage() {} func (*DeleteResponse) Descriptor() ([]byte, []int) { - return file_proto_posts_proto_rawDescGZIP(), []int{6} + return fileDescriptor_e93dc7d934d9dc10, []int{6} } -var File_proto_posts_proto protoreflect.FileDescriptor - -var file_proto_posts_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xc4, 0x02, 0x0a, 0x04, 0x50, - 0x6f, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 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, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, - 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x07, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x6f, 0x73, 0x74, - 0x73, 0x2e, 0x50, 0x6f, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, - 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, - 0x6d, 0x61, 0x67, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x22, 0x72, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x73, 0x6c, 0x75, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, - 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x32, 0x0a, 0x0d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x50, 0x6f, - 0x73, 0x74, 0x52, 0x05, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x22, 0xa4, 0x02, 0x0a, 0x0b, 0x53, 0x61, - 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 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, - 0x12, 0x0a, 0x04, 0x73, 0x6c, 0x75, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, - 0x6c, 0x75, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, - 0x3c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x07, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, - 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x1e, 0x0a, 0x0c, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x1f, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0xa9, 0x01, 0x0a, 0x05, 0x50, 0x6f, 0x73, 0x74, 0x73, 0x12, 0x34, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x13, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x6f, - 0x73, 0x74, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x04, 0x53, 0x61, 0x76, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x6f, - 0x73, 0x74, 0x73, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x13, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x12, 0x14, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x0d, 0x5a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0x73, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteResponse.Unmarshal(m, b) +} +func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteResponse.Marshal(b, m, deterministic) +} +func (m *DeleteResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteResponse.Merge(m, src) +} +func (m *DeleteResponse) XXX_Size() int { + return xxx_messageInfo_DeleteResponse.Size(m) +} +func (m *DeleteResponse) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteResponse.DiscardUnknown(m) } -var ( - file_proto_posts_proto_rawDescOnce sync.Once - file_proto_posts_proto_rawDescData = file_proto_posts_proto_rawDesc -) +var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo -func file_proto_posts_proto_rawDescGZIP() []byte { - file_proto_posts_proto_rawDescOnce.Do(func() { - file_proto_posts_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_posts_proto_rawDescData) - }) - return file_proto_posts_proto_rawDescData +func init() { + proto.RegisterType((*Post)(nil), "posts.Post") + proto.RegisterMapType((map[string]string)(nil), "posts.Post.MetadataEntry") + proto.RegisterType((*QueryRequest)(nil), "posts.QueryRequest") + proto.RegisterType((*QueryResponse)(nil), "posts.QueryResponse") + proto.RegisterType((*SaveRequest)(nil), "posts.SaveRequest") + proto.RegisterMapType((map[string]string)(nil), "posts.SaveRequest.MetadataEntry") + proto.RegisterType((*SaveResponse)(nil), "posts.SaveResponse") + proto.RegisterType((*DeleteRequest)(nil), "posts.DeleteRequest") + proto.RegisterType((*DeleteResponse)(nil), "posts.DeleteResponse") } -var file_proto_posts_proto_msgTypes = make([]protoimpl.MessageInfo, 9) -var file_proto_posts_proto_goTypes = []interface{}{ - (*Post)(nil), // 0: posts.Post - (*QueryRequest)(nil), // 1: posts.QueryRequest - (*QueryResponse)(nil), // 2: posts.QueryResponse - (*SaveRequest)(nil), // 3: posts.SaveRequest - (*SaveResponse)(nil), // 4: posts.SaveResponse - (*DeleteRequest)(nil), // 5: posts.DeleteRequest - (*DeleteResponse)(nil), // 6: posts.DeleteResponse - nil, // 7: posts.Post.MetadataEntry - nil, // 8: posts.SaveRequest.MetadataEntry -} -var file_proto_posts_proto_depIdxs = []int32{ - 7, // 0: posts.Post.metadata:type_name -> posts.Post.MetadataEntry - 0, // 1: posts.QueryResponse.posts:type_name -> posts.Post - 8, // 2: posts.SaveRequest.metadata:type_name -> posts.SaveRequest.MetadataEntry - 1, // 3: posts.Posts.Query:input_type -> posts.QueryRequest - 3, // 4: posts.Posts.Save:input_type -> posts.SaveRequest - 5, // 5: posts.Posts.Delete:input_type -> posts.DeleteRequest - 2, // 6: posts.Posts.Query:output_type -> posts.QueryResponse - 4, // 7: posts.Posts.Save:output_type -> posts.SaveResponse - 6, // 8: posts.Posts.Delete:output_type -> posts.DeleteResponse - 6, // [6:9] is the sub-list for method output_type - 3, // [3:6] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} +func init() { proto.RegisterFile("proto/posts.proto", fileDescriptor_e93dc7d934d9dc10) } -func init() { file_proto_posts_proto_init() } -func file_proto_posts_proto_init() { - if File_proto_posts_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_posts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Post); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SaveResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_posts_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_posts_proto_rawDesc, - NumEnums: 0, - NumMessages: 9, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_posts_proto_goTypes, - DependencyIndexes: file_proto_posts_proto_depIdxs, - MessageInfos: file_proto_posts_proto_msgTypes, - }.Build() - File_proto_posts_proto = out.File - file_proto_posts_proto_rawDesc = nil - file_proto_posts_proto_goTypes = nil - file_proto_posts_proto_depIdxs = nil +var fileDescriptor_e93dc7d934d9dc10 = []byte{ + // 452 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcb, 0x8e, 0xd3, 0x40, + 0x10, 0xc4, 0x76, 0xec, 0x24, 0x9d, 0xcd, 0x2a, 0x74, 0x16, 0x34, 0x44, 0x08, 0x8c, 0x4f, 0x39, + 0x05, 0x11, 0x40, 0x20, 0xe0, 0x08, 0x47, 0x24, 0x30, 0x5f, 0x30, 0xe0, 0xde, 0x60, 0x61, 0xc7, + 0xc6, 0xd3, 0x5e, 0x29, 0xff, 0xc3, 0x85, 0xff, 0xe0, 0xc3, 0xd0, 0x3c, 0x1c, 0xec, 0x85, 0x15, + 0x97, 0xdc, 0xba, 0xaa, 0xdd, 0xd3, 0xd5, 0x55, 0x51, 0xe0, 0x76, 0xdd, 0x54, 0x5c, 0x3d, 0xae, + 0x2b, 0xc5, 0x6a, 0x63, 0x6a, 0x0c, 0x0d, 0x48, 0x7e, 0xf9, 0x30, 0xfa, 0x50, 0x29, 0xc6, 0x73, + 0xf0, 0xf3, 0x4c, 0x78, 0xb1, 0xb7, 0x9e, 0xa6, 0x7e, 0x9e, 0xe1, 0x05, 0x84, 0x9c, 0x73, 0x41, + 0xc2, 0x37, 0x94, 0x05, 0x88, 0x30, 0x52, 0x45, 0xbb, 0x13, 0x81, 0x21, 0x4d, 0x8d, 0x02, 0xc6, + 0x5f, 0xaa, 0x3d, 0xd3, 0x9e, 0xc5, 0xc8, 0xd0, 0x1d, 0x34, 0x9d, 0x86, 0x24, 0x53, 0x26, 0xc2, + 0xd8, 0x5b, 0x07, 0x69, 0x07, 0x75, 0xa7, 0xad, 0x33, 0xd3, 0x89, 0x6c, 0xc7, 0x41, 0xbc, 0x0b, + 0x91, 0x6c, 0xf9, 0x6b, 0xd5, 0x88, 0xb1, 0x79, 0xcc, 0x21, 0xbd, 0x99, 0xe5, 0x4e, 0x89, 0x49, + 0x1c, 0xe8, 0xcd, 0xba, 0xc6, 0xe7, 0x30, 0x29, 0x89, 0x65, 0x26, 0x59, 0x8a, 0x69, 0x1c, 0xac, + 0x67, 0xdb, 0x7b, 0x1b, 0x7b, 0xa3, 0x3e, 0x69, 0xf3, 0xde, 0xf5, 0xde, 0xed, 0xb9, 0x39, 0xa4, + 0xc7, 0x4f, 0xf5, 0x69, 0x79, 0x29, 0x77, 0x24, 0x96, 0xf6, 0x34, 0x03, 0x56, 0xaf, 0x61, 0x3e, + 0x18, 0xc0, 0x05, 0x04, 0xdf, 0xe8, 0xe0, 0x2c, 0xd1, 0xa5, 0x1e, 0xbc, 0x92, 0x45, 0x7b, 0xf4, + 0xc4, 0x80, 0x57, 0xfe, 0x4b, 0x2f, 0x69, 0xe0, 0xec, 0x63, 0x4b, 0xcd, 0x21, 0xa5, 0xef, 0x2d, + 0xfd, 0xc3, 0xcd, 0xce, 0x37, 0xbf, 0xe7, 0xdb, 0x02, 0x02, 0x96, 0x9d, 0x95, 0xba, 0xd4, 0xb7, + 0x57, 0x97, 0x97, 0x8a, 0xac, 0x91, 0x41, 0xea, 0x90, 0xde, 0x5b, 0xe4, 0x65, 0xce, 0xce, 0x45, + 0x0b, 0x92, 0x2d, 0xcc, 0xdd, 0x4e, 0x55, 0x57, 0x7b, 0x45, 0xf8, 0x08, 0x6c, 0xa8, 0xc2, 0x33, + 0x5e, 0xcc, 0x7a, 0x5e, 0xa4, 0x2e, 0xee, 0x1f, 0x3e, 0xcc, 0x3e, 0xc9, 0x2b, 0xba, 0x49, 0xe7, + 0x29, 0x52, 0xbf, 0x0f, 0x53, 0xce, 0x4b, 0x52, 0x2c, 0xcb, 0xda, 0x29, 0xfe, 0x43, 0x1c, 0x73, + 0x8c, 0x7a, 0x39, 0xbe, 0xe9, 0xe5, 0x38, 0x36, 0xda, 0x63, 0xa7, 0xbd, 0xa7, 0xf5, 0xff, 0x71, + 0x4e, 0x4e, 0x16, 0xe7, 0x03, 0x38, 0xb3, 0x9b, 0x9d, 0xb3, 0xd7, 0x6c, 0x4a, 0x1e, 0xc2, 0xfc, + 0x2d, 0x15, 0xc4, 0x37, 0xf9, 0x98, 0x2c, 0xe0, 0xbc, 0xfb, 0xc0, 0x3e, 0xb1, 0xfd, 0xe9, 0x41, + 0xa8, 0x93, 0x50, 0xf8, 0x0c, 0x42, 0x93, 0x1b, 0x2e, 0xdd, 0x91, 0xfd, 0x5f, 0xce, 0xea, 0x62, + 0x48, 0xda, 0xe9, 0xe4, 0x16, 0x3e, 0x81, 0x91, 0x96, 0x84, 0xf8, 0xb7, 0x33, 0xab, 0xe5, 0x80, + 0x3b, 0x8e, 0xbc, 0x80, 0xc8, 0x8a, 0xc0, 0xee, 0xd1, 0x81, 0xe8, 0xd5, 0x9d, 0x6b, 0x6c, 0x37, + 0xf8, 0x39, 0x32, 0x7f, 0x11, 0x4f, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x17, 0x84, 0x7a, 0xa4, + 0x37, 0x04, 0x00, 0x00, } diff --git a/posts/proto/posts.proto b/posts/proto/posts.proto index 5fa7412..2ae8122 100644 --- a/posts/proto/posts.proto +++ b/posts/proto/posts.proto @@ -1,7 +1,6 @@ syntax = "proto3"; package posts; -option go_package = "proto;posts"; service Posts { // Query currently only supports read by slug or timestamp, no listing.