diff --git a/cmd/layotto/main.go b/cmd/layotto/main.go index 51010d84be..cf320b3cd1 100644 --- a/cmd/layotto/main.go +++ b/cmd/layotto/main.go @@ -277,12 +277,12 @@ func NewRuntimeGrpcServer(data json.RawMessage, opts ...grpc.ServerOption) (mgrp // File runtime.WithFileFactory( - file.NewFileFactory("aliOSS", aliyun_file.NewAliyunFile), - file.NewFileFactory("minioOSS", minio.NewMinioOss), - file.NewFileFactory("awsOSS", aws.NewAwsFile), - file.NewFileFactory("tencentCloudOSS", tencentcloud.NewTencentCloudOSS), + file.NewFileFactory("aliyun.oss", aliyun_file.NewAliyunFile), + file.NewFileFactory("minio", minio.NewMinioOss), + file.NewFileFactory("aws.s3", aws.NewAwsFile), + file.NewFileFactory("tencent.oss", tencentcloud.NewTencentCloudOSS), file.NewFileFactory("local", local.NewLocalStore), - file.NewFileFactory("qiniuOSS", qiniu.NewQiniuOSS), + file.NewFileFactory("qiniu.oss", qiniu.NewQiniuOSS), ), runtime.WithOssFactory( oss.NewFactory("aws.oss", aws_oss.NewAwsOss), diff --git a/cmd/layotto_multiple_api/main.go b/cmd/layotto_multiple_api/main.go index 01a7591271..20d02dfa9a 100644 --- a/cmd/layotto_multiple_api/main.go +++ b/cmd/layotto_multiple_api/main.go @@ -287,12 +287,12 @@ func NewRuntimeGrpcServer(data json.RawMessage, opts ...grpc.ServerOption) (mgrp // File runtime.WithFileFactory( - file.NewFileFactory("aliOSS", aliyun_file.NewAliyunFile), - file.NewFileFactory("minioOSS", minio.NewMinioOss), - file.NewFileFactory("awsOSS", aws_file.NewAwsFile), - file.NewFileFactory("tencentCloudOSS", tencentcloud.NewTencentCloudOSS), + file.NewFileFactory("aliyun.oss", aliyun_file.NewAliyunFile), + file.NewFileFactory("minio", minio.NewMinioOss), + file.NewFileFactory("aws.s3", aws_file.NewAwsFile), + file.NewFileFactory("tencent.oss", tencentcloud.NewTencentCloudOSS), file.NewFileFactory("local", local.NewLocalStore), - file.NewFileFactory("qiniuOSS", qiniu.NewQiniuOSS), + file.NewFileFactory("qiniu.oss", qiniu.NewQiniuOSS), ), //OSS diff --git a/cmd/layotto_without_xds/main.go b/cmd/layotto_without_xds/main.go index 50f5cb2c7c..243e177fc4 100644 --- a/cmd/layotto_without_xds/main.go +++ b/cmd/layotto_without_xds/main.go @@ -259,12 +259,12 @@ func NewRuntimeGrpcServer(data json.RawMessage, opts ...grpc.ServerOption) (mgrp // File runtime.WithFileFactory( - file.NewFileFactory("aliOSS", aliyun.NewAliyunFile), - file.NewFileFactory("minioOSS", minio.NewMinioOss), - file.NewFileFactory("awsOSS", aws_file.NewAwsFile), - file.NewFileFactory("tencentCloudOSS", tencentcloud.NewTencentCloudOSS), + file.NewFileFactory("aliyun.oss", aliyun.NewAliyunFile), + file.NewFileFactory("minio", minio.NewMinioOss), + file.NewFileFactory("aws.s3", aws_file.NewAwsFile), + file.NewFileFactory("tencent.oss", tencentcloud.NewTencentCloudOSS), file.NewFileFactory("local", local.NewLocalStore), - file.NewFileFactory("qiniuOSS", qiniu.NewQiniuOSS), + file.NewFileFactory("qiniu.oss", qiniu.NewQiniuOSS), ), // PubSub diff --git a/components/file/aws/file.go b/components/file/aws/file.go index db2d34c5e7..474cefc0c0 100644 --- a/components/file/aws/file.go +++ b/components/file/aws/file.go @@ -100,11 +100,11 @@ func (a *AwsOss) Put(ctx context.Context, st *file.PutFileStu) error { //var bodySize int64 bucket, err := util.GetBucketName(st.FileName) if err != nil { - return fmt.Errorf("awsoss put file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("aws.s3 put file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return fmt.Errorf("awsoss put file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("aws.s3 put file[%s] fail,err: %s", st.FileName, err.Error()) } client, err := a.selectClient() if err != nil { @@ -130,11 +130,11 @@ func (a *AwsOss) selectClient() (*s3.Client, error) { func (a *AwsOss) Get(ctx context.Context, st *file.GetFileStu) (io.ReadCloser, error) { bucket, err := util.GetBucketName(st.FileName) if err != nil { - return nil, fmt.Errorf("awsoss get file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("aws.s3 get file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return nil, fmt.Errorf("awsoss get file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("aws.s3 get file[%s] fail,err: %s", st.FileName, err.Error()) } input := &s3.GetObjectInput{ Bucket: &bucket, @@ -186,11 +186,11 @@ func (a *AwsOss) List(ctx context.Context, st *file.ListRequest) (*file.ListResp func (a *AwsOss) Del(ctx context.Context, st *file.DelRequest) error { bucket, err := util.GetBucketName(st.FileName) if err != nil { - return fmt.Errorf("awsoss put file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("aws.s3 put file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return fmt.Errorf("awsoss put file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("aws.s3 put file[%s] fail,err: %s", st.FileName, err.Error()) } input := &s3.DeleteObjectInput{ Bucket: &bucket, @@ -209,11 +209,11 @@ func (a *AwsOss) Del(ctx context.Context, st *file.DelRequest) error { func (a *AwsOss) Stat(ctx context.Context, st *file.FileMetaRequest) (*file.FileMetaResp, error) { bucket, err := util.GetBucketName(st.FileName) if err != nil { - return nil, fmt.Errorf("awsoss stat file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("aws.s3 stat file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return nil, fmt.Errorf("awsoss stat file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("aws.s3 stat file[%s] fail,err: %s", st.FileName, err.Error()) } input := &s3.HeadObjectInput{ Bucket: &bucket, @@ -228,7 +228,7 @@ func (a *AwsOss) Stat(ctx context.Context, st *file.FileMetaRequest) (*file.File if strings.Contains(err.Error(), "no such key") { return nil, file.ErrNotExist } - return nil, fmt.Errorf("awsoss stat file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("aws.s3 stat file[%s] fail,err: %s", st.FileName, err.Error()) } resp := &file.FileMetaResp{} resp.Size = out.ContentLength diff --git a/components/file/aws/file_test.go b/components/file/aws/file_test.go index 97a0c6a8bc..8edc9f65bf 100644 --- a/components/file/aws/file_test.go +++ b/components/file/aws/file_test.go @@ -74,11 +74,11 @@ func TestAwsOss_Put(t *testing.T) { FileName: "", } err = oss.Put(context.Background(), req) - assert.Equal(t, err.Error(), "awsoss put file[] fail,err: invalid fileName format") + assert.Equal(t, err.Error(), "aws.s3 put file[] fail,err: invalid fileName format") req.FileName = "/a.txt" err = oss.Put(context.Background(), req) - assert.Equal(t, err.Error(), "awsoss put file[/a.txt] fail,err: invalid fileName format") + assert.Equal(t, err.Error(), "aws.s3 put file[/a.txt] fail,err: invalid fileName format") } func TestAwsOss_Get(t *testing.T) { @@ -91,17 +91,17 @@ func TestAwsOss_Get(t *testing.T) { } err = oss.Put(context.Background(), putReq) - assert.Equal(t, err.Error(), "awsoss put file[/a.txt] fail,err: invalid fileName format") + assert.Equal(t, err.Error(), "aws.s3 put file[/a.txt] fail,err: invalid fileName format") req := &file.GetFileStu{ FileName: "", } _, err = oss.Get(context.Background(), req) - assert.Equal(t, err.Error(), "awsoss get file[] fail,err: invalid fileName format") + assert.Equal(t, err.Error(), "aws.s3 get file[] fail,err: invalid fileName format") req.FileName = "/a.txt" _, err = oss.Get(context.Background(), req) - assert.Equal(t, err.Error(), "awsoss get file[/a.txt] fail,err: invalid fileName format") + assert.Equal(t, err.Error(), "aws.s3 get file[/a.txt] fail,err: invalid fileName format") } type fun = func() (string, error) diff --git a/components/file/minio/oss.go b/components/file/minio/oss.go index f105bebc17..5cca66763b 100644 --- a/components/file/minio/oss.go +++ b/components/file/minio/oss.go @@ -91,11 +91,11 @@ func (m *MinioOss) Put(ctx context.Context, st *file.PutFileStu) error { ) bucket, err := util.GetBucketName(st.FileName) if err != nil { - return fmt.Errorf("minioOss put file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("minio put file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return fmt.Errorf("minioOss put file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("minio put file[%s] fail,err: %s", st.FileName, err.Error()) } core, err := m.selectClient(st.Metadata) if err != nil { @@ -118,11 +118,11 @@ func (m *MinioOss) Put(ctx context.Context, st *file.PutFileStu) error { func (m *MinioOss) Get(ctx context.Context, st *file.GetFileStu) (io.ReadCloser, error) { bucket, err := util.GetBucketName(st.FileName) if err != nil { - return nil, fmt.Errorf("minioOss get file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("minio get file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return nil, fmt.Errorf("minioOss get file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("minio get file[%s] fail,err: %s", st.FileName, err.Error()) } core, err := m.selectClient(st.Metadata) if err != nil { @@ -139,7 +139,7 @@ func (m *MinioOss) List(ctx context.Context, st *file.ListRequest) (*file.ListRe bucket, err := util.GetBucketName(st.DirectoryName) marker := "" if err != nil { - return nil, fmt.Errorf("MinioOss list bucket[%s] fail, err: %s", st.DirectoryName, err.Error()) + return nil, fmt.Errorf("minio list bucket[%s] fail, err: %s", st.DirectoryName, err.Error()) } prefix := util.GetFilePrefixName(st.DirectoryName) @@ -168,15 +168,15 @@ func (m *MinioOss) List(ctx context.Context, st *file.ListRequest) (*file.ListRe func (m *MinioOss) Del(ctx context.Context, st *file.DelRequest) error { bucket, err := util.GetBucketName(st.FileName) if err != nil { - return fmt.Errorf("minioOss del file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("minio del file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return fmt.Errorf("minioOss del file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("minio del file[%s] fail,err: %s", st.FileName, err.Error()) } core, err := m.selectClient(st.Metadata) if err != nil { - return fmt.Errorf("minioOss del file[%s] fail,err: %s", st.FileName, err.Error()) + return fmt.Errorf("minio del file[%s] fail,err: %s", st.FileName, err.Error()) } return core.Client.RemoveObject(ctx, bucket, key, minio.RemoveObjectOptions{}) } @@ -184,15 +184,15 @@ func (m *MinioOss) Del(ctx context.Context, st *file.DelRequest) error { func (m *MinioOss) Stat(ctx context.Context, st *file.FileMetaRequest) (*file.FileMetaResp, error) { bucket, err := util.GetBucketName(st.FileName) if err != nil { - return nil, fmt.Errorf("minioOss stat file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("minio stat file[%s] fail,err: %s", st.FileName, err.Error()) } key, err := util.GetFileName(st.FileName) if err != nil { - return nil, fmt.Errorf("minioOss stat file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("minio stat file[%s] fail,err: %s", st.FileName, err.Error()) } core, err := m.selectClient(st.Metadata) if err != nil { - return nil, fmt.Errorf("minioOss stat file[%s] fail,err: %s", st.FileName, err.Error()) + return nil, fmt.Errorf("minio stat file[%s] fail,err: %s", st.FileName, err.Error()) } info, err := core.Client.StatObject(ctx, bucket, key, minio.GetObjectOptions{}) diff --git a/components/file/minio/oss_test.go b/components/file/minio/oss_test.go index 8f8d223f05..afdc13af90 100644 --- a/components/file/minio/oss_test.go +++ b/components/file/minio/oss_test.go @@ -126,7 +126,7 @@ func TestMinioOss_Get(t *testing.T) { } _, err = oss.Get(context.TODO(), getReq) - assert.Equal(t, "minioOss get file[file] fail,err: invalid fileName format", err.Error()) + assert.Equal(t, "minio get file[file] fail,err: invalid fileName format", err.Error()) // client not exist getReq.FileName = "bucketName/file" diff --git a/components/oss/oss.go b/components/oss/oss.go index d5f0a0520d..39c42d35ba 100644 --- a/components/oss/oss.go +++ b/components/oss/oss.go @@ -25,6 +25,8 @@ const ( ServiceName = "oss" ) +// Oss is the interface for ObjectStorageService components. +// For more details about the fields explanation, please refer to the `.proto` file. type Oss interface { Init(context.Context, *Config) error GetObject(context.Context, *GetObjectInput) (*GetObjectOutput, error) diff --git a/configs/config_file.json b/configs/config_file.json index a249163fc8..8cf2cb13eb 100644 --- a/configs/config_file.json +++ b/configs/config_file.json @@ -24,7 +24,7 @@ }, "file": { "file_demo": { - "type": "minioOSS", + "type": "minio", "metadata": [ { "endpoint": "127.0.0.1:9000", diff --git a/configs/config_file_qiniu_oss.json b/configs/config_file_qiniu_oss.json index b9bf5df66d..4e1d7ea38e 100644 --- a/configs/config_file_qiniu_oss.json +++ b/configs/config_file_qiniu_oss.json @@ -24,7 +24,7 @@ }, "file": { "file_demo": { - "type": "qiniuOSS", + "type": "qiniu.oss", "metadata": [ { "endpoint": "", diff --git a/configs/config_file_tencentcloud_oss.json b/configs/config_file_tencentcloud_oss.json index 75bb97de55..c57c8dafae 100644 --- a/configs/config_file_tencentcloud_oss.json +++ b/configs/config_file_tencentcloud_oss.json @@ -24,7 +24,7 @@ }, "files": { "file_demo": { - "type": "tencentCloudOSS", + "type": "tencent.oss", "metadata": [ { "endpoint": "", diff --git a/docker/layotto-minio/config_minio.json b/docker/layotto-minio/config_minio.json index c48302521b..33dae046b2 100644 --- a/docker/layotto-minio/config_minio.json +++ b/docker/layotto-minio/config_minio.json @@ -24,7 +24,7 @@ }, "file": { "file_demo": { - "type": "minioOSS", + "type": "minio", "metadata": [ { "endpoint": "minio:9000", diff --git a/docs/_sidebar.md b/docs/_sidebar.md index 0c81dc3d4a..3094f896b9 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -42,6 +42,7 @@ - API reference - [spec/proto/runtime/v1/runtime.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/runtime_v1.md) - [spec/proto/runtime/v1/appcallback.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/appcallback_v1.md) + - [spec/proto/extension/v1/oss.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/oss_v1.md) - SDK reference - [java sdk](https://github.com/layotto/java-sdk) - [.net sdk](https://github.com/layotto/dotnet-sdk) diff --git a/docs/en/api_reference/oss_v1.md b/docs/en/api_reference/oss_v1.md new file mode 100644 index 0000000000..98da1ebce9 --- /dev/null +++ b/docs/en/api_reference/oss_v1.md @@ -0,0 +1,1658 @@ + + + + +# oss.proto + + +This document is automaticallly generated from the [`.proto`](https://github.com/mosn/layotto/tree/main/spec/proto/runtime/v1) files. + +The file defined base on s3 protocol, to get an in-depth walkthrough of this file, see: +https://docs.aws.amazon.com/s3/index.html +https://github.com/aws/aws-sdk-go-v2 + + + + +## [gRPC Service] ObjectStorageService +ObjectStorageService + +| Method Name | Request Type | Response Type | Description | +| ----------- | ------------ | ------------- | ------------| +| PutObject | [PutObjectInput](#spec.proto.extension.v1.PutObjectInput) stream | [PutObjectOutput](#spec.proto.extension.v1.PutObjectOutput) | Object CRUD API Adds an object to a bucket. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html | +| GetObject | [GetObjectInput](#spec.proto.extension.v1.GetObjectInput) | [GetObjectOutput](#spec.proto.extension.v1.GetObjectOutput) stream | Retrieves objects. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html | +| DeleteObject | [DeleteObjectInput](#spec.proto.extension.v1.DeleteObjectInput) | [DeleteObjectOutput](#spec.proto.extension.v1.DeleteObjectOutput) | Delete objects. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObject.html | +| CopyObject | [CopyObjectInput](#spec.proto.extension.v1.CopyObjectInput) | [CopyObjectOutput](#spec.proto.extension.v1.CopyObjectOutput) | Creates a copy of an object that is already stored in oss server. Refer https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/API/API_CopyObject.html | +| DeleteObjects | [DeleteObjectsInput](#spec.proto.extension.v1.DeleteObjectsInput) | [DeleteObjectsOutput](#spec.proto.extension.v1.DeleteObjectsOutput) | Delete multiple objects from a bucket. Refer https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/API/API_DeleteObjects.html | +| ListObjects | [ListObjectsInput](#spec.proto.extension.v1.ListObjectsInput) | [ListObjectsOutput](#spec.proto.extension.v1.ListObjectsOutput) | Returns some or all (up to 1,000) of the objects in a bucket. Refer https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/API/API_ListObjects.html | +| HeadObject | [HeadObjectInput](#spec.proto.extension.v1.HeadObjectInput) | [HeadObjectOutput](#spec.proto.extension.v1.HeadObjectOutput) | The HEAD action retrieves metadata from an object without returning the object itself. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html | +| IsObjectExist | [IsObjectExistInput](#spec.proto.extension.v1.IsObjectExistInput) | [IsObjectExistOutput](#spec.proto.extension.v1.IsObjectExistOutput) | This action used to check if the file exists. | +| PutObjectTagging | [PutObjectTaggingInput](#spec.proto.extension.v1.PutObjectTaggingInput) | [PutObjectTaggingOutput](#spec.proto.extension.v1.PutObjectTaggingOutput) | Object Tagging API Sets the supplied tag-set to an object that already exists in a bucket. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObjectTagging.html | +| DeleteObjectTagging | [DeleteObjectTaggingInput](#spec.proto.extension.v1.DeleteObjectTaggingInput) | [DeleteObjectTaggingOutput](#spec.proto.extension.v1.DeleteObjectTaggingOutput) | Removes the entire tag set from the specified object. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_DeleteObjectTagging.html | +| GetObjectTagging | [GetObjectTaggingInput](#spec.proto.extension.v1.GetObjectTaggingInput) | [GetObjectTaggingOutput](#spec.proto.extension.v1.GetObjectTaggingOutput) | Returns the tag-set of an object. Refer https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/API/API_GetObjectTagging.html | +| GetObjectCannedAcl | [GetObjectCannedAclInput](#spec.proto.extension.v1.GetObjectCannedAclInput) | [GetObjectCannedAclOutput](#spec.proto.extension.v1.GetObjectCannedAclOutput) | Returns object canned acl. Refer https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#CannedACL | +| PutObjectCannedAcl | [PutObjectCannedAclInput](#spec.proto.extension.v1.PutObjectCannedAclInput) | [PutObjectCannedAclOutput](#spec.proto.extension.v1.PutObjectCannedAclOutput) | Set object canned acl. Refer https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html#CannedACL | +| CreateMultipartUpload | [CreateMultipartUploadInput](#spec.proto.extension.v1.CreateMultipartUploadInput) | [CreateMultipartUploadOutput](#spec.proto.extension.v1.CreateMultipartUploadOutput) | Object Multipart Operation API Initiates a multipart upload and returns an upload ID. Refer https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/API/API_CreateMultipartUpload.html | +| UploadPart | [UploadPartInput](#spec.proto.extension.v1.UploadPartInput) stream | [UploadPartOutput](#spec.proto.extension.v1.UploadPartOutput) | Uploads a part in a multipart upload. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPart.html | +| UploadPartCopy | [UploadPartCopyInput](#spec.proto.extension.v1.UploadPartCopyInput) | [UploadPartCopyOutput](#spec.proto.extension.v1.UploadPartCopyOutput) | Uploads a part by copying data from an existing object as data source. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_UploadPartCopy.html | +| CompleteMultipartUpload | [CompleteMultipartUploadInput](#spec.proto.extension.v1.CompleteMultipartUploadInput) | [CompleteMultipartUploadOutput](#spec.proto.extension.v1.CompleteMultipartUploadOutput) | Completes a multipart upload by assembling previously uploaded parts. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_CompleteMultipartUpload.html | +| AbortMultipartUpload | [AbortMultipartUploadInput](#spec.proto.extension.v1.AbortMultipartUploadInput) | [AbortMultipartUploadOutput](#spec.proto.extension.v1.AbortMultipartUploadOutput) | This action aborts a multipart upload. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_AbortMultipartUpload.html | +| ListMultipartUploads | [ListMultipartUploadsInput](#spec.proto.extension.v1.ListMultipartUploadsInput) | [ListMultipartUploadsOutput](#spec.proto.extension.v1.ListMultipartUploadsOutput) | This action lists in-progress multipart uploads. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListMultipartUploads.html | +| ListParts | [ListPartsInput](#spec.proto.extension.v1.ListPartsInput) | [ListPartsOutput](#spec.proto.extension.v1.ListPartsOutput) | Lists the parts that have been uploaded for a specific multipart upload. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListParts.html | +| ListObjectVersions | [ListObjectVersionsInput](#spec.proto.extension.v1.ListObjectVersionsInput) | [ListObjectVersionsOutput](#spec.proto.extension.v1.ListObjectVersionsOutput) | Returns metadata about all versions of the objects in a bucket. Refer https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectVersions.html | +| SignURL | [SignURLInput](#spec.proto.extension.v1.SignURLInput) | [SignURLOutput](#spec.proto.extension.v1.SignURLOutput) | A presigned URL gives you access to the object identified in the URL, provided that the creator of the presigned URL has permissions to access that object. Refer https://docs.aws.amazon.com/AmazonS3/latest/userguide/PresignedUrlUploadObject.html | +| UpdateDownloadBandwidthRateLimit | [UpdateBandwidthRateLimitInput](#spec.proto.extension.v1.UpdateBandwidthRateLimitInput) | [.google.protobuf.Empty](#google.protobuf.Empty) | This action used to set download bandwidth limit speed. Refer https://github.com/aliyun/aliyun-oss-go-sdk/blob/master/oss/client.go#L2106 | +| UpdateUploadBandwidthRateLimit | [UpdateBandwidthRateLimitInput](#spec.proto.extension.v1.UpdateBandwidthRateLimitInput) | [.google.protobuf.Empty](#google.protobuf.Empty) | This action used to set upload bandwidth limit speed. Refer https://github.com/aliyun/aliyun-oss-go-sdk/blob/master/oss/client.go#L2096 | +| AppendObject | [AppendObjectInput](#spec.proto.extension.v1.AppendObjectInput) stream | [AppendObjectOutput](#spec.proto.extension.v1.AppendObjectOutput) | This action is used to append object. Refer https://help.aliyun.com/document_detail/31981.html or https://github.com/minio/minio-java/issues/980 | +| RestoreObject | [RestoreObjectInput](#spec.proto.extension.v1.RestoreObjectInput) | [RestoreObjectOutput](#spec.proto.extension.v1.RestoreObjectOutput) | Restores an archived copy of an object back. Refer https://docs.aws.amazon.com/zh_cn/AmazonS3/latest/API/API_RestoreObject.html | + + + + + +

Top

+ +## AbortMultipartUploadInput +AbortMultipartUploadInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | +| upload_id | [string](#string) | | Upload ID that identifies the multipart upload. This member is required. | + + + + + + + +

Top

+ +## AbortMultipartUploadOutput +AbortMultipartUploadOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | + + + + + + + +

Top

+ +## AppendObjectInput +AppendObjectInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| body | [bytes](#bytes) | | Object content | +| position | [int64](#int64) | | Append start position | +| acl | [string](#string) | | Object ACL | +| cache_control | [string](#string) | | Sets the Cache-Control header of the response. | +| content_disposition | [string](#string) | | Sets the Content-Disposition header of the response | +| content_encoding | [string](#string) | | Sets the Content-Encoding header of the response | +| content_md5 | [string](#string) | | The base64-encoded 128-bit MD5 digest of the part data. | +| expires | [int64](#int64) | | Sets the Expires header of the response | +| storage_class | [string](#string) | | Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects. | +| server_side_encryption | [string](#string) | | The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms). | +| meta | [string](#string) | | Object metadata | +| tags | [AppendObjectInput.TagsEntry](#spec.proto.extension.v1.AppendObjectInput.TagsEntry) | repeated | Object tags | + + + + + + + +

Top

+ +## AppendObjectInput.TagsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## AppendObjectOutput +AppendObjectOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| append_position | [int64](#int64) | | Next append position | + + + + + + + +

Top

+ +## CompleteMultipartUploadInput +CompleteMultipartUploadInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| upload_id | [string](#string) | | ID for the initiated multipart upload. This member is required. | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | +| expected_bucket_owner | [string](#string) | | Expected bucket owner | +| multipart_upload | [CompletedMultipartUpload](#spec.proto.extension.v1.CompletedMultipartUpload) | | The container for the multipart upload request information. | + + + + + + + +

Top

+ +## CompleteMultipartUploadOutput +CompleteMultipartUploadOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| bucket_key_enabled | [bool](#bool) | | Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS). | +| etag | [string](#string) | | Entity tag that identifies the newly created object's data | +| expiration | [string](#string) | | If the object expiration is configured, this will contain the expiration date (expiry-date) and rule ID (rule-id). The value of rule-id is URL-encoded. | +| location | [string](#string) | | The URI that identifies the newly created object. | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | +| sse_kms_keyId | [string](#string) | | If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object. | +| server_side_encryption | [string](#string) | | The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms). | +| version_id | [string](#string) | | Version ID of the newly created object, in case the bucket has versioning turned on. | + + + + + + + +

Top

+ +## CompletedMultipartUpload +CompletedMultipartUpload + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| parts | [CompletedPart](#spec.proto.extension.v1.CompletedPart) | repeated | Array of CompletedPart data types. | + + + + + + + +

Top

+ +## CompletedPart +CompletedPart + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| etag | [string](#string) | | Entity tag returned when the part was uploaded. | +| part_number | [int32](#int32) | | Part number that identifies the part. This is a positive integer between 1 and 10,000. | + + + + + + + +

Top

+ +## CopyObjectInput +CopyObjectInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The name of the destination bucket. When using this action with an access point This member is required. | +| key | [string](#string) | | The key of the destination object. This member is required. | +| copy_source | [CopySource](#spec.proto.extension.v1.CopySource) | | CopySource | +| tagging | [CopyObjectInput.TaggingEntry](#spec.proto.extension.v1.CopyObjectInput.TaggingEntry) | repeated | The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective. The tag-set must be encoded as URL Query parameters. | +| expires | [int64](#int64) | | The date and time at which the object is no longer cacheable. | +| metadata_directive | [string](#string) | | Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request. | +| metadata | [CopyObjectInput.MetadataEntry](#spec.proto.extension.v1.CopyObjectInput.MetadataEntry) | repeated | A map of metadata to store with the object in S3. | + + + + + + + +

Top

+ +## CopyObjectInput.MetadataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## CopyObjectInput.TaggingEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## CopyObjectOutput +CopyObjectOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| copy_object_result | [CopyObjectResult](#spec.proto.extension.v1.CopyObjectResult) | | Container for all response elements. | +| version_id | [string](#string) | | Version ID of the newly created copy. | +| expiration | [string](#string) | | If the object expiration is configured, the response includes this header. | + + + + + + + +

Top

+ +## CopyObjectResult +CopyObjectResult + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| etag | [string](#string) | | Returns the ETag of the new object. The ETag reflects only changes to the contents of an object, not its metadata. | +| last_modified | [int64](#int64) | | Creation date of the object. | + + + + + + + +

Top

+ +## CopyPartResult +CopyPartResult + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| etag | [string](#string) | | Entity tag of the object. | +| last_modified | [int64](#int64) | | Last modified time | + + + + + + + +

Top

+ +## CopySource +CopySource + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| copy_source_bucket | [string](#string) | | source object bucket name | +| copy_source_key | [string](#string) | | source object name | +| copy_source_version_id | [string](#string) | | source object version | + + + + + + + +

Top

+ +## CreateMultipartUploadInput +CreateMultipartUploadInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| acl | [string](#string) | | The canned ACL to apply to the object. This action is not supported by Amazon S3 on Outposts. | +| bucket_key_enabled | [bool](#bool) | | Specifies whether Amazon S3 should use an S3 Bucket Key for object encryption with server-side encryption using AWS KMS (SSE-KMS). Setting this header to true causes Amazon S3 to use an S3 Bucket Key for object encryption with SSE-KMS. Specifying this header with a PUT action doesn’t affect bucket-level settings for S3 Bucket Key. | +| cache_control | [string](#string) | | Specifies caching behavior along the request/reply chain | +| content_disposition | [string](#string) | | Specifies presentational information for the object | +| content_encoding | [string](#string) | | Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. | +| content_language | [string](#string) | | The language the content is in. | +| content_type | [string](#string) | | A standard MIME type describing the format of the object data. | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied). | +| expires | [int64](#int64) | | The date and time at which the object is no longer cacheable. | +| grant_full_control | [string](#string) | | Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object. This action is not supported by Amazon S3 on Outposts. | +| grant_read | [string](#string) | | Allows grantee to read the object data and its metadata. This action is not supported by Amazon S3 on Outposts. | +| grant_read_acp | [string](#string) | | Allows grantee to read the object ACL. This action is not supported by Amazon S3 on Outposts. | +| grant_write_acp | [string](#string) | | Allows grantee to write the ACL for the applicable object. This action is not supported by Amazon S3 on Outposts. | +| meta_data | [CreateMultipartUploadInput.MetaDataEntry](#spec.proto.extension.v1.CreateMultipartUploadInput.MetaDataEntry) | repeated | A map of metadata to store with the object | +| object_lock_legal_hold_status | [string](#string) | | Specifies whether you want to apply a legal hold to the uploaded object | +| object_lock_mode | [string](#string) | | Specifies the Object Lock mode that you want to apply to the uploaded object | +| object_lock_retain_until_date | [int64](#int64) | | Specifies the date and time when you want the Object Lock to expire | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request | +| sse_customer_algorithm | [string](#string) | | Specifies the algorithm to use to when encrypting the object (for example, AES256). | +| sse_customer_key | [string](#string) | | Specifies the customer-provided encryption key to use in encrypting data | +| sse_customer_key_md5 | [string](#string) | | Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321 | +| sse_kms_encryption_context | [string](#string) | | Specifies the Amazon Web Services KMS Encryption Context to use for object encryption | +| sse_kms_key_id | [string](#string) | | Specifies the ID of the symmetric customer managed key to use for object encryption | +| server_side_encryption | [string](#string) | | The server-side encryption algorithm used when storing this object | +| storage_class | [string](#string) | | By default, oss store uses the STANDARD Storage Class to store newly created objects | +| tagging | [CreateMultipartUploadInput.TaggingEntry](#spec.proto.extension.v1.CreateMultipartUploadInput.TaggingEntry) | repeated | The tag-set for the object. The tag-set must be encoded as URL Query parameters. | +| website_redirect_location | [string](#string) | | If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. | + + + + + + + +

Top

+ +## CreateMultipartUploadInput.MetaDataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## CreateMultipartUploadInput.TaggingEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## CreateMultipartUploadOutput +CreateMultipartUploadOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| abort_date | [int64](#int64) | | If the bucket has a lifecycle rule configured with an action to abort incomplete multipart uploads and the prefix in the lifecycle rule matches the object name in the request, the response includes this header | +| abort_rule_id | [string](#string) | | It identifies the applicable lifecycle configuration rule that defines the action to abort incomplete multipart uploads. | +| bucket_key_enabled | [bool](#bool) | | Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS). | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | +| sse_customer_algorithm | [string](#string) | | If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used. | +| sse_customer_key_md5 | [string](#string) | | If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key. | +| sse_kms_encryption_context | [string](#string) | | If present, specifies the Amazon Web Services KMS Encryption Context to use for object encryption. The value of this header is a base64-encoded UTF-8 string holding JSON with the encryption context key-value pairs. | +| sse_kms_key_id | [string](#string) | | If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object. | +| server_side_encryption | [string](#string) | | The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms). | +| upload_id | [string](#string) | | ID for the initiated multipart upload. | + + + + + + + +

Top

+ +## Delete +Delete + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| objects | [ObjectIdentifier](#spec.proto.extension.v1.ObjectIdentifier) | repeated | ObjectIdentifier | +| quiet | [bool](#bool) | | Element to enable quiet mode for the request. When you add this element, you must set its value to true. | + + + + + + + +

Top

+ +## DeleteMarkerEntry +DeleteMarkerEntry + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| is_latest | [bool](#bool) | | Specifies whether the object is (true) or is not (false) the latest version of an object. | +| key | [string](#string) | | Name of the object key. This member is required. | +| last_modified | [int64](#int64) | | Date and time the object was last modified. | +| owner | [Owner](#spec.proto.extension.v1.Owner) | | Owner | +| version_id | [string](#string) | | Version ID of an object. | + + + + + + + +

Top

+ +## DeleteObjectInput +DeleteObjectInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name to which the DEL action was initiated This member is required. | +| key | [string](#string) | | Object key for which the DEL action was initiated. This member is required. | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | +| version_id | [string](#string) | | VersionId used to reference a specific version of the object. | + + + + + + + +

Top

+ +## DeleteObjectOutput +DeleteObjectOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| delete_marker | [bool](#bool) | | Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker. | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | +| version_id | [string](#string) | | Returns the version ID of the delete marker created as a result of the DELETE operation. | + + + + + + + +

Top

+ +## DeleteObjectTaggingInput +DeleteObjectTaggingInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the objects from which to remove the tags. | +| key | [string](#string) | | The key that identifies the object in the bucket from which to remove all tags. This member is required. | +| version_id | [string](#string) | | The versionId of the object that the tag-set will be removed from. | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied). | + + + + + + + +

Top

+ +## DeleteObjectTaggingOutput +DeleteObjectTaggingOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| version_id | [string](#string) | | The versionId of the object the tag-set was removed from. | +| result_metadata | [DeleteObjectTaggingOutput.ResultMetadataEntry](#spec.proto.extension.v1.DeleteObjectTaggingOutput.ResultMetadataEntry) | repeated | Metadata pertaining to the operation's result. | + + + + + + + +

Top

+ +## DeleteObjectTaggingOutput.ResultMetadataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## DeleteObjectsInput +DeleteObjectsInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| delete | [Delete](#spec.proto.extension.v1.Delete) | | Delete objects | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | + + + + + + + +

Top

+ +## DeleteObjectsOutput +DeleteObjectsOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| deleted | [DeletedObject](#spec.proto.extension.v1.DeletedObject) | repeated | DeletedObject | + + + + + + + +

Top

+ +## DeletedObject +DeletedObject + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| delete_marker | [bool](#bool) | | Specifies whether the versioned object that was permanently deleted was (true) or was not (false) a delete marker. In a simple DELETE, this header indicates whether (true) or not (false) a delete marker was created. | +| delete_marker_version_id | [string](#string) | | The version ID of the delete marker created as a result of the DELETE operation. If you delete a specific object version, the value returned by this header is the version ID of the object version deleted. | +| key | [string](#string) | | The name of the deleted object. | +| version_id | [string](#string) | | The version ID of the deleted object. | + + + + + + + +

Top

+ +## GetObjectCannedAclInput +GetObjectCannedAclInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| version_id | [string](#string) | | VersionId used to reference a specific version of the object | + + + + + + + +

Top

+ +## GetObjectCannedAclOutput +GetObjectCannedAclOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| canned_acl | [string](#string) | | Object CannedACL | +| owner | [Owner](#spec.proto.extension.v1.Owner) | | Owner | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | + + + + + + + +

Top

+ +## GetObjectInput +GetObjectInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Key of the object to get This member is required | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner | +| if_match | [string](#string) | | Return the object only if its entity tag (ETag) is the same as the one specified | +| if_modified_since | [int64](#int64) | | Return the object only if it has been modified since the specified time | +| if_none_match | [string](#string) | | Return the object only if its entity tag (ETag) is different from the one specified | +| if_unmodified_since | [int64](#int64) | | Return the object only if it has not been modified since the specified time | +| part_number | [int64](#int64) | | Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' GET request for the part specified. Useful for downloading just a part of an object. | +| start | [int64](#int64) | | Downloads the specified range bytes of an object start is used to specify the location where the file starts | +| end | [int64](#int64) | | end is used to specify the location where the file end | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | +| response_cache_control | [string](#string) | | Sets the Cache-Control header of the response. | +| response_content_disposition | [string](#string) | | Sets the Content-Disposition header of the response | +| response_content_encoding | [string](#string) | | Sets the Content-Encoding header of the response | +| response_content_language | [string](#string) | | Sets the Content-Language header of the response | +| response_content_type | [string](#string) | | Sets the Content-Type header of the response | +| response_expires | [string](#string) | | Sets the Expires header of the response | +| sse_customer_algorithm | [string](#string) | | Specifies the algorithm to use to when decrypting the object (for example,AES256) | +| sse_customer_key | [string](#string) | | Specifies the customer-provided encryption key for Amazon S3 used to encrypt the data. This value is used to decrypt the object when recovering it and must match the one used when storing the data. The key must be appropriate for use with the algorithm specified in the x-amz-server-side-encryption-customer-algorithm header | +| sse_customer_key_md5 | [string](#string) | | Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321 Amazon S3 uses this header for a message integrity check to ensure that the encryption key was transmitted without error. | +| version_id | [string](#string) | | VersionId used to reference a specific version of the object | +| accept_encoding | [string](#string) | | Specify Accept-Encoding, aws not supported now | +| signed_url | [string](#string) | | Specify the signed url of object, user can get object with signed url without ak、sk | + + + + + + + +

Top

+ +## GetObjectOutput +GetObjectOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| body | [bytes](#bytes) | | Object data. | +| cache_control | [string](#string) | | Specifies caching behavior along the request/reply chain. | +| content_disposition | [string](#string) | | Specifies presentational information for the object. | +| content_encoding | [string](#string) | | Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. | +| content_language | [string](#string) | | The language the content is in. | +| content_length | [int64](#int64) | | Size of the body in bytes. | +| content_range | [string](#string) | | The portion of the object returned in the response. | +| content_type | [string](#string) | | A standard MIME type describing the format of the object data. | +| delete_marker | [bool](#bool) | | Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. If false, this response header does not appear in the response. | +| etag | [string](#string) | | An entity tag (ETag) is an opaque identifier assigned by a web server to a specific version of a resource found at a URL. | +| expiration | [string](#string) | | If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. It includes the expiry-date and rule-id key-value pairs providing object expiration information. The value of the rule-id is URL-encoded. | +| expires | [string](#string) | | The date and time at which the object is no longer cacheable. | +| last_modified | [int64](#int64) | | Creation date of the object. | +| version_id | [string](#string) | | Version of the object. | +| tag_count | [int64](#int64) | | The number of tags, if any, on the object. | +| storage_class | [string](#string) | | Provides storage class information of the object. Amazon S3 returns this header for all objects except for S3 Standard storage class objects. | +| parts_count | [int64](#int64) | | The count of parts this object has. This value is only returned if you specify partNumber in your request and the object was uploaded as a multipart upload. | +| metadata | [GetObjectOutput.MetadataEntry](#spec.proto.extension.v1.GetObjectOutput.MetadataEntry) | repeated | A map of metadata to store with the object in S3. Map keys will be normalized to lower-case. | + + + + + + + +

Top

+ +## GetObjectOutput.MetadataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## GetObjectTaggingInput +GetObjectTaggingInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object for which to get the tagging information. This member is required. | +| key | [string](#string) | | Object key for which to get the tagging information. This member is required. | +| version_id | [string](#string) | | The versionId of the object for which to get the tagging information. | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied). | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | + + + + + + + +

Top

+ +## GetObjectTaggingOutput +GetObjectTaggingOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| tags | [GetObjectTaggingOutput.TagsEntry](#spec.proto.extension.v1.GetObjectTaggingOutput.TagsEntry) | repeated | Contains the tag set. This member is required. | +| version_id | [string](#string) | | The versionId of the object for which you got the tagging information. | +| result_metadata | [GetObjectTaggingOutput.ResultMetadataEntry](#spec.proto.extension.v1.GetObjectTaggingOutput.ResultMetadataEntry) | repeated | Metadata pertaining to the operation's result. | + + + + + + + +

Top

+ +## GetObjectTaggingOutput.ResultMetadataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## GetObjectTaggingOutput.TagsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## HeadObjectInput +HeadObjectInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| checksum_mode | [string](#string) | | To retrieve the checksum, this parameter must be enabled | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner | +| if_match | [string](#string) | | Return the object only if its entity tag (ETag) is the same as the one specified; otherwise, return a 412 (precondition failed) error. | +| if_modified_since | [int64](#int64) | | Return the object only if it has been modified since the specified time; otherwise, return a 304 (not modified) error. | +| if_none_match | [string](#string) | | Return the object only if its entity tag (ETag) is different from the one specified | +| if_unmodified_since | [int64](#int64) | | Return the object only if it has not been modified since the specified time; | +| part_number | [int32](#int32) | | Part number of the object being read. This is a positive integer between 1 and 10,000. Effectively performs a 'ranged' HEAD request for the part specified. Useful querying about the size of the part and the number of parts in this object. | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | +| sse_customer_algorithm | [string](#string) | | Specifies the algorithm to use to when encrypting the object (for example, AES256). | +| sse_customer_key | [string](#string) | | Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data | +| sse_customer_key_md5 | [string](#string) | | Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | +| version_id | [string](#string) | | VersionId used to reference a specific version of the object. | +| with_details | [bool](#bool) | | Return object details meta | + + + + + + + +

Top

+ +## HeadObjectOutput +HeadObjectOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| result_metadata | [HeadObjectOutput.ResultMetadataEntry](#spec.proto.extension.v1.HeadObjectOutput.ResultMetadataEntry) | repeated | Metadata pertaining to the operation's result. | + + + + + + + +

Top

+ +## HeadObjectOutput.ResultMetadataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## Initiator +Initiator + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| display_name | [string](#string) | | Initiator name | +| id | [string](#string) | | Initiator id | + + + + + + + +

Top

+ +## IsObjectExistInput +IsObjectExistInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| version_id | [string](#string) | | Object version id | + + + + + + + +

Top

+ +## IsObjectExistOutput +IsObjectExistOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| file_exist | [bool](#bool) | | Object exist or not | + + + + + + + +

Top

+ +## ListMultipartUploadsInput +ListMultipartUploadsInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| delimiter | [string](#string) | | Character you use to group keys. All keys that contain the same string between the prefix, if specified, and the first occurrence of the delimiter after the prefix are grouped under a single result element, CommonPrefixes. If you don't specify the prefix parameter, then the substring starts at the beginning of the key. The keys that are grouped under CommonPrefixes result element are not returned elsewhere in the response. | +| encoding_type | [string](#string) | | Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner | +| key_marker | [string](#string) | | Together with upload-id-marker, this parameter specifies the multipart upload after which listing should begin. If upload-id-marker is not specified, only the keys lexicographically greater than the specified key-marker will be included in the list. If upload-id-marker is specified, any multipart uploads for a key equal to the key-marker might also be included, provided those multipart uploads have upload IDs lexicographically greater than the specified upload-id-marker. | +| max_uploads | [int64](#int64) | | Sets the maximum number of multipart uploads, from 1 to 1,000, to return in the response body. 1,000 is the maximum number of uploads that can be returned in a response. | +| prefix | [string](#string) | | Lists in-progress uploads only for those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different grouping of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) | +| upload_id_marker | [string](#string) | | Together with key-marker, specifies the multipart upload after which listing should begin. If key-marker is not specified, the upload-id-marker parameter is ignored. Otherwise, any multipart uploads for a key equal to the key-marker might be included in the list only if they have an upload ID lexicographically greater than the specified upload-id-marker. | + + + + + + + +

Top

+ +## ListMultipartUploadsOutput +ListMultipartUploadsOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| common_prefixes | [string](#string) | repeated | If you specify a delimiter in the request, then the result returns each distinct key prefix containing the delimiter in a CommonPrefixes element. | +| delimiter | [string](#string) | | Contains the delimiter you specified in the request. If you don't specify a delimiter in your request, this element is absent from the response. | +| encoding_type | [string](#string) | | Encoding type used by Amazon S3 to encode object keys in the response. | +| is_truncated | [bool](#bool) | | Indicates whether the returned list of multipart uploads is truncated. A value of true indicates that the list was truncated. The list can be truncated if the number of multipart uploads exceeds the limit allowed or specified by max uploads. | +| key_marker | [string](#string) | | The key at or after which the listing began. | +| max_uploads | [int32](#int32) | | Maximum number of multipart uploads that could have been included in the response. | +| next_key_marker | [string](#string) | | When a list is truncated, this element specifies the value that should be used for the key-marker request parameter in a subsequent request. | +| next_upload_id_marker | [string](#string) | | When a list is truncated, this element specifies the value that should be used for the upload-id-marker request parameter in a subsequent request. | +| prefix | [string](#string) | | When a prefix is provided in the request, this field contains the specified prefix. The result contains only keys starting with the specified prefix. | +| upload_id_marker | [string](#string) | | Upload ID after which listing began. | +| uploads | [MultipartUpload](#spec.proto.extension.v1.MultipartUpload) | repeated | Container for elements related to a particular multipart upload. A response can contain zero or more Upload elements. | + + + + + + + +

Top

+ +## ListObjectVersionsInput +ListObjectVersionsInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| delimiter | [string](#string) | | A delimiter is a character that you specify to group keys. All keys that contain the same string between the prefix and the first occurrence of the delimiter are grouped under a single result element in CommonPrefixes. These groups are counted as one result against the max-keys limitation. These keys are not returned elsewhere in the response. | +| encoding_type | [string](#string) | | Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner | +| key_marker | [string](#string) | | Specifies the key to start with when listing objects in a bucket. | +| max_keys | [int64](#int64) | | Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. If additional keys satisfy the search criteria, but were not returned because max-keys was exceeded, the response contains true. To return the additional keys, see key-marker and version-id-marker. | +| prefix | [string](#string) | | Use this parameter to select only those keys that begin with the specified prefix. You can use prefixes to separate a bucket into different groupings of keys. (You can think of using prefix to make groups in the same way you'd use a folder in a file system.) You can use prefix with delimiter to roll up numerous objects into a single result under CommonPrefixes. | +| version_id_marker | [string](#string) | | Specifies the object version you want to start listing from. | + + + + + + + +

Top

+ +## ListObjectVersionsOutput +ListObjectVersionsOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| common_prefixes | [string](#string) | repeated | All of the keys rolled up into a common prefix count as a single return when calculating the number of returns. | +| delete_markers | [DeleteMarkerEntry](#spec.proto.extension.v1.DeleteMarkerEntry) | repeated | Container for an object that is a delete marker. | +| delimiter | [string](#string) | | The delimiter grouping the included keys. | +| encoding_type | [string](#string) | | Encoding type used by Amazon S3 to encode object key names in the XML response. | +| is_truncated | [bool](#bool) | | A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria | +| key_marker | [string](#string) | | Marks the last key returned in a truncated response. | +| max_keys | [int64](#int64) | | Specifies the maximum number of objects to return | +| name | [string](#string) | | The bucket name. | +| next_key_marker | [string](#string) | | When the number of responses exceeds the value of MaxKeys, NextKeyMarker specifies the first key not returned that satisfies the search criteria | +| next_version_id_marker | [string](#string) | | When the number of responses exceeds the value of MaxKeys, NextVersionIdMarker specifies the first object version not returned that satisfies the search criteria. | +| prefix | [string](#string) | | Selects objects that start with the value supplied by this parameter. | +| version_id_marker | [string](#string) | | Marks the last version of the key returned in a truncated response. | +| versions | [ObjectVersion](#spec.proto.extension.v1.ObjectVersion) | repeated | Container for version information. | + + + + + + + +

Top

+ +## ListObjectsInput +ListObjectsInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| delimiter | [string](#string) | | A delimiter is a character you use to group keys. | +| encoding_type | [string](#string) | | Requests Amazon S3 to encode the object keys in the response and specifies the encoding method to use. An object key may contain any Unicode character; however, XML 1.0 parser cannot parse some characters, such as characters with an ASCII value from 0 to 10. For characters that are not supported in XML 1.0, you can add this parameter to request that Amazon S3 encode the keys in the response. | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner. If the bucket is owned by a different account, the request fails with the HTTP status code 403 Forbidden (access denied). | +| marker | [string](#string) | | Marker is where you want Amazon S3 to start listing from. Amazon S3 starts listing after this specified key. Marker can be any key in the bucket. | +| maxKeys | [int32](#int32) | | Sets the maximum number of keys returned in the response. By default the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. | +| prefix | [string](#string) | | Limits the response to keys that begin with the specified prefix. | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | + + + + + + + +

Top

+ +## ListObjectsOutput +ListObjectsOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| common_prefixes | [string](#string) | repeated | CommonPrefixes | +| contents | [Object](#spec.proto.extension.v1.Object) | repeated | Objects contents | +| delimiter | [string](#string) | | Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value. | +| encoding_type | [string](#string) | | Encoding type used by Amazon S3 to encode object keys in the response. | +| is_truncated | [bool](#bool) | | A flag that indicates whether Amazon S3 returned all of the results that satisfied the search criteria. | +| marker | [string](#string) | | Indicates where in the bucket listing begins. Marker is included in the response if it was sent with the request. | +| max_keys | [int32](#int32) | | The maximum number of keys returned in the response body. | +| name | [string](#string) | | The bucket name. | +| next_marker | [string](#string) | | When response is truncated (the IsTruncated element value in the response is true), you can use the key name in this field as marker in the subsequent request to get next set of objects. | +| prefix | [string](#string) | | Keys that begin with the indicated prefix. | + + + + + + + +

Top

+ +## ListPartsInput +ListPartsInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner | +| max_parts | [int64](#int64) | | Sets the maximum number of parts to return | +| part_number_marker | [int64](#int64) | | Specifies the part after which listing should begin. Only parts with higher part numbers will be listed. | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | +| upload_id | [string](#string) | | Upload ID identifying the multipart upload whose parts are being listed. | + + + + + + + +

Top

+ +## ListPartsOutput +ListPartsOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| upload_id | [string](#string) | | Upload ID identifying the multipart upload whose parts are being listed. | +| next_part_number_marker | [string](#string) | | When a list is truncated, this element specifies the last part in the list, as well as the value to use for the part-number-marker request parameter in a subsequent request. | +| max_parts | [int64](#int64) | | Maximum number of parts that were allowed in the response. | +| is_truncated | [bool](#bool) | | Indicates whether the returned list of parts is truncated. A true value indicates that the list was truncated. A list can be truncated if the number of parts exceeds the limit returned in the MaxParts element. | +| parts | [Part](#spec.proto.extension.v1.Part) | repeated | Container for elements related to a particular part. A response can contain zero or more Part elements. | + + + + + + + +

Top

+ +## MultipartUpload +MultipartUpload + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| initiated | [int64](#int64) | | Date and time at which the multipart upload was initiated. | +| initiator | [Initiator](#spec.proto.extension.v1.Initiator) | | Identifies who initiated the multipart upload. | +| key | [string](#string) | | Name of the object key. This member is required. | +| owner | [Owner](#spec.proto.extension.v1.Owner) | | Specifies the owner of the object that is part of the multipart upload. | +| storage_class | [string](#string) | | The class of storage used to store the object. | +| upload_id | [string](#string) | | Upload ID that identifies the multipart upload. | + + + + + + + +

Top

+ +## Object +Object + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| etag | [string](#string) | | The entity tag is a hash of the object | +| key | [string](#string) | | The name that you assign to an object. You use the object key to retrieve the object. | +| last_modified | [int64](#int64) | | Creation date of the object. | +| owner | [Owner](#spec.proto.extension.v1.Owner) | | The owner of the object | +| size | [int64](#int64) | | Size in bytes of the object | +| storage_class | [string](#string) | | The class of storage used to store the object. | + + + + + + + +

Top

+ +## ObjectIdentifier +ObjectIdentifier + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | Key name of the object. This member is required. | +| version_id | [string](#string) | | VersionId for the specific version of the object to delete. | + + + + + + + +

Top

+ +## ObjectVersion +ObjectVersion + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| etag | [string](#string) | | The entity tag is an MD5 hash of that version of the object. | +| is_latest | [bool](#bool) | | Specifies whether the object is (true) or is not (false) the latest version of an object. | +| key | [string](#string) | | Name of the object key. This member is required. | +| last_modified | [int64](#int64) | | Date and time the object was last modified. | +| owner | [Owner](#spec.proto.extension.v1.Owner) | | Specifies the owner of the object. | +| size | [int64](#int64) | | Size in bytes of the object. | +| storage_class | [string](#string) | | The class of storage used to store the object. | +| version_id | [string](#string) | | Version ID of an object. | + + + + + + + +

Top

+ +## Owner +Owner + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| display_name | [string](#string) | | Owner display name | +| id | [string](#string) | | Owner id | + + + + + + + +

Top

+ +## Part +Part + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| etag | [string](#string) | | Part Etag | +| last_modified | [int64](#int64) | | Last modified time | +| part_number | [int64](#int64) | | Part number | +| size | [int64](#int64) | | Part size | + + + + + + + +

Top

+ +## PutObjectCannedAclInput +PutObjectCannedAclInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| acl | [string](#string) | | The canned ACL to apply to the object | +| version_id | [string](#string) | | VersionId used to reference a specific version of the object. | + + + + + + + +

Top

+ +## PutObjectCannedAclOutput +PutObjectCannedAclOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| request_charged | [string](#string) | | Request charged | + + + + + + + +

Top

+ +## PutObjectInput +PutObjectInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| body | [bytes](#bytes) | | Object data. | +| bucket | [string](#string) | | The bucket name to which the PUT action was initiated This member is required. | +| key | [string](#string) | | Object key for which the PUT action was initiated. This member is required. | +| acl | [string](#string) | | The canned ACL to apply to the object,different oss provider have different acl type | +| bucket_key_enabled | [bool](#bool) | | Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS). | +| cache_control | [string](#string) | | Can be used to specify caching behavior along the request/reply chain. | +| content_disposition | [string](#string) | | Specifies presentational information for the object. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1). | +| content_encoding | [string](#string) | | Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11). | +| expires | [int64](#int64) | | The date and time at which the object is no longer cacheable. For more information, see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 (http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21). | +| server_side_encryption | [string](#string) | | The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms). | +| signed_url | [string](#string) | | Specify the signed url of object, user can put object with signed url without ak、sk | +| meta | [PutObjectInput.MetaEntry](#spec.proto.extension.v1.PutObjectInput.MetaEntry) | repeated | A map of metadata to store with the object in S3. | +| tagging | [PutObjectInput.TaggingEntry](#spec.proto.extension.v1.PutObjectInput.TaggingEntry) | repeated | The tag-set for the object. The tag-set must be encoded as URL Query parameters. | + + + + + + + +

Top

+ +## PutObjectInput.MetaEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## PutObjectInput.TaggingEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## PutObjectOutput +PutObjectOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bucket_key_enabled | [bool](#bool) | | Indicates whether the uploaded object uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS). | +| etag | [string](#string) | | Entity tag for the uploaded object. | +| expiration | [string](#string) | | If the expiration is configured for the object | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | +| version_id | [string](#string) | | Version of the object. | + + + + + + + +

Top

+ +## PutObjectTaggingInput +PutObjectTaggingInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required. | +| key | [string](#string) | | Name of the object key. This member is required. | +| tags | [PutObjectTaggingInput.TagsEntry](#spec.proto.extension.v1.PutObjectTaggingInput.TagsEntry) | repeated | Container for the TagSet and Tag elements | +| version_id | [string](#string) | | The versionId of the object that the tag-set will be added to. | + + + + + + + +

Top

+ +## PutObjectTaggingInput.TagsEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## PutObjectTaggingOutput +PutObjectTaggingOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| version_id | [string](#string) | | The versionId of the object the tag-set was added to. | +| result_metadata | [PutObjectTaggingOutput.ResultMetadataEntry](#spec.proto.extension.v1.PutObjectTaggingOutput.ResultMetadataEntry) | repeated | Metadata pertaining to the operation's result. | + + + + + + + +

Top

+ +## PutObjectTaggingOutput.ResultMetadataEntry + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| key | [string](#string) | | | +| value | [string](#string) | | | + + + + + + + +

Top

+ +## RestoreObjectInput +RestoreObjectInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| version_id | [string](#string) | | VersionId used to reference a specific version of the object. | + + + + + + + +

Top

+ +## RestoreObjectOutput +RestoreObjectOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | +| restore_output_path | [string](#string) | | Indicates the path in the provided S3 output location where Select results will be restored to. | + + + + + + + +

Top

+ +## SignURLInput +SignURLInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| method | [string](#string) | | the method for sign url, eg. GET、POST | +| expired_in_sec | [int64](#int64) | | expire time of the sign url | + + + + + + + +

Top

+ +## SignURLOutput +SignURLOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| signed_url | [string](#string) | | Object signed url | + + + + + + + +

Top

+ +## UpdateBandwidthRateLimitInput +UpdateBandwidthRateLimitInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| average_rate_limit_in_bits_per_sec | [int64](#int64) | | The average upload/download bandwidth rate limit in bits per second. | +| gateway_resource_name | [string](#string) | | Resource name of gateway | + + + + + + + +

Top

+ +## UploadPartCopyInput +UploadPartCopyInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| copy_source | [CopySource](#spec.proto.extension.v1.CopySource) | | CopySource | +| part_number | [int32](#int32) | | Part number of part being copied. This is a positive integer between 1 and 10,000. This member is required. | +| upload_id | [string](#string) | | Upload ID identifying the multipart upload whose part is being copied. This member is required. | +| start_position | [int64](#int64) | | The range of bytes to copy from the source object.bytes=start_position-part_size | +| part_size | [int64](#int64) | | Part size | + + + + + + + +

Top

+ +## UploadPartCopyOutput +UploadPartCopyOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bucket_key_enabled | [bool](#bool) | | Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS). | +| copy_part_result | [CopyPartResult](#spec.proto.extension.v1.CopyPartResult) | | Container for all response elements. | +| copy_source_version_id | [string](#string) | | The version of the source object that was copied, if you have enabled versioning on the source bucket. | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | +| sse_customer_algorithm | [string](#string) | | If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used. | +| sse_customer_key_md5 | [string](#string) | | If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round-trip message integrity verification of the customer-provided encryption key. | +| sse_kms_key_id | [string](#string) | | If present, specifies the ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) symmetric customer managed key that was used for the object. | +| server_side_encryption | [string](#string) | | The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms). | + + + + + + + +

Top

+ +## UploadPartInput +UploadPartInput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| store_name | [string](#string) | | Required. The name of oss store. | +| bucket | [string](#string) | | The bucket name containing the object This member is required | +| key | [string](#string) | | Name of the object key. This member is required. | +| body | [bytes](#bytes) | | Object data. | +| content_length | [int64](#int64) | | Size of the body in bytes. This parameter is useful when the size of the body cannot be determined automatically. | +| content_md5 | [string](#string) | | The base64-encoded 128-bit MD5 digest of the part data. | +| expected_bucket_owner | [string](#string) | | The account ID of the expected bucket owner | +| part_number | [int32](#int32) | | Part number of part being uploaded. This is a positive integer between 1 and 10,000. This member is required. | +| request_payer | [string](#string) | | Confirms that the requester knows that they will be charged for the request. | +| sse_customer_algorithm | [string](#string) | | Specifies the algorithm to use to when encrypting the object (for example, AES256). | +| sse_customer_key | [string](#string) | | Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data | +| sse_customer_key_md5 | [string](#string) | | Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | +| upload_id | [string](#string) | | Upload ID identifying the multipart upload whose part is being uploaded. This member is required. | + + + + + + + +

Top

+ +## UploadPartOutput +UploadPartOutput + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| bucket_key_enabled | [bool](#bool) | | Indicates whether the multipart upload uses an S3 Bucket Key for server-side encryption with Amazon Web Services KMS (SSE-KMS). | +| etag | [string](#string) | | Entity tag for the uploaded object. | +| request_charged | [string](#string) | | If present, indicates that the requester was successfully charged for the request. | +| sse_customer_algorithm | [string](#string) | | Specifies the algorithm to use to when encrypting the object (for example, AES256). | +| sse_customer_key_md5 | [string](#string) | | Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321. | +| sse_kms_key_id | [string](#string) | | Specifies the ID of the symmetric customer managed key to use for object encryption | +| server_side_encryption | [string](#string) | | The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms). | + + + + + + + + + + + diff --git a/docs/zh/_sidebar.md b/docs/zh/_sidebar.md index 94d0104a6e..4bcaa128af 100644 --- a/docs/zh/_sidebar.md +++ b/docs/zh/_sidebar.md @@ -46,8 +46,6 @@ - 可扩展性 - [API插件](zh/design/api_plugin/design.md) - [gRPC API 接口文档](zh/api_reference/README.md) - - [spec/proto/runtime/v1/runtime.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/runtime_v1.md) - - [spec/proto/runtime/v1/appcallback.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/appcallback_v1.md) - SDK文档 - [java sdk](https://github.com/layotto/java-sdk) - [.net sdk](https://github.com/layotto/dotnet-sdk) diff --git a/docs/zh/api_reference/README.md b/docs/zh/api_reference/README.md index ec781e0647..055088c368 100644 --- a/docs/zh/api_reference/README.md +++ b/docs/zh/api_reference/README.md @@ -9,3 +9,7 @@ Layotto 有两个 gRPC proto 文件, 对应的接口文档在: - [spec/proto/runtime/v1/appcallback.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/appcallback_v1.md) 该接口需要由 App 来实现,用来处理 pubsub 订阅消息 + +- [spec/proto/extension/v1/oss.proto](https://github.com/mosn/layotto/blob/main/docs/en/api_reference/oss_v1.md) + +该接口为 OSS(ObjectStorageService) API, 即对象存储 API diff --git a/docs/zh/blog/code/start_process/start_process.md b/docs/zh/blog/code/start_process/start_process.md index b9e41b6e3a..4f23a75e77 100644 --- a/docs/zh/blog/code/start_process/start_process.md +++ b/docs/zh/blog/code/start_process/start_process.md @@ -74,12 +74,12 @@ func NewRuntimeGrpcServer(data json.RawMessage, opts ...grpc.ServerOption) (mgrp // 4. 添加所有组件的初始化函数 // 我们只看下File组件的,将NewXXX()添加到组件Factory里 runtime.WithFileFactory( - file.NewFileFactory("aliOSS", alicloud.NewAliCloudOSS), - file.NewFileFactory("minioOSS", minio.NewMinioOss), - file.NewFileFactory("awsOSS", aws.NewAwsOss), - file.NewFileFactory("tencentCloudOSS", tencentcloud.NewTencentCloudOSS), + file.NewFileFactory("aliyun.oss", alicloud.NewAliCloudOSS), + file.NewFileFactory("minio", minio.NewMinioOss), + file.NewFileFactory("aws.s3", aws.NewAwsOss), + file.NewFileFactory("tencent.oss", tencentcloud.NewTencentCloudOSS), file.NewFileFactory("local", local.NewLocalStore), - file.NewFileFactory("qiniuOSS", qiniu.NewQiniuOSS), + file.NewFileFactory("qiniu.oss", qiniu.NewQiniuOSS), ), ... return server, err diff --git a/docs/zh/component_specs/file/common.md b/docs/zh/component_specs/file/common.md index a202a0bf30..ada5fc9420 100644 --- a/docs/zh/component_specs/file/common.md +++ b/docs/zh/component_specs/file/common.md @@ -7,7 +7,7 @@ json配置文件有如下结构: ```json "file": { "file_demo": { - "type": "aliOSS" + "type": "aliyun.oss" "metadata":[ { "endpoint": "endpoint_address", @@ -34,7 +34,7 @@ json配置文件有如下结构: Files map[string]file.FileConfig `json:"file"` ``` -上面的Files是一个map,key为component的名字,比如上述json的aliOSS,component的配置没有具体的格式限制,不同component可以根据需求自己定义,比如: +上面的Files是一个map,key为component的名字,比如上述json的aliyun.oss,component的配置没有具体的格式限制,不同component可以根据需求自己定义,比如: ```json "file": { diff --git a/docs/zh/design/file/file-design.md b/docs/zh/design/file/file-design.md index e907cb826c..4eebc4712a 100644 --- a/docs/zh/design/file/file-design.md +++ b/docs/zh/design/file/file-design.md @@ -75,7 +75,7 @@ Get的入参主要有三个: | **参数名** | **意义** | **是否必传** | | --- | --- | --- | --- | --- | --- | --- | -| store_name | 后端对应的components(eg: aliOSS, awsOSS) | yes | +| store_name | 后端对应的components(eg: aliyun.oss, aws.s3) | yes | | name | 文件名字 | yes| | metadata | 元数据,该字段用户可以用来指定component需要的一些字段,(eg:权限,用户名等) | yes| @@ -85,7 +85,7 @@ Put接口入参主要有三个,多了一个data字段用来传输文件内容 | **参数名** | **意义** | **是否必传** | | --- | --- | --- | --- | --- | --- | --- | -| store_name | 后端对应的components(eg: aliOSS, awsOSS) | yes | +| store_name | 后端对应的components(eg: aliyun.oss, aws.s3) | yes | | name | 文件名字 | yes| | data | 文件内容 | no(允许用户上传空数据,每个component可以做具体实现)| | metadata | 元数据,该字段用户可以用来指定component需要的一些字段,(eg:权限,用户名等) | yes| @@ -97,20 +97,20 @@ Put接口入参主要有三个,多了一个data字段用来传输文件内容 | **参数名** | **意义** | **是否必传** | | --- | --- | --- | --- | --- | --- | --- | -| store_name | 后端对应的components(eg: aliOSS, awsOSS) | yes | +| store_name | 后端对应的components(eg: aliyun.oss, aws.s3) | yes | | name | 文件名字 | yes| | metadata | 元数据,该字段用户可以用来指定component需要的一些字段,(eg:权限,用户名等) | yes| ### 配置参数 -配置参数,不同的component可以配置不同格式,比如aliOSS的配置如下: +配置参数,不同的component可以配置不同格式,比如aliyun.oss的配置如下: ```protobuf { "file": { "file_demo": { - "type": "aliOSS", + "type": "aliyun.oss", "metadata":[ { "endpoint": "endpoint_address", diff --git a/docs/zh/start/file/minio.md b/docs/zh/start/file/minio.md index bc7e4ad237..69292586fa 100644 --- a/docs/zh/start/file/minio.md +++ b/docs/zh/start/file/minio.md @@ -38,7 +38,7 @@ layotto提供了minio的配置文件[oss配置](https://github.com/mosn/layotto/ ```json "file": { - "minioOSS": { + "minio": { "metadata":[ { "endpoint": "play.min.io", diff --git a/make/proto.mk b/make/proto.mk index b822bf2512..8231ddca25 100644 --- a/make/proto.mk +++ b/make/proto.mk @@ -21,6 +21,11 @@ proto.gen.doc: -v $(ROOT_DIR)/docs/en/api_reference:/out \ -v $(ROOT_DIR)/spec/proto/runtime/v1:/protos \ pseudomuto/protoc-gen-doc --doc_opt=/protos/template.tmpl,appcallback_v1.md appcallback.proto + $(DOCKER) run --rm \ + -v $(ROOT_DIR)/docs/en/api_reference:/out \ + -v $(ROOT_DIR)/spec/proto/extension/v1:/protos \ + -v $(ROOT_DIR)/spec/proto/runtime/v1:/protos/tpl \ + pseudomuto/protoc-gen-doc --doc_opt=/protos/tpl/template.tmpl,oss_v1.md oss.proto .PHONY: proto.gen.init proto.gen.init: @@ -33,6 +38,9 @@ proto.gen.code: $(DOCKER) run --rm \ -v $(ROOT_DIR)/spec/proto/runtime/v1:/api/proto \ layotto/protoc + $(DOCKER) run --rm \ + -v $(ROOT_DIR)/spec/proto/extension/v1:/api/proto \ + layotto/protoc .PHONY: proto.comments proto.comments: diff --git a/pkg/runtime/config_test.go b/pkg/runtime/config_test.go index 7c354634e3..331ca3bd8e 100644 --- a/pkg/runtime/config_test.go +++ b/pkg/runtime/config_test.go @@ -30,7 +30,7 @@ func TestConfig(t *testing.T) { } }, "file": { - "aliOSS": { + "aliyun.oss": { "metadata":[ { "endpoint": "endpoint_address", @@ -43,7 +43,7 @@ func TestConfig(t *testing.T) { }` mscf, err := ParseRuntimeConfig([]byte(data)) assert.Nil(t, err) - v := mscf.Files["aliOSS"] + v := mscf.Files["aliyun.oss"] m := make([]*utils.OssMetadata, 0) err = json.Unmarshal(v.Metadata, &m) assert.Nil(t, err) diff --git a/spec/proto/runtime/v1/runtime.pb.go b/spec/proto/runtime/v1/runtime.pb.go index 33cce02782..60480c17ae 100644 --- a/spec/proto/runtime/v1/runtime.pb.go +++ b/spec/proto/runtime/v1/runtime.pb.go @@ -74,13 +74,18 @@ func (SequencerOptions_AutoIncrement) EnumDescriptor() ([]byte, []int) { return file_runtime_proto_rawDescGZIP(), []int{13, 0} } +// The enum of unlock status type UnlockResponse_Status int32 const ( - UnlockResponse_SUCCESS UnlockResponse_Status = 0 - UnlockResponse_LOCK_UNEXIST UnlockResponse_Status = 1 + // Unlock is success + UnlockResponse_SUCCESS UnlockResponse_Status = 0 + // The lock is not exist + UnlockResponse_LOCK_UNEXIST UnlockResponse_Status = 1 + // The lock is belong to others UnlockResponse_LOCK_BELONG_TO_OTHERS UnlockResponse_Status = 2 - UnlockResponse_INTERNAL_ERROR UnlockResponse_Status = 3 + // Internal error + UnlockResponse_INTERNAL_ERROR UnlockResponse_Status = 3 ) // Enum value maps for UnlockResponse_Status. @@ -126,19 +131,30 @@ func (UnlockResponse_Status) EnumDescriptor() ([]byte, []int) { return file_runtime_proto_rawDescGZIP(), []int{18, 0} } +// The enum of http reuest method type HTTPExtension_Verb int32 const ( - HTTPExtension_NONE HTTPExtension_Verb = 0 - HTTPExtension_GET HTTPExtension_Verb = 1 - HTTPExtension_HEAD HTTPExtension_Verb = 2 - HTTPExtension_POST HTTPExtension_Verb = 3 - HTTPExtension_PUT HTTPExtension_Verb = 4 - HTTPExtension_DELETE HTTPExtension_Verb = 5 + // NONE + HTTPExtension_NONE HTTPExtension_Verb = 0 + // GET method + HTTPExtension_GET HTTPExtension_Verb = 1 + // HEAD method + HTTPExtension_HEAD HTTPExtension_Verb = 2 + // POST method + HTTPExtension_POST HTTPExtension_Verb = 3 + // PUT method + HTTPExtension_PUT HTTPExtension_Verb = 4 + // DELETE method + HTTPExtension_DELETE HTTPExtension_Verb = 5 + // CONNECT method HTTPExtension_CONNECT HTTPExtension_Verb = 6 + // CONNECT method HTTPExtension_OPTIONS HTTPExtension_Verb = 7 - HTTPExtension_TRACE HTTPExtension_Verb = 8 - HTTPExtension_PATCH HTTPExtension_Verb = 9 + // CONNECT method + HTTPExtension_TRACE HTTPExtension_Verb = 8 + // PATCH method + HTTPExtension_PATCH HTTPExtension_Verb = 9 ) // Enum value maps for HTTPExtension_Verb. @@ -203,6 +219,7 @@ func (HTTPExtension_Verb) EnumDescriptor() ([]byte, []int) { type StateOptions_StateConcurrency int32 const ( + // Concurrency state is unspecified StateOptions_CONCURRENCY_UNSPECIFIED StateOptions_StateConcurrency = 0 // First write wins StateOptions_CONCURRENCY_FIRST_WRITE StateOptions_StateConcurrency = 1 @@ -255,6 +272,7 @@ func (StateOptions_StateConcurrency) EnumDescriptor() ([]byte, []int) { type StateOptions_StateConsistency int32 const ( + // Consistency state is unspecified StateOptions_CONSISTENCY_UNSPECIFIED StateOptions_StateConsistency = 0 // The API server assumes data stores are eventually consistent by default.A state store should: // - For read requests, the state store can return data from any of the replicas @@ -307,11 +325,13 @@ func (StateOptions_StateConsistency) EnumDescriptor() ([]byte, []int) { return file_runtime_proto_rawDescGZIP(), []int{42, 1} } +// Get fileMeta request message type GetFileMetaRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // File meta request Request *FileRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` } @@ -354,6 +374,7 @@ func (x *GetFileMetaRequest) GetRequest() *FileRequest { return nil } +// Get fileMeta response message type GetFileMetaResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -362,8 +383,9 @@ type GetFileMetaResponse struct { // The size of file Size int64 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` // The modified time of file - LastModified string `protobuf:"bytes,2,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"` - Response *FileMeta `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` + LastModified string `protobuf:"bytes,2,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"` + // File meta response + Response *FileMeta `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` } func (x *GetFileMetaResponse) Reset() { @@ -419,11 +441,13 @@ func (x *GetFileMetaResponse) GetResponse() *FileMeta { return nil } +// FileMeta value type FileMetaValue struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // File meta value Value []string `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"` } @@ -466,11 +490,13 @@ func (x *FileMetaValue) GetValue() []string { return nil } +// A map that store FileMetaValue type FileMeta struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // A data structure to store metadata Metadata map[string]*FileMetaValue `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } @@ -513,12 +539,13 @@ func (x *FileMeta) GetMetadata() map[string]*FileMetaValue { return nil } +// Get file request message type GetFileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // + // The name of store StoreName string `protobuf:"bytes,1,opt,name=store_name,json=storeName,proto3" json:"store_name,omitempty"` // The name of the file or object want to get. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -579,11 +606,13 @@ func (x *GetFileRequest) GetMetadata() map[string]string { return nil } +// Get file response message type GetFileResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The data of file Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` } @@ -626,11 +655,13 @@ func (x *GetFileResponse) GetData() []byte { return nil } +// Put file request message type PutFileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The name of store StoreName string `protobuf:"bytes,1,opt,name=store_name,json=storeName,proto3" json:"store_name,omitempty"` // The name of the file or object want to put. Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -700,11 +731,13 @@ func (x *PutFileRequest) GetMetadata() map[string]string { return nil } +// File request message type FileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The name of store StoreName string `protobuf:"bytes,1,opt,name=store_name,json=storeName,proto3" json:"store_name,omitempty"` // The name of the directory Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` @@ -765,14 +798,18 @@ func (x *FileRequest) GetMetadata() map[string]string { return nil } +// List file request message type ListFileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Request *FileRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` - PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - Marker string `protobuf:"bytes,3,opt,name=marker,proto3" json:"marker,omitempty"` + // File request + Request *FileRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + // Page size + PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` + // Marker + Marker string `protobuf:"bytes,3,opt,name=marker,proto3" json:"marker,omitempty"` } func (x *ListFileRequest) Reset() { @@ -828,6 +865,7 @@ func (x *ListFileRequest) GetMarker() string { return "" } +// File info message type FileInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -903,14 +941,18 @@ func (x *FileInfo) GetMetadata() map[string]string { return nil } +// List file response message type ListFileResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Files []*FileInfo `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` - Marker string `protobuf:"bytes,2,opt,name=marker,proto3" json:"marker,omitempty"` - IsTruncated bool `protobuf:"varint,3,opt,name=is_truncated,json=isTruncated,proto3" json:"is_truncated,omitempty"` + // File info + Files []*FileInfo `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` + // Marker + Marker string `protobuf:"bytes,2,opt,name=marker,proto3" json:"marker,omitempty"` + // Is truncated + IsTruncated bool `protobuf:"varint,3,opt,name=is_truncated,json=isTruncated,proto3" json:"is_truncated,omitempty"` } func (x *ListFileResp) Reset() { @@ -966,11 +1008,13 @@ func (x *ListFileResp) GetIsTruncated() bool { return false } +// Delete file request message type DelFileRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // File request Request *FileRequest `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` } @@ -1013,6 +1057,7 @@ func (x *DelFileRequest) GetRequest() *FileRequest { return nil } +// Get next id request message type GetNextIdRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1094,6 +1139,7 @@ type SequencerOptions struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Default STRONG auto-increment Increment SequencerOptions_AutoIncrement `protobuf:"varint,1,opt,name=increment,proto3,enum=spec.proto.runtime.v1.SequencerOptions_AutoIncrement" json:"increment,omitempty"` } @@ -1136,6 +1182,7 @@ func (x *SequencerOptions) GetIncrement() SequencerOptions_AutoIncrement { return SequencerOptions_WEAK } +// Get next id response message type GetNextIdResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1185,6 +1232,7 @@ func (x *GetNextIdResponse) GetNextId() int64 { return 0 } +// Lock request message is distributed lock API which is not blocking method tring to get a lock with ttl type TryLockRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1272,11 +1320,13 @@ func (x *TryLockRequest) GetExpire() int32 { return 0 } +// Lock response message returns is the lock obtained. type TryLockResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Is lock success Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` } @@ -1319,15 +1369,18 @@ func (x *TryLockResponse) GetSuccess() bool { return false } +// UnLock request message type UnlockRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The name of store StoreName string `protobuf:"bytes,1,opt,name=store_name,json=storeName,proto3" json:"store_name,omitempty"` // resource_id is the lock key. ResourceId string `protobuf:"bytes,2,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` - LockOwner string `protobuf:"bytes,3,opt,name=lock_owner,json=lockOwner,proto3" json:"lock_owner,omitempty"` + // The owner of the lock + LockOwner string `protobuf:"bytes,3,opt,name=lock_owner,json=lockOwner,proto3" json:"lock_owner,omitempty"` } func (x *UnlockRequest) Reset() { @@ -1383,11 +1436,13 @@ func (x *UnlockRequest) GetLockOwner() string { return "" } +// UnLock response message type UnlockResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The status of unlock Status UnlockResponse_Status `protobuf:"varint,1,opt,name=status,proto3,enum=spec.proto.runtime.v1.UnlockResponse_Status" json:"status,omitempty"` } @@ -1430,13 +1485,16 @@ func (x *UnlockResponse) GetStatus() UnlockResponse_Status { return UnlockResponse_SUCCESS } +// Hello request message type SayHelloRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The name of service ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // Reuqest name + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Optional. This field is used to control the packet size during load tests. Data *anypb.Any `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` } @@ -1494,13 +1552,16 @@ func (x *SayHelloRequest) GetData() *anypb.Any { return nil } +// Hello response message type SayHelloResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Hello string `protobuf:"bytes,1,opt,name=hello,proto3" json:"hello,omitempty"` - Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // Hello + Hello string `protobuf:"bytes,1,opt,name=hello,proto3" json:"hello,omitempty"` + // Hello message of data + Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } func (x *SayHelloResponse) Reset() { @@ -1549,12 +1610,15 @@ func (x *SayHelloResponse) GetData() *anypb.Any { return nil } +// Invoke service request message type InvokeServiceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The identify of InvokeServiceRequest + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // InvokeServiceRequest message Message *CommonInvokeRequest `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` } @@ -1604,14 +1668,19 @@ func (x *InvokeServiceRequest) GetMessage() *CommonInvokeRequest { return nil } +// Common invoke request message which includes invoke method and data type CommonInvokeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` - Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` - ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // The method of requset + Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"` + // The request data + Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` + // The content type of request data + ContentType string `protobuf:"bytes,3,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // The extra information of http HttpExtension *HTTPExtension `protobuf:"bytes,4,opt,name=http_extension,json=httpExtension,proto3" json:"http_extension,omitempty"` } @@ -1675,13 +1744,16 @@ func (x *CommonInvokeRequest) GetHttpExtension() *HTTPExtension { return nil } +// Http extension message is about invoke http information type HTTPExtension struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Verb HTTPExtension_Verb `protobuf:"varint,1,opt,name=verb,proto3,enum=spec.proto.runtime.v1.HTTPExtension_Verb" json:"verb,omitempty"` - Querystring string `protobuf:"bytes,2,opt,name=querystring,proto3" json:"querystring,omitempty"` + // The method of http reuest + Verb HTTPExtension_Verb `protobuf:"varint,1,opt,name=verb,proto3,enum=spec.proto.runtime.v1.HTTPExtension_Verb" json:"verb,omitempty"` + // The query information of http + Querystring string `protobuf:"bytes,2,opt,name=querystring,proto3" json:"querystring,omitempty"` } func (x *HTTPExtension) Reset() { @@ -1730,13 +1802,16 @@ func (x *HTTPExtension) GetQuerystring() string { return "" } +// Invoke service response message is result of invoke service queset type InvokeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Data *anypb.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` - ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` + // The response data + Data *anypb.Any `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + // The content type of response data + ContentType string `protobuf:"bytes,2,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` } func (x *InvokeResponse) Reset() { @@ -3070,7 +3145,9 @@ type StateOptions struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The state operation of concurrency Concurrency StateOptions_StateConcurrency `protobuf:"varint,1,opt,name=concurrency,proto3,enum=spec.proto.runtime.v1.StateOptions_StateConcurrency" json:"concurrency,omitempty"` + // The state operation of consistency Consistency StateOptions_StateConsistency `protobuf:"varint,2,opt,name=consistency,proto3,enum=spec.proto.runtime.v1.StateOptions_StateConsistency" json:"consistency,omitempty"` } @@ -3707,6 +3784,7 @@ type SecretResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // The data struct of secrets Secrets map[string]string `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } diff --git a/spec/proto/runtime/v1/runtime_grpc.pb.go b/spec/proto/runtime/v1/runtime_grpc.pb.go index b473524885..3e7ee6de93 100644 --- a/spec/proto/runtime/v1/runtime_grpc.pb.go +++ b/spec/proto/runtime/v1/runtime_grpc.pb.go @@ -39,6 +39,7 @@ type RuntimeClient interface { // Distributed Lock API // A non-blocking method trying to get a lock with ttl. TryLock(ctx context.Context, in *TryLockRequest, opts ...grpc.CallOption) (*TryLockResponse, error) + // A method trying to unlock. Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) // Sequencer API // Get next unique id with some auto-increment guarantee @@ -388,6 +389,7 @@ type RuntimeServer interface { // Distributed Lock API // A non-blocking method trying to get a lock with ttl. TryLock(context.Context, *TryLockRequest) (*TryLockResponse, error) + // A method trying to unlock. Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error) // Sequencer API // Get next unique id with some auto-increment guarantee