oss

package
v1.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2026 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package oss 实现 OSS(对象存储)binder:Bucket/对象浏览、连接测试。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LangProvider

type LangProvider interface{ Lang() string }

LangProvider 提供当前 UI 语言,用于 i18n 上下文。

type OSS

type OSS struct {
	// contains filtered or unexported fields
}

OSS binder。

func New

func New(appCtx context.Context, lang LangProvider) *OSS

New 构造 OSS binder。

func (*OSS) Cleanup

func (o *OSS) Cleanup()

Cleanup 占位。

func (*OSS) OSSCancelTransfer

func (o *OSS) OSSCancelTransfer(transferID string) error

OSSCancelTransfer 经注册表取消在途上传/下载(命中即调用其 CancelFunc,ctx 取消触发取消终态); 未命中(已终结或从未存在的 transferID)视为幂等 no-op,不报错。

func (*OSS) OSSCopyObject

func (o *OSS) OSSCopyObject(req oss_svc.CopyRequest) error

OSSCopyObject 服务端复制单个对象(同/跨 Bucket 与前缀)。

func (*OSS) OSSCreateFolder

func (o *OSS) OSSCreateFolder(req oss_svc.CreateFolderRequest) error

OSSCreateFolder 在指定前缀下新建"文件夹"(零字节占位对象)。

func (*OSS) OSSDownloadObject

func (o *OSS) OSSDownloadObject(assetID int64, bucket, key string) (string, error)

OSSDownloadObject 弹原生保存对话框(默认名 = key 末段),流式下载并报进度,返回 transferID。 用户取消对话框 → 返回空串。

func (*OSS) OSSListBuckets

func (o *OSS) OSSListBuckets(assetID int64) ([]oss_svc.BucketItem, error)

OSSListBuckets 列出账号下的所有 Bucket。

func (*OSS) OSSListObjects

func (o *OSS) OSSListObjects(req oss_svc.ListObjectsRequest) (*oss_svc.ListObjectsResult, error)

OSSListObjects 列出某 Bucket/前缀下的对象与子前缀。

func (*OSS) OSSMoveObject

func (o *OSS) OSSMoveObject(req oss_svc.CopyRequest) error

OSSMoveObject 复制成功后删除源,覆盖重命名与移动。

func (*OSS) OSSPresignGet

func (o *OSS) OSSPresignGet(req oss_svc.PresignRequest) (string, error)

OSSPresignGet 生成对象的预签名下载 URL。

func (*OSS) OSSPresignPut

func (o *OSS) OSSPresignPut(req oss_svc.PresignRequest) (string, error)

OSSPresignPut 生成对象的预签名上传 URL。

func (*OSS) OSSRemoveObject

func (o *OSS) OSSRemoveObject(req oss_svc.ObjectRequest) error

OSSRemoveObject 删除单个对象。

func (*OSS) OSSRemoveObjects

func (o *OSS) OSSRemoveObjects(req oss_svc.RemoveObjectsRequest) error

OSSRemoveObjects 批量删除对象(一次调用一条关键流日志)。

func (*OSS) OSSStartTransfer

func (o *OSS) OSSStartTransfer(transferID string) error

OSSStartTransfer 在前端创建进度行并完成 EventsOn 订阅后启动已准备的传输。

func (*OSS) OSSStatObject

func (o *OSS) OSSStatObject(req oss_svc.ObjectRequest) (*oss_svc.ObjectItem, error)

OSSStatObject 取单个对象的元信息。

func (*OSS) OSSTestConnection

func (o *OSS) OSSTestConnection(assetID int64) error

OSSTestConnection 用已保存的资产拨号并列 Bucket 以验证凭证。

func (*OSS) OSSUploadObject

func (o *OSS) OSSUploadObject(assetID int64, bucket, keyPrefix string) ([]string, error)

OSSUploadObject 弹原生多选对话框,对每个选中文件起一路流式上传,返回各 transferID。 用户取消对话框 → 返回空切片。

func (*OSS) OSSUploadObjectPath

func (o *OSS) OSSUploadObjectPath(assetID int64, bucket, key, localPath string) (string, error)

OSSUploadObjectPath 无对话框(拖拽遮罩用),流式上传单个本地文件到指定 key。

func (*OSS) Startup

func (o *OSS) Startup(ctx context.Context)

Startup 保存 Wails ctx。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL