ソースを参照

Merge remote-tracking branch 'origin/feature/v1.0.1' into v1.0.1_ws

# Conflicts:
#	services/model/stdlib.go
wangshan 1 年間 前
コミット
5ed2d8a16b

+ 2 - 2
rpc/stdlib/etc/stdlib.yaml

@@ -2,7 +2,7 @@ Name: jydocs.stdlib.rpc
 ListenOn: :8080
 JyDocsMysqlDB:
   DriverName: "mysql"
-  DataSourceName: "root:Topnet123@tcp(192.168.3.11:3366)/jydocs?charset=utf8mb4&parseTime=true&loc=Local"
+  DataSourceName: "root:=PDT49#80Z!RVv52_z@tcp(192.168.3.217:4000)/jydocs?charset=utf8mb4&parseTime=true&loc=Local"
   MaxOpenConn: 20
   MaxIdleConn: 10
   MaxConnLifeTime: 100
@@ -13,7 +13,7 @@ EsConfig:
   Password: elastic
 Etcd:
   Hosts:
-    - 192.168.3.240:2379
+    - 127.0.0.1:2379
   Key: jydocs.stdlib.rpc
 FileSystemConf:
   Hosts:

+ 31 - 0
rpc/stdlib/internal/logic/docindextaglogic.go

@@ -0,0 +1,31 @@
+package logic
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/svc"
+	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/type/stdlib"
+	stdlibService "app.yhyue.com/moapp/jy_docs/services/stdlib"
+
+	"github.com/zeromicro/go-zero/core/logx"
+)
+
+type DocIndexTagLogic struct {
+	ctx    context.Context
+	svcCtx *svc.ServiceContext
+	logx.Logger
+}
+
+func NewDocIndexTagLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DocIndexTagLogic {
+	return &DocIndexTagLogic{
+		ctx:    ctx,
+		svcCtx: svcCtx,
+		Logger: logx.WithContext(ctx),
+	}
+}
+
+func (l *DocIndexTagLogic) DocIndexTag(in *stdlib.DocIndexTagReq) (*stdlib.DocIndexTagRes, error) {
+	// todo: add your logic here and delete this line
+	res := stdlibService.DocIndexTag()
+	return res, nil
+}

+ 7 - 1
rpc/stdlib/internal/server/stdlibserver.go

@@ -8,11 +8,12 @@ import (
 
 	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/logic"
 	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/svc"
-	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/stdlib"
+	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/type/stdlib"
 )
 
 type StdlibServer struct {
 	svcCtx *svc.ServiceContext
+	stdlib.UnimplementedStdlibServer
 }
 
 func NewStdlibServer(svcCtx *svc.ServiceContext) *StdlibServer {
@@ -55,3 +56,8 @@ func (s *StdlibServer) DocActivity(ctx context.Context, in *stdlib.DocActivityRe
 	l := logic.NewDocActivityLogic(ctx, s.svcCtx)
 	return l.DocActivity(in)
 }
+
+func (s *StdlibServer) DocIndexTag(ctx context.Context, in *stdlib.DocIndexTagReq) (*stdlib.DocIndexTagRes, error) {
+	l := logic.NewDocIndexTagLogic(ctx, s.svcCtx)
+	return l.DocIndexTag(in)
+}

+ 1 - 1
rpc/stdlib/stdlib.go

@@ -1,13 +1,13 @@
 package main
 
 import (
+	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/type/stdlib"
 	"flag"
 	"log"
 
 	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/config"
 	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/server"
 	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/internal/svc"
-	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/stdlib"
 	jyDocsRpcUtil "app.yhyue.com/moapp/jy_docs/services/util"
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/zrpc"

+ 17 - 0
rpc/stdlib/stdlib.proto

@@ -1,6 +1,7 @@
 syntax = "proto3";
 
 package stdlib;
+option go_package = "./stdlib";
 
 message DocQueryRequest {
   int64 pageNum = 1; //页码 
@@ -11,6 +12,9 @@ message DocQueryRequest {
   repeated string sort = 6; //默认正序,倒序字段前加-,uploadDate:上架时间 viewTimes:浏览量 downTimes:下载量
   string userId = 7; //用户id
   string appId = 8; //appId
+  int64 productType = 9 ; // 产品类型 1:会员免费;2:精品(付费);3:免费
+  int64 source = 10 ; //文档来源 1:剑鱼;2:豆丁;
+  int64 docFileType = 11 ; // 文件格式类型 1 doc 2 pdf 3 xls 4 ppt 5 txt 6 其他
 }
 
 message DocQueryResponse {
@@ -33,6 +37,8 @@ message Doc {
   string docFileType = 10;//文档类型
   int64 isDownload = 11;//是否转存 0:未转存 1:转存
   string previewImgId = 12;//缩略图OssId
+  int64 source = 13;// 来源  '文档来源:剑鱼- 1 豆丁- 2',
+  int64 productType = 14;// '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
 }
 
 message DocChangeReq {
@@ -80,6 +86,8 @@ message DocInfo {
   string previewImgId = 12; //缩略图oss
   string ossPdfId = 13; //pdf oss
   string ossDocId = 14; //doc oss
+  int64 source = 15;// 来源  '文档来源:剑鱼- 1 豆丁- 2',
+  int64 productType = 16;// '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
 }
 
 message DocGetContentResp {
@@ -120,6 +128,14 @@ message DocActivityResp {
   int32 total = 4; //总数
 }
 
+
+message DocIndexTagReq {
+}
+message DocIndexTagRes {
+  int32 code = 1;    //响应代码
+  string msg = 2; //响应消息
+  repeated string tags = 3;//  文档分类名称
+}
 service Stdlib {
   rpc DocQuery(DocQueryRequest) returns(DocQueryResponse); //文档检索
   rpc DocOn(DocChangeReq) returns(DocChangeResp); //文档上架
@@ -128,4 +144,5 @@ service Stdlib {
   rpc DocGetCheck(DocGetCheckReq) returns(DocGetCheckResp); //获取文档-检查文档是否可获取,返回页面数据
   rpc DocGetContent(DocGetCheckReq) returns(DocGetContentResp); //获取文档-页面打开pdf调用查询oss
   rpc DocActivity(DocActivityReq) returns(DocActivityResp); //活动文档列表
+  rpc DocIndexTag(DocIndexTagReq) returns(DocIndexTagRes); // 获取文库分类
 }

+ 92 - 0
rpc/stdlib/stdlib/stdlib.go

@@ -0,0 +1,92 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: stdlib.proto
+
+package stdlib
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/type/stdlib"
+
+	"github.com/zeromicro/go-zero/zrpc"
+	"google.golang.org/grpc"
+)
+
+type (
+	Doc               = stdlib.Doc
+	DocActivity       = stdlib.DocActivity
+	DocActivityReq    = stdlib.DocActivityReq
+	DocActivityResp   = stdlib.DocActivityResp
+	DocChangeReq      = stdlib.DocChangeReq
+	DocChangeResp     = stdlib.DocChangeResp
+	DocGetCheckReq    = stdlib.DocGetCheckReq
+	DocGetCheckResp   = stdlib.DocGetCheckResp
+	DocGetContentResp = stdlib.DocGetContentResp
+	DocIndexTagReq    = stdlib.DocIndexTagReq
+	DocIndexTagRes    = stdlib.DocIndexTagRes
+	DocInfo           = stdlib.DocInfo
+	DocQueryRequest   = stdlib.DocQueryRequest
+	DocQueryResponse  = stdlib.DocQueryResponse
+	DocStatisticsReq  = stdlib.DocStatisticsReq
+
+	Stdlib interface {
+		DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error)
+		DocOn(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+		DocOff(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+		DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+		DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error)
+		DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error)
+		DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocActivityResp, error)
+		DocIndexTag(ctx context.Context, in *DocIndexTagReq, opts ...grpc.CallOption) (*DocIndexTagRes, error)
+	}
+
+	defaultStdlib struct {
+		cli zrpc.Client
+	}
+)
+
+func NewStdlib(cli zrpc.Client) Stdlib {
+	return &defaultStdlib{
+		cli: cli,
+	}
+}
+
+func (m *defaultStdlib) DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocQuery(ctx, in, opts...)
+}
+
+func (m *defaultStdlib) DocOn(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocOn(ctx, in, opts...)
+}
+
+func (m *defaultStdlib) DocOff(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocOff(ctx, in, opts...)
+}
+
+func (m *defaultStdlib) DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocStatistics(ctx, in, opts...)
+}
+
+func (m *defaultStdlib) DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocGetCheck(ctx, in, opts...)
+}
+
+func (m *defaultStdlib) DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocGetContent(ctx, in, opts...)
+}
+
+func (m *defaultStdlib) DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocActivityResp, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocActivity(ctx, in, opts...)
+}
+
+func (m *defaultStdlib) DocIndexTag(ctx context.Context, in *DocIndexTagReq, opts ...grpc.CallOption) (*DocIndexTagRes, error) {
+	client := stdlib.NewStdlibClient(m.cli.Conn())
+	return client.DocIndexTag(ctx, in, opts...)
+}

+ 0 - 85
rpc/stdlib/stdlibclient/stdlib.go

@@ -1,85 +0,0 @@
-// Code generated by goctl. DO NOT EDIT!
-// Source: stdlib.proto
-
-//go:generate mockgen -destination ./stdlib_mock.go -package stdlibclient -source $GOFILE
-
-package stdlibclient
-
-import (
-	"context"
-
-	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/stdlib"
-
-	"github.com/zeromicro/go-zero/zrpc"
-)
-
-type (
-	DocActivityResp   = stdlib.DocActivityResp
-	DocQueryRequest   = stdlib.DocQueryRequest
-	DocQueryResponse  = stdlib.DocQueryResponse
-	Doc               = stdlib.Doc
-	DocStatisticsReq  = stdlib.DocStatisticsReq
-	DocGetCheckResp   = stdlib.DocGetCheckResp
-	DocGetContentResp = stdlib.DocGetContentResp
-	DocActivityReq    = stdlib.DocActivityReq
-	DocChangeReq      = stdlib.DocChangeReq
-	DocChangeResp     = stdlib.DocChangeResp
-	DocGetCheckReq    = stdlib.DocGetCheckReq
-	DocInfo           = stdlib.DocInfo
-	DocActivity       = stdlib.DocActivity
-
-	Stdlib interface {
-		DocQuery(ctx context.Context, in *DocQueryRequest) (*DocQueryResponse, error)
-		DocOn(ctx context.Context, in *DocChangeReq) (*DocChangeResp, error)
-		DocOff(ctx context.Context, in *DocChangeReq) (*DocChangeResp, error)
-		DocStatistics(ctx context.Context, in *DocStatisticsReq) (*DocChangeResp, error)
-		DocGetCheck(ctx context.Context, in *DocGetCheckReq) (*DocGetCheckResp, error)
-		DocGetContent(ctx context.Context, in *DocGetCheckReq) (*DocGetContentResp, error)
-		DocActivity(ctx context.Context, in *DocActivityReq) (*DocActivityResp, error)
-	}
-
-	defaultStdlib struct {
-		cli zrpc.Client
-	}
-)
-
-func NewStdlib(cli zrpc.Client) Stdlib {
-	return &defaultStdlib{
-		cli: cli,
-	}
-}
-
-func (m *defaultStdlib) DocQuery(ctx context.Context, in *DocQueryRequest) (*DocQueryResponse, error) {
-	client := stdlib.NewStdlibClient(m.cli.Conn())
-	return client.DocQuery(ctx, in)
-}
-
-func (m *defaultStdlib) DocOn(ctx context.Context, in *DocChangeReq) (*DocChangeResp, error) {
-	client := stdlib.NewStdlibClient(m.cli.Conn())
-	return client.DocOn(ctx, in)
-}
-
-func (m *defaultStdlib) DocOff(ctx context.Context, in *DocChangeReq) (*DocChangeResp, error) {
-	client := stdlib.NewStdlibClient(m.cli.Conn())
-	return client.DocOff(ctx, in)
-}
-
-func (m *defaultStdlib) DocStatistics(ctx context.Context, in *DocStatisticsReq) (*DocChangeResp, error) {
-	client := stdlib.NewStdlibClient(m.cli.Conn())
-	return client.DocStatistics(ctx, in)
-}
-
-func (m *defaultStdlib) DocGetCheck(ctx context.Context, in *DocGetCheckReq) (*DocGetCheckResp, error) {
-	client := stdlib.NewStdlibClient(m.cli.Conn())
-	return client.DocGetCheck(ctx, in)
-}
-
-func (m *defaultStdlib) DocGetContent(ctx context.Context, in *DocGetCheckReq) (*DocGetContentResp, error) {
-	client := stdlib.NewStdlibClient(m.cli.Conn())
-	return client.DocGetContent(ctx, in)
-}
-
-func (m *defaultStdlib) DocActivity(ctx context.Context, in *DocActivityReq) (*DocActivityResp, error) {
-	client := stdlib.NewStdlibClient(m.cli.Conn())
-	return client.DocActivity(ctx, in)
-}

+ 336 - 432
rpc/stdlib/stdlib/stdlib.pb.go → rpc/stdlib/type/stdlib/stdlib.pb.go

@@ -1,17 +1,12 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.25.0
-// 	protoc        v3.15.6
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
 // source: stdlib.proto
 
 package stdlib
 
 import (
-	context "context"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -25,23 +20,22 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-// This is a compile-time assertion that a sufficiently up-to-date version
-// of the legacy proto package is being used.
-const _ = proto.ProtoPackageIsVersion4
-
 type DocQueryRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	PageNum  int64    `protobuf:"varint,1,opt,name=pageNum,proto3" json:"pageNum,omitempty"`   //页码
-	PageSize int64    `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"` //每页数量
-	KeyWord  string   `protobuf:"bytes,3,opt,name=keyWord,proto3" json:"keyWord,omitempty"`    //检索词  文档名检索  模糊
-	DocClass []string `protobuf:"bytes,4,rep,name=docClass,proto3" json:"docClass,omitempty"`  // 分类 []string
-	DocTag   []string `protobuf:"bytes,5,rep,name=docTag,proto3" json:"docTag,omitempty"`      // 标签 []string
-	Sort     []string `protobuf:"bytes,6,rep,name=sort,proto3" json:"sort,omitempty"`          //默认正序,倒序字段前加-,uploadDate:上架时间 viewTimes:浏览量 downTimes:下载量
-	UserId   string   `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"`      //用户id
-	AppId    string   `protobuf:"bytes,8,opt,name=appId,proto3" json:"appId,omitempty"`        //appId
+	PageNum     int64    `protobuf:"varint,1,opt,name=pageNum,proto3" json:"pageNum,omitempty"`          //页码
+	PageSize    int64    `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`        //每页数量
+	KeyWord     string   `protobuf:"bytes,3,opt,name=keyWord,proto3" json:"keyWord,omitempty"`           //检索词  文档名检索  模糊
+	DocClass    []string `protobuf:"bytes,4,rep,name=docClass,proto3" json:"docClass,omitempty"`         // 分类 []string
+	DocTag      []string `protobuf:"bytes,5,rep,name=docTag,proto3" json:"docTag,omitempty"`             // 标签 []string
+	Sort        []string `protobuf:"bytes,6,rep,name=sort,proto3" json:"sort,omitempty"`                 //默认正序,倒序字段前加-,uploadDate:上架时间 viewTimes:浏览量 downTimes:下载量
+	UserId      string   `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"`             //用户id
+	AppId       string   `protobuf:"bytes,8,opt,name=appId,proto3" json:"appId,omitempty"`               //appId
+	ProductType int64    `protobuf:"varint,9,opt,name=productType,proto3" json:"productType,omitempty"`  // 产品类型 1:会员免费;2:精品(付费);3:免费
+	Source      int64    `protobuf:"varint,10,opt,name=source,proto3" json:"source,omitempty"`           //文档来源 1:剑鱼;2:豆丁;
+	DocFileType int64    `protobuf:"varint,11,opt,name=docFileType,proto3" json:"docFileType,omitempty"` // 文件格式类型 1 doc 2 pdf 3 xls 4 ppt 5 txt 6 其他
 }
 
 func (x *DocQueryRequest) Reset() {
@@ -132,6 +126,27 @@ func (x *DocQueryRequest) GetAppId() string {
 	return ""
 }
 
+func (x *DocQueryRequest) GetProductType() int64 {
+	if x != nil {
+		return x.ProductType
+	}
+	return 0
+}
+
+func (x *DocQueryRequest) GetSource() int64 {
+	if x != nil {
+		return x.Source
+	}
+	return 0
+}
+
+func (x *DocQueryRequest) GetDocFileType() int64 {
+	if x != nil {
+		return x.DocFileType
+	}
+	return 0
+}
+
 type DocQueryResponse struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -220,6 +235,8 @@ type Doc struct {
 	DocFileType  string `protobuf:"bytes,10,opt,name=docFileType,proto3" json:"docFileType,omitempty"`   //文档类型
 	IsDownload   int64  `protobuf:"varint,11,opt,name=isDownload,proto3" json:"isDownload,omitempty"`    //是否转存 0:未转存 1:转存
 	PreviewImgId string `protobuf:"bytes,12,opt,name=previewImgId,proto3" json:"previewImgId,omitempty"` //缩略图OssId
+	Source       int64  `protobuf:"varint,13,opt,name=source,proto3" json:"source,omitempty"`            // 来源  '文档来源:剑鱼- 1 豆丁- 2',
+	ProductType  int64  `protobuf:"varint,14,opt,name=productType,proto3" json:"productType,omitempty"`  // '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
 }
 
 func (x *Doc) Reset() {
@@ -338,6 +355,20 @@ func (x *Doc) GetPreviewImgId() string {
 	return ""
 }
 
+func (x *Doc) GetSource() int64 {
+	if x != nil {
+		return x.Source
+	}
+	return 0
+}
+
+func (x *Doc) GetProductType() int64 {
+	if x != nil {
+		return x.ProductType
+	}
+	return 0
+}
+
 type DocChangeReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -672,6 +703,8 @@ type DocInfo struct {
 	PreviewImgId string `protobuf:"bytes,12,opt,name=previewImgId,proto3" json:"previewImgId,omitempty"` //缩略图oss
 	OssPdfId     string `protobuf:"bytes,13,opt,name=ossPdfId,proto3" json:"ossPdfId,omitempty"`         //pdf oss
 	OssDocId     string `protobuf:"bytes,14,opt,name=ossDocId,proto3" json:"ossDocId,omitempty"`         //doc oss
+	Source       int64  `protobuf:"varint,15,opt,name=source,proto3" json:"source,omitempty"`            // 来源  '文档来源:剑鱼- 1 豆丁- 2',
+	ProductType  int64  `protobuf:"varint,16,opt,name=productType,proto3" json:"productType,omitempty"`  // '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
 }
 
 func (x *DocInfo) Reset() {
@@ -804,6 +837,20 @@ func (x *DocInfo) GetOssDocId() string {
 	return ""
 }
 
+func (x *DocInfo) GetSource() int64 {
+	if x != nil {
+		return x.Source
+	}
+	return 0
+}
+
+func (x *DocInfo) GetProductType() int64 {
+	if x != nil {
+		return x.ProductType
+	}
+	return 0
+}
+
 type DocGetContentResp struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1168,11 +1215,112 @@ func (x *DocActivityResp) GetTotal() int32 {
 	return 0
 }
 
+type DocIndexTagReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+}
+
+func (x *DocIndexTagReq) Reset() {
+	*x = DocIndexTagReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_stdlib_proto_msgTypes[13]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DocIndexTagReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocIndexTagReq) ProtoMessage() {}
+
+func (x *DocIndexTagReq) ProtoReflect() protoreflect.Message {
+	mi := &file_stdlib_proto_msgTypes[13]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DocIndexTagReq.ProtoReflect.Descriptor instead.
+func (*DocIndexTagReq) Descriptor() ([]byte, []int) {
+	return file_stdlib_proto_rawDescGZIP(), []int{13}
+}
+
+type DocIndexTagRes struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Code int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //响应代码
+	Msg  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`    //响应消息
+	Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`  //  文档分类名称
+}
+
+func (x *DocIndexTagRes) Reset() {
+	*x = DocIndexTagRes{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_stdlib_proto_msgTypes[14]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DocIndexTagRes) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DocIndexTagRes) ProtoMessage() {}
+
+func (x *DocIndexTagRes) ProtoReflect() protoreflect.Message {
+	mi := &file_stdlib_proto_msgTypes[14]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use DocIndexTagRes.ProtoReflect.Descriptor instead.
+func (*DocIndexTagRes) Descriptor() ([]byte, []int) {
+	return file_stdlib_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *DocIndexTagRes) GetCode() int32 {
+	if x != nil {
+		return x.Code
+	}
+	return 0
+}
+
+func (x *DocIndexTagRes) GetMsg() string {
+	if x != nil {
+		return x.Msg
+	}
+	return ""
+}
+
+func (x *DocIndexTagRes) GetTags() []string {
+	if x != nil {
+		return x.Tags
+	}
+	return nil
+}
+
 var File_stdlib_proto protoreflect.FileDescriptor
 
 var file_stdlib_proto_rawDesc = []byte{
 	0x0a, 0x0c, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06,
-	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x22, 0xd7, 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x51, 0x75,
+	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x22, 0xb3, 0x02, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x51, 0x75,
 	0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61,
 	0x67, 0x65, 0x4e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x67,
 	0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
@@ -1186,67 +1334,20 @@ var file_stdlib_proto_rawDesc = []byte{
 	0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x07, 0x20, 0x01,
 	0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70,
 	0x70, 0x49, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64,
-	0x22, 0x6f, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
-	0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
-	0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x6f,
-	0x63, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69,
-	0x62, 0x2e, 0x44, 0x6f, 0x63, 0x52, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74,
-	0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61,
-	0x6c, 0x22, 0xf1, 0x02, 0x0a, 0x03, 0x44, 0x6f, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63,
-	0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12,
-	0x18, 0x0a, 0x07, 0x64, 0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x07, 0x64, 0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69,
-	0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12,
-	0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a,
-	0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
-	0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53,
-	0x69, 0x7a, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73,
-	0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65,
-	0x73, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x69, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x07,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x76, 0x69, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12,
-	0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12,
-	0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x09, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12,
-	0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70,
-	0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x18,
-	0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
-	0x64, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6d, 0x67, 0x49,
-	0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
-	0x49, 0x6d, 0x67, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x0c, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e,
-	0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18,
-	0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x14, 0x0a,
-	0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70,
-	0x70, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x0d, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20,
-	0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x6c, 0x0a, 0x10, 0x44, 0x6f,
-	0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x52, 0x65, 0x71, 0x12, 0x14,
-	0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64,
-	0x6f, 0x63, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69,
-	0x73, 0x74, 0x69, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
-	0x11, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x54, 0x79,
-	0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x47,
-	0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f,
-	0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64,
-	0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
-	0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49,
-	0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x98,
-	0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
-	0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x73, 0x42, 0x75,
-	0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x42, 0x75, 0x79, 0x12, 0x1c,
-	0x0a, 0x09, 0x69, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
-	0x08, 0x52, 0x09, 0x69, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x2b, 0x0a, 0x08,
-	0x44, 0x6f, 0x63, 0x44, 0x65, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f,
-	0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52,
-	0x08, 0x44, 0x6f, 0x63, 0x44, 0x65, 0x61, 0x69, 0x6c, 0x22, 0xa1, 0x03, 0x0a, 0x07, 0x44, 0x6f,
-	0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01,
+	0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f,
+	0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52,
+	0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x6f, 0x0a, 0x10,
+	0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+	0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04,
+	0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x1f, 0x0a, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x18, 0x03,
+	0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f,
+	0x63, 0x52, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0xab, 0x03,
+	0x0a, 0x03, 0x44, 0x6f, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01,
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x64,
 	0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x6f,
 	0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03,
@@ -1255,23 +1356,83 @@ var file_stdlib_proto_rawDesc = []byte{
 	0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a,
 	0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, 0x20, 0x01,
 	0x28, 0x03, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12,
-	0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
-	0x61, 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73,
-	0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65,
-	0x73, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x69, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x08,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x76, 0x69, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12,
-	0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x09, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12,
-	0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x0a, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12,
-	0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70,
-	0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6d, 0x67, 0x49,
-	0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77,
-	0x49, 0x6d, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x73, 0x73, 0x50, 0x64, 0x66, 0x49,
-	0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x73, 0x73, 0x50, 0x64, 0x66, 0x49,
-	0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x73, 0x73, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x0e, 0x20,
-	0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x73, 0x73, 0x44, 0x6f, 0x63, 0x49, 0x64, 0x22, 0x59, 0x0a,
+	0x1c, 0x0a, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x06, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x09, 0x64, 0x6f, 0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x0a,
+	0x09, 0x76, 0x69, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x09, 0x76, 0x69, 0x65, 0x77, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x75,
+	0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64,
+	0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64,
+	0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a,
+	0x0a, 0x69, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x0a, 0x69, 0x73, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x22, 0x0a,
+	0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6d, 0x67, 0x49, 0x64, 0x18, 0x0c, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6d, 0x67, 0x49,
+	0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f,
+	0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b,
+	0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4c, 0x0a, 0x0c, 0x44,
+	0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+	0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72,
+	0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x61,
+	0x73, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x25, 0x0a, 0x0d, 0x44, 0x6f, 0x63,
+	0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74,
+	0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
+	0x22, 0x6c, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
+	0x73, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x11, 0x44, 0x6f,
+	0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73,
+	0x74, 0x69, 0x63, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49,
+	0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0x54,
+	0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x71,
+	0x12, 0x14, 0x0a, 0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x64, 0x6f, 0x63, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x14,
+	0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61,
+	0x70, 0x70, 0x49, 0x64, 0x22, 0x98, 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43,
+	0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03,
+	0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x14,
+	0x0a, 0x05, 0x69, 0x73, 0x42, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69,
+	0x73, 0x42, 0x75, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
+	0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65,
+	0x63, 0x74, 0x12, 0x2b, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x44, 0x65, 0x61, 0x69, 0x6c, 0x18, 0x05,
+	0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f,
+	0x63, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x44, 0x6f, 0x63, 0x44, 0x65, 0x61, 0x69, 0x6c, 0x22,
+	0xdb, 0x03, 0x0a, 0x07, 0x44, 0x6f, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x64,
+	0x6f, 0x63, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x6f, 0x63, 0x49,
+	0x64, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x07, 0x64, 0x6f, 0x63, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70,
+	0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63,
+	0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53, 0x69, 0x7a, 0x65,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x53,
+	0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67, 0x65, 0x53, 0x69,
+	0x7a, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x50, 0x61, 0x67,
+	0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x06, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x64, 0x6f, 0x77,
+	0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x64, 0x6f,
+	0x77, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x76, 0x69, 0x65, 0x77, 0x54,
+	0x69, 0x6d, 0x65, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x76, 0x69, 0x65, 0x77,
+	0x54, 0x69, 0x6d, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x44,
+	0x61, 0x74, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x6c, 0x6f, 0x61,
+	0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75, 0x6d, 0x6d,
+	0x61, 0x72, 0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x63, 0x53, 0x75,
+	0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65,
+	0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x64, 0x6f, 0x63, 0x46,
+	0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x70, 0x72, 0x65, 0x76, 0x69,
+	0x65, 0x77, 0x49, 0x6d, 0x67, 0x49, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x70,
+	0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x49, 0x6d, 0x67, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f,
+	0x73, 0x73, 0x50, 0x64, 0x66, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f,
+	0x73, 0x73, 0x50, 0x64, 0x66, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x73, 0x73, 0x44, 0x6f,
+	0x63, 0x49, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x73, 0x73, 0x44, 0x6f,
+	0x63, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0f, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70,
+	0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x59, 0x0a,
 	0x11, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65,
 	0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
 	0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
@@ -1321,35 +1482,46 @@ var file_stdlib_proto_rawDesc = []byte{
 	0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x41,
 	0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x04, 0x64, 0x6f, 0x63, 0x73, 0x12, 0x14, 0x0a,
 	0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f,
-	0x74, 0x61, 0x6c, 0x32, 0xba, 0x03, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x12, 0x3d,
-	0x0a, 0x08, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x73, 0x74, 0x64,
-	0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
-	0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63,
-	0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a,
-	0x05, 0x44, 0x6f, 0x63, 0x4f, 0x6e, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e,
-	0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73,
-	0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x35, 0x0a, 0x06, 0x44, 0x6f, 0x63, 0x4f, 0x66, 0x66, 0x12, 0x14, 0x2e,
-	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65,
+	0x74, 0x61, 0x6c, 0x22, 0x10, 0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54,
+	0x61, 0x67, 0x52, 0x65, 0x71, 0x22, 0x4a, 0x0a, 0x0e, 0x44, 0x6f, 0x63, 0x49, 0x6e, 0x64, 0x65,
+	0x78, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d,
+	0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a,
+	0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67,
+	0x73, 0x32, 0xf9, 0x03, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x12, 0x3d, 0x0a, 0x08,
+	0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69,
+	0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+	0x74, 0x1a, 0x18, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x51, 0x75,
+	0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x44,
+	0x6f, 0x63, 0x4f, 0x6e, 0x12, 0x14, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f,
+	0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x64,
+	0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x35, 0x0a, 0x06, 0x44, 0x6f, 0x63, 0x4f, 0x66, 0x66, 0x12, 0x14, 0x2e, 0x73, 0x74,
+	0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65,
+	0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x43, 0x68,
+	0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x44, 0x6f, 0x63, 0x53,
+	0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x74, 0x64, 0x6c,
+	0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
 	0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63,
-	0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x40, 0x0a, 0x0d, 0x44, 0x6f,
-	0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x12, 0x18, 0x2e, 0x73, 0x74,
-	0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69,
-	0x63, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x15, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
-	0x6f, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0b,
-	0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x73, 0x74,
+	0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e, 0x0a, 0x0b, 0x44, 0x6f,
+	0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x16, 0x2e, 0x73, 0x74, 0x64, 0x6c,
+	0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65,
+	0x71, 0x1a, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x47, 0x65,
+	0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0d, 0x44, 0x6f,
+	0x63, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e, 0x73, 0x74,
 	0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b,
-	0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63,
-	0x47, 0x65, 0x74, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x42, 0x0a, 0x0d,
-	0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x2e,
-	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x68, 0x65,
-	0x63, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
-	0x6f, 0x63, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x3e, 0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12,
-	0x16, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x41, 0x63, 0x74, 0x69,
-	0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62,
-	0x2e, 0x44, 0x6f, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70,
-	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63,
+	0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3e,
+	0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x16, 0x2e,
+	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
+	0x74, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x17, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
+	0x6f, 0x63, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3d,
+	0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x61, 0x67, 0x12, 0x16, 0x2e,
+	0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44, 0x6f, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54,
+	0x61, 0x67, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x2e, 0x44,
+	0x6f, 0x63, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x42, 0x0a, 0x5a,
+	0x08, 0x2e, 0x2f, 0x73, 0x74, 0x64, 0x6c, 0x69, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+	0x33,
 }
 
 var (
@@ -1364,7 +1536,7 @@ func file_stdlib_proto_rawDescGZIP() []byte {
 	return file_stdlib_proto_rawDescData
 }
 
-var file_stdlib_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
+var file_stdlib_proto_msgTypes = make([]protoimpl.MessageInfo, 15)
 var file_stdlib_proto_goTypes = []interface{}{
 	(*DocQueryRequest)(nil),   // 0: stdlib.DocQueryRequest
 	(*DocQueryResponse)(nil),  // 1: stdlib.DocQueryResponse
@@ -1379,6 +1551,8 @@ var file_stdlib_proto_goTypes = []interface{}{
 	(*DocActivityReq)(nil),    // 10: stdlib.DocActivityReq
 	(*DocActivity)(nil),       // 11: stdlib.DocActivity
 	(*DocActivityResp)(nil),   // 12: stdlib.DocActivityResp
+	(*DocIndexTagReq)(nil),    // 13: stdlib.DocIndexTagReq
+	(*DocIndexTagRes)(nil),    // 14: stdlib.DocIndexTagRes
 }
 var file_stdlib_proto_depIdxs = []int32{
 	2,  // 0: stdlib.DocQueryResponse.docs:type_name -> stdlib.Doc
@@ -1391,15 +1565,17 @@ var file_stdlib_proto_depIdxs = []int32{
 	6,  // 7: stdlib.Stdlib.DocGetCheck:input_type -> stdlib.DocGetCheckReq
 	6,  // 8: stdlib.Stdlib.DocGetContent:input_type -> stdlib.DocGetCheckReq
 	10, // 9: stdlib.Stdlib.DocActivity:input_type -> stdlib.DocActivityReq
-	1,  // 10: stdlib.Stdlib.DocQuery:output_type -> stdlib.DocQueryResponse
-	4,  // 11: stdlib.Stdlib.DocOn:output_type -> stdlib.DocChangeResp
-	4,  // 12: stdlib.Stdlib.DocOff:output_type -> stdlib.DocChangeResp
-	4,  // 13: stdlib.Stdlib.DocStatistics:output_type -> stdlib.DocChangeResp
-	7,  // 14: stdlib.Stdlib.DocGetCheck:output_type -> stdlib.DocGetCheckResp
-	9,  // 15: stdlib.Stdlib.DocGetContent:output_type -> stdlib.DocGetContentResp
-	12, // 16: stdlib.Stdlib.DocActivity:output_type -> stdlib.DocActivityResp
-	10, // [10:17] is the sub-list for method output_type
-	3,  // [3:10] is the sub-list for method input_type
+	13, // 10: stdlib.Stdlib.DocIndexTag:input_type -> stdlib.DocIndexTagReq
+	1,  // 11: stdlib.Stdlib.DocQuery:output_type -> stdlib.DocQueryResponse
+	4,  // 12: stdlib.Stdlib.DocOn:output_type -> stdlib.DocChangeResp
+	4,  // 13: stdlib.Stdlib.DocOff:output_type -> stdlib.DocChangeResp
+	4,  // 14: stdlib.Stdlib.DocStatistics:output_type -> stdlib.DocChangeResp
+	7,  // 15: stdlib.Stdlib.DocGetCheck:output_type -> stdlib.DocGetCheckResp
+	9,  // 16: stdlib.Stdlib.DocGetContent:output_type -> stdlib.DocGetContentResp
+	12, // 17: stdlib.Stdlib.DocActivity:output_type -> stdlib.DocActivityResp
+	14, // 18: stdlib.Stdlib.DocIndexTag:output_type -> stdlib.DocIndexTagRes
+	11, // [11:19] is the sub-list for method output_type
+	3,  // [3:11] is the sub-list for method input_type
 	3,  // [3:3] is the sub-list for extension type_name
 	3,  // [3:3] is the sub-list for extension extendee
 	0,  // [0:3] is the sub-list for field type_name
@@ -1567,6 +1743,30 @@ func file_stdlib_proto_init() {
 				return nil
 			}
 		}
+		file_stdlib_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DocIndexTagReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_stdlib_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DocIndexTagRes); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -1574,7 +1774,7 @@ func file_stdlib_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_stdlib_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   13,
+			NumMessages:   15,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
@@ -1587,299 +1787,3 @@ func file_stdlib_proto_init() {
 	file_stdlib_proto_goTypes = nil
 	file_stdlib_proto_depIdxs = nil
 }
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConnInterface
-
-// 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.SupportPackageIsVersion6
-
-// StdlibClient is the client API for Stdlib service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type StdlibClient interface {
-	DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error)
-	DocOn(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
-	DocOff(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
-	DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error)
-	DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error)
-	DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error)
-	DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocActivityResp, error)
-}
-
-type stdlibClient struct {
-	cc grpc.ClientConnInterface
-}
-
-func NewStdlibClient(cc grpc.ClientConnInterface) StdlibClient {
-	return &stdlibClient{cc}
-}
-
-func (c *stdlibClient) DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error) {
-	out := new(DocQueryResponse)
-	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocQuery", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *stdlibClient) DocOn(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
-	out := new(DocChangeResp)
-	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocOn", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *stdlibClient) DocOff(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
-	out := new(DocChangeResp)
-	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocOff", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *stdlibClient) DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
-	out := new(DocChangeResp)
-	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocStatistics", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *stdlibClient) DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error) {
-	out := new(DocGetCheckResp)
-	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocGetCheck", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *stdlibClient) DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error) {
-	out := new(DocGetContentResp)
-	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocGetContent", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *stdlibClient) DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocActivityResp, error) {
-	out := new(DocActivityResp)
-	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocActivity", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// StdlibServer is the server API for Stdlib service.
-type StdlibServer interface {
-	DocQuery(context.Context, *DocQueryRequest) (*DocQueryResponse, error)
-	DocOn(context.Context, *DocChangeReq) (*DocChangeResp, error)
-	DocOff(context.Context, *DocChangeReq) (*DocChangeResp, error)
-	DocStatistics(context.Context, *DocStatisticsReq) (*DocChangeResp, error)
-	DocGetCheck(context.Context, *DocGetCheckReq) (*DocGetCheckResp, error)
-	DocGetContent(context.Context, *DocGetCheckReq) (*DocGetContentResp, error)
-	DocActivity(context.Context, *DocActivityReq) (*DocActivityResp, error)
-}
-
-// UnimplementedStdlibServer can be embedded to have forward compatible implementations.
-type UnimplementedStdlibServer struct {
-}
-
-func (*UnimplementedStdlibServer) DocQuery(context.Context, *DocQueryRequest) (*DocQueryResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocQuery not implemented")
-}
-func (*UnimplementedStdlibServer) DocOn(context.Context, *DocChangeReq) (*DocChangeResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocOn not implemented")
-}
-func (*UnimplementedStdlibServer) DocOff(context.Context, *DocChangeReq) (*DocChangeResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocOff not implemented")
-}
-func (*UnimplementedStdlibServer) DocStatistics(context.Context, *DocStatisticsReq) (*DocChangeResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocStatistics not implemented")
-}
-func (*UnimplementedStdlibServer) DocGetCheck(context.Context, *DocGetCheckReq) (*DocGetCheckResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocGetCheck not implemented")
-}
-func (*UnimplementedStdlibServer) DocGetContent(context.Context, *DocGetCheckReq) (*DocGetContentResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocGetContent not implemented")
-}
-func (*UnimplementedStdlibServer) DocActivity(context.Context, *DocActivityReq) (*DocActivityResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocActivity not implemented")
-}
-
-func RegisterStdlibServer(s *grpc.Server, srv StdlibServer) {
-	s.RegisterService(&_Stdlib_serviceDesc, srv)
-}
-
-func _Stdlib_DocQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DocQueryRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(StdlibServer).DocQuery(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/stdlib.Stdlib/DocQuery",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(StdlibServer).DocQuery(ctx, req.(*DocQueryRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Stdlib_DocOn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DocChangeReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(StdlibServer).DocOn(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/stdlib.Stdlib/DocOn",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(StdlibServer).DocOn(ctx, req.(*DocChangeReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Stdlib_DocOff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DocChangeReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(StdlibServer).DocOff(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/stdlib.Stdlib/DocOff",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(StdlibServer).DocOff(ctx, req.(*DocChangeReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Stdlib_DocStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DocStatisticsReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(StdlibServer).DocStatistics(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/stdlib.Stdlib/DocStatistics",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(StdlibServer).DocStatistics(ctx, req.(*DocStatisticsReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Stdlib_DocGetCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DocGetCheckReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(StdlibServer).DocGetCheck(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/stdlib.Stdlib/DocGetCheck",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(StdlibServer).DocGetCheck(ctx, req.(*DocGetCheckReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Stdlib_DocGetContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DocGetCheckReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(StdlibServer).DocGetContent(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/stdlib.Stdlib/DocGetContent",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(StdlibServer).DocGetContent(ctx, req.(*DocGetCheckReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _Stdlib_DocActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(DocActivityReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(StdlibServer).DocActivity(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/stdlib.Stdlib/DocActivity",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(StdlibServer).DocActivity(ctx, req.(*DocActivityReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-var _Stdlib_serviceDesc = grpc.ServiceDesc{
-	ServiceName: "stdlib.Stdlib",
-	HandlerType: (*StdlibServer)(nil),
-	Methods: []grpc.MethodDesc{
-		{
-			MethodName: "DocQuery",
-			Handler:    _Stdlib_DocQuery_Handler,
-		},
-		{
-			MethodName: "DocOn",
-			Handler:    _Stdlib_DocOn_Handler,
-		},
-		{
-			MethodName: "DocOff",
-			Handler:    _Stdlib_DocOff_Handler,
-		},
-		{
-			MethodName: "DocStatistics",
-			Handler:    _Stdlib_DocStatistics_Handler,
-		},
-		{
-			MethodName: "DocGetCheck",
-			Handler:    _Stdlib_DocGetCheck_Handler,
-		},
-		{
-			MethodName: "DocGetContent",
-			Handler:    _Stdlib_DocGetContent_Handler,
-		},
-		{
-			MethodName: "DocActivity",
-			Handler:    _Stdlib_DocActivity_Handler,
-		},
-	},
-	Streams:  []grpc.StreamDesc{},
-	Metadata: "stdlib.proto",
-}

+ 357 - 0
rpc/stdlib/type/stdlib/stdlib_grpc.pb.go

@@ -0,0 +1,357 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.19.4
+// source: stdlib.proto
+
+package stdlib
+
+import (
+	context "context"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// StdlibClient is the client API for Stdlib service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type StdlibClient interface {
+	DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error)
+	DocOn(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+	DocOff(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+	DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error)
+	DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error)
+	DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error)
+	DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocActivityResp, error)
+	DocIndexTag(ctx context.Context, in *DocIndexTagReq, opts ...grpc.CallOption) (*DocIndexTagRes, error)
+}
+
+type stdlibClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewStdlibClient(cc grpc.ClientConnInterface) StdlibClient {
+	return &stdlibClient{cc}
+}
+
+func (c *stdlibClient) DocQuery(ctx context.Context, in *DocQueryRequest, opts ...grpc.CallOption) (*DocQueryResponse, error) {
+	out := new(DocQueryResponse)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocQuery", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocOn(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
+	out := new(DocChangeResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocOn", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocOff(ctx context.Context, in *DocChangeReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
+	out := new(DocChangeResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocOff", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocStatistics(ctx context.Context, in *DocStatisticsReq, opts ...grpc.CallOption) (*DocChangeResp, error) {
+	out := new(DocChangeResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocStatistics", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocGetCheck(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetCheckResp, error) {
+	out := new(DocGetCheckResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocGetCheck", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocGetContent(ctx context.Context, in *DocGetCheckReq, opts ...grpc.CallOption) (*DocGetContentResp, error) {
+	out := new(DocGetContentResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocGetContent", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocActivity(ctx context.Context, in *DocActivityReq, opts ...grpc.CallOption) (*DocActivityResp, error) {
+	out := new(DocActivityResp)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocActivity", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *stdlibClient) DocIndexTag(ctx context.Context, in *DocIndexTagReq, opts ...grpc.CallOption) (*DocIndexTagRes, error) {
+	out := new(DocIndexTagRes)
+	err := c.cc.Invoke(ctx, "/stdlib.Stdlib/DocIndexTag", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// StdlibServer is the server API for Stdlib service.
+// All implementations must embed UnimplementedStdlibServer
+// for forward compatibility
+type StdlibServer interface {
+	DocQuery(context.Context, *DocQueryRequest) (*DocQueryResponse, error)
+	DocOn(context.Context, *DocChangeReq) (*DocChangeResp, error)
+	DocOff(context.Context, *DocChangeReq) (*DocChangeResp, error)
+	DocStatistics(context.Context, *DocStatisticsReq) (*DocChangeResp, error)
+	DocGetCheck(context.Context, *DocGetCheckReq) (*DocGetCheckResp, error)
+	DocGetContent(context.Context, *DocGetCheckReq) (*DocGetContentResp, error)
+	DocActivity(context.Context, *DocActivityReq) (*DocActivityResp, error)
+	DocIndexTag(context.Context, *DocIndexTagReq) (*DocIndexTagRes, error)
+	mustEmbedUnimplementedStdlibServer()
+}
+
+// UnimplementedStdlibServer must be embedded to have forward compatible implementations.
+type UnimplementedStdlibServer struct {
+}
+
+func (UnimplementedStdlibServer) DocQuery(context.Context, *DocQueryRequest) (*DocQueryResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocQuery not implemented")
+}
+func (UnimplementedStdlibServer) DocOn(context.Context, *DocChangeReq) (*DocChangeResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocOn not implemented")
+}
+func (UnimplementedStdlibServer) DocOff(context.Context, *DocChangeReq) (*DocChangeResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocOff not implemented")
+}
+func (UnimplementedStdlibServer) DocStatistics(context.Context, *DocStatisticsReq) (*DocChangeResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocStatistics not implemented")
+}
+func (UnimplementedStdlibServer) DocGetCheck(context.Context, *DocGetCheckReq) (*DocGetCheckResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocGetCheck not implemented")
+}
+func (UnimplementedStdlibServer) DocGetContent(context.Context, *DocGetCheckReq) (*DocGetContentResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocGetContent not implemented")
+}
+func (UnimplementedStdlibServer) DocActivity(context.Context, *DocActivityReq) (*DocActivityResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocActivity not implemented")
+}
+func (UnimplementedStdlibServer) DocIndexTag(context.Context, *DocIndexTagReq) (*DocIndexTagRes, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocIndexTag not implemented")
+}
+func (UnimplementedStdlibServer) mustEmbedUnimplementedStdlibServer() {}
+
+// UnsafeStdlibServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to StdlibServer will
+// result in compilation errors.
+type UnsafeStdlibServer interface {
+	mustEmbedUnimplementedStdlibServer()
+}
+
+func RegisterStdlibServer(s grpc.ServiceRegistrar, srv StdlibServer) {
+	s.RegisterService(&Stdlib_ServiceDesc, srv)
+}
+
+func _Stdlib_DocQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocQueryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocQuery(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocQuery",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocQuery(ctx, req.(*DocQueryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocOn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocChangeReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocOn(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocOn",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocOn(ctx, req.(*DocChangeReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocOff_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocChangeReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocOff(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocOff",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocOff(ctx, req.(*DocChangeReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocStatistics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocStatisticsReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocStatistics(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocStatistics",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocStatistics(ctx, req.(*DocStatisticsReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocGetCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocGetCheckReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocGetCheck(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocGetCheck",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocGetCheck(ctx, req.(*DocGetCheckReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocGetContent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocGetCheckReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocGetContent(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocGetContent",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocGetContent(ctx, req.(*DocGetCheckReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocActivity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocActivityReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocActivity(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocActivity",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocActivity(ctx, req.(*DocActivityReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Stdlib_DocIndexTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(DocIndexTagReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StdlibServer).DocIndexTag(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/stdlib.Stdlib/DocIndexTag",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StdlibServer).DocIndexTag(ctx, req.(*DocIndexTagReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// Stdlib_ServiceDesc is the grpc.ServiceDesc for Stdlib service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var Stdlib_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "stdlib.Stdlib",
+	HandlerType: (*StdlibServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "DocQuery",
+			Handler:    _Stdlib_DocQuery_Handler,
+		},
+		{
+			MethodName: "DocOn",
+			Handler:    _Stdlib_DocOn_Handler,
+		},
+		{
+			MethodName: "DocOff",
+			Handler:    _Stdlib_DocOff_Handler,
+		},
+		{
+			MethodName: "DocStatistics",
+			Handler:    _Stdlib_DocStatistics_Handler,
+		},
+		{
+			MethodName: "DocGetCheck",
+			Handler:    _Stdlib_DocGetCheck_Handler,
+		},
+		{
+			MethodName: "DocGetContent",
+			Handler:    _Stdlib_DocGetContent_Handler,
+		},
+		{
+			MethodName: "DocActivity",
+			Handler:    _Stdlib_DocActivity_Handler,
+		},
+		{
+			MethodName: "DocIndexTag",
+			Handler:    _Stdlib_DocIndexTag_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "stdlib.proto",
+}

+ 6 - 2
rpc/userlib/etc/userlib.yaml

@@ -11,9 +11,13 @@ FileSystemConf:
     Key: integral.rpc
 JyDocsMysqlDB:
   DriverName: "mysql"
-  DataSourceName: "root:Topnet123@tcp(192.168.3.11:3366)/jydocs?charset=utf8mb4&parseTime=true&loc=Local"
+  DataSourceName: "root:=PDT49#80Z!RVv52_z@tcp(192.168.3.217:4000)/jydocs?charset=utf8mb4&parseTime=true&loc=Local"
   MaxOpenConn: 20
   MaxIdleConn: 10
   MaxConnLifeTime: 100
 Callee: "文库"
-Node: "1"
+Node: "1"
+JyPremiumTag:
+  行业报告: true
+  行业解决方案: true
+  投标文件: true

+ 4 - 3
rpc/userlib/internal/config/config.go

@@ -9,8 +9,9 @@ type Config struct {
 	zrpc.RpcServerConf
 	JyDocsMysqlDB  jyDocRpcUtil.MysqlDBConfig
 	FileSystemConf zrpc.RpcClientConf
-	Callee			string
-	Node			string
+	Callee         string
+	Node           string
+	JyPremiumTag   map[string]bool
 }
 
-var   Configs Config
+var Configs Config

+ 26 - 1
rpc/userlib/internal/logic/userdocslogic.go

@@ -5,6 +5,7 @@ import (
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
 	userLibService "app.yhyue.com/moapp/jy_docs/services/userlib"
 	"context"
+	"strings"
 
 	"github.com/zeromicro/go-zero/core/logx"
 )
@@ -23,7 +24,12 @@ func NewUserDocsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserDocs
 	}
 }
 
-//我的文档 收藏和兑换
+const (
+	ProductTypeMemberFree = 1 // 商品类型 会员免费
+	ProductTypePremium    = 2 // 商品类型 精品文档
+)
+
+// 我的文档 收藏和兑换
 func (l *UserDocsLogic) UserDocs(in *userlib.UserDocsRequest) (*userlib.UserDocsResponse, error) {
 	// todo: add your logic here and delete this line
 	result := &userlib.UserDocsResponse{}
@@ -33,6 +39,23 @@ func (l *UserDocsLogic) UserDocs(in *userlib.UserDocsRequest) (*userlib.UserDocs
 		if value.IsDownload == 1 {
 			value.Cost = "已购买"
 		}
+		// 因为tidb的历史数据没有处理 收藏列表需要展示商品类型 所以需要处理一下
+		if value.ProductType == 0 && in.UserDocCategory == int64(1) {
+			var flag bool
+			tags := strings.Split(value.DocTags, ",")
+			for i := 0; i < len(tags); i++ {
+				if l.svcCtx.Config.JyPremiumTag[tags[i]] {
+					// 说明是剑鱼精品文档
+					flag = true
+					value.ProductType = ProductTypePremium
+					break
+				}
+			}
+			if !flag {
+				// 否则是剑鱼会员免费文档
+				value.ProductType = ProductTypeMemberFree
+			}
+		}
 		docList = append(docList, &userlib.UserDocs{
 			CreateAt:      value.CreateAt.Unix(),
 			UpdateAt:      value.UpdateAt.Unix(),
@@ -48,6 +71,8 @@ func (l *UserDocsLogic) UserDocs(in *userlib.UserDocsRequest) (*userlib.UserDocs
 			IsDownload:    int64(value.IsDownload),
 			IsCollection:  int64(value.IsCollection),
 			Cost:          value.Cost,
+			ProductType:   value.ProductType,
+			Source:        value.Source,
 		})
 	}
 	if code {

+ 2 - 1
rpc/userlib/internal/server/userlibserver.go

@@ -8,11 +8,12 @@ import (
 
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/logic"
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/svc"
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
 )
 
 type UserLibServer struct {
 	svcCtx *svc.ServiceContext
+	userlib.UnimplementedUserLibServer
 }
 
 func NewUserLibServer(svcCtx *svc.ServiceContext) *UserLibServer {

+ 73 - 394
rpc/userlib/userlib/userlib.pb.go → rpc/userlib/type/userlib/userlib.pb.go

@@ -1,17 +1,12 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.25.0
-// 	protoc        v3.15.3
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
 // source: userlib.proto
 
 package userlib
 
 import (
-	context "context"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
 	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
 	reflect "reflect"
@@ -25,10 +20,6 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-// This is a compile-time assertion that a sufficiently up-to-date version
-// of the legacy proto package is being used.
-const _ = proto.ProtoPackageIsVersion4
-
 //用户文档类别
 type UserDocCategory int32
 
@@ -832,6 +823,8 @@ type UserDocs struct {
 	IsDownload    int64  `protobuf:"varint,12,opt,name=IsDownload,proto3" json:"IsDownload,omitempty"`     //是否转存0未转存1转存
 	IsCollection  int64  `protobuf:"varint,13,opt,name=IsCollection,proto3" json:"IsCollection,omitempty"` //是否收藏0未收藏1收藏
 	Cost          string `protobuf:"bytes,14,opt,name=Cost,proto3" json:"Cost,omitempty"`                  //收藏|转存费用
+	Source        int64  `protobuf:"varint,15,opt,name=source,proto3" json:"source,omitempty"`             // 来源  '文档来源:剑鱼- 1 豆丁- 2',
+	ProductType   int64  `protobuf:"varint,16,opt,name=productType,proto3" json:"productType,omitempty"`   // '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
 }
 
 func (x *UserDocs) Reset() {
@@ -964,6 +957,20 @@ func (x *UserDocs) GetCost() string {
 	return ""
 }
 
+func (x *UserDocs) GetSource() int64 {
+	if x != nil {
+		return x.Source
+	}
+	return 0
+}
+
+func (x *UserDocs) GetProductType() int64 {
+	if x != nil {
+		return x.ProductType
+	}
+	return 0
+}
+
 var File_userlib_proto protoreflect.FileDescriptor
 
 var file_userlib_proto_rawDesc = []byte{
@@ -1026,7 +1033,7 @@ var file_userlib_proto_rawDesc = []byte{
 	0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x55, 0x73, 0x65, 0x72,
 	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x55, 0x73,
 	0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
-	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0xb0, 0x03, 0x0a, 0x08, 0x75, 0x73, 0x65,
+	0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49, 0x64, 0x22, 0xea, 0x03, 0x0a, 0x08, 0x75, 0x73, 0x65,
 	0x72, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
 	0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
 	0x74, 0x12, 0x1a, 0x0a, 0x08, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x18, 0x02, 0x20,
@@ -1053,58 +1060,62 @@ var file_userlib_proto_rawDesc = []byte{
 	0x6f, 0x61, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
 	0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x49, 0x73, 0x43, 0x6f, 0x6c,
 	0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x18,
-	0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x2a, 0x3c, 0x0a, 0x0f, 0x55,
-	0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e,
-	0x0a, 0x0a, 0x53, 0x65, 0x6c, 0x66, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x00, 0x12, 0x0c,
-	0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07,
-	0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x0f, 0x55, 0x73, 0x65,
-	0x72, 0x44, 0x6f, 0x63, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04,
-	0x57, 0x6f, 0x72, 0x64, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x44, 0x46, 0x10, 0x01, 0x12,
-	0x09, 0x0a, 0x05, 0x45, 0x58, 0x43, 0x45, 0x4c, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x50,
-	0x54, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x58, 0x54, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05,
-	0x4f, 0x74, 0x68, 0x65, 0x72, 0x10, 0x05, 0x2a, 0x43, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x44,
-	0x6f, 0x63, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d,
-	0x61, 0x6c, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x44, 0x65, 0x6c,
-	0x65, 0x74, 0x65, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65,
-	0x6e, 0x74, 0x6c, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x32, 0xcd, 0x04, 0x0a,
-	0x07, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x62, 0x12, 0x3f, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72,
-	0x44, 0x6f, 0x63, 0x73, 0x12, 0x18, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55,
-	0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
+	0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73,
+	0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x6f, 0x75,
+	0x72, 0x63, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x54, 0x79,
+	0x70, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63,
+	0x74, 0x54, 0x79, 0x70, 0x65, 0x2a, 0x3c, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63,
+	0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x65, 0x6c, 0x66,
+	0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x6f, 0x77, 0x6e,
+	0x6c, 0x6f, 0x61, 0x64, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
+	0x74, 0x10, 0x02, 0x2a, 0x4c, 0x0a, 0x0f, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x46, 0x69,
+	0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x57, 0x6f, 0x72, 0x64, 0x10, 0x00,
+	0x12, 0x07, 0x0a, 0x03, 0x50, 0x44, 0x46, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x58, 0x43,
+	0x45, 0x4c, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x50, 0x50, 0x54, 0x10, 0x03, 0x12, 0x07, 0x0a,
+	0x03, 0x54, 0x58, 0x54, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x10,
+	0x05, 0x2a, 0x43, 0x0a, 0x0d, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x53, 0x74, 0x61, 0x74,
+	0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0f,
+	0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x69, 0x63, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x10, 0x01, 0x12,
+	0x15, 0x0a, 0x11, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x44, 0x65,
+	0x6c, 0x65, 0x74, 0x65, 0x10, 0x02, 0x32, 0xcd, 0x04, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x4c,
+	0x69, 0x62, 0x12, 0x3f, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x12, 0x18,
 	0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63,
-	0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x44, 0x6f, 0x63,
-	0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69,
-	0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71,
-	0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55,
-	0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
-	0x73, 0x65, 0x12, 0x4b, 0x0a, 0x10, 0x44, 0x6f, 0x63, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x43,
-	0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62,
-	0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65,
-	0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
-	0x46, 0x0a, 0x09, 0x44, 0x6f, 0x63, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x75,
-	0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76,
-	0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x65,
-	0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52,
-	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x44, 0x6f, 0x63, 0x52, 0x65,
-	0x73, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e,
-	0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
-	0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73,
-	0x65, 0x72, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
-	0x65, 0x12, 0x48, 0x0a, 0x0b, 0x44, 0x6f, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64,
-	0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43,
-	0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
-	0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c,
-	0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x44,
-	0x6f, 0x63, 0x50, 0x65, 0x72, 0x6d, 0x61, 0x6e, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74,
-	0x65, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
-	0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
-	0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f,
-	0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a,
-	0x09, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x65, 0x72, 0x67, 0x65, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65,
-	0x72, 0x6c, 0x69, 0x62, 0x2e, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x1c,
+	0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c,
+	0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x6f, 0x63, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+	0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x44, 0x6f, 0x63, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63,
+	0x74, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72,
+	0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
 	0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c,
-	0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72,
-	0x6f, 0x74, 0x6f, 0x33,
+	0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x10,
+	0x44, 0x6f, 0x63, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
+	0x12, 0x1a, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43,
+	0x61, 0x6e, 0x63, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75,
+	0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74,
+	0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x09, 0x44, 0x6f, 0x63,
+	0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62,
+	0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55,
+	0x73, 0x65, 0x72, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+	0x65, 0x12, 0x48, 0x0a, 0x0a, 0x44, 0x6f, 0x63, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x12,
+	0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
+	0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
+	0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x74,
+	0x6f, 0x72, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0b, 0x44,
+	0x6f, 0x63, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x2e, 0x75, 0x73, 0x65,
+	0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74,
+	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69,
+	0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73,
+	0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x12, 0x44, 0x6f, 0x63, 0x50, 0x65, 0x72, 0x6d,
+	0x61, 0x6e, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1c, 0x2e, 0x75, 0x73,
+	0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x76, 0x65,
+	0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72,
+	0x6c, 0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52,
+	0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72, 0x4d,
+	0x65, 0x72, 0x67, 0x65, 0x12, 0x12, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c, 0x69, 0x62, 0x2e, 0x6d,
+	0x65, 0x72, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x1c, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x6c,
+	0x69, 0x62, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x52, 0x65,
+	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x2f, 0x75, 0x73, 0x65, 0x72,
+	0x6c, 0x69, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -1321,335 +1332,3 @@ func file_userlib_proto_init() {
 	file_userlib_proto_goTypes = nil
 	file_userlib_proto_depIdxs = nil
 }
-
-// Reference imports to suppress errors if they are not otherwise used.
-var _ context.Context
-var _ grpc.ClientConnInterface
-
-// 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.SupportPackageIsVersion6
-
-// UserLibClient is the client API for UserLib service.
-//
-// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
-type UserLibClient interface {
-	UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error)
-	DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
-	DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
-	DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
-	DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error)
-	DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
-	DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
-	UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error)
-}
-
-type userLibClient struct {
-	cc grpc.ClientConnInterface
-}
-
-func NewUserLibClient(cc grpc.ClientConnInterface) UserLibClient {
-	return &userLibClient{cc}
-}
-
-func (c *userLibClient) UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error) {
-	out := new(UserDocsResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/UserDocs", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userLibClient) DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
-	out := new(UserCollectResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocCollect", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userLibClient) DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
-	out := new(UserDeleteResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocCancelCollect", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userLibClient) DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
-	out := new(UserDeleteResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocDelete", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userLibClient) DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error) {
-	out := new(UserRestoreResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocRestore", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userLibClient) DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
-	out := new(UserCollectResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocDownload", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userLibClient) DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
-	out := new(UserCollectResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocPermanentDelete", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userLibClient) UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error) {
-	out := new(UserCollectResponse)
-	err := c.cc.Invoke(ctx, "/userlib.UserLib/UserMerge", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-// UserLibServer is the server API for UserLib service.
-type UserLibServer interface {
-	UserDocs(context.Context, *UserDocsRequest) (*UserDocsResponse, error)
-	DocCollect(context.Context, *UserCollectRequest) (*UserCollectResponse, error)
-	DocCancelCollect(context.Context, *UserCancelRequest) (*UserDeleteResponse, error)
-	DocDelete(context.Context, *UserRecoveryRequest) (*UserDeleteResponse, error)
-	DocRestore(context.Context, *UserRecoveryRequest) (*UserRestoreResponse, error)
-	DocDownload(context.Context, *UserCollectRequest) (*UserCollectResponse, error)
-	DocPermanentDelete(context.Context, *UserRecoveryRequest) (*UserCollectResponse, error)
-	UserMerge(context.Context, *MergeInfo) (*UserCollectResponse, error)
-}
-
-// UnimplementedUserLibServer can be embedded to have forward compatible implementations.
-type UnimplementedUserLibServer struct {
-}
-
-func (*UnimplementedUserLibServer) UserDocs(context.Context, *UserDocsRequest) (*UserDocsResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method UserDocs not implemented")
-}
-func (*UnimplementedUserLibServer) DocCollect(context.Context, *UserCollectRequest) (*UserCollectResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocCollect not implemented")
-}
-func (*UnimplementedUserLibServer) DocCancelCollect(context.Context, *UserCancelRequest) (*UserDeleteResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocCancelCollect not implemented")
-}
-func (*UnimplementedUserLibServer) DocDelete(context.Context, *UserRecoveryRequest) (*UserDeleteResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocDelete not implemented")
-}
-func (*UnimplementedUserLibServer) DocRestore(context.Context, *UserRecoveryRequest) (*UserRestoreResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocRestore not implemented")
-}
-func (*UnimplementedUserLibServer) DocDownload(context.Context, *UserCollectRequest) (*UserCollectResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocDownload not implemented")
-}
-func (*UnimplementedUserLibServer) DocPermanentDelete(context.Context, *UserRecoveryRequest) (*UserCollectResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method DocPermanentDelete not implemented")
-}
-func (*UnimplementedUserLibServer) UserMerge(context.Context, *MergeInfo) (*UserCollectResponse, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method UserMerge not implemented")
-}
-
-func RegisterUserLibServer(s *grpc.Server, srv UserLibServer) {
-	s.RegisterService(&_UserLib_serviceDesc, srv)
-}
-
-func _UserLib_UserDocs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(UserDocsRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).UserDocs(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/UserDocs",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).UserDocs(ctx, req.(*UserDocsRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _UserLib_DocCollect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(UserCollectRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).DocCollect(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/DocCollect",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).DocCollect(ctx, req.(*UserCollectRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _UserLib_DocCancelCollect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(UserCancelRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).DocCancelCollect(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/DocCancelCollect",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).DocCancelCollect(ctx, req.(*UserCancelRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _UserLib_DocDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(UserRecoveryRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).DocDelete(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/DocDelete",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).DocDelete(ctx, req.(*UserRecoveryRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _UserLib_DocRestore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(UserRecoveryRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).DocRestore(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/DocRestore",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).DocRestore(ctx, req.(*UserRecoveryRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _UserLib_DocDownload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(UserCollectRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).DocDownload(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/DocDownload",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).DocDownload(ctx, req.(*UserCollectRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _UserLib_DocPermanentDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(UserRecoveryRequest)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).DocPermanentDelete(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/DocPermanentDelete",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).DocPermanentDelete(ctx, req.(*UserRecoveryRequest))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _UserLib_UserMerge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(MergeInfo)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(UserLibServer).UserMerge(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/userlib.UserLib/UserMerge",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserLibServer).UserMerge(ctx, req.(*MergeInfo))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-var _UserLib_serviceDesc = grpc.ServiceDesc{
-	ServiceName: "userlib.UserLib",
-	HandlerType: (*UserLibServer)(nil),
-	Methods: []grpc.MethodDesc{
-		{
-			MethodName: "UserDocs",
-			Handler:    _UserLib_UserDocs_Handler,
-		},
-		{
-			MethodName: "DocCollect",
-			Handler:    _UserLib_DocCollect_Handler,
-		},
-		{
-			MethodName: "DocCancelCollect",
-			Handler:    _UserLib_DocCancelCollect_Handler,
-		},
-		{
-			MethodName: "DocDelete",
-			Handler:    _UserLib_DocDelete_Handler,
-		},
-		{
-			MethodName: "DocRestore",
-			Handler:    _UserLib_DocRestore_Handler,
-		},
-		{
-			MethodName: "DocDownload",
-			Handler:    _UserLib_DocDownload_Handler,
-		},
-		{
-			MethodName: "DocPermanentDelete",
-			Handler:    _UserLib_DocPermanentDelete_Handler,
-		},
-		{
-			MethodName: "UserMerge",
-			Handler:    _UserLib_UserMerge_Handler,
-		},
-	},
-	Streams:  []grpc.StreamDesc{},
-	Metadata: "userlib.proto",
-}

+ 357 - 0
rpc/userlib/type/userlib/userlib_grpc.pb.go

@@ -0,0 +1,357 @@
+// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
+// versions:
+// - protoc-gen-go-grpc v1.2.0
+// - protoc             v3.19.4
+// source: userlib.proto
+
+package userlib
+
+import (
+	context "context"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+)
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the grpc package it is being compiled against.
+// Requires gRPC-Go v1.32.0 or later.
+const _ = grpc.SupportPackageIsVersion7
+
+// UserLibClient is the client API for UserLib service.
+//
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
+type UserLibClient interface {
+	UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error)
+	DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+	DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+	DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error)
+	DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error)
+}
+
+type userLibClient struct {
+	cc grpc.ClientConnInterface
+}
+
+func NewUserLibClient(cc grpc.ClientConnInterface) UserLibClient {
+	return &userLibClient{cc}
+}
+
+func (c *userLibClient) UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error) {
+	out := new(UserDocsResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/UserDocs", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocCollect", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	out := new(UserDeleteResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocCancelCollect", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	out := new(UserDeleteResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocDelete", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error) {
+	out := new(UserRestoreResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocRestore", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocDownload", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/DocPermanentDelete", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userLibClient) UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	out := new(UserCollectResponse)
+	err := c.cc.Invoke(ctx, "/userlib.UserLib/UserMerge", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// UserLibServer is the server API for UserLib service.
+// All implementations must embed UnimplementedUserLibServer
+// for forward compatibility
+type UserLibServer interface {
+	UserDocs(context.Context, *UserDocsRequest) (*UserDocsResponse, error)
+	DocCollect(context.Context, *UserCollectRequest) (*UserCollectResponse, error)
+	DocCancelCollect(context.Context, *UserCancelRequest) (*UserDeleteResponse, error)
+	DocDelete(context.Context, *UserRecoveryRequest) (*UserDeleteResponse, error)
+	DocRestore(context.Context, *UserRecoveryRequest) (*UserRestoreResponse, error)
+	DocDownload(context.Context, *UserCollectRequest) (*UserCollectResponse, error)
+	DocPermanentDelete(context.Context, *UserRecoveryRequest) (*UserCollectResponse, error)
+	UserMerge(context.Context, *MergeInfo) (*UserCollectResponse, error)
+	mustEmbedUnimplementedUserLibServer()
+}
+
+// UnimplementedUserLibServer must be embedded to have forward compatible implementations.
+type UnimplementedUserLibServer struct {
+}
+
+func (UnimplementedUserLibServer) UserDocs(context.Context, *UserDocsRequest) (*UserDocsResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserDocs not implemented")
+}
+func (UnimplementedUserLibServer) DocCollect(context.Context, *UserCollectRequest) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocCollect not implemented")
+}
+func (UnimplementedUserLibServer) DocCancelCollect(context.Context, *UserCancelRequest) (*UserDeleteResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocCancelCollect not implemented")
+}
+func (UnimplementedUserLibServer) DocDelete(context.Context, *UserRecoveryRequest) (*UserDeleteResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocDelete not implemented")
+}
+func (UnimplementedUserLibServer) DocRestore(context.Context, *UserRecoveryRequest) (*UserRestoreResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocRestore not implemented")
+}
+func (UnimplementedUserLibServer) DocDownload(context.Context, *UserCollectRequest) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocDownload not implemented")
+}
+func (UnimplementedUserLibServer) DocPermanentDelete(context.Context, *UserRecoveryRequest) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method DocPermanentDelete not implemented")
+}
+func (UnimplementedUserLibServer) UserMerge(context.Context, *MergeInfo) (*UserCollectResponse, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserMerge not implemented")
+}
+func (UnimplementedUserLibServer) mustEmbedUnimplementedUserLibServer() {}
+
+// UnsafeUserLibServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to UserLibServer will
+// result in compilation errors.
+type UnsafeUserLibServer interface {
+	mustEmbedUnimplementedUserLibServer()
+}
+
+func RegisterUserLibServer(s grpc.ServiceRegistrar, srv UserLibServer) {
+	s.RegisterService(&UserLib_ServiceDesc, srv)
+}
+
+func _UserLib_UserDocs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserDocsRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).UserDocs(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/UserDocs",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).UserDocs(ctx, req.(*UserDocsRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocCollect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserCollectRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocCollect(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocCollect",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocCollect(ctx, req.(*UserCollectRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocCancelCollect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserCancelRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocCancelCollect(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocCancelCollect",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocCancelCollect(ctx, req.(*UserCancelRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserRecoveryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocDelete(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocDelete",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocDelete(ctx, req.(*UserRecoveryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocRestore_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserRecoveryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocRestore(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocRestore",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocRestore(ctx, req.(*UserRecoveryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocDownload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserCollectRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocDownload(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocDownload",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocDownload(ctx, req.(*UserCollectRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_DocPermanentDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserRecoveryRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).DocPermanentDelete(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/DocPermanentDelete",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).DocPermanentDelete(ctx, req.(*UserRecoveryRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _UserLib_UserMerge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(MergeInfo)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserLibServer).UserMerge(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/userlib.UserLib/UserMerge",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserLibServer).UserMerge(ctx, req.(*MergeInfo))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// UserLib_ServiceDesc is the grpc.ServiceDesc for UserLib service.
+// It's only intended for direct use with grpc.RegisterService,
+// and not to be introspected or modified (even as a copy)
+var UserLib_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "userlib.UserLib",
+	HandlerType: (*UserLibServer)(nil),
+	Methods: []grpc.MethodDesc{
+		{
+			MethodName: "UserDocs",
+			Handler:    _UserLib_UserDocs_Handler,
+		},
+		{
+			MethodName: "DocCollect",
+			Handler:    _UserLib_DocCollect_Handler,
+		},
+		{
+			MethodName: "DocCancelCollect",
+			Handler:    _UserLib_DocCancelCollect_Handler,
+		},
+		{
+			MethodName: "DocDelete",
+			Handler:    _UserLib_DocDelete_Handler,
+		},
+		{
+			MethodName: "DocRestore",
+			Handler:    _UserLib_DocRestore_Handler,
+		},
+		{
+			MethodName: "DocDownload",
+			Handler:    _UserLib_DocDownload_Handler,
+		},
+		{
+			MethodName: "DocPermanentDelete",
+			Handler:    _UserLib_DocPermanentDelete_Handler,
+		},
+		{
+			MethodName: "UserMerge",
+			Handler:    _UserLib_UserMerge_Handler,
+		},
+	},
+	Streams:  []grpc.StreamDesc{},
+	Metadata: "userlib.proto",
+}

+ 5 - 3
rpc/userlib/userlib.go

@@ -1,6 +1,7 @@
 package main
 
 import (
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
 	"app.yhyue.com/moapp/jy_docs/services/model"
 	userLibService "app.yhyue.com/moapp/jy_docs/services/userlib"
 	jyDocsRpcUtil "app.yhyue.com/moapp/jy_docs/services/util"
@@ -15,13 +16,14 @@ import (
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/config"
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/server"
 	"app.yhyue.com/moapp/jy_docs/rpc/userlib/internal/svc"
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
 
 	"github.com/zeromicro/go-zero/core/conf"
 	"github.com/zeromicro/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
+
 var configFile = flag.String("f", "etc/userlib.yaml", "the config file")
+
 func main() {
 	flag.Parse()
 	conf.MustLoad(*configFile, &config.Configs)
@@ -74,7 +76,7 @@ func rateLimitInterceptor(ctx context.Context, req interface{}, info *grpc.Unary
 	if flag {
 		log.Println("接口调用日志记录成功")
 	}
-	return resp,err
+	return resp, err
 }
 
 // Strval 获取变量的字符串值
@@ -133,4 +135,4 @@ func Strval(value interface{}) string {
 	}
 
 	return key
-}
+}

+ 3 - 0
rpc/userlib/userlib.proto

@@ -1,5 +1,6 @@
 syntax = "proto3";
 package userlib;
+option go_package = "./userlib";
 
 //用户文档类别
 enum UserDocCategory {
@@ -95,6 +96,8 @@ message userDocs {
     int64 	IsDownload=12;//是否转存0未转存1转存
     int64	IsCollection=13;//是否收藏0未收藏1收藏
     string	Cost=14;//收藏|转存费用
+    int64 source = 15;// 来源  '文档来源:剑鱼- 1 豆丁- 2',
+    int64 productType = 16;// '商品类型:会员免费-1 精品(付费)-2 免费 - 3',
 }
 service  UserLib {
     rpc UserDocs(UserDocsRequest) returns (UserDocsResponse);//用户文档列表

+ 88 - 0
rpc/userlib/userlib/userlib.go

@@ -0,0 +1,88 @@
+// Code generated by goctl. DO NOT EDIT!
+// Source: userlib.proto
+
+package userlib
+
+import (
+	"context"
+
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
+
+	"github.com/zeromicro/go-zero/zrpc"
+	"google.golang.org/grpc"
+)
+
+type (
+	MergeInfo           = userlib.MergeInfo
+	UserCancelRequest   = userlib.UserCancelRequest
+	UserCollectRequest  = userlib.UserCollectRequest
+	UserCollectResponse = userlib.UserCollectResponse
+	UserDeleteResponse  = userlib.UserDeleteResponse
+	UserDocs            = userlib.UserDocs
+	UserDocsRequest     = userlib.UserDocsRequest
+	UserDocsResponse    = userlib.UserDocsResponse
+	UserRecoveryRequest = userlib.UserRecoveryRequest
+	UserRestoreRequest  = userlib.UserRestoreRequest
+	UserRestoreResponse = userlib.UserRestoreResponse
+
+	UserLib interface {
+		UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error)
+		DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+		DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+		DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error)
+		DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error)
+		DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+		DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error)
+		UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error)
+	}
+
+	defaultUserLib struct {
+		cli zrpc.Client
+	}
+)
+
+func NewUserLib(cli zrpc.Client) UserLib {
+	return &defaultUserLib{
+		cli: cli,
+	}
+}
+
+func (m *defaultUserLib) UserDocs(ctx context.Context, in *UserDocsRequest, opts ...grpc.CallOption) (*UserDocsResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.UserDocs(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocCollect(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocCollect(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocCancelCollect(ctx context.Context, in *UserCancelRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocCancelCollect(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserDeleteResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocDelete(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocRestore(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserRestoreResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocRestore(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocDownload(ctx context.Context, in *UserCollectRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocDownload(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.DocPermanentDelete(ctx, in, opts...)
+}
+
+func (m *defaultUserLib) UserMerge(ctx context.Context, in *MergeInfo, opts ...grpc.CallOption) (*UserCollectResponse, error) {
+	client := userlib.NewUserLibClient(m.cli.Conn())
+	return client.UserMerge(ctx, in, opts...)
+}

+ 0 - 88
rpc/userlib/userlibclient/userlib.go

@@ -1,88 +0,0 @@
-// Code generated by goctl. DO NOT EDIT!
-// Source: userlib.proto
-
-//go:generate mockgen -destination ./userlib_mock.go -package userlibclient -source $GOFILE
-
-package userlibclient
-
-import (
-	"context"
-
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
-
-	"github.com/zeromicro/go-zero/zrpc"
-)
-
-type (
-	UserCollectRequest  = userlib.UserCollectRequest
-	UserCollectResponse = userlib.UserCollectResponse
-	UserDocs            = userlib.UserDocs
-	UserCancelRequest   = userlib.UserCancelRequest
-	UserDeleteResponse  = userlib.UserDeleteResponse
-	UserRestoreResponse = userlib.UserRestoreResponse
-	UserDocsResponse    = userlib.UserDocsResponse
-	MergeInfo           = userlib.MergeInfo
-	UserDocsRequest     = userlib.UserDocsRequest
-	UserRecoveryRequest = userlib.UserRecoveryRequest
-
-	UserLib interface {
-		UserDocs(ctx context.Context, in *UserDocsRequest) (*UserDocsResponse, error)
-		DocCollect(ctx context.Context, in *UserCollectRequest) (*UserCollectResponse, error)
-		DocCancelCollect(ctx context.Context, in *UserCancelRequest) (*UserDeleteResponse, error)
-		DocDelete(ctx context.Context, in *UserRecoveryRequest) (*UserDeleteResponse, error)
-		DocRestore(ctx context.Context, in *UserRecoveryRequest) (*UserRestoreResponse, error)
-		DocDownload(ctx context.Context, in *UserCollectRequest) (*UserCollectResponse, error)
-		DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest) (*UserCollectResponse, error)
-		UserMerge(ctx context.Context, in *MergeInfo) (*UserCollectResponse, error)
-	}
-
-	defaultUserLib struct {
-		cli zrpc.Client
-	}
-)
-
-func NewUserLib(cli zrpc.Client) UserLib {
-	return &defaultUserLib{
-		cli: cli,
-	}
-}
-
-func (m *defaultUserLib) UserDocs(ctx context.Context, in *UserDocsRequest) (*UserDocsResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.UserDocs(ctx, in)
-}
-
-func (m *defaultUserLib) DocCollect(ctx context.Context, in *UserCollectRequest) (*UserCollectResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.DocCollect(ctx, in)
-}
-
-func (m *defaultUserLib) DocCancelCollect(ctx context.Context, in *UserCancelRequest) (*UserDeleteResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.DocCancelCollect(ctx, in)
-}
-
-func (m *defaultUserLib) DocDelete(ctx context.Context, in *UserRecoveryRequest) (*UserDeleteResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.DocDelete(ctx, in)
-}
-
-func (m *defaultUserLib) DocRestore(ctx context.Context, in *UserRecoveryRequest) (*UserRestoreResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.DocRestore(ctx, in)
-}
-
-func (m *defaultUserLib) DocDownload(ctx context.Context, in *UserCollectRequest) (*UserCollectResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.DocDownload(ctx, in)
-}
-
-func (m *defaultUserLib) DocPermanentDelete(ctx context.Context, in *UserRecoveryRequest) (*UserCollectResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.DocPermanentDelete(ctx, in)
-}
-
-func (m *defaultUserLib) UserMerge(ctx context.Context, in *MergeInfo) (*UserCollectResponse, error) {
-	client := userlib.NewUserLibClient(m.cli.Conn())
-	return client.UserMerge(ctx, in)
-}

+ 3 - 0
services/model/stdlib.go

@@ -62,6 +62,9 @@ type UserDoc struct {
 	PreviewImgId    string    `json:"preview_img_id" gorm:"column:previewImgId"`
 	PreviewImgUrl   string    `json:"preview_img_url" gorm:"column:previewImgUrl"`
 	Cost            string    `json:"cost" gorm:"column:cost"`
+	Source          int64     `json:"source" gorm:"column:source"`
+	ProductType     int64     `json:"product_type" gorm:"column:productType" `
+	DocTags         string    `json:"docTags" gorm:"column:docTags"`
 }
 
 func (ud *UserDoc) TableName() string {

+ 2 - 0
services/stdlib/docGet.go

@@ -54,6 +54,8 @@ func DocGetCheck(docId, userId, appId string) stdlib.DocGetCheckResp {
 				PreviewImgId: doc.PreviewImgId,
 				OssPdfId:     ossPdfId,
 				OssDocId:     ossDocId,
+				Source:       doc.Source,
+				ProductType:  doc.ProductType,
 			},
 		}
 		return docCheck

+ 23 - 0
services/stdlib/docIndexTag.go

@@ -0,0 +1,23 @@
+package stdlib
+
+import (
+	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/type/stdlib"
+	jyDocsRpcUtil "app.yhyue.com/moapp/jy_docs/services/util"
+	"app.yhyue.com/moapp/jybase/common"
+)
+
+// 获取用户
+func DocIndexTag() *stdlib.DocIndexTagRes {
+	tagRes := []map[string]interface{}{}
+	tagNameList := []string{}
+	jyDocsRpcUtil.GetJyDocsDB().Raw("SELECT dc.name as name FROM doc_class_statistics dcs left join doc_class dc on (dcs.code = dc.code)  where dcs.state=0 and dc.`level`=1 AND dc.state = 0 order by total").Scan(&tagRes)
+	if tagRes != nil && len(tagRes) > 0 {
+		for i := 0; i < len(tagRes); i++ {
+			tagNameList = append(tagNameList, common.ObjToString(tagRes[i]["name"]))
+		}
+	}
+	return &stdlib.DocIndexTagRes{
+		Code: 1,
+		Tags: tagNameList,
+	}
+}

+ 12 - 2
services/stdlib/docService.go

@@ -17,12 +17,13 @@ const (
 	Es_Query_All       = `{"query":{"match_all":{}}%s}`
 	Es_Query_Boosting  = `{"query":{"boosting":{"positive":{"bool":{"must":[%s]}},"negative":{"bool":{"must":[%s]}},"negative_boost":2}}%s}`
 	Es_Query_Bool      = `{"query":{"bool":{"filter":[%s]}}%s}`
-	Es_Query_Append    = `,"_source":["id","docName","price","downTimes","viewTimes","docSummary","uploadDate","docFileSize","docPageSize","docFileType","previewImgId"],"from":%d,"size":%d`
+	Es_Query_Append    = `,"_source":["id","docName","price","downTimes","viewTimes","docSummary","uploadDate","docFileSize","docPageSize","docFileType","previewImgId","source","productType"],"from":%d,"size":%d`
 	Es_Query_Highlight = `,"highlight":{"fields":{"docName":{},"docSummary":{"fragment_size":300,"number_of_fragments":1}}}`
 	Es_Query_Sort      = `,"sort":{%s}`
 	Multi_Match        = `{"multi_match":{"query":"%s","fields":["docName","docSummary^2"]}}`
 	Multi_Match_Phrase = `{"multi_match":{"query":"%s","fields":["docName.docName_c","docSummary.docSummary_c"],"type":"phrase"}}`
 	Terms              = `{"terms":{"%s":[%s]}}`
+	Term               = `{"term":{"%s":%s}}`
 )
 
 var (
@@ -63,6 +64,14 @@ func DocQuery(in *stdlib.DocQueryRequest) *stdlib.DocQueryResponse {
 	if len(in.DocTag) > 0 {
 		musts = append(musts, fmt.Sprintf(Terms, "docTags", `"`+strings.Join(in.DocTag, `","`)+`"`))
 	}
+	// 文件类型
+	if in.DocFileType > 0 {
+		musts = append(musts, fmt.Sprintf(Term, "docFileType", `"`+fmt.Sprintf("%d", in.DocFileType)+`"`))
+	}
+	// 商品类型
+	if in.ProductType > 0 {
+		musts = append(musts, fmt.Sprintf(Term, "productType", `"`+fmt.Sprintf("%d", in.ProductType)+`"`))
+	}
 	query := ""
 	query_sort := ""
 	if len(sorts) > 0 {
@@ -100,7 +109,6 @@ func DocQuery(in *stdlib.DocQueryRequest) *stdlib.DocQueryResponse {
 			doc := &stdlib.Doc{
 				DocId:        common.ObjToString(v["id"]),
 				DocName:      common.ObjToString(v["docName"]),
-				Price:        common.Int64All(v["price"]),
 				DocPageSize:  common.Int64All(v["docPageSize"]),
 				DocFileSize:  common.Int64All(v["docFileSize"]),
 				DownTimes:    common.Int64All(v["downTimes"]),
@@ -109,6 +117,8 @@ func DocQuery(in *stdlib.DocQueryRequest) *stdlib.DocQueryResponse {
 				DocSummary:   common.ObjToString(v["docSummary"]),
 				DocFileType:  model.DocFileType[common.IntAll(v["docFileType"])],
 				PreviewImgId: common.ObjToString(v["previewImgId"]),
+				ProductType:  common.Int64All(v["productType"]),
+				Source:       common.Int64All(v["source"]),
 			}
 			highlight, _ := v["highlight"].(map[string][]string)
 			if len(highlight["docName"]) > 0 {

+ 10 - 11
services/userlib/userDocService.go

@@ -1,18 +1,18 @@
 package userlib
 
 import (
+	"app.yhyue.com/moapp/jy_docs/rpc/userlib/type/userlib"
 	"errors"
 	"fmt"
 	"log"
 	"time"
 
-	"app.yhyue.com/moapp/jy_docs/rpc/userlib/userlib"
 	"app.yhyue.com/moapp/jy_docs/services/model"
 	docRpcUtil "app.yhyue.com/moapp/jy_docs/services/util"
 	"gorm.io/gorm"
 )
 
-//文档收藏
+// 文档收藏
 func UserDocCollect(userDoc *model.UserDoc) bool {
 	log.Println("UserDocCollect exec ......")
 	orm := docRpcUtil.GetJyDocsDB()
@@ -86,7 +86,7 @@ func UserDocCollect(userDoc *model.UserDoc) bool {
 	return true
 }
 
-//文档取消收藏
+// 文档取消收藏
 func UserDocCancelCollect(docId, userId, appId string) bool {
 	orm := docRpcUtil.GetJyDocsDB()
 	err := orm.Transaction(func(tx *gorm.DB) error {
@@ -120,7 +120,7 @@ func UserDocCancelCollect(docId, userId, appId string) bool {
 	return true
 }
 
-//兑换操作
+// 兑换操作
 func UserDocDownload(userDoc *model.UserDoc, cost int) (bool, string) {
 	log.Println("UserDocCollect exec ......")
 	msg := "兑换成功"
@@ -249,7 +249,7 @@ func UserDocDownload(userDoc *model.UserDoc, cost int) (bool, string) {
 	return true, msg
 }
 
-//文档删除
+// 文档删除
 func UserDocDelete(userDocId int32, appId, userId string) (bool, string) {
 	msg := "文档删除成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
@@ -278,7 +278,7 @@ func UserDocDelete(userDocId int32, appId, userId string) (bool, string) {
 
 }
 
-//文档回收
+// 文档回收
 func UserDocRestore(userDocId int32, appId, userId string) (bool, string) {
 	msg := "文档找回成功"
 	err := docRpcUtil.GetJyDocsDB().Transaction(func(tx *gorm.DB) error {
@@ -334,7 +334,7 @@ func UserDocPermanentDelete(userDocId int32, appId, userId string) (bool, string
 
 }
 
-//我的文库列表(包括回收站列表)0兑换的 1收藏的 2回收站的
+// 我的文库列表(包括回收站列表)0兑换的 1收藏的 2回收站的
 func UserDocsList(in *userlib.UserDocsRequest) ([]*model.UserDoc, int64, bool, string) {
 	msg := "查询成功"
 	data := []*model.UserDoc{}
@@ -354,9 +354,8 @@ func UserDocsList(in *userlib.UserDocsRequest) ([]*model.UserDoc, int64, bool, s
 			}
 		case int64(1):
 			//收藏的
-			err := docRpcUtil.GetJyDocsDB().Table("user_doc").Where(" userId=? and isCollection=1 and appId=? ", in.UserId, in.AppId).Find(&data)
-			count = int64(len(data))
-			err = docRpcUtil.GetJyDocsDB().Table("user_doc").Where("userId=? and isCollection=1 and appId=? order by create_at desc  limit ?,?", in.UserId, in.AppId, startIndex, in.PageSize).Find(&data)
+			err := docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT count(*) FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id)  where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0 ", in.UserId, in.AppId).Count(&count)
+			err = docRpcUtil.GetJyDocsDB().Table("user_doc").Raw("SELECT ud.create_at,ud.update_at,ud.docCategory,ud.isDownload,ud.isCollection,d.price as cost,d.docTags,d.docFileType,d.docName,d.docFileSuffix,d.docFileSize,d.docPageSize,d.docSummary,d.source,d.productType FROM jydocs.user_doc ud inner join doc d on (ud.docId=d.id)  where ud.userId=? and ud.isCollection=1 and ud.appId=? and d.isDelete=0   order by create_at desc  limit ?,?", in.UserId, in.AppId, startIndex, in.PageSize).Find(&data)
 			if err.Error != nil {
 				log.Println("查询收藏记录失败:", err)
 				msg = "查询收藏记录失败"
@@ -399,7 +398,7 @@ func InterfaceLog(in *model.InterfaceLog) bool {
 	return true
 }
 
-//账号合并
+// 账号合并
 func UserMerge(mergeUser, mergedUser, appId string) (bool, string) {
 	log.Println("UserMerge exec ......")
 	orm := docRpcUtil.GetJyDocsDB()