Documentation ¶
Index ¶
- func Init(driver, dsn string) error
- func Ready() bool
- func Transaction(fc func(tx *gorm.DB) error) error
- type Matter
- func (ms *Matter) Copy(alias, parent string) error
- func (ms *Matter) Create(matter *model.Matter) error
- func (ms *Matter) Exist(uid int64, name, parent string) (*model.Matter, bool)
- func (ms *Matter) Find(alias string) (*model.Matter, error)
- func (ms *Matter) FindAll(query *Query) (list []model.Matter, total int64, err error)
- func (ms *Matter) FindChildren(uid int64, parent string) (children []model.Matter, err error)
- func (ms *Matter) FindUserMatter(uid int64, alias string) (*model.Matter, error)
- func (ms *Matter) Move(alias, parent string) error
- func (ms *Matter) ParentExist(uid int64, parentDir string) bool
- func (ms *Matter) Recovery(m *model.Recycle) error
- func (ms *Matter) Remove(mid int64, trashedBy string) error
- func (ms *Matter) RemoveToRecycle(m *model.Matter) error
- func (ms *Matter) Rename(alias, name string) error
- func (ms *Matter) RenameChildren(m *model.Matter, newName string) error
- func (ms *Matter) UnscopedChildren(uid int64, recycleAlias string) (children []model.Matter, err error)
- func (ms *Matter) Uploaded(matter *model.Matter, incrUsed bool) error
- type Option
- type Query
- func (q *Query) SQL() string
- func (q *Query) WithEq(k, v interface{})
- func (q *Query) WithGt(k, v interface{})
- func (q *Query) WithGte(k, v interface{})
- func (q *Query) WithIn(k, v interface{})
- func (q *Query) WithLike(k, v interface{})
- func (q *Query) WithLt(k, v interface{})
- func (q *Query) WithLte(k, v interface{})
- func (q *Query) WithNe(k, v interface{})
- func (q *Query) WithNin(k, v interface{})
- func (q *Query) WithPage(pageNo, pageSize int64)
- type RecycleBin
- type Share
- func (s *Share) Create(share *model.Share) error
- func (s *Share) Delete(id int64) error
- func (s *Share) Find(id int64) (share *model.Share, err error)
- func (s *Share) FindAll(uid int64) (list []*model.Share, total int64, err error)
- func (s *Share) FindByAlias(alias string) (share *model.Share, err error)
- func (s *Share) Update(id int64, share *model.Share) error
- type Storage
- func (s *Storage) Create(storage *model.Storage) error
- func (s *Storage) Delete(id string) error
- func (s *Storage) Find(id interface{}) (*model.Storage, error)
- func (s *Storage) FindAll(offset, limit int) (storages []model.Storage, total int64, err error)
- func (s *Storage) Update(id string, storage *model.Storage) error
- type User
- func (u *User) Activate(uid int64) error
- func (u *User) Create(user *model.User, storageMax uint64) (*model.User, error)
- func (u *User) Delete(user *model.User) error
- func (u *User) EmailExist(email string) (*model.User, bool)
- func (u *User) Find(uid int64) (*model.User, error)
- func (u *User) FindAll(query *Query) (list []*model.User, total int64, err error)
- func (u *User) FindByUsername(username string) (*model.User, error)
- func (u *User) PasswordReset(uid int64, newPwd string) error
- func (u *User) TicketExist(ticket string) (*model.User, bool)
- func (u *User) Update(user *model.User) error
- func (u *User) UpdateProfile(uid int64, up *model.UserProfile) error
- func (u *User) UpdateStatus(uid int64, status uint8) error
- func (u *User) UpdateStorage(uid int64, quota uint64) error
- func (u *User) UsernameExist(username string) (*model.User, bool)
- type UserKey
- func (u *UserKey) Create(uk *model.UserKey) (*model.UserKey, error)
- func (u *UserKey) Delete(user *model.UserKey) error
- func (u *UserKey) Find(uid int64, name string) (*model.UserKey, error)
- func (u *UserKey) FindAll(query *Query) (list []*model.UserKey, total int64, err error)
- func (u *UserKey) FindByClientID(clientID string) (*model.UserKey, error)
- func (u *UserKey) Update(user *model.UserKey) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Matter ¶
type Matter struct { }
func (*Matter) FindChildren ¶
func (*Matter) FindUserMatter ¶
func (*Matter) RenameChildren ¶
func (*Matter) UnscopedChildren ¶
type Query ¶
type RecycleBin ¶
type RecycleBin struct { }
func NewRecycleBin ¶
func NewRecycleBin() *RecycleBin
func (*RecycleBin) Release ¶
func (rb *RecycleBin) Release(uid, size int64, query interface{}, args ...interface{}) error
type Storage ¶
type Storage struct { }
func NewStorage ¶
func NewStorage() *Storage
type User ¶
type User struct { }
func (*User) PasswordReset ¶
PasswordReset update the new password
func (*User) UpdateProfile ¶
func (u *User) UpdateProfile(uid int64, up *model.UserProfile) error
func (*User) UpdateStatus ¶ added in v1.6.0
Click to show internal directories.
Click to hide internal directories.