Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddFile(username string, file File) error
- func (d *Dao) CreateNewUser(user User) error
- func (d *Dao) GetFileInfo(username, filename string) (*File, error)
- func (d *Dao) GetUserFiles(username string) (*[]File, error)
- func (d *Dao) GetUserInfo(username string) (*User, error)
- func (d *Dao) GetUserStrategy(username string) (*Strategy, error)
- func (d *Dao) RemoveFile(username, filename string) error
- func (d *Dao) SetUserStrategy(username string, strategy Strategy) error
- type File
- type Strategy
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao encapsulates database operations.
func (*Dao) CreateNewUser ¶
CreateNewUser creates a new user.
func (*Dao) GetFileInfo ¶
GetFileInfo returns the info of given file.
func (*Dao) GetUserFiles ¶
GetUserFiles returns files of given user.
func (*Dao) GetUserInfo ¶
GetUserInfo returns the info of given user.
func (*Dao) GetUserStrategy ¶
GetUserStrategy returns the storage strategy of given user.
func (*Dao) RemoveFile ¶
RemoveFile removes the given file from database.
Click to show internal directories.
Click to hide internal directories.