Documentation
¶
Index ¶
- Constants
- func FormatSize(size int64) string
- func GetOid(ctx context.Context) string
- func IsCloudPresignedURL(raw string) bool
- func ResponseBodyError(resp *http.Response, prefix string) error
- func WithOid(ctx context.Context, oid string) context.Context
- func WithProgress(ctx context.Context, cb ProgressCallback) context.Context
- type FileMetadata
- type ProgressCallback
- type ProgressEvent
Constants ¶
View Source
const ( B int64 = 1 KB int64 = 1024 * B MB int64 = 1024 * KB GB int64 = 1024 * MB TB int64 = 1024 * GB DataAccessTokenEndpoint = "/user/credentials/api/access_token" DataTimeout = 5 * time.Minute HeaderContentType = "Content-Type" MIMEApplicationJSON = "application/json" FileSizeLimit = 5 * GB MaxRetryCount = 5 MaxWaitTime = 300 MaxConcurrentUploads = 10 OnProgressThreshold = 1 * MB HealthzEndpoint = "/healthz" )
Variables ¶
This section is empty.
Functions ¶
func FormatSize ¶ added in v0.3.6
func IsCloudPresignedURL ¶
func WithProgress ¶
func WithProgress(ctx context.Context, cb ProgressCallback) context.Context
Types ¶
type FileMetadata ¶
type ProgressCallback ¶
type ProgressCallback func(ProgressEvent) error
func GetProgress ¶
func GetProgress(ctx context.Context) ProgressCallback
type ProgressEvent ¶
Click to show internal directories.
Click to hide internal directories.