Эх сурвалжийг харах

feat:p525 stdlib 获取标签分类接口

fuwencai 1 жил өмнө
parent
commit
87fb4a434b

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

+ 10 - 0
rpc/stdlib/stdlib.proto

@@ -1,6 +1,7 @@
 syntax = "proto3";
 
 package stdlib;
+option go_package = "./stdlib";
 
 message DocQueryRequest {
   int64 pageNum = 1; //页码 
@@ -120,6 +121,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 +137,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...)
+}

+ 180 - 345
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,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 DocQueryRequest struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -1168,6 +1159,107 @@ 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{
@@ -1321,35 +1413,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 +1467,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 +1482,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 +1496,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 +1674,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 +1705,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 +1718,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",
+}

+ 22 - 0
services/stdlib/docIndexTag.go

@@ -0,0 +1,22 @@
+package stdlib
+
+import (
+	"app.yhyue.com/moapp/jy_docs/rpc/stdlib/type/stdlib"
+	jyDocsRpcUtil "app.yhyue.com/moapp/jy_docs/services/util"
+)
+
+// 获取用户
+func DocIndexTag() *stdlib.DocIndexTagRes {
+	tagRes := []map[string]string{}
+	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, tagRes[i]["name"])
+		}
+	}
+	return &stdlib.DocIndexTagRes{
+		Code: 1,
+		Tags: tagNameList,
+	}
+}