push

package
v0.5.13 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0, MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePackJob

func CreatePackJob(
	ctx context.Context,
	db *gorm.DB,
	attachmentID model.SourceAttachmentID,
	fileRangeIDs []model.FileRangeID,
) (*model.Job, error)

func EnsureParentDirectories

func EnsureParentDirectories(
	ctx context.Context,
	db *gorm.DB,
	file *model.File, rootDirID model.DirectoryID,
	directoryCache map[string]model.DirectoryID) error

func ExtractFromFsObject

func ExtractFromFsObject(ctx context.Context, info fs.ObjectInfo) (size int64, hashValue string, lastModified time.Time)

func MaxSizeToSplitSize

func MaxSizeToSplitSize(m int64) int64

func PushFile

func PushFile(
	ctx context.Context,
	db *gorm.DB,
	obj fs.ObjectInfo,
	attachment model.SourceAttachment,
	directoryCache map[string]model.DirectoryID) (*model.File, []model.FileRange, error)

Types

type FileRangeSet

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

func NewFileRangeSet

func NewFileRangeSet() *FileRangeSet

func (*FileRangeSet) Add

func (r *FileRangeSet) Add(fileRanges ...model.FileRange)

func (*FileRangeSet) AddIfFits

func (r *FileRangeSet) AddIfFits(fileRange model.FileRange, maxSize int64) bool

func (*FileRangeSet) CarSize

func (r *FileRangeSet) CarSize() int64

func (*FileRangeSet) FileRangeIDs

func (r *FileRangeSet) FileRangeIDs() []model.FileRangeID

func (*FileRangeSet) FileRanges

func (r *FileRangeSet) FileRanges() []model.FileRange

func (*FileRangeSet) Reset

func (r *FileRangeSet) Reset()

Jump to

Keyboard shortcuts

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