mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
add support for build tag to allow to disable some features
The following build tags are available: - "nogcs", disable Google Cloud Storage backend - "nos3", disable S3 Compabible Object Storage backends - "nobolt", disable Bolt data provider - "nomysql", disable MySQL data provider - "nopgsql", disable PostgreSQL data provider - "nosqlite", disable SQLite data provider - "noportable", disable portable mode
This commit is contained in:
18
vfs/s3fs_disabled.go
Normal file
18
vfs/s3fs_disabled.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// +build nos3
|
||||
|
||||
package vfs
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/drakkan/sftpgo/utils"
|
||||
)
|
||||
|
||||
func init() {
|
||||
utils.AddFeature("-s3")
|
||||
}
|
||||
|
||||
// NewS3Fs returns an error, S3 is disabled
|
||||
func NewS3Fs(connectionID, localTempDir string, config S3FsConfig) (Fs, error) {
|
||||
return nil, errors.New("S3 disabled at build time")
|
||||
}
|
||||
Reference in New Issue
Block a user