Documentation ¶
Index ¶
- func Admin(p *UserData) boolean.Wrapper
- type File
- type FileMetadata
- type Storage
- func (s *Storage) AddFile(f *File) error
- func (s *Storage) AddFileTx(tx *sqlx.Tx, f *File) error
- func (s *Storage) CheckExistence(username string) (bool, error)
- func (s *Storage) CloseDatabase() error
- func (s *Storage) DeleteAllFiles(userID int) error
- func (s *Storage) DeleteFile(f *File) error
- func (s *Storage) DeleteUser(username string) error
- func (s *Storage) GetAllFiles(userID int) ([]File, error)
- func (s *Storage) GetAllUsers() ([]UserData, error)
- func (s *Storage) GetByUsername(username string) (UserData, error)
- func (s *Storage) GetFile(userID int, filename string) (*File, error)
- func (s *Storage) Query(query string) (*sql.Rows, error)
- func (s *Storage) SaveNewUser(u *UserData) error
- func (s *Storage) UpdateFile(f *File) error
- type UserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct { ID int `json:"id" db:"id"` UserID int `json:"user_id" db:"user_id"` Metadata FileMetadata `json:"metadata"` Status string `json:"status" db:"status"` Data []byte `json:"data" db:"data"` }
type FileMetadata ¶
type Storage ¶
func (*Storage) CheckExistence ¶
func (*Storage) CloseDatabase ¶
func (*Storage) DeleteAllFiles ¶
func (*Storage) DeleteFile ¶
func (*Storage) DeleteUser ¶
func (*Storage) GetAllUsers ¶
func (*Storage) SaveNewUser ¶
func (*Storage) UpdateFile ¶
Click to show internal directories.
Click to hide internal directories.