Documentation ¶
Index ¶
- func AutoMigrate(dst ...interface{}) error
- func BatchCreateSearchNodes(nodes *[]model.SearchNode) error
- func ClearSearchNodes() error
- func Close()
- func CreateMeta(u *model.Meta) error
- func CreateSearchNode(node *model.SearchNode) error
- func CreateStorage(storage *model.Storage) error
- func CreateTaskData(t *model.TaskItem) error
- func CreateUser(u *model.User) error
- func DeleteMetaById(id uint) error
- func DeleteSearchNodesByParent(path string) error
- func DeleteSettingItemByKey(key string) error
- func DeleteStorageById(id uint) error
- func DeleteUserById(id uint) error
- func GetDb() *gorm.DB
- func GetEnabledStorages() ([]model.Storage, error)
- func GetMetaById(id uint) (*model.Meta, error)
- func GetMetaByPath(path string) (*model.Meta, error)
- func GetMetas(pageIndex, pageSize int) (metas []model.Meta, count int64, err error)
- func GetPublicSettingItems() ([]model.SettingItem, error)
- func GetSearchNodesByParent(parent string) ([]model.SearchNode, error)
- func GetSettingItemByKey(key string) (*model.SettingItem, error)
- func GetSettingItems() ([]model.SettingItem, error)
- func GetSettingItemsByGroup(group int) ([]model.SettingItem, error)
- func GetSettingItemsInGroups(groups []int) ([]model.SettingItem, error)
- func GetStorageById(id uint) (*model.Storage, error)
- func GetStorageByMountPath(mountPath string) (*model.Storage, error)
- func GetStorages(pageIndex, pageSize int) ([]model.Storage, int64, error)
- func GetTaskDataByType(type_s string) (*model.TaskItem, error)
- func GetTaskDataFunc(type_s string, enabled bool) func() ([]byte, error)
- func GetUserById(id uint) (*model.User, error)
- func GetUserByName(username string) (*model.User, error)
- func GetUserByRole(role int) (*model.User, error)
- func GetUserBySSOID(ssoID string) (*model.User, error)
- func GetUsers(pageIndex, pageSize int) (users []model.User, count int64, err error)
- func Init(d *gorm.DB)
- func RegisterAuthn(u *model.User, credential *webauthn.Credential) error
- func RemoveAuthn(u *model.User, id string) error
- func SaveSettingItem(item *model.SettingItem) error
- func SaveSettingItems(items []model.SettingItem) (err error)
- func SearchNode(req model.SearchReq, useFullText bool) ([]model.SearchNode, int64, error)
- func UpdateAuthn(userID uint, authn string) error
- func UpdateMeta(u *model.Meta) error
- func UpdateStorage(storage *model.Storage) error
- func UpdateTaskData(t *model.TaskItem) error
- func UpdateTaskDataFunc(type_s string, enabled bool) func([]byte) error
- func UpdateUser(u *model.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoMigrate ¶ added in v3.6.0
func AutoMigrate(dst ...interface{}) error
func BatchCreateSearchNodes ¶ added in v3.6.0
func BatchCreateSearchNodes(nodes *[]model.SearchNode) error
func ClearSearchNodes ¶ added in v3.6.0
func ClearSearchNodes() error
func CreateMeta ¶
func CreateSearchNode ¶ added in v3.6.0
func CreateSearchNode(node *model.SearchNode) error
func CreateStorage ¶
CreateStorage just insert storage to database
func CreateTaskData ¶ added in v3.37.0
func CreateUser ¶
func DeleteMetaById ¶
func DeleteSearchNodesByParent ¶ added in v3.6.0
func DeleteSettingItemByKey ¶
func DeleteStorageById ¶
DeleteStorageById just delete storage from database by id
func DeleteUserById ¶
func GetEnabledStorages ¶
func GetPublicSettingItems ¶
func GetPublicSettingItems() ([]model.SettingItem, error)
func GetSearchNodesByParent ¶ added in v3.6.0
func GetSearchNodesByParent(parent string) ([]model.SearchNode, error)
func GetSettingItemByKey ¶
func GetSettingItemByKey(key string) (*model.SettingItem, error)
func GetSettingItems ¶
func GetSettingItems() ([]model.SettingItem, error)
func GetSettingItemsByGroup ¶
func GetSettingItemsByGroup(group int) ([]model.SettingItem, error)
func GetSettingItemsInGroups ¶
func GetSettingItemsInGroups(groups []int) ([]model.SettingItem, error)
func GetStorageById ¶
GetStorageById Get Storage by id, used to update storage usually
func GetStorageByMountPath ¶ added in v3.13.2
GetStorageByMountPath Get Storage by mountPath, used to update storage usually
func GetStorages ¶
GetStorages Get all storages from database order by index
func GetTaskDataByType ¶ added in v3.37.0
func GetTaskDataFunc ¶ added in v3.37.0
func RegisterAuthn ¶ added in v3.26.0
func RegisterAuthn(u *model.User, credential *webauthn.Credential) error
func SaveSettingItem ¶
func SaveSettingItem(item *model.SettingItem) error
func SaveSettingItems ¶
func SaveSettingItems(items []model.SettingItem) (err error)
func SearchNode ¶ added in v3.6.0
func UpdateAuthn ¶ added in v3.26.0
func UpdateMeta ¶
func UpdateStorage ¶
UpdateStorage just update storage in database
func UpdateTaskData ¶ added in v3.37.0
func UpdateTaskDataFunc ¶ added in v3.37.0
func UpdateUser ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.