Documentation
¶
Index ¶
- func Admin(u *User) 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) CheckUser(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() ([]User, error)
- func (s *Storage) GetFile(userID int, filename string) (*File, error)
- func (s *Storage) GetImageFiles(userID int) ([]File, error)
- func (s *Storage) GetUser(username string) (User, error)
- func (s *Storage) Query(command string) (*sql.Rows, error)
- func (s *Storage) RenameFile(f *File) error
- func (s *Storage) SaveNewUser(u *User) error
- func (s *Storage) UpdateFile(f *File, newData []byte) error
- func (s *Storage) UpdateFileMetadata(userID int, req struct{ ... }) error
- func (s *Storage) UpdateUserInfo(username string, updates map[string]interface{}) error
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct { ID int `db:"id" json:"id"` UserID int `db:"user_id" json:"user_id"` Metadata FileMetadata Status string `db:"status" json:"status"` Data []byte `db:"data" json:"data"` CreatedAt time.Time `db:"created_at" json:"created_at"` ModifiedAt time.Time `db:"last_modified_at" json:"modified_at"` }
type FileMetadata ¶
type Storage ¶
func (*Storage) CloseDatabase ¶
func (*Storage) DeleteAllFiles ¶
func (*Storage) DeleteFile ¶
func (*Storage) DeleteUser ¶
func (*Storage) GetAllUsers ¶
func (*Storage) RenameFile ¶
func (*Storage) SaveNewUser ¶
func (*Storage) UpdateFileMetadata ¶
Click to show internal directories.
Click to hide internal directories.