WeKnora/internal/storageurl
lyingbug a6926fc912 refactor(storage): extract storage reference URL rewriting into internal/storageurl
The IM channels rewrite resource:// and provider:// references into loadable
HTTP URLs because IM clients cannot attach WeKnora credentials to an image
fetch. That logic was private to internal/im, so no other surface could reuse
it.

Move the reference pattern, HTTP-result guard, tenant-aware storage backend
resolver and streaming holdback helpers into internal/storageurl, and add a
Rewriter that memoises resolutions (a resource:// handle costs one access-grant
row per resolution). internal/im now delegates; behaviour is unchanged.

Co-authored-by: lyingbug <lyingbug@users.noreply.github.com>
2026-08-05 14:42:51 +08:00
..
mode.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00
resolver.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00
storageurl.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00
storageurl_test.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00
stream.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00
stream_test.go refactor(storage): extract storage reference URL rewriting into internal/storageurl 2026-08-05 14:42:51 +08:00