container

package
v0.0.0-...-495e01f Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup

func Cleanup(ctx context.Context, olderThan time.Duration) error

Cleanup removes expired container data

func RemoveBlobUploadByID

func RemoveBlobUploadByID(ctx context.Context, id string) error

Remove deletes the data and the model of a blob upload

func UpdateRepositoryNames

func UpdateRepositoryNames(ctx context.Context, owner *user_model.User, newOwnerName string) error

UpdateRepositoryNames updates the repository name property for all packages of the specific owner

Types

type BlobUploader

type BlobUploader struct {
	*packages_model.PackageBlobUpload
	*packages_module.MultiHasher
	// contains filtered or unexported fields
}

BlobUploader handles chunked blob uploads

func NewBlobUploader

func NewBlobUploader(ctx context.Context, id string) (*BlobUploader, error)

NewBlobUploader creates a new blob uploader for the given id

func (*BlobUploader) Append

func (u *BlobUploader) Append(ctx context.Context, r io.Reader) error

Append appends a chunk of data and updates the model

func (*BlobUploader) Close

func (u *BlobUploader) Close() error

Close implements io.Closer

func (*BlobUploader) Read

func (u *BlobUploader) Read(p []byte) (int, error)

Read implements io.Reader

func (*BlobUploader) Size

func (u *BlobUploader) Size() int64

Jump to

Keyboard shortcuts

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