重构项目

This commit is contained in:
ExplodingDragon
2025-11-15 01:09:25 +08:00
parent d67dbf88ae
commit 3492dead8d
34 changed files with 715 additions and 444 deletions

View File

@@ -9,7 +9,6 @@ import (
type PageVFS struct {
backend Backend
client *http.Client
org string
repo string
@@ -18,14 +17,12 @@ type PageVFS struct {
// todo: 限制最大文件加载大小
func NewPageVFS(
client *http.Client,
backend Backend,
org string,
repo string,
commitID string,
) *PageVFS {
return &PageVFS{
client: client,
backend: backend,
org: org,
repo: repo,
@@ -34,7 +31,7 @@ func NewPageVFS(
}
func (p *PageVFS) NativeOpen(ctx context.Context, path string, headers http.Header) (*http.Response, error) {
return p.backend.Open(ctx, p.client, p.org, p.repo, p.commitID, path, headers)
return p.backend.Open(ctx, p.org, p.repo, p.commitID, path, headers)
}
func (p *PageVFS) Exists(ctx context.Context, path string) (bool, error) {