Documentation ¶
Index ¶
- func CreatePackJob(ctx context.Context, db *gorm.DB, attachmentID model.SourceAttachmentID, ...) (*model.Job, error)
- func EnsureParentDirectories(ctx context.Context, db *gorm.DB, file *model.File, ...) error
- func ExtractFromFsObject(ctx context.Context, info fs.ObjectInfo) (size int64, hashValue string, lastModified time.Time)
- func MaxSizeToSplitSize(m int64) int64
- func PushFile(ctx context.Context, db *gorm.DB, obj fs.ObjectInfo, ...) (*model.File, []model.FileRange, error)
- type FileRangeSet
- func (r *FileRangeSet) Add(fileRanges ...model.FileRange)
- func (r *FileRangeSet) AddIfFits(fileRange model.FileRange, maxSize int64) bool
- func (r *FileRangeSet) CarSize() int64
- func (r *FileRangeSet) FileRangeIDs() []model.FileRangeID
- func (r *FileRangeSet) FileRanges() []model.FileRange
- func (r *FileRangeSet) Reset()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreatePackJob ¶
func EnsureParentDirectories ¶
func ExtractFromFsObject ¶
func MaxSizeToSplitSize ¶
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()
Click to show internal directories.
Click to hide internal directories.