github.heygears.com/openimsdk/tools@v0.0.49/s3/cont/structs.go (about)

     1  // Copyright © 2023 OpenIM. All rights reserved.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package cont
    16  
    17  import "github.com/openimsdk/tools/s3"
    18  
    19  type InitiateUploadResult struct {
    20  	// UploadID uniquely identifies the upload session for tracking and management purposes.
    21  	UploadID string `json:"uploadID"`
    22  
    23  	// PartSize specifies the size of each part in a multipart upload. This is relevant for breaking down large uploads into manageable pieces.
    24  	PartSize int64 `json:"partSize"`
    25  
    26  	// Sign contains the authentication and signature information necessary for securely uploading each part. This could include signed URLs or tokens.
    27  	Sign *s3.AuthSignResult `json:"sign"`
    28  }
    29  
    30  type UploadResult struct {
    31  	Hash string `json:"hash"`
    32  	Size int64  `json:"size"`
    33  	Key  string `json:"key"`
    34  }