Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFilePasswordRequired = fmt.Errorf("file access requires password") ErrFilePasswordInvalid = fmt.Errorf("invalid file password") ErrFileExpired = fmt.Errorf("file has expired") ErrDownloadLimitReached = fmt.Errorf("file download limit reached") ErrExpirationInPast = fmt.Errorf("expiration cannot be set in the past") )
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { FileHeader Data io.ReadCloser }
func UploadFile ¶
func UploadFile(args UploadFileArgs) (file File, err error)
type FileHeader ¶
type FileHeader struct { ID FileID Name string Location string Owner UserID Created time.Time Expires time.Time Downloads int64 DownloadLimit int64 Size int64 PasswordHash string }
func (*FileHeader) Download ¶
func (f *FileHeader) Download(user UserID, password string, matchFunc PasswordMatchFunc, nowFunc NowFunc) (err error)
type PasswordHashFunc ¶
type PasswordMatchFunc ¶
type UploadFileArgs ¶
Click to show internal directories.
Click to hide internal directories.