diff --git a/AGENTS.md b/AGENTS.md index 48d0ac3bf..5c21f0b6c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,7 +12,7 @@ go run ./cmd/memos --port 8081 # Start dev server go test ./... # Run all tests go test -v ./store/... # Run store tests (all 3 DB drivers via TestContainers) go test -v -race ./server/... # Run server tests with race detection -go test -v -race ./plugin/... # Run plugin tests with race detection +go test -v -race ./internal/... # Run internal package tests with race detection go test -v -run TestFoo ./pkg/... # Run a single test go mod tidy -go=1.26.1 # Match CI tidy check golangci-lint run # Lint (v2, config: .golangci.yaml) @@ -62,8 +62,8 @@ proto/ ├── store/ # Internal storage messages └── gen/ # Generated Go, TypeScript, OpenAPI -plugin/ # scheduler, cron, email, filter (CEL), webhook, - # markdown (Goldmark), httpgetter, idp (OAuth2), storage/s3 +internal/ # app-private packages: scheduler, cron, email, filter (CEL), + # webhook, markdown (Goldmark), httpgetter, idp (OAuth2), storage/s3 web/src/ ├── connect.ts # Connect RPC client + auth interceptor + token refresh @@ -98,7 +98,7 @@ web/src/ ## CI/CD -- **backend-tests.yml:** Go 1.26.1, `go mod tidy -go=1.26.1`, golangci-lint v2.11.3, tests parallelized by group (store, server, plugin, other) +- **backend-tests.yml:** Go 1.26.1, `go mod tidy -go=1.26.1`, golangci-lint v2.11.3, tests parallelized by group (store, server, internal, other) - **build-canary-image.yml:** Builds frontend with `pnpm release`, then publishes canary multi-arch container images for linux/amd64 and linux/arm64 - **frontend-tests.yml:** Node 24, pnpm 10, lint + build - **proto-linter.yml:** buf lint + format check diff --git a/cmd/memos/main.go b/cmd/memos/main.go index bf0a67373..71ea2d46b 100644 --- a/cmd/memos/main.go +++ b/cmd/memos/main.go @@ -15,7 +15,7 @@ import ( "github.com/usememos/memos/internal/profile" "github.com/usememos/memos/internal/version" - "github.com/usememos/memos/plugin/webhook" + "github.com/usememos/memos/internal/webhook" "github.com/usememos/memos/server" "github.com/usememos/memos/store" "github.com/usememos/memos/store/db" diff --git a/plugin/cron/README.md b/internal/cron/README.md similarity index 100% rename from plugin/cron/README.md rename to internal/cron/README.md diff --git a/plugin/cron/chain.go b/internal/cron/chain.go similarity index 100% rename from plugin/cron/chain.go rename to internal/cron/chain.go diff --git a/plugin/cron/chain_test.go b/internal/cron/chain_test.go similarity index 100% rename from plugin/cron/chain_test.go rename to internal/cron/chain_test.go diff --git a/plugin/cron/constantdelay.go b/internal/cron/constantdelay.go similarity index 100% rename from plugin/cron/constantdelay.go rename to internal/cron/constantdelay.go diff --git a/plugin/cron/constantdelay_test.go b/internal/cron/constantdelay_test.go similarity index 100% rename from plugin/cron/constantdelay_test.go rename to internal/cron/constantdelay_test.go diff --git a/plugin/cron/cron.go b/internal/cron/cron.go similarity index 100% rename from plugin/cron/cron.go rename to internal/cron/cron.go diff --git a/plugin/cron/cron_test.go b/internal/cron/cron_test.go similarity index 100% rename from plugin/cron/cron_test.go rename to internal/cron/cron_test.go diff --git a/plugin/cron/logger.go b/internal/cron/logger.go similarity index 100% rename from plugin/cron/logger.go rename to internal/cron/logger.go diff --git a/plugin/cron/option.go b/internal/cron/option.go similarity index 100% rename from plugin/cron/option.go rename to internal/cron/option.go diff --git a/plugin/cron/option_test.go b/internal/cron/option_test.go similarity index 100% rename from plugin/cron/option_test.go rename to internal/cron/option_test.go diff --git a/plugin/cron/parser.go b/internal/cron/parser.go similarity index 100% rename from plugin/cron/parser.go rename to internal/cron/parser.go diff --git a/plugin/cron/parser_test.go b/internal/cron/parser_test.go similarity index 100% rename from plugin/cron/parser_test.go rename to internal/cron/parser_test.go diff --git a/plugin/cron/spec.go b/internal/cron/spec.go similarity index 100% rename from plugin/cron/spec.go rename to internal/cron/spec.go diff --git a/plugin/cron/spec_test.go b/internal/cron/spec_test.go similarity index 100% rename from plugin/cron/spec_test.go rename to internal/cron/spec_test.go diff --git a/plugin/email/README.md b/internal/email/README.md similarity index 96% rename from plugin/email/README.md rename to internal/email/README.md index d64a89f15..7e10f3a0e 100644 --- a/plugin/email/README.md +++ b/internal/email/README.md @@ -23,7 +23,7 @@ This plugin provides a simple, reliable email sending interface following indust ### 1. Configure SMTP Settings ```go -import "github.com/usememos/memos/plugin/email" +import "github.com/usememos/memos/internal/email" config := &email.Config{ SMTPHost: "smtp.gmail.com", @@ -191,13 +191,13 @@ email.Send(config, message) ```bash # All tests -go test ./plugin/email/... -v +go test ./internal/email/... -v # With coverage -go test ./plugin/email/... -v -cover +go test ./internal/email/... -v -cover # With race detector -go test ./plugin/email/... -race +go test ./internal/email/... -race ``` ### Manual Testing @@ -209,7 +209,7 @@ package main import ( "log" - "github.com/usememos/memos/plugin/email" + "github.com/usememos/memos/internal/email" ) func main() { @@ -466,7 +466,7 @@ Sends email using the client's configuration. ## Architecture ``` -plugin/email/ +internal/email/ ├── config.go # SMTP configuration types ├── message.go # Email message types and formatting ├── client.go # SMTP client implementation @@ -481,12 +481,12 @@ Part of the Memos project. See main repository for license details. ## Contributing -This plugin follows the Memos contribution guidelines. Please ensure: +This package follows the Memos contribution guidelines. Please ensure: 1. All code is tested (TDD approach) -2. Tests pass: `go test ./plugin/email/... -v` -3. Code is formatted: `go fmt ./plugin/email/...` -4. No linting errors: `golangci-lint run ./plugin/email/...` +2. Tests pass: `go test ./internal/email/... -v` +3. Code is formatted: `go fmt ./internal/email/...` +4. No linting errors: `golangci-lint run ./internal/email/...` ## Support diff --git a/plugin/email/client.go b/internal/email/client.go similarity index 100% rename from plugin/email/client.go rename to internal/email/client.go diff --git a/plugin/email/client_test.go b/internal/email/client_test.go similarity index 100% rename from plugin/email/client_test.go rename to internal/email/client_test.go diff --git a/plugin/email/config.go b/internal/email/config.go similarity index 100% rename from plugin/email/config.go rename to internal/email/config.go diff --git a/plugin/email/config_test.go b/internal/email/config_test.go similarity index 100% rename from plugin/email/config_test.go rename to internal/email/config_test.go diff --git a/plugin/email/doc.go b/internal/email/doc.go similarity index 100% rename from plugin/email/doc.go rename to internal/email/doc.go diff --git a/plugin/email/email.go b/internal/email/email.go similarity index 100% rename from plugin/email/email.go rename to internal/email/email.go diff --git a/plugin/email/email_test.go b/internal/email/email_test.go similarity index 100% rename from plugin/email/email_test.go rename to internal/email/email_test.go diff --git a/plugin/email/message.go b/internal/email/message.go similarity index 100% rename from plugin/email/message.go rename to internal/email/message.go diff --git a/plugin/email/message_test.go b/internal/email/message_test.go similarity index 100% rename from plugin/email/message_test.go rename to internal/email/message_test.go diff --git a/plugin/filter/MAINTENANCE.md b/internal/filter/MAINTENANCE.md similarity index 100% rename from plugin/filter/MAINTENANCE.md rename to internal/filter/MAINTENANCE.md diff --git a/plugin/filter/README.md b/internal/filter/README.md similarity index 100% rename from plugin/filter/README.md rename to internal/filter/README.md diff --git a/plugin/filter/engine.go b/internal/filter/engine.go similarity index 100% rename from plugin/filter/engine.go rename to internal/filter/engine.go diff --git a/plugin/filter/engine_test.go b/internal/filter/engine_test.go similarity index 100% rename from plugin/filter/engine_test.go rename to internal/filter/engine_test.go diff --git a/plugin/filter/helpers.go b/internal/filter/helpers.go similarity index 100% rename from plugin/filter/helpers.go rename to internal/filter/helpers.go diff --git a/plugin/filter/ir.go b/internal/filter/ir.go similarity index 100% rename from plugin/filter/ir.go rename to internal/filter/ir.go diff --git a/plugin/filter/parser.go b/internal/filter/parser.go similarity index 100% rename from plugin/filter/parser.go rename to internal/filter/parser.go diff --git a/plugin/filter/render.go b/internal/filter/render.go similarity index 100% rename from plugin/filter/render.go rename to internal/filter/render.go diff --git a/plugin/filter/schema.go b/internal/filter/schema.go similarity index 100% rename from plugin/filter/schema.go rename to internal/filter/schema.go diff --git a/plugin/httpgetter/html_meta.go b/internal/httpgetter/html_meta.go similarity index 100% rename from plugin/httpgetter/html_meta.go rename to internal/httpgetter/html_meta.go diff --git a/plugin/httpgetter/html_meta_test.go b/internal/httpgetter/html_meta_test.go similarity index 100% rename from plugin/httpgetter/html_meta_test.go rename to internal/httpgetter/html_meta_test.go diff --git a/plugin/httpgetter/http_getter.go b/internal/httpgetter/http_getter.go similarity index 100% rename from plugin/httpgetter/http_getter.go rename to internal/httpgetter/http_getter.go diff --git a/plugin/httpgetter/image.go b/internal/httpgetter/image.go similarity index 100% rename from plugin/httpgetter/image.go rename to internal/httpgetter/image.go diff --git a/plugin/httpgetter/util.go b/internal/httpgetter/util.go similarity index 100% rename from plugin/httpgetter/util.go rename to internal/httpgetter/util.go diff --git a/plugin/idp/idp.go b/internal/idp/idp.go similarity index 100% rename from plugin/idp/idp.go rename to internal/idp/idp.go diff --git a/plugin/idp/oauth2/oauth2.go b/internal/idp/oauth2/oauth2.go similarity index 97% rename from plugin/idp/oauth2/oauth2.go rename to internal/idp/oauth2/oauth2.go index 4ab1d12bc..8354024a5 100644 --- a/plugin/idp/oauth2/oauth2.go +++ b/internal/idp/oauth2/oauth2.go @@ -1,4 +1,4 @@ -// Package oauth2 is the plugin for OAuth2 Identity Provider. +// Package oauth2 implements the OAuth2 identity provider integration. package oauth2 import ( @@ -12,7 +12,7 @@ import ( "github.com/pkg/errors" "golang.org/x/oauth2" - "github.com/usememos/memos/plugin/idp" + "github.com/usememos/memos/internal/idp" storepb "github.com/usememos/memos/proto/gen/store" ) diff --git a/plugin/idp/oauth2/oauth2_test.go b/internal/idp/oauth2/oauth2_test.go similarity index 99% rename from plugin/idp/oauth2/oauth2_test.go rename to internal/idp/oauth2/oauth2_test.go index cd7fd640f..c7039f5bd 100644 --- a/plugin/idp/oauth2/oauth2_test.go +++ b/internal/idp/oauth2/oauth2_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/usememos/memos/plugin/idp" + "github.com/usememos/memos/internal/idp" storepb "github.com/usememos/memos/proto/gen/store" ) diff --git a/plugin/markdown/ast/tag.go b/internal/markdown/ast/tag.go similarity index 100% rename from plugin/markdown/ast/tag.go rename to internal/markdown/ast/tag.go diff --git a/plugin/markdown/extensions/tag.go b/internal/markdown/extensions/tag.go similarity index 89% rename from plugin/markdown/extensions/tag.go rename to internal/markdown/extensions/tag.go index 9b04955ed..859bc712f 100644 --- a/plugin/markdown/extensions/tag.go +++ b/internal/markdown/extensions/tag.go @@ -5,7 +5,7 @@ import ( "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/util" - mparser "github.com/usememos/memos/plugin/markdown/parser" + mparser "github.com/usememos/memos/internal/markdown/parser" ) type tagExtension struct{} diff --git a/plugin/markdown/markdown.go b/internal/markdown/markdown.go similarity index 98% rename from plugin/markdown/markdown.go rename to internal/markdown/markdown.go index 189097104..9ec3dfb2e 100644 --- a/plugin/markdown/markdown.go +++ b/internal/markdown/markdown.go @@ -11,9 +11,9 @@ import ( "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/text" - mast "github.com/usememos/memos/plugin/markdown/ast" - "github.com/usememos/memos/plugin/markdown/extensions" - "github.com/usememos/memos/plugin/markdown/renderer" + mast "github.com/usememos/memos/internal/markdown/ast" + "github.com/usememos/memos/internal/markdown/extensions" + "github.com/usememos/memos/internal/markdown/renderer" storepb "github.com/usememos/memos/proto/gen/store" ) diff --git a/plugin/markdown/markdown_test.go b/internal/markdown/markdown_test.go similarity index 100% rename from plugin/markdown/markdown_test.go rename to internal/markdown/markdown_test.go diff --git a/plugin/markdown/parser/tag.go b/internal/markdown/parser/tag.go similarity index 98% rename from plugin/markdown/parser/tag.go rename to internal/markdown/parser/tag.go index bc46280ff..339e65661 100644 --- a/plugin/markdown/parser/tag.go +++ b/internal/markdown/parser/tag.go @@ -8,7 +8,7 @@ import ( "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/text" - mast "github.com/usememos/memos/plugin/markdown/ast" + mast "github.com/usememos/memos/internal/markdown/ast" ) const ( diff --git a/plugin/markdown/parser/tag_test.go b/internal/markdown/parser/tag_test.go similarity index 99% rename from plugin/markdown/parser/tag_test.go rename to internal/markdown/parser/tag_test.go index ecb41f577..a108d85bf 100644 --- a/plugin/markdown/parser/tag_test.go +++ b/internal/markdown/parser/tag_test.go @@ -8,7 +8,7 @@ import ( "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/text" - mast "github.com/usememos/memos/plugin/markdown/ast" + mast "github.com/usememos/memos/internal/markdown/ast" ) func TestTagParser(t *testing.T) { diff --git a/plugin/markdown/renderer/markdown_renderer.go b/internal/markdown/renderer/markdown_renderer.go similarity index 99% rename from plugin/markdown/renderer/markdown_renderer.go rename to internal/markdown/renderer/markdown_renderer.go index 9ba5215fb..85a1eef89 100644 --- a/plugin/markdown/renderer/markdown_renderer.go +++ b/internal/markdown/renderer/markdown_renderer.go @@ -8,7 +8,7 @@ import ( gast "github.com/yuin/goldmark/ast" east "github.com/yuin/goldmark/extension/ast" - mast "github.com/usememos/memos/plugin/markdown/ast" + mast "github.com/usememos/memos/internal/markdown/ast" ) // MarkdownRenderer renders goldmark AST back to markdown text. diff --git a/plugin/markdown/renderer/markdown_renderer_test.go b/internal/markdown/renderer/markdown_renderer_test.go similarity index 98% rename from plugin/markdown/renderer/markdown_renderer_test.go rename to internal/markdown/renderer/markdown_renderer_test.go index 17aac75af..24eb4653e 100644 --- a/plugin/markdown/renderer/markdown_renderer_test.go +++ b/internal/markdown/renderer/markdown_renderer_test.go @@ -10,7 +10,7 @@ import ( "github.com/yuin/goldmark/parser" "github.com/yuin/goldmark/text" - "github.com/usememos/memos/plugin/markdown/extensions" + "github.com/usememos/memos/internal/markdown/extensions" ) func TestMarkdownRenderer(t *testing.T) { diff --git a/plugin/scheduler/README.md b/internal/scheduler/README.md similarity index 99% rename from plugin/scheduler/README.md rename to internal/scheduler/README.md index 72e5c1e12..ae065580e 100644 --- a/plugin/scheduler/README.md +++ b/internal/scheduler/README.md @@ -24,7 +24,7 @@ package main import ( "context" "fmt" - "github.com/usememos/memos/plugin/scheduler" + "github.com/usememos/memos/internal/scheduler" ) func main() { diff --git a/plugin/scheduler/doc.go b/internal/scheduler/doc.go similarity index 100% rename from plugin/scheduler/doc.go rename to internal/scheduler/doc.go diff --git a/plugin/scheduler/example_test.go b/internal/scheduler/example_test.go similarity index 98% rename from plugin/scheduler/example_test.go rename to internal/scheduler/example_test.go index b557eb431..9f12ac5e1 100644 --- a/plugin/scheduler/example_test.go +++ b/internal/scheduler/example_test.go @@ -7,7 +7,7 @@ import ( "os" "time" - "github.com/usememos/memos/plugin/scheduler" + "github.com/usememos/memos/internal/scheduler" ) // Example demonstrates basic scheduler usage. diff --git a/plugin/scheduler/integration_test.go b/internal/scheduler/integration_test.go similarity index 99% rename from plugin/scheduler/integration_test.go rename to internal/scheduler/integration_test.go index a8e5b101a..92c469f2c 100644 --- a/plugin/scheduler/integration_test.go +++ b/internal/scheduler/integration_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/usememos/memos/plugin/scheduler" + "github.com/usememos/memos/internal/scheduler" ) // TestRealWorldScenario tests a realistic multi-job scenario. diff --git a/plugin/scheduler/job.go b/internal/scheduler/job.go similarity index 100% rename from plugin/scheduler/job.go rename to internal/scheduler/job.go diff --git a/plugin/scheduler/job_test.go b/internal/scheduler/job_test.go similarity index 100% rename from plugin/scheduler/job_test.go rename to internal/scheduler/job_test.go diff --git a/plugin/scheduler/middleware.go b/internal/scheduler/middleware.go similarity index 100% rename from plugin/scheduler/middleware.go rename to internal/scheduler/middleware.go diff --git a/plugin/scheduler/middleware_test.go b/internal/scheduler/middleware_test.go similarity index 100% rename from plugin/scheduler/middleware_test.go rename to internal/scheduler/middleware_test.go diff --git a/plugin/scheduler/parser.go b/internal/scheduler/parser.go similarity index 100% rename from plugin/scheduler/parser.go rename to internal/scheduler/parser.go diff --git a/plugin/scheduler/parser_test.go b/internal/scheduler/parser_test.go similarity index 100% rename from plugin/scheduler/parser_test.go rename to internal/scheduler/parser_test.go diff --git a/plugin/scheduler/scheduler.go b/internal/scheduler/scheduler.go similarity index 100% rename from plugin/scheduler/scheduler.go rename to internal/scheduler/scheduler.go diff --git a/plugin/scheduler/scheduler_test.go b/internal/scheduler/scheduler_test.go similarity index 100% rename from plugin/scheduler/scheduler_test.go rename to internal/scheduler/scheduler_test.go diff --git a/plugin/storage/s3/s3.go b/internal/storage/s3/s3.go similarity index 100% rename from plugin/storage/s3/s3.go rename to internal/storage/s3/s3.go diff --git a/plugin/webhook/validate.go b/internal/webhook/validate.go similarity index 100% rename from plugin/webhook/validate.go rename to internal/webhook/validate.go diff --git a/plugin/webhook/webhook.go b/internal/webhook/webhook.go similarity index 100% rename from plugin/webhook/webhook.go rename to internal/webhook/webhook.go diff --git a/plugin/webhook/webhook_test.go b/internal/webhook/webhook_test.go similarity index 100% rename from plugin/webhook/webhook_test.go rename to internal/webhook/webhook_test.go diff --git a/server/router/api/v1/attachment_service.go b/server/router/api/v1/attachment_service.go index f895f128d..a6b029dec 100644 --- a/server/router/api/v1/attachment_service.go +++ b/server/router/api/v1/attachment_service.go @@ -22,11 +22,11 @@ import ( "google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/timestamppb" + "github.com/usememos/memos/internal/filter" "github.com/usememos/memos/internal/motionphoto" "github.com/usememos/memos/internal/profile" + "github.com/usememos/memos/internal/storage/s3" "github.com/usememos/memos/internal/util" - "github.com/usememos/memos/plugin/filter" - "github.com/usememos/memos/plugin/storage/s3" v1pb "github.com/usememos/memos/proto/gen/api/v1" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" diff --git a/server/router/api/v1/auth_service.go b/server/router/api/v1/auth_service.go index 8f6b86310..4c3196695 100644 --- a/server/router/api/v1/auth_service.go +++ b/server/router/api/v1/auth_service.go @@ -16,9 +16,9 @@ import ( "google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/timestamppb" + "github.com/usememos/memos/internal/idp" + "github.com/usememos/memos/internal/idp/oauth2" "github.com/usememos/memos/internal/util" - "github.com/usememos/memos/plugin/idp" - "github.com/usememos/memos/plugin/idp/oauth2" v1pb "github.com/usememos/memos/proto/gen/api/v1" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/server/auth" diff --git a/server/router/api/v1/memo_service.go b/server/router/api/v1/memo_service.go index 3e6012ed9..e3946b783 100644 --- a/server/router/api/v1/memo_service.go +++ b/server/router/api/v1/memo_service.go @@ -13,7 +13,7 @@ import ( "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/emptypb" - "github.com/usememos/memos/plugin/webhook" + "github.com/usememos/memos/internal/webhook" v1pb "github.com/usememos/memos/proto/gen/api/v1" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/server/runner/memopayload" diff --git a/server/router/api/v1/shortcut_service.go b/server/router/api/v1/shortcut_service.go index f19263739..64b439ec6 100644 --- a/server/router/api/v1/shortcut_service.go +++ b/server/router/api/v1/shortcut_service.go @@ -10,8 +10,8 @@ import ( "google.golang.org/grpc/status" "google.golang.org/protobuf/types/known/emptypb" + "github.com/usememos/memos/internal/filter" "github.com/usememos/memos/internal/util" - "github.com/usememos/memos/plugin/filter" v1pb "github.com/usememos/memos/proto/gen/api/v1" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" diff --git a/server/router/api/v1/test/test_helper.go b/server/router/api/v1/test/test_helper.go index 94b42b688..ccd369328 100644 --- a/server/router/api/v1/test/test_helper.go +++ b/server/router/api/v1/test/test_helper.go @@ -4,8 +4,8 @@ import ( "context" "testing" + "github.com/usememos/memos/internal/markdown" "github.com/usememos/memos/internal/profile" - "github.com/usememos/memos/plugin/markdown" "github.com/usememos/memos/server/auth" apiv1 "github.com/usememos/memos/server/router/api/v1" "github.com/usememos/memos/store" diff --git a/server/router/api/v1/user_service.go b/server/router/api/v1/user_service.go index 5d27dff40..241306cd2 100644 --- a/server/router/api/v1/user_service.go +++ b/server/router/api/v1/user_service.go @@ -22,7 +22,7 @@ import ( "github.com/usememos/memos/internal/base" "github.com/usememos/memos/internal/util" - "github.com/usememos/memos/plugin/webhook" + "github.com/usememos/memos/internal/webhook" v1pb "github.com/usememos/memos/proto/gen/api/v1" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/server/auth" diff --git a/server/router/api/v1/v1.go b/server/router/api/v1/v1.go index cb0f0a289..ef2d5cf9c 100644 --- a/server/router/api/v1/v1.go +++ b/server/router/api/v1/v1.go @@ -10,8 +10,8 @@ import ( "github.com/labstack/echo/v5/middleware" "golang.org/x/sync/semaphore" + "github.com/usememos/memos/internal/markdown" "github.com/usememos/memos/internal/profile" - "github.com/usememos/memos/plugin/markdown" v1pb "github.com/usememos/memos/proto/gen/api/v1" "github.com/usememos/memos/server/auth" "github.com/usememos/memos/store" diff --git a/server/router/fileserver/README.md b/server/router/fileserver/README.md index b0ad78dea..0b87ef10e 100644 --- a/server/router/fileserver/README.md +++ b/server/router/fileserver/README.md @@ -193,7 +193,7 @@ Parses data URI to extract MIME type and base64 data. - `server/auth` - Authentication utilities - `store` - Database operations - `internal/profile` - Server configuration -- `plugin/storage/s3` - S3 storage client +- `internal/storage/s3` - S3 storage client ## Configuration diff --git a/server/router/fileserver/fileserver.go b/server/router/fileserver/fileserver.go index d3143b962..4739df885 100644 --- a/server/router/fileserver/fileserver.go +++ b/server/router/fileserver/fileserver.go @@ -21,7 +21,7 @@ import ( "github.com/usememos/memos/internal/motionphoto" "github.com/usememos/memos/internal/profile" - "github.com/usememos/memos/plugin/storage/s3" + "github.com/usememos/memos/internal/storage/s3" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/server/auth" "github.com/usememos/memos/store" diff --git a/server/router/fileserver/fileserver_test.go b/server/router/fileserver/fileserver_test.go index c930775e2..15d9052c3 100644 --- a/server/router/fileserver/fileserver_test.go +++ b/server/router/fileserver/fileserver_test.go @@ -11,9 +11,9 @@ import ( "github.com/labstack/echo/v5" "github.com/stretchr/testify/require" + "github.com/usememos/memos/internal/markdown" "github.com/usememos/memos/internal/profile" "github.com/usememos/memos/internal/testutil" - "github.com/usememos/memos/plugin/markdown" apiv1 "github.com/usememos/memos/proto/gen/api/v1" "github.com/usememos/memos/server/auth" apiv1service "github.com/usememos/memos/server/router/api/v1" diff --git a/server/router/rss/rss.go b/server/router/rss/rss.go index 863ac4ecd..472ddfed5 100644 --- a/server/router/rss/rss.go +++ b/server/router/rss/rss.go @@ -14,8 +14,8 @@ import ( "github.com/gorilla/feeds" "github.com/labstack/echo/v5" + "github.com/usememos/memos/internal/markdown" "github.com/usememos/memos/internal/profile" - "github.com/usememos/memos/plugin/markdown" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/server/runner/memopayload/runner.go b/server/runner/memopayload/runner.go index 4e262da70..0db75dc49 100644 --- a/server/runner/memopayload/runner.go +++ b/server/runner/memopayload/runner.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" - "github.com/usememos/memos/plugin/markdown" + "github.com/usememos/memos/internal/markdown" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/server/runner/s3presign/runner.go b/server/runner/s3presign/runner.go index f8df43f25..a18ede22a 100644 --- a/server/runner/s3presign/runner.go +++ b/server/runner/s3presign/runner.go @@ -7,7 +7,7 @@ import ( "google.golang.org/protobuf/types/known/timestamppb" - "github.com/usememos/memos/plugin/storage/s3" + "github.com/usememos/memos/internal/storage/s3" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/store/attachment.go b/store/attachment.go index a237dc4b6..08b6233e8 100644 --- a/store/attachment.go +++ b/store/attachment.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" "github.com/usememos/memos/internal/base" - "github.com/usememos/memos/plugin/storage/s3" + "github.com/usememos/memos/internal/storage/s3" storepb "github.com/usememos/memos/proto/gen/store" ) diff --git a/store/db/mysql/attachment.go b/store/db/mysql/attachment.go index d445ec745..e4da17890 100644 --- a/store/db/mysql/attachment.go +++ b/store/db/mysql/attachment.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/store/db/mysql/memo.go b/store/db/mysql/memo.go index d5f50837e..1f5f1b61c 100644 --- a/store/db/mysql/memo.go +++ b/store/db/mysql/memo.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/store/db/mysql/memo_relation.go b/store/db/mysql/memo_relation.go index 5b8c8391a..9d40f388d 100644 --- a/store/db/mysql/memo_relation.go +++ b/store/db/mysql/memo_relation.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" "github.com/usememos/memos/store" ) diff --git a/store/db/postgres/attachment.go b/store/db/postgres/attachment.go index e779adae0..20a1f1b3a 100644 --- a/store/db/postgres/attachment.go +++ b/store/db/postgres/attachment.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/store/db/postgres/memo.go b/store/db/postgres/memo.go index d5101de2a..973b637c5 100644 --- a/store/db/postgres/memo.go +++ b/store/db/postgres/memo.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/store/db/postgres/memo_relation.go b/store/db/postgres/memo_relation.go index c22c5c786..cbac24353 100644 --- a/store/db/postgres/memo_relation.go +++ b/store/db/postgres/memo_relation.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" "github.com/usememos/memos/store" ) diff --git a/store/db/sqlite/attachment.go b/store/db/sqlite/attachment.go index 5f9c9112b..4194e2837 100644 --- a/store/db/sqlite/attachment.go +++ b/store/db/sqlite/attachment.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/store/db/sqlite/memo.go b/store/db/sqlite/memo.go index 874b0d6df..1d1ac6861 100644 --- a/store/db/sqlite/memo.go +++ b/store/db/sqlite/memo.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" "google.golang.org/protobuf/encoding/protojson" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" storepb "github.com/usememos/memos/proto/gen/store" "github.com/usememos/memos/store" ) diff --git a/store/db/sqlite/memo_relation.go b/store/db/sqlite/memo_relation.go index f65d70118..41be40cbe 100644 --- a/store/db/sqlite/memo_relation.go +++ b/store/db/sqlite/memo_relation.go @@ -5,7 +5,7 @@ import ( "fmt" "strings" - "github.com/usememos/memos/plugin/filter" + "github.com/usememos/memos/internal/filter" "github.com/usememos/memos/store" )