mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-18 21:55:08 +00:00
Feeds service (#24)
This commit is contained in:
@@ -21,17 +21,18 @@ var _ = math.Inf
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type Post struct {
|
||||
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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *Post) Reset() { *m = Post{} }
|
||||
@@ -115,6 +116,13 @@ func (m *Post) GetTags() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *Post) GetMetadata() map[string]string {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 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 {
|
||||
@@ -235,10 +243,11 @@ 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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
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"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *SaveRequest) Reset() { *m = SaveRequest{} }
|
||||
@@ -308,6 +317,13 @@ func (m *SaveRequest) GetTags() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *SaveRequest) GetMetadata() map[string]string {
|
||||
if m != nil {
|
||||
return m.Metadata
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type SaveResponse struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@@ -419,9 +435,11 @@ var xxx_messageInfo_DeleteResponse proto.InternalMessageInfo
|
||||
|
||||
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")
|
||||
@@ -432,28 +450,32 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_e93dc7d934d9dc10 = []byte{
|
||||
// 367 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x53, 0x5d, 0x4e, 0xf2, 0x50,
|
||||
0x10, 0xfd, 0x4a, 0x7f, 0xf8, 0x18, 0x7e, 0x82, 0x03, 0x9a, 0x1b, 0x62, 0x14, 0xfb, 0xc4, 0x13,
|
||||
0x46, 0x34, 0x71, 0x03, 0x2e, 0x40, 0xeb, 0x0a, 0xaa, 0x5c, 0xb0, 0x49, 0xe1, 0xd6, 0xde, 0xa9,
|
||||
0x89, 0xeb, 0x70, 0x15, 0x6e, 0xc1, 0xd5, 0xd9, 0xfb, 0x53, 0x6c, 0x89, 0xbc, 0xf9, 0x36, 0xe7,
|
||||
0x9c, 0xce, 0xcc, 0x99, 0xd3, 0x5c, 0x38, 0xca, 0x72, 0x41, 0xe2, 0x32, 0x13, 0x92, 0xe4, 0x5c,
|
||||
0xd7, 0xe8, 0x6b, 0x10, 0x7e, 0x39, 0xe0, 0xdd, 0x97, 0x15, 0x0e, 0xa0, 0x95, 0x2c, 0x99, 0x33,
|
||||
0x75, 0x66, 0x9d, 0xa8, 0xac, 0x70, 0x0c, 0x3e, 0x25, 0x94, 0x72, 0xd6, 0xd2, 0x94, 0x01, 0x88,
|
||||
0xe0, 0xc9, 0xb4, 0x58, 0x33, 0x57, 0x93, 0xba, 0x46, 0x06, 0xed, 0x67, 0xb1, 0x25, 0xbe, 0x25,
|
||||
0xe6, 0x69, 0xba, 0x82, 0x5a, 0xc9, 0x79, 0x4c, 0x7c, 0xc9, 0xfc, 0x52, 0x71, 0xa3, 0x0a, 0x2a,
|
||||
0xa5, 0xc8, 0x96, 0x5a, 0x09, 0x8c, 0x62, 0x21, 0x9e, 0x40, 0x10, 0x17, 0xf4, 0x22, 0x72, 0xd6,
|
||||
0xd6, 0xc3, 0x2c, 0x52, 0x9b, 0x29, 0x5e, 0x4b, 0xf6, 0x7f, 0xea, 0xaa, 0xcd, 0xaa, 0x0e, 0x73,
|
||||
0xe8, 0x3d, 0x14, 0x3c, 0x7f, 0x8f, 0xf8, 0x6b, 0xc1, 0x7f, 0xb9, 0xa1, 0x72, 0xdb, 0xaa, 0xb9,
|
||||
0x1d, 0x82, 0x5b, 0xf6, 0xda, 0x03, 0x54, 0xa9, 0x36, 0x8a, 0xd5, 0x4a, 0x72, 0x63, 0xdf, 0x8d,
|
||||
0x2c, 0x52, 0x09, 0xa4, 0xc9, 0x26, 0x21, 0xeb, 0xdd, 0x80, 0x70, 0x01, 0x7d, 0xbb, 0x53, 0x66,
|
||||
0x62, 0x2b, 0x39, 0x5e, 0x80, 0x89, 0xb2, 0xdc, 0xeb, 0xce, 0xba, 0x8b, 0xee, 0xdc, 0xa4, 0xac,
|
||||
0x42, 0x8d, 0x6c, 0xc8, 0x1f, 0x0e, 0x74, 0x1f, 0xe3, 0x37, 0x7e, 0xc8, 0xe7, 0x5f, 0x64, 0x7d,
|
||||
0x0a, 0x1d, 0x4a, 0x36, 0xe5, 0xf4, 0x78, 0x93, 0x59, 0xc7, 0x3f, 0xc4, 0x2e, 0xbd, 0xa0, 0x96,
|
||||
0xde, 0x19, 0xf4, 0x8c, 0x29, 0x7b, 0xc8, 0x9e, 0xab, 0xf0, 0x1c, 0xfa, 0x77, 0x3c, 0xe5, 0x74,
|
||||
0xc8, 0x76, 0x38, 0x84, 0x41, 0xf5, 0x81, 0x19, 0xb1, 0xf8, 0x74, 0xc0, 0x57, 0x87, 0x4b, 0xbc,
|
||||
0x01, 0x5f, 0xc7, 0x84, 0x23, 0x9b, 0x47, 0xfd, 0x47, 0x4d, 0xc6, 0x4d, 0xd2, 0x74, 0x87, 0xff,
|
||||
0xf0, 0x0a, 0x3c, 0x65, 0x09, 0xd1, 0xea, 0xb5, 0xd0, 0x26, 0xa3, 0x06, 0xb7, 0x6b, 0xb9, 0x85,
|
||||
0xc0, 0x98, 0xc0, 0x6a, 0x68, 0xc3, 0xf4, 0xe4, 0x78, 0x8f, 0xad, 0x1a, 0x9f, 0x02, 0xfd, 0x0e,
|
||||
0xae, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x8c, 0x67, 0xbb, 0x1c, 0x03, 0x00, 0x00,
|
||||
// 430 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x53, 0x4b, 0x0f, 0xd2, 0x40,
|
||||
0x10, 0xb6, 0x4f, 0x60, 0x78, 0x04, 0x07, 0x34, 0x6b, 0x63, 0x14, 0x7b, 0xf2, 0x84, 0x11, 0x35,
|
||||
0x1a, 0xf5, 0xa8, 0x47, 0x13, 0xad, 0xbf, 0x60, 0x95, 0x05, 0x1b, 0xfb, 0xb2, 0xbb, 0x25, 0xe1,
|
||||
0x4f, 0xf8, 0x3f, 0xbc, 0xf8, 0x1b, 0xdd, 0x57, 0x6b, 0x8b, 0x72, 0xd3, 0xdb, 0x7c, 0x33, 0xdd,
|
||||
0x99, 0xef, 0x01, 0x70, 0xb3, 0xaa, 0x4b, 0x51, 0x3e, 0xaa, 0x4a, 0x2e, 0xf8, 0x56, 0xd7, 0x18,
|
||||
0x68, 0x10, 0xff, 0x74, 0xc1, 0x7f, 0x2f, 0x2b, 0x5c, 0x80, 0x9b, 0xee, 0x89, 0xb3, 0x71, 0x1e,
|
||||
0x4e, 0x12, 0x59, 0xe1, 0x1a, 0x02, 0x91, 0x8a, 0x8c, 0x11, 0x57, 0xb7, 0x0c, 0x40, 0x04, 0x9f,
|
||||
0x67, 0xcd, 0x91, 0x78, 0xba, 0xa9, 0x6b, 0x24, 0x30, 0xfa, 0x5c, 0x16, 0x82, 0x15, 0x82, 0xf8,
|
||||
0xba, 0xdd, 0x42, 0x3d, 0xa9, 0x19, 0x15, 0x6c, 0x4f, 0x02, 0x39, 0xf1, 0x92, 0x16, 0xaa, 0x49,
|
||||
0x53, 0xed, 0xf5, 0x24, 0x34, 0x13, 0x0b, 0xf1, 0x36, 0x84, 0xb4, 0x11, 0x5f, 0xca, 0x9a, 0x8c,
|
||||
0xf4, 0x32, 0x8b, 0xd4, 0x65, 0x41, 0x8f, 0x9c, 0x8c, 0x37, 0x9e, 0xba, 0xac, 0x6a, 0x7c, 0x06,
|
||||
0xe3, 0x9c, 0x09, 0x2a, 0x1f, 0x52, 0x32, 0x91, 0xfd, 0xe9, 0xee, 0xce, 0xd6, 0x68, 0x54, 0x92,
|
||||
0xb6, 0xef, 0xec, 0xec, 0x6d, 0x21, 0xea, 0x73, 0xd2, 0x7d, 0x1a, 0xbd, 0x82, 0xf9, 0x60, 0x84,
|
||||
0x4b, 0xf0, 0xbe, 0xb2, 0xb3, 0x15, 0xaf, 0x4a, 0xa5, 0xfe, 0x44, 0xb3, 0x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 0x5e, 0xf7, 0xe4, 0x39, 0x84, 0x86,
|
||||
0x04, 0xb6, 0x4b, 0x07, 0xa4, 0xa3, 0x5b, 0x17, 0xdd, 0xf6, 0xe1, 0xa7, 0x50, 0xff, 0xed, 0x9f,
|
||||
0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x50, 0xbf, 0x89, 0x8b, 0x0b, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user