doc improvements and minor changes
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
a6ed6fc721
commit
ffe7f7ff16
6 changed files with 15 additions and 19 deletions
|
@ -132,21 +132,17 @@ func (c *BaseConnection) RemoveTransfer(t ActiveTransfer) {
|
||||||
c.Lock()
|
c.Lock()
|
||||||
defer c.Unlock()
|
defer c.Unlock()
|
||||||
|
|
||||||
indexToRemove := -1
|
for idx, transfer := range c.activeTransfers {
|
||||||
for i, v := range c.activeTransfers {
|
if transfer.GetID() == t.GetID() {
|
||||||
if v.GetID() == t.GetID() {
|
lastIdx := len(c.activeTransfers) - 1
|
||||||
indexToRemove = i
|
c.activeTransfers[idx] = c.activeTransfers[lastIdx]
|
||||||
break
|
c.activeTransfers[lastIdx] = nil
|
||||||
|
c.activeTransfers = c.activeTransfers[:lastIdx]
|
||||||
|
c.Log(logger.LevelDebug, "transfer removed, id: %v active transfers: %v", t.GetID(), len(c.activeTransfers))
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if indexToRemove >= 0 {
|
c.Log(logger.LevelWarn, "transfer to remove with id %v not found!", t.GetID())
|
||||||
c.activeTransfers[indexToRemove] = c.activeTransfers[len(c.activeTransfers)-1]
|
|
||||||
c.activeTransfers[len(c.activeTransfers)-1] = nil
|
|
||||||
c.activeTransfers = c.activeTransfers[:len(c.activeTransfers)-1]
|
|
||||||
c.Log(logger.LevelDebug, "transfer removed, id: %v active transfers: %v", t.GetID(), len(c.activeTransfers))
|
|
||||||
} else {
|
|
||||||
c.Log(logger.LevelWarn, "transfer to remove not found!")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetTransfers returns the active transfers
|
// GetTransfers returns the active transfers
|
||||||
|
|
|
@ -46,7 +46,7 @@ const (
|
||||||
"`used_quota_files` integer NOT NULL, `last_quota_update` bigint NOT NULL, `filesystem` longtext NULL);" +
|
"`used_quota_files` integer NOT NULL, `last_quota_update` bigint NOT NULL, `filesystem` longtext NULL);" +
|
||||||
"CREATE TABLE `{{users}}` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `username` varchar(255) NOT NULL UNIQUE, " +
|
"CREATE TABLE `{{users}}` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `username` varchar(255) NOT NULL UNIQUE, " +
|
||||||
"`status` integer NOT NULL, `expiration_date` bigint NOT NULL, `description` varchar(512) NULL, `password` longtext NULL, " +
|
"`status` integer NOT NULL, `expiration_date` bigint NOT NULL, `description` varchar(512) NULL, `password` longtext NULL, " +
|
||||||
"`public_keys` longtext NULL, `home_dir` longtext NOT NULL, `uid` integer NOT NULL, `gid` integer NOT NULL, " +
|
"`public_keys` longtext NULL, `home_dir` longtext NOT NULL, `uid` bigint NOT NULL, `gid` bigint NOT NULL, " +
|
||||||
"`max_sessions` integer NOT NULL, `quota_size` bigint NOT NULL, `quota_files` integer NOT NULL, " +
|
"`max_sessions` integer NOT NULL, `quota_size` bigint NOT NULL, `quota_files` integer NOT NULL, " +
|
||||||
"`permissions` longtext NOT NULL, `used_quota_size` bigint NOT NULL, `used_quota_files` integer NOT NULL, " +
|
"`permissions` longtext NOT NULL, `used_quota_size` bigint NOT NULL, `used_quota_files` integer NOT NULL, " +
|
||||||
"`last_quota_update` bigint NOT NULL, `upload_bandwidth` integer NOT NULL, `download_bandwidth` integer NOT NULL, " +
|
"`last_quota_update` bigint NOT NULL, `upload_bandwidth` integer NOT NULL, `download_bandwidth` integer NOT NULL, " +
|
||||||
|
|
|
@ -47,7 +47,7 @@ CREATE TABLE "{{folders}}" ("id" serial NOT NULL PRIMARY KEY, "name" varchar(255
|
||||||
"filesystem" text NULL);
|
"filesystem" text NULL);
|
||||||
CREATE TABLE "{{users}}" ("id" serial NOT NULL PRIMARY KEY, "username" varchar(255) NOT NULL UNIQUE, "status" integer NOT NULL,
|
CREATE TABLE "{{users}}" ("id" serial NOT NULL PRIMARY KEY, "username" varchar(255) NOT NULL UNIQUE, "status" integer NOT NULL,
|
||||||
"expiration_date" bigint NOT NULL, "description" varchar(512) NULL, "password" text NULL, "public_keys" text NULL,
|
"expiration_date" bigint NOT NULL, "description" varchar(512) NULL, "password" text NULL, "public_keys" text NULL,
|
||||||
"home_dir" text NOT NULL, "uid" integer NOT NULL, "gid" integer NOT NULL, "max_sessions" integer NOT NULL,
|
"home_dir" text NOT NULL, "uid" bigint NOT NULL, "gid" bigint NOT NULL, "max_sessions" integer NOT NULL,
|
||||||
"quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL, "used_quota_size" bigint NOT NULL,
|
"quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL, "used_quota_size" bigint NOT NULL,
|
||||||
"used_quota_files" integer NOT NULL, "last_quota_update" bigint NOT NULL, "upload_bandwidth" integer NOT NULL,
|
"used_quota_files" integer NOT NULL, "last_quota_update" bigint NOT NULL, "upload_bandwidth" integer NOT NULL,
|
||||||
"download_bandwidth" integer NOT NULL, "last_login" bigint NOT NULL, "filters" text NULL, "filesystem" text NULL,
|
"download_bandwidth" integer NOT NULL, "last_login" bigint NOT NULL, "filters" text NULL, "filesystem" text NULL,
|
||||||
|
|
|
@ -47,7 +47,7 @@ CREATE TABLE "{{folders}}" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "na
|
||||||
"last_quota_update" bigint NOT NULL, "filesystem" text NULL);
|
"last_quota_update" bigint NOT NULL, "filesystem" text NULL);
|
||||||
CREATE TABLE "{{users}}" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "username" varchar(255) NOT NULL UNIQUE,
|
CREATE TABLE "{{users}}" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "username" varchar(255) NOT NULL UNIQUE,
|
||||||
"status" integer NOT NULL, "expiration_date" bigint NOT NULL, "description" varchar(512) NULL, "password" text NULL,
|
"status" integer NOT NULL, "expiration_date" bigint NOT NULL, "description" varchar(512) NULL, "password" text NULL,
|
||||||
"public_keys" text NULL, "home_dir" text NOT NULL, "uid" integer NOT NULL, "gid" integer NOT NULL,
|
"public_keys" text NULL, "home_dir" text NOT NULL, "uid" bigint NOT NULL, "gid" bigint NOT NULL,
|
||||||
"max_sessions" integer NOT NULL, "quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL,
|
"max_sessions" integer NOT NULL, "quota_size" bigint NOT NULL, "quota_files" integer NOT NULL, "permissions" text NOT NULL,
|
||||||
"used_quota_size" bigint NOT NULL, "used_quota_files" integer NOT NULL, "last_quota_update" bigint NOT NULL,
|
"used_quota_size" bigint NOT NULL, "used_quota_files" integer NOT NULL, "last_quota_update" bigint NOT NULL,
|
||||||
"upload_bandwidth" integer NOT NULL, "download_bandwidth" integer NOT NULL, "last_login" bigint NOT NULL, "filters" text NULL,
|
"upload_bandwidth" integer NOT NULL, "download_bandwidth" integer NOT NULL, "last_login" bigint NOT NULL, "filters" text NULL,
|
||||||
|
|
|
@ -100,8 +100,8 @@ Important note: There are several ways to store data used by applications that r
|
||||||
|
|
||||||
The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:
|
The Docker documentation is a good starting point for understanding the different storage options and variations, and there are multiple blogs and forum postings that discuss and give advice in this area. We will simply show the basic procedure here for the latter option above:
|
||||||
|
|
||||||
1. Create a data directory on a suitable volume on your host system, e.g. `/my/own/sftpgodata`.
|
1. Create a data directory on a suitable volume on your host system, e.g. `/my/own/sftpgodata`. The user with ID `1000` must be able to write to this directory. Please note that you don't need an actual user with ID `1000` on your host system: `chown -R 1000:1000 /my/own/sftpgodata` is enough even if there is no user/group with UID/GID `1000`.
|
||||||
2. Create a home directory for the sftpgo container user on your host system e.g. `/my/own/sftpgohome`.
|
2. Create a home directory for the sftpgo container user on your host system e.g. `/my/own/sftpgohome`. As with the data directory above, make sure that the user with ID `1000` can write to this directory: `chown -R 1000:1000 /my/own/sftpgohome`
|
||||||
3. Start your SFTPGo container like this:
|
3. Start your SFTPGo container like this:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
|
@ -1761,7 +1761,7 @@ paths:
|
||||||
- in: query
|
- in: query
|
||||||
name: fs_provider
|
name: fs_provider
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
$ref: '#/components/schemas/FsProviders'
|
||||||
description: 'the event filesystem provider must be the same as the one specified. Empty or missing means omit this filter'
|
description: 'the event filesystem provider must be the same as the one specified. Empty or missing means omit this filter'
|
||||||
required: false
|
required: false
|
||||||
- in: query
|
- in: query
|
||||||
|
|
Loading…
Reference in a new issue