mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
support cloudflare r2
This commit is contained in:
@@ -3,6 +3,7 @@ import { type } from "arktype";
|
||||
export const REPOSITORY_BACKENDS = {
|
||||
local: "local",
|
||||
s3: "s3",
|
||||
r2: "r2",
|
||||
gcs: "gcs",
|
||||
azure: "azure",
|
||||
rclone: "rclone",
|
||||
@@ -18,6 +19,14 @@ export const s3RepositoryConfigSchema = type({
|
||||
secretAccessKey: "string",
|
||||
});
|
||||
|
||||
export const r2RepositoryConfigSchema = type({
|
||||
backend: "'r2'",
|
||||
endpoint: "string",
|
||||
bucket: "string",
|
||||
accessKeyId: "string",
|
||||
secretAccessKey: "string",
|
||||
});
|
||||
|
||||
export const localRepositoryConfigSchema = type({
|
||||
backend: "'local'",
|
||||
name: "string",
|
||||
@@ -45,6 +54,7 @@ export const rcloneRepositoryConfigSchema = type({
|
||||
});
|
||||
|
||||
export const repositoryConfigSchema = s3RepositoryConfigSchema
|
||||
.or(r2RepositoryConfigSchema)
|
||||
.or(localRepositoryConfigSchema)
|
||||
.or(gcsRepositoryConfigSchema)
|
||||
.or(azureRepositoryConfigSchema)
|
||||
|
||||
Reference in New Issue
Block a user