Create & Init Project...

This commit is contained in:
2019-04-22 18:49:16 +08:00
commit fc4fa37393
25440 changed files with 4054998 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"bangumi.go",
"feed.go",
"rpc.go",
],
embed = [":model_go_proto"],
importpath = "go-common/app/service/main/feed/model",
tags = ["automanaged"],
deps = [
"//app/interface/openplatform/article/model:go_default_library",
"//app/service/main/archive/api:go_default_library",
"//app/service/main/archive/model/archive:go_default_library",
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_golang_protobuf//proto:go_default_library",
],
)
proto_library(
name = "model_proto",
srcs = ["feed.proto"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = ["@gogo_special_proto//github.com/gogo/protobuf/gogoproto"],
)
go_proto_library(
name = "model_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_proto"],
importpath = "go-common/app/service/main/feed/model",
proto = ":model_proto",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = ["@com_github_gogo_protobuf//gogoproto:go_default_library"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)

View File

@@ -0,0 +1,6 @@
package model
type Pull struct {
SeasonID int64 `json:"season_id"`
Ts int64 `json:"ts"`
}

View File

@@ -0,0 +1,72 @@
package model
import (
artmdl "go-common/app/interface/openplatform/article/model"
"go-common/app/service/main/archive/api"
"go-common/app/service/main/archive/model/archive"
"go-common/library/time"
)
// feed type
const (
ArchiveType = 0
BangumiType = 1
TypeApp = iota
TypeWeb
TypeArt
)
// FeedType return feed type
func FeedType(app bool) int {
if app {
return TypeApp
}
return TypeWeb
}
// Feed struct of Feed
type Feed struct {
Type int64 `json:"type"`
// Data is *api.Arc or *Bangumi
Archive *api.Arc `json:"archive"`
Bangumi *Bangumi `json:"bangumi"`
// ID is aid or SeasonID
ID int64 `json:"id"`
PubDate time.Time `json:"pubdate"`
Fold []*api.Arc `json:"fold"`
}
type Feeds []*Feed
func (as Feeds) Len() int { return len(as) }
func (as Feeds) Less(i, j int) bool {
if as[i].PubDate != as[j].PubDate {
return as[i].PubDate > as[j].PubDate
}
return as[i].ID > as[j].ID
}
func (as Feeds) Swap(i, j int) { as[i], as[j] = as[j], as[i] }
type ArticleFeeds []*artmdl.Meta
func (as ArticleFeeds) Len() int { return len(as) }
func (as ArticleFeeds) Less(i, j int) bool {
if as[i].PublishTime != as[j].PublishTime {
return as[i].PublishTime > as[j].PublishTime
}
return as[i].ID > as[j].ID
}
func (as ArticleFeeds) Swap(i, j int) { as[i], as[j] = as[j], as[i] }
// Arcs AidPubTime slice
type Arcs []*archive.AidPubTime
func (as Arcs) Len() int { return len(as) }
func (as Arcs) Less(i, j int) bool {
if as[i].PubDate != as[j].PubDate {
return as[i].PubDate > as[j].PubDate
}
return as[i].Aid > as[j].Aid
}
func (as Arcs) Swap(i, j int) { as[i], as[j] = as[j], as[i] }

View File

@@ -0,0 +1,825 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: feed.proto
/*
Package model is a generated protocol buffer package.
It is generated from these files:
feed.proto
It has these top-level messages:
NewEp
Bangumi
*/
package model
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import io "io"
// 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 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.ProtoPackageIsVersion2 // please upgrade the proto package
type NewEp struct {
Cover string `protobuf:"bytes,1,opt,name=Cover,proto3" json:"cover"`
Dm int64 `protobuf:"varint,2,opt,name=Dm,proto3" json:"dm"`
EpisodeID int64 `protobuf:"varint,3,opt,name=EpisodeID,proto3" json:"episode_id"`
Index string `protobuf:"bytes,4,opt,name=Index,proto3" json:"index"`
IndexTitle string `protobuf:"bytes,5,opt,name=IndexTitle,proto3" json:"index_title"`
Play int64 `protobuf:"varint,6,opt,name=Play,proto3" json:"play"`
}
func (m *NewEp) Reset() { *m = NewEp{} }
func (m *NewEp) String() string { return proto.CompactTextString(m) }
func (*NewEp) ProtoMessage() {}
func (*NewEp) Descriptor() ([]byte, []int) { return fileDescriptorFeed, []int{0} }
type Bangumi struct {
BgmType int32 `protobuf:"varint,1,opt,name=BgmType,proto3" json:"bgm_type"`
Cover string `protobuf:"bytes,2,opt,name=Cover,proto3" json:"cover"`
IsFinish int32 `protobuf:"varint,3,opt,name=IsFinish,proto3" json:"is_finish"`
NewEp NewEp `protobuf:"bytes,4,opt,name=NewEp" json:"new_ep"`
SeasonID int64 `protobuf:"varint,5,opt,name=SeasonID,proto3" json:"season_id"`
Title string `protobuf:"bytes,6,opt,name=Title,proto3" json:"title"`
TotalCount int64 `protobuf:"varint,7,opt,name=TotalCount,proto3" json:"total_count"`
Ts int64 `protobuf:"varint,8,opt,name=Ts,proto3" json:"ts"`
}
func (m *Bangumi) Reset() { *m = Bangumi{} }
func (m *Bangumi) String() string { return proto.CompactTextString(m) }
func (*Bangumi) ProtoMessage() {}
func (*Bangumi) Descriptor() ([]byte, []int) { return fileDescriptorFeed, []int{1} }
func init() {
proto.RegisterType((*NewEp)(nil), "model.NewEp")
proto.RegisterType((*Bangumi)(nil), "model.Bangumi")
}
func (m *NewEp) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *NewEp) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Cover) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintFeed(dAtA, i, uint64(len(m.Cover)))
i += copy(dAtA[i:], m.Cover)
}
if m.Dm != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintFeed(dAtA, i, uint64(m.Dm))
}
if m.EpisodeID != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintFeed(dAtA, i, uint64(m.EpisodeID))
}
if len(m.Index) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintFeed(dAtA, i, uint64(len(m.Index)))
i += copy(dAtA[i:], m.Index)
}
if len(m.IndexTitle) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintFeed(dAtA, i, uint64(len(m.IndexTitle)))
i += copy(dAtA[i:], m.IndexTitle)
}
if m.Play != 0 {
dAtA[i] = 0x30
i++
i = encodeVarintFeed(dAtA, i, uint64(m.Play))
}
return i, nil
}
func (m *Bangumi) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *Bangumi) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.BgmType != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintFeed(dAtA, i, uint64(m.BgmType))
}
if len(m.Cover) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintFeed(dAtA, i, uint64(len(m.Cover)))
i += copy(dAtA[i:], m.Cover)
}
if m.IsFinish != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintFeed(dAtA, i, uint64(m.IsFinish))
}
dAtA[i] = 0x22
i++
i = encodeVarintFeed(dAtA, i, uint64(m.NewEp.Size()))
n1, err := m.NewEp.MarshalTo(dAtA[i:])
if err != nil {
return 0, err
}
i += n1
if m.SeasonID != 0 {
dAtA[i] = 0x28
i++
i = encodeVarintFeed(dAtA, i, uint64(m.SeasonID))
}
if len(m.Title) > 0 {
dAtA[i] = 0x32
i++
i = encodeVarintFeed(dAtA, i, uint64(len(m.Title)))
i += copy(dAtA[i:], m.Title)
}
if m.TotalCount != 0 {
dAtA[i] = 0x38
i++
i = encodeVarintFeed(dAtA, i, uint64(m.TotalCount))
}
if m.Ts != 0 {
dAtA[i] = 0x40
i++
i = encodeVarintFeed(dAtA, i, uint64(m.Ts))
}
return i, nil
}
func encodeVarintFeed(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *NewEp) Size() (n int) {
var l int
_ = l
l = len(m.Cover)
if l > 0 {
n += 1 + l + sovFeed(uint64(l))
}
if m.Dm != 0 {
n += 1 + sovFeed(uint64(m.Dm))
}
if m.EpisodeID != 0 {
n += 1 + sovFeed(uint64(m.EpisodeID))
}
l = len(m.Index)
if l > 0 {
n += 1 + l + sovFeed(uint64(l))
}
l = len(m.IndexTitle)
if l > 0 {
n += 1 + l + sovFeed(uint64(l))
}
if m.Play != 0 {
n += 1 + sovFeed(uint64(m.Play))
}
return n
}
func (m *Bangumi) Size() (n int) {
var l int
_ = l
if m.BgmType != 0 {
n += 1 + sovFeed(uint64(m.BgmType))
}
l = len(m.Cover)
if l > 0 {
n += 1 + l + sovFeed(uint64(l))
}
if m.IsFinish != 0 {
n += 1 + sovFeed(uint64(m.IsFinish))
}
l = m.NewEp.Size()
n += 1 + l + sovFeed(uint64(l))
if m.SeasonID != 0 {
n += 1 + sovFeed(uint64(m.SeasonID))
}
l = len(m.Title)
if l > 0 {
n += 1 + l + sovFeed(uint64(l))
}
if m.TotalCount != 0 {
n += 1 + sovFeed(uint64(m.TotalCount))
}
if m.Ts != 0 {
n += 1 + sovFeed(uint64(m.Ts))
}
return n
}
func sovFeed(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozFeed(x uint64) (n int) {
return sovFeed(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *NewEp) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: NewEp: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: NewEp: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cover", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthFeed
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cover = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Dm", wireType)
}
m.Dm = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Dm |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EpisodeID", wireType)
}
m.EpisodeID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EpisodeID |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthFeed
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Index = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field IndexTitle", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthFeed
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.IndexTitle = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Play", wireType)
}
m.Play = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Play |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipFeed(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFeed
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *Bangumi) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: Bangumi: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: Bangumi: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field BgmType", wireType)
}
m.BgmType = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.BgmType |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Cover", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthFeed
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Cover = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field IsFinish", wireType)
}
m.IsFinish = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.IsFinish |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NewEp", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthFeed
}
postIndex := iNdEx + msglen
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.NewEp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field SeasonID", wireType)
}
m.SeasonID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.SeasonID |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthFeed
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Title = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TotalCount", wireType)
}
m.TotalCount = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TotalCount |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 8:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType)
}
m.Ts = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowFeed
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Ts |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipFeed(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthFeed
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipFeed(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFeed
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFeed
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFeed
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
iNdEx += length
if length < 0 {
return 0, ErrInvalidLengthFeed
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowFeed
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipFeed(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthFeed = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowFeed = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("feed.proto", fileDescriptorFeed) }
var fileDescriptorFeed = []byte{
// 431 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xd1, 0x6a, 0xdb, 0x30,
0x14, 0x86, 0x63, 0x27, 0x76, 0x1c, 0xb5, 0xeb, 0xc0, 0x17, 0x43, 0x8c, 0x61, 0x95, 0x5e, 0x8c,
0x16, 0xb6, 0x04, 0xba, 0x37, 0x70, 0xd3, 0x41, 0x6e, 0xc6, 0xd0, 0x7c, 0x6f, 0x9c, 0x58, 0x71,
0x05, 0xb6, 0x65, 0x2a, 0x65, 0x9d, 0xdf, 0x64, 0x4f, 0x34, 0x72, 0xd9, 0x27, 0x10, 0x6b, 0x76,
0xa7, 0xa7, 0x18, 0x3a, 0xea, 0xea, 0xdc, 0xec, 0x4e, 0xfa, 0xfe, 0xdf, 0x3a, 0xe7, 0xfc, 0xc7,
0x08, 0x6d, 0x19, 0x2b, 0xe7, 0xdd, 0xbd, 0x50, 0x22, 0x0e, 0x1a, 0x51, 0xb2, 0xfa, 0xed, 0xc7,
0x8a, 0xab, 0xbb, 0xdd, 0x7a, 0xbe, 0x11, 0xcd, 0xa2, 0x12, 0x95, 0x58, 0x80, 0xba, 0xde, 0x6d,
0xe1, 0x06, 0x17, 0x38, 0xb9, 0xaf, 0x2e, 0xb4, 0x87, 0x82, 0x2f, 0xec, 0xe1, 0xb6, 0x8b, 0x09,
0x0a, 0x6e, 0xc4, 0x77, 0x76, 0x8f, 0xbd, 0x73, 0xef, 0x72, 0x96, 0xce, 0x8c, 0x26, 0xc1, 0xc6,
0x02, 0xea, 0x78, 0xfc, 0x06, 0xf9, 0xcb, 0x06, 0xfb, 0xe7, 0xde, 0xe5, 0x38, 0x0d, 0x8d, 0x26,
0x7e, 0xd9, 0x50, 0x7f, 0xd9, 0xc4, 0x1f, 0xd0, 0xec, 0xb6, 0xe3, 0x52, 0x94, 0x6c, 0xb5, 0xc4,
0x63, 0x90, 0xcf, 0x8c, 0x26, 0x88, 0x39, 0x98, 0xf3, 0x92, 0x0e, 0x06, 0x5b, 0x66, 0xd5, 0x96,
0xec, 0x07, 0x9e, 0x0c, 0x65, 0xb8, 0x05, 0xd4, 0xf1, 0x78, 0x81, 0x10, 0x1c, 0x32, 0xae, 0x6a,
0x86, 0x03, 0x70, 0xbd, 0x36, 0x9a, 0x9c, 0x80, 0x2b, 0x57, 0x16, 0xd3, 0x23, 0x4b, 0xfc, 0x0e,
0x4d, 0xbe, 0xd6, 0x45, 0x8f, 0x43, 0x28, 0x1d, 0x19, 0x4d, 0x26, 0x5d, 0x5d, 0xf4, 0x14, 0xe8,
0xc5, 0x2f, 0x1f, 0x4d, 0xd3, 0xa2, 0xad, 0x76, 0x0d, 0x8f, 0xdf, 0xa3, 0x69, 0x5a, 0x35, 0x59,
0xdf, 0x31, 0x18, 0x32, 0x48, 0x4f, 0x8d, 0x26, 0xd1, 0xba, 0x6a, 0x72, 0xd5, 0x77, 0x8c, 0xfe,
0x13, 0x87, 0x28, 0xfc, 0xff, 0x44, 0x71, 0x85, 0xa2, 0x95, 0xfc, 0xcc, 0x5b, 0x2e, 0xef, 0x60,
0xe2, 0x20, 0x7d, 0x65, 0x34, 0x99, 0x71, 0x99, 0x6f, 0x01, 0xd2, 0x17, 0x39, 0xbe, 0x7e, 0xce,
0x17, 0xe6, 0x3d, 0xb9, 0x3e, 0x9d, 0xc3, 0x9a, 0xe6, 0xc0, 0xd2, 0xb3, 0xbd, 0x26, 0x23, 0xa3,
0x49, 0xd8, 0xb2, 0x87, 0x9c, 0x75, 0xf4, 0x79, 0x15, 0x57, 0x28, 0xfa, 0xc6, 0x0a, 0x29, 0xda,
0xd5, 0x12, 0x02, 0x18, 0xbb, 0xe7, 0x25, 0x30, 0x9b, 0xe7, 0x8b, 0x6c, 0x5b, 0x75, 0x41, 0x85,
0x43, 0xab, 0x2e, 0x22, 0xc7, 0x6d, 0x9c, 0x99, 0x50, 0x45, 0x7d, 0x23, 0x76, 0xad, 0xc2, 0x53,
0x78, 0x0d, 0xe2, 0x54, 0x96, 0xe6, 0x1b, 0x8b, 0xe9, 0x91, 0xc5, 0xae, 0x39, 0x93, 0x38, 0x1a,
0xd6, 0xac, 0x24, 0xf5, 0x33, 0x99, 0xe2, 0xfd, 0x53, 0x32, 0x7a, 0x7c, 0x4a, 0x46, 0xfb, 0x43,
0xe2, 0x3d, 0x1e, 0x12, 0xef, 0xf7, 0x21, 0xf1, 0x7e, 0xfe, 0x49, 0x46, 0xeb, 0x10, 0x7e, 0xa5,
0x4f, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x54, 0x10, 0x16, 0x1a, 0x8e, 0x02, 0x00, 0x00,
}

View File

@@ -0,0 +1,29 @@
syntax = "proto3";
package model;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option (gogoproto.goproto_enum_prefix_all) = false;
option (gogoproto.goproto_getters_all) = false;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
message NewEp {
string Cover = 1 [(gogoproto.jsontag) = "cover"];
int64 Dm = 2 [(gogoproto.jsontag) = "dm"];
int64 EpisodeID = 3 [(gogoproto.jsontag) = "episode_id"];
string Index = 4 [(gogoproto.jsontag) = "index"];
string IndexTitle = 5 [(gogoproto.jsontag) = "index_title"];
int64 Play = 6 [(gogoproto.jsontag) = "play"];
}
message Bangumi {
int32 BgmType = 1 [(gogoproto.jsontag) = "bgm_type"];
string Cover = 2 [(gogoproto.jsontag) = "cover"];
int32 IsFinish = 3 [(gogoproto.jsontag) = "is_finish"];
NewEp NewEp = 4 [(gogoproto.jsontag) = "new_ep", (gogoproto.nullable) = false];
int64 SeasonID = 5 [(gogoproto.jsontag) = "season_id"];
string Title = 6 [(gogoproto.jsontag) = "title"];
int64 TotalCount = 7 [(gogoproto.jsontag) = "total_count"];
int64 Ts = 8 [(gogoproto.jsontag) = "ts"];
}

View File

@@ -0,0 +1,45 @@
package model
type ArgFeed struct {
Mid int64
Pn int
Ps int
RealIP string
}
type ArgArc struct {
Aid int64
Mid int64
PubDate int64
RealIP string
}
type ArgAidMid struct {
Aid int64
Mid int64
RealIP string
}
type ArgMid struct {
Mid int64
RealIP string
}
type ArgUnreadCount struct {
Mid int64
WithoutBangumi bool
RealIP string
}
type ArgFold struct {
Aid int64
Mid int64
RealIP string
}
type ArgChangeUpper struct {
Aid int64
OldMid int64
NewMid int64
RealIP string
}