Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/tus/tusd
/ functions
Functions
707 in github.com/tus/tusd
⨍
Functions
707
◇
Types & classes
140
↓ 5 callers
Method
UploadPartCopy
(ctx context.Context, input *s3.UploadPartCopyInput, opt ...func(*s3.Options))
pkg/s3store/s3store.go:208
↓ 5 callers
Method
WriteObject
(ctx context.Context, params GCSObjectParams, r io.Reader)
pkg/gcsstore/gcsservice.go:68
↓ 5 callers
Function
cleanUpTempFile
(file *os.File)
pkg/s3store/s3store.go:562
↓ 5 callers
Function
extractIDFromPath
extractIDFromPath extracts the upload ID from a path, which has already been stripped of the base path (done by the user). Effectively, we only remove
pkg/handler/unrouted_handler.go:1678
↓ 5 callers
Function
invokeHookSync
invokeHookSync executes a hook of the given type with the given event data. If the hook was not executed properly (e.g. an error occurred or not handl
pkg/hooks/hooks.go:219
↓ 5 callers
Method
keyWithPrefix
(key string)
pkg/azurestore/azurestore.go:260
↓ 5 callers
Method
usesIETFDraft
usesIETFDraft returns whether a HTTP request uses a supported version of the resumable upload draft from IETF (instead of tus v1) and support has been
pkg/handler/unrouted_handler.go:1470
↓ 4 callers
Method
DeleteObject
(ctx context.Context, input *s3.DeleteObjectInput, opt ...func(*s3.Options))
pkg/s3store/s3store.go:205
↓ 4 callers
Method
DeleteObjects
(ctx context.Context, input *s3.DeleteObjectsInput, opt ...func(*s3.Options))
pkg/s3store/s3store.go:206
↓ 4 callers
Method
DeleteObjectsWithFilter
(ctx context.Context, params GCSFilterParams)
pkg/gcsstore/gcsservice.go:67
↓ 4 callers
Method
GetObjectAttrs
GetObjectAttrs returns the associated attributes of a GCS object. See: https://pkg.go.dev/cloud.google.com/go/storage#ObjectAttrs
pkg/gcsstore/gcsservice.go:260
↓ 4 callers
Function
NewPutObjectInputMatcher
(expect *s3.PutObjectInput)
pkg/s3store/s3store_util_test.go:63
↓ 4 callers
Method
Parse
()
internal/grouped_flags/grouped_flags.go:53
↓ 4 callers
Method
Setup
Setup is invoked once the hook backend is initalized.
pkg/hooks/hooks.go:32
↓ 4 callers
Method
String
()
pkg/handler/utils_test.go:132
↓ 4 callers
Function
Uid
uid returns a unique id. These ids consist of 128 bits from a cryptographically strong pseudo-random generator and are like uuids, but without the das
internal/uid/uid.go:14
↓ 4 callers
Function
addIETFContentTypeHeader
addIETFContentTypeHeader writes the Content-Type header depending on the interop version.
pkg/handler/utils_test.go:157
↓ 4 callers
Method
finishUploadIfComplete
finishUploadIfComplete checks whether an upload is completed (i.e. upload offset matches upload size) and if so, it will call the data store's FinishU
pkg/handler/unrouted_handler.go:982
↓ 4 callers
Method
getInternalInfo
(ctx context.Context)
pkg/s3store/s3store.go:625
↓ 4 callers
Function
newS3PartProducer
(source io.Reader, backlog int64, tmpDir string, diskWriteDurationMetric prometheus.Summary)
pkg/s3store/s3store_part_producer.go:31
↓ 4 callers
Method
produce
(ctx context.Context, partSize int64)
pkg/s3store/s3store_part_producer.go:58
↓ 4 callers
Method
validate
()
pkg/handler/config.go:153
↓ 3 callers
Method
DeleteObject
DeleteObject deletes the object defined by GCSObjectParams
pkg/gcsstore/gcsservice.go:293
↓ 3 callers
Method
StageSentinelBlock
StageSentinelBlock stages a marker block so that a freshly created upload always has at least one uncommitted block (see GetOffset).
pkg/azurestore/azureservice.go:82
↓ 3 callers
Method
absFileURL
Make an absolute URLs to the given upload id. If the base path is absolute it will be prepended else the host and protocol from the request is used.
pkg/handler/unrouted_handler.go:1301
↓ 3 callers
Function
assertEmptyDirectory
(dir string, a *assert.Assertions)
pkg/filelocker/filelocker_test.go:118
↓ 3 callers
Function
blockIDIntToBase64
These helper functions convert an int block ID to a base-64 string and vice versa
pkg/azurestore/azureservice.go:335
↓ 3 callers
Method
calcOptimalPartSize
(size int64)
pkg/s3store/s3store.go:1187
↓ 3 callers
Function
checkForNotFoundError
checkForNotFoundError checks if the error indicates that a resource was not found. If so, we return the corresponding tusd error.
pkg/azurestore/azureservice.go:357
↓ 3 callers
Function
invokeHookAsync
(typ HookType, event handler.HookEvent, hookHandler HookHandler)
pkg/hooks/hooks.go:206
↓ 3 callers
Function
isIETFDraftUploadComplete
isIETFDraftUploadComplete returns whether a HTTP request upload is complete according to the set resumable upload draft version from IETF.
pkg/handler/unrouted_handler.go:1501
↓ 3 callers
Method
releaseUploadSemaphore
()
pkg/s3store/s3store.go:1257
↓ 3 callers
Method
writeChunk
writeChunk reads the body from the requests r and appends it to the upload with the corresponding id. Afterwards, it will set the necessary response h
pkg/handler/unrouted_handler.go:872
↓ 2 callers
Method
Commit
Commit the uploaded blocks to the BlockBlob
pkg/azurestore/azureservice.go:88
↓ 2 callers
Method
ComposeFrom
ComposeFrom composes multiple object types together,
pkg/gcsstore/gcsservice.go:320
↓ 2 callers
Method
ComposeObjects
(ctx context.Context, params GCSComposeParams)
pkg/gcsstore/gcsservice.go:69
↓ 2 callers
Method
ComposeObjects
ComposeObjects composes multiple GCS objects in to a single object. Since GCS limits composition to a max of 32 objects, additional logic has been add
pkg/gcsstore/gcsservice.go:249
↓ 2 callers
Method
DeleteObject
(ctx context.Context, params GCSObjectParams)
pkg/gcsstore/gcsservice.go:66
↓ 2 callers
Method
DeleteObjectsWithFilter
DeleteObjectWithPrefix will delete objects who match the provided filter parameters.
pkg/gcsstore/gcsservice.go:112
↓ 2 callers
Method
FilterObjects
FilterObjects returns a list of GCS object IDs that match the passed GCSFilterParams. It expects GCS objects to be of the format [uid]_[chunk_idx] whe
pkg/gcsstore/gcsservice.go:342
↓ 2 callers
Function
New
New creates a wrapper around the provided S3 API that logs all calls to `logger`
internal/s3log/s3log.go:25
↓ 2 callers
Function
NewFlagGroupSet
(errorHandling flag.ErrorHandling)
internal/grouped_flags/grouped_flags.go:24
↓ 2 callers
Function
NewHandlerWithHooks
NewHandlerWithHooks creates a tusd request handler, whose notifcation channels and callbacks are configured to emit the hooks on the provided hook han
pkg/hooks/hooks.go:257
↓ 2 callers
Function
NewUnroutedHandler
NewUnroutedHandler creates a new handler without routing using the given configuration. It exposes the http handlers which need to be combined with a
pkg/handler/unrouted_handler.go:122
↓ 2 callers
Method
SetConcurrentPartUploads
SetConcurrentPartUploads changes the limit on how many concurrent part uploads to S3 are allowed.
pkg/s3store/s3store.go:256
↓ 2 callers
Method
SetObjectMetadata
(ctx context.Context, params GCSObjectParams, metadata map[string]string)
pkg/gcsstore/gcsservice.go:65
↓ 2 callers
Method
SetOutput
(output io.Writer)
internal/grouped_flags/grouped_flags.go:57
↓ 2 callers
Method
StopUpload
StopUpload interrupts a running upload from the server-side. This means that the current request body is closed, so that the data store does not get a
pkg/handler/datastore.go:48
↓ 2 callers
Method
UseContentServer
(ext ContentServerDataStore)
pkg/handler/composer.go:91
↓ 2 callers
Function
assertCalculatedPartSize
(store S3Store, assert *assert.Assertions, size int64)
pkg/s3store/calcpartsize_test.go:13
↓ 2 callers
Method
compose
Compose takes a bucket name, a list of initial source names, and a destination string to compose multiple GCS objects together
pkg/gcsstore/gcsservice.go:137
↓ 2 callers
Function
createFile
createFile creates the file with the content. If the corresponding directory does not exist, it is created. If the file already exists, its content is
pkg/filestore/filestore.go:323
↓ 2 callers
Method
defaultBinPath
defaultBinPath returns the path to the file storing the binary data, if it is not customized using the pre-create hook.
pkg/filestore/filestore.go:195
↓ 2 callers
Method
emitFinishEvents
emitFinishEvents calls the PreFinishResponseCallback function and sends the necessary message on the CompleteUpload channel.
pkg/handler/unrouted_handler.go:1003
↓ 2 callers
Function
filterContentType
filterContentType returns the values for the Content-Type and Content-Disposition headers for a given upload. These values should be used in responses
pkg/handler/unrouted_handler.go:1156
↓ 2 callers
Method
getIETFDraftUploadLimits
getIETFDraftUploadLimits returns the Upload-Limit header for a given upload according to the set resumable upload draft version from IETF.
pkg/handler/unrouted_handler.go:1477
↓ 2 callers
Method
incUploadsCreated
incUploadsCreated increases the counter for completed uploads atomically by one.
pkg/handler/metrics.go:51
↓ 2 callers
Method
infoPath
(id string)
pkg/azurestore/azurestore.go:246
↓ 2 callers
Method
infoPath
infoPath returns the path to the .info file storing the file's info.
pkg/filestore/filestore.go:200
↓ 2 callers
Function
jsonEncode
jsonEncode converts a value to a JSON string, handling errors gracefully
internal/s3log/s3log.go:54
↓ 2 callers
Method
newContext
newContext constructs a new httpContext for the given request. This should only be done once per request and the context should be stored in the reque
pkg/handler/context.go:37
↓ 2 callers
Function
newDelayedContext
newDelayedContext returns a context with delayed cancellation propagation. If the parent context is done, the new context will also be cancelled but o
pkg/handler/context.go:87
↓ 2 callers
Function
safelyDrainChannelOrFail
(c <-chan fileChunk, t *testing.T)
pkg/s3store/s3store_part_producer_test.go:108
↓ 2 callers
Function
sanitizeForLogging
sanitizeForLogging creates a copy of the input with large values removed that we don't want to print in the logs.
internal/s3log/s3log.go:34
↓ 2 callers
Method
terminateUpload
terminateUpload passes a given upload to the DataStore's Terminater, send the corresponding upload info on the TerminatedUploads channnel and updates
pkg/handler/unrouted_handler.go:1252
↓ 2 callers
Function
validateUploadId
validateUploadId checks whether an ID included in a FileInfoChanges struct is allowed.
pkg/handler/unrouted_handler.go:1714
↓ 2 callers
Method
writeInfo
(ctx context.Context)
pkg/azurestore/azurestore.go:250
↓ 2 callers
Method
writeInfo
writeInfo updates the entire information. Everything will be overwritten.
pkg/filestore/filestore.go:303
↓ 2 callers
Method
writeInfo
(ctx context.Context, info handler.FileInfo)
pkg/s3store/s3store.go:387
↓ 1 callers
Method
Acquire
Acquire will block until the semaphore can be acquired.
internal/semaphore/semaphore.go:13
↓ 1 callers
Function
CleanupPlugins
CleanupPlugins closes the connections to all plugins and ensures that their processes are properly stopped. You must call this function when the main
pkg/hooks/plugin/plugin.go:73
↓ 1 callers
Method
Client
(b *plugin.MuxBroker, c *rpc.Client)
pkg/hooks/plugin/plugin.go:146
↓ 1 callers
Function
CreateComposer
()
cmd/tusd/cli/composer.go:30
↓ 1 callers
Method
DelFile
DelFile terminates an upload permanently.
pkg/handler/unrouted_handler.go:1184
↓ 1 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/s3log/s3log_mock_test.go:34
↓ 1 callers
Method
FinishUpload
(ctx context.Context)
pkg/s3store/s3store.go:842
↓ 1 callers
Method
GetFile
GetFile handles requests to download a file using a GET request. This is not part of the specification.
pkg/handler/unrouted_handler.go:1024
↓ 1 callers
Method
GetInfo
(ctx context.Context)
pkg/gcsstore/gcsstore.go:137
↓ 1 callers
Method
GetInfo
(ctx context.Context)
pkg/s3store/s3store.go:620
↓ 1 callers
Method
GetObjectSize
GetObjectSize returns the byte length of the specified GCS object.
pkg/gcsstore/gcsservice.go:102
↓ 1 callers
Method
HeadFile
HeadFile returns the length and offset for the HEAD request
pkg/handler/unrouted_handler.go:636
↓ 1 callers
Method
Load
Load retrieves the map of the counter pointers atomically
pkg/handler/metrics.go:124
↓ 1 callers
Method
Middleware
Middleware checks various aspects of the request and ensures that it conforms with the spec. Also handles method overriding for clients which cannot m
pkg/handler/unrouted_handler.go:168
↓ 1 callers
Function
New
New creates a new collector which read froms the provided Metrics struct.
pkg/prometheuscollector/prometheuscollector.go:52
↓ 1 callers
Function
New
New creates a semaphore with the given concurrency limit.
internal/semaphore/semaphore.go:8
↓ 1 callers
Function
NewAzureService
New Azure service for communication to Azure BlockBlob Storage API
pkg/azurestore/azureservice.go:102
↓ 1 callers
Function
NewListener
(addr string)
cmd/tusd/cli/listener.go:9
↓ 1 callers
Function
NewMockFullDataStore
NewMockFullDataStore creates a new mock instance.
pkg/handler/handler_mock_test.go:28
↓ 1 callers
Function
NewMockHookHandler
NewMockHookHandler creates a new mock instance.
pkg/hooks/hooks_mock_test.go:25
↓ 1 callers
Function
NewMockS3API
NewMockS3API creates a new mock instance.
internal/s3log/s3log_mock_test.go:27
↓ 1 callers
Function
NewUnixListener
Binds to a UNIX socket. If the file already exists, try to remove it before binding again. This logic is borrowed from Gunicorn (see https://github.co
cmd/tusd/cli/listener.go:16
↓ 1 callers
Function
ParseFlags
()
cmd/tusd/cli/flags.go:120
↓ 1 callers
Method
PatchFile
PatchFile adds a chunk to an upload. This operation is only allowed if enough space in the upload is left.
pkg/handler/unrouted_handler.go:727
↓ 1 callers
Method
PostFile
PostFile creates a new file upload using the datastore after validating the length and parsing the metadata.
pkg/handler/unrouted_handler.go:283
↓ 1 callers
Method
PostFileV2
PostFile creates a new file upload using the datastore after validating the length and parsing the metadata.
pkg/handler/unrouted_handler.go:468
↓ 1 callers
Function
PrepareGreeting
()
cmd/tusd/cli/greeting.go:10
↓ 1 callers
Method
ReadObject
ReadObject reads a GCSObjectParams, returning a GCSReader object if successful, and an error otherwise
pkg/gcsstore/gcsservice.go:273
↓ 1 callers
Method
RegisterMetrics
(registry prometheus.Registerer)
pkg/s3store/s3store.go:271
↓ 1 callers
Method
Release
Release frees the acquired slot in the semaphore.
internal/semaphore/semaphore.go:18
↓ 1 callers
Function
SerializeMetadataHeader
SerializeMetadataHeader serializes a map of strings into the Upload-Metadata header format used in the response for HEAD requests. e.g. Upload-Metadat
pkg/handler/unrouted_handler.go:1617
← previous
next →
101–200 of 707, ranked by callers