Documentation ¶
Index ¶
- func GenerateContentId(f *fileTree.WeblensFileImpl) (models.ContentId, error)
- func MakeUniqueChildName(parent *fileTree.WeblensFileImpl, childName string) string
- func NewShareService(collection *mongo.Collection) (models.ShareService, error)
- type AccessServiceImpl
- func (accSrv *AccessServiceImpl) CanUserAccessAlbum(user *models.User, album *models.Album, share *models.AlbumShare) bool
- func (accSrv *AccessServiceImpl) CanUserAccessFile(user *models.User, file *fileTree.WeblensFileImpl, share *models.FileShare) bool
- func (accSrv *AccessServiceImpl) CanUserModifyShare(user *models.User, share models.Share) bool
- func (accSrv *AccessServiceImpl) DeleteApiKey(key models.WeblensApiKey) error
- func (accSrv *AccessServiceImpl) GenerateApiKey(creator *models.User) (models.ApiKeyInfo, error)
- func (accSrv *AccessServiceImpl) GenerateJwtToken(user *models.User) (string, error)
- func (accSrv *AccessServiceImpl) GetAllKeys(accessor *models.User) ([]models.ApiKeyInfo, error)
- func (accSrv *AccessServiceImpl) GetApiKey(key models.WeblensApiKey) (models.ApiKeyInfo, error)
- func (accSrv *AccessServiceImpl) GetUserFromToken(token string) (*models.User, error)
- func (accSrv *AccessServiceImpl) SetKeyUsedBy(key models.WeblensApiKey, server *models.Instance) error
- func (accSrv *AccessServiceImpl) Size() int
- type AlbumServiceImpl
- func (as *AlbumServiceImpl) Add(a *models.Album) error
- func (as *AlbumServiceImpl) AddMediaToAlbum(album *models.Album, media ...*models.Media) error
- func (as *AlbumServiceImpl) Del(aId models.AlbumId) error
- func (as *AlbumServiceImpl) Get(aId models.AlbumId) *models.Album
- func (as *AlbumServiceImpl) GetAlbumMedias(album *models.Album) iter.Seq[*models.Media]
- func (as *AlbumServiceImpl) GetAllByUser(u *models.User) ([]*models.Album, error)
- func (as *AlbumServiceImpl) Init() error
- func (as *AlbumServiceImpl) RemoveMediaFromAlbum(album *models.Album, mediaIds ...models.ContentId) error
- func (as *AlbumServiceImpl) RemoveMediaFromAny(mediaId models.ContentId) error
- func (as *AlbumServiceImpl) RenameAlbum(album *models.Album, newName string) error
- func (as *AlbumServiceImpl) SetAlbumCover(albumId models.AlbumId, cover *models.Media) error
- func (as *AlbumServiceImpl) Size() int
- type ClientManager
- func (cm *ClientManager) ClientConnect(conn *websocket.Conn, user *models.User) *models.WsClient
- func (cm *ClientManager) ClientDisconnect(c *models.WsClient)
- func (cm *ClientManager) FolderSubToPool(folderId fileTree.FileId, poolId task.Id)
- func (cm *ClientManager) GetAllClients() []*models.WsClient
- func (cm *ClientManager) GetClientByInstanceId(instanceId models.InstanceId) *models.WsClient
- func (cm *ClientManager) GetClientByUsername(username models.Username) *models.WsClient
- func (cm *ClientManager) GetConnectedAdmins() []*models.WsClient
- func (cm *ClientManager) GetSubscribers(st models.WsAction, key models.SubId) (clients []*models.WsClient)
- func (cm *ClientManager) RemoteConnect(conn *websocket.Conn, remote *models.Instance) *models.WsClient
- func (cm *ClientManager) Send(msg models.WsResponseInfo)
- func (cm *ClientManager) SetFileService(fileService *FileServiceImpl)
- func (cm *ClientManager) Subscribe(c *models.WsClient, key models.SubId, action models.WsAction, ...) (complete bool, results map[string]any, err error)
- func (cm *ClientManager) TaskSubToPool(taskId task.Id, poolId task.Id)
- func (cm *ClientManager) Unsubscribe(c *models.WsClient, key models.SubId, unSubTime time.Time) error
- type FileServiceImpl
- func (fs *FileServiceImpl) AddTask(f *fileTree.WeblensFileImpl, t *task.Task) error
- func (fs *FileServiceImpl) CreateFile(parent *fileTree.WeblensFileImpl, fileName string) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) CreateFolder(parent *fileTree.WeblensFileImpl, folderName string, caster models.FileCaster) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) DeleteCacheFile(f fileTree.WeblensFile) error
- func (fs *FileServiceImpl) GetFile(id fileTree.FileId) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) GetFileOwner(file *fileTree.WeblensFileImpl) *models.User
- func (fs *FileServiceImpl) GetFileSafe(id fileTree.FileId, user *models.User, share *models.FileShare) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) GetFiles(ids []fileTree.FileId) ([]*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) GetMediaCacheByFilename(thumbFileName string) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) GetMediaJournal() fileTree.Journal
- func (fs *FileServiceImpl) GetMediaRoot() *fileTree.WeblensFileImpl
- func (fs *FileServiceImpl) GetTasks(f *fileTree.WeblensFileImpl) []*task.Task
- func (fs *FileServiceImpl) GetZip(id fileTree.FileId) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) ImportFile(f *fileTree.WeblensFileImpl) error
- func (fs *FileServiceImpl) IsFileInTrash(f *fileTree.WeblensFileImpl) bool
- func (fs *FileServiceImpl) MoveFiles(files []*fileTree.WeblensFileImpl, destFolder *fileTree.WeblensFileImpl, ...) error
- func (fs *FileServiceImpl) MoveFilesToTrash(files []*fileTree.WeblensFileImpl, user *models.User, share *models.FileShare, ...) error
- func (fs *FileServiceImpl) NewCacheFile(media *models.Media, quality models.MediaQuality, pageNum int) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) NewZip(zipName string, owner *models.User) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) PathToFile(searchPath string) (*fileTree.WeblensFileImpl, error)
- func (fs *FileServiceImpl) PermanentlyDeleteFiles(files []*fileTree.WeblensFileImpl, caster models.FileCaster) error
- func (fs *FileServiceImpl) ReadFile(f *fileTree.WeblensFileImpl) (io.ReadCloser, error)
- func (fs *FileServiceImpl) RemoveTask(f *fileTree.WeblensFileImpl, t *task.Task) error
- func (fs *FileServiceImpl) RenameFile(file *fileTree.WeblensFileImpl, newName string, caster models.FileCaster) error
- func (fs *FileServiceImpl) ResizeDown(f *fileTree.WeblensFileImpl, caster models.FileCaster) error
- func (fs *FileServiceImpl) ResizeUp(f *fileTree.WeblensFileImpl, caster models.FileCaster) error
- func (fs *FileServiceImpl) ReturnFilesFromTrash(trashFiles []*fileTree.WeblensFileImpl, c models.FileCaster) error
- func (fs *FileServiceImpl) SetMediaService(mediaService *MediaServiceImpl)
- func (fs *FileServiceImpl) Size() int
- type InstanceServiceImpl
- func (is *InstanceServiceImpl) Add(i *models.Instance) error
- func (is *InstanceServiceImpl) Del(iId models.InstanceId) error
- func (is *InstanceServiceImpl) Get(iId models.InstanceId) *models.Instance
- func (is *InstanceServiceImpl) GetCore() *models.Instance
- func (is *InstanceServiceImpl) GetLocal() *models.Instance
- func (is *InstanceServiceImpl) GetRemotes() []*models.Instance
- func (is *InstanceServiceImpl) InitBackup(name, coreAddr string, key models.WeblensApiKey) error
- func (is *InstanceServiceImpl) InitCore(serverName string) error
- func (is *InstanceServiceImpl) Size() int
- type MediaServiceImpl
- func (ms *MediaServiceImpl) Add(m *models.Media) error
- func (ms *MediaServiceImpl) AdjustMediaDates(anchor *models.Media, newTime time.Time, extraMedias []*models.Media) error
- func (ms *MediaServiceImpl) Del(cId models.ContentId) error
- func (ms *MediaServiceImpl) FetchCacheImg(m *models.Media, q models.MediaQuality, pageNum int) ([]byte, error)
- func (ms *MediaServiceImpl) Get(mId models.ContentId) *models.Media
- func (ms *MediaServiceImpl) GetAll() []*models.Media
- func (ms *MediaServiceImpl) GetFilteredMedia(requester *models.User, sort string, sortDirection int, ...) ([]*models.Media, error)
- func (ms *MediaServiceImpl) GetMediaType(m *models.Media) models.MediaType
- func (ms *MediaServiceImpl) GetMediaTypes() models.MediaTypeService
- func (ms *MediaServiceImpl) GetProminentColors(media *models.Media) (prom []string, err error)
- func (ms *MediaServiceImpl) HideMedia(m *models.Media, hidden bool) error
- func (ms *MediaServiceImpl) IsCached(m *models.Media) bool
- func (ms *MediaServiceImpl) IsFileDisplayable(f *fileTree.WeblensFileImpl) bool
- func (ms *MediaServiceImpl) LoadMediaFromFile(m *models.Media, file *fileTree.WeblensFileImpl) error
- func (ms *MediaServiceImpl) NukeCache() error
- func (ms *MediaServiceImpl) RecursiveGetMedia(folders ...*fileTree.WeblensFileImpl) []models.ContentId
- func (ms *MediaServiceImpl) RemoveFileFromMedia(media *models.Media, fileId fileTree.FileId) error
- func (ms *MediaServiceImpl) SetMediaLiked(mediaId models.ContentId, liked bool, username models.Username) error
- func (ms *MediaServiceImpl) Size() int
- func (ms *MediaServiceImpl) StreamCacheVideo(m *models.Media, startByte, endByte int) ([]byte, error)
- func (ms *MediaServiceImpl) StreamVideo(m *models.Media, u *models.User, share *models.FileShare) (*models.VideoStreamer, error)
- func (ms *MediaServiceImpl) TypeService() models.MediaTypeService
- type ShareServiceImpl
- func (ss *ShareServiceImpl) Add(sh models.Share) error
- func (ss *ShareServiceImpl) AddUsers(share models.Share, newUsers []*models.User) error
- func (ss *ShareServiceImpl) Del(sId models.ShareId) error
- func (ss *ShareServiceImpl) EnableShare(share models.Share, enable bool) error
- func (ss *ShareServiceImpl) Get(sId models.ShareId) models.Share
- func (ss *ShareServiceImpl) GetAlbumSharesWithUser(u *models.User) ([]*models.AlbumShare, error)
- func (ss *ShareServiceImpl) GetAllShares() []models.Share
- func (ss *ShareServiceImpl) GetFileShare(f *fileTree.WeblensFileImpl) (*models.FileShare, error)
- func (ss *ShareServiceImpl) GetFileSharesWithUser(u *models.User) ([]*models.FileShare, error)
- func (ss *ShareServiceImpl) RemoveUsers(share models.Share, removeUsers []*models.User) error
- func (ss *ShareServiceImpl) SetSharePublic(share models.Share, public bool) error
- func (ss *ShareServiceImpl) Size() int
- type TrashEntry
- type UserServiceImpl
- func (us *UserServiceImpl) ActivateUser(u *models.User) error
- func (us *UserServiceImpl) Add(user *models.User) error
- func (us *UserServiceImpl) Del(un models.Username) error
- func (us *UserServiceImpl) Get(username models.Username) *models.User
- func (us *UserServiceImpl) GetAll() (iter.Seq[*models.User], error)
- func (us *UserServiceImpl) GetPublicUser() *models.User
- func (us *UserServiceImpl) GetRootUser() *models.User
- func (us *UserServiceImpl) SearchByUsername(searchString string) (iter.Seq[*models.User], error)
- func (us *UserServiceImpl) SetUserAdmin(u *models.User, admin bool) error
- func (us *UserServiceImpl) Size() int
- func (us *UserServiceImpl) UpdateUserPassword(username models.Username, oldPassword, newPassword string, allowEmptyOld bool) error
- type WebdavFs
- func (w WebdavFs) Mkdir(ctx context.Context, name string, perm os.FileMode) error
- func (w WebdavFs) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)
- func (w WebdavFs) RemoveAll(ctx context.Context, name string) error
- func (w WebdavFs) Rename(ctx context.Context, oldName, newName string) error
- func (w WebdavFs) Stat(ctx context.Context, name string) (os.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateContentId ¶
func GenerateContentId(f *fileTree.WeblensFileImpl) (models.ContentId, error)
func MakeUniqueChildName ¶
func MakeUniqueChildName(parent *fileTree.WeblensFileImpl, childName string) string
func NewShareService ¶
func NewShareService(collection *mongo.Collection) (models.ShareService, error)
Types ¶
type AccessServiceImpl ¶
type AccessServiceImpl struct {
// contains filtered or unexported fields
}
func NewAccessService ¶
func NewAccessService(userService models.UserService, col *mongo.Collection) (*AccessServiceImpl, error)
func (*AccessServiceImpl) CanUserAccessAlbum ¶
func (accSrv *AccessServiceImpl) CanUserAccessAlbum( user *models.User, album *models.Album, share *models.AlbumShare, ) bool
func (*AccessServiceImpl) CanUserAccessFile ¶
func (accSrv *AccessServiceImpl) CanUserAccessFile( user *models.User, file *fileTree.WeblensFileImpl, share *models.FileShare, ) bool
func (*AccessServiceImpl) CanUserModifyShare ¶
func (*AccessServiceImpl) DeleteApiKey ¶
func (accSrv *AccessServiceImpl) DeleteApiKey(key models.WeblensApiKey) error
func (*AccessServiceImpl) GenerateApiKey ¶
func (accSrv *AccessServiceImpl) GenerateApiKey(creator *models.User) (models.ApiKeyInfo, error)
func (*AccessServiceImpl) GenerateJwtToken ¶
func (accSrv *AccessServiceImpl) GenerateJwtToken(user *models.User) (string, error)
func (*AccessServiceImpl) GetAllKeys ¶
func (accSrv *AccessServiceImpl) GetAllKeys(accessor *models.User) ([]models.ApiKeyInfo, error)
func (*AccessServiceImpl) GetApiKey ¶
func (accSrv *AccessServiceImpl) GetApiKey(key models.WeblensApiKey) (models.ApiKeyInfo, error)
func (*AccessServiceImpl) GetUserFromToken ¶
func (accSrv *AccessServiceImpl) GetUserFromToken(token string) (*models.User, error)
func (*AccessServiceImpl) SetKeyUsedBy ¶
func (accSrv *AccessServiceImpl) SetKeyUsedBy(key models.WeblensApiKey, server *models.Instance) error
func (*AccessServiceImpl) Size ¶
func (accSrv *AccessServiceImpl) Size() int
type AlbumServiceImpl ¶
type AlbumServiceImpl struct {
// contains filtered or unexported fields
}
func NewAlbumService ¶
func NewAlbumService( col *mongo.Collection, mediaService models.MediaService, shareService models.ShareService, ) *AlbumServiceImpl
func (*AlbumServiceImpl) AddMediaToAlbum ¶
func (*AlbumServiceImpl) GetAlbumMedias ¶
func (*AlbumServiceImpl) GetAllByUser ¶
func (*AlbumServiceImpl) Init ¶
func (as *AlbumServiceImpl) Init() error
func (*AlbumServiceImpl) RemoveMediaFromAlbum ¶
func (*AlbumServiceImpl) RemoveMediaFromAny ¶
func (as *AlbumServiceImpl) RemoveMediaFromAny(mediaId models.ContentId) error
func (*AlbumServiceImpl) RenameAlbum ¶
func (as *AlbumServiceImpl) RenameAlbum(album *models.Album, newName string) error
func (*AlbumServiceImpl) SetAlbumCover ¶
func (*AlbumServiceImpl) Size ¶
func (as *AlbumServiceImpl) Size() int
type ClientManager ¶
type ClientManager struct {
// contains filtered or unexported fields
}
func NewClientManager ¶
func NewClientManager( fileService *FileServiceImpl, taskService task.TaskService, instanceService models.InstanceService, ) *ClientManager
func (*ClientManager) ClientConnect ¶
func (*ClientManager) ClientDisconnect ¶
func (cm *ClientManager) ClientDisconnect(c *models.WsClient)
func (*ClientManager) FolderSubToPool ¶
func (cm *ClientManager) FolderSubToPool(folderId fileTree.FileId, poolId task.Id)
func (*ClientManager) GetAllClients ¶
func (cm *ClientManager) GetAllClients() []*models.WsClient
func (*ClientManager) GetClientByInstanceId ¶
func (cm *ClientManager) GetClientByInstanceId(instanceId models.InstanceId) *models.WsClient
func (*ClientManager) GetClientByUsername ¶
func (cm *ClientManager) GetClientByUsername(username models.Username) *models.WsClient
func (*ClientManager) GetConnectedAdmins ¶
func (cm *ClientManager) GetConnectedAdmins() []*models.WsClient
func (*ClientManager) GetSubscribers ¶
func (*ClientManager) RemoteConnect ¶
func (*ClientManager) Send ¶
func (cm *ClientManager) Send(msg models.WsResponseInfo)
func (*ClientManager) SetFileService ¶
func (cm *ClientManager) SetFileService(fileService *FileServiceImpl)
func (*ClientManager) Subscribe ¶
func (cm *ClientManager) Subscribe( c *models.WsClient, key models.SubId, action models.WsAction, subTime time.Time, share models.Share, ) (complete bool, results map[string]any, err error)
Subscribe links a websocket connection to a "key" that can be broadcast to later if relevant updates need to be communicated
Returns "true" and the results at meta.LookingFor if the task is completed, false and nil otherwise. Subscriptions to types that represent ongoing events like FolderSubscribe never return a truthy completed
func (*ClientManager) TaskSubToPool ¶
func (cm *ClientManager) TaskSubToPool(taskId task.Id, poolId task.Id)
func (*ClientManager) Unsubscribe ¶
type FileServiceImpl ¶
type FileServiceImpl struct {
// contains filtered or unexported fields
}
func NewFileService ¶
func NewFileService( mediaTree, cacheTree fileTree.FileTree, userService models.UserService, accessService models.AccessService, mediaService models.MediaService, trashCol *mongo.Collection, ) (*FileServiceImpl, error)
func (*FileServiceImpl) AddTask ¶
func (fs *FileServiceImpl) AddTask(f *fileTree.WeblensFileImpl, t *task.Task) error
func (*FileServiceImpl) CreateFile ¶
func (fs *FileServiceImpl) CreateFile(parent *fileTree.WeblensFileImpl, fileName string) ( *fileTree.WeblensFileImpl, error, )
func (*FileServiceImpl) CreateFolder ¶
func (fs *FileServiceImpl) CreateFolder(parent *fileTree.WeblensFileImpl, folderName string, caster models.FileCaster) ( *fileTree.WeblensFileImpl, error, )
func (*FileServiceImpl) DeleteCacheFile ¶
func (fs *FileServiceImpl) DeleteCacheFile(f fileTree.WeblensFile) error
func (*FileServiceImpl) GetFile ¶
func (fs *FileServiceImpl) GetFile(id fileTree.FileId) (*fileTree.WeblensFileImpl, error)
func (*FileServiceImpl) GetFileOwner ¶
func (fs *FileServiceImpl) GetFileOwner(file *fileTree.WeblensFileImpl) *models.User
func (*FileServiceImpl) GetFileSafe ¶
func (fs *FileServiceImpl) GetFileSafe(id fileTree.FileId, user *models.User, share *models.FileShare) ( *fileTree.WeblensFileImpl, error, )
func (*FileServiceImpl) GetFiles ¶
func (fs *FileServiceImpl) GetFiles(ids []fileTree.FileId) ([]*fileTree.WeblensFileImpl, error)
func (*FileServiceImpl) GetMediaCacheByFilename ¶
func (fs *FileServiceImpl) GetMediaCacheByFilename(thumbFileName string) (*fileTree.WeblensFileImpl, error)
func (*FileServiceImpl) GetMediaJournal ¶
func (fs *FileServiceImpl) GetMediaJournal() fileTree.Journal
func (*FileServiceImpl) GetMediaRoot ¶
func (fs *FileServiceImpl) GetMediaRoot() *fileTree.WeblensFileImpl
func (*FileServiceImpl) GetTasks ¶
func (fs *FileServiceImpl) GetTasks(f *fileTree.WeblensFileImpl) []*task.Task
func (*FileServiceImpl) GetZip ¶
func (fs *FileServiceImpl) GetZip(id fileTree.FileId) (*fileTree.WeblensFileImpl, error)
func (*FileServiceImpl) ImportFile ¶
func (fs *FileServiceImpl) ImportFile(f *fileTree.WeblensFileImpl) error
func (*FileServiceImpl) IsFileInTrash ¶
func (fs *FileServiceImpl) IsFileInTrash(f *fileTree.WeblensFileImpl) bool
func (*FileServiceImpl) MoveFiles ¶
func (fs *FileServiceImpl) MoveFiles( files []*fileTree.WeblensFileImpl, destFolder *fileTree.WeblensFileImpl, caster models.FileCaster, ) error
func (*FileServiceImpl) MoveFilesToTrash ¶
func (fs *FileServiceImpl) MoveFilesToTrash( files []*fileTree.WeblensFileImpl, user *models.User, share *models.FileShare, caster models.FileCaster, ) error
func (*FileServiceImpl) NewCacheFile ¶
func (fs *FileServiceImpl) NewCacheFile( media *models.Media, quality models.MediaQuality, pageNum int, ) (*fileTree.WeblensFileImpl, error)
func (*FileServiceImpl) NewZip ¶
func (fs *FileServiceImpl) NewZip(zipName string, owner *models.User) (*fileTree.WeblensFileImpl, error)
func (*FileServiceImpl) PathToFile ¶
func (fs *FileServiceImpl) PathToFile(searchPath string) (*fileTree.WeblensFileImpl, error)
func (*FileServiceImpl) PermanentlyDeleteFiles ¶
func (fs *FileServiceImpl) PermanentlyDeleteFiles(files []*fileTree.WeblensFileImpl, caster models.FileCaster) error
PermanentlyDeleteFiles removes files being pointed to from the tree and deletes it from the real filesystem
func (*FileServiceImpl) ReadFile ¶
func (fs *FileServiceImpl) ReadFile(f *fileTree.WeblensFileImpl) (io.ReadCloser, error)
func (*FileServiceImpl) RemoveTask ¶
func (fs *FileServiceImpl) RemoveTask(f *fileTree.WeblensFileImpl, t *task.Task) error
func (*FileServiceImpl) RenameFile ¶
func (fs *FileServiceImpl) RenameFile(file *fileTree.WeblensFileImpl, newName string, caster models.FileCaster) error
func (*FileServiceImpl) ResizeDown ¶
func (fs *FileServiceImpl) ResizeDown(f *fileTree.WeblensFileImpl, caster models.FileCaster) error
func (*FileServiceImpl) ResizeUp ¶
func (fs *FileServiceImpl) ResizeUp(f *fileTree.WeblensFileImpl, caster models.FileCaster) error
func (*FileServiceImpl) ReturnFilesFromTrash ¶
func (fs *FileServiceImpl) ReturnFilesFromTrash( trashFiles []*fileTree.WeblensFileImpl, c models.FileCaster, ) error
func (*FileServiceImpl) SetMediaService ¶
func (fs *FileServiceImpl) SetMediaService(mediaService *MediaServiceImpl)
func (*FileServiceImpl) Size ¶
func (fs *FileServiceImpl) Size() int
type InstanceServiceImpl ¶
type InstanceServiceImpl struct {
// contains filtered or unexported fields
}
func NewInstanceService ¶
func NewInstanceService(col database.MongoCollection) (*InstanceServiceImpl, error)
func (*InstanceServiceImpl) Del ¶
func (is *InstanceServiceImpl) Del(iId models.InstanceId) error
func (*InstanceServiceImpl) Get ¶
func (is *InstanceServiceImpl) Get(iId models.InstanceId) *models.Instance
func (*InstanceServiceImpl) GetCore ¶
func (is *InstanceServiceImpl) GetCore() *models.Instance
func (*InstanceServiceImpl) GetLocal ¶
func (is *InstanceServiceImpl) GetLocal() *models.Instance
func (*InstanceServiceImpl) GetRemotes ¶
func (is *InstanceServiceImpl) GetRemotes() []*models.Instance
func (*InstanceServiceImpl) InitBackup ¶
func (is *InstanceServiceImpl) InitBackup( name, coreAddr string, key models.WeblensApiKey, ) error
func (*InstanceServiceImpl) InitCore ¶
func (is *InstanceServiceImpl) InitCore(serverName string) error
func (*InstanceServiceImpl) Size ¶
func (is *InstanceServiceImpl) Size() int
type MediaServiceImpl ¶
type MediaServiceImpl struct { AlbumService models.AlbumService // contains filtered or unexported fields }
func NewMediaService ¶
func NewMediaService( fileService models.FileService, mediaTypeServ models.MediaTypeService, albumService models.AlbumService, col *mongo.Collection, ) (*MediaServiceImpl, error)
func (*MediaServiceImpl) AdjustMediaDates ¶
func (*MediaServiceImpl) FetchCacheImg ¶
func (ms *MediaServiceImpl) FetchCacheImg(m *models.Media, q models.MediaQuality, pageNum int) ([]byte, error)
func (*MediaServiceImpl) GetAll ¶
func (ms *MediaServiceImpl) GetAll() []*models.Media
func (*MediaServiceImpl) GetFilteredMedia ¶
func (*MediaServiceImpl) GetMediaType ¶
func (ms *MediaServiceImpl) GetMediaType(m *models.Media) models.MediaType
func (*MediaServiceImpl) GetMediaTypes ¶
func (ms *MediaServiceImpl) GetMediaTypes() models.MediaTypeService
func (*MediaServiceImpl) GetProminentColors ¶
func (ms *MediaServiceImpl) GetProminentColors(media *models.Media) (prom []string, err error)
func (*MediaServiceImpl) HideMedia ¶
func (ms *MediaServiceImpl) HideMedia(m *models.Media, hidden bool) error
func (*MediaServiceImpl) IsFileDisplayable ¶
func (ms *MediaServiceImpl) IsFileDisplayable(f *fileTree.WeblensFileImpl) bool
func (*MediaServiceImpl) LoadMediaFromFile ¶
func (ms *MediaServiceImpl) LoadMediaFromFile(m *models.Media, file *fileTree.WeblensFileImpl) error
func (*MediaServiceImpl) NukeCache ¶
func (ms *MediaServiceImpl) NukeCache() error
func (*MediaServiceImpl) RecursiveGetMedia ¶
func (ms *MediaServiceImpl) RecursiveGetMedia(folders ...*fileTree.WeblensFileImpl) []models.ContentId
func (*MediaServiceImpl) RemoveFileFromMedia ¶
func (*MediaServiceImpl) SetMediaLiked ¶
func (*MediaServiceImpl) Size ¶
func (ms *MediaServiceImpl) Size() int
func (*MediaServiceImpl) StreamCacheVideo ¶
func (*MediaServiceImpl) StreamVideo ¶
func (ms *MediaServiceImpl) StreamVideo( m *models.Media, u *models.User, share *models.FileShare, ) (*models.VideoStreamer, error)
func (*MediaServiceImpl) TypeService ¶
func (ms *MediaServiceImpl) TypeService() models.MediaTypeService
type ShareServiceImpl ¶
type ShareServiceImpl struct {
// contains filtered or unexported fields
}
func (*ShareServiceImpl) EnableShare ¶
func (ss *ShareServiceImpl) EnableShare(share models.Share, enable bool) error
func (*ShareServiceImpl) GetAlbumSharesWithUser ¶
func (ss *ShareServiceImpl) GetAlbumSharesWithUser(u *models.User) ([]*models.AlbumShare, error)
func (*ShareServiceImpl) GetAllShares ¶
func (ss *ShareServiceImpl) GetAllShares() []models.Share
func (*ShareServiceImpl) GetFileShare ¶
func (ss *ShareServiceImpl) GetFileShare(f *fileTree.WeblensFileImpl) (*models.FileShare, error)
func (*ShareServiceImpl) GetFileSharesWithUser ¶
func (*ShareServiceImpl) RemoveUsers ¶
func (*ShareServiceImpl) SetSharePublic ¶
func (ss *ShareServiceImpl) SetSharePublic(share models.Share, public bool) error
func (*ShareServiceImpl) Size ¶
func (ss *ShareServiceImpl) Size() int
type TrashEntry ¶
type UserServiceImpl ¶
type UserServiceImpl struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(col database.MongoCollection) (*UserServiceImpl, error)
func (*UserServiceImpl) ActivateUser ¶
func (us *UserServiceImpl) ActivateUser(u *models.User) error
func (*UserServiceImpl) GetPublicUser ¶
func (us *UserServiceImpl) GetPublicUser() *models.User
func (*UserServiceImpl) GetRootUser ¶
func (us *UserServiceImpl) GetRootUser() *models.User
func (*UserServiceImpl) SearchByUsername ¶
func (*UserServiceImpl) SetUserAdmin ¶
func (us *UserServiceImpl) SetUserAdmin(u *models.User, admin bool) error
func (*UserServiceImpl) Size ¶
func (us *UserServiceImpl) Size() int
func (*UserServiceImpl) UpdateUserPassword ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.