Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resumable ¶
type Resumable struct { ChunkNumber int `schema:"resumableChunkNumber"` ChunkSize int `schema:"resumableChunkSize"` CurrentChunkSize int `schema:"resumableCurrentChunkSize"` TotalSize int `schema:"resumableTotalSize"` Type string `schema:"resumableType"` Identifier string `schema:"resumableIdentifier"` FileName string `schema:"resumableFilename"` RelativePath string `schema:"resumableRelativePath"` TotalChunks int `schema:"resumableTotalChunks"` AliasName string `schema:"aliasName"` }
Resumable represents resumable js upload query pararmeters
type S3Client ¶
type S3Client interface { S3SDKClient S3CryptoClient }
S3Client wraps the SDK Client and the CryptoClients
type S3CryptoClient ¶
type S3CryptoClient interface {
UploadPartWithPSK(*s3.UploadPartInput, []byte) (*s3.UploadPartOutput, error)
}
S3CryptoClient represents the cryptoclient with methods required to upload parts with encryption
type S3SDKClient ¶
type S3SDKClient interface { ListMultipartUploads(*s3.ListMultipartUploadsInput) (*s3.ListMultipartUploadsOutput, error) ListParts(*s3.ListPartsInput) (*s3.ListPartsOutput, error) CompleteMultipartUpload(input *s3.CompleteMultipartUploadInput) (*s3.CompleteMultipartUploadOutput, error) CreateMultipartUpload(*s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error) UploadPart(*s3.UploadPartInput) (*s3.UploadPartOutput, error) }
S3SDKClient represents the client with methods required to upload a multipart upload to s3
type Uploader ¶
type Uploader struct {
// contains filtered or unexported fields
}
Uploader represents the necessary configuration for uploading a file
func New ¶
func New(bucketName, vaultPath string, vc VaultClient) (*Uploader, error)
New creates a new instance of Uploader using provided s3 environment authentication
func (*Uploader) CheckUploaded ¶
func (u *Uploader) CheckUploaded(w http.ResponseWriter, req *http.Request)
CheckUploaded checks to see if a chunk has been uploaded
Click to show internal directories.
Click to hide internal directories.