Documentation ¶
Index ¶
Constants ¶
View Source
const ( // MaxRandomNumber represents the random number range [0, MaxRandomNumber). MaxRandomNumber int = 10000 // MetaDataDB represents the name of the file used for storing metadata. MetaDataDB string = "data.db" // CfgDataPathKey represents the dataPath key in config. CfgDataPathKey = "dataPath" )
Variables ¶
View Source
var ( // ErrOperateDB is returned when unknow error hanppend from database. ErrOperateDB = errors.New("error happened when operating database") // ErrNotFound represents no record found. ErrNotFound = errors.New("not found") )
View Source
var ( // ErrGroupUnmatch is returned when add a Blob into a blobgroup which it is unmatch. ErrGroupUnmatch = errors.New("group is unmatch") )
Functions ¶
This section is empty.
Types ¶
type Blob ¶
type Blob struct { // FileName represents the file name of the deleted file. FileName string // Dir represent where the blob stored before deleted. Dir string // CreatedAt represents when the blob is created, i.e. when it is deleted. CreatedAt time.Time // ID used to indentify blob when two or more files has the same filename. ID string }
Blob represents the blob instance.
Click to show internal directories.
Click to hide internal directories.