Commit d51ab87
Eric Bower
·
2026-03-28 21:06:26 -0400 EDT
parent b229935
refactor: move shared/storage to storage
31 files changed,
+19,
-21
+0,
-2
| ... | ... | @@ -14,7 +14,5 @@ __debug_bin | |
| 14 | 14 | .bin | |
| 15 | 15 | /public/ | |
| 16 | 16 | .aider* | |
| 17 | - | ssh | |
| 18 | - | web | |
| 19 | 17 | .beads/ | |
| 20 | 18 | .vg/ |
+1,
-1
| ... | ... | @@ -7,7 +7,7 @@ import ( | |
| 7 | 7 | "github.com/picosh/pico/pkg/apps/pgs" | |
| 8 | 8 | pgsdb "github.com/picosh/pico/pkg/apps/pgs/db" | |
| 9 | 9 | "github.com/picosh/pico/pkg/shared" | |
| 10 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 10 | + | "github.com/picosh/pico/pkg/storage" | |
| 11 | 11 | ) | |
| 12 | 12 | ||
| 13 | 13 | func main() { |
+1,
-1
| ... | ... | @@ -7,7 +7,7 @@ import ( | |
| 7 | 7 | "github.com/picosh/pico/pkg/apps/pgs" | |
| 8 | 8 | pgsdb "github.com/picosh/pico/pkg/apps/pgs/db" | |
| 9 | 9 | "github.com/picosh/pico/pkg/shared" | |
| 10 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 10 | + | "github.com/picosh/pico/pkg/storage" | |
| 11 | 11 | "golang.org/x/crypto/ssh" | |
| 12 | 12 | ) | |
| 13 | 13 |
+1,
-1
| ... | ... | @@ -7,7 +7,7 @@ import ( | |
| 7 | 7 | "github.com/picosh/pico/pkg/apps/pgs" | |
| 8 | 8 | pgsdb "github.com/picosh/pico/pkg/apps/pgs/db" | |
| 9 | 9 | "github.com/picosh/pico/pkg/shared" | |
| 10 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 10 | + | "github.com/picosh/pico/pkg/storage" | |
| 11 | 11 | ) | |
| 12 | 12 | ||
| 13 | 13 | func main() { |
+1,
-1
| ... | ... | @@ -8,7 +8,7 @@ import ( | |
| 8 | 8 | "testing" | |
| 9 | 9 | ||
| 10 | 10 | "github.com/picosh/pico/pkg/shared" | |
| 11 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 11 | + | "github.com/picosh/pico/pkg/storage" | |
| 12 | 12 | ) | |
| 13 | 13 | ||
| 14 | 14 | func TestPrivateProjectDeniesWebAccess(t *testing.T) { |
+1,
-1
| ... | ... | @@ -14,7 +14,7 @@ import ( | |
| 14 | 14 | pgsdb "github.com/picosh/pico/pkg/apps/pgs/db" | |
| 15 | 15 | "github.com/picosh/pico/pkg/db" | |
| 16 | 16 | "github.com/picosh/pico/pkg/shared" | |
| 17 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 17 | + | "github.com/picosh/pico/pkg/storage" | |
| 18 | 18 | ) | |
| 19 | 19 | ||
| 20 | 20 | func NewTabWriter(out io.Writer) *tabwriter.Writer { |
+1,
-1
| ... | ... | @@ -8,7 +8,7 @@ import ( | |
| 8 | 8 | ||
| 9 | 9 | pgsdb "github.com/picosh/pico/pkg/apps/pgs/db" | |
| 10 | 10 | "github.com/picosh/pico/pkg/shared" | |
| 11 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 11 | + | "github.com/picosh/pico/pkg/storage" | |
| 12 | 12 | ) | |
| 13 | 13 | ||
| 14 | 14 | type PgsConfig struct { |
+1,
-1
| ... | ... | @@ -6,7 +6,7 @@ import ( | |
| 6 | 6 | ||
| 7 | 7 | pgsdb "github.com/picosh/pico/pkg/apps/pgs/db" | |
| 8 | 8 | "github.com/picosh/pico/pkg/shared" | |
| 9 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 9 | + | "github.com/picosh/pico/pkg/storage" | |
| 10 | 10 | ) | |
| 11 | 11 | ||
| 12 | 12 | const binRetentionDays = 14 |
+1,
-1
| ... | ... | @@ -9,7 +9,7 @@ import ( | |
| 9 | 9 | "sort" | |
| 10 | 10 | "strings" | |
| 11 | 11 | ||
| 12 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 12 | + | "github.com/picosh/pico/pkg/storage" | |
| 13 | 13 | ) | |
| 14 | 14 | ||
| 15 | 15 | //go:embed html/* |
+1,
-1
| ... | ... | @@ -7,7 +7,7 @@ import ( | |
| 7 | 7 | "time" | |
| 8 | 8 | ||
| 9 | 9 | "github.com/picosh/pico/pkg/send/utils" | |
| 10 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 10 | + | "github.com/picosh/pico/pkg/storage" | |
| 11 | 11 | ) | |
| 12 | 12 | ||
| 13 | 13 | func TestGenerateDirectoryHTML(t *testing.T) { |
| ... | ... | @@ -9,7 +9,7 @@ import ( | |
| 9 | 9 | "testing" | |
| 10 | 10 | ||
| 11 | 11 | "github.com/picosh/pico/pkg/shared" | |
| 12 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 12 | + | "github.com/picosh/pico/pkg/storage" | |
| 13 | 13 | ) | |
| 14 | 14 | ||
| 15 | 15 | // TestLargeFileNotTruncatedOnCacheHit reproduces the Souin truncation bug. |
+1,
-1
| ... | ... | @@ -20,7 +20,7 @@ import ( | |
| 20 | 20 | "github.com/picosh/pico/pkg/db" | |
| 21 | 21 | "github.com/picosh/pico/pkg/pssh" | |
| 22 | 22 | "github.com/picosh/pico/pkg/shared" | |
| 23 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 23 | + | "github.com/picosh/pico/pkg/storage" | |
| 24 | 24 | "github.com/pkg/sftp" | |
| 25 | 25 | "github.com/prometheus/client_golang/prometheus" | |
| 26 | 26 | "golang.org/x/crypto/ssh" |
+1,
-1
| ... | ... | @@ -20,7 +20,7 @@ import ( | |
| 20 | 20 | "github.com/picosh/pico/pkg/pssh" | |
| 21 | 21 | sendutils "github.com/picosh/pico/pkg/send/utils" | |
| 22 | 22 | "github.com/picosh/pico/pkg/shared" | |
| 23 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 23 | + | "github.com/picosh/pico/pkg/storage" | |
| 24 | 24 | ignore "github.com/sabhiram/go-gitignore" | |
| 25 | 25 | ) | |
| 26 | 26 |
+1,
-1
| ... | ... | @@ -26,7 +26,7 @@ import ( | |
| 26 | 26 | "github.com/picosh/pico/pkg/db" | |
| 27 | 27 | "github.com/picosh/pico/pkg/shared" | |
| 28 | 28 | "github.com/picosh/pico/pkg/shared/router" | |
| 29 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 29 | + | "github.com/picosh/pico/pkg/storage" | |
| 30 | 30 | "github.com/prometheus/client_golang/prometheus/promhttp" | |
| 31 | 31 | "google.golang.org/protobuf/proto" | |
| 32 | 32 | ) |
+1,
-1
| ... | ... | @@ -14,7 +14,7 @@ import ( | |
| 14 | 14 | "net/http/httputil" | |
| 15 | 15 | _ "net/http/pprof" | |
| 16 | 16 | ||
| 17 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 17 | + | "github.com/picosh/pico/pkg/storage" | |
| 18 | 18 | ) | |
| 19 | 19 | ||
| 20 | 20 | type ApiAssetHandler struct { |
+1,
-1
| ... | ... | @@ -12,7 +12,7 @@ import ( | |
| 12 | 12 | ||
| 13 | 13 | pgsdb "github.com/picosh/pico/pkg/apps/pgs/db" | |
| 14 | 14 | "github.com/picosh/pico/pkg/shared" | |
| 15 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 15 | + | "github.com/picosh/pico/pkg/storage" | |
| 16 | 16 | ) | |
| 17 | 17 | ||
| 18 | 18 | type ApiExample struct { |
+1,
-1
| ... | ... | @@ -20,7 +20,7 @@ import ( | |
| 20 | 20 | "github.com/picosh/pico/pkg/db/postgres" | |
| 21 | 21 | "github.com/picosh/pico/pkg/shared" | |
| 22 | 22 | "github.com/picosh/pico/pkg/shared/router" | |
| 23 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 23 | + | "github.com/picosh/pico/pkg/storage" | |
| 24 | 24 | "github.com/prometheus/client_golang/prometheus/promhttp" | |
| 25 | 25 | ) | |
| 26 | 26 |
+1,
-1
| ... | ... | @@ -18,7 +18,7 @@ import ( | |
| 18 | 18 | "github.com/picosh/pico/pkg/send/protocols/scp" | |
| 19 | 19 | "github.com/picosh/pico/pkg/send/protocols/sftp" | |
| 20 | 20 | "github.com/picosh/pico/pkg/shared" | |
| 21 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 21 | + | "github.com/picosh/pico/pkg/storage" | |
| 22 | 22 | ) | |
| 23 | 23 | ||
| 24 | 24 | func StartSshServer() { |
+1,
-1
| ... | ... | @@ -16,7 +16,7 @@ import ( | |
| 16 | 16 | "github.com/picosh/pico/pkg/pssh" | |
| 17 | 17 | sendutils "github.com/picosh/pico/pkg/send/utils" | |
| 18 | 18 | "github.com/picosh/pico/pkg/shared" | |
| 19 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 19 | + | "github.com/picosh/pico/pkg/storage" | |
| 20 | 20 | ) | |
| 21 | 21 | ||
| 22 | 22 | var Space = "imgs" |
| ... | ... | @@ -14,7 +14,7 @@ import ( | |
| 14 | 14 | "github.com/picosh/pico/pkg/db" | |
| 15 | 15 | "github.com/picosh/pico/pkg/pssh" | |
| 16 | 16 | "github.com/picosh/pico/pkg/shared" | |
| 17 | - | "github.com/picosh/pico/pkg/shared/storage" | |
| 17 | + | "github.com/picosh/pico/pkg/storage" | |
| 18 | 18 | ) | |
| 19 | 19 | ||
| 20 | 20 | type Route struct { |
R pkg/shared/storage/asset.go =>
pkg/storage/asset.go
+0,
-0
R pkg/shared/storage/base.go =>
pkg/storage/base.go
+0,
-0
R pkg/shared/storage/fs.go =>
pkg/storage/fs.go
+0,
-0
R pkg/shared/storage/fs_test.go =>
pkg/storage/fs_test.go
+0,
-0
R pkg/shared/storage/handler.go =>
pkg/storage/handler.go
+0,
-0
R pkg/shared/storage/memory.go =>
pkg/storage/memory.go
+0,
-0
R pkg/shared/storage/proxy.go =>
pkg/storage/proxy.go
+0,
-0
R pkg/shared/storage/proxy_test.go =>
pkg/storage/proxy_test.go
+0,
-0
R pkg/shared/storage/ratio.go =>
pkg/storage/ratio.go
+0,
-0
R pkg/shared/storage/reader.go =>
pkg/storage/reader.go
+0,
-0
R pkg/shared/storage/storage.go =>
pkg/storage/storage.go
+0,
-0