Documentation ¶
Index ¶
- Variables
- type AuthService
- func (as *AuthService) GetSession(c *gin.Context) *schemas.Session
- func (as *AuthService) HandleMultipleLogin(c *gin.Context)
- func (as *AuthService) LogIn(c *gin.Context, session *schemas.TgSession) (*schemas.Message, *types.AppError)
- func (as *AuthService) Logout(c *gin.Context) (*schemas.Message, *types.AppError)
- type FileService
- func (fs *FileService) CopyFile(c *gin.Context) (*schemas.FileOut, *types.AppError)
- func (fs *FileService) CreateFile(c *gin.Context, userId int64, fileIn *schemas.FileIn) (*schemas.FileOut, *types.AppError)
- func (fs *FileService) CreateShare(fileId string, userId int64, payload *schemas.FileShareIn) *types.AppError
- func (fs *FileService) DeleteFiles(userId int64, payload *schemas.DeleteOperation) (*schemas.Message, *types.AppError)
- func (fs *FileService) DeleteShare(fileId string, userId int64) *types.AppError
- func (fs *FileService) GetCategoryStats(userId int64) ([]schemas.FileCategoryStats, *types.AppError)
- func (fs *FileService) GetFileByID(id string) (*schemas.FileOutFull, *types.AppError)
- func (fs *FileService) GetFileStream(c *gin.Context, download bool, sharedFile *schemas.FileShareOut)
- func (fs *FileService) GetShareByFileId(fileId string, userId int64) (*schemas.FileShareOut, *types.AppError)
- func (fs *FileService) ListFiles(userId int64, fquery *schemas.FileQuery) (*schemas.FileResponse, *types.AppError)
- func (fs *FileService) MakeDirectory(userId int64, payload *schemas.MkDir) (*schemas.FileOut, *types.AppError)
- func (fs *FileService) MoveDirectory(userId int64, payload *schemas.DirMove) (*schemas.Message, *types.AppError)
- func (fs *FileService) MoveFiles(userId int64, payload *schemas.FileOperation) (*schemas.Message, *types.AppError)
- func (fs *FileService) UpdateFile(id string, userId int64, update *schemas.FileUpdate) (*schemas.FileOut, *types.AppError)
- func (fs *FileService) UpdateParts(c *gin.Context, id string, userId int64, payload *schemas.PartUpdate) (*schemas.Message, *types.AppError)
- func (fs *FileService) UpdateShare(fileId string, userId int64, payload *schemas.FileShareIn) *types.AppError
- type ShareService
- func (ss *ShareService) GetShareById(shareId string) (*schemas.FileShareOut, *types.AppError)
- func (ss *ShareService) ListShareFiles(shareId string, query *schemas.ShareFileQuery, auth string) (*schemas.FileResponse, *types.AppError)
- func (ss *ShareService) ShareUnlock(shareId string, payload *schemas.ShareAccess) *types.AppError
- func (ss *ShareService) StreamSharedFile(c *gin.Context, download bool)
- type UploadService
- func (us *UploadService) DeleteUploadFile(c *gin.Context) (*schemas.Message, *types.AppError)
- func (us *UploadService) GetUploadFileById(c *gin.Context) (*schemas.UploadOut, *types.AppError)
- func (us *UploadService) GetUploadStats(userId int64, days int) ([]schemas.UploadStats, *types.AppError)
- func (us *UploadService) UploadFile(c *gin.Context) (*schemas.UploadPartOut, *types.AppError)
- type UserService
- func (us *UserService) AddBots(c *gin.Context) (*schemas.Message, *types.AppError)
- func (us *UserService) GetProfilePhoto(c *gin.Context)
- func (us *UserService) GetStats(c *gin.Context) (*schemas.AccountStats, *types.AppError)
- func (us *UserService) ListChannels(c *gin.Context) ([]schemas.Channel, *types.AppError)
- func (us *UserService) ListSessions(c *gin.Context) ([]schemas.SessionOut, *types.AppError)
- func (us *UserService) RemoveBots(c *gin.Context) (*schemas.Message, *types.AppError)
- func (us *UserService) RemoveSession(c *gin.Context) (*schemas.Message, *types.AppError)
- func (us *UserService) UpdateChannel(c *gin.Context) (*schemas.Message, *types.AppError)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPassword = errors.New("invalid password") )
View Source
var (
ErrorStreamAbandoned = errors.New("stream abandoned")
)
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func (*AuthService) GetSession ¶
func (as *AuthService) GetSession(c *gin.Context) *schemas.Session
func (*AuthService) HandleMultipleLogin ¶
func (as *AuthService) HandleMultipleLogin(c *gin.Context)
type FileService ¶
type FileService struct {
// contains filtered or unexported fields
}
func NewFileService ¶
func NewFileService( db *gorm.DB, cnf *config.Config, worker *tgc.StreamWorker, botWorker *tgc.BotWorker, kv kv.KV, cache cache.Cacher, logger *zap.SugaredLogger) *FileService
func (*FileService) CreateFile ¶
func (*FileService) CreateShare ¶
func (fs *FileService) CreateShare(fileId string, userId int64, payload *schemas.FileShareIn) *types.AppError
func (*FileService) DeleteFiles ¶
func (fs *FileService) DeleteFiles(userId int64, payload *schemas.DeleteOperation) (*schemas.Message, *types.AppError)
func (*FileService) DeleteShare ¶
func (fs *FileService) DeleteShare(fileId string, userId int64) *types.AppError
func (*FileService) GetCategoryStats ¶
func (fs *FileService) GetCategoryStats(userId int64) ([]schemas.FileCategoryStats, *types.AppError)
func (*FileService) GetFileByID ¶
func (fs *FileService) GetFileByID(id string) (*schemas.FileOutFull, *types.AppError)
func (*FileService) GetFileStream ¶
func (fs *FileService) GetFileStream(c *gin.Context, download bool, sharedFile *schemas.FileShareOut)
func (*FileService) GetShareByFileId ¶
func (fs *FileService) GetShareByFileId(fileId string, userId int64) (*schemas.FileShareOut, *types.AppError)
func (*FileService) ListFiles ¶
func (fs *FileService) ListFiles(userId int64, fquery *schemas.FileQuery) (*schemas.FileResponse, *types.AppError)
func (*FileService) MakeDirectory ¶
func (*FileService) MoveDirectory ¶
func (*FileService) MoveFiles ¶
func (fs *FileService) MoveFiles(userId int64, payload *schemas.FileOperation) (*schemas.Message, *types.AppError)
func (*FileService) UpdateFile ¶
func (fs *FileService) UpdateFile(id string, userId int64, update *schemas.FileUpdate) (*schemas.FileOut, *types.AppError)
func (*FileService) UpdateParts ¶
func (*FileService) UpdateShare ¶
func (fs *FileService) UpdateShare(fileId string, userId int64, payload *schemas.FileShareIn) *types.AppError
type ShareService ¶
type ShareService struct {
// contains filtered or unexported fields
}
func NewShareService ¶
func NewShareService(db *gorm.DB, fs *FileService, cache cache.Cacher) *ShareService
func (*ShareService) GetShareById ¶
func (ss *ShareService) GetShareById(shareId string) (*schemas.FileShareOut, *types.AppError)
func (*ShareService) ListShareFiles ¶
func (ss *ShareService) ListShareFiles(shareId string, query *schemas.ShareFileQuery, auth string) (*schemas.FileResponse, *types.AppError)
func (*ShareService) ShareUnlock ¶
func (ss *ShareService) ShareUnlock(shareId string, payload *schemas.ShareAccess) *types.AppError
func (*ShareService) StreamSharedFile ¶
func (ss *ShareService) StreamSharedFile(c *gin.Context, download bool)
type UploadService ¶
type UploadService struct {
// contains filtered or unexported fields
}
func NewUploadService ¶
func (*UploadService) DeleteUploadFile ¶
func (*UploadService) GetUploadFileById ¶
func (*UploadService) GetUploadStats ¶
func (us *UploadService) GetUploadStats(userId int64, days int) ([]schemas.UploadStats, *types.AppError)
func (*UploadService) UploadFile ¶
func (us *UploadService) UploadFile(c *gin.Context) (*schemas.UploadPartOut, *types.AppError)
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func (*UserService) GetProfilePhoto ¶
func (us *UserService) GetProfilePhoto(c *gin.Context)
func (*UserService) GetStats ¶
func (us *UserService) GetStats(c *gin.Context) (*schemas.AccountStats, *types.AppError)
func (*UserService) ListChannels ¶
func (*UserService) ListSessions ¶
func (us *UserService) ListSessions(c *gin.Context) ([]schemas.SessionOut, *types.AppError)
func (*UserService) RemoveBots ¶
func (*UserService) RemoveSession ¶
func (*UserService) UpdateChannel ¶
Click to show internal directories.
Click to hide internal directories.