koishi-plugin-chatluna-storage-service 0.0.11 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -1,18 +1,37 @@
1
1
  import { Context, Logger, Schema } from 'koishi';
2
2
  export * from './service/storage';
3
3
  export declare let logger: Logger;
4
- export declare const usage = "\u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u786E\u4FDD\u4F60 Koishi \u8FD0\u884C\u5728\u516C\u7F51\uFF0C\u6216\u4F60\u7684\u804A\u5929\u9002\u914D\u5668\uFF08\u5982 onebot\uFF0Ctelegram\uFF09\u548C koishi \u8FD0\u884C\u5728\u540C\u4E00\u4E2A\u5C40\u57DF\u7F51\u4E2D\u3002";
4
+ export declare const usage = "\u4F7F\u7528\u6B64\u63D2\u4EF6\u9700\u8981\u786E\u4FDD\u4F60 Koishi \u8FD0\u884C\u5728\u516C\u7F51\uFF0C\u6216\u4F60\u7684\u804A\u5929\u9002\u914D\u5668\uFF08\u5982 onebot\uFF0Ctelegram\uFF09\u548C koishi \u8FD0\u884C\u5728\u540C\u4E00\u4E2A\u5C40\u57DF\u7F51\u4E2D\u3002\n\n\u4E0D\u540C\u7684\u5B58\u50A8\u540E\u7AEF\u7684\u4F5C\u7528\uFF1A\n- **\u672C\u5730\u6587\u4EF6**\uFF1A\u9ED8\u8BA4\u9009\u9879\uFF0C\u6587\u4EF6\u5B58\u50A8\u5728\u672C\u5730\u78C1\u76D8\uFF0C\u901A\u8FC7 Koishi \u7684 HTTP \u670D\u52A1\u5668\u63D0\u4F9B\u8BBF\u95EE\n- **S3 \u517C\u5BB9\u5B58\u50A8**\uFF1A\u652F\u6301 AWS S3\u3001MinIO \u7B49 S3 \u517C\u5BB9\u670D\u52A1\uFF0C\u53EF\u914D\u7F6E\u516C\u7F51 URL \u76F4\u63A5\u8BBF\u95EE\n- **WebDAV**\uFF1A\u652F\u6301 WebDAV \u534F\u8BAE\u7684\u5B58\u50A8\u670D\u52A1\n- **Cloudflare R2**\uFF1ACloudflare \u7684\u5BF9\u8C61\u5B58\u50A8\u670D\u52A1\uFF0CS3 \u517C\u5BB9\n\n\u5982\u679C\u5B58\u50A8\u540E\u7AEF\u652F\u6301\u516C\u7F51\u8BBF\u95EE\uFF08\u914D\u7F6E\u4E86\u516C\u7F51 URL\uFF09\uFF0C\u7CFB\u7EDF\u4F1A\u76F4\u63A5\u8FD4\u56DE\u516C\u7F51 URL\uFF0C\u4E0D\u7ECF\u8FC7 Koishi \u670D\u52A1\u5668\u4E2D\u8F6C\u3002";
5
5
  export declare function apply(ctx: Context, config: Config): void;
6
6
  export declare const inject: {
7
7
  required: string[];
8
8
  };
9
+ export type StorageBackendType = 'local' | 's3' | 'webdav' | 'r2';
9
10
  export interface Config {
10
- backendPath: string;
11
- storagePath: string;
11
+ backendPath?: string;
12
+ storagePath?: string;
12
13
  serverPath: string;
13
14
  tempCacheTime: number;
14
15
  maxStorageSize: number;
15
16
  maxStorageCount: number;
17
+ storageBackend: StorageBackendType;
18
+ s3Endpoint?: string;
19
+ s3Bucket?: string;
20
+ s3Region?: string;
21
+ s3AccessKeyId?: string;
22
+ s3SecretAccessKey?: string;
23
+ s3PublicUrl?: string;
24
+ s3PathStyle?: boolean;
25
+ webdavEndpoint?: string;
26
+ webdavUsername?: string;
27
+ webdavPassword?: string;
28
+ webdavBasePath?: string;
29
+ webdavPublicUrl?: string;
30
+ r2AccountId?: string;
31
+ r2Bucket?: string;
32
+ r2AccessKeyId?: string;
33
+ r2SecretAccessKey?: string;
34
+ r2PublicUrl?: string;
16
35
  }
17
36
  export declare const Config: Schema<Config>;
18
37
  export declare const name = "chatluna-storage-service";