diff --git a/actions/comment.go b/internal/actions/comment.go similarity index 97% rename from actions/comment.go rename to internal/actions/comment.go index f215efa..351c34f 100644 --- a/actions/comment.go +++ b/internal/actions/comment.go @@ -5,11 +5,11 @@ import ( "errors" "fmt" "github.com/gin-gonic/gin" - "github/fthvgb1/wp-go/actions/common" "github/fthvgb1/wp-go/cache" "github/fthvgb1/wp-go/config" - "github/fthvgb1/wp-go/config/wpconfig" "github/fthvgb1/wp-go/helper" + "github/fthvgb1/wp-go/internal/actions/common" + "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/mail" "io" diff --git a/actions/common/comments.go b/internal/actions/common/comments.go similarity index 98% rename from actions/common/comments.go rename to internal/actions/common/comments.go index 76ddd06..b987a76 100644 --- a/actions/common/comments.go +++ b/internal/actions/common/comments.go @@ -3,9 +3,9 @@ package common import ( "context" "github/fthvgb1/wp-go/helper" + "github/fthvgb1/wp-go/internal/wp" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "strconv" "time" ) diff --git a/actions/common/common.go b/internal/actions/common/common.go similarity index 68% rename from actions/common/common.go rename to internal/actions/common/common.go index 043f424..b5c7320 100644 --- a/actions/common/common.go +++ b/internal/actions/common/common.go @@ -5,21 +5,21 @@ import ( "fmt" "github/fthvgb1/wp-go/cache" "github/fthvgb1/wp-go/config" - "github/fthvgb1/wp-go/config/wpconfig" + wp2 "github/fthvgb1/wp-go/internal/wp" + "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "sync" "time" ) var postContextCache *cache.MapCache[uint64, PostContext] var archivesCaches *Arch -var categoryCaches *cache.SliceCache[wp.TermsMy] -var recentPostsCaches *cache.SliceCache[wp.Posts] -var recentCommentsCaches *cache.SliceCache[wp.Comments] +var categoryCaches *cache.SliceCache[wp2.TermsMy] +var recentPostsCaches *cache.SliceCache[wp2.Posts] +var recentCommentsCaches *cache.SliceCache[wp2.Comments] var postCommentCaches *cache.MapCache[uint64, []uint64] -var postsCache *cache.MapCache[uint64, wp.Posts] +var postsCache *cache.MapCache[uint64, wp2.Posts] var postMetaCache *cache.MapCache[uint64, map[string]any] @@ -28,9 +28,9 @@ var postListIdsCache *cache.MapCache[string, PostIds] var searchPostIdsCache *cache.MapCache[string, PostIds] var maxPostIdCache *cache.SliceCache[uint64] var TotalRaw int64 -var usersCache *cache.MapCache[uint64, wp.Users] -var usersNameCache *cache.MapCache[string, wp.Users] -var commentsCache *cache.MapCache[uint64, wp.Comments] +var usersCache *cache.MapCache[uint64, wp2.Users] +var usersNameCache *cache.MapCache[string, wp2.Users] +var commentsCache *cache.MapCache[uint64, wp2.Comments] func InitActionsCommonCache() { c := config.Conf.Load() @@ -47,25 +47,25 @@ func InitActionsCommonCache() { postContextCache = cache.NewMapCacheByFn[uint64, PostContext](getPostContext, c.ContextPostCacheTime) - postsCache = cache.NewMapCacheByBatchFn[uint64, wp.Posts](getPostsByIds, c.PostDataCacheTime) + postsCache = cache.NewMapCacheByBatchFn[uint64, wp2.Posts](getPostsByIds, c.PostDataCacheTime) postMetaCache = cache.NewMapCacheByBatchFn[uint64, map[string]any](getPostMetaByPostIds, c.PostDataCacheTime) - categoryCaches = cache.NewSliceCache[wp.TermsMy](categories, c.CategoryCacheTime) + categoryCaches = cache.NewSliceCache[wp2.TermsMy](categories, c.CategoryCacheTime) - recentPostsCaches = cache.NewSliceCache[wp.Posts](recentPosts, c.RecentPostCacheTime) + recentPostsCaches = cache.NewSliceCache[wp2.Posts](recentPosts, c.RecentPostCacheTime) - recentCommentsCaches = cache.NewSliceCache[wp.Comments](recentComments, c.RecentCommentsCacheTime) + recentCommentsCaches = cache.NewSliceCache[wp2.Comments](recentComments, c.RecentCommentsCacheTime) postCommentCaches = cache.NewMapCacheByFn[uint64, []uint64](postComments, c.PostCommentsCacheTime) maxPostIdCache = cache.NewSliceCache[uint64](getMaxPostId, c.MaxPostIdCacheTime) - usersCache = cache.NewMapCacheByFn[uint64, wp.Users](getUserById, c.UserInfoCacheTime) + usersCache = cache.NewMapCacheByFn[uint64, wp2.Users](getUserById, c.UserInfoCacheTime) - usersNameCache = cache.NewMapCacheByFn[string, wp.Users](getUserByName, c.UserInfoCacheTime) + usersNameCache = cache.NewMapCacheByFn[string, wp2.Users](getUserByName, c.UserInfoCacheTime) - commentsCache = cache.NewMapCacheByBatchFn[uint64, wp.Comments](getCommentByIds, c.CommentsCacheTime) + commentsCache = cache.NewMapCacheByBatchFn[uint64, wp2.Comments](getCommentByIds, c.CommentsCacheTime) } func ClearCache() { @@ -97,13 +97,13 @@ type PostIds struct { } type Arch struct { - data []wp.PostArchive + data []wp2.PostArchive mutex *sync.Mutex - setCacheFunc func(context.Context) ([]wp.PostArchive, error) + setCacheFunc func(context.Context) ([]wp2.PostArchive, error) month time.Month } -func (c *Arch) getArchiveCache(ctx context.Context) []wp.PostArchive { +func (c *Arch) getArchiveCache(ctx context.Context) []wp2.PostArchive { l := len(c.data) m := time.Now().Month() if l > 0 && c.month != m || l < 1 { @@ -121,30 +121,30 @@ func (c *Arch) getArchiveCache(ctx context.Context) []wp.PostArchive { } type PostContext struct { - prev wp.Posts - next wp.Posts + prev wp2.Posts + next wp2.Posts } -func archives(ctx context.Context) ([]wp.PostArchive, error) { - return models.Find[wp.PostArchive](ctx, models.SqlBuilder{ +func archives(ctx context.Context) ([]wp2.PostArchive, error) { + return models.Find[wp2.PostArchive](ctx, models.SqlBuilder{ {"post_type", "post"}, {"post_status", "publish"}, }, "YEAR(post_date) AS `year`, MONTH(post_date) AS `month`, count(ID) as posts", "year,month", models.SqlBuilder{{"year", "desc"}, {"month", "desc"}}, nil, nil, 0) } -func Archives(ctx context.Context) (r []wp.PostArchive) { +func Archives(ctx context.Context) (r []wp2.PostArchive) { return archivesCaches.getArchiveCache(ctx) } -func Categories(ctx context.Context) []wp.TermsMy { +func Categories(ctx context.Context) []wp2.TermsMy { r, err := categoryCaches.GetCache(ctx, time.Second, ctx) logs.ErrPrintln(err, "get category ") return r } -func categories(a ...any) (terms []wp.TermsMy, err error) { +func categories(a ...any) (terms []wp2.TermsMy, err error) { ctx := a[0].(context.Context) var in = []any{"category"} - terms, err = models.Find[wp.TermsMy](ctx, models.SqlBuilder{ + terms, err = models.Find[wp2.TermsMy](ctx, models.SqlBuilder{ {"tt.count", ">", "0", "int"}, {"tt.taxonomy", "in", ""}, }, "t.term_id", "", models.SqlBuilder{ @@ -163,13 +163,13 @@ func categories(a ...any) (terms []wp.TermsMy, err error) { return } -func PasswordProjectTitle(post *wp.Posts) { +func PasswordProjectTitle(post *wp2.Posts) { if post.PostPassword != "" { post.PostTitle = fmt.Sprintf("密码保护:%s", post.PostTitle) } } -func PasswdProjectContent(post *wp.Posts) { +func PasswdProjectContent(post *wp2.Posts) { if post.PostContent != "" { format := `
diff --git a/actions/common/postmeta.go b/internal/actions/common/postmeta.go similarity index 92% rename from actions/common/postmeta.go rename to internal/actions/common/postmeta.go index 7ae4011..7657a36 100644 --- a/actions/common/postmeta.go +++ b/internal/actions/common/postmeta.go @@ -4,9 +4,9 @@ import ( "context" "github.com/leeqvip/gophp" "github/fthvgb1/wp-go/helper" + wp2 "github/fthvgb1/wp-go/internal/wp" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "strconv" "time" ) @@ -20,7 +20,7 @@ func GetPostMetaByPostId(ctx context.Context, id uint64) (r map[string]any, err return } -func ToPostThumbnail(c context.Context, postId uint64) (r wp.PostThumbnail) { +func ToPostThumbnail(c context.Context, postId uint64) (r wp2.PostThumbnail) { meta, err := GetPostMetaByPostId(c, postId) if err == nil { m, ok := meta["_thumbnail_id"] @@ -64,7 +64,7 @@ func getPostMetaByPostIds(args ...any) (r map[uint64]map[string]any, err error) r = make(map[uint64]map[string]any) ctx := args[0].(context.Context) ids := args[1].([]uint64) - rr, err := models.Find[wp.Postmeta](ctx, models.SqlBuilder{ + rr, err := models.Find[wp2.Postmeta](ctx, models.SqlBuilder{ {"post_id", "in", ""}, }, "*", "", nil, nil, nil, 0, helper.SliceMap(ids, helper.ToAny[uint64])) if err != nil { diff --git a/actions/common/posts.go b/internal/actions/common/posts.go similarity index 99% rename from actions/common/posts.go rename to internal/actions/common/posts.go index eb2cc38..54f2d28 100644 --- a/actions/common/posts.go +++ b/internal/actions/common/posts.go @@ -6,9 +6,9 @@ import ( "fmt" "github.com/gin-gonic/gin" "github/fthvgb1/wp-go/helper" + "github/fthvgb1/wp-go/internal/wp" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "strings" "sync/atomic" "time" diff --git a/actions/common/users.go b/internal/actions/common/users.go similarity index 95% rename from actions/common/users.go rename to internal/actions/common/users.go index d677946..505083b 100644 --- a/actions/common/users.go +++ b/internal/actions/common/users.go @@ -2,9 +2,9 @@ package common import ( "context" + "github/fthvgb1/wp-go/internal/wp" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "time" ) diff --git a/actions/detail.go b/internal/actions/detail.go similarity index 92% rename from actions/detail.go rename to internal/actions/detail.go index 2828cbc..d02ef66 100644 --- a/actions/detail.go +++ b/internal/actions/detail.go @@ -4,11 +4,11 @@ import ( "fmt" "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" - "github/fthvgb1/wp-go/actions/common" - "github/fthvgb1/wp-go/config/wpconfig" "github/fthvgb1/wp-go/helper" + common2 "github/fthvgb1/wp-go/internal/actions/common" + "github/fthvgb1/wp-go/internal/wp" + "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/logs" - "github/fthvgb1/wp-go/models/wp" "github/fthvgb1/wp-go/plugins" "math/rand" "net/http" @@ -28,10 +28,10 @@ func Detail(c *gin.Context) { hh := detailHandler{ c, } - recent := common.RecentPosts(c, 5) - archive := common.Archives(c) - categoryItems := common.Categories(c) - recentComments := common.RecentComments(c, 5) + recent := common2.RecentPosts(c, 5) + archive := common2.Archives(c) + categoryItems := common2.Categories(c) + recentComments := common2.RecentComments(c, 5) var h = gin.H{ "title": wpconfig.Options.Value("blogname"), "options": wpconfig.Options, @@ -62,12 +62,12 @@ func Detail(c *gin.Context) { } } ID := uint64(Id) - maxId, err := common.GetMaxPostId(c) + maxId, err := common2.GetMaxPostId(c) logs.ErrPrintln(err, "get max post id") if ID > maxId || err != nil { return } - post, err := common.GetPostById(c, ID) + post, err := common2.GetPostById(c, ID) if post.Id == 0 || err != nil { return } @@ -76,10 +76,10 @@ func Detail(c *gin.Context) { if post.CommentCount > 0 || post.CommentStatus == "open" { showComment = true } - user := common.GetUserById(c, post.PostAuthor) - common.PasswordProjectTitle(&post) + user := common2.GetUserById(c, post.PostAuthor) + common2.PasswordProjectTitle(&post) if post.PostPassword != "" && pw != post.PostPassword { - common.PasswdProjectContent(&post) + common2.PasswdProjectContent(&post) showComment = false } else if s, ok := commentCache.Get(c.Request.URL.RawQuery); ok && s != "" && (post.PostPassword == "" || post.PostPassword != "" && pw == post.PostPassword) { c.Writer.WriteHeader(http.StatusOK) @@ -89,10 +89,10 @@ func Detail(c *gin.Context) { return } plugins.ApplyPlugin(plugins.NewPostPlugin(c, plugins.Detail), &post) - comments, err := common.PostComments(c, post.Id) + comments, err := common2.PostComments(c, post.Id) logs.ErrPrintln(err, "get post comment", post.Id) commentss := treeComments(comments) - prev, next, err := common.GetContextPost(c, post.Id, post.PostDate) + prev, next, err := common2.GetContextPost(c, post.Id, post.PostDate) logs.ErrPrintln(err, "get pre and next post", post.Id, post.PostDate) h["title"] = fmt.Sprintf("%s-%s", post.PostTitle, wpconfig.Options.Value("blogname")) h["post"] = post diff --git a/actions/feed.go b/internal/actions/feed.go similarity index 86% rename from actions/feed.go rename to internal/actions/feed.go index 5380db8..5f5fd1a 100644 --- a/actions/feed.go +++ b/internal/actions/feed.go @@ -3,12 +3,12 @@ package actions import ( "fmt" "github.com/gin-gonic/gin" - "github/fthvgb1/wp-go/actions/common" "github/fthvgb1/wp-go/cache" - "github/fthvgb1/wp-go/config/wpconfig" "github/fthvgb1/wp-go/helper" + common2 "github/fthvgb1/wp-go/internal/actions/common" + wp2 "github/fthvgb1/wp-go/internal/wp" + "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/logs" - "github/fthvgb1/wp-go/models/wp" "github/fthvgb1/wp-go/plugins" "github/fthvgb1/wp-go/rss2" "net/http" @@ -77,21 +77,21 @@ func Feed(c *gin.Context) { func feed(arg ...any) (xml []string, err error) { c := arg[0].(*gin.Context) - r := common.RecentPosts(c, 10) - ids := helper.SliceMap(r, func(t wp.Posts) uint64 { + r := common2.RecentPosts(c, 10) + ids := helper.SliceMap(r, func(t wp2.Posts) uint64 { return t.Id }) - posts, err := common.GetPostsByIds(c, ids) + posts, err := common2.GetPostsByIds(c, ids) if err != nil { return } rs := templateRss rs.LastBuildDate = time.Now().Format(timeFormat) - rs.Items = helper.SliceMap(posts, func(t wp.Posts) rss2.Item { + rs.Items = helper.SliceMap(posts, func(t wp2.Posts) rss2.Item { desc := "无法提供摘要。这是一篇受保护的文章。" - common.PasswordProjectTitle(&t) + common2.PasswordProjectTitle(&t) if t.PostPassword != "" { - common.PasswdProjectContent(&t) + common2.PasswdProjectContent(&t) } else { desc = plugins.DigestRaw(t.PostContent, 55, fmt.Sprintf("/p/%d", t.Id)) } @@ -101,7 +101,7 @@ func feed(arg ...any) (xml []string, err error) { } else if t.CommentStatus == "open" && t.CommentCount == 0 { l = fmt.Sprintf("%s/p/%d#respond", wpconfig.Options.Value("siteurl"), t.Id) } - user := common.GetUserById(c, t.PostAuthor) + user := common2.GetUserById(c, t.PostAuthor) return rss2.Item{ Title: t.PostTitle, @@ -157,17 +157,17 @@ func postFeed(arg ...any) (x string, err error) { } } ID := uint64(Id) - maxId, err := common.GetMaxPostId(c) + maxId, err := common2.GetMaxPostId(c) logs.ErrPrintln(err, "get max post id") if ID > maxId || err != nil { return } - post, err := common.GetPostById(c, ID) + post, err := common2.GetPostById(c, ID) if post.Id == 0 || err != nil { return } - common.PasswordProjectTitle(&post) - comments, err := common.PostComments(c, post.Id) + common2.PasswordProjectTitle(&post) + comments, err := common2.PostComments(c, post.Id) if err != nil { return } @@ -179,7 +179,7 @@ func postFeed(arg ...any) (x string, err error) { rs.LastBuildDate = time.Now().Format(timeFormat) if post.PostPassword != "" { if len(comments) > 0 { - common.PasswdProjectContent(&post) + common2.PasswdProjectContent(&post) t := comments[len(comments)-1] rs.Items = []rss2.Item{ { @@ -194,7 +194,7 @@ func postFeed(arg ...any) (x string, err error) { } } } else { - rs.Items = helper.SliceMap(comments, func(t wp.Comments) rss2.Item { + rs.Items = helper.SliceMap(comments, func(t wp2.Comments) rss2.Item { return rss2.Item{ Title: fmt.Sprintf("评价者:%s", t.CommentAuthor), Link: fmt.Sprintf("%s/p/%d#comment-%d", wpconfig.Options.Value("siteurl"), post.Id, t.CommentId), @@ -227,24 +227,24 @@ func CommentsFeed(c *gin.Context) { func commentsFeed(args ...any) (r []string, err error) { c := args[0].(*gin.Context) - commens := common.RecentComments(c, 10) + commens := common2.RecentComments(c, 10) rs := templateRss rs.Title = fmt.Sprintf("\"%s\"的评论", wpconfig.Options.Value("blogname")) rs.LastBuildDate = time.Now().Format(timeFormat) rs.AtomLink = fmt.Sprintf("%s/comments/feed", wpconfig.Options.Value("siteurl")) - com, err := common.GetCommentByIds(c, helper.SliceMap(commens, func(t wp.Comments) uint64 { + com, err := common2.GetCommentByIds(c, helper.SliceMap(commens, func(t wp2.Comments) uint64 { return t.CommentId })) if nil != err { return []string{}, err } - rs.Items = helper.SliceMap(com, func(t wp.Comments) rss2.Item { - post, _ := common.GetPostById(c, t.CommentPostId) - common.PasswordProjectTitle(&post) + rs.Items = helper.SliceMap(com, func(t wp2.Comments) rss2.Item { + post, _ := common2.GetPostById(c, t.CommentPostId) + common2.PasswordProjectTitle(&post) desc := "评论受保护:要查看请输入密码。" content := t.CommentContent if post.PostPassword != "" { - common.PasswdProjectContent(&post) + common2.PasswdProjectContent(&post) content = post.PostContent } else { desc = plugins.ClearHtml(t.CommentContent) diff --git a/actions/index.go b/internal/actions/index.go similarity index 90% rename from actions/index.go rename to internal/actions/index.go index 9f10daf..5c7c9be 100644 --- a/actions/index.go +++ b/internal/actions/index.go @@ -4,11 +4,11 @@ import ( "fmt" "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" - "github/fthvgb1/wp-go/actions/common" - "github/fthvgb1/wp-go/config/wpconfig" "github/fthvgb1/wp-go/helper" + common2 "github/fthvgb1/wp-go/internal/actions/common" + "github/fthvgb1/wp-go/internal/wp" + "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "github/fthvgb1/wp-go/plugins" "math" "net/http" @@ -113,7 +113,7 @@ func (h *indexHandle) parseParams() (err error) { h.category = category username := h.c.Param("author") if username != "" { - user, er := common.GetUserByName(h.c, username) + user, er := common2.GetUserByName(h.c, username) if er != nil { err = er return @@ -160,7 +160,7 @@ func (h *indexHandle) parseParams() (err error) { h.page = pa } } - total := int(atomic.LoadInt64(&common.TotalRaw)) + total := int(atomic.LoadInt64(&common2.TotalRaw)) if total > 0 && total < (h.page-1)*h.pageSize { h.page = 1 } @@ -180,10 +180,10 @@ func Index(c *gin.Context) { var postIds []wp.Posts var totalRaw int var err error - archive := common.Archives(c) - recent := common.RecentPosts(c, 5) - categoryItems := common.Categories(c) - recentComments := common.RecentComments(c, 5) + archive := common2.Archives(c) + recent := common2.RecentPosts(c, 5) + categoryItems := common2.Categories(c) + recentComments := common2.RecentComments(c, 5) ginH := gin.H{ "options": wpconfig.Options, "recentPosts": recent, @@ -208,14 +208,14 @@ func Index(c *gin.Context) { } ginH["title"] = h.getTitle() if c.Param("month") != "" { - postIds, totalRaw, err = common.GetMonthPostIds(c, c.Param("year"), c.Param("month"), h.page, h.pageSize, h.order) + postIds, totalRaw, err = common2.GetMonthPostIds(c, c.Param("year"), c.Param("month"), h.page, h.pageSize, h.order) if err != nil { return } } else if h.search != "" { - postIds, totalRaw, err = common.SearchPost(c, h.getSearchKey(), c, h.where, h.page, h.pageSize, models.SqlBuilder{{h.orderBy, h.order}}, h.join, h.postType, h.status) + postIds, totalRaw, err = common2.SearchPost(c, h.getSearchKey(), c, h.where, h.page, h.pageSize, models.SqlBuilder{{h.orderBy, h.order}}, h.join, h.postType, h.status) } else { - postIds, totalRaw, err = common.PostLists(c, h.getSearchKey(), c, h.where, h.page, h.pageSize, models.SqlBuilder{{h.orderBy, h.order}}, h.join, h.postType, h.status) + postIds, totalRaw, err = common2.PostLists(c, h.getSearchKey(), c, h.where, h.page, h.pageSize, models.SqlBuilder{{h.orderBy, h.order}}, h.join, h.postType, h.status) } if err != nil { return @@ -227,16 +227,16 @@ func Index(c *gin.Context) { pw := h.session.Get("post_password") plug := plugins.NewPostPlugin(c, h.scene) for i, post := range postIds { - common.PasswordProjectTitle(&postIds[i]) + common2.PasswordProjectTitle(&postIds[i]) if post.PostPassword != "" && pw != post.PostPassword { - common.PasswdProjectContent(&postIds[i]) + common2.PasswdProjectContent(&postIds[i]) } else { plugins.ApplyPlugin(plug, &postIds[i]) } } for i, post := range recent { if post.PostPassword != "" && pw != post.PostPassword { - common.PasswdProjectContent(&recent[i]) + common2.PasswdProjectContent(&recent[i]) } } q := c.Request.URL.Query().Encode() diff --git a/actions/login.go b/internal/actions/login.go similarity index 95% rename from actions/login.go rename to internal/actions/login.go index 279ae93..2c0b597 100644 --- a/actions/login.go +++ b/internal/actions/login.go @@ -4,8 +4,8 @@ import ( "fmt" "github.com/gin-contrib/sessions" "github.com/gin-gonic/gin" - "github/fthvgb1/wp-go/config/wpconfig" "github/fthvgb1/wp-go/helper" + "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/phpass" "net/http" "strings" diff --git a/middleware/flowLimit.go b/internal/middleware/flowLimit.go similarity index 100% rename from middleware/flowLimit.go rename to internal/middleware/flowLimit.go diff --git a/middleware/iplimit.go b/internal/middleware/iplimit.go similarity index 100% rename from middleware/iplimit.go rename to internal/middleware/iplimit.go diff --git a/middleware/searchlimit.go b/internal/middleware/searchlimit.go similarity index 100% rename from middleware/searchlimit.go rename to internal/middleware/searchlimit.go diff --git a/middleware/sendmail.go b/internal/middleware/sendmail.go similarity index 98% rename from middleware/sendmail.go rename to internal/middleware/sendmail.go index 5e3bdba..ea8266e 100644 --- a/middleware/sendmail.go +++ b/internal/middleware/sendmail.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/gin-gonic/gin" "github/fthvgb1/wp-go/config" - "github/fthvgb1/wp-go/config/wpconfig" + "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/mail" "io" diff --git a/middleware/staticFileCache.go b/internal/middleware/staticFileCache.go similarity index 100% rename from middleware/staticFileCache.go rename to internal/middleware/staticFileCache.go diff --git a/middleware/validateservername.go b/internal/middleware/validateservername.go similarity index 100% rename from middleware/validateservername.go rename to internal/middleware/validateservername.go diff --git a/route/route.go b/internal/route/route.go similarity index 56% rename from route/route.go rename to internal/route/route.go index 20ee150..8829efc 100644 --- a/route/route.go +++ b/internal/route/route.go @@ -6,12 +6,12 @@ import ( "github.com/gin-contrib/sessions" "github.com/gin-contrib/sessions/cookie" "github.com/gin-gonic/gin" - "github/fthvgb1/wp-go/actions" "github/fthvgb1/wp-go/config" - "github/fthvgb1/wp-go/config/wpconfig" - "github/fthvgb1/wp-go/middleware" - "github/fthvgb1/wp-go/static" - "github/fthvgb1/wp-go/templates" + actions2 "github/fthvgb1/wp-go/internal/actions" + middleware2 "github/fthvgb1/wp-go/internal/middleware" + "github/fthvgb1/wp-go/internal/static" + "github/fthvgb1/wp-go/internal/templates" + "github/fthvgb1/wp-go/internal/wpconfig" "html/template" "net/http" "time" @@ -40,14 +40,14 @@ func SetupRouter() (*gin.Engine, func()) { return wpconfig.Options.Value(k) }, }).SetTemplate() - validServerName, reloadValidServerNameFn := middleware.ValidateServerNames() - fl, flReload := middleware.FlowLimit(c.MaxRequestSleepNum, c.MaxRequestNum, c.SleepTime) + validServerName, reloadValidServerNameFn := middleware2.ValidateServerNames() + fl, flReload := middleware2.FlowLimit(c.MaxRequestSleepNum, c.MaxRequestNum, c.SleepTime) r.Use( gin.Logger(), validServerName, - middleware.RecoverAndSendMail(gin.DefaultErrorWriter), + middleware2.RecoverAndSendMail(gin.DefaultErrorWriter), fl, - middleware.SetStaticFileCache, + middleware2.SetStaticFileCache, ) //gzip 因为一般会用nginx做反代时自动使用gzip,所以go这边本身可以不用 if c.Gzip { @@ -65,24 +65,24 @@ func SetupRouter() (*gin.Engine, func()) { })) store := cookie.NewStore([]byte("secret")) r.Use(sessions.Sessions("go-wp", store)) - sl, slRload := middleware.SearchLimit(c.SingleIpSearchNum) - r.GET("/", sl, actions.Index) - r.GET("/page/:page", actions.Index) - r.GET("/p/category/:category", actions.Index) - r.GET("/p/category/:category/page/:page", actions.Index) - r.GET("/p/tag/:tag", actions.Index) - r.GET("/p/tag/:tag/page/:page", actions.Index) - r.GET("/p/date/:year/:month", actions.Index) - r.GET("/p/date/:year/:month/page/:page", actions.Index) - r.GET("/p/author/:author", actions.Index) - r.GET("/p/author/:author/page/:page", actions.Index) - r.POST("/login", actions.Login) - r.GET("/p/:id", actions.Detail) - r.GET("/p/:id/feed", actions.PostFeed) - r.GET("/feed", actions.Feed) - r.GET("/comments/feed", actions.CommentsFeed) - cfl, _ := middleware.FlowLimit(c.MaxRequestSleepNum, 5, c.SleepTime) - r.POST("/comment", cfl, actions.PostComment) + sl, slRload := middleware2.SearchLimit(c.SingleIpSearchNum) + r.GET("/", sl, actions2.Index) + r.GET("/page/:page", actions2.Index) + r.GET("/p/category/:category", actions2.Index) + r.GET("/p/category/:category/page/:page", actions2.Index) + r.GET("/p/tag/:tag", actions2.Index) + r.GET("/p/tag/:tag/page/:page", actions2.Index) + r.GET("/p/date/:year/:month", actions2.Index) + r.GET("/p/date/:year/:month/page/:page", actions2.Index) + r.GET("/p/author/:author", actions2.Index) + r.GET("/p/author/:author/page/:page", actions2.Index) + r.POST("/login", actions2.Login) + r.GET("/p/:id", actions2.Detail) + r.GET("/p/:id/feed", actions2.PostFeed) + r.GET("/feed", actions2.Feed) + r.GET("/comments/feed", actions2.CommentsFeed) + cfl, _ := middleware2.FlowLimit(c.MaxRequestSleepNum, 5, c.SleepTime) + r.POST("/comment", cfl, actions2.PostComment) if gin.Mode() != gin.ReleaseMode { pprof.Register(r, "dev/pprof") } diff --git a/static/favicon.ico b/internal/static/favicon.ico similarity index 100% rename from static/favicon.ico rename to internal/static/favicon.ico diff --git a/static/static.go b/internal/static/static.go similarity index 100% rename from static/static.go rename to internal/static/static.go diff --git a/static/wp-content/plugins/enlighter/cache/.empty b/internal/static/wp-content/plugins/enlighter/cache/.empty similarity index 100% rename from static/wp-content/plugins/enlighter/cache/.empty rename to internal/static/wp-content/plugins/enlighter/cache/.empty diff --git a/static/wp-content/plugins/enlighter/cache/enlighterjs.min.css b/internal/static/wp-content/plugins/enlighter/cache/enlighterjs.min.css similarity index 100% rename from static/wp-content/plugins/enlighter/cache/enlighterjs.min.css rename to internal/static/wp-content/plugins/enlighter/cache/enlighterjs.min.css diff --git a/static/wp-content/plugins/enlighter/cache/enlighterjs.min.js b/internal/static/wp-content/plugins/enlighter/cache/enlighterjs.min.js similarity index 100% rename from static/wp-content/plugins/enlighter/cache/enlighterjs.min.js rename to internal/static/wp-content/plugins/enlighter/cache/enlighterjs.min.js diff --git a/static/wp-content/plugins/enlighter/cache/tinymce.css b/internal/static/wp-content/plugins/enlighter/cache/tinymce.css similarity index 100% rename from static/wp-content/plugins/enlighter/cache/tinymce.css rename to internal/static/wp-content/plugins/enlighter/cache/tinymce.css diff --git a/static/wp-content/themes/twentyfifteen/assets/pier-seagull.jpg b/internal/static/wp-content/themes/twentyfifteen/assets/pier-seagull.jpg similarity index 100% rename from static/wp-content/themes/twentyfifteen/assets/pier-seagull.jpg rename to internal/static/wp-content/themes/twentyfifteen/assets/pier-seagull.jpg diff --git a/static/wp-content/themes/twentyfifteen/assets/pier-seagulls.jpg b/internal/static/wp-content/themes/twentyfifteen/assets/pier-seagulls.jpg similarity index 100% rename from static/wp-content/themes/twentyfifteen/assets/pier-seagulls.jpg rename to internal/static/wp-content/themes/twentyfifteen/assets/pier-seagulls.jpg diff --git a/static/wp-content/themes/twentyfifteen/assets/pier-sunset.jpg b/internal/static/wp-content/themes/twentyfifteen/assets/pier-sunset.jpg similarity index 100% rename from static/wp-content/themes/twentyfifteen/assets/pier-sunset.jpg rename to internal/static/wp-content/themes/twentyfifteen/assets/pier-sunset.jpg diff --git a/static/wp-content/themes/twentyfifteen/css/blocks.css b/internal/static/wp-content/themes/twentyfifteen/css/blocks.css similarity index 100% rename from static/wp-content/themes/twentyfifteen/css/blocks.css rename to internal/static/wp-content/themes/twentyfifteen/css/blocks.css diff --git a/static/wp-content/themes/twentyfifteen/css/editor-blocks.css b/internal/static/wp-content/themes/twentyfifteen/css/editor-blocks.css similarity index 100% rename from static/wp-content/themes/twentyfifteen/css/editor-blocks.css rename to internal/static/wp-content/themes/twentyfifteen/css/editor-blocks.css diff --git a/static/wp-content/themes/twentyfifteen/css/editor-style.css b/internal/static/wp-content/themes/twentyfifteen/css/editor-style.css similarity index 100% rename from static/wp-content/themes/twentyfifteen/css/editor-style.css rename to internal/static/wp-content/themes/twentyfifteen/css/editor-style.css diff --git a/static/wp-content/themes/twentyfifteen/css/ie.css b/internal/static/wp-content/themes/twentyfifteen/css/ie.css similarity index 100% rename from static/wp-content/themes/twentyfifteen/css/ie.css rename to internal/static/wp-content/themes/twentyfifteen/css/ie.css diff --git a/static/wp-content/themes/twentyfifteen/css/ie7.css b/internal/static/wp-content/themes/twentyfifteen/css/ie7.css similarity index 100% rename from static/wp-content/themes/twentyfifteen/css/ie7.css rename to internal/static/wp-content/themes/twentyfifteen/css/ie7.css diff --git a/static/wp-content/themes/twentyfifteen/genericons/COPYING.txt b/internal/static/wp-content/themes/twentyfifteen/genericons/COPYING.txt similarity index 100% rename from static/wp-content/themes/twentyfifteen/genericons/COPYING.txt rename to internal/static/wp-content/themes/twentyfifteen/genericons/COPYING.txt diff --git a/static/wp-content/themes/twentyfifteen/genericons/Genericons.eot b/internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.eot similarity index 100% rename from static/wp-content/themes/twentyfifteen/genericons/Genericons.eot rename to internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.eot diff --git a/static/wp-content/themes/twentyfifteen/genericons/Genericons.svg b/internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.svg similarity index 100% rename from static/wp-content/themes/twentyfifteen/genericons/Genericons.svg rename to internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.svg diff --git a/static/wp-content/themes/twentyfifteen/genericons/Genericons.ttf b/internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.ttf similarity index 100% rename from static/wp-content/themes/twentyfifteen/genericons/Genericons.ttf rename to internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.ttf diff --git a/static/wp-content/themes/twentyfifteen/genericons/Genericons.woff b/internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.woff similarity index 100% rename from static/wp-content/themes/twentyfifteen/genericons/Genericons.woff rename to internal/static/wp-content/themes/twentyfifteen/genericons/Genericons.woff diff --git a/static/wp-content/themes/twentyfifteen/genericons/LICENSE.txt b/internal/static/wp-content/themes/twentyfifteen/genericons/LICENSE.txt similarity index 100% rename from static/wp-content/themes/twentyfifteen/genericons/LICENSE.txt rename to internal/static/wp-content/themes/twentyfifteen/genericons/LICENSE.txt diff --git a/static/wp-content/themes/twentyfifteen/genericons/README.md b/internal/static/wp-content/themes/twentyfifteen/genericons/README.md similarity index 100% rename from static/wp-content/themes/twentyfifteen/genericons/README.md rename to internal/static/wp-content/themes/twentyfifteen/genericons/README.md diff --git a/static/wp-content/themes/twentyfifteen/genericons/genericons.css b/internal/static/wp-content/themes/twentyfifteen/genericons/genericons.css similarity index 99% rename from static/wp-content/themes/twentyfifteen/genericons/genericons.css rename to internal/static/wp-content/themes/twentyfifteen/genericons/genericons.css index f1056ed..5664be4 100755 --- a/static/wp-content/themes/twentyfifteen/genericons/genericons.css +++ b/internal/static/wp-content/themes/twentyfifteen/genericons/genericons.css @@ -27,7 +27,7 @@ @media screen and (-webkit-min-device-pixel-ratio:0) { @font-face { font-family: "Genericons"; - src: url("./Genericons.svg#Genericons") format("svg"); + src: url("Genericons.svg#Genericons") format("svg"); } } diff --git a/static/wp-content/themes/twentyfifteen/js/color-scheme-control.js b/internal/static/wp-content/themes/twentyfifteen/js/color-scheme-control.js similarity index 100% rename from static/wp-content/themes/twentyfifteen/js/color-scheme-control.js rename to internal/static/wp-content/themes/twentyfifteen/js/color-scheme-control.js diff --git a/static/wp-content/themes/twentyfifteen/js/customize-preview.js b/internal/static/wp-content/themes/twentyfifteen/js/customize-preview.js similarity index 100% rename from static/wp-content/themes/twentyfifteen/js/customize-preview.js rename to internal/static/wp-content/themes/twentyfifteen/js/customize-preview.js diff --git a/static/wp-content/themes/twentyfifteen/js/functions.js b/internal/static/wp-content/themes/twentyfifteen/js/functions.js similarity index 100% rename from static/wp-content/themes/twentyfifteen/js/functions.js rename to internal/static/wp-content/themes/twentyfifteen/js/functions.js diff --git a/static/wp-content/themes/twentyfifteen/js/html5.js b/internal/static/wp-content/themes/twentyfifteen/js/html5.js similarity index 100% rename from static/wp-content/themes/twentyfifteen/js/html5.js rename to internal/static/wp-content/themes/twentyfifteen/js/html5.js diff --git a/static/wp-content/themes/twentyfifteen/js/keyboard-image-navigation.js b/internal/static/wp-content/themes/twentyfifteen/js/keyboard-image-navigation.js similarity index 100% rename from static/wp-content/themes/twentyfifteen/js/keyboard-image-navigation.js rename to internal/static/wp-content/themes/twentyfifteen/js/keyboard-image-navigation.js diff --git a/static/wp-content/themes/twentyfifteen/js/skip-link-focus-fix.js b/internal/static/wp-content/themes/twentyfifteen/js/skip-link-focus-fix.js similarity index 100% rename from static/wp-content/themes/twentyfifteen/js/skip-link-focus-fix.js rename to internal/static/wp-content/themes/twentyfifteen/js/skip-link-focus-fix.js diff --git a/static/wp-content/themes/twentyfifteen/rtl.css b/internal/static/wp-content/themes/twentyfifteen/rtl.css similarity index 100% rename from static/wp-content/themes/twentyfifteen/rtl.css rename to internal/static/wp-content/themes/twentyfifteen/rtl.css diff --git a/static/wp-content/themes/twentyfifteen/style.css b/internal/static/wp-content/themes/twentyfifteen/style.css similarity index 100% rename from static/wp-content/themes/twentyfifteen/style.css rename to internal/static/wp-content/themes/twentyfifteen/style.css diff --git a/static/wp-includes/css/dist/block-library/common-rtl.css b/internal/static/wp-includes/css/dist/block-library/common-rtl.css similarity index 100% rename from static/wp-includes/css/dist/block-library/common-rtl.css rename to internal/static/wp-includes/css/dist/block-library/common-rtl.css diff --git a/static/wp-includes/css/dist/block-library/common-rtl.min.css b/internal/static/wp-includes/css/dist/block-library/common-rtl.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/common-rtl.min.css rename to internal/static/wp-includes/css/dist/block-library/common-rtl.min.css diff --git a/static/wp-includes/css/dist/block-library/common.css b/internal/static/wp-includes/css/dist/block-library/common.css similarity index 100% rename from static/wp-includes/css/dist/block-library/common.css rename to internal/static/wp-includes/css/dist/block-library/common.css diff --git a/static/wp-includes/css/dist/block-library/common.min.css b/internal/static/wp-includes/css/dist/block-library/common.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/common.min.css rename to internal/static/wp-includes/css/dist/block-library/common.min.css diff --git a/static/wp-includes/css/dist/block-library/editor-rtl.css b/internal/static/wp-includes/css/dist/block-library/editor-rtl.css similarity index 100% rename from static/wp-includes/css/dist/block-library/editor-rtl.css rename to internal/static/wp-includes/css/dist/block-library/editor-rtl.css diff --git a/static/wp-includes/css/dist/block-library/editor-rtl.min.css b/internal/static/wp-includes/css/dist/block-library/editor-rtl.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/editor-rtl.min.css rename to internal/static/wp-includes/css/dist/block-library/editor-rtl.min.css diff --git a/static/wp-includes/css/dist/block-library/editor.css b/internal/static/wp-includes/css/dist/block-library/editor.css similarity index 100% rename from static/wp-includes/css/dist/block-library/editor.css rename to internal/static/wp-includes/css/dist/block-library/editor.css diff --git a/static/wp-includes/css/dist/block-library/editor.min.css b/internal/static/wp-includes/css/dist/block-library/editor.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/editor.min.css rename to internal/static/wp-includes/css/dist/block-library/editor.min.css diff --git a/static/wp-includes/css/dist/block-library/reset-rtl.css b/internal/static/wp-includes/css/dist/block-library/reset-rtl.css similarity index 100% rename from static/wp-includes/css/dist/block-library/reset-rtl.css rename to internal/static/wp-includes/css/dist/block-library/reset-rtl.css diff --git a/static/wp-includes/css/dist/block-library/reset-rtl.min.css b/internal/static/wp-includes/css/dist/block-library/reset-rtl.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/reset-rtl.min.css rename to internal/static/wp-includes/css/dist/block-library/reset-rtl.min.css diff --git a/static/wp-includes/css/dist/block-library/reset.css b/internal/static/wp-includes/css/dist/block-library/reset.css similarity index 100% rename from static/wp-includes/css/dist/block-library/reset.css rename to internal/static/wp-includes/css/dist/block-library/reset.css diff --git a/static/wp-includes/css/dist/block-library/reset.min.css b/internal/static/wp-includes/css/dist/block-library/reset.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/reset.min.css rename to internal/static/wp-includes/css/dist/block-library/reset.min.css diff --git a/static/wp-includes/css/dist/block-library/style-rtl.css b/internal/static/wp-includes/css/dist/block-library/style-rtl.css similarity index 100% rename from static/wp-includes/css/dist/block-library/style-rtl.css rename to internal/static/wp-includes/css/dist/block-library/style-rtl.css diff --git a/static/wp-includes/css/dist/block-library/style-rtl.min.css b/internal/static/wp-includes/css/dist/block-library/style-rtl.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/style-rtl.min.css rename to internal/static/wp-includes/css/dist/block-library/style-rtl.min.css diff --git a/static/wp-includes/css/dist/block-library/style.css b/internal/static/wp-includes/css/dist/block-library/style.css similarity index 100% rename from static/wp-includes/css/dist/block-library/style.css rename to internal/static/wp-includes/css/dist/block-library/style.css diff --git a/static/wp-includes/css/dist/block-library/style.min.css b/internal/static/wp-includes/css/dist/block-library/style.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/style.min.css rename to internal/static/wp-includes/css/dist/block-library/style.min.css diff --git a/static/wp-includes/css/dist/block-library/theme-rtl.css b/internal/static/wp-includes/css/dist/block-library/theme-rtl.css similarity index 100% rename from static/wp-includes/css/dist/block-library/theme-rtl.css rename to internal/static/wp-includes/css/dist/block-library/theme-rtl.css diff --git a/static/wp-includes/css/dist/block-library/theme-rtl.min.css b/internal/static/wp-includes/css/dist/block-library/theme-rtl.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/theme-rtl.min.css rename to internal/static/wp-includes/css/dist/block-library/theme-rtl.min.css diff --git a/static/wp-includes/css/dist/block-library/theme.css b/internal/static/wp-includes/css/dist/block-library/theme.css similarity index 100% rename from static/wp-includes/css/dist/block-library/theme.css rename to internal/static/wp-includes/css/dist/block-library/theme.css diff --git a/static/wp-includes/css/dist/block-library/theme.min.css b/internal/static/wp-includes/css/dist/block-library/theme.min.css similarity index 100% rename from static/wp-includes/css/dist/block-library/theme.min.css rename to internal/static/wp-includes/css/dist/block-library/theme.min.css diff --git a/static/wp-includes/css/googleapicss.css b/internal/static/wp-includes/css/googleapicss.css similarity index 100% rename from static/wp-includes/css/googleapicss.css rename to internal/static/wp-includes/css/googleapicss.css diff --git a/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyx615Mjs.woff2 b/internal/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyx615Mjs.woff2 similarity index 100% rename from static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyx615Mjs.woff2 rename to internal/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyx615Mjs.woff2 diff --git a/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyxq15Mjs.woff2 b/internal/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyxq15Mjs.woff2 similarity index 100% rename from static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyxq15Mjs.woff2 rename to internal/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyxq15Mjs.woff2 diff --git a/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyya15.woff2 b/internal/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyya15.woff2 similarity index 100% rename from static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyya15.woff2 rename to internal/static/wp-includes/fonts/QlddNThLqRwH-OJ1UHjlKENVzkWGVkL3GZQmAwLyya15.woff2 diff --git a/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFMWaCi_.woff2 b/internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFMWaCi_.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFMWaCi_.woff2 rename to internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFMWaCi_.woff2 diff --git a/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFQWaCi_.woff2 b/internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFQWaCi_.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFQWaCi_.woff2 rename to internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFQWaCi_.woff2 diff --git a/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFcWaA.woff2 b/internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFcWaA.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFcWaA.woff2 rename to internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFcWaA.woff2 diff --git a/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFgWaCi_.woff2 b/internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFgWaCi_.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFgWaCi_.woff2 rename to internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFgWaCi_.woff2 diff --git a/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFkWaCi_.woff2 b/internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFkWaCi_.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFkWaCi_.woff2 rename to internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFkWaCi_.woff2 diff --git a/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFoWaCi_.woff2 b/internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFoWaCi_.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFoWaCi_.woff2 rename to internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFoWaCi_.woff2 diff --git a/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFsWaCi_.woff2 b/internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFsWaCi_.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFsWaCi_.woff2 rename to internal/static/wp-includes/fonts/ga6Iaw1J5X9T9RW6j9bNfFsWaCi_.woff2 diff --git a/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZDC7TMQ.woff2 b/internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZDC7TMQ.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZDC7TMQ.woff2 rename to internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZDC7TMQ.woff2 diff --git a/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZTC7TMQ.woff2 b/internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZTC7TMQ.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZTC7TMQ.woff2 rename to internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZTC7TMQ.woff2 diff --git a/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZjC7TMQ.woff2 b/internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZjC7TMQ.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZjC7TMQ.woff2 rename to internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZjC7TMQ.woff2 diff --git a/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZzC7TMQ.woff2 b/internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZzC7TMQ.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZzC7TMQ.woff2 rename to internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImZzC7TMQ.woff2 diff --git a/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImaTC7TMQ.woff2 b/internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImaTC7TMQ.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImaTC7TMQ.woff2 rename to internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImaTC7TMQ.woff2 diff --git a/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImajC7.woff2 b/internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImajC7.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImajC7.woff2 rename to internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImajC7.woff2 diff --git a/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImbjC7TMQ.woff2 b/internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImbjC7TMQ.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImbjC7TMQ.woff2 rename to internal/static/wp-includes/fonts/ga6Kaw1J5X9T9RW6j9bNfFImbjC7TMQ.woff2 diff --git a/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfROecf1I.woff2 b/internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfROecf1I.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfROecf1I.woff2 rename to internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfROecf1I.woff2 diff --git a/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRSecf1I.woff2 b/internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRSecf1I.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRSecf1I.woff2 rename to internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRSecf1I.woff2 diff --git a/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfReecQ.woff2 b/internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfReecQ.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfReecQ.woff2 rename to internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfReecQ.woff2 diff --git a/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRiecf1I.woff2 b/internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRiecf1I.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRiecf1I.woff2 rename to internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRiecf1I.woff2 diff --git a/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRmecf1I.woff2 b/internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRmecf1I.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRmecf1I.woff2 rename to internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRmecf1I.woff2 diff --git a/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRqecf1I.woff2 b/internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRqecf1I.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRqecf1I.woff2 rename to internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRqecf1I.woff2 diff --git a/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRuecf1I.woff2 b/internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRuecf1I.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRuecf1I.woff2 rename to internal/static/wp-includes/fonts/ga6Law1J5X9T9RW6j9bNdOwzfRuecf1I.woff2 diff --git a/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuc-VM.woff2 b/internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuc-VM.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuc-VM.woff2 rename to internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuc-VM.woff2 diff --git a/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWucOVMCoY.woff2 b/internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWucOVMCoY.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWucOVMCoY.woff2 rename to internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWucOVMCoY.woff2 diff --git a/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWud-VMCoY.woff2 b/internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWud-VMCoY.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWud-VMCoY.woff2 rename to internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWud-VMCoY.woff2 diff --git a/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuf-VMCoY.woff2 b/internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuf-VMCoY.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuf-VMCoY.woff2 rename to internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWuf-VMCoY.woff2 diff --git a/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufOVMCoY.woff2 b/internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufOVMCoY.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufOVMCoY.woff2 rename to internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufOVMCoY.woff2 diff --git a/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufeVMCoY.woff2 b/internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufeVMCoY.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufeVMCoY.woff2 rename to internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufeVMCoY.woff2 diff --git a/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufuVMCoY.woff2 b/internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufuVMCoY.woff2 similarity index 100% rename from static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufuVMCoY.woff2 rename to internal/static/wp-includes/fonts/ga6Vaw1J5X9T9RW6j9bNfFIu0RWufuVMCoY.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr4TRAW_0.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr4TRAW_0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr4TRAW_0.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr4TRAW_0.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5DRAW_0.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5DRAW_0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5DRAW_0.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5DRAW_0.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5TRA.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5TRA.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5TRA.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5TRA.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5jRAW_0.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5jRAW_0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5jRAW_0.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr5jRAW_0.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6DRAW_0.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6DRAW_0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6DRAW_0.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6DRAW_0.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6TRAW_0.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6TRAW_0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6TRAW_0.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6TRAW_0.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6jRAW_0.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6jRAW_0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6jRAW_0.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6jRAW_0.woff2 diff --git a/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6zRAW_0.woff2 b/internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6zRAW_0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6zRAW_0.woff2 rename to internal/static/wp-includes/fonts/o-0IIpQlx3QUlC5A4PNr6zRAW_0.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVYNyB1Wk.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVYNyB1Wk.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVYNyB1Wk.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVYNyB1Wk.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZ9yB1Wk.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZ9yB1Wk.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZ9yB1Wk.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZ9yB1Wk.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZNyB.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZNyB.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZNyB.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZNyB.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZdyB1Wk.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZdyB1Wk.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZdyB1Wk.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVZdyB1Wk.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVa9yB1Wk.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVa9yB1Wk.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVa9yB1Wk.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVa9yB1Wk.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVaNyB1Wk.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVaNyB1Wk.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVaNyB1Wk.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVaNyB1Wk.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVadyB1Wk.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVadyB1Wk.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVadyB1Wk.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVadyB1Wk.woff2 diff --git a/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVatyB1Wk.woff2 b/internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVatyB1Wk.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVatyB1Wk.woff2 rename to internal/static/wp-includes/fonts/o-0NIpQlx3QUlC5A4PNjXhFVatyB1Wk.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARBQ_m87A.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARBQ_m87A.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARBQ_m87A.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARBQ_m87A.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARCQ_k.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARCQ_k.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARCQ_k.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARCQ_k.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARDQ_m87A.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARDQ_m87A.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARDQ_m87A.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARDQ_m87A.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARGQ_m87A.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARGQ_m87A.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARGQ_m87A.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARGQ_m87A.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARMQ_m87A.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARMQ_m87A.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARMQ_m87A.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARMQ_m87A.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARNQ_m87A.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARNQ_m87A.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARNQ_m87A.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARNQ_m87A.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4AROQ_m87A.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4AROQ_m87A.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4AROQ_m87A.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4AROQ_m87A.woff2 diff --git a/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARPQ_m87A.woff2 b/internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARPQ_m87A.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARPQ_m87A.woff2 rename to internal/static/wp-includes/fonts/o-0OIpQlx3QUlC5A4PNr4ARPQ_m87A.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyAzW1aPQ.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyAzW1aPQ.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyAzW1aPQ.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyAzW1aPQ.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyCzW1aPQ.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyCzW1aPQ.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyCzW1aPQ.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyCzW1aPQ.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyDzW0.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyDzW0.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyDzW0.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyDzW0.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyHzW1aPQ.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyHzW1aPQ.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyHzW1aPQ.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyHzW1aPQ.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyMzW1aPQ.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyMzW1aPQ.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyMzW1aPQ.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyMzW1aPQ.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyNzW1aPQ.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyNzW1aPQ.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyNzW1aPQ.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyNzW1aPQ.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyOzW1aPQ.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyOzW1aPQ.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyOzW1aPQ.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyOzW1aPQ.woff2 diff --git a/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyPzW1aPQ.woff2 b/internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyPzW1aPQ.woff2 similarity index 100% rename from static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyPzW1aPQ.woff2 rename to internal/static/wp-includes/fonts/o-0TIpQlx3QUlC5A4PNr4Az5ZuyPzW1aPQ.woff2 diff --git a/static/wp-includes/js/comment-reply.min.js b/internal/static/wp-includes/js/comment-reply.min.js similarity index 100% rename from static/wp-includes/js/comment-reply.min.js rename to internal/static/wp-includes/js/comment-reply.min.js diff --git a/static/wp-includes/js/jquery/jquery-migrate.min.js b/internal/static/wp-includes/js/jquery/jquery-migrate.min.js similarity index 100% rename from static/wp-includes/js/jquery/jquery-migrate.min.js rename to internal/static/wp-includes/js/jquery/jquery-migrate.min.js diff --git a/static/wp-includes/js/jquery/jquery.min.js b/internal/static/wp-includes/js/jquery/jquery.min.js similarity index 100% rename from static/wp-includes/js/jquery/jquery.min.js rename to internal/static/wp-includes/js/jquery/jquery.min.js diff --git a/static/wp-includes/js/wp-emoji-loader.min.js b/internal/static/wp-includes/js/wp-emoji-loader.min.js similarity index 100% rename from static/wp-includes/js/wp-emoji-loader.min.js rename to internal/static/wp-includes/js/wp-emoji-loader.min.js diff --git a/static/wp-includes/js/wp-emoji-release.min.js b/internal/static/wp-includes/js/wp-emoji-release.min.js similarity index 100% rename from static/wp-includes/js/wp-emoji-release.min.js rename to internal/static/wp-includes/js/wp-emoji-release.min.js diff --git a/templates/templatefs.go b/internal/templates/templatefs.go similarity index 100% rename from templates/templatefs.go rename to internal/templates/templatefs.go diff --git a/templates/twentyfifteen/layout/base.gohtml b/internal/templates/twentyfifteen/layout/base.gohtml similarity index 100% rename from templates/twentyfifteen/layout/base.gohtml rename to internal/templates/twentyfifteen/layout/base.gohtml diff --git a/templates/twentyfifteen/layout/empty.gohtml b/internal/templates/twentyfifteen/layout/empty.gohtml similarity index 100% rename from templates/twentyfifteen/layout/empty.gohtml rename to internal/templates/twentyfifteen/layout/empty.gohtml diff --git a/templates/twentyfifteen/layout/footer.gohtml b/internal/templates/twentyfifteen/layout/footer.gohtml similarity index 100% rename from templates/twentyfifteen/layout/footer.gohtml rename to internal/templates/twentyfifteen/layout/footer.gohtml diff --git a/templates/twentyfifteen/layout/head.gohtml b/internal/templates/twentyfifteen/layout/head.gohtml similarity index 100% rename from templates/twentyfifteen/layout/head.gohtml rename to internal/templates/twentyfifteen/layout/head.gohtml diff --git a/templates/twentyfifteen/layout/message.gohtml b/internal/templates/twentyfifteen/layout/message.gohtml similarity index 100% rename from templates/twentyfifteen/layout/message.gohtml rename to internal/templates/twentyfifteen/layout/message.gohtml diff --git a/templates/twentyfifteen/layout/pagination.gohtml b/internal/templates/twentyfifteen/layout/pagination.gohtml similarity index 100% rename from templates/twentyfifteen/layout/pagination.gohtml rename to internal/templates/twentyfifteen/layout/pagination.gohtml diff --git a/templates/twentyfifteen/layout/sidebar.gohtml b/internal/templates/twentyfifteen/layout/sidebar.gohtml similarity index 100% rename from templates/twentyfifteen/layout/sidebar.gohtml rename to internal/templates/twentyfifteen/layout/sidebar.gohtml diff --git a/templates/twentyfifteen/layout/svg.gohtml b/internal/templates/twentyfifteen/layout/svg.gohtml similarity index 100% rename from templates/twentyfifteen/layout/svg.gohtml rename to internal/templates/twentyfifteen/layout/svg.gohtml diff --git a/templates/twentyfifteen/posts/detail.gohtml b/internal/templates/twentyfifteen/posts/detail.gohtml similarity index 100% rename from templates/twentyfifteen/posts/detail.gohtml rename to internal/templates/twentyfifteen/posts/detail.gohtml diff --git a/templates/twentyfifteen/posts/index.gohtml b/internal/templates/twentyfifteen/posts/index.gohtml similarity index 100% rename from templates/twentyfifteen/posts/index.gohtml rename to internal/templates/twentyfifteen/posts/index.gohtml diff --git a/models/wp/wp_comments.go b/internal/wp/wp_comments.go similarity index 100% rename from models/wp/wp_comments.go rename to internal/wp/wp_comments.go diff --git a/models/wp/wp_options.go b/internal/wp/wp_options.go similarity index 100% rename from models/wp/wp_options.go rename to internal/wp/wp_options.go diff --git a/models/wp/wp_postmeta.go b/internal/wp/wp_postmeta.go similarity index 100% rename from models/wp/wp_postmeta.go rename to internal/wp/wp_postmeta.go diff --git a/models/wp/wp_posts.go b/internal/wp/wp_posts.go similarity index 100% rename from models/wp/wp_posts.go rename to internal/wp/wp_posts.go diff --git a/models/wp/wp_term_taxonomy.go b/internal/wp/wp_term_taxonomy.go similarity index 100% rename from models/wp/wp_term_taxonomy.go rename to internal/wp/wp_term_taxonomy.go diff --git a/models/wp/wp_terms.go b/internal/wp/wp_terms.go similarity index 100% rename from models/wp/wp_terms.go rename to internal/wp/wp_terms.go diff --git a/models/wp/wp_users.go b/internal/wp/wp_users.go similarity index 100% rename from models/wp/wp_users.go rename to internal/wp/wp_users.go diff --git a/config/wpconfig/options.go b/internal/wpconfig/options.go similarity index 94% rename from config/wpconfig/options.go rename to internal/wpconfig/options.go index ebb1de3..8f995dc 100644 --- a/config/wpconfig/options.go +++ b/internal/wpconfig/options.go @@ -2,8 +2,8 @@ package wpconfig import ( "context" + "github/fthvgb1/wp-go/internal/wp" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "github/fthvgb1/wp-go/safety" ) diff --git a/config/wpconfig/term.go b/internal/wpconfig/term.go similarity index 61% rename from config/wpconfig/term.go rename to internal/wpconfig/term.go index e0b5a2d..0190a05 100644 --- a/config/wpconfig/term.go +++ b/internal/wpconfig/term.go @@ -2,24 +2,24 @@ package wpconfig import ( "context" + wp2 "github/fthvgb1/wp-go/internal/wp" "github/fthvgb1/wp-go/models" - "github/fthvgb1/wp-go/models/wp" "github/fthvgb1/wp-go/safety" ) -var Terms safety.Map[uint64, wp.Terms] -var TermTaxonomies safety.Map[uint64, wp.TermTaxonomy] +var Terms safety.Map[uint64, wp2.Terms] +var TermTaxonomies safety.Map[uint64, wp2.TermTaxonomy] func InitTerms() (err error) { ctx := context.Background() - terms, err := models.SimpleFind[wp.Terms](ctx, nil, "*") + terms, err := models.SimpleFind[wp2.Terms](ctx, nil, "*") if err != nil { return err } for _, wpTerms := range terms { Terms.Store(wpTerms.TermId, wpTerms) } - termTax, err := models.SimpleFind[wp.TermTaxonomy](ctx, nil, "*") + termTax, err := models.SimpleFind[wp2.TermTaxonomy](ctx, nil, "*") if err != nil { return err } diff --git a/main.go b/main.go index 0cf8525..800b1c8 100644 --- a/main.go +++ b/main.go @@ -3,16 +3,16 @@ package main import ( "flag" "fmt" - "github/fthvgb1/wp-go/actions" - "github/fthvgb1/wp-go/actions/common" "github/fthvgb1/wp-go/config" - "github/fthvgb1/wp-go/config/wpconfig" "github/fthvgb1/wp-go/db" + "github/fthvgb1/wp-go/internal/actions" + "github/fthvgb1/wp-go/internal/actions/common" + "github/fthvgb1/wp-go/internal/route" + wpconfig2 "github/fthvgb1/wp-go/internal/wpconfig" "github/fthvgb1/wp-go/logs" "github/fthvgb1/wp-go/mail" "github/fthvgb1/wp-go/models" "github/fthvgb1/wp-go/plugins" - "github/fthvgb1/wp-go/route" "log" "math/rand" "os" @@ -60,11 +60,11 @@ func initConf(c string) (err error) { return } models.InitDB(db.NewSqlxDb(db.Db)) - err = wpconfig.InitOptions() + err = wpconfig2.InitOptions() if err != nil { return } - err = wpconfig.InitTerms() + err = wpconfig2.InitTerms() if err != nil { return } @@ -104,9 +104,9 @@ func reload() { }() err := config.InitConfig(confPath) logs.ErrPrintln(err, "获取配置文件失败", confPath) - err = wpconfig.InitOptions() + err = wpconfig2.InitOptions() logs.ErrPrintln(err, "获取网站设置WpOption失败") - err = wpconfig.InitTerms() + err = wpconfig2.InitTerms() logs.ErrPrintln(err, "获取WpTerms表失败") if middleWareReloadFn != nil { middleWareReloadFn() diff --git a/models/query_test.go b/models/query_test.go index 50b74bd..c594156 100644 --- a/models/query_test.go +++ b/models/query_test.go @@ -4,7 +4,7 @@ import ( "context" "github/fthvgb1/wp-go/config" "github/fthvgb1/wp-go/db" - "github/fthvgb1/wp-go/models/wp" + wp2 "github/fthvgb1/wp-go/internal/wp" "reflect" "testing" ) @@ -34,7 +34,7 @@ func TestFind(t *testing.T) { in [][]any } type posts struct { - wp.Posts + wp2.Posts N int `db:"n"` } tests := []struct { @@ -105,7 +105,7 @@ func TestFind(t *testing.T) { in: nil, }, wantR: func() []posts { - r, err := Select[posts](ctx, "select post_status,count(*) n from "+wp.Posts{}.Table()+" where ID<1000 group by post_status having n>1") + r, err := Select[posts](ctx, "select post_status,count(*) n from "+wp2.Posts{}.Table()+" where ID<1000 group by post_status having n>1") if err != nil { panic(err) } @@ -150,10 +150,10 @@ func TestFind(t *testing.T) { group: "a.post_author", order: SqlBuilder{{"n", "desc"}}, join: SqlBuilder{ - {"a", "left join", wp.Users{}.Table() + " b", "a.post_author=b.ID"}, + {"a", "left join", wp2.Users{}.Table() + " b", "a.post_author=b.ID"}, {"left join", "wp_term_relationships c", "a.Id=c.object_id"}, - {"left join", wp.TermTaxonomy{}.Table() + " d", "c.term_taxonomy_id=d.term_taxonomy_id"}, - {"left join", wp.Terms{}.Table() + " e", "d.term_id=e.term_id"}, + {"left join", wp2.TermTaxonomy{}.Table() + " d", "c.term_taxonomy_id=d.term_taxonomy_id"}, + {"left join", wp2.Terms{}.Table() + " e", "d.term_id=e.term_id"}, }, having: SqlBuilder{{"n", ">", "0", "int"}}, limit: 10, @@ -191,7 +191,7 @@ func TestFindOneById(t *testing.T) { tests := []struct { name string args args - want wp.Posts + want wp2.Posts wantErr bool }{ { @@ -199,8 +199,8 @@ func TestFindOneById(t *testing.T) { args: args{ 1, }, - want: func() wp.Posts { - r, err := Get[wp.Posts](ctx, "select * from "+wp.Posts{}.Table()+" where ID=?", 1) + want: func() wp2.Posts { + r, err := Get[wp2.Posts](ctx, "select * from "+wp2.Posts{}.Table()+" where ID=?", 1) if err != nil { panic(err) } @@ -211,7 +211,7 @@ func TestFindOneById(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := FindOneById[wp.Posts](ctx, tt.args.id) + got, err := FindOneById[wp2.Posts](ctx, tt.args.id) if (err != nil) != tt.wantErr { t.Errorf("FindOneById() error = %v, wantErr %v", err, tt.wantErr) return @@ -233,7 +233,7 @@ func TestFirstOne(t *testing.T) { tests := []struct { name string args args - want wp.Posts + want wp2.Posts wantErr bool }{ { @@ -245,8 +245,8 @@ func TestFirstOne(t *testing.T) { in: nil, }, wantErr: false, - want: func() wp.Posts { - r, err := Get[wp.Posts](ctx, "select * from "+wp.Posts{}.Table()+" where post_status='publish' order by ID desc limit 1") + want: func() wp2.Posts { + r, err := Get[wp2.Posts](ctx, "select * from "+wp2.Posts{}.Table()+" where post_status='publish' order by ID desc limit 1") if err != nil { panic(err) } @@ -256,7 +256,7 @@ func TestFirstOne(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := FirstOne[wp.Posts](ctx, tt.args.where, tt.args.fields, tt.args.order, tt.args.in...) + got, err := FirstOne[wp2.Posts](ctx, tt.args.where, tt.args.fields, tt.args.order, tt.args.in...) if (err != nil) != tt.wantErr { t.Errorf("FirstOne() error = %v, wantErr %v", err, tt.wantErr) return @@ -276,14 +276,14 @@ func TestGet(t *testing.T) { tests := []struct { name string args args - wantR wp.Posts + wantR wp2.Posts wantErr bool }{ {}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - gotR, err := Get[wp.Posts](ctx, tt.args.sql, tt.args.params...) + gotR, err := Get[wp2.Posts](ctx, tt.args.sql, tt.args.params...) if (err != nil) != tt.wantErr { t.Errorf("Get() error = %v, wantErr %v", err, tt.wantErr) return @@ -304,7 +304,7 @@ func TestLastOne(t *testing.T) { tests := []struct { name string args args - want wp.Posts + want wp2.Posts wantErr bool }{ { @@ -316,8 +316,8 @@ func TestLastOne(t *testing.T) { fields: "*", in: nil, }, - want: func() wp.Posts { - r, err := Get[wp.Posts](ctx, "select * from "+wp.Posts{}.Table()+" where post_status='publish' order by "+wp.Posts{}.PrimaryKey()+" desc limit 1") + want: func() wp2.Posts { + r, err := Get[wp2.Posts](ctx, "select * from "+wp2.Posts{}.Table()+" where post_status='publish' order by "+wp2.Posts{}.PrimaryKey()+" desc limit 1") if err != nil { panic(err) } @@ -327,7 +327,7 @@ func TestLastOne(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := LastOne[wp.Posts](ctx, tt.args.where, tt.args.fields, tt.args.in...) + got, err := LastOne[wp2.Posts](ctx, tt.args.where, tt.args.fields, tt.args.in...) if (err != nil) != tt.wantErr { t.Errorf("LastOne() error = %v, wantErr %v", err, tt.wantErr) return @@ -347,14 +347,14 @@ func TestSelect(t *testing.T) { tests := []struct { name string args args - want []wp.Posts + want []wp2.Posts wantErr bool }{ {}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := Select[wp.Posts](ctx, tt.args.sql, tt.args.params...) + got, err := Select[wp2.Posts](ctx, tt.args.sql, tt.args.params...) if (err != nil) != tt.wantErr { t.Errorf("Select() error = %v, wantErr %v", err, tt.wantErr) return @@ -375,14 +375,14 @@ func TestSimpleFind(t *testing.T) { tests := []struct { name string args args - want []wp.Posts + want []wp2.Posts wantErr bool }{ {}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got, err := SimpleFind[wp.Posts](ctx, tt.args.where, tt.args.fields, tt.args.in...) + got, err := SimpleFind[wp2.Posts](ctx, tt.args.where, tt.args.fields, tt.args.in...) if (err != nil) != tt.wantErr { t.Errorf("SimpleFind() error = %v, wantErr %v", err, tt.wantErr) return @@ -409,7 +409,7 @@ func TestSimplePagination(t *testing.T) { tests := []struct { name string args args - wantR []wp.Posts + wantR []wp2.Posts wantTotal int wantErr bool }{ @@ -417,7 +417,7 @@ func TestSimplePagination(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - gotR, gotTotal, err := SimplePagination[wp.Posts](ctx, tt.args.where, tt.args.fields, tt.args.group, tt.args.page, tt.args.pageSize, tt.args.order, tt.args.join, tt.args.having, tt.args.in...) + gotR, gotTotal, err := SimplePagination[wp2.Posts](ctx, tt.args.where, tt.args.fields, tt.args.group, tt.args.page, tt.args.pageSize, tt.args.order, tt.args.join, tt.args.having, tt.args.in...) if (err != nil) != tt.wantErr { t.Errorf("SimplePagination() error = %v, wantErr %v", err, tt.wantErr) return diff --git a/plugins/digest.go b/plugins/digest.go index bf5efa8..6b0785c 100644 --- a/plugins/digest.go +++ b/plugins/digest.go @@ -6,7 +6,7 @@ import ( "github/fthvgb1/wp-go/cache" "github/fthvgb1/wp-go/config" "github/fthvgb1/wp-go/helper" - "github/fthvgb1/wp-go/models/wp" + "github/fthvgb1/wp-go/internal/wp" "regexp" "strings" "time" diff --git a/plugins/posts.go b/plugins/posts.go index 188f1cf..261c758 100644 --- a/plugins/posts.go +++ b/plugins/posts.go @@ -2,7 +2,7 @@ package plugins import ( "github.com/gin-gonic/gin" - "github/fthvgb1/wp-go/models/wp" + "github/fthvgb1/wp-go/internal/wp" ) func NewPostPlugin(ctx *gin.Context, scene uint) *Plugin[wp.Posts] {