MCPcopy Index your code

hub / github.com/tus/tusd / functions

Functions707 in github.com/tus/tusd

↓ 5 callersMethodUploadPartCopy
(ctx context.Context, input *s3.UploadPartCopyInput, opt ...func(*s3.Options))
pkg/s3store/s3store.go:208
↓ 5 callersMethodWriteObject
(ctx context.Context, params GCSObjectParams, r io.Reader)
pkg/gcsstore/gcsservice.go:68
↓ 5 callersFunctioncleanUpTempFile
(file *os.File)
pkg/s3store/s3store.go:562
↓ 5 callersFunctionextractIDFromPath
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 callersFunctioninvokeHookSync
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 callersMethodkeyWithPrefix
(key string)
pkg/azurestore/azurestore.go:260
↓ 5 callersMethodusesIETFDraft
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 callersMethodDeleteObject
(ctx context.Context, input *s3.DeleteObjectInput, opt ...func(*s3.Options))
pkg/s3store/s3store.go:205
↓ 4 callersMethodDeleteObjects
(ctx context.Context, input *s3.DeleteObjectsInput, opt ...func(*s3.Options))
pkg/s3store/s3store.go:206
↓ 4 callersMethodDeleteObjectsWithFilter
(ctx context.Context, params GCSFilterParams)
pkg/gcsstore/gcsservice.go:67
↓ 4 callersMethodGetObjectAttrs
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 callersFunctionNewPutObjectInputMatcher
(expect *s3.PutObjectInput)
pkg/s3store/s3store_util_test.go:63
↓ 4 callersMethodParse
()
internal/grouped_flags/grouped_flags.go:53
↓ 4 callersMethodSetup
Setup is invoked once the hook backend is initalized.
pkg/hooks/hooks.go:32
↓ 4 callersMethodString
()
pkg/handler/utils_test.go:132
↓ 4 callersFunctionUid
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 callersFunctionaddIETFContentTypeHeader
addIETFContentTypeHeader writes the Content-Type header depending on the interop version.
pkg/handler/utils_test.go:157
↓ 4 callersMethodfinishUploadIfComplete
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 callersMethodgetInternalInfo
(ctx context.Context)
pkg/s3store/s3store.go:625
↓ 4 callersFunctionnewS3PartProducer
(source io.Reader, backlog int64, tmpDir string, diskWriteDurationMetric prometheus.Summary)
pkg/s3store/s3store_part_producer.go:31
↓ 4 callersMethodproduce
(ctx context.Context, partSize int64)
pkg/s3store/s3store_part_producer.go:58
↓ 4 callersMethodvalidate
()
pkg/handler/config.go:153
↓ 3 callersMethodDeleteObject
DeleteObject deletes the object defined by GCSObjectParams
pkg/gcsstore/gcsservice.go:293
↓ 3 callersMethodStageSentinelBlock
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 callersMethodabsFileURL
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 callersFunctionassertEmptyDirectory
(dir string, a *assert.Assertions)
pkg/filelocker/filelocker_test.go:118
↓ 3 callersFunctionblockIDIntToBase64
These helper functions convert an int block ID to a base-64 string and vice versa
pkg/azurestore/azureservice.go:335
↓ 3 callersMethodcalcOptimalPartSize
(size int64)
pkg/s3store/s3store.go:1187
↓ 3 callersFunctioncheckForNotFoundError
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 callersFunctioninvokeHookAsync
(typ HookType, event handler.HookEvent, hookHandler HookHandler)
pkg/hooks/hooks.go:206
↓ 3 callersFunctionisIETFDraftUploadComplete
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 callersMethodreleaseUploadSemaphore
()
pkg/s3store/s3store.go:1257
↓ 3 callersMethodwriteChunk
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 callersMethodCommit
Commit the uploaded blocks to the BlockBlob
pkg/azurestore/azureservice.go:88
↓ 2 callersMethodComposeFrom
ComposeFrom composes multiple object types together,
pkg/gcsstore/gcsservice.go:320
↓ 2 callersMethodComposeObjects
(ctx context.Context, params GCSComposeParams)
pkg/gcsstore/gcsservice.go:69
↓ 2 callersMethodComposeObjects
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 callersMethodDeleteObject
(ctx context.Context, params GCSObjectParams)
pkg/gcsstore/gcsservice.go:66
↓ 2 callersMethodDeleteObjectsWithFilter
DeleteObjectWithPrefix will delete objects who match the provided filter parameters.
pkg/gcsstore/gcsservice.go:112
↓ 2 callersMethodFilterObjects
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 callersFunctionNew
New creates a wrapper around the provided S3 API that logs all calls to `logger`
internal/s3log/s3log.go:25
↓ 2 callersFunctionNewFlagGroupSet
(errorHandling flag.ErrorHandling)
internal/grouped_flags/grouped_flags.go:24
↓ 2 callersFunctionNewHandlerWithHooks
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 callersFunctionNewUnroutedHandler
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 callersMethodSetConcurrentPartUploads
SetConcurrentPartUploads changes the limit on how many concurrent part uploads to S3 are allowed.
pkg/s3store/s3store.go:256
↓ 2 callersMethodSetObjectMetadata
(ctx context.Context, params GCSObjectParams, metadata map[string]string)
pkg/gcsstore/gcsservice.go:65
↓ 2 callersMethodSetOutput
(output io.Writer)
internal/grouped_flags/grouped_flags.go:57
↓ 2 callersMethodStopUpload
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 callersMethodUseContentServer
(ext ContentServerDataStore)
pkg/handler/composer.go:91
↓ 2 callersFunctionassertCalculatedPartSize
(store S3Store, assert *assert.Assertions, size int64)
pkg/s3store/calcpartsize_test.go:13
↓ 2 callersMethodcompose
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 callersFunctioncreateFile
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 callersMethoddefaultBinPath
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 callersMethodemitFinishEvents
emitFinishEvents calls the PreFinishResponseCallback function and sends the necessary message on the CompleteUpload channel.
pkg/handler/unrouted_handler.go:1003
↓ 2 callersFunctionfilterContentType
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 callersMethodgetIETFDraftUploadLimits
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 callersMethodincUploadsCreated
incUploadsCreated increases the counter for completed uploads atomically by one.
pkg/handler/metrics.go:51
↓ 2 callersMethodinfoPath
(id string)
pkg/azurestore/azurestore.go:246
↓ 2 callersMethodinfoPath
infoPath returns the path to the .info file storing the file's info.
pkg/filestore/filestore.go:200
↓ 2 callersFunctionjsonEncode
jsonEncode converts a value to a JSON string, handling errors gracefully
internal/s3log/s3log.go:54
↓ 2 callersMethodnewContext
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 callersFunctionnewDelayedContext
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 callersFunctionsafelyDrainChannelOrFail
(c <-chan fileChunk, t *testing.T)
pkg/s3store/s3store_part_producer_test.go:108
↓ 2 callersFunctionsanitizeForLogging
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 callersMethodterminateUpload
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 callersFunctionvalidateUploadId
validateUploadId checks whether an ID included in a FileInfoChanges struct is allowed.
pkg/handler/unrouted_handler.go:1714
↓ 2 callersMethodwriteInfo
(ctx context.Context)
pkg/azurestore/azurestore.go:250
↓ 2 callersMethodwriteInfo
writeInfo updates the entire information. Everything will be overwritten.
pkg/filestore/filestore.go:303
↓ 2 callersMethodwriteInfo
(ctx context.Context, info handler.FileInfo)
pkg/s3store/s3store.go:387
↓ 1 callersMethodAcquire
Acquire will block until the semaphore can be acquired.
internal/semaphore/semaphore.go:13
↓ 1 callersFunctionCleanupPlugins
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 callersMethodClient
(b *plugin.MuxBroker, c *rpc.Client)
pkg/hooks/plugin/plugin.go:146
↓ 1 callersFunctionCreateComposer
()
cmd/tusd/cli/composer.go:30
↓ 1 callersMethodDelFile
DelFile terminates an upload permanently.
pkg/handler/unrouted_handler.go:1184
↓ 1 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use.
internal/s3log/s3log_mock_test.go:34
↓ 1 callersMethodFinishUpload
(ctx context.Context)
pkg/s3store/s3store.go:842
↓ 1 callersMethodGetFile
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 callersMethodGetInfo
(ctx context.Context)
pkg/gcsstore/gcsstore.go:137
↓ 1 callersMethodGetInfo
(ctx context.Context)
pkg/s3store/s3store.go:620
↓ 1 callersMethodGetObjectSize
GetObjectSize returns the byte length of the specified GCS object.
pkg/gcsstore/gcsservice.go:102
↓ 1 callersMethodHeadFile
HeadFile returns the length and offset for the HEAD request
pkg/handler/unrouted_handler.go:636
↓ 1 callersMethodLoad
Load retrieves the map of the counter pointers atomically
pkg/handler/metrics.go:124
↓ 1 callersMethodMiddleware
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 callersFunctionNew
New creates a new collector which read froms the provided Metrics struct.
pkg/prometheuscollector/prometheuscollector.go:52
↓ 1 callersFunctionNew
New creates a semaphore with the given concurrency limit.
internal/semaphore/semaphore.go:8
↓ 1 callersFunctionNewAzureService
New Azure service for communication to Azure BlockBlob Storage API
pkg/azurestore/azureservice.go:102
↓ 1 callersFunctionNewListener
(addr string)
cmd/tusd/cli/listener.go:9
↓ 1 callersFunctionNewMockFullDataStore
NewMockFullDataStore creates a new mock instance.
pkg/handler/handler_mock_test.go:28
↓ 1 callersFunctionNewMockHookHandler
NewMockHookHandler creates a new mock instance.
pkg/hooks/hooks_mock_test.go:25
↓ 1 callersFunctionNewMockS3API
NewMockS3API creates a new mock instance.
internal/s3log/s3log_mock_test.go:27
↓ 1 callersFunctionNewUnixListener
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 callersFunctionParseFlags
()
cmd/tusd/cli/flags.go:120
↓ 1 callersMethodPatchFile
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 callersMethodPostFile
PostFile creates a new file upload using the datastore after validating the length and parsing the metadata.
pkg/handler/unrouted_handler.go:283
↓ 1 callersMethodPostFileV2
PostFile creates a new file upload using the datastore after validating the length and parsing the metadata.
pkg/handler/unrouted_handler.go:468
↓ 1 callersFunctionPrepareGreeting
()
cmd/tusd/cli/greeting.go:10
↓ 1 callersMethodReadObject
ReadObject reads a GCSObjectParams, returning a GCSReader object if successful, and an error otherwise
pkg/gcsstore/gcsservice.go:273
↓ 1 callersMethodRegisterMetrics
(registry prometheus.Registerer)
pkg/s3store/s3store.go:271
↓ 1 callersMethodRelease
Release frees the acquired slot in the semaphore.
internal/semaphore/semaphore.go:18
↓ 1 callersFunctionSerializeMetadataHeader
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
← previousnext →101–200 of 707, ranked by callers