支持更新站点地图

dev
truthhun 1 year ago
parent a4c601cc08
commit bd345c112b

3
.gitignore vendored

@ -9,4 +9,5 @@ cache
uploads
documents
watch.bat
indexes
indexes
sitemap

@ -848,87 +848,89 @@ func init() {
func init() { proto.RegisterFile("api/v1/config.proto", fileDescriptor_321614cd6c9c1b8a) }
var fileDescriptor_321614cd6c9c1b8a = []byte{
// 1275 bytes of a gzipped FileDescriptorProto
// 1300 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0xef, 0xda, 0xb1, 0x63, 0x8f, 0x13, 0x27, 0x9d, 0xfc, 0xc1, 0x71, 0x4b, 0x1a, 0x16, 0x01,
0x69, 0x85, 0x6c, 0x62, 0xfe, 0x1c, 0xe0, 0x50, 0xa5, 0x81, 0x02, 0x52, 0x0f, 0x65, 0xd2, 0x0a,
0xc1, 0x65, 0x35, 0xde, 0x1d, 0xaf, 0x47, 0x5d, 0xcf, 0x2c, 0x33, 0xb3, 0x69, 0xdd, 0x23, 0x27,
0x8e, 0x95, 0x90, 0x38, 0xf0, 0x15, 0xf8, 0x0e, 0x9c, 0x39, 0x56, 0xea, 0x85, 0x1b, 0xa8, 0x85,
0xef, 0x81, 0xe6, 0xcd, 0xec, 0x26, 0x76, 0x54, 0x89, 0xdb, 0xbc, 0xdf, 0xfb, 0xbd, 0x37, 0xf3,
0xde, 0xfb, 0xed, 0xcc, 0xa2, 0x2d, 0x9a, 0xf3, 0xe1, 0xd9, 0xd1, 0x30, 0x96, 0x62, 0xc2, 0xd3,
0x41, 0xae, 0xa4, 0x91, 0xb8, 0x49, 0x73, 0x3e, 0x38, 0x3b, 0xea, 0xdf, 0x48, 0xa5, 0x4c, 0x33,
0x36, 0x04, 0x74, 0x5c, 0x4c, 0x86, 0x86, 0xcf, 0x98, 0x36, 0x74, 0x96, 0x3b, 0x62, 0x7f, 0x3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0x2c, 0x12, 0xa1, 0x8b, 0xfd, 0xf8,
0xec, 0x68, 0xd2, 0x84, 0xfc, 0xef, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x7c, 0x6e, 0x03,
0xe5, 0x0a, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -951,6 +953,8 @@ type ConfigAPIClient interface {
ListConfig(ctx context.Context, in *ListConfigRequest, opts ...grpc.CallOption) (*Configs, error)
// 获取系统配置
GetStats(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Stats, error)
// 更新站点地图
UpdateSitemap(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type configAPIClient struct {
@ -997,6 +1001,15 @@ func (c *configAPIClient) GetStats(ctx context.Context, in *emptypb.Empty, opts
return out, nil
}
func (c *configAPIClient) UpdateSitemap(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.v1.ConfigAPI/UpdateSitemap", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ConfigAPIServer is the server API for ConfigAPI service.
type ConfigAPIServer interface {
// 获取系统配置(针对所有用户,只读)
@ -1007,6 +1020,8 @@ type ConfigAPIServer interface {
ListConfig(context.Context, *ListConfigRequest) (*Configs, error)
// 获取系统配置
GetStats(context.Context, *emptypb.Empty) (*Stats, error)
// 更新站点地图
UpdateSitemap(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
}
// UnimplementedConfigAPIServer can be embedded to have forward compatible implementations.
@ -1025,6 +1040,9 @@ func (*UnimplementedConfigAPIServer) ListConfig(ctx context.Context, req *ListCo
func (*UnimplementedConfigAPIServer) GetStats(ctx context.Context, req *emptypb.Empty) (*Stats, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
}
func (*UnimplementedConfigAPIServer) UpdateSitemap(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSitemap not implemented")
}
func RegisterConfigAPIServer(s *grpc.Server, srv ConfigAPIServer) {
s.RegisterService(&_ConfigAPI_serviceDesc, srv)
@ -1102,6 +1120,24 @@ func _ConfigAPI_GetStats_Handler(srv interface{}, ctx context.Context, dec func(
return interceptor(ctx, in, info, handler)
}
func _ConfigAPI_UpdateSitemap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ConfigAPIServer).UpdateSitemap(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.v1.ConfigAPI/UpdateSitemap",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ConfigAPIServer).UpdateSitemap(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _ConfigAPI_serviceDesc = grpc.ServiceDesc{
ServiceName: "api.v1.ConfigAPI",
HandlerType: (*ConfigAPIServer)(nil),
@ -1122,6 +1158,10 @@ var _ConfigAPI_serviceDesc = grpc.ServiceDesc{
MethodName: "GetStats",
Handler: _ConfigAPI_GetStats_Handler,
},
{
MethodName: "UpdateSitemap",
Handler: _ConfigAPI_UpdateSitemap_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/v1/config.proto",

@ -140,6 +140,24 @@ func local_request_ConfigAPI_GetStats_0(ctx context.Context, marshaler runtime.M
}
func request_ConfigAPI_UpdateSitemap_0(ctx context.Context, marshaler runtime.Marshaler, client ConfigAPIClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := client.UpdateSitemap(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_ConfigAPI_UpdateSitemap_0(ctx context.Context, marshaler runtime.Marshaler, server ConfigAPIServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq emptypb.Empty
var metadata runtime.ServerMetadata
msg, err := server.UpdateSitemap(ctx, &protoReq)
return msg, metadata, err
}
// RegisterConfigAPIHandlerServer registers the http handlers for service ConfigAPI to "mux".
// UnaryRPC :call ConfigAPIServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@ -238,6 +256,29 @@ func RegisterConfigAPIHandlerServer(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("PUT", pattern_ConfigAPI_UpdateSitemap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_ConfigAPI_UpdateSitemap_0(rctx, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigAPI_UpdateSitemap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -359,6 +400,26 @@ func RegisterConfigAPIHandlerClient(ctx context.Context, mux *runtime.ServeMux,
})
mux.Handle("PUT", pattern_ConfigAPI_UpdateSitemap_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
rctx, err := runtime.AnnotateContext(ctx, mux, req)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_ConfigAPI_UpdateSitemap_0(rctx, inboundMarshaler, client, req, pathParams)
ctx = runtime.NewServerMetadataContext(ctx, md)
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
forward_ConfigAPI_UpdateSitemap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
@ -370,6 +431,8 @@ var (
pattern_ConfigAPI_ListConfig_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v1", "config", "list"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_ConfigAPI_GetStats_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "stats"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_ConfigAPI_UpdateSitemap_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"api", "v1", "sitemap"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
@ -380,4 +443,6 @@ var (
forward_ConfigAPI_ListConfig_0 = runtime.ForwardResponseMessage
forward_ConfigAPI_GetStats_0 = runtime.ForwardResponseMessage
forward_ConfigAPI_UpdateSitemap_0 = runtime.ForwardResponseMessage
)

@ -128,4 +128,11 @@ service ConfigAPI {
get : "/api/v1/stats"
};
}
//
rpc UpdateSitemap(google.protobuf.Empty) returns (google.protobuf.Empty) {
option (google.api.http) = {
put : "/api/v1/sitemap"
};
}
}

@ -159,3 +159,19 @@ func (s *ConfigAPIService) GetStats(ctx context.Context, req *emptypb.Empty) (re
return
}
// UpdateSitemap 更新站点地图
func (s *ConfigAPIService) UpdateSitemap(ctx context.Context, req *emptypb.Empty) (*emptypb.Empty, error) {
_, err := s.checkPermission(ctx)
if err != nil {
return nil, err
}
err = s.dbModel.UpdateSitemap()
if err != nil {
s.logger.Error("UpdateSitemap", zap.Error(err))
return nil, status.Error(codes.Internal, err.Error())
}
return &emptypb.Empty{}, nil
}

@ -63,6 +63,8 @@ func getPermissions() (permissions []Permission) {
{Title: "处理举报内容", Description: "", Method: "GRPC", Path: "/api.v1.ReportAPI/UpdateReport"},
{Title: "删除举报内容", Description: "", Method: "GRPC", Path: "/api.v1.ReportAPI/DeleteReport"},
{Title: "查看系统信息", Description: "", Method: "GRPC", Path: "/api.v1.ConfigAPI/GetStats"},
{Title: "更新文档全文索引", Description: "", Method: "GRPC", Path: "/api.v1.DocumentAPI/UpdateDocumentIndexes"},
{Title: "更新站点地图sitemap", Description: "", Method: "GRPC", Path: "/api.v1.ConfigAPI/UpdateSitemap"},
}
return
}

@ -0,0 +1,107 @@
package model
import (
"fmt"
"moredoc/util/sitemap"
"os"
"strings"
"time"
"go.uber.org/zap"
"gorm.io/gorm"
)
var (
isCreatingSitemap bool
)
// UpdateSitemap 更新站点地图
func (m *DBModel) UpdateSitemap() (err error) {
if isCreatingSitemap {
return
}
isCreatingSitemap = true
defer func() {
isCreatingSitemap = false
}()
os.MkdirAll("sitemap", os.ModePerm)
var (
limit = 10000
page = 1
documents []Document
articles []Article
modelDocument = &Document{}
modelArticle = &Article{}
sitemapIndexes []sitemap.SitemapIndex
sm = sitemap.NewSitemap()
domain = strings.TrimRight(m.GetConfigOfSystem(ConfigSystemDomain).Domain, "/")
)
for {
if err = m.db.Model(modelDocument).Select("id", "updated_at").Limit(limit).Offset((page - 1) * limit).Order("id asc").Find(&documents).Error; err != nil && err != gorm.ErrRecordNotFound {
m.logger.Error("execUpdateSitemap", zap.Error(err))
return
}
if len(documents) == 0 {
break
}
file := fmt.Sprintf("sitemap/documents-%d.xml", page)
var su []sitemap.SitemapUrl
for _, doc := range documents {
su = append(su, sitemap.SitemapUrl{
Loc: fmt.Sprintf("%s/document/%d", domain, doc.Id),
Lastmod: doc.UpdatedAt.Format("2006-01-02 15:04:05"),
ChangeFreq: sitemap.DAILY,
Priority: 1.0,
})
}
if err = sm.CreateSitemapContent(su, file); err != nil {
m.logger.Error("execUpdateSitemap", zap.Error(err))
return
}
sitemapIndexes = append(sitemapIndexes, sitemap.SitemapIndex{
Loc: domain + "/" + file,
Lastmod: time.Now().Format("2006-01-02 15:04:05"),
})
page++
}
page = 1
for {
if err = m.db.Model(modelArticle).Select("id", "updated_at", "identifier").Limit(limit).Offset((page - 1) * limit).Order("id asc").Find(&articles).Error; err != nil && err != gorm.ErrRecordNotFound {
m.logger.Error("execUpdateSitemap", zap.Error(err))
return
}
if len(articles) == 0 {
break
}
file := fmt.Sprintf("sitemap/articles-%d.xml", page)
var su []sitemap.SitemapUrl
for _, article := range articles {
su = append(su, sitemap.SitemapUrl{
Loc: fmt.Sprintf("%s/article/%s", domain, article.Identifier),
Lastmod: article.UpdatedAt.Format("2006-01-02 15:04:05"),
ChangeFreq: sitemap.DAILY,
Priority: 1.0,
})
}
if err = sm.CreateSitemapContent(su, file); err != nil {
m.logger.Error("execUpdateSitemap", zap.Error(err))
return
}
sitemapIndexes = append(sitemapIndexes, sitemap.SitemapIndex{
Loc: domain + "/" + file,
Lastmod: time.Now().Format("2006-01-02 15:04:05"),
})
page++
}
if len(sitemapIndexes) > 0 {
if err = sm.CreateSitemapIndex(sitemapIndexes, "sitemap/sitemap.xml"); err != nil {
m.logger.Error("execUpdateSitemap", zap.Error(err))
return
}
}
return
}

@ -79,13 +79,9 @@ func Run(cfg *conf.Config, logger *zap.Logger) {
// 根目录访问静态文件,要放在 grpc 服务的前面
// 可以在 dist 目录下创建一个 index.html 文件并添加内容,然后访问 http://ip:port
app.Use(static.Serve("/uploads", static.LocalFile("./uploads", true)))
app.Use(static.Serve("/sitemap", static.LocalFile("./sitemap", true)))
app.Use(static.Serve("/", static.LocalFile("./dist", true)))
app.NoRoute(func(ctx *gin.Context) {
http.ServeFile(ctx.Writer, ctx.Request, "./dist/index.html")
})
// grpcServer and grpcGatewayServer
app.NoRoute(wrapH(grpcHandlerFunc(grpcServer, gwmux)))
app.NoRoute(wrapH(grpcHandlerFunc(grpcServer, gwmux))) // grpcServer and grpcGatewayServer
addr := fmt.Sprintf(":%v", cfg.Port)
logger.Info("server start", zap.Int("port", cfg.Port))

@ -14,6 +14,9 @@ func RegisterGinRouter(app *gin.Engine, dbModel *model.DBModel, logger *zap.Logg
attachmentAPIService := biz.NewAttachmentAPIService(dbModel, logger)
app.GET("/favicon.ico", attachmentAPIService.Favicon)
app.GET("/sitemap.xml", func(ctx *gin.Context) {
ctx.File("./sitemap/sitemap.xml")
})
app.GET("/view/page/:hash/:page", attachmentAPIService.ViewDocumentPages)
app.GET("/view/cover/:hash", attachmentAPIService.ViewDocumentCover)

Loading…
Cancel
Save