Documentation
¶
Index ¶
- Constants
- Variables
- func IsCode(err error, code ErrorCode) bool
- type ActionEvent
- type ActionType
- type Adapter
- type AdapterCapabilities
- type Body
- func BodyWithProgress(body Body, report func(UploadProgress)) Body
- func BytesBody(data []byte) Body
- func FileBody(path string) Body
- func NewBodyFromReadCloser(open func(context.Context) (io.ReadCloser, error), size int64, sizeKnown bool, ...) Body
- func ReaderBody(reader io.Reader) Body
- func StringBody(value string) Body
- type BulkError
- type BulkOptions
- type ByteRange
- type Client
- func (c *Client) Adapter() Adapter
- func (c *Client) Capabilities() AdapterCapabilities
- func (c *Client) Copy(ctx context.Context, from string, to string, opts OperationOptions) error
- func (c *Client) Delete(ctx context.Context, key string, opts OperationOptions) error
- func (c *Client) DeleteMany(ctx context.Context, keys []string, opts DeleteManyOptions) (DeleteManyResult, error)
- func (c *Client) Download(ctx context.Context, key string, opts DownloadOptions) (StoredFile, error)
- func (c *Client) DownloadMany(ctx context.Context, keys []string, opts DownloadManyOptions) (DownloadManyResult, error)
- func (c *Client) Exists(ctx context.Context, key string, opts OperationOptions) (bool, error)
- func (c *Client) ExistsMany(ctx context.Context, keys []string, opts BulkOptions) (ExistsManyResult, error)
- func (c *Client) File(key string) FileHandle
- func (c *Client) Head(ctx context.Context, key string, opts OperationOptions) (StoredFile, error)
- func (c *Client) HeadMany(ctx context.Context, keys []string, opts BulkOptions) (HeadManyResult, error)
- func (c *Client) List(ctx context.Context, opts ListOptions) (ListResult, error)
- func (c *Client) ListAll(ctx context.Context, opts ListOptions, yield func(StoredFile) error) error
- func (c *Client) Move(ctx context.Context, from string, to string, opts OperationOptions) error
- func (c *Client) Prefix() string
- func (c *Client) Raw() any
- func (c *Client) ReadOnly() *Client
- func (c *Client) Search(ctx context.Context, pattern string, opts SearchOptions, ...) error
- func (c *Client) SignedUploadURL(ctx context.Context, key string, opts SignedUploadOptions) (SignedUpload, error)
- func (c *Client) URL(ctx context.Context, key string, opts URLOptions) (string, error)
- func (c *Client) Upload(ctx context.Context, key string, body Body, opts UploadOptions) (UploadResult, error)
- func (c *Client) UploadMany(ctx context.Context, items []UploadManyItem, opts UploadManyOptions) (UploadManyResult, error)
- type DeleteManyAdapter
- type DeleteManyError
- type DeleteManyOptions
- type DeleteManyResult
- type DownloadManyOptions
- type DownloadManyResult
- type DownloadOptions
- type EnvGroup
- type EnvVar
- type Error
- type ErrorCode
- type ErrorEvent
- type ExistsManyResult
- type FileHandle
- func (f FileHandle) CopyFrom(ctx context.Context, source string, opts OperationOptions) error
- func (f FileHandle) CopyTo(ctx context.Context, destination string, opts OperationOptions) error
- func (f FileHandle) Delete(ctx context.Context, opts OperationOptions) error
- func (f FileHandle) Download(ctx context.Context, opts DownloadOptions) (StoredFile, error)
- func (f FileHandle) Exists(ctx context.Context, opts OperationOptions) (bool, error)
- func (f FileHandle) Head(ctx context.Context, opts OperationOptions) (StoredFile, error)
- func (f FileHandle) Key() string
- func (f FileHandle) MoveFrom(ctx context.Context, source string, opts OperationOptions) error
- func (f FileHandle) MoveTo(ctx context.Context, destination string, opts OperationOptions) error
- func (f FileHandle) SignedUploadURL(ctx context.Context, opts SignedUploadOptions) (SignedUpload, error)
- func (f FileHandle) URL(ctx context.Context, opts URLOptions) (string, error)
- func (f FileHandle) Upload(ctx context.Context, body Body, opts UploadOptions) (UploadResult, error)
- type Handler
- type HeadManyResult
- type Hooks
- type ListOptions
- type ListResult
- type Middleware
- type MoveAdapter
- type MultipartOptions
- type Operation
- type OperationKind
- type OperationOptions
- type Options
- type PartMeta
- type Provider
- type ProviderEnvSpec
- type ResumableAdapter
- type ResumableDriver
- type ResumablePart
- type ResumableProbe
- type ResumableSession
- type ResumableUploadMeta
- type ResumableUploadOptions
- type RetryBackoffContext
- type RetryEvent
- type RetryOptions
- type SearchMatch
- type SearchOptions
- type SignedURLCapability
- type SignedUpload
- type SignedUploadOptions
- type StoredFile
- type StoredFileMeta
- type TransferOptions
- type TransferProgress
- type TransferResult
- type URLOptions
- type UploadControl
- func (c *UploadControl) Abort(ctx context.Context) error
- func (c *UploadControl) Loaded() int64
- func (c *UploadControl) Pause()
- func (c *UploadControl) Resume()
- func (c *UploadControl) Session() (ResumableSession, bool)
- func (c *UploadControl) Status() UploadControlStatus
- func (c *UploadControl) Total() int64
- type UploadControlStatus
- type UploadManyItem
- type UploadManyOptions
- type UploadManyResult
- type UploadOptions
- type UploadProgress
- type UploadResult
Constants ¶
View Source
const DefaultResumablePartSize int64 = 5 * 1024 * 1024
View Source
const DefaultURLExpiresIn = time.Hour
Variables ¶
View Source
var ProviderNames = []string{"appwrite", "digitalocean-spaces", "fs", "memory", "r2", "s3", "s3-compatible", "supabase", "uploadthing", "vercel-blob"}
View Source
var Providers = map[string]Provider{ "appwrite": { Slug: "appwrite", Name: "Appwrite", Description: "Appwrite Storage via the Storage REST API.", Env: ProviderEnvSpec{ Config: []string{"bucket", "endpoint", "projectId"}, Required: []EnvVar{ {Key: "APPWRITE_PROJECT_ID", Aliases: []string{"NEXT_PUBLIC_APPWRITE_PROJECT_ID"}, Description: "Appwrite project ID", Secret: false, ReadBy: "gofiles-sdk"}, }, CredentialModes: []EnvGroup{{ Label: "API key", Vars: []EnvVar{ {Key: "APPWRITE_API_KEY", Aliases: []string{"APPWRITE_KEY"}, Description: "Appwrite API key", Secret: true, ReadBy: "gofiles-sdk"}, }, }}, Optional: []EnvVar{ {Key: "APPWRITE_ENDPOINT", Aliases: []string{"NEXT_PUBLIC_APPWRITE_ENDPOINT"}, Description: "Appwrite API endpoint", Secret: false, ReadBy: "gofiles-sdk"}, }, Notes: "File IDs must be Appwrite-compatible IDs: max 36 characters, no slashes.", }, }, "digitalocean-spaces": { Slug: "digitalocean-spaces", Name: "DigitalOcean Spaces", Description: "DigitalOcean Spaces via the S3-compatible API.", Env: ProviderEnvSpec{ Config: []string{"bucket", "region"}, CredentialModes: []EnvGroup{{ Label: "Access key", Vars: []EnvVar{ {Key: "DO_SPACES_KEY", Description: "Spaces access key", Secret: true, ReadBy: "gofiles-sdk"}, {Key: "DO_SPACES_SECRET", Description: "Spaces secret key", Secret: true, ReadBy: "gofiles-sdk"}, }, }}, }, PeerDeps: []string{"github.com/aws/aws-sdk-go-v2/service/s3"}, }, "fs": { Slug: "fs", Name: "Filesystem", Description: "Local filesystem storage for development, tests, and single-node deployments.", Env: ProviderEnvSpec{ Config: []string{"root"}, Notes: "Stores metadata in sidecar JSON files beside objects.", }, }, "memory": { Slug: "memory", Name: "Memory", Description: "In-memory storage for tests and ephemeral workloads.", Env: ProviderEnvSpec{ Notes: "No environment variables are required. Data is process-local and is lost when the process exits.", }, }, "r2": { Slug: "r2", Name: "Cloudflare R2", Description: "Cloudflare R2 via the S3-compatible HTTP API.", Env: ProviderEnvSpec{ Config: []string{"bucket"}, Required: []EnvVar{ {Key: "R2_ACCOUNT_ID", Description: "Cloudflare account ID", Secret: false, ReadBy: "gofiles-sdk"}, }, CredentialModes: []EnvGroup{{ Label: "Access key", Vars: []EnvVar{ {Key: "R2_ACCESS_KEY_ID", Description: "R2 access key ID", Secret: true, ReadBy: "gofiles-sdk"}, {Key: "R2_SECRET_ACCESS_KEY", Description: "R2 secret access key", Secret: true, ReadBy: "gofiles-sdk"}, }, }}, Notes: "Workers binding mode is intentionally not part of the Go port.", }, PeerDeps: []string{"github.com/aws/aws-sdk-go-v2/service/s3"}, }, "s3": { Slug: "s3", Name: "S3", Description: "AWS S3 and S3-compatible object stores.", Env: ProviderEnvSpec{ Config: []string{"bucket"}, Required: []EnvVar{ {Key: "AWS_REGION", Aliases: []string{"AWS_DEFAULT_REGION"}, Description: "Bucket region", Secret: false, ReadBy: "gofiles-sdk"}, }, CredentialModes: []EnvGroup{{ Label: "AWS SDK credential chain", Vars: []EnvVar{ {Key: "AWS_ACCESS_KEY_ID", Description: "AWS access key ID", Secret: true, ReadBy: "sdk-chain"}, {Key: "AWS_SECRET_ACCESS_KEY", Description: "AWS secret access key", Secret: true, ReadBy: "sdk-chain"}, }, }}, Optional: []EnvVar{ {Key: "AWS_SESSION_TOKEN", Description: "AWS session token", Secret: true, ReadBy: "sdk-chain"}, }, }, PeerDeps: []string{"github.com/aws/aws-sdk-go-v2/service/s3"}, }, "s3-compatible": { Slug: "s3-compatible", Name: "S3 Compatible", Description: "Generic S3-compatible object store using a custom endpoint.", Env: ProviderEnvSpec{ Config: []string{"bucket", "region", "endpoint"}, CredentialModes: []EnvGroup{{ Label: "Access key", Vars: []EnvVar{ {Key: "S3_COMPATIBLE_ACCESS_KEY_ID", Description: "S3-compatible access key ID", Secret: true, ReadBy: "gofiles-sdk"}, {Key: "S3_COMPATIBLE_SECRET_ACCESS_KEY", Description: "S3-compatible secret access key", Secret: true, ReadBy: "gofiles-sdk"}, }, }}, }, PeerDeps: []string{"github.com/aws/aws-sdk-go-v2/service/s3"}, }, "supabase": { Slug: "supabase", Name: "Supabase Storage", Description: "Supabase Storage via the Storage HTTP API.", Env: ProviderEnvSpec{ Config: []string{"bucket"}, Required: []EnvVar{ {Key: "SUPABASE_URL", Aliases: []string{"NEXT_PUBLIC_SUPABASE_URL"}, Description: "Supabase project URL", Secret: false, ReadBy: "gofiles-sdk"}, }, CredentialModes: []EnvGroup{{ Label: "API key", Vars: []EnvVar{ {Key: "SUPABASE_SERVICE_ROLE_KEY", Description: "Supabase service role key", Secret: true, ReadBy: "gofiles-sdk"}, }, }}, Optional: []EnvVar{ {Key: "SUPABASE_KEY", Description: "Alternative Supabase API key", Secret: true, ReadBy: "gofiles-sdk"}, {Key: "NEXT_PUBLIC_SUPABASE_ANON_KEY", Description: "Anon key for public bucket use cases", Secret: true, ReadBy: "gofiles-sdk"}, }, Notes: "Buckets must already exist. Use a service role key for writes to RLS-protected buckets.", }, }, "uploadthing": { Slug: "uploadthing", Name: "UploadThing", Description: "UploadThing UFS API using custom IDs as files-sdk keys.", Env: ProviderEnvSpec{ CredentialModes: []EnvGroup{{ Label: "API token", Vars: []EnvVar{ {Key: "UPLOADTHING_TOKEN", Description: "UploadThing token", Secret: true, ReadBy: "gofiles-sdk"}, }, }}, }, }, "vercel-blob": { Slug: "vercel-blob", Name: "Vercel Blob", Description: "Vercel Blob via the Blob HTTP API.", Env: ProviderEnvSpec{ Config: []string{"access"}, CredentialModes: []EnvGroup{ { Label: "OIDC", Vars: []EnvVar{ {Key: "VERCEL_OIDC_TOKEN", Description: "Vercel OIDC token", Secret: true, ReadBy: "gofiles-sdk"}, {Key: "BLOB_STORE_ID", Description: "Vercel Blob store ID", Secret: false, ReadBy: "gofiles-sdk"}, }, }, { Label: "Read-write token", Vars: []EnvVar{ {Key: "BLOB_READ_WRITE_TOKEN", Description: "Vercel Blob read-write token", Secret: true, ReadBy: "gofiles-sdk"}, }, }, }, Notes: "OIDC is preferred on Vercel when both VERCEL_OIDC_TOKEN and BLOB_STORE_ID are available. Token authentication is used as the fallback.", }, }, }
Functions ¶
Types ¶
type ActionEvent ¶
type ActionType ¶
type ActionType string
const ( ActionUpload ActionType = "upload" ActionDownload ActionType = "download" ActionHead ActionType = "head" ActionExists ActionType = "exists" ActionDelete ActionType = "delete" ActionCopy ActionType = "copy" ActionMove ActionType = "move" ActionList ActionType = "list" ActionURL ActionType = "url" ActionSignedUploadURL ActionType = "signedUploadUrl" )
type Adapter ¶
type Adapter interface {
Name() string
Raw() any
Capabilities() AdapterCapabilities
Upload(context.Context, string, Body, UploadOptions) (UploadResult, error)
Download(context.Context, string, DownloadOptions) (StoredFile, error)
Head(context.Context, string, OperationOptions) (StoredFile, error)
Exists(context.Context, string, OperationOptions) (bool, error)
Delete(context.Context, string, OperationOptions) error
Copy(context.Context, string, string, OperationOptions) error
List(context.Context, ListOptions) (ListResult, error)
URL(context.Context, string, URLOptions) (string, error)
SignedUploadURL(context.Context, string, SignedUploadOptions) (SignedUpload, error)
}
type AdapterCapabilities ¶
type Body ¶
type Body struct {
// contains filtered or unexported fields
}
func BodyWithProgress ¶
func BodyWithProgress(body Body, report func(UploadProgress)) Body
func NewBodyFromReadCloser ¶
func ReaderBody ¶
func StringBody ¶
func (Body) ContentType ¶
func (Body) Replayable ¶
type BulkOptions ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Capabilities ¶
func (c *Client) Capabilities() AdapterCapabilities
func (*Client) DeleteMany ¶
func (c *Client) DeleteMany(ctx context.Context, keys []string, opts DeleteManyOptions) (DeleteManyResult, error)
func (*Client) Download ¶
func (c *Client) Download(ctx context.Context, key string, opts DownloadOptions) (StoredFile, error)
func (*Client) DownloadMany ¶
func (c *Client) DownloadMany(ctx context.Context, keys []string, opts DownloadManyOptions) (DownloadManyResult, error)
func (*Client) ExistsMany ¶
func (c *Client) ExistsMany(ctx context.Context, keys []string, opts BulkOptions) (ExistsManyResult, error)
func (*Client) File ¶
func (c *Client) File(key string) FileHandle
func (*Client) Head ¶
func (c *Client) Head(ctx context.Context, key string, opts OperationOptions) (StoredFile, error)
func (*Client) HeadMany ¶
func (c *Client) HeadMany(ctx context.Context, keys []string, opts BulkOptions) (HeadManyResult, error)
func (*Client) List ¶
func (c *Client) List(ctx context.Context, opts ListOptions) (ListResult, error)
func (*Client) ListAll ¶
func (c *Client) ListAll(ctx context.Context, opts ListOptions, yield func(StoredFile) error) error
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, pattern string, opts SearchOptions, yield func(StoredFile) error) error
func (*Client) SignedUploadURL ¶
func (c *Client) SignedUploadURL(ctx context.Context, key string, opts SignedUploadOptions) (SignedUpload, error)
func (*Client) Upload ¶
func (c *Client) Upload(ctx context.Context, key string, body Body, opts UploadOptions) (UploadResult, error)
func (*Client) UploadMany ¶
func (c *Client) UploadMany(ctx context.Context, items []UploadManyItem, opts UploadManyOptions) (UploadManyResult, error)
type DeleteManyAdapter ¶
type DeleteManyAdapter interface {
DeleteMany(context.Context, []string, DeleteManyOptions) (DeleteManyResult, error)
}
type DeleteManyError ¶
type DeleteManyOptions ¶
type DeleteManyResult ¶
type DeleteManyResult struct {
Deleted []string
Errors []DeleteManyError
}
type DownloadManyOptions ¶
type DownloadManyOptions struct {
BulkOptions
Range *ByteRange
}
type DownloadManyResult ¶
type DownloadManyResult struct {
Downloaded []StoredFile
Errors []BulkError
}
type DownloadOptions ¶
type DownloadOptions struct {
OperationOptions
Range *ByteRange
}
type Error ¶
type Error struct {
Code ErrorCode
Message string
Cause error
Aborted bool
TimedOut bool
Permanent bool
}
func TimeoutError ¶
type ErrorEvent ¶
type ExistsManyResult ¶
type FileHandle ¶
type FileHandle struct {
// contains filtered or unexported fields
}
func (FileHandle) CopyFrom ¶
func (f FileHandle) CopyFrom(ctx context.Context, source string, opts OperationOptions) error
func (FileHandle) CopyTo ¶
func (f FileHandle) CopyTo(ctx context.Context, destination string, opts OperationOptions) error
func (FileHandle) Delete ¶
func (f FileHandle) Delete(ctx context.Context, opts OperationOptions) error
func (FileHandle) Download ¶
func (f FileHandle) Download(ctx context.Context, opts DownloadOptions) (StoredFile, error)
func (FileHandle) Exists ¶
func (f FileHandle) Exists(ctx context.Context, opts OperationOptions) (bool, error)
func (FileHandle) Head ¶
func (f FileHandle) Head(ctx context.Context, opts OperationOptions) (StoredFile, error)
func (FileHandle) Key ¶
func (f FileHandle) Key() string
func (FileHandle) MoveFrom ¶
func (f FileHandle) MoveFrom(ctx context.Context, source string, opts OperationOptions) error
func (FileHandle) MoveTo ¶
func (f FileHandle) MoveTo(ctx context.Context, destination string, opts OperationOptions) error
func (FileHandle) SignedUploadURL ¶
func (f FileHandle) SignedUploadURL(ctx context.Context, opts SignedUploadOptions) (SignedUpload, error)
func (FileHandle) URL ¶
func (f FileHandle) URL(ctx context.Context, opts URLOptions) (string, error)
func (FileHandle) Upload ¶
func (f FileHandle) Upload(ctx context.Context, body Body, opts UploadOptions) (UploadResult, error)
type HeadManyResult ¶
type HeadManyResult struct {
Files []StoredFile
Errors []BulkError
}
type Hooks ¶
type Hooks struct {
OnAction func(ActionEvent)
OnError func(ErrorEvent)
OnRetry func(RetryEvent)
}
type ListOptions ¶
type ListOptions struct {
OperationOptions
Prefix string
Cursor string
Limit int32
Delimiter string
}
type ListResult ¶
type ListResult struct {
Items []StoredFile
Prefixes []string
Cursor string
}
type Middleware ¶
func Handlers ¶
func Handlers(handlers map[OperationKind]Middleware) Middleware
type MoveAdapter ¶
type MultipartOptions ¶
type Operation ¶
type Operation struct {
Kind OperationKind
Key string
Keys []string
From string
To string
Body Body
Bulk bool
UploadOptions UploadOptions
DownloadOptions DownloadOptions
OperationOptions OperationOptions
ListOptions ListOptions
URLOptions URLOptions
SignedUploadOptions SignedUploadOptions
}
type OperationKind ¶
type OperationKind string
const ( OperationUpload OperationKind = "upload" OperationDownload OperationKind = "download" OperationHead OperationKind = "head" OperationExists OperationKind = "exists" OperationDelete OperationKind = "delete" OperationCopy OperationKind = "copy" OperationMove OperationKind = "move" OperationList OperationKind = "list" OperationURL OperationKind = "url" OperationSignedUploadURL OperationKind = "signedUploadUrl" )
type OperationOptions ¶
type OperationOptions struct {
Timeout time.Duration
Retries *RetryOptions
}
type Options ¶
type Options struct {
Adapter Adapter
Prefix string
ReadOnly bool
Timeout time.Duration
Retries *RetryOptions
Hooks Hooks
Middleware []Middleware
}
type Provider ¶
type Provider struct {
Slug string
Name string
Description string
Env ProviderEnvSpec
PeerDeps []string
}
func GetProvider ¶
type ProviderEnvSpec ¶
type ResumableAdapter ¶
type ResumableAdapter interface {
ResumableUpload(context.Context, string, ResumableUploadOptions) (ResumableDriver, error)
}
type ResumableDriver ¶
type ResumableDriver interface {
Begin(context.Context, ResumableUploadMeta) (ResumableSession, error)
Adopt(context.Context, ResumableSession) error
Probe(context.Context) (ResumableProbe, error)
UploadPart(context.Context, ResumablePart) (PartMeta, error)
Complete(context.Context, []PartMeta) (UploadResult, error)
Abort(context.Context) error
}
type ResumablePart ¶
type ResumableProbe ¶
type ResumableSession ¶
type ResumableUploadMeta ¶
type ResumableUploadOptions ¶
type ResumableUploadOptions struct {
ContentType string
CacheControl string
Metadata map[string]string
Multipart *MultipartOptions
}
type RetryBackoffContext ¶
type RetryEvent ¶
type RetryOptions ¶
type RetryOptions struct {
Max int
Backoff func(RetryBackoffContext) time.Duration
}
type SearchMatch ¶
type SearchMatch string
const ( SearchGlob SearchMatch = "glob" SearchRegex SearchMatch = "regex" SearchSubstring SearchMatch = "substring" SearchExact SearchMatch = "exact" )
type SearchOptions ¶
type SearchOptions struct {
OperationOptions
Prefix string
Limit int32
MaxResults int
Match SearchMatch
CaseInsensitive bool
}
type SignedURLCapability ¶
type SignedUpload ¶
type SignedUploadOptions ¶
type StoredFile ¶
type StoredFile struct {
Key string
Name string
Size int64
ContentType string
LastModified time.Time
ETag string
Metadata map[string]string
// contains filtered or unexported fields
}
func NewStoredFile ¶
func NewStoredFile(meta StoredFileMeta, open func(context.Context) (io.ReadCloser, error)) StoredFile
func NewStoredFileFromBytes ¶
func NewStoredFileFromBytes(meta StoredFileMeta, data []byte) StoredFile
func (StoredFile) Open ¶
func (f StoredFile) Open(ctx context.Context) (io.ReadCloser, error)
type StoredFileMeta ¶
type TransferOptions ¶
type TransferOptions struct {
BulkOptions
Prefix string
TransformKey func(string) string
Overwrite *bool
Limit int32
OnProgress func(TransferProgress)
}
type TransferProgress ¶
type TransferResult ¶
func Transfer ¶
func Transfer(ctx context.Context, source *Client, dest *Client, opts TransferOptions) (TransferResult, error)
type URLOptions ¶
type URLOptions struct {
OperationOptions
ExpiresIn time.Duration
ResponseContentDisposition string
}
type UploadControl ¶
type UploadControl struct {
// contains filtered or unexported fields
}
func NewUploadControl ¶
func NewUploadControl() *UploadControl
func UploadControlFrom ¶
func UploadControlFrom(session ResumableSession) *UploadControl
func (*UploadControl) Loaded ¶
func (c *UploadControl) Loaded() int64
func (*UploadControl) Pause ¶
func (c *UploadControl) Pause()
func (*UploadControl) Resume ¶
func (c *UploadControl) Resume()
func (*UploadControl) Session ¶
func (c *UploadControl) Session() (ResumableSession, bool)
func (*UploadControl) Status ¶
func (c *UploadControl) Status() UploadControlStatus
func (*UploadControl) Total ¶
func (c *UploadControl) Total() int64
type UploadControlStatus ¶
type UploadControlStatus string
const ( UploadControlIdle UploadControlStatus = "idle" UploadControlUploading UploadControlStatus = "uploading" UploadControlPaused UploadControlStatus = "paused" UploadControlCompleted UploadControlStatus = "completed" UploadControlAborted UploadControlStatus = "aborted" UploadControlError UploadControlStatus = "error" )
type UploadManyItem ¶
type UploadManyOptions ¶
type UploadManyOptions struct {
BulkOptions
OnProgress func(string, UploadProgress)
}
type UploadManyResult ¶
type UploadManyResult struct {
Uploaded []UploadResult
Errors []BulkError
}
type UploadOptions ¶
type UploadOptions struct {
OperationOptions
ContentType string
CacheControl string
Metadata map[string]string
OnProgress func(UploadProgress)
Multipart *MultipartOptions
Control *UploadControl
}
type UploadProgress ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.