mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
* feat(remote_storage): add a Yandex Disk backend Yandex Disk joins s3/gcs/azure as a remote storage type, so it can back remote mounts and sink replication (filer.remote.sync, filer.remote.gateway) without a separate sink. The Disk API has no buckets and no place for a file's mtime: a top-level folder under yandex_root plays the bucket, and the entry's modification time and content encoding travel as custom resource properties (seaweedfs_modified, seaweedfs_content_encoding; rclone_modified is read too). The client also handles the API's asynchronous operations (202 + operation polling), the short-lived, single-use download links (a fresh link per read and per retry), single-PUT uploads, mkdir -p of an S3-style key's parents, server-side copy for a remote-only rename, and a ranged read that refuses a short body. A caller-supplied endpoint goes through the guarded client like the s3 and azure endpoints. * feat(shell): configure and issue Yandex Disk tokens remote.configure gains the yandex flags (token, client_id, client_secret, root, trash, app_folder, endpoint). A refreshable token is issued in two steps without a browser on the server: -yandex.oauth_url prints the authorization url and keeps the app credentials, -yandex.code exchanges the copied code for a token and stores it. The token and the client secret are masked in the configuration listing. docs/remote-storage-yandex.md walks through the OAuth app, both token flows, the mount and replication commands, and the platform's limits. * fix(remote_storage): handle missing Yandex folders on stat, copy and upload A missing object is confirmed against the bucket folder rather than its immediate parent, as the gcs client does: a key whose subfolder does not exist yet (a rename destination) is a missing object, not a vanished mount, and the sync only proceeds on ErrRemoteObjectNotFound. CopyFile creates the destination's parent folders, so a remote-only rename into a folder the remote does not have yet succeeds. The Disk API answers a missing parent with 409 DiskPathDoesntExistsError; upload and copy treat it like a 404, and the fake answers the way the API does. An operation poll refreshes the token once on 401 and then fails, instead of polling without a pause until the operation deadline. * fix(remote_storage): retry a locked Yandex resource A folder that is still being deleted asynchronously answers a write with 423 DiskResourceLockedError for a moment. The client now retries it with the same backoff as 429/5xx/509, and the error stays transient for the sync's upload retry when the client's retries run out. * fix(remote_storage): harden the Yandex backend after review Traverse reports objects only, like the s3, gcs and azure clients: its callers (remote.cache, remote.copy.local) read the stamp of every entry, and a folder came with none. Deletes no longer reach what they were not meant for. A Disk API delete is recursive, so DeleteFile keeps a folder that took a file's place on the remote, and DeleteBucket removes an empty bucket folder only, the rule S3 and GCS apply to a bucket. CopyFile keeps the destination until its replacement exists: it copies with overwrite and removes the old object (to the trash when configured) only when the service kept it anyway. It refuses to replace a folder, treats a copy onto itself as done, and carries the source's resolved modification time, including rclone_modified and the service's own time. Every metadata request and operation poll has a deadline that covers reading the answer, and a token refresh or code exchange has its own, so a stalled endpoint cannot block the client. Redirects are checked like the transfer links, an endpoint that would send the token over plain http is refused unless it is on a loopback host, a 202 without an operation link is an error, and a read with an offset and no size starts at the offset. * chore(seaweed-volume): keep only the Yandex fields in the remote.proto copy * yandex: retry a failed operation poll One throttled, failed or timed-out status poll ended a wait of up to 30 minutes while the operation kept running on the service, so a large delete or copy was reported failed and redone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * yandex: refresh a token once for concurrent 401s Every request rejected with the same access token replaced the token source, so N concurrent 401s refreshed, and rotated the refresh token, N times. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * yandex: retry an operation poll whose answer was cut short A status poll that got its 200 headers but lost the connection before the JSON body ended failed with io.ErrUnexpectedEOF, which the poll retry did not treat as transient, so the wait ended while the operation kept running. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Konstantin Lebedev <whitefox@mayflower.work> Co-authored-by: Chris Lu <chrislusf@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
757 lines
27 KiB
Go
757 lines
27 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.12
|
|
// protoc v7.36.2
|
|
// source: remote.proto
|
|
|
|
package remote_pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// ///////////////////////
|
|
// Remote Storage related
|
|
// ///////////////////////
|
|
type RemoteConf struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
|
S3AccessKey string `protobuf:"bytes,4,opt,name=s3_access_key,json=s3AccessKey,proto3" json:"s3_access_key,omitempty"`
|
|
S3SecretKey string `protobuf:"bytes,5,opt,name=s3_secret_key,json=s3SecretKey,proto3" json:"s3_secret_key,omitempty"`
|
|
S3Region string `protobuf:"bytes,6,opt,name=s3_region,json=s3Region,proto3" json:"s3_region,omitempty"`
|
|
S3Endpoint string `protobuf:"bytes,7,opt,name=s3_endpoint,json=s3Endpoint,proto3" json:"s3_endpoint,omitempty"`
|
|
S3StorageClass string `protobuf:"bytes,8,opt,name=s3_storage_class,json=s3StorageClass,proto3" json:"s3_storage_class,omitempty"`
|
|
S3ForcePathStyle bool `protobuf:"varint,9,opt,name=s3_force_path_style,json=s3ForcePathStyle,proto3" json:"s3_force_path_style,omitempty"`
|
|
S3SupportTagging bool `protobuf:"varint,13,opt,name=s3_support_tagging,json=s3SupportTagging,proto3" json:"s3_support_tagging,omitempty"`
|
|
S3V4Signature bool `protobuf:"varint,11,opt,name=s3_v4_signature,json=s3V4Signature,proto3" json:"s3_v4_signature,omitempty"`
|
|
GcsGoogleApplicationCredentials string `protobuf:"bytes,10,opt,name=gcs_google_application_credentials,json=gcsGoogleApplicationCredentials,proto3" json:"gcs_google_application_credentials,omitempty"`
|
|
GcsProjectId string `protobuf:"bytes,12,opt,name=gcs_project_id,json=gcsProjectId,proto3" json:"gcs_project_id,omitempty"`
|
|
AzureAccountName string `protobuf:"bytes,15,opt,name=azure_account_name,json=azureAccountName,proto3" json:"azure_account_name,omitempty"`
|
|
AzureAccountKey string `protobuf:"bytes,16,opt,name=azure_account_key,json=azureAccountKey,proto3" json:"azure_account_key,omitempty"`
|
|
AzureClientId string `protobuf:"bytes,17,opt,name=azure_client_id,json=azureClientId,proto3" json:"azure_client_id,omitempty"`
|
|
AzureEndpoint string `protobuf:"bytes,18,opt,name=azure_endpoint,json=azureEndpoint,proto3" json:"azure_endpoint,omitempty"`
|
|
BackblazeKeyId string `protobuf:"bytes,20,opt,name=backblaze_key_id,json=backblazeKeyId,proto3" json:"backblaze_key_id,omitempty"`
|
|
BackblazeApplicationKey string `protobuf:"bytes,21,opt,name=backblaze_application_key,json=backblazeApplicationKey,proto3" json:"backblaze_application_key,omitempty"`
|
|
BackblazeEndpoint string `protobuf:"bytes,22,opt,name=backblaze_endpoint,json=backblazeEndpoint,proto3" json:"backblaze_endpoint,omitempty"`
|
|
BackblazeRegion string `protobuf:"bytes,23,opt,name=backblaze_region,json=backblazeRegion,proto3" json:"backblaze_region,omitempty"`
|
|
AliyunAccessKey string `protobuf:"bytes,25,opt,name=aliyun_access_key,json=aliyunAccessKey,proto3" json:"aliyun_access_key,omitempty"`
|
|
AliyunSecretKey string `protobuf:"bytes,26,opt,name=aliyun_secret_key,json=aliyunSecretKey,proto3" json:"aliyun_secret_key,omitempty"`
|
|
AliyunEndpoint string `protobuf:"bytes,27,opt,name=aliyun_endpoint,json=aliyunEndpoint,proto3" json:"aliyun_endpoint,omitempty"`
|
|
AliyunRegion string `protobuf:"bytes,28,opt,name=aliyun_region,json=aliyunRegion,proto3" json:"aliyun_region,omitempty"`
|
|
TencentSecretId string `protobuf:"bytes,30,opt,name=tencent_secret_id,json=tencentSecretId,proto3" json:"tencent_secret_id,omitempty"`
|
|
TencentSecretKey string `protobuf:"bytes,31,opt,name=tencent_secret_key,json=tencentSecretKey,proto3" json:"tencent_secret_key,omitempty"`
|
|
TencentEndpoint string `protobuf:"bytes,32,opt,name=tencent_endpoint,json=tencentEndpoint,proto3" json:"tencent_endpoint,omitempty"`
|
|
BaiduAccessKey string `protobuf:"bytes,35,opt,name=baidu_access_key,json=baiduAccessKey,proto3" json:"baidu_access_key,omitempty"`
|
|
BaiduSecretKey string `protobuf:"bytes,36,opt,name=baidu_secret_key,json=baiduSecretKey,proto3" json:"baidu_secret_key,omitempty"`
|
|
BaiduEndpoint string `protobuf:"bytes,37,opt,name=baidu_endpoint,json=baiduEndpoint,proto3" json:"baidu_endpoint,omitempty"`
|
|
BaiduRegion string `protobuf:"bytes,38,opt,name=baidu_region,json=baiduRegion,proto3" json:"baidu_region,omitempty"`
|
|
WasabiAccessKey string `protobuf:"bytes,40,opt,name=wasabi_access_key,json=wasabiAccessKey,proto3" json:"wasabi_access_key,omitempty"`
|
|
WasabiSecretKey string `protobuf:"bytes,41,opt,name=wasabi_secret_key,json=wasabiSecretKey,proto3" json:"wasabi_secret_key,omitempty"`
|
|
WasabiEndpoint string `protobuf:"bytes,42,opt,name=wasabi_endpoint,json=wasabiEndpoint,proto3" json:"wasabi_endpoint,omitempty"`
|
|
WasabiRegion string `protobuf:"bytes,43,opt,name=wasabi_region,json=wasabiRegion,proto3" json:"wasabi_region,omitempty"`
|
|
FilebaseAccessKey string `protobuf:"bytes,60,opt,name=filebase_access_key,json=filebaseAccessKey,proto3" json:"filebase_access_key,omitempty"`
|
|
FilebaseSecretKey string `protobuf:"bytes,61,opt,name=filebase_secret_key,json=filebaseSecretKey,proto3" json:"filebase_secret_key,omitempty"`
|
|
FilebaseEndpoint string `protobuf:"bytes,62,opt,name=filebase_endpoint,json=filebaseEndpoint,proto3" json:"filebase_endpoint,omitempty"`
|
|
StorjAccessKey string `protobuf:"bytes,65,opt,name=storj_access_key,json=storjAccessKey,proto3" json:"storj_access_key,omitempty"`
|
|
StorjSecretKey string `protobuf:"bytes,66,opt,name=storj_secret_key,json=storjSecretKey,proto3" json:"storj_secret_key,omitempty"`
|
|
StorjEndpoint string `protobuf:"bytes,67,opt,name=storj_endpoint,json=storjEndpoint,proto3" json:"storj_endpoint,omitempty"`
|
|
ContaboAccessKey string `protobuf:"bytes,68,opt,name=contabo_access_key,json=contaboAccessKey,proto3" json:"contabo_access_key,omitempty"`
|
|
ContaboSecretKey string `protobuf:"bytes,69,opt,name=contabo_secret_key,json=contaboSecretKey,proto3" json:"contabo_secret_key,omitempty"`
|
|
ContaboEndpoint string `protobuf:"bytes,70,opt,name=contabo_endpoint,json=contaboEndpoint,proto3" json:"contabo_endpoint,omitempty"`
|
|
ContaboRegion string `protobuf:"bytes,71,opt,name=contabo_region,json=contaboRegion,proto3" json:"contabo_region,omitempty"`
|
|
UploadConcurrency uint32 `protobuf:"varint,72,opt,name=upload_concurrency,json=uploadConcurrency,proto3" json:"upload_concurrency,omitempty"` // multipart upload concurrency per file, 0 = client default (1 for S3, 16 for Azure)
|
|
DownloadConcurrency uint32 `protobuf:"varint,73,opt,name=download_concurrency,json=downloadConcurrency,proto3" json:"download_concurrency,omitempty"` // multipart download concurrency per read, 0 = client default (5 for S3, 16 for Azure)
|
|
// yandex is the Yandex Disk REST API (cloud-api.yandex.net/v1/disk).
|
|
YandexToken string `protobuf:"bytes,80,opt,name=yandex_token,json=yandexToken,proto3" json:"yandex_token,omitempty"` // OAuth token JSON (access_token, refresh_token, token_type, expiry) or a bare access token
|
|
YandexClientId string `protobuf:"bytes,81,opt,name=yandex_client_id,json=yandexClientId,proto3" json:"yandex_client_id,omitempty"`
|
|
YandexClientSecret string `protobuf:"bytes,82,opt,name=yandex_client_secret,json=yandexClientSecret,proto3" json:"yandex_client_secret,omitempty"`
|
|
YandexEndpoint string `protobuf:"bytes,83,opt,name=yandex_endpoint,json=yandexEndpoint,proto3" json:"yandex_endpoint,omitempty"` // default https://cloud-api.yandex.net/v1/disk
|
|
YandexRoot string `protobuf:"bytes,84,opt,name=yandex_root,json=yandexRoot,proto3" json:"yandex_root,omitempty"` // folder under the disk that holds the buckets, default "/"
|
|
YandexTrash bool `protobuf:"varint,85,opt,name=yandex_trash,json=yandexTrash,proto3" json:"yandex_trash,omitempty"` // move deleted files to the trash instead of deleting them permanently (default: delete permanently)
|
|
YandexAppFolder bool `protobuf:"varint,86,opt,name=yandex_app_folder,json=yandexAppFolder,proto3" json:"yandex_app_folder,omitempty"` // the token only reaches the app folder: address paths under "app:" instead of "disk:"
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RemoteConf) Reset() {
|
|
*x = RemoteConf{}
|
|
mi := &file_remote_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RemoteConf) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RemoteConf) ProtoMessage() {}
|
|
|
|
func (x *RemoteConf) ProtoReflect() protoreflect.Message {
|
|
mi := &file_remote_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RemoteConf.ProtoReflect.Descriptor instead.
|
|
func (*RemoteConf) Descriptor() ([]byte, []int) {
|
|
return file_remote_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *RemoteConf) GetType() string {
|
|
if x != nil {
|
|
return x.Type
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3AccessKey() string {
|
|
if x != nil {
|
|
return x.S3AccessKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3SecretKey() string {
|
|
if x != nil {
|
|
return x.S3SecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3Region() string {
|
|
if x != nil {
|
|
return x.S3Region
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3Endpoint() string {
|
|
if x != nil {
|
|
return x.S3Endpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3StorageClass() string {
|
|
if x != nil {
|
|
return x.S3StorageClass
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3ForcePathStyle() bool {
|
|
if x != nil {
|
|
return x.S3ForcePathStyle
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3SupportTagging() bool {
|
|
if x != nil {
|
|
return x.S3SupportTagging
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *RemoteConf) GetS3V4Signature() bool {
|
|
if x != nil {
|
|
return x.S3V4Signature
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *RemoteConf) GetGcsGoogleApplicationCredentials() string {
|
|
if x != nil {
|
|
return x.GcsGoogleApplicationCredentials
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetGcsProjectId() string {
|
|
if x != nil {
|
|
return x.GcsProjectId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAzureAccountName() string {
|
|
if x != nil {
|
|
return x.AzureAccountName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAzureAccountKey() string {
|
|
if x != nil {
|
|
return x.AzureAccountKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAzureClientId() string {
|
|
if x != nil {
|
|
return x.AzureClientId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAzureEndpoint() string {
|
|
if x != nil {
|
|
return x.AzureEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBackblazeKeyId() string {
|
|
if x != nil {
|
|
return x.BackblazeKeyId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBackblazeApplicationKey() string {
|
|
if x != nil {
|
|
return x.BackblazeApplicationKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBackblazeEndpoint() string {
|
|
if x != nil {
|
|
return x.BackblazeEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBackblazeRegion() string {
|
|
if x != nil {
|
|
return x.BackblazeRegion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAliyunAccessKey() string {
|
|
if x != nil {
|
|
return x.AliyunAccessKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAliyunSecretKey() string {
|
|
if x != nil {
|
|
return x.AliyunSecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAliyunEndpoint() string {
|
|
if x != nil {
|
|
return x.AliyunEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetAliyunRegion() string {
|
|
if x != nil {
|
|
return x.AliyunRegion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetTencentSecretId() string {
|
|
if x != nil {
|
|
return x.TencentSecretId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetTencentSecretKey() string {
|
|
if x != nil {
|
|
return x.TencentSecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetTencentEndpoint() string {
|
|
if x != nil {
|
|
return x.TencentEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBaiduAccessKey() string {
|
|
if x != nil {
|
|
return x.BaiduAccessKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBaiduSecretKey() string {
|
|
if x != nil {
|
|
return x.BaiduSecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBaiduEndpoint() string {
|
|
if x != nil {
|
|
return x.BaiduEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetBaiduRegion() string {
|
|
if x != nil {
|
|
return x.BaiduRegion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetWasabiAccessKey() string {
|
|
if x != nil {
|
|
return x.WasabiAccessKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetWasabiSecretKey() string {
|
|
if x != nil {
|
|
return x.WasabiSecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetWasabiEndpoint() string {
|
|
if x != nil {
|
|
return x.WasabiEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetWasabiRegion() string {
|
|
if x != nil {
|
|
return x.WasabiRegion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetFilebaseAccessKey() string {
|
|
if x != nil {
|
|
return x.FilebaseAccessKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetFilebaseSecretKey() string {
|
|
if x != nil {
|
|
return x.FilebaseSecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetFilebaseEndpoint() string {
|
|
if x != nil {
|
|
return x.FilebaseEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetStorjAccessKey() string {
|
|
if x != nil {
|
|
return x.StorjAccessKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetStorjSecretKey() string {
|
|
if x != nil {
|
|
return x.StorjSecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetStorjEndpoint() string {
|
|
if x != nil {
|
|
return x.StorjEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetContaboAccessKey() string {
|
|
if x != nil {
|
|
return x.ContaboAccessKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetContaboSecretKey() string {
|
|
if x != nil {
|
|
return x.ContaboSecretKey
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetContaboEndpoint() string {
|
|
if x != nil {
|
|
return x.ContaboEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetContaboRegion() string {
|
|
if x != nil {
|
|
return x.ContaboRegion
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetUploadConcurrency() uint32 {
|
|
if x != nil {
|
|
return x.UploadConcurrency
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RemoteConf) GetDownloadConcurrency() uint32 {
|
|
if x != nil {
|
|
return x.DownloadConcurrency
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RemoteConf) GetYandexToken() string {
|
|
if x != nil {
|
|
return x.YandexToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetYandexClientId() string {
|
|
if x != nil {
|
|
return x.YandexClientId
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetYandexClientSecret() string {
|
|
if x != nil {
|
|
return x.YandexClientSecret
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetYandexEndpoint() string {
|
|
if x != nil {
|
|
return x.YandexEndpoint
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetYandexRoot() string {
|
|
if x != nil {
|
|
return x.YandexRoot
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteConf) GetYandexTrash() bool {
|
|
if x != nil {
|
|
return x.YandexTrash
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *RemoteConf) GetYandexAppFolder() bool {
|
|
if x != nil {
|
|
return x.YandexAppFolder
|
|
}
|
|
return false
|
|
}
|
|
|
|
type RemoteStorageMapping struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Mappings map[string]*RemoteStorageLocation `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
|
|
PrimaryBucketStorageName string `protobuf:"bytes,2,opt,name=primary_bucket_storage_name,json=primaryBucketStorageName,proto3" json:"primary_bucket_storage_name,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RemoteStorageMapping) Reset() {
|
|
*x = RemoteStorageMapping{}
|
|
mi := &file_remote_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RemoteStorageMapping) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RemoteStorageMapping) ProtoMessage() {}
|
|
|
|
func (x *RemoteStorageMapping) ProtoReflect() protoreflect.Message {
|
|
mi := &file_remote_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RemoteStorageMapping.ProtoReflect.Descriptor instead.
|
|
func (*RemoteStorageMapping) Descriptor() ([]byte, []int) {
|
|
return file_remote_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *RemoteStorageMapping) GetMappings() map[string]*RemoteStorageLocation {
|
|
if x != nil {
|
|
return x.Mappings
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *RemoteStorageMapping) GetPrimaryBucketStorageName() string {
|
|
if x != nil {
|
|
return x.PrimaryBucketStorageName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type RemoteStorageLocation struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
|
Bucket string `protobuf:"bytes,2,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
|
Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
|
|
ListingCacheTtlSeconds int32 `protobuf:"varint,4,opt,name=listing_cache_ttl_seconds,json=listingCacheTtlSeconds,proto3" json:"listing_cache_ttl_seconds,omitempty"` // 0 = disabled; >0 enables on-demand directory listing with this TTL in seconds
|
|
CacheWaitMs *int32 `protobuf:"varint,5,opt,name=cache_wait_ms,json=cacheWaitMs,proto3,oneof" json:"cache_wait_ms,omitempty"` // unset = size based default; 0 = read straight from the remote without caching
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *RemoteStorageLocation) Reset() {
|
|
*x = RemoteStorageLocation{}
|
|
mi := &file_remote_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *RemoteStorageLocation) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*RemoteStorageLocation) ProtoMessage() {}
|
|
|
|
func (x *RemoteStorageLocation) ProtoReflect() protoreflect.Message {
|
|
mi := &file_remote_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use RemoteStorageLocation.ProtoReflect.Descriptor instead.
|
|
func (*RemoteStorageLocation) Descriptor() ([]byte, []int) {
|
|
return file_remote_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *RemoteStorageLocation) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteStorageLocation) GetBucket() string {
|
|
if x != nil {
|
|
return x.Bucket
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteStorageLocation) GetPath() string {
|
|
if x != nil {
|
|
return x.Path
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *RemoteStorageLocation) GetListingCacheTtlSeconds() int32 {
|
|
if x != nil {
|
|
return x.ListingCacheTtlSeconds
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *RemoteStorageLocation) GetCacheWaitMs() int32 {
|
|
if x != nil && x.CacheWaitMs != nil {
|
|
return *x.CacheWaitMs
|
|
}
|
|
return 0
|
|
}
|
|
|
|
var File_remote_proto protoreflect.FileDescriptor
|
|
|
|
const file_remote_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\fremote.proto\x12\tremote_pb\"\xe4\x11\n" +
|
|
"\n" +
|
|
"RemoteConf\x12\x12\n" +
|
|
"\x04type\x18\x01 \x01(\tR\x04type\x12\x12\n" +
|
|
"\x04name\x18\x02 \x01(\tR\x04name\x12\"\n" +
|
|
"\rs3_access_key\x18\x04 \x01(\tR\vs3AccessKey\x12\"\n" +
|
|
"\rs3_secret_key\x18\x05 \x01(\tR\vs3SecretKey\x12\x1b\n" +
|
|
"\ts3_region\x18\x06 \x01(\tR\bs3Region\x12\x1f\n" +
|
|
"\vs3_endpoint\x18\a \x01(\tR\n" +
|
|
"s3Endpoint\x12(\n" +
|
|
"\x10s3_storage_class\x18\b \x01(\tR\x0es3StorageClass\x12-\n" +
|
|
"\x13s3_force_path_style\x18\t \x01(\bR\x10s3ForcePathStyle\x12,\n" +
|
|
"\x12s3_support_tagging\x18\r \x01(\bR\x10s3SupportTagging\x12&\n" +
|
|
"\x0fs3_v4_signature\x18\v \x01(\bR\rs3V4Signature\x12K\n" +
|
|
"\"gcs_google_application_credentials\x18\n" +
|
|
" \x01(\tR\x1fgcsGoogleApplicationCredentials\x12$\n" +
|
|
"\x0egcs_project_id\x18\f \x01(\tR\fgcsProjectId\x12,\n" +
|
|
"\x12azure_account_name\x18\x0f \x01(\tR\x10azureAccountName\x12*\n" +
|
|
"\x11azure_account_key\x18\x10 \x01(\tR\x0fazureAccountKey\x12&\n" +
|
|
"\x0fazure_client_id\x18\x11 \x01(\tR\razureClientId\x12%\n" +
|
|
"\x0eazure_endpoint\x18\x12 \x01(\tR\razureEndpoint\x12(\n" +
|
|
"\x10backblaze_key_id\x18\x14 \x01(\tR\x0ebackblazeKeyId\x12:\n" +
|
|
"\x19backblaze_application_key\x18\x15 \x01(\tR\x17backblazeApplicationKey\x12-\n" +
|
|
"\x12backblaze_endpoint\x18\x16 \x01(\tR\x11backblazeEndpoint\x12)\n" +
|
|
"\x10backblaze_region\x18\x17 \x01(\tR\x0fbackblazeRegion\x12*\n" +
|
|
"\x11aliyun_access_key\x18\x19 \x01(\tR\x0faliyunAccessKey\x12*\n" +
|
|
"\x11aliyun_secret_key\x18\x1a \x01(\tR\x0faliyunSecretKey\x12'\n" +
|
|
"\x0faliyun_endpoint\x18\x1b \x01(\tR\x0ealiyunEndpoint\x12#\n" +
|
|
"\raliyun_region\x18\x1c \x01(\tR\faliyunRegion\x12*\n" +
|
|
"\x11tencent_secret_id\x18\x1e \x01(\tR\x0ftencentSecretId\x12,\n" +
|
|
"\x12tencent_secret_key\x18\x1f \x01(\tR\x10tencentSecretKey\x12)\n" +
|
|
"\x10tencent_endpoint\x18 \x01(\tR\x0ftencentEndpoint\x12(\n" +
|
|
"\x10baidu_access_key\x18# \x01(\tR\x0ebaiduAccessKey\x12(\n" +
|
|
"\x10baidu_secret_key\x18$ \x01(\tR\x0ebaiduSecretKey\x12%\n" +
|
|
"\x0ebaidu_endpoint\x18% \x01(\tR\rbaiduEndpoint\x12!\n" +
|
|
"\fbaidu_region\x18& \x01(\tR\vbaiduRegion\x12*\n" +
|
|
"\x11wasabi_access_key\x18( \x01(\tR\x0fwasabiAccessKey\x12*\n" +
|
|
"\x11wasabi_secret_key\x18) \x01(\tR\x0fwasabiSecretKey\x12'\n" +
|
|
"\x0fwasabi_endpoint\x18* \x01(\tR\x0ewasabiEndpoint\x12#\n" +
|
|
"\rwasabi_region\x18+ \x01(\tR\fwasabiRegion\x12.\n" +
|
|
"\x13filebase_access_key\x18< \x01(\tR\x11filebaseAccessKey\x12.\n" +
|
|
"\x13filebase_secret_key\x18= \x01(\tR\x11filebaseSecretKey\x12+\n" +
|
|
"\x11filebase_endpoint\x18> \x01(\tR\x10filebaseEndpoint\x12(\n" +
|
|
"\x10storj_access_key\x18A \x01(\tR\x0estorjAccessKey\x12(\n" +
|
|
"\x10storj_secret_key\x18B \x01(\tR\x0estorjSecretKey\x12%\n" +
|
|
"\x0estorj_endpoint\x18C \x01(\tR\rstorjEndpoint\x12,\n" +
|
|
"\x12contabo_access_key\x18D \x01(\tR\x10contaboAccessKey\x12,\n" +
|
|
"\x12contabo_secret_key\x18E \x01(\tR\x10contaboSecretKey\x12)\n" +
|
|
"\x10contabo_endpoint\x18F \x01(\tR\x0fcontaboEndpoint\x12%\n" +
|
|
"\x0econtabo_region\x18G \x01(\tR\rcontaboRegion\x12-\n" +
|
|
"\x12upload_concurrency\x18H \x01(\rR\x11uploadConcurrency\x121\n" +
|
|
"\x14download_concurrency\x18I \x01(\rR\x13downloadConcurrency\x12!\n" +
|
|
"\fyandex_token\x18P \x01(\tR\vyandexToken\x12(\n" +
|
|
"\x10yandex_client_id\x18Q \x01(\tR\x0eyandexClientId\x120\n" +
|
|
"\x14yandex_client_secret\x18R \x01(\tR\x12yandexClientSecret\x12'\n" +
|
|
"\x0fyandex_endpoint\x18S \x01(\tR\x0eyandexEndpoint\x12\x1f\n" +
|
|
"\vyandex_root\x18T \x01(\tR\n" +
|
|
"yandexRoot\x12!\n" +
|
|
"\fyandex_trash\x18U \x01(\bR\vyandexTrash\x12*\n" +
|
|
"\x11yandex_app_folder\x18V \x01(\bR\x0fyandexAppFolder\"\xff\x01\n" +
|
|
"\x14RemoteStorageMapping\x12I\n" +
|
|
"\bmappings\x18\x01 \x03(\v2-.remote_pb.RemoteStorageMapping.MappingsEntryR\bmappings\x12=\n" +
|
|
"\x1bprimary_bucket_storage_name\x18\x02 \x01(\tR\x18primaryBucketStorageName\x1a]\n" +
|
|
"\rMappingsEntry\x12\x10\n" +
|
|
"\x03key\x18\x01 \x01(\tR\x03key\x126\n" +
|
|
"\x05value\x18\x02 \x01(\v2 .remote_pb.RemoteStorageLocationR\x05value:\x028\x01\"\xcd\x01\n" +
|
|
"\x15RemoteStorageLocation\x12\x12\n" +
|
|
"\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" +
|
|
"\x06bucket\x18\x02 \x01(\tR\x06bucket\x12\x12\n" +
|
|
"\x04path\x18\x03 \x01(\tR\x04path\x129\n" +
|
|
"\x19listing_cache_ttl_seconds\x18\x04 \x01(\x05R\x16listingCacheTtlSeconds\x12'\n" +
|
|
"\rcache_wait_ms\x18\x05 \x01(\x05H\x00R\vcacheWaitMs\x88\x01\x01B\x10\n" +
|
|
"\x0e_cache_wait_msBP\n" +
|
|
"\x10seaweedfs.clientB\n" +
|
|
"FilerProtoZ0github.com/seaweedfs/seaweedfs/weed/pb/remote_pbb\x06proto3"
|
|
|
|
var (
|
|
file_remote_proto_rawDescOnce sync.Once
|
|
file_remote_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_remote_proto_rawDescGZIP() []byte {
|
|
file_remote_proto_rawDescOnce.Do(func() {
|
|
file_remote_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_remote_proto_rawDesc), len(file_remote_proto_rawDesc)))
|
|
})
|
|
return file_remote_proto_rawDescData
|
|
}
|
|
|
|
var file_remote_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
|
var file_remote_proto_goTypes = []any{
|
|
(*RemoteConf)(nil), // 0: remote_pb.RemoteConf
|
|
(*RemoteStorageMapping)(nil), // 1: remote_pb.RemoteStorageMapping
|
|
(*RemoteStorageLocation)(nil), // 2: remote_pb.RemoteStorageLocation
|
|
nil, // 3: remote_pb.RemoteStorageMapping.MappingsEntry
|
|
}
|
|
var file_remote_proto_depIdxs = []int32{
|
|
3, // 0: remote_pb.RemoteStorageMapping.mappings:type_name -> remote_pb.RemoteStorageMapping.MappingsEntry
|
|
2, // 1: remote_pb.RemoteStorageMapping.MappingsEntry.value:type_name -> remote_pb.RemoteStorageLocation
|
|
2, // [2:2] is the sub-list for method output_type
|
|
2, // [2:2] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_remote_proto_init() }
|
|
func file_remote_proto_init() {
|
|
if File_remote_proto != nil {
|
|
return
|
|
}
|
|
file_remote_proto_msgTypes[2].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_remote_proto_rawDesc), len(file_remote_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 4,
|
|
NumExtensions: 0,
|
|
NumServices: 0,
|
|
},
|
|
GoTypes: file_remote_proto_goTypes,
|
|
DependencyIndexes: file_remote_proto_depIdxs,
|
|
MessageInfos: file_remote_proto_msgTypes,
|
|
}.Build()
|
|
File_remote_proto = out.File
|
|
file_remote_proto_goTypes = nil
|
|
file_remote_proto_depIdxs = nil
|
|
}
|