local

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(conf *store2.Config) (store2.Store, error)

Types

type Chunk

type Chunk struct {
	types.CreateModel
	UploadID string `json:"upload_id" gorm:"uniqueIndex:ui;not null;size:128;comment:上传id"`
	Index    int    `json:"index" gorm:"uniqueIndex:ui;not null;comment:切片下标"`
	Sha      string `json:"sha" gorm:"not null;size:128;comment:切片sha"`
	Data     string `json:"data" gorm:"not null;type:mediumblob;comment:切片数据"`
	Size     int    `json:"size" gorm:"not null;comment:切片大小"`
}

func (*Chunk) Add

func (c *Chunk) Add(db *gorm.DB) error

func (*Chunk) Copy

func (c *Chunk) Copy(db *gorm.DB, uploadId string, index int) error

func (*Chunk) Delete

func (c *Chunk) Delete(db *gorm.DB, uploadId string) error

func (*Chunk) OneBySha

func (c *Chunk) OneBySha(db *gorm.DB, sha string) error

func (*Chunk) Parts

func (c *Chunk) Parts(db *gorm.DB, uploadId string) ([]*Chunk, error)

Jump to

Keyboard shortcuts

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