瀏覽代碼

Merge branch 'feature/v1.0.1_ws' of moapp/jy_docs into feature/v1.0.1

fuwencai 1 年之前
父節點
當前提交
d959e61d5d

+ 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...)
+}

+ 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",
+}

+ 2 - 1
services/model/stdlib.go

@@ -28,7 +28,8 @@ type Doc struct {
 	DownOrUp      int       `json:"downOrUp" gorm:"column:downOrUp"`
 	DocSummary    string    `json:"docSummary" gorm:"column:docSummary"`
 	PreviewImgId  string    `json:"preview_img_id" gorm:"column:previewImgId"`
-	PreviewImgUrl string    `json:"preview_img_url" gorm:"column:previewImgUrl"`
+	Source        int64     `json:"source" gorm:"column:source"`             // '文档来源:默认:0:全部;1:剑鱼;2:豆丁;',
+	ProductType   int64     `json:"product_type" gorm:"column:product_type"` //'商品类型:默认:0:全部;1:会员免费;2:精品(付费)'
 }
 
 func (ud *Doc) 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,
+	}
+}

+ 11 - 1
services/stdlib/docService.go

@@ -23,6 +23,7 @@ const (
 	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 {