Documentation ¶
Index ¶
- func GetAllFiles(db DBQuery) ([]iface.File, error)
- func GetAllTokens(db DBQuery) ([]iface.Token, error)
- func GetExpiredFiles(db DBQuery, limit int) ([]iface.File, error)
- func GetFileById(db DBQuery, id string) (*iface.File, error)
- func GetFilesByHash(db DBQuery, hash string) ([]iface.File, error)
- func GetFilesByToken(db DBQuery, token string) ([]iface.File, error)
- func GetTokenById(db DBQuery, id string) (*iface.Token, error)
- func InsertFile(db DBQuery, token, name, hash, mime string, size int64, expire time.Duration) (*iface.File, error)
- func InsertToken(db DBQuery, isAdmin bool) (*iface.Token, error)
- func RemoveFile(db DBQuery, id string) (*iface.File, error)
- func RemoveToken(db DBQuery, id string) (*iface.Token, error)
- type DBHandler
- type DBQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFilesByHash ¶
files are stored many to one. 1 file on disk can represent many files in the db
func InsertFile ¶
Types ¶
type DBHandler ¶
type DBHandler struct {
// contains filtered or unexported fields
}
func OpenLiteDB ¶
Click to show internal directories.
Click to hide internal directories.