mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 23:00:55 +03:00
refactoring: add common package
The common package defines the interfaces that a protocol must implement and contain code that can be shared among supported protocols. This way should be easier to support new protocols
This commit is contained in:
@@ -15,8 +15,8 @@ import (
|
||||
|
||||
"github.com/go-chi/chi"
|
||||
|
||||
"github.com/drakkan/sftpgo/common"
|
||||
"github.com/drakkan/sftpgo/dataprovider"
|
||||
"github.com/drakkan/sftpgo/sftpd"
|
||||
"github.com/drakkan/sftpgo/utils"
|
||||
"github.com/drakkan/sftpgo/version"
|
||||
"github.com/drakkan/sftpgo/vfs"
|
||||
@@ -77,7 +77,7 @@ type foldersPage struct {
|
||||
|
||||
type connectionsPage struct {
|
||||
basePage
|
||||
Connections []sftpd.ConnectionStatus
|
||||
Connections []common.ConnectionStatus
|
||||
}
|
||||
|
||||
type userPage struct {
|
||||
@@ -603,7 +603,7 @@ func handleWebUpdateUserPost(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func handleWebGetConnections(w http.ResponseWriter, r *http.Request) {
|
||||
connectionStats := sftpd.GetConnectionsStats()
|
||||
connectionStats := common.Connections.GetStats()
|
||||
data := connectionsPage{
|
||||
basePage: getBasePageData(pageConnectionsTitle, webConnectionsPath),
|
||||
Connections: connectionStats,
|
||||
|
||||
Reference in New Issue
Block a user