Documentation
¶
Index ¶
- type CtxRangeKeyType
- type DbLocker
- type HandlerConfig
- type Lock
- type TusHandler
- func (t *TusHandler) CompleteUpload(ctx context.Context, identifier any) error
- func (t *TusHandler) FailUploadById(ctx context.Context, id string) error
- func (t *TusHandler) HandleEventResponseError(message string, httpCode int, hook handler.HookEvent)
- func (t *TusHandler) SetHashById(ctx context.Context, id string, hash core.StorageHash) error
- func (t *TusHandler) SetStorageProtocol(storageProtocol core.StorageProtocol)
- func (t *TusHandler) SetupRoute(router *mux.Router, authMw mux.MiddlewareFunc, path string)
- func (t *TusHandler) StorageProtocol() core.StorageProtocol
- func (t *TusHandler) UploadReader(ctx context.Context, identifier any, start int64) (io.ReadCloser, error)
- func (t *TusHandler) UploadSize(ctx context.Context, identifier any) (uint64, error)
- type UploadCallbackHandler
- func DefaultUploadCompletedHandler(ctx core.Context, processHandler UploadCallbackHandler) UploadCallbackHandler
- func DefaultUploadCreatedHandler(ctx core.Context, verifyFunc UploadCreatedVerifyFunc, ...) UploadCallbackHandler
- func DefaultUploadProgressHandler(ctx core.Context) UploadCallbackHandler
- func DefaultUploadTerminatedHandler(ctx core.Context) UploadCallbackHandler
- type UploadCreatedAfterFunc
- type UploadCreatedVerifyFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbLocker ¶
type HandlerConfig ¶
type HandlerConfig struct { BasePath string PreUpload preUploadCreateCallback CreatedUploadHandler UploadCallbackHandler UploadProgressHandler UploadCallbackHandler TerminatedUploadHandler UploadCallbackHandler CompletedUploadHandler UploadCallbackHandler }
type TusHandler ¶
type TusHandler struct {
// contains filtered or unexported fields
}
func NewTusHandler ¶
func NewTusHandler( ctx core.Context, handlerConfig HandlerConfig) (*TusHandler, error)
func (*TusHandler) CompleteUpload ¶
func (t *TusHandler) CompleteUpload(ctx context.Context, identifier any) error
func (*TusHandler) FailUploadById ¶
func (t *TusHandler) FailUploadById(ctx context.Context, id string) error
func (*TusHandler) HandleEventResponseError ¶
func (t *TusHandler) HandleEventResponseError(message string, httpCode int, hook handler.HookEvent)
func (*TusHandler) SetHashById ¶
func (t *TusHandler) SetHashById(ctx context.Context, id string, hash core.StorageHash) error
func (*TusHandler) SetStorageProtocol ¶
func (t *TusHandler) SetStorageProtocol(storageProtocol core.StorageProtocol)
func (*TusHandler) SetupRoute ¶
func (t *TusHandler) SetupRoute(router *mux.Router, authMw mux.MiddlewareFunc, path string)
func (*TusHandler) StorageProtocol ¶
func (t *TusHandler) StorageProtocol() core.StorageProtocol
func (*TusHandler) UploadReader ¶
func (t *TusHandler) UploadReader(ctx context.Context, identifier any, start int64) (io.ReadCloser, error)
func (*TusHandler) UploadSize ¶
type UploadCallbackHandler ¶
type UploadCallbackHandler func(*TusHandler, handler.HookEvent)
func DefaultUploadCompletedHandler ¶
func DefaultUploadCompletedHandler(ctx core.Context, processHandler UploadCallbackHandler) UploadCallbackHandler
func DefaultUploadCreatedHandler ¶
func DefaultUploadCreatedHandler(ctx core.Context, verifyFunc UploadCreatedVerifyFunc, afterFunc UploadCreatedAfterFunc) UploadCallbackHandler
func DefaultUploadProgressHandler ¶
func DefaultUploadProgressHandler(ctx core.Context) UploadCallbackHandler
func DefaultUploadTerminatedHandler ¶
func DefaultUploadTerminatedHandler(ctx core.Context) UploadCallbackHandler
type UploadCreatedAfterFunc ¶
type UploadCreatedVerifyFunc ¶
Click to show internal directories.
Click to hide internal directories.