Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FilesBucket is the name of the bucket containing file information FilesBucket = []byte("files") )
Functions ¶
This section is empty.
Types ¶
type DBFile ¶
type DBFile struct { // Name is the filename Name string // Size is the file size in bytes Size int64 // ModTime is the file time of last modification ModTime time.Time // email is the email of the person who uploaded the file Email string // Token is used to verify user uploads Token string // Authorized is set to true after the user verified the upload Authorized bool }
A DBFile is the structure used to serialize file information to boltdb
func FromFileInfo ¶
FromFileInfo returns an instance of DBFile constructed from a os.FileInfo Email, Token and Authorized are left at their default value
type Dir ¶
type Dir string
A Dir implements FileSystem using the native file system restricted to a specific directory tree.
While the OpenFile method takes '/'-separated paths, a Dir's string value is a filename on the native file system, not a URL, so it is separated by filepath.Separator, which isn't necessarily '/'.
An empty Dir is treated as ".".
Click to show internal directories.
Click to hide internal directories.