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,41 @@
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_test",
"go_library",
)
go_test(
name = "go_default_test",
srcs = ["up_test.go"],
embed = [":go_default_library"],
tags = ["automanaged"],
deps = ["//app/service/main/up/model:go_default_library"],
)
go_library(
name = "go_default_library",
srcs = ["up.go"],
importpath = "go-common/app/service/main/up/api/gorpc",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//app/service/main/up/model:go_default_library",
"//library/net/rpc: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,78 @@
package client
import (
"context"
"go-common/app/service/main/up/model"
"go-common/library/net/rpc"
)
const (
_Special = "RPC.Special"
_Info = "RPC.Info"
_UpStatBase = "RPC.UpStatBase"
_SetUpSwitch = "RPC.SetUpSwitch"
_UpSwitch = "RPC.UpSwitch"
)
const (
_appid = "archive.service.up"
)
var (
// _noRes = &struct{}{}
)
// Service rpc client
type Service struct {
client *rpc.Client2
}
// RPC rpc
type RPC interface {
// DEPRECATED: Please use gRPC service of func UpGroupMids instead, but must get datas in many times by one time of max 1000.
Special(c context.Context, arg *model.ArgSpecial) (res []*model.UpSpecial, err error)
// DEPRECATED: Please use gRPC service of func UpAttr instead.
Info(c context.Context, arg *model.ArgInfo) (res *model.UpInfo, err error)
}
// New create
func New(c *rpc.ClientConfig) (s *Service) {
s = &Service{}
s.client = rpc.NewDiscoveryCli(_appid, c)
return
}
// Special special
// DEPRECATED: Please use gRPC service of func UpGroupMids instead, but must get datas in many times by one time of max 1000.
func (s *Service) Special(c context.Context, arg *model.ArgSpecial) (res []*model.UpSpecial, err error) {
err = s.client.Call(c, _Special, arg, &res)
return
}
// Info info
// DEPRECATED: Please use gRPC service of func UpAttr instead.
func (s *Service) Info(c context.Context, arg *model.ArgInfo) (res *model.UpInfo, err error) {
err = s.client.Call(c, _Info, arg, &res)
return
}
// UpStatBase base statis
// DEPRECATED: Please use gRPC service func UpBaseStats instead.
func (s *Service) UpStatBase(c context.Context, arg *model.ArgMidWithDate) (res *model.UpBaseStat, err error) {
err = s.client.Call(c, _UpStatBase, arg, &res)
return
}
// SetUpSwitch set up switch
// DEPRECATED: Please use gRPC service func SetUpSwitch instead.
func (s *Service) SetUpSwitch(c context.Context, arg *model.ArgUpSwitch) (res *model.PBSetUpSwitchRes, err error) {
err = s.client.Call(c, _SetUpSwitch, arg, &res)
return
}
// UpSwitch get up switch
// DEPRECATED: Please use gRPC service func UpSwitch instead.
func (s *Service) UpSwitch(c context.Context, arg *model.ArgUpSwitch) (res *model.PBUpSwitch, err error) {
err = s.client.Call(c, _UpSwitch, arg, &res)
return
}

View File

@@ -0,0 +1,48 @@
package client
import (
"context"
"testing"
"time"
"go-common/app/service/main/up/model"
)
func TestRpcClient(t *testing.T) {
s := New(nil)
time.Sleep(1 * time.Second)
testInfo(t, s)
testSpecial(t, s)
testUpStatBase(t, s)
testUpSwitch(t, s)
}
func testInfo(t *testing.T, s *Service) {
arg := model.ArgInfo{
Mid: 2089809,
From: 1,
}
t.Log(s.Info(context.TODO(), &arg))
}
func testSpecial(t *testing.T, s *Service) {
arg := model.ArgSpecial{
GroupID: 1,
}
t.Log(s.Special(context.TODO(), &arg))
}
func testUpStatBase(t *testing.T, s *Service) {
arg := model.ArgMidWithDate{
Mid: 12345,
}
t.Log(s.UpStatBase(context.TODO(), &arg))
}
func testUpSwitch(t *testing.T, s *Service) {
arg := model.ArgUpSwitch{
Mid: 1,
From: 0,
}
t.Log(s.UpSwitch(context.TODO(), &arg))
}

View File

@@ -0,0 +1,83 @@
load(
"@io_bazel_rules_go//proto:def.bzl",
"go_proto_library",
)
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
proto_library(
name = "v1_proto",
srcs = [
"api.proto",
"archive.proto",
"reply.proto",
"request.proto",
"sign_up.proto",
"up.proto",
],
tags = ["automanaged"],
deps = [
"//app/service/main/archive/api:api_proto",
"@go_googleapis//google/api:annotations_proto",
"@gogo_special_proto//github.com/gogo/protobuf/gogoproto",
],
)
go_proto_library(
name = "v1_go_proto",
compilers = ["@io_bazel_rules_go//proto:gogofast_grpc"],
importpath = "go-common/app/service/main/up/api/v1",
proto = ":v1_proto",
tags = ["automanaged"],
deps = [
"//app/service/main/archive/api:api_go_proto",
"//library/time:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@go_googleapis//google/api:annotations_go_proto",
],
)
go_library(
name = "go_default_library",
srcs = [
"api.pb.bm.go",
"client.go",
"mock.go",
],
embed = [":v1_go_proto"],
importpath = "go-common/app/service/main/up/api/v1",
tags = ["automanaged"],
visibility = ["//visibility:public"],
deps = [
"//app/service/main/archive/api:go_default_library",
"//app/tool/protoc-gen-bm/jsonpb:go_default_library",
"//library/net/http/blademaster:go_default_library",
"//library/net/rpc/warden:go_default_library",
"//library/time:go_default_library",
"//vendor/github.com/golang/mock/gomock:go_default_library",
"//vendor/google.golang.org/genproto/googleapis/api/annotations:go_default_library",
"@com_github_gogo_protobuf//gogoproto:go_default_library",
"@com_github_gogo_protobuf//proto:go_default_library",
"@org_golang_google_grpc//:go_default_library",
"@org_golang_x_net//context: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,98 @@
// Package v1 Code generated by go-common/app/tool/protoc-gen-bm. DO NOT EDIT.
package v1
import (
"bytes"
"context"
"encoding/json"
"go-common/app/tool/protoc-gen-bm/jsonpb"
bm "go-common/library/net/http/blademaster"
)
// BMUpServer interface as same as gGRPC server define
type BMUpServer interface {
UpArcs(context.Context, *UpArcsReq) (*UpArcsReply, error)
UpsArcs(context.Context, *UpsArcsReq) (*UpsArcsReply, error)
UpCount(context.Context, *UpCountReq) (*UpCountReply, error)
UpsCount(context.Context, *UpsCountReq) (*UpsCountReply, error)
}
// _BMServerUpserver
type _BMServerUp struct {
BMUpServer
}
func (b *_BMServerUp) bmUpUpArcsHandler(c *bm.Context) {
req := new(UpArcsReq)
if err := c.Bind(req); err != nil {
return
}
reply, err := b.UpArcs(c.Context, req)
if err != nil {
c.JSON(nil, err)
return
}
body := &bytes.Buffer{}
marshaler := jsonpb.Marshaler{EmitDefaults: true, OrigName: true}
err = marshaler.Marshal(body, reply)
c.JSON(json.RawMessage(body.Bytes()), err)
}
func (b *_BMServerUp) bmUpUpsArcsHandler(c *bm.Context) {
req := new(UpsArcsReq)
if err := c.Bind(req); err != nil {
return
}
reply, err := b.UpsArcs(c.Context, req)
if err != nil {
c.JSON(nil, err)
return
}
body := &bytes.Buffer{}
marshaler := jsonpb.Marshaler{EmitDefaults: true, OrigName: true}
err = marshaler.Marshal(body, reply)
c.JSON(json.RawMessage(body.Bytes()), err)
}
func (b *_BMServerUp) bmUpUpCountHandler(c *bm.Context) {
req := new(UpCountReq)
if err := c.Bind(req); err != nil {
return
}
reply, err := b.UpCount(c.Context, req)
if err != nil {
c.JSON(nil, err)
return
}
body := &bytes.Buffer{}
marshaler := jsonpb.Marshaler{EmitDefaults: true, OrigName: true}
err = marshaler.Marshal(body, reply)
c.JSON(json.RawMessage(body.Bytes()), err)
}
func (b *_BMServerUp) bmUpUpsCountHandler(c *bm.Context) {
req := new(UpsCountReq)
if err := c.Bind(req); err != nil {
return
}
reply, err := b.UpsCount(c.Context, req)
if err != nil {
c.JSON(nil, err)
return
}
body := &bytes.Buffer{}
marshaler := jsonpb.Marshaler{EmitDefaults: true, OrigName: true}
err = marshaler.Marshal(body, reply)
c.JSON(json.RawMessage(body.Bytes()), err)
}
// RegisterUpBMServer register bm server
func RegisterUpBMServer(e *bm.Engine, s BMUpServer) {
bs := &_BMServerUp{s}
e.GET("/x/internal/uper/archive/up/passed", bs.bmUpUpArcsHandler)
e.GET("/x/internal/uper/archive/ups/passed", bs.bmUpUpsArcsHandler)
e.GET("/x/internal/uper/archive/up/count", bs.bmUpUpCountHandler)
e.GET("/x/internal/uper/archive/ups/count", bs.bmUpUpsCountHandler)
}

View File

@@ -0,0 +1,821 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: app/service/main/up/api/v1/api.proto
/*
Package v1 is a generated protocol buffer package.
It is generated from these files:
app/service/main/up/api/v1/api.proto
app/service/main/up/api/v1/archive.proto
app/service/main/up/api/v1/reply.proto
app/service/main/up/api/v1/request.proto
app/service/main/up/api/v1/sign_up.proto
app/service/main/up/api/v1/up.proto
It has these top-level messages:
AidPubTime
NoReply
UpArcsReply
UpsArcsReply
UpCountReply
UpsCountReply
UpAidPubTimeReply
UpsAidPubTimeReply
UpActivityListReply
UpGroupsReply
UpSpecialReply
UpsSpecialReply
UpGroupMidsReply
UpAttrReply
UpBaseStatReply
UpSwitchReply
HighAllyUpsReply
NoArgReq
UpArcsReq
UpsArcsReq
UpCountReq
UpsCountReq
UpCacheReq
UpListByLastIDReq
UpSpecialReq
UpsSpecialReq
UpGroupMidsReq
UpAttrReq
UpStatReq
UpSwitchReq
HighAllyUpsReq
SignUp
UpActivity
UpGroup
UpSpecial
*/
package v1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import _ "github.com/gogo/protobuf/gogoproto"
import context "golang.org/x/net/context"
import grpc "google.golang.org/grpc"
// 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.GoGoProtoPackageIsVersion2 // please upgrade the proto package
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Up service
type UpClient interface {
// UpArcs 单个up主的稿件列表接口-带分页
UpArcs(ctx context.Context, in *UpArcsReq, opts ...grpc.CallOption) (*UpArcsReply, error)
// UpsArcs 多个up主的稿件列表接口-带分页
UpsArcs(ctx context.Context, in *UpsArcsReq, opts ...grpc.CallOption) (*UpsArcsReply, error)
// UpCount 单个up主的稿件计数接口
UpCount(ctx context.Context, in *UpCountReq, opts ...grpc.CallOption) (*UpCountReply, error)
// UpsCount 多个up主的稿件计数接口
UpsCount(ctx context.Context, in *UpsCountReq, opts ...grpc.CallOption) (*UpsCountReply, error)
// UpsAidPubTime archives 多个up主的按分布时间排序的aid接口
UpsAidPubTime(ctx context.Context, in *UpsArcsReq, opts ...grpc.CallOption) (*UpsAidPubTimeReply, error)
// AddUpPassedCacheByStaff staff变更 新增或者变更up主稿件信息列表和计数接口
AddUpPassedCacheByStaff(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error)
// AddUpPassedCache archive变更 新增或者变更up主稿件信息列表和计数接口
AddUpPassedCache(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error)
// DelUpPassedCacheByStaff staff解除 删除的up主稿件信息列表和计数接口
DelUpPassedCacheByStaff(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error)
// DelUpPassedCache archive失效 删除的up主稿件信息列表和计数接口
DelUpPassedCache(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error)
// UpInfoActivitys 获取up主活跃度列表信息的接口
UpInfoActivitys(ctx context.Context, in *UpListByLastIDReq, opts ...grpc.CallOption) (*UpActivityListReply, error)
// UpSpecial 获取up主的特殊属性信息的接口
UpSpecial(ctx context.Context, in *UpSpecialReq, opts ...grpc.CallOption) (*UpSpecialReply, error)
// UpsSpecial 获取多个up主的特殊属性信息的接口
UpsSpecial(ctx context.Context, in *UpsSpecialReq, opts ...grpc.CallOption) (*UpsSpecialReply, error)
// UpGroups 获取所有特殊用户组信息的接口
UpGroups(ctx context.Context, in *NoArgReq, opts ...grpc.CallOption) (*UpGroupsReply, error)
// UpGroupMids 获取某个分组下的所有用户的接口
UpGroupMids(ctx context.Context, in *UpGroupMidsReq, opts ...grpc.CallOption) (*UpGroupMidsReply, error)
// UpAttr 获取up主身份属性的接口
UpAttr(ctx context.Context, in *UpAttrReq, opts ...grpc.CallOption) (*UpAttrReply, error)
// UpBaseStats 获取up主基础计数的接口
UpBaseStats(ctx context.Context, in *UpStatReq, opts ...grpc.CallOption) (*UpBaseStatReply, error)
// SetUpSwitch 设置up主关注弹窗开关的接口
SetUpSwitch(ctx context.Context, in *UpSwitchReq, opts ...grpc.CallOption) (*NoReply, error)
// UpSwitch 获取up主关注弹窗开关的接口
UpSwitch(ctx context.Context, in *UpSwitchReq, opts ...grpc.CallOption) (*UpSwitchReply, error)
// GetHighAllyUps 获取高能联盟up主列表
GetHighAllyUps(ctx context.Context, in *HighAllyUpsReq, opts ...grpc.CallOption) (*HighAllyUpsReply, error)
}
type upClient struct {
cc *grpc.ClientConn
}
func NewUpClient(cc *grpc.ClientConn) UpClient {
return &upClient{cc}
}
func (c *upClient) UpArcs(ctx context.Context, in *UpArcsReq, opts ...grpc.CallOption) (*UpArcsReply, error) {
out := new(UpArcsReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpArcs", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpsArcs(ctx context.Context, in *UpsArcsReq, opts ...grpc.CallOption) (*UpsArcsReply, error) {
out := new(UpsArcsReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpsArcs", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpCount(ctx context.Context, in *UpCountReq, opts ...grpc.CallOption) (*UpCountReply, error) {
out := new(UpCountReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpCount", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpsCount(ctx context.Context, in *UpsCountReq, opts ...grpc.CallOption) (*UpsCountReply, error) {
out := new(UpsCountReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpsCount", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpsAidPubTime(ctx context.Context, in *UpsArcsReq, opts ...grpc.CallOption) (*UpsAidPubTimeReply, error) {
out := new(UpsAidPubTimeReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpsAidPubTime", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) AddUpPassedCacheByStaff(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
out := new(NoReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/AddUpPassedCacheByStaff", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) AddUpPassedCache(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
out := new(NoReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/AddUpPassedCache", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) DelUpPassedCacheByStaff(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
out := new(NoReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/DelUpPassedCacheByStaff", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) DelUpPassedCache(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
out := new(NoReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/DelUpPassedCache", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpInfoActivitys(ctx context.Context, in *UpListByLastIDReq, opts ...grpc.CallOption) (*UpActivityListReply, error) {
out := new(UpActivityListReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpInfoActivitys", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpSpecial(ctx context.Context, in *UpSpecialReq, opts ...grpc.CallOption) (*UpSpecialReply, error) {
out := new(UpSpecialReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpSpecial", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpsSpecial(ctx context.Context, in *UpsSpecialReq, opts ...grpc.CallOption) (*UpsSpecialReply, error) {
out := new(UpsSpecialReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpsSpecial", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpGroups(ctx context.Context, in *NoArgReq, opts ...grpc.CallOption) (*UpGroupsReply, error) {
out := new(UpGroupsReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpGroups", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpGroupMids(ctx context.Context, in *UpGroupMidsReq, opts ...grpc.CallOption) (*UpGroupMidsReply, error) {
out := new(UpGroupMidsReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpGroupMids", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpAttr(ctx context.Context, in *UpAttrReq, opts ...grpc.CallOption) (*UpAttrReply, error) {
out := new(UpAttrReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpAttr", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpBaseStats(ctx context.Context, in *UpStatReq, opts ...grpc.CallOption) (*UpBaseStatReply, error) {
out := new(UpBaseStatReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpBaseStats", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) SetUpSwitch(ctx context.Context, in *UpSwitchReq, opts ...grpc.CallOption) (*NoReply, error) {
out := new(NoReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/SetUpSwitch", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) UpSwitch(ctx context.Context, in *UpSwitchReq, opts ...grpc.CallOption) (*UpSwitchReply, error) {
out := new(UpSwitchReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/UpSwitch", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *upClient) GetHighAllyUps(ctx context.Context, in *HighAllyUpsReq, opts ...grpc.CallOption) (*HighAllyUpsReply, error) {
out := new(HighAllyUpsReply)
err := grpc.Invoke(ctx, "/archive.service.up.v1.Up/GetHighAllyUps", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Up service
type UpServer interface {
// UpArcs 单个up主的稿件列表接口-带分页
UpArcs(context.Context, *UpArcsReq) (*UpArcsReply, error)
// UpsArcs 多个up主的稿件列表接口-带分页
UpsArcs(context.Context, *UpsArcsReq) (*UpsArcsReply, error)
// UpCount 单个up主的稿件计数接口
UpCount(context.Context, *UpCountReq) (*UpCountReply, error)
// UpsCount 多个up主的稿件计数接口
UpsCount(context.Context, *UpsCountReq) (*UpsCountReply, error)
// UpsAidPubTime archives 多个up主的按分布时间排序的aid接口
UpsAidPubTime(context.Context, *UpsArcsReq) (*UpsAidPubTimeReply, error)
// AddUpPassedCacheByStaff staff变更 新增或者变更up主稿件信息列表和计数接口
AddUpPassedCacheByStaff(context.Context, *UpCacheReq) (*NoReply, error)
// AddUpPassedCache archive变更 新增或者变更up主稿件信息列表和计数接口
AddUpPassedCache(context.Context, *UpCacheReq) (*NoReply, error)
// DelUpPassedCacheByStaff staff解除 删除的up主稿件信息列表和计数接口
DelUpPassedCacheByStaff(context.Context, *UpCacheReq) (*NoReply, error)
// DelUpPassedCache archive失效 删除的up主稿件信息列表和计数接口
DelUpPassedCache(context.Context, *UpCacheReq) (*NoReply, error)
// UpInfoActivitys 获取up主活跃度列表信息的接口
UpInfoActivitys(context.Context, *UpListByLastIDReq) (*UpActivityListReply, error)
// UpSpecial 获取up主的特殊属性信息的接口
UpSpecial(context.Context, *UpSpecialReq) (*UpSpecialReply, error)
// UpsSpecial 获取多个up主的特殊属性信息的接口
UpsSpecial(context.Context, *UpsSpecialReq) (*UpsSpecialReply, error)
// UpGroups 获取所有特殊用户组信息的接口
UpGroups(context.Context, *NoArgReq) (*UpGroupsReply, error)
// UpGroupMids 获取某个分组下的所有用户的接口
UpGroupMids(context.Context, *UpGroupMidsReq) (*UpGroupMidsReply, error)
// UpAttr 获取up主身份属性的接口
UpAttr(context.Context, *UpAttrReq) (*UpAttrReply, error)
// UpBaseStats 获取up主基础计数的接口
UpBaseStats(context.Context, *UpStatReq) (*UpBaseStatReply, error)
// SetUpSwitch 设置up主关注弹窗开关的接口
SetUpSwitch(context.Context, *UpSwitchReq) (*NoReply, error)
// UpSwitch 获取up主关注弹窗开关的接口
UpSwitch(context.Context, *UpSwitchReq) (*UpSwitchReply, error)
// GetHighAllyUps 获取高能联盟up主列表
GetHighAllyUps(context.Context, *HighAllyUpsReq) (*HighAllyUpsReply, error)
}
func RegisterUpServer(s *grpc.Server, srv UpServer) {
s.RegisterService(&_Up_serviceDesc, srv)
}
func _Up_UpArcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpArcsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpArcs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpArcs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpArcs(ctx, req.(*UpArcsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpsArcs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpsArcsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpsArcs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpsArcs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpsArcs(ctx, req.(*UpsArcsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpCountReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpCount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpCount(ctx, req.(*UpCountReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpsCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpsCountReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpsCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpsCount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpsCount(ctx, req.(*UpsCountReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpsAidPubTime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpsArcsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpsAidPubTime(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpsAidPubTime",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpsAidPubTime(ctx, req.(*UpsArcsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_AddUpPassedCacheByStaff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpCacheReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).AddUpPassedCacheByStaff(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/AddUpPassedCacheByStaff",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).AddUpPassedCacheByStaff(ctx, req.(*UpCacheReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_AddUpPassedCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpCacheReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).AddUpPassedCache(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/AddUpPassedCache",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).AddUpPassedCache(ctx, req.(*UpCacheReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_DelUpPassedCacheByStaff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpCacheReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).DelUpPassedCacheByStaff(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/DelUpPassedCacheByStaff",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).DelUpPassedCacheByStaff(ctx, req.(*UpCacheReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_DelUpPassedCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpCacheReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).DelUpPassedCache(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/DelUpPassedCache",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).DelUpPassedCache(ctx, req.(*UpCacheReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpInfoActivitys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpListByLastIDReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpInfoActivitys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpInfoActivitys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpInfoActivitys(ctx, req.(*UpListByLastIDReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpSpecial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpSpecialReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpSpecial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpSpecial",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpSpecial(ctx, req.(*UpSpecialReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpsSpecial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpsSpecialReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpsSpecial(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpsSpecial",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpsSpecial(ctx, req.(*UpsSpecialReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NoArgReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpGroups(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpGroups",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpGroups(ctx, req.(*NoArgReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpGroupMids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpGroupMidsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpGroupMids(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpGroupMids",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpGroupMids(ctx, req.(*UpGroupMidsReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpAttr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpAttrReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpAttr(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpAttr",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpAttr(ctx, req.(*UpAttrReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpBaseStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpStatReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpBaseStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpBaseStats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpBaseStats(ctx, req.(*UpStatReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_SetUpSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpSwitchReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).SetUpSwitch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/SetUpSwitch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).SetUpSwitch(ctx, req.(*UpSwitchReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_UpSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpSwitchReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).UpSwitch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/UpSwitch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).UpSwitch(ctx, req.(*UpSwitchReq))
}
return interceptor(ctx, in, info, handler)
}
func _Up_GetHighAllyUps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HighAllyUpsReq)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UpServer).GetHighAllyUps(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/archive.service.up.v1.Up/GetHighAllyUps",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UpServer).GetHighAllyUps(ctx, req.(*HighAllyUpsReq))
}
return interceptor(ctx, in, info, handler)
}
var _Up_serviceDesc = grpc.ServiceDesc{
ServiceName: "archive.service.up.v1.Up",
HandlerType: (*UpServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpArcs",
Handler: _Up_UpArcs_Handler,
},
{
MethodName: "UpsArcs",
Handler: _Up_UpsArcs_Handler,
},
{
MethodName: "UpCount",
Handler: _Up_UpCount_Handler,
},
{
MethodName: "UpsCount",
Handler: _Up_UpsCount_Handler,
},
{
MethodName: "UpsAidPubTime",
Handler: _Up_UpsAidPubTime_Handler,
},
{
MethodName: "AddUpPassedCacheByStaff",
Handler: _Up_AddUpPassedCacheByStaff_Handler,
},
{
MethodName: "AddUpPassedCache",
Handler: _Up_AddUpPassedCache_Handler,
},
{
MethodName: "DelUpPassedCacheByStaff",
Handler: _Up_DelUpPassedCacheByStaff_Handler,
},
{
MethodName: "DelUpPassedCache",
Handler: _Up_DelUpPassedCache_Handler,
},
{
MethodName: "UpInfoActivitys",
Handler: _Up_UpInfoActivitys_Handler,
},
{
MethodName: "UpSpecial",
Handler: _Up_UpSpecial_Handler,
},
{
MethodName: "UpsSpecial",
Handler: _Up_UpsSpecial_Handler,
},
{
MethodName: "UpGroups",
Handler: _Up_UpGroups_Handler,
},
{
MethodName: "UpGroupMids",
Handler: _Up_UpGroupMids_Handler,
},
{
MethodName: "UpAttr",
Handler: _Up_UpAttr_Handler,
},
{
MethodName: "UpBaseStats",
Handler: _Up_UpBaseStats_Handler,
},
{
MethodName: "SetUpSwitch",
Handler: _Up_SetUpSwitch_Handler,
},
{
MethodName: "UpSwitch",
Handler: _Up_UpSwitch_Handler,
},
{
MethodName: "GetHighAllyUps",
Handler: _Up_GetHighAllyUps_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "app/service/main/up/api/v1/api.proto",
}
func init() { proto.RegisterFile("app/service/main/up/api/v1/api.proto", fileDescriptorApi) }
var fileDescriptorApi = []byte{
// 613 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x95, 0xdf, 0x6a, 0x14, 0x3d,
0x18, 0x87, 0xd9, 0x1e, 0xf4, 0xfb, 0x4c, 0xb1, 0x96, 0x80, 0x14, 0x16, 0x59, 0xed, 0xfe, 0xa9,
0x6d, 0xc5, 0x19, 0x56, 0xaf, 0x60, 0xb7, 0x85, 0x5a, 0xa8, 0xa5, 0xba, 0x0d, 0x42, 0x69, 0xc1,
0xec, 0x6c, 0x76, 0x36, 0x30, 0x3b, 0x79, 0x9b, 0x64, 0x46, 0x47, 0x44, 0xc4, 0x5b, 0xf0, 0xa6,
0x3c, 0x12, 0xc1, 0x1b, 0x90, 0xc5, 0x0b, 0x91, 0x64, 0x66, 0x4b, 0x2d, 0x4e, 0x66, 0x85, 0x7a,
0xd4, 0xce, 0xe4, 0xc9, 0xf3, 0x4b, 0xde, 0x77, 0x92, 0x45, 0x6d, 0x0a, 0xe0, 0x2b, 0x26, 0x53,
0x1e, 0x30, 0x7f, 0x4a, 0x79, 0xec, 0x27, 0xe0, 0x53, 0xe0, 0x7e, 0xda, 0x35, 0x7f, 0x3c, 0x90,
0x42, 0x0b, 0x7c, 0x97, 0xca, 0x60, 0xc2, 0x53, 0xe6, 0x15, 0xa4, 0x97, 0x80, 0x97, 0x76, 0xeb,
0x5b, 0x8e, 0xc9, 0x92, 0x5d, 0x24, 0x4c, 0xe9, 0x5c, 0x50, 0xdf, 0x74, 0x92, 0x10, 0x65, 0x05,
0x77, 0x2f, 0x14, 0x22, 0x8c, 0x98, 0x1d, 0xa2, 0x71, 0x2c, 0x34, 0xd5, 0x5c, 0xc4, 0xaa, 0x18,
0x7d, 0x1c, 0x72, 0x3d, 0x49, 0x86, 0x5e, 0x20, 0xa6, 0x7e, 0x28, 0x42, 0xe1, 0xdb, 0xd7, 0xc3,
0x64, 0x6c, 0x9f, 0xec, 0x83, 0xfd, 0x2f, 0xc7, 0x9f, 0x7c, 0x5d, 0x45, 0x4b, 0x04, 0xf0, 0x3b,
0xb4, 0x4c, 0xa0, 0x27, 0x03, 0x85, 0x1f, 0x78, 0x7f, 0xdc, 0x87, 0x97, 0x0f, 0xbf, 0x64, 0x17,
0xf5, 0x66, 0x05, 0x01, 0x51, 0xd6, 0xdc, 0xf9, 0xf4, 0xfd, 0xe7, 0xe7, 0xa5, 0x36, 0x6e, 0xfa,
0x6f, 0x7d, 0x1e, 0x6b, 0x26, 0x63, 0x1a, 0xf9, 0x09, 0x30, 0xe9, 0x17, 0x73, 0xcd, 0xde, 0x80,
0x2a, 0xc5, 0x46, 0xf8, 0x03, 0xfa, 0x8f, 0x80, 0xb2, 0xe1, 0x1b, 0xa5, 0x6a, 0x35, 0x4f, 0x6f,
0x55, 0x21, 0x26, 0xfe, 0x91, 0x8d, 0xef, 0xe0, 0x96, 0x23, 0x5e, 0xcd, 0xf3, 0xdf, 0x9b, 0xfc,
0x5d, 0x91, 0xc4, 0xda, 0x91, 0x6f, 0xc7, 0xdd, 0xf9, 0x05, 0x62, 0xf2, 0xb7, 0x6d, 0x7e, 0x0b,
0x6f, 0xb8, 0xb6, 0x1f, 0xd8, 0xc8, 0x8f, 0x35, 0xf4, 0x3f, 0x01, 0x95, 0xe7, 0x97, 0x97, 0x56,
0x5d, 0x2e, 0xa0, 0x5d, 0xc9, 0x2c, 0xda, 0x00, 0x55, 0x2c, 0xe1, 0x1c, 0xdd, 0x36, 0xd5, 0xe3,
0xa3, 0xe3, 0x64, 0x78, 0xc2, 0xa7, 0x6c, 0x91, 0x36, 0x6c, 0x3b, 0x90, 0x4b, 0x91, 0x5d, 0x0a,
0x3e, 0x43, 0xeb, 0xbd, 0xd1, 0x88, 0xc0, 0xb1, 0x2d, 0xf7, 0x2e, 0x0d, 0x26, 0xac, 0x9f, 0x0d,
0x34, 0x1d, 0x8f, 0x5d, 0xf5, 0x36, 0x98, 0x09, 0x6a, 0x94, 0x20, 0x47, 0x22, 0xb7, 0x13, 0xb4,
0x76, 0xdd, 0x7e, 0x13, 0xda, 0x33, 0xb4, 0xbe, 0xc7, 0xa2, 0x7f, 0xb8, 0xe8, 0xeb, 0xf6, 0x9b,
0xd0, 0x86, 0xe8, 0x0e, 0x81, 0x83, 0x78, 0x2c, 0x7a, 0x81, 0xe6, 0x29, 0xd7, 0x99, 0xc2, 0x5b,
0xa5, 0xd6, 0x43, 0xae, 0x74, 0x3f, 0x3b, 0xa4, 0x4a, 0x1f, 0xec, 0x19, 0xf9, 0x4e, 0xf9, 0xb1,
0x2e, 0x6c, 0x66, 0x46, 0x1e, 0xf4, 0x0a, 0xdd, 0x22, 0x30, 0x00, 0x16, 0x70, 0x1a, 0xe1, 0xf2,
0x13, 0x51, 0x10, 0xc6, 0xde, 0xa9, 0x86, 0x8c, 0xf8, 0x14, 0x21, 0x02, 0x6a, 0x6e, 0x76, 0x7c,
0xea, 0x57, 0xd4, 0x9b, 0x0b, 0x50, 0xc6, 0xfd, 0xc2, 0x1c, 0xb4, 0x7d, 0x29, 0x12, 0x50, 0xf8,
0x7e, 0x69, 0x25, 0x7b, 0x32, 0x74, 0x9f, 0xb2, 0xdc, 0x90, 0x2b, 0xcf, 0xd1, 0x4a, 0xf1, 0xe2,
0x39, 0x1f, 0x29, 0xdc, 0x71, 0x4f, 0x32, 0x8c, 0x71, 0x3f, 0x5c, 0x04, 0x33, 0xfa, 0x23, 0x7b,
0x2b, 0x6b, 0x2d, 0x5d, 0xb7, 0xb2, 0xd6, 0xb2, 0xe2, 0x56, 0xb6, 0x44, 0xde, 0xb6, 0x15, 0x02,
0x7d, 0xaa, 0xd8, 0x40, 0x53, 0xed, 0xba, 0xea, 0xcd, 0xb8, 0xbb, 0xb4, 0x73, 0xcb, 0xbc, 0xb4,
0x2b, 0x03, 0xa6, 0x09, 0x0c, 0xde, 0x70, 0x1d, 0x4c, 0x1c, 0xd7, 0x58, 0x0e, 0x2c, 0xf2, 0x2d,
0x9f, 0x98, 0x6e, 0xfd, 0x85, 0xaf, 0x5d, 0xc9, 0x18, 0xeb, 0x6b, 0xb4, 0xba, 0xcf, 0xf4, 0x33,
0x1e, 0x4e, 0x7a, 0x51, 0x94, 0x11, 0x28, 0xef, 0xd9, 0x15, 0xc6, 0xd5, 0xb3, 0xdf, 0x30, 0x88,
0xb2, 0xfe, 0xda, 0x97, 0x59, 0xa3, 0xf6, 0x6d, 0xd6, 0xa8, 0xfd, 0x98, 0x35, 0x6a, 0xa7, 0x4b,
0x69, 0x77, 0xb8, 0x6c, 0x7f, 0x69, 0x9f, 0xfe, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x84, 0x1b,
0x65, 0x47, 0x08, 0x00, 0x00,
}

View File

@@ -0,0 +1,68 @@
syntax = "proto3";
package archive.service.up.v1;
import "app/service/main/up/api/v1/request.proto";
import "app/service/main/up/api/v1/reply.proto";
import "google/api/annotations.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "v1";
// Up up主相关的稿件接口
service Up {
// UpArcs 单个up主的稿件列表接口-带分页
rpc UpArcs(UpArcsReq) returns (UpArcsReply) {
option (google.api.http) = {
get: "/x/internal/uper/archive/up/passed"
};
}
// UpsArcs 多个up主的稿件列表接口-带分页
rpc UpsArcs(UpsArcsReq) returns (UpsArcsReply) {
option (google.api.http) = {
get: "/x/internal/uper/archive/ups/passed"
};
}
// UpCount 单个up主的稿件计数接口
rpc UpCount(UpCountReq) returns (UpCountReply) {
option (google.api.http) = {
get: "/x/internal/uper/archive/up/count"
};
}
// UpsCount 多个up主的稿件计数接口
rpc UpsCount(UpsCountReq) returns (UpsCountReply) {
option (google.api.http) = {
get: "/x/internal/uper/archive/ups/count"
};
}
// UpsAidPubTime archives 多个up主的按分布时间排序的aid接口
rpc UpsAidPubTime(UpsArcsReq) returns (UpsAidPubTimeReply);
// AddUpPassedCacheByStaff staff变更 新增或者变更up主稿件信息列表和计数接口
rpc AddUpPassedCacheByStaff(UpCacheReq) returns (NoReply);
// AddUpPassedCache archive变更 新增或者变更up主稿件信息列表和计数接口
rpc AddUpPassedCache(UpCacheReq) returns (NoReply);
// DelUpPassedCacheByStaff staff解除 删除的up主稿件信息列表和计数接口
rpc DelUpPassedCacheByStaff(UpCacheReq) returns (NoReply);
// DelUpPassedCache archive失效 删除的up主稿件信息列表和计数接口
rpc DelUpPassedCache(UpCacheReq) returns (NoReply);
// UpInfoActivitys 获取up主活跃度列表信息的接口
rpc UpInfoActivitys(UpListByLastIDReq) returns (UpActivityListReply);
// UpSpecial 获取up主的特殊属性信息的接口
rpc UpSpecial(UpSpecialReq) returns (UpSpecialReply);
// UpsSpecial 获取多个up主的特殊属性信息的接口
rpc UpsSpecial(UpsSpecialReq) returns (UpsSpecialReply);
// UpGroups 获取所有特殊用户组信息的接口
rpc UpGroups(NoArgReq) returns (UpGroupsReply);
// UpGroupMids 获取某个分组下的所有用户的接口
rpc UpGroupMids(UpGroupMidsReq) returns (UpGroupMidsReply);
// UpAttr 获取up主身份属性的接口
rpc UpAttr(UpAttrReq) returns (UpAttrReply);
// UpBaseStats 获取up主基础计数的接口
rpc UpBaseStats(UpStatReq) returns (UpBaseStatReply);
// SetUpSwitch 设置up主关注弹窗开关的接口
rpc SetUpSwitch(UpSwitchReq) returns (NoReply);
// UpSwitch 获取up主关注弹窗开关的接口
rpc UpSwitch(UpSwitchReq) returns (UpSwitchReply);
// GetHighAllyUps 获取高能联盟up主列表
rpc GetHighAllyUps(HighAllyUpsReq) returns (HighAllyUpsReply);
}

View File

@@ -0,0 +1,487 @@
{
"swagger": "2.0",
"info": {
"title": "app/service/main/up/api/v1/api.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/x/internal/uper/archive/up/count": {
"get": {
"summary": "UpCount 单个up主的稿件计数接口",
"operationId": "UpCount",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpCountReply"
}
}
},
"parameters": [
{
"name": "mid",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
}
],
"tags": [
"Up"
]
}
},
"/x/internal/uper/archive/up/passed": {
"get": {
"summary": "UpArcs 单个up主的稿件列表接口-带分页",
"operationId": "UpArcs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpArcsReply"
}
}
},
"parameters": [
{
"name": "mid",
"description": "mid 用户id 必传.",
"in": "query",
"required": false,
"type": "string",
"format": "int64"
},
{
"name": "pn",
"description": "pn 第几页 非必传.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "ps",
"description": "ps 分页大小 非必传.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"Up"
]
}
},
"/x/internal/uper/archive/ups/count": {
"get": {
"summary": "UpsCount 多个up主的稿件计数接口",
"operationId": "UpsCount",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpsCountReply"
}
}
},
"parameters": [
{
"name": "mids",
"description": "mids 多个用户id 必传 最大100个.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string",
"format": "int64"
}
}
],
"tags": [
"Up"
]
}
},
"/x/internal/uper/archive/ups/passed": {
"get": {
"summary": "UpsArcs 多个up主的稿件列表接口-带分页",
"operationId": "UpsArcs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UpsArcsReply"
}
}
},
"parameters": [
{
"name": "mids",
"description": "mids 多个用户id 必传 最大100个.",
"in": "query",
"required": false,
"type": "array",
"items": {
"type": "string",
"format": "int64"
}
},
{
"name": "pn",
"description": "pn 第几页 非必传.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "ps",
"description": "ps 分页大小 非必传.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"Up"
]
}
}
},
"definitions": {
"v1AidPubTime": {
"type": "object",
"properties": {
"Aid": {
"type": "string",
"format": "int64",
"title": "Aid 稿件aid"
},
"PubDate": {
"type": "string",
"format": "int64",
"title": "PubDate 发布时间"
},
"Copyright": {
"type": "integer",
"format": "int32",
"title": "Copyright 版权来源"
}
},
"title": "AidPubTime 发布时间的稿件aid的信息"
},
"v1Arc": {
"type": "object",
"properties": {
"Aid": {
"type": "string",
"format": "int64"
},
"Videos": {
"type": "string",
"format": "int64"
},
"TypeID": {
"type": "integer",
"format": "int32"
},
"TypeName": {
"type": "string"
},
"Copyright": {
"type": "integer",
"format": "int32"
},
"Pic": {
"type": "string"
},
"Title": {
"type": "string"
},
"PubDate": {
"type": "string",
"format": "int64"
},
"Ctime": {
"type": "string",
"format": "int64"
},
"Desc": {
"type": "string"
},
"State": {
"type": "integer",
"format": "int32"
},
"Access": {
"type": "integer",
"format": "int32"
},
"Attribute": {
"type": "integer",
"format": "int32"
},
"Tag": {
"type": "string"
},
"Tags": {
"type": "array",
"items": {
"type": "string"
}
},
"Duration": {
"type": "string",
"format": "int64"
},
"MissionID": {
"type": "string",
"format": "int64"
},
"OrderID": {
"type": "string",
"format": "int64"
},
"RedirectURL": {
"type": "string"
},
"Forward": {
"type": "string",
"format": "int64"
},
"Rights": {
"$ref": "#/definitions/v1Rights"
},
"Author": {
"$ref": "#/definitions/v1Author"
},
"Stat": {
"$ref": "#/definitions/v1Stat"
},
"ReportResult": {
"type": "string"
},
"Dynamic": {
"type": "string"
},
"FirstCid": {
"type": "string",
"format": "int64"
},
"Dimension": {
"$ref": "#/definitions/v1Dimension"
}
}
},
"v1Author": {
"type": "object",
"properties": {
"Mid": {
"type": "string",
"format": "int64"
},
"Name": {
"type": "string"
},
"Face": {
"type": "string"
}
}
},
"v1Dimension": {
"type": "object",
"properties": {
"Width": {
"type": "string",
"format": "int64"
},
"Height": {
"type": "string",
"format": "int64"
},
"Rotate": {
"type": "string",
"format": "int64"
}
}
},
"v1NoReply": {
"type": "object",
"title": "NoReply 没有返回值"
},
"v1Rights": {
"type": "object",
"properties": {
"Bp": {
"type": "integer",
"format": "int32"
},
"Elec": {
"type": "integer",
"format": "int32"
},
"Download": {
"type": "integer",
"format": "int32"
},
"Movie": {
"type": "integer",
"format": "int32"
},
"Pay": {
"type": "integer",
"format": "int32"
},
"HD5": {
"type": "integer",
"format": "int32"
},
"NoReprint": {
"type": "integer",
"format": "int32"
},
"Autoplay": {
"type": "integer",
"format": "int32"
},
"UGCPay": {
"type": "integer",
"format": "int32"
}
}
},
"v1Stat": {
"type": "object",
"properties": {
"Aid": {
"type": "string",
"format": "int64"
},
"View": {
"type": "integer",
"format": "int32"
},
"Danmaku": {
"type": "integer",
"format": "int32"
},
"Reply": {
"type": "integer",
"format": "int32"
},
"Fav": {
"type": "integer",
"format": "int32"
},
"Coin": {
"type": "integer",
"format": "int32"
},
"Share": {
"type": "integer",
"format": "int32"
},
"NowRank": {
"type": "integer",
"format": "int32"
},
"HisRank": {
"type": "integer",
"format": "int32"
},
"Like": {
"type": "integer",
"format": "int32"
},
"DisLike": {
"type": "integer",
"format": "int32"
}
}
},
"v1UpAidPubTimeReply": {
"type": "object",
"properties": {
"archives": {
"type": "array",
"items": {
"$ref": "#/definitions/v1AidPubTime"
}
}
},
"title": "UpAidPubTimeReply 按发布时间的单个up的稿件aid的返回值"
},
"v1UpArcsReply": {
"type": "object",
"properties": {
"archives": {
"type": "array",
"items": {
"$ref": "#/definitions/v1Arc"
}
}
},
"title": "UpArcsReply 单个up主的稿件信息列表返回值"
},
"v1UpCountReply": {
"type": "object",
"properties": {
"count": {
"type": "string",
"format": "int64"
}
},
"title": "UpCountReply 单个up主的稿件计数返回值"
},
"v1UpsAidPubTimeReply": {
"type": "object",
"properties": {
"archives": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1UpAidPubTimeReply"
}
}
},
"title": "UpsAidPubTimeReply 按发布时间的多个up的稿件aid的返回值"
},
"v1UpsArcsReply": {
"type": "object",
"properties": {
"archives": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/v1UpArcsReply"
}
}
},
"title": "UpsArcsReply 多个up主的稿件信息列表返回值"
},
"v1UpsCountReply": {
"type": "object",
"properties": {
"count": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "int64"
}
}
},
"title": "UpsCountReply 多个up主的稿件计数返回值"
}
}
}

View File

@@ -0,0 +1,361 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: app/service/main/up/api/v1/archive.proto
package v1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import go_common_library_time "go-common/library/time"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// AidPubTime 发布时间的稿件aid的信息
type AidPubTime struct {
// aid 稿件aid
Aid int64 `protobuf:"varint,1,opt,name=aid,proto3" json:"aid"`
// pub_date 发布时间
PubDate go_common_library_time.Time `protobuf:"varint,2,opt,name=pub_date,json=pubDate,proto3,casttype=go-common/library/time.Time" json:"pubdate"`
// copyright 版权来源
Copyright int32 `protobuf:"varint,3,opt,name=copyright,proto3" json:"copyright"`
}
func (m *AidPubTime) Reset() { *m = AidPubTime{} }
func (m *AidPubTime) String() string { return proto.CompactTextString(m) }
func (*AidPubTime) ProtoMessage() {}
func (*AidPubTime) Descriptor() ([]byte, []int) { return fileDescriptorArchive, []int{0} }
func (m *AidPubTime) GetAid() int64 {
if m != nil {
return m.Aid
}
return 0
}
func (m *AidPubTime) GetPubDate() go_common_library_time.Time {
if m != nil {
return m.PubDate
}
return 0
}
func (m *AidPubTime) GetCopyright() int32 {
if m != nil {
return m.Copyright
}
return 0
}
func init() {
proto.RegisterType((*AidPubTime)(nil), "archive.service.up.v1.AidPubTime")
}
func (m *AidPubTime) 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 *AidPubTime) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Aid != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintArchive(dAtA, i, uint64(m.Aid))
}
if m.PubDate != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintArchive(dAtA, i, uint64(m.PubDate))
}
if m.Copyright != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintArchive(dAtA, i, uint64(m.Copyright))
}
return i, nil
}
func encodeVarintArchive(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 *AidPubTime) Size() (n int) {
var l int
_ = l
if m.Aid != 0 {
n += 1 + sovArchive(uint64(m.Aid))
}
if m.PubDate != 0 {
n += 1 + sovArchive(uint64(m.PubDate))
}
if m.Copyright != 0 {
n += 1 + sovArchive(uint64(m.Copyright))
}
return n
}
func sovArchive(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozArchive(x uint64) (n int) {
return sovArchive(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *AidPubTime) 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 ErrIntOverflowArchive
}
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: AidPubTime: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: AidPubTime: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Aid", wireType)
}
m.Aid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowArchive
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Aid |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field PubDate", wireType)
}
m.PubDate = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowArchive
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.PubDate |= (go_common_library_time.Time(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Copyright", wireType)
}
m.Copyright = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowArchive
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Copyright |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipArchive(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthArchive
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipArchive(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, ErrIntOverflowArchive
}
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, ErrIntOverflowArchive
}
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, ErrIntOverflowArchive
}
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, ErrInvalidLengthArchive
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowArchive
}
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 := skipArchive(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 (
ErrInvalidLengthArchive = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowArchive = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("app/service/main/up/api/v1/archive.proto", fileDescriptorArchive) }
var fileDescriptorArchive = []byte{
// 255 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x44, 0x8e, 0x41, 0x4a, 0xc4, 0x30,
0x14, 0x86, 0xc9, 0x14, 0x1d, 0x0d, 0x08, 0x52, 0x10, 0xaa, 0x42, 0x3b, 0xb8, 0x2a, 0xca, 0xf4,
0x51, 0x3c, 0x81, 0x45, 0xf7, 0x52, 0x5c, 0xb9, 0x91, 0xa4, 0x8d, 0xed, 0x03, 0x33, 0x09, 0x31,
0x29, 0xcc, 0x59, 0xbc, 0x90, 0x4b, 0x4f, 0x50, 0xa4, 0xcb, 0x1e, 0xc1, 0x95, 0x24, 0x3a, 0xcc,
0x26, 0xfc, 0xdf, 0x9f, 0x8f, 0x9f, 0x47, 0x73, 0xa6, 0x35, 0xbc, 0x0b, 0x33, 0x60, 0x23, 0x40,
0x32, 0xdc, 0x80, 0xd3, 0xc0, 0x34, 0xc2, 0x50, 0x02, 0x33, 0x4d, 0x8f, 0x83, 0x28, 0xb4, 0x51,
0x56, 0xc5, 0x67, 0x3b, 0xfc, 0xb7, 0x0b, 0xa7, 0x8b, 0xa1, 0xbc, 0x58, 0x77, 0x68, 0x7b, 0xc7,
0x8b, 0x46, 0x49, 0xe8, 0x54, 0xa7, 0x20, 0xd8, 0xdc, 0xbd, 0x06, 0x0a, 0x10, 0xd2, 0xdf, 0xca,
0xd5, 0x07, 0xa1, 0xf4, 0x0e, 0xdb, 0x47, 0xc7, 0x9f, 0x50, 0x8a, 0xf8, 0x9c, 0x46, 0x0c, 0xdb,
0x84, 0xac, 0x48, 0x1e, 0x55, 0xcb, 0x79, 0xcc, 0x3c, 0xd6, 0xfe, 0x89, 0x1f, 0xe8, 0x91, 0x76,
0xfc, 0xa5, 0x65, 0x56, 0x24, 0x8b, 0xf0, 0x7f, 0x3d, 0x8f, 0xd9, 0x52, 0x3b, 0xee, 0xab, 0x9f,
0x31, 0xbb, 0xec, 0xd4, 0xba, 0x51, 0x52, 0xaa, 0x0d, 0xbc, 0x21, 0x37, 0xcc, 0x6c, 0xc1, 0xa2,
0x14, 0x85, 0x1f, 0xae, 0xbd, 0x77, 0xcf, 0xac, 0x88, 0x6f, 0xe8, 0x71, 0xa3, 0xf4, 0xd6, 0x60,
0xd7, 0xdb, 0x24, 0x5a, 0x91, 0xfc, 0xa0, 0x3a, 0x99, 0xc7, 0x6c, 0x5f, 0xd6, 0xfb, 0x58, 0x9d,
0x7e, 0x4e, 0x29, 0xf9, 0x9a, 0x52, 0xf2, 0x3d, 0xa5, 0xe4, 0x79, 0x31, 0x94, 0xfc, 0x30, 0x9c,
0x7d, 0xfb, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xf9, 0xfe, 0x1f, 0x28, 0x01, 0x00, 0x00,
}

View File

@@ -0,0 +1,19 @@
syntax = "proto3";
package archive.service.up.v1;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "v1";
// AidPubTime 发布时间的稿件aid的信息
message AidPubTime {
// aid 稿件aid
int64 aid = 1 [(gogoproto.jsontag) = "aid"];
// pub_date 发布时间
int64 pub_date = 2 [
(gogoproto.jsontag) = "pubdate",
(gogoproto.casttype) = "go-common/library/time.Time"
];
// copyright 版权来源
int32 copyright = 3 [(gogoproto.jsontag) = "copyright"];
}

View File

@@ -0,0 +1,22 @@
package v1
import (
"context"
"go-common/library/net/rpc/warden"
"google.golang.org/grpc"
)
// AppID unique app id for service discovery
const AppID = "archive.service.up"
// NewClient new member grpc client
func NewClient(cfg *warden.ClientConfig, opts ...grpc.DialOption) (UpClient, error) {
client := warden.NewClient(cfg, opts...)
conn, err := client.Dial(context.Background(), "discovery://default/"+AppID)
if err != nil {
return nil, err
}
return NewUpClient(conn), nil
}

View File

@@ -0,0 +1,647 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: api.pb.go
// Package v1 is a generated GoMock package.
package v1
import (
gomock "github.com/golang/mock/gomock"
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
reflect "reflect"
)
// MockUpClient is a mock of UpClient interface
type MockUpClient struct {
ctrl *gomock.Controller
recorder *MockUpClientMockRecorder
}
// MockUpClientMockRecorder is the mock recorder for MockUpClient
type MockUpClientMockRecorder struct {
mock *MockUpClient
}
// NewMockUpClient creates a new mock instance
func NewMockUpClient(ctrl *gomock.Controller) *MockUpClient {
mock := &MockUpClient{ctrl: ctrl}
mock.recorder = &MockUpClientMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockUpClient) EXPECT() *MockUpClientMockRecorder {
return m.recorder
}
// UpArcs mocks base method
func (m *MockUpClient) UpArcs(ctx context.Context, in *UpArcsReq, opts ...grpc.CallOption) (*UpArcsReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpArcs", varargs...)
ret0, _ := ret[0].(*UpArcsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpArcs indicates an expected call of UpArcs
func (mr *MockUpClientMockRecorder) UpArcs(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpArcs", reflect.TypeOf((*MockUpClient)(nil).UpArcs), varargs...)
}
// UpsArcs mocks base method
func (m *MockUpClient) UpsArcs(ctx context.Context, in *UpsArcsReq, opts ...grpc.CallOption) (*UpsArcsReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpsArcs", varargs...)
ret0, _ := ret[0].(*UpsArcsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsArcs indicates an expected call of UpsArcs
func (mr *MockUpClientMockRecorder) UpsArcs(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsArcs", reflect.TypeOf((*MockUpClient)(nil).UpsArcs), varargs...)
}
// UpCount mocks base method
func (m *MockUpClient) UpCount(ctx context.Context, in *UpCountReq, opts ...grpc.CallOption) (*UpCountReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpCount", varargs...)
ret0, _ := ret[0].(*UpCountReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpCount indicates an expected call of UpCount
func (mr *MockUpClientMockRecorder) UpCount(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpCount", reflect.TypeOf((*MockUpClient)(nil).UpCount), varargs...)
}
// UpsCount mocks base method
func (m *MockUpClient) UpsCount(ctx context.Context, in *UpsCountReq, opts ...grpc.CallOption) (*UpsCountReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpsCount", varargs...)
ret0, _ := ret[0].(*UpsCountReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsCount indicates an expected call of UpsCount
func (mr *MockUpClientMockRecorder) UpsCount(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsCount", reflect.TypeOf((*MockUpClient)(nil).UpsCount), varargs...)
}
// UpsAidPubTime mocks base method
func (m *MockUpClient) UpsAidPubTime(ctx context.Context, in *UpsArcsReq, opts ...grpc.CallOption) (*UpsAidPubTimeReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpsAidPubTime", varargs...)
ret0, _ := ret[0].(*UpsAidPubTimeReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsAidPubTime indicates an expected call of UpsAidPubTime
func (mr *MockUpClientMockRecorder) UpsAidPubTime(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsAidPubTime", reflect.TypeOf((*MockUpClient)(nil).UpsAidPubTime), varargs...)
}
// AddUpPassedCacheByStaff mocks base method
func (m *MockUpClient) AddUpPassedCacheByStaff(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AddUpPassedCacheByStaff", varargs...)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AddUpPassedCacheByStaff indicates an expected call of AddUpPassedCacheByStaff
func (mr *MockUpClientMockRecorder) AddUpPassedCacheByStaff(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUpPassedCacheByStaff", reflect.TypeOf((*MockUpClient)(nil).AddUpPassedCacheByStaff), varargs...)
}
// AddUpPassedCache mocks base method
func (m *MockUpClient) AddUpPassedCache(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "AddUpPassedCache", varargs...)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AddUpPassedCache indicates an expected call of AddUpPassedCache
func (mr *MockUpClientMockRecorder) AddUpPassedCache(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUpPassedCache", reflect.TypeOf((*MockUpClient)(nil).AddUpPassedCache), varargs...)
}
// DelUpPassedCacheByStaff mocks base method
func (m *MockUpClient) DelUpPassedCacheByStaff(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DelUpPassedCacheByStaff", varargs...)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DelUpPassedCacheByStaff indicates an expected call of DelUpPassedCacheByStaff
func (mr *MockUpClientMockRecorder) DelUpPassedCacheByStaff(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelUpPassedCacheByStaff", reflect.TypeOf((*MockUpClient)(nil).DelUpPassedCacheByStaff), varargs...)
}
// DelUpPassedCache mocks base method
func (m *MockUpClient) DelUpPassedCache(ctx context.Context, in *UpCacheReq, opts ...grpc.CallOption) (*NoReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DelUpPassedCache", varargs...)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DelUpPassedCache indicates an expected call of DelUpPassedCache
func (mr *MockUpClientMockRecorder) DelUpPassedCache(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelUpPassedCache", reflect.TypeOf((*MockUpClient)(nil).DelUpPassedCache), varargs...)
}
// UpInfoActivitys mocks base method
func (m *MockUpClient) UpInfoActivitys(ctx context.Context, in *UpListByLastIDReq, opts ...grpc.CallOption) (*UpActivityListReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpInfoActivitys", varargs...)
ret0, _ := ret[0].(*UpActivityListReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpInfoActivitys indicates an expected call of UpInfoActivitys
func (mr *MockUpClientMockRecorder) UpInfoActivitys(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpInfoActivitys", reflect.TypeOf((*MockUpClient)(nil).UpInfoActivitys), varargs...)
}
// UpSpecial mocks base method
func (m *MockUpClient) UpSpecial(ctx context.Context, in *UpSpecialReq, opts ...grpc.CallOption) (*UpSpecialReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpSpecial", varargs...)
ret0, _ := ret[0].(*UpSpecialReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpSpecial indicates an expected call of UpSpecial
func (mr *MockUpClientMockRecorder) UpSpecial(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpSpecial", reflect.TypeOf((*MockUpClient)(nil).UpSpecial), varargs...)
}
// UpsSpecial mocks base method
func (m *MockUpClient) UpsSpecial(ctx context.Context, in *UpsSpecialReq, opts ...grpc.CallOption) (*UpsSpecialReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpsSpecial", varargs...)
ret0, _ := ret[0].(*UpsSpecialReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsSpecial indicates an expected call of UpsSpecial
func (mr *MockUpClientMockRecorder) UpsSpecial(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsSpecial", reflect.TypeOf((*MockUpClient)(nil).UpsSpecial), varargs...)
}
// UpGroups mocks base method
func (m *MockUpClient) UpGroups(ctx context.Context, in *NoArgReq, opts ...grpc.CallOption) (*UpGroupsReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpGroups", varargs...)
ret0, _ := ret[0].(*UpGroupsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpGroups indicates an expected call of UpGroups
func (mr *MockUpClientMockRecorder) UpGroups(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpGroups", reflect.TypeOf((*MockUpClient)(nil).UpGroups), varargs...)
}
// UpGroupMids mocks base method
func (m *MockUpClient) UpGroupMids(ctx context.Context, in *UpGroupMidsReq, opts ...grpc.CallOption) (*UpGroupMidsReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpGroupMids", varargs...)
ret0, _ := ret[0].(*UpGroupMidsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpGroupMids indicates an expected call of UpGroupMids
func (mr *MockUpClientMockRecorder) UpGroupMids(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpGroupMids", reflect.TypeOf((*MockUpClient)(nil).UpGroupMids), varargs...)
}
// UpAttr mocks base method
func (m *MockUpClient) UpAttr(ctx context.Context, in *UpAttrReq, opts ...grpc.CallOption) (*UpAttrReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpAttr", varargs...)
ret0, _ := ret[0].(*UpAttrReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpAttr indicates an expected call of UpAttr
func (mr *MockUpClientMockRecorder) UpAttr(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpAttr", reflect.TypeOf((*MockUpClient)(nil).UpAttr), varargs...)
}
// UpBaseStats mocks base method
func (m *MockUpClient) UpBaseStats(ctx context.Context, in *UpStatReq, opts ...grpc.CallOption) (*UpBaseStatReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpBaseStats", varargs...)
ret0, _ := ret[0].(*UpBaseStatReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpBaseStats indicates an expected call of UpBaseStats
func (mr *MockUpClientMockRecorder) UpBaseStats(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpBaseStats", reflect.TypeOf((*MockUpClient)(nil).UpBaseStats), varargs...)
}
// SetUpSwitch mocks base method
func (m *MockUpClient) SetUpSwitch(ctx context.Context, in *UpSwitchReq, opts ...grpc.CallOption) (*NoReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "SetUpSwitch", varargs...)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SetUpSwitch indicates an expected call of SetUpSwitch
func (mr *MockUpClientMockRecorder) SetUpSwitch(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpSwitch", reflect.TypeOf((*MockUpClient)(nil).SetUpSwitch), varargs...)
}
// UpSwitch mocks base method
func (m *MockUpClient) UpSwitch(ctx context.Context, in *UpSwitchReq, opts ...grpc.CallOption) (*UpSwitchReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "UpSwitch", varargs...)
ret0, _ := ret[0].(*UpSwitchReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpSwitch indicates an expected call of UpSwitch
func (mr *MockUpClientMockRecorder) UpSwitch(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpSwitch", reflect.TypeOf((*MockUpClient)(nil).UpSwitch), varargs...)
}
// GetHighAllyUps mocks base method
func (m *MockUpClient) GetHighAllyUps(ctx context.Context, in *HighAllyUpsReq, opts ...grpc.CallOption) (*HighAllyUpsReply, error) {
varargs := []interface{}{ctx, in}
for _, a := range opts {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "GetHighAllyUps", varargs...)
ret0, _ := ret[0].(*HighAllyUpsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetHighAllyUps indicates an expected call of GetHighAllyUps
func (mr *MockUpClientMockRecorder) GetHighAllyUps(ctx, in interface{}, opts ...interface{}) *gomock.Call {
varargs := append([]interface{}{ctx, in}, opts...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHighAllyUps", reflect.TypeOf((*MockUpClient)(nil).GetHighAllyUps), varargs...)
}
// MockUpServer is a mock of UpServer interface
type MockUpServer struct {
ctrl *gomock.Controller
recorder *MockUpServerMockRecorder
}
// MockUpServerMockRecorder is the mock recorder for MockUpServer
type MockUpServerMockRecorder struct {
mock *MockUpServer
}
// NewMockUpServer creates a new mock instance
func NewMockUpServer(ctrl *gomock.Controller) *MockUpServer {
mock := &MockUpServer{ctrl: ctrl}
mock.recorder = &MockUpServerMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockUpServer) EXPECT() *MockUpServerMockRecorder {
return m.recorder
}
// UpArcs mocks base method
func (m *MockUpServer) UpArcs(arg0 context.Context, arg1 *UpArcsReq) (*UpArcsReply, error) {
ret := m.ctrl.Call(m, "UpArcs", arg0, arg1)
ret0, _ := ret[0].(*UpArcsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpArcs indicates an expected call of UpArcs
func (mr *MockUpServerMockRecorder) UpArcs(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpArcs", reflect.TypeOf((*MockUpServer)(nil).UpArcs), arg0, arg1)
}
// UpsArcs mocks base method
func (m *MockUpServer) UpsArcs(arg0 context.Context, arg1 *UpsArcsReq) (*UpsArcsReply, error) {
ret := m.ctrl.Call(m, "UpsArcs", arg0, arg1)
ret0, _ := ret[0].(*UpsArcsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsArcs indicates an expected call of UpsArcs
func (mr *MockUpServerMockRecorder) UpsArcs(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsArcs", reflect.TypeOf((*MockUpServer)(nil).UpsArcs), arg0, arg1)
}
// UpCount mocks base method
func (m *MockUpServer) UpCount(arg0 context.Context, arg1 *UpCountReq) (*UpCountReply, error) {
ret := m.ctrl.Call(m, "UpCount", arg0, arg1)
ret0, _ := ret[0].(*UpCountReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpCount indicates an expected call of UpCount
func (mr *MockUpServerMockRecorder) UpCount(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpCount", reflect.TypeOf((*MockUpServer)(nil).UpCount), arg0, arg1)
}
// UpsCount mocks base method
func (m *MockUpServer) UpsCount(arg0 context.Context, arg1 *UpsCountReq) (*UpsCountReply, error) {
ret := m.ctrl.Call(m, "UpsCount", arg0, arg1)
ret0, _ := ret[0].(*UpsCountReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsCount indicates an expected call of UpsCount
func (mr *MockUpServerMockRecorder) UpsCount(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsCount", reflect.TypeOf((*MockUpServer)(nil).UpsCount), arg0, arg1)
}
// UpsAidPubTime mocks base method
func (m *MockUpServer) UpsAidPubTime(arg0 context.Context, arg1 *UpsArcsReq) (*UpsAidPubTimeReply, error) {
ret := m.ctrl.Call(m, "UpsAidPubTime", arg0, arg1)
ret0, _ := ret[0].(*UpsAidPubTimeReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsAidPubTime indicates an expected call of UpsAidPubTime
func (mr *MockUpServerMockRecorder) UpsAidPubTime(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsAidPubTime", reflect.TypeOf((*MockUpServer)(nil).UpsAidPubTime), arg0, arg1)
}
// AddUpPassedCacheByStaff mocks base method
func (m *MockUpServer) AddUpPassedCacheByStaff(arg0 context.Context, arg1 *UpCacheReq) (*NoReply, error) {
ret := m.ctrl.Call(m, "AddUpPassedCacheByStaff", arg0, arg1)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AddUpPassedCacheByStaff indicates an expected call of AddUpPassedCacheByStaff
func (mr *MockUpServerMockRecorder) AddUpPassedCacheByStaff(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUpPassedCacheByStaff", reflect.TypeOf((*MockUpServer)(nil).AddUpPassedCacheByStaff), arg0, arg1)
}
// AddUpPassedCache mocks base method
func (m *MockUpServer) AddUpPassedCache(arg0 context.Context, arg1 *UpCacheReq) (*NoReply, error) {
ret := m.ctrl.Call(m, "AddUpPassedCache", arg0, arg1)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AddUpPassedCache indicates an expected call of AddUpPassedCache
func (mr *MockUpServerMockRecorder) AddUpPassedCache(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddUpPassedCache", reflect.TypeOf((*MockUpServer)(nil).AddUpPassedCache), arg0, arg1)
}
// DelUpPassedCacheByStaff mocks base method
func (m *MockUpServer) DelUpPassedCacheByStaff(arg0 context.Context, arg1 *UpCacheReq) (*NoReply, error) {
ret := m.ctrl.Call(m, "DelUpPassedCacheByStaff", arg0, arg1)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DelUpPassedCacheByStaff indicates an expected call of DelUpPassedCacheByStaff
func (mr *MockUpServerMockRecorder) DelUpPassedCacheByStaff(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelUpPassedCacheByStaff", reflect.TypeOf((*MockUpServer)(nil).DelUpPassedCacheByStaff), arg0, arg1)
}
// DelUpPassedCache mocks base method
func (m *MockUpServer) DelUpPassedCache(arg0 context.Context, arg1 *UpCacheReq) (*NoReply, error) {
ret := m.ctrl.Call(m, "DelUpPassedCache", arg0, arg1)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DelUpPassedCache indicates an expected call of DelUpPassedCache
func (mr *MockUpServerMockRecorder) DelUpPassedCache(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelUpPassedCache", reflect.TypeOf((*MockUpServer)(nil).DelUpPassedCache), arg0, arg1)
}
// UpInfoActivitys mocks base method
func (m *MockUpServer) UpInfoActivitys(arg0 context.Context, arg1 *UpListByLastIDReq) (*UpActivityListReply, error) {
ret := m.ctrl.Call(m, "UpInfoActivitys", arg0, arg1)
ret0, _ := ret[0].(*UpActivityListReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpInfoActivitys indicates an expected call of UpInfoActivitys
func (mr *MockUpServerMockRecorder) UpInfoActivitys(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpInfoActivitys", reflect.TypeOf((*MockUpServer)(nil).UpInfoActivitys), arg0, arg1)
}
// UpSpecial mocks base method
func (m *MockUpServer) UpSpecial(arg0 context.Context, arg1 *UpSpecialReq) (*UpSpecialReply, error) {
ret := m.ctrl.Call(m, "UpSpecial", arg0, arg1)
ret0, _ := ret[0].(*UpSpecialReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpSpecial indicates an expected call of UpSpecial
func (mr *MockUpServerMockRecorder) UpSpecial(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpSpecial", reflect.TypeOf((*MockUpServer)(nil).UpSpecial), arg0, arg1)
}
// UpsSpecial mocks base method
func (m *MockUpServer) UpsSpecial(arg0 context.Context, arg1 *UpsSpecialReq) (*UpsSpecialReply, error) {
ret := m.ctrl.Call(m, "UpsSpecial", arg0, arg1)
ret0, _ := ret[0].(*UpsSpecialReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpsSpecial indicates an expected call of UpsSpecial
func (mr *MockUpServerMockRecorder) UpsSpecial(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsSpecial", reflect.TypeOf((*MockUpServer)(nil).UpsSpecial), arg0, arg1)
}
// UpGroups mocks base method
func (m *MockUpServer) UpGroups(arg0 context.Context, arg1 *NoArgReq) (*UpGroupsReply, error) {
ret := m.ctrl.Call(m, "UpGroups", arg0, arg1)
ret0, _ := ret[0].(*UpGroupsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpGroups indicates an expected call of UpGroups
func (mr *MockUpServerMockRecorder) UpGroups(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpGroups", reflect.TypeOf((*MockUpServer)(nil).UpGroups), arg0, arg1)
}
// UpGroupMids mocks base method
func (m *MockUpServer) UpGroupMids(arg0 context.Context, arg1 *UpGroupMidsReq) (*UpGroupMidsReply, error) {
ret := m.ctrl.Call(m, "UpGroupMids", arg0, arg1)
ret0, _ := ret[0].(*UpGroupMidsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpGroupMids indicates an expected call of UpGroupMids
func (mr *MockUpServerMockRecorder) UpGroupMids(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpGroupMids", reflect.TypeOf((*MockUpServer)(nil).UpGroupMids), arg0, arg1)
}
// UpAttr mocks base method
func (m *MockUpServer) UpAttr(arg0 context.Context, arg1 *UpAttrReq) (*UpAttrReply, error) {
ret := m.ctrl.Call(m, "UpAttr", arg0, arg1)
ret0, _ := ret[0].(*UpAttrReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpAttr indicates an expected call of UpAttr
func (mr *MockUpServerMockRecorder) UpAttr(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpAttr", reflect.TypeOf((*MockUpServer)(nil).UpAttr), arg0, arg1)
}
// UpBaseStats mocks base method
func (m *MockUpServer) UpBaseStats(arg0 context.Context, arg1 *UpStatReq) (*UpBaseStatReply, error) {
ret := m.ctrl.Call(m, "UpBaseStats", arg0, arg1)
ret0, _ := ret[0].(*UpBaseStatReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpBaseStats indicates an expected call of UpBaseStats
func (mr *MockUpServerMockRecorder) UpBaseStats(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpBaseStats", reflect.TypeOf((*MockUpServer)(nil).UpBaseStats), arg0, arg1)
}
// SetUpSwitch mocks base method
func (m *MockUpServer) SetUpSwitch(arg0 context.Context, arg1 *UpSwitchReq) (*NoReply, error) {
ret := m.ctrl.Call(m, "SetUpSwitch", arg0, arg1)
ret0, _ := ret[0].(*NoReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// SetUpSwitch indicates an expected call of SetUpSwitch
func (mr *MockUpServerMockRecorder) SetUpSwitch(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetUpSwitch", reflect.TypeOf((*MockUpServer)(nil).SetUpSwitch), arg0, arg1)
}
// UpSwitch mocks base method
func (m *MockUpServer) UpSwitch(arg0 context.Context, arg1 *UpSwitchReq) (*UpSwitchReply, error) {
ret := m.ctrl.Call(m, "UpSwitch", arg0, arg1)
ret0, _ := ret[0].(*UpSwitchReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpSwitch indicates an expected call of UpSwitch
func (mr *MockUpServerMockRecorder) UpSwitch(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpSwitch", reflect.TypeOf((*MockUpServer)(nil).UpSwitch), arg0, arg1)
}
// GetHighAllyUps mocks base method
func (m *MockUpServer) GetHighAllyUps(arg0 context.Context, arg1 *HighAllyUpsReq) (*HighAllyUpsReply, error) {
ret := m.ctrl.Call(m, "GetHighAllyUps", arg0, arg1)
ret0, _ := ret[0].(*HighAllyUpsReply)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetHighAllyUps indicates an expected call of GetHighAllyUps
func (mr *MockUpServerMockRecorder) GetHighAllyUps(arg0, arg1 interface{}) *gomock.Call {
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetHighAllyUps", reflect.TypeOf((*MockUpServer)(nil).GetHighAllyUps), arg0, arg1)
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,117 @@
syntax = "proto3";
package archive.service.up.v1;
import "app/service/main/archive/api/api.proto";
import "app/service/main/up/api/v1/archive.proto";
import "app/service/main/up/api/v1/up.proto";
import "app/service/main/up/api/v1/sign_up.proto";
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "v1";
// NoReply 没有返回值
message NoReply {}
// UpArcsReply 单个up主的稿件信息列表返回值
message UpArcsReply {
// archives 稿件信息列表
repeated archive.service.v1.Arc archives = 1;
}
// UpsArcsReply 多个up主的稿件信息列表返回值
message UpsArcsReply {
// archives 稿件信息列表
map<int64, UpArcsReply> archives = 1;
}
// UpCountReply 单个up主的稿件计数返回值
message UpCountReply {
// count 稿件数量
int64 count = 1;
}
// UpsCountReply 多个up主的稿件计数返回值
message UpsCountReply {
// count 稿件数量
map<int64, int64> count = 1;
}
// UpAidPubTimeReply 按发布时间的单个up的稿件aid的返回值
message UpAidPubTimeReply {
// archives 稿件信息列表
repeated AidPubTime archives = 1;
}
// UpsAidPubTimeReply 按发布时间的多个up的稿件aid的返回值
message UpsAidPubTimeReply {
// archives 稿件信息列表
map<int64, UpAidPubTimeReply> archives = 1;
}
// UpActivityListReply up主活跃度列表信息
message UpActivityListReply {
// up_activity 活跃度up主信息列表
repeated UpActivity up_activitys = 1;
// last_id 数据最后返回的id
int64 last_id = 2 [(gogoproto.customname) = "LastID"];
}
// UpGroupsReply up主特殊用户组列表
message UpGroupsReply {
// up_groups up主的特殊用户组信息
map<int64, UpGroup> up_groups = 1;
}
// UpSpecialReply up主特殊属性信息
message UpSpecialReply {
// up_special up主的特殊属性
UpSpecial up_special = 1;
}
// UpsSpecialReply 多个up主特殊属性信息
message UpsSpecialReply {
// up_specials 多个up主的特殊属性
map<int64, UpSpecial> up_specials = 1;
}
// UpGroupMidsReply 获取某个分组下的所有用户的返回值
message UpGroupMidsReply {
// mids 分组下用户ID
repeated int64 mids = 1 [(gogoproto.jsontag) = "mids"];
int32 total = 2 [(gogoproto.jsontag) = "total", (gogoproto.casttype) = "int"];
}
// UpAttrReply 获取up主身份的返回值
message UpAttrReply {
// is_author 是否有身份 0:无身份 1:有身份
int32 is_author = 1
[(gogoproto.jsontag) = "is_author", (gogoproto.casttype) = "uint8"];
}
// UpBaseStatReply 获取up主基础计数的返回值
message UpBaseStatReply {
// view 播放数
int64 view = 1 [(gogoproto.jsontag) = "view"];
// reply 评论数
int64 reply = 2 [(gogoproto.jsontag) = "reply"];
// dm 弹幕数
int64 dm = 3 [(gogoproto.jsontag) = "dm"];
// fans 粉丝数
int64 fans = 4 [(gogoproto.jsontag) = "fans"];
// fav 收藏数
int64 fav = 5 [(gogoproto.jsontag) = "fav"];
// like 点赞数
int64 like = 6 [(gogoproto.jsontag) = "like"];
}
// UpSwitchReq 获取up主关注弹窗开关的返回值
message UpSwitchReply {
// state 开关状态 0-关闭 1-打开
int32 state = 1
[(gogoproto.jsontag) = "state", (gogoproto.casttype) = "uint8"];
}
// HighAllyUpsReply 高能联盟up主map返回值
message HighAllyUpsReply {
map<int64, SignUp> lists = 1;
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,152 @@
syntax = "proto3";
package archive.service.up.v1;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "v1";
// NoArgReq 没有请求参数
message NoArgReq {}
// UpArcsReq 单个up主的稿件列表信息请求参数
message UpArcsReq {
// mid 用户id 必传
int64 mid = 1
[(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
// pn 第几页 非必传
int32 pn = 2 [(gogoproto.moretags) = "form:\"pn\" default:\"1\""];
// ps 分页大小 非必传
int32 ps = 3 [(gogoproto.moretags) = "form:\"ps\" default:\"20\""];
}
// UpsArcsReq 多个up主的稿件列表信息请求参数
message UpsArcsReq {
// mids 多个用户id 必传 最大100个
repeated int64 mids = 1
[(gogoproto.moretags) =
"form:\"mids,split\" validate:\"min=1,max=100,required\""];
// pn 第几页 非必传
int32 pn = 2 [(gogoproto.moretags) = "form:\"pn\" default:\"1\""];
// ps 分页大小 非必传
int32 ps = 3 [(gogoproto.moretags) = "form:\"ps\" default:\"20\""];
}
// UpCountReq 单个up主的稿件计数的请求参数
message UpCountReq {
// mid 用户id 必传
int64 mid = 1
[(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
}
// UpsCountReq 多个up主的稿件计数的请求参数
message UpsCountReq {
// mids 多个用户id 必传 最大100个
repeated int64 mids = 1
[(gogoproto.moretags) =
"form:\"mids,split\" validate:\"min=1,max=100,required\""];
}
// UpCacheReq up主的cache更新的请求参数
message UpCacheReq {
// mid 用户id 必传
int64 mid = 1 [(gogoproto.moretags) = "form:\"mid\" validate:\"required\""];
// aid 稿件id 必传
int64 aid = 2 [(gogoproto.moretags) = "form:\"aid\" validate:\"required\""];
}
// UpListByLastIDReq 获取up主活跃度信息通过最后id获取
message UpListByLastIDReq {
// LastID 获取的数据最后id
int64 last_id = 1 [
(gogoproto.customname) = "LastID",
(gogoproto.moretags) = "form:\"last_id\" validate:\"min=0\""
];
// 获取数量 最大1000个
int32 ps = 2 [
(gogoproto.casttype) = "int",
(gogoproto.moretags) =
"form:\"ps\" validate:\"min=1,max=1000\" default:\"100\""
];
}
// UpSpecialReq up主特殊用户属性请求参数
message UpSpecialReq {
// mid 用户id 必传
int64 mid = 1
[(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
}
// UpsSpecialReq 多个up主特殊用户属性请求参数
message UpsSpecialReq {
// mids 多个用户id 必传 最大100个
repeated int64 mids = 1
[(gogoproto.moretags) =
"form:\"mids,split\" validate:\"min=1,max=100,required\""];
}
// UpGroupMidsReq 获取某个分组下的所有用户的请求参数
message UpGroupMidsReq {
// GroupID 分组ID
int64 group_id = 1 [
(gogoproto.customname) = "GroupID",
(gogoproto.moretags) = "form:\"group_id\" validate:\"min=1,required\""
];
// pn 第几页 非必传
int32 pn = 2 [
(gogoproto.casttype) = "int",
(gogoproto.moretags) =
"form:\"pn\" validate:\"min=1,max=100\" default:\"1\""
];
// ps 分页大小 非必传
int32 ps = 3 [
(gogoproto.casttype) = "int",
(gogoproto.moretags) =
"form:\"ps\" validate:\"min=1,max=10000\" default:\"1000\""
];
}
// UpAttrReq 获取up主身份属性的请求参数
message UpAttrReq {
// mid 用户id 必传
int64 mid = 1
[(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
// from 0 - 稿件作者(至少有一个通过稿件); 1 - 移动投稿作者(至少有一个稿件);
// 2 - live(直播up主); 3 - live(直播白名单)
int32 from = 2 [
(gogoproto.moretags) = "form:\"from\" validate:\"min=0,max=1\"",
(gogoproto.casttype) = "uint8"
];
}
// UpStatReq 获取up计数的请求参数
message UpStatReq {
// mid 用户id 必传
int64 mid = 1
[(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
// date 获取计数时间范围
int64 date = 2 [
(gogoproto.moretags) = "form:\"date\"",
(gogoproto.casttype) = "go-common/library/time.Time"
];
}
// UpSwitchReq 获取up主关注弹窗开关的请求参数
message UpSwitchReq {
// mid 用户id 必传
int64 mid = 1
[(gogoproto.moretags) = "form:\"mid\" validate:\"min=1,required\""];
// from 业务来源 0-播放器关注开关 1-up主荣誉周报是否退订
int32 from = 2
[(gogoproto.moretags) = "form:\"from\"", (gogoproto.casttype) = "uint8"];
// state 开关状态 0-关闭 1-打开
int32 state = 3 [
(gogoproto.moretags) = "form:\"state\" validate:\"min=0,max=1\"",
(gogoproto.casttype) = "uint8"
];
}
// HighAllyUpReq 高能联盟up主请求参数
message HighAllyUpsReq {
// mids 用户id数组 必传
repeated int64 mids = 1 [(gogoproto.moretags) = "form:\"mids\" validate:\"required\""];
}

View File

@@ -0,0 +1,399 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: app/service/main/up/api/v1/sign_up.proto
package v1
import proto "github.com/gogo/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/gogo/protobuf/gogoproto"
import go_common_library_time "go-common/library/time"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// SignUp 签约up
type SignUp struct {
// Mid 签约up主ID
Mid int64 `protobuf:"varint,1,opt,name=Mid,proto3" json:"mid"`
// State 签约状态
State int32 `protobuf:"varint,2,opt,name=State,proto3" json:"state"`
// BeginDate 经纪签约开始时间
BeginDate go_common_library_time.Time `protobuf:"varint,3,opt,name=BeginDate,proto3,casttype=go-common/library/time.Time" json:"begin_date"`
// EndDate 经纪签约结束时间
EndDate go_common_library_time.Time `protobuf:"varint,4,opt,name=EndDate,proto3,casttype=go-common/library/time.Time" json:"end_date"`
}
func (m *SignUp) Reset() { *m = SignUp{} }
func (m *SignUp) String() string { return proto.CompactTextString(m) }
func (*SignUp) ProtoMessage() {}
func (*SignUp) Descriptor() ([]byte, []int) { return fileDescriptorSignUp, []int{0} }
func (m *SignUp) GetMid() int64 {
if m != nil {
return m.Mid
}
return 0
}
func (m *SignUp) GetState() int32 {
if m != nil {
return m.State
}
return 0
}
func (m *SignUp) GetBeginDate() go_common_library_time.Time {
if m != nil {
return m.BeginDate
}
return 0
}
func (m *SignUp) GetEndDate() go_common_library_time.Time {
if m != nil {
return m.EndDate
}
return 0
}
func init() {
proto.RegisterType((*SignUp)(nil), "archive.service.up.v1.SignUp")
}
func (m *SignUp) 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 *SignUp) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Mid != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintSignUp(dAtA, i, uint64(m.Mid))
}
if m.State != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintSignUp(dAtA, i, uint64(m.State))
}
if m.BeginDate != 0 {
dAtA[i] = 0x18
i++
i = encodeVarintSignUp(dAtA, i, uint64(m.BeginDate))
}
if m.EndDate != 0 {
dAtA[i] = 0x20
i++
i = encodeVarintSignUp(dAtA, i, uint64(m.EndDate))
}
return i, nil
}
func encodeVarintSignUp(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 *SignUp) Size() (n int) {
var l int
_ = l
if m.Mid != 0 {
n += 1 + sovSignUp(uint64(m.Mid))
}
if m.State != 0 {
n += 1 + sovSignUp(uint64(m.State))
}
if m.BeginDate != 0 {
n += 1 + sovSignUp(uint64(m.BeginDate))
}
if m.EndDate != 0 {
n += 1 + sovSignUp(uint64(m.EndDate))
}
return n
}
func sovSignUp(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozSignUp(x uint64) (n int) {
return sovSignUp(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *SignUp) 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 ErrIntOverflowSignUp
}
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: SignUp: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: SignUp: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
}
m.Mid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSignUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mid |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
}
m.State = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSignUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.State |= (int32(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 3:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field BeginDate", wireType)
}
m.BeginDate = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSignUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.BeginDate |= (go_common_library_time.Time(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 4:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field EndDate", wireType)
}
m.EndDate = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowSignUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.EndDate |= (go_common_library_time.Time(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipSignUp(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthSignUp
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipSignUp(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, ErrIntOverflowSignUp
}
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, ErrIntOverflowSignUp
}
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, ErrIntOverflowSignUp
}
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, ErrInvalidLengthSignUp
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowSignUp
}
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 := skipSignUp(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 (
ErrInvalidLengthSignUp = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowSignUp = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("app/service/main/up/api/v1/sign_up.proto", fileDescriptorSignUp) }
var fileDescriptorSignUp = []byte{
// 280 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x8f, 0xbf, 0x4a, 0xf4, 0x40,
0x14, 0xc5, 0x99, 0xcd, 0xb7, 0xbb, 0xdf, 0x4e, 0x25, 0x01, 0x61, 0x55, 0xc8, 0x2c, 0x56, 0x01,
0xc9, 0x0c, 0xc1, 0x37, 0x08, 0x6e, 0x25, 0x36, 0x59, 0x6d, 0x6c, 0x96, 0x49, 0x32, 0xce, 0x5e,
0x70, 0xfe, 0x90, 0x4c, 0x02, 0xbe, 0xa1, 0xa5, 0xa5, 0x55, 0x90, 0x94, 0x79, 0x04, 0x2b, 0xc9,
0xac, 0x62, 0x6b, 0x77, 0xcf, 0x8f, 0x73, 0x7e, 0x70, 0x71, 0xcc, 0xad, 0x65, 0x8d, 0xa8, 0x3b,
0x28, 0x05, 0x53, 0x1c, 0x34, 0x6b, 0x2d, 0xe3, 0x16, 0x58, 0x97, 0xb2, 0x06, 0xa4, 0xde, 0xb7,
0x96, 0xda, 0xda, 0x38, 0x13, 0x9e, 0xf2, 0xba, 0x3c, 0x40, 0x27, 0xe8, 0x77, 0x9b, 0xb6, 0x96,
0x76, 0xe9, 0x79, 0x22, 0xc1, 0x1d, 0xda, 0x82, 0x96, 0x46, 0x31, 0x69, 0xa4, 0x61, 0xbe, 0x5d,
0xb4, 0x4f, 0x3e, 0xf9, 0xe0, 0xaf, 0xa3, 0xe5, 0xf2, 0x1d, 0xe1, 0xc5, 0x0e, 0xa4, 0x7e, 0xb0,
0xe1, 0x19, 0x0e, 0xee, 0xa0, 0x5a, 0xa3, 0x0d, 0x8a, 0x83, 0x6c, 0x39, 0xf6, 0x24, 0x50, 0x50,
0xe5, 0x13, 0x0b, 0x09, 0x9e, 0xef, 0x1c, 0x77, 0x62, 0x3d, 0xdb, 0xa0, 0x78, 0x9e, 0xad, 0xc6,
0x9e, 0xcc, 0x9b, 0x09, 0xe4, 0x47, 0x1e, 0xde, 0xe2, 0x55, 0x26, 0x24, 0xe8, 0x9b, 0xa9, 0x14,
0x78, 0x43, 0x32, 0xf6, 0x04, 0x17, 0x13, 0xdc, 0x57, 0xdc, 0x89, 0xcf, 0x9e, 0x5c, 0x48, 0x93,
0x94, 0x46, 0x29, 0xa3, 0xd9, 0x33, 0x14, 0x35, 0xaf, 0x5f, 0x98, 0x03, 0x25, 0xe8, 0x3d, 0x28,
0x91, 0xff, 0xee, 0xc3, 0x2d, 0x5e, 0x6e, 0x75, 0xe5, 0x55, 0xff, 0xbc, 0xea, 0x6a, 0xec, 0xc9,
0x7f, 0xa1, 0xab, 0x3f, 0x89, 0x7e, 0xb6, 0xd9, 0xc9, 0xeb, 0x10, 0xa1, 0xb7, 0x21, 0x42, 0x1f,
0x43, 0x84, 0x1e, 0x67, 0x5d, 0x5a, 0x2c, 0xfc, 0xcf, 0xd7, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff,
0xae, 0xdc, 0x75, 0xf6, 0x65, 0x01, 0x00, 0x00,
}

View File

@@ -0,0 +1,18 @@
syntax = "proto3";
package archive.service.up.v1;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "v1";
// SignUp 签约up
message SignUp {
// Mid 签约up主ID
int64 Mid = 1 [(gogoproto.jsontag) = "mid"];
// State 签约状态
int32 State = 2 [(gogoproto.jsontag) = "state"];
// BeginDate 经纪签约开始时间
int64 BeginDate = 3 [(gogoproto.jsontag) = "begin_date", (gogoproto.casttype) = "go-common/library/time.Time"];
// EndDate 经纪签约结束时间
int64 EndDate = 4 [(gogoproto.jsontag) = "end_date", (gogoproto.casttype) = "go-common/library/time.Time"];
}

View File

@@ -0,0 +1,920 @@
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: app/service/main/up/api/v1/up.proto
package v1
import proto "github.com/gogo/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
// UpActivity up主活跃度信息
type UpActivity struct {
// mid up主id
Mid int64 `protobuf:"varint,1,opt,name=mid,proto3" json:"mid"`
// activity 活跃度
Activity int8 `protobuf:"varint,2,opt,name=activity,proto3,casttype=int8" json:"activity"`
}
func (m *UpActivity) Reset() { *m = UpActivity{} }
func (m *UpActivity) String() string { return proto.CompactTextString(m) }
func (*UpActivity) ProtoMessage() {}
func (*UpActivity) Descriptor() ([]byte, []int) { return fileDescriptorUp, []int{0} }
func (m *UpActivity) GetMid() int64 {
if m != nil {
return m.Mid
}
return 0
}
func (m *UpActivity) GetActivity() int8 {
if m != nil {
return m.Activity
}
return 0
}
// UpGroup up主的特殊用户组信息
type UpGroup struct {
// id 分组ID
ID int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id"`
// name 分组名
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name"`
// tag 标签名称
Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag"`
// tag 标签简称
ShortTag string `protobuf:"bytes,4,opt,name=short_tag,json=shortTag,proto3" json:"short_tag"`
// font_color 字体色
FontColor string `protobuf:"bytes,5,opt,name=font_color,json=fontColor,proto3" json:"font_color"`
// bg_color 背景色
BgColor string `protobuf:"bytes,6,opt,name=bg_color,json=bgColor,proto3" json:"bg_color"`
// note 备注
Note string `protobuf:"bytes,7,opt,name=note,proto3" json:"note"`
}
func (m *UpGroup) Reset() { *m = UpGroup{} }
func (m *UpGroup) String() string { return proto.CompactTextString(m) }
func (*UpGroup) ProtoMessage() {}
func (*UpGroup) Descriptor() ([]byte, []int) { return fileDescriptorUp, []int{1} }
func (m *UpGroup) GetID() int64 {
if m != nil {
return m.ID
}
return 0
}
func (m *UpGroup) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *UpGroup) GetTag() string {
if m != nil {
return m.Tag
}
return ""
}
func (m *UpGroup) GetShortTag() string {
if m != nil {
return m.ShortTag
}
return ""
}
func (m *UpGroup) GetFontColor() string {
if m != nil {
return m.FontColor
}
return ""
}
func (m *UpGroup) GetBgColor() string {
if m != nil {
return m.BgColor
}
return ""
}
func (m *UpGroup) GetNote() string {
if m != nil {
return m.Note
}
return ""
}
// UpSpecial up主的特殊属性
type UpSpecial struct {
// group_ids 特殊属性数组
GroupIDs []int64 `protobuf:"varint,1,rep,packed,name=group_ids,json=groupIds" json:"group_ids"`
}
func (m *UpSpecial) Reset() { *m = UpSpecial{} }
func (m *UpSpecial) String() string { return proto.CompactTextString(m) }
func (*UpSpecial) ProtoMessage() {}
func (*UpSpecial) Descriptor() ([]byte, []int) { return fileDescriptorUp, []int{2} }
func (m *UpSpecial) GetGroupIDs() []int64 {
if m != nil {
return m.GroupIDs
}
return nil
}
func init() {
proto.RegisterType((*UpActivity)(nil), "archive.service.up.v1.UpActivity")
proto.RegisterType((*UpGroup)(nil), "archive.service.up.v1.UpGroup")
proto.RegisterType((*UpSpecial)(nil), "archive.service.up.v1.UpSpecial")
}
func (m *UpActivity) 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 *UpActivity) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Mid != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintUp(dAtA, i, uint64(m.Mid))
}
if m.Activity != 0 {
dAtA[i] = 0x10
i++
i = encodeVarintUp(dAtA, i, uint64(m.Activity))
}
return i, nil
}
func (m *UpGroup) 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 *UpGroup) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.ID != 0 {
dAtA[i] = 0x8
i++
i = encodeVarintUp(dAtA, i, uint64(m.ID))
}
if len(m.Name) > 0 {
dAtA[i] = 0x12
i++
i = encodeVarintUp(dAtA, i, uint64(len(m.Name)))
i += copy(dAtA[i:], m.Name)
}
if len(m.Tag) > 0 {
dAtA[i] = 0x1a
i++
i = encodeVarintUp(dAtA, i, uint64(len(m.Tag)))
i += copy(dAtA[i:], m.Tag)
}
if len(m.ShortTag) > 0 {
dAtA[i] = 0x22
i++
i = encodeVarintUp(dAtA, i, uint64(len(m.ShortTag)))
i += copy(dAtA[i:], m.ShortTag)
}
if len(m.FontColor) > 0 {
dAtA[i] = 0x2a
i++
i = encodeVarintUp(dAtA, i, uint64(len(m.FontColor)))
i += copy(dAtA[i:], m.FontColor)
}
if len(m.BgColor) > 0 {
dAtA[i] = 0x32
i++
i = encodeVarintUp(dAtA, i, uint64(len(m.BgColor)))
i += copy(dAtA[i:], m.BgColor)
}
if len(m.Note) > 0 {
dAtA[i] = 0x3a
i++
i = encodeVarintUp(dAtA, i, uint64(len(m.Note)))
i += copy(dAtA[i:], m.Note)
}
return i, nil
}
func (m *UpSpecial) 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 *UpSpecial) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.GroupIDs) > 0 {
dAtA2 := make([]byte, len(m.GroupIDs)*10)
var j1 int
for _, num1 := range m.GroupIDs {
num := uint64(num1)
for num >= 1<<7 {
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
num >>= 7
j1++
}
dAtA2[j1] = uint8(num)
j1++
}
dAtA[i] = 0xa
i++
i = encodeVarintUp(dAtA, i, uint64(j1))
i += copy(dAtA[i:], dAtA2[:j1])
}
return i, nil
}
func encodeVarintUp(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 *UpActivity) Size() (n int) {
var l int
_ = l
if m.Mid != 0 {
n += 1 + sovUp(uint64(m.Mid))
}
if m.Activity != 0 {
n += 1 + sovUp(uint64(m.Activity))
}
return n
}
func (m *UpGroup) Size() (n int) {
var l int
_ = l
if m.ID != 0 {
n += 1 + sovUp(uint64(m.ID))
}
l = len(m.Name)
if l > 0 {
n += 1 + l + sovUp(uint64(l))
}
l = len(m.Tag)
if l > 0 {
n += 1 + l + sovUp(uint64(l))
}
l = len(m.ShortTag)
if l > 0 {
n += 1 + l + sovUp(uint64(l))
}
l = len(m.FontColor)
if l > 0 {
n += 1 + l + sovUp(uint64(l))
}
l = len(m.BgColor)
if l > 0 {
n += 1 + l + sovUp(uint64(l))
}
l = len(m.Note)
if l > 0 {
n += 1 + l + sovUp(uint64(l))
}
return n
}
func (m *UpSpecial) Size() (n int) {
var l int
_ = l
if len(m.GroupIDs) > 0 {
l = 0
for _, e := range m.GroupIDs {
l += sovUp(uint64(e))
}
n += 1 + sovUp(uint64(l)) + l
}
return n
}
func sovUp(x uint64) (n int) {
for {
n++
x >>= 7
if x == 0 {
break
}
}
return n
}
func sozUp(x uint64) (n int) {
return sovUp(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *UpActivity) 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 ErrIntOverflowUp
}
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: UpActivity: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: UpActivity: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType)
}
m.Mid = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Mid |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Activity", wireType)
}
m.Activity = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.Activity |= (int8(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := skipUp(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthUp
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *UpGroup) 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 ErrIntOverflowUp
}
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: UpGroup: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: UpGroup: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
}
m.ID = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.ID |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
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 ErrInvalidLengthUp
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Name = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
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 ErrInvalidLengthUp
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Tag = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ShortTag", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
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 ErrInvalidLengthUp
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ShortTag = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field FontColor", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
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 ErrInvalidLengthUp
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.FontColor = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field BgColor", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
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 ErrInvalidLengthUp
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.BgColor = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Note", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
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 ErrInvalidLengthUp
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Note = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipUp(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthUp
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *UpSpecial) 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 ErrIntOverflowUp
}
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: UpSpecial: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: UpSpecial: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType == 0 {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.GroupIDs = append(m.GroupIDs, v)
} else if wireType == 2 {
var packedLen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
packedLen |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if packedLen < 0 {
return ErrInvalidLengthUp
}
postIndex := iNdEx + packedLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
for iNdEx < postIndex {
var v int64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowUp
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= (int64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
m.GroupIDs = append(m.GroupIDs, v)
}
} else {
return fmt.Errorf("proto: wrong wireType = %d for field GroupIDs", wireType)
}
default:
iNdEx = preIndex
skippy, err := skipUp(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthUp
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipUp(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, ErrIntOverflowUp
}
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, ErrIntOverflowUp
}
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, ErrIntOverflowUp
}
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, ErrInvalidLengthUp
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowUp
}
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 := skipUp(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 (
ErrInvalidLengthUp = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowUp = fmt.Errorf("proto: integer overflow")
)
func init() { proto.RegisterFile("app/service/main/up/api/v1/up.proto", fileDescriptorUp) }
var fileDescriptorUp = []byte{
// 397 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x91, 0x4f, 0x8b, 0xd4, 0x30,
0x18, 0xc6, 0x69, 0x3b, 0xbb, 0x6d, 0xc3, 0x2a, 0x12, 0x14, 0xba, 0xb2, 0x4c, 0x86, 0xf1, 0xe0,
0x20, 0x6c, 0xe3, 0x20, 0x88, 0x57, 0xbb, 0x0b, 0x32, 0xd7, 0xe8, 0x1c, 0xf4, 0x32, 0xa4, 0x7f,
0x36, 0x13, 0xd8, 0x36, 0xa1, 0x4d, 0x0b, 0x5e, 0xfd, 0x74, 0x1e, 0xfd, 0x04, 0x41, 0x7a, 0xec,
0x47, 0xf0, 0x24, 0x79, 0x77, 0xac, 0x7b, 0x79, 0x79, 0x9e, 0xa7, 0x3f, 0x5e, 0x9e, 0xbe, 0x41,
0xaf, 0xb8, 0xd6, 0xb4, 0xab, 0xda, 0x41, 0x16, 0x15, 0xad, 0xb9, 0x6c, 0x68, 0xaf, 0x29, 0xd7,
0x92, 0x0e, 0x5b, 0xda, 0xeb, 0x54, 0xb7, 0xca, 0x28, 0xfc, 0x82, 0xb7, 0xc5, 0x51, 0x0e, 0x55,
0x7a, 0x02, 0xd3, 0x5e, 0xa7, 0xc3, 0xf6, 0xe5, 0xb5, 0x90, 0xe6, 0xd8, 0xe7, 0x69, 0xa1, 0x6a,
0x2a, 0x94, 0x50, 0x14, 0xe8, 0xbc, 0xbf, 0x03, 0x07, 0x06, 0xd4, 0xc3, 0x96, 0xf5, 0x57, 0x84,
0xf6, 0xfa, 0x63, 0x61, 0xe4, 0x20, 0xcd, 0x77, 0x7c, 0x89, 0x82, 0x5a, 0x96, 0x89, 0xb7, 0xf2,
0x36, 0x41, 0x16, 0x4e, 0x96, 0x38, 0xcb, 0xdc, 0xc0, 0x6f, 0x51, 0xc4, 0x4f, 0x58, 0xe2, 0xaf,
0xbc, 0xcd, 0x59, 0xf6, 0x7c, 0xb2, 0x64, 0xce, 0xfe, 0x58, 0xb2, 0x90, 0x8d, 0xf9, 0xc0, 0xe6,
0x64, 0xfd, 0xc3, 0x47, 0xe1, 0x5e, 0x7f, 0x6a, 0x55, 0xaf, 0xf1, 0x15, 0xf2, 0xe7, 0xbd, 0x17,
0xa3, 0x25, 0xfe, 0xee, 0x76, 0xb2, 0xc4, 0x97, 0x25, 0xf3, 0x65, 0x89, 0xaf, 0xd0, 0xa2, 0xe1,
0x75, 0x05, 0x7b, 0xe3, 0x2c, 0x9a, 0x2c, 0x01, 0xcf, 0x60, 0xba, 0x52, 0x86, 0x8b, 0x24, 0x80,
0x8f, 0x50, 0xca, 0x70, 0xc1, 0xdc, 0xc0, 0x6f, 0x50, 0xdc, 0x1d, 0x55, 0x6b, 0x0e, 0x0e, 0x58,
0x00, 0xf0, 0x64, 0xb2, 0xe4, 0x7f, 0xc8, 0x22, 0x90, 0x5f, 0xb8, 0xc0, 0xd7, 0x08, 0xdd, 0xa9,
0xc6, 0x1c, 0x0a, 0x75, 0xaf, 0xda, 0xe4, 0x0c, 0xe0, 0xa7, 0x93, 0x25, 0x8f, 0x52, 0x16, 0x3b,
0x7d, 0xe3, 0x24, 0x7e, 0x8d, 0xa2, 0x5c, 0x9c, 0xe0, 0x73, 0x80, 0x2f, 0xdc, 0xff, 0xfe, 0xcb,
0x58, 0x98, 0x8b, 0x07, 0xd0, 0x95, 0x57, 0xa6, 0x4a, 0xc2, 0x47, 0xe5, 0x95, 0x71, 0xe5, 0x95,
0xa9, 0xd6, 0x37, 0x28, 0xde, 0xeb, 0xcf, 0xba, 0x2a, 0x24, 0xbf, 0xc7, 0xef, 0x51, 0x2c, 0xdc,
0x39, 0x0e, 0xb2, 0xec, 0x12, 0x6f, 0x15, 0x6c, 0x82, 0xec, 0x72, 0xb4, 0x24, 0x82, 0x1b, 0xed,
0x6e, 0x3b, 0x57, 0x7d, 0x06, 0x58, 0x04, 0x72, 0x57, 0x76, 0xd9, 0xb3, 0x9f, 0xe3, 0xd2, 0xfb,
0x35, 0x2e, 0xbd, 0xdf, 0xe3, 0xd2, 0xfb, 0xe6, 0x0f, 0xdb, 0xfc, 0x1c, 0x5e, 0xef, 0xdd, 0xdf,
0x00, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x8e, 0x29, 0xd2, 0x2a, 0x02, 0x00, 0x00,
}

View File

@@ -0,0 +1,40 @@
syntax = "proto3";
package archive.service.up.v1;
import "github.com/gogo/protobuf/gogoproto/gogo.proto";
option go_package = "v1";
// UpActivity up主活跃度信息
message UpActivity {
// mid up主id
int64 mid = 1 [(gogoproto.jsontag) = "mid"];
// activity 活跃度
int32 activity = 2
[(gogoproto.jsontag) = "activity", (gogoproto.casttype) = "int8"];
}
// UpGroup up主的特殊用户组信息
message UpGroup {
// id 分组ID
int64 id = 1 [(gogoproto.jsontag) = "id", (gogoproto.customname) = "ID"];
// name 分组名
string name = 2 [(gogoproto.jsontag) = "name"];
// tag 标签名称
string tag = 3 [(gogoproto.jsontag) = "tag"];
// tag 标签简称
string short_tag = 4 [(gogoproto.jsontag) = "short_tag"];
// font_color 字体色
string font_color = 5 [(gogoproto.jsontag) = "font_color"];
// bg_color 背景色
string bg_color = 6 [(gogoproto.jsontag) = "bg_color"];
// note 备注
string note = 7 [(gogoproto.jsontag) = "note"];
}
// UpSpecial up主的特殊属性
message UpSpecial {
// group_ids 特殊属性数组
repeated int64 group_ids = 1
[(gogoproto.jsontag) = "group_ids", (gogoproto.customname) = "GroupIDs"];
}