1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-05-09 08:37:04 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
feiniks
5899f110b9
Add online gc ()
* Add online gc core

* Add check gc when update repo

* Go add check gc when update repo

* Add gc unit test

* Support set pwd_hash for gc and fsck

* Optimize to check if block exists

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-10-24 18:34:16 +08:00
feiniks
61126d108c
Add json exp ()
* Add json exp

* Add json exp and add gen jwt token

* Gen seahub and notif jwt token

* Add exp for gen jwt token

* Delete gen_jwt_token API

* Delete set exp to 72 hour

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-18 17:59:24 +08:00
feiniks
f0c95b4e77
Use JWT_PRIVATE_KEY ()
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-10 15:43:25 +08:00
feiniks
b5b37e69e0
Add check Authorization header ()
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-29 15:28:41 +08:00
feiniks
6944257cc8
Add timeout when query from database ()
* Add timeout when query from database

* Modify DefaultTimeout to DBOpTimeout

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-29 15:10:55 +08:00
feiniks
738716496a
Fix security issue and add go linter ()
* Fix security issue and add go linter

* Fix error checked by golangci-lint

* Delete jwt-go pkg

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-12 14:59:45 +08:00
feiniks
cd9bae2002
Add column type to RepoInfo ()
* Add column type to RepoInfo

* Go fileserver check repo type

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-06-19 12:20:38 +08:00
feiniks
549c6b827f
Add error log for block write failed ()
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-14 17:10:28 +08:00
feiniks
1e4790b3a2
Return 404 when notification server is disabled ()
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-02-01 16:31:59 +08:00
feiniks
9173f217a4
Send repo update event to notification server ()
* Send repo update event to notification server

* Add option to manage configuration

* Init default options at start

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-03-11 12:14:39 +08:00
feiniks
d6f6127641
Add notification server ()
* Add notification server of go

Modify path of pkg

Send notification for update-repo event

Delete client pkg and use reflect select to send message

Modify output of log

Add formatter of log

Add jwt authentication

go add get jwt token api

CI support compile libjwt

Get group users from database

* Add ping to test mysql is alive

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-12-16 15:29:01 +08:00
杨赫然
5c741c15ca Merge branch '9.0' 2022-12-06 14:47:15 +08:00
feiniks
df78d10ec1 Reuse zlib ReadCloser and add timeout for get fs id list ()
* Reuse zlib ReadCloser and add timeout for get fs id list

* Reuse zlib reader

* Get seafile and seafdir with zlib reader

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Use json-iterator/go to parse fs objects ()

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Add cache for seafdir ()

* Add cache for seafile and seafdir

* Add ttl for fs cache

* Use MB unit and add a comment

Co-authored-by: 杨赫然 <heran.yang@seafile.com>

Close object after reading finished ()

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-12-06 10:45:39 +08:00
feiniks
620438fbb5
Clean go unused log ()
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-10-14 12:10:53 +08:00
feiniks
04350f2b99
Merge same repo once and check fs object is valid ()
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-09-28 16:43:07 +08:00
feiniks
955d4c5277
Add workpool to calculate fs id list ()
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2022-09-03 18:22:46 +08:00
feiniks
881c270aa8
Set unix time to repo token sync time () 2022-05-30 14:10:18 +08:00
feiniks
96b33251ce
Modify log format and don't print network error ()
* Modify log format and don't print network error

* Don't print network error and content canceled error

* Modify function name
2022-03-02 16:03:16 +08:00
feiniks
1c2c981530
Fix get fs-id-list for virtual repos () 2021-12-22 16:01:21 +08:00
feiniks
f588d926de
Go add permission check () 2021-12-14 17:38:03 +08:00
feiniks
96884a83a0
Validate token return 403 for go () 2021-12-02 18:30:22 +08:00
feiniks
273e44c18e
Validate repo_id when validate token from cache for go () 2021-12-01 16:03:17 +08:00
Xiangyue Cai
c2006c5443
improve log ()
* improve log

* write header after internal server error
2021-09-29 17:08:39 +08:00
Xiangyue Cai
c31dcc79ce
Don't omit commit id when marshal commit to json () 2021-09-23 14:12:53 +08:00
Xiangyue Cai
88e917c58e
send event ()
* send event

* send event
2021-09-17 11:07:38 +08:00
Xiangyue Cai
bd6b693ab5
add recover ()
* add recover

* improve code

* improve code

* use go routine
2021-08-10 10:43:08 +08:00
Xiangyue Cai
537226aca7
create merge virtual repo task pool ()
* create merge virtual repo task pool

* use for range
2021-06-30 11:21:57 +08:00
Xiangyue Cai
d8a4a9a72d
do not compute repo size directly () 2021-06-26 19:03:50 +08:00
Xiangyue Cai
d1e57781b5
add block map cache () 2021-02-26 18:09:04 +08:00
Xiangyue Cai
5090725ff8
stop task when request canceled () 2021-02-07 17:21:18 +08:00
Jiaqiang Xu
7420b8d738
Go fileserver ()
* Initial commit for fileserver written in golang.

[gofileserver] Fix some syntaxt errors.

Add fs backend and objstore test ()

* Add fs backend and objstore test

* modify test case and optimize fs backend

* Modify function name and first write temporary files

* Don't need to reopen the temp files

Add comment for objstore ()

* Add comment for objstore

* Modify comment

Add commitmgr and test case ()

* Add commitmgr and test case

* Redefine the interface

* Modify comment and interface

* Modify parameter and del unused method

* Add comment for FromData and ToData

Add blockmgr and test case ()

* Add blockmgr and test case

* Modify comment and interface

Add fsmgr and test case ()

* Add fsmgr and test case

* Add save interface and error details

* Modify errors and comments

Add searpc package and test case ()

* Add searpc package

* Add searpc test case

* Add return error and add Request struct

* Modify returned error

* Modify comments

add checkPerm ()

Add file and block download ()

* Add file and block download

* Modify init and use aes algorithm

* Get block by offset and add stat method

* Modify objID's type

* Fix reset pos after add start

* Add http error handing and record log when failed to read block or write block to response

* Modify http return code and value names

* Modify http return code and add log info

* Block read add comment and only repeat once

load ccnetdb and support sqlite ()

Add zip download ()

* Add zip download

* Modify pack dir and log info

* Modify http return code and use Deflate zip compression methods

add /repo/<repo-id>/permission-check ()

add /<repo-id>/commit/HEAD ()

add  /repo/<repo-id>/commit/<id> ()

add /repo/<repo-id>/block/<id> ()

add /repo/<repo-id>/fs-id-list ()

add /repo/head-commits-multi ()

Add file upload api ()

* Add file upload api

* Upload api implements post multi files and create relative path

* Modify handle error and save files directly

* Fix rebase conflict

* index block use channel and optimize mkdir with parents

* Handle jobs and results in a loop

* Mkdir with parents use postMultiFiles and use pointer of SeafDirent

* Del diff_simple size_sched virtual_repo

* Need to check the path with and without slash

* Modify merge trees and add merge test case

* Del postFile and don't close results channel

* Close the file and remove multipart temp file

* Modify merge test case and compare the first name of path

* Use pointer of Entries for SeafDir

* Add test cases for different situations

add /repo/<repo-id>/pack-fs ()

add POST /<repo-id>/check-fs and /<repo-id>/check-blocks ()

Merge compute repo ()

* Add update repo size and merge virtual repo

* Eliminate lint warnings

* Uncomment merge virtual repo and compute repo size

* Need init the dents

* Use interface{} param and modify removeElems

* Move update dir to file.go and modify logs

* Del sync pkg

add PUT /<repo-id>/commit/<commit-id> ()

add PUT /<repo-id>/block/<id> ()

add POST /<repo-id>/recv-fs ()

add PUT /<repo-id>/commit/HEAD ()

Add http return code ()

Add file update API ()

* Add file update API

* Add GetObjIDByPath and fix change size error

* Add traffic statistics for update api

add diffTrees unit test ()

add GET /accessible-repos ()

add GET /<repo-id>/block-map/<file-id> ()

Add test update repo size and merge virtual repo ()

* Update dir need update repo size

* Add test update repo size and merge virtual repo

* Add delay for test ajax

* Add delay before get repo size and modify comment

Use go fileserver for unit test ()

* Use go fileserver for unit test

* Blocking scheduling update repo size

* Add delay because of sqlite doesn't support concurrency

* Post use multipart form encode

* Del mysql database when test finished

* Fix merge virtual repo failed when use sqlite3

Add upload block API ()

fixed error

Add quota-check API ()

use diff package

* Use central conf for go fileserver ()

* Use central conf for go fileserver

* Fix log error

* use store id and remove share get repo owner ()

* Fix permission error ()

Co-authored-by: feiniks <36756310+feiniks@users.noreply.github.com>
Co-authored-by: Xiangyue Cai <caixiangyue007@gmail.com>
2021-01-04 11:41:53 +08:00