urlmanager

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is the unified implementation of UrlManager. It delegates to cloud-specific Signers resolved by provider metadata.

func NewManager

func NewManager(database db.CredentialStore, signing config.SigningConfig) *Manager

func (*Manager) CompleteMultipartUpload

func (m *Manager) CompleteMultipartUpload(ctx context.Context, bucketName string, key string, uploadId string, parts []MultipartPart) error

func (*Manager) InitMultipartUpload

func (m *Manager) InitMultipartUpload(ctx context.Context, bucketName string, key string) (string, error)

func (*Manager) RegisterSigner

func (m *Manager) RegisterSigner(p string, s signer.Signer)

func (*Manager) SignDownloadPart

func (m *Manager) SignDownloadPart(ctx context.Context, accessId string, urlStr string, start int64, end int64, opts SignOptions) (string, error)

func (*Manager) SignMultipartPart

func (m *Manager) SignMultipartPart(ctx context.Context, bucketName string, key string, uploadId string, partNumber int32) (string, error)

func (*Manager) SignURL

func (m *Manager) SignURL(ctx context.Context, accessId string, urlStr string, opts SignOptions) (string, error)

func (*Manager) SignUploadURL

func (m *Manager) SignUploadURL(ctx context.Context, accessId string, urlStr string, opts SignOptions) (string, error)

type MultipartManager

type MultipartManager interface {
	InitMultipartUpload(ctx context.Context, bucket string, key string) (string, error)
	SignMultipartPart(ctx context.Context, bucket string, key string, uploadId string, partNumber int32) (string, error)
	CompleteMultipartUpload(ctx context.Context, bucket string, key string, uploadId string, parts []MultipartPart) error
}

MultipartManager handles multipart lifecycle for a storage backend.

type MultipartPart

type MultipartPart = signer.MultipartPart

MultipartPart is a type alias for backward compatibility or convenience.

type SignOptions

type SignOptions = signer.SignOptions

SignOptions is a type alias for backward compatibility or convenience.

type SignedURLManager

type SignedURLManager interface {
	// SignURL signs a URL for the given resource (Download).
	SignURL(ctx context.Context, accessId string, url string, opts SignOptions) (string, error)

	// SignUploadURL signs a URL for uploading a resource.
	SignUploadURL(ctx context.Context, accessId string, url string, opts SignOptions) (string, error)

	// SignDownloadPart signs a URL for downloading a specific byte range.
	SignDownloadPart(ctx context.Context, accessId string, url string, start int64, end int64, opts SignOptions) (string, error)
}

SignedURLManager signs download/upload URLs for a storage backend.

type UrlManager

type UrlManager interface {
	SignedURLManager
	MultipartManager
}

UrlManager composes signed URL operations and multipart operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL