1
0

gcsfs_disabled.go 989 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (C) 2019-2023 Nicola Murino
  2. //
  3. // This program is free software: you can redistribute it and/or modify
  4. // it under the terms of the GNU Affero General Public License as published
  5. // by the Free Software Foundation, version 3.
  6. //
  7. // This program is distributed in the hope that it will be useful,
  8. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. // GNU Affero General Public License for more details.
  11. //
  12. // You should have received a copy of the GNU Affero General Public License
  13. // along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. //go:build nogcs
  15. // +build nogcs
  16. package vfs
  17. import (
  18. "errors"
  19. "github.com/drakkan/sftpgo/v2/internal/version"
  20. )
  21. func init() {
  22. version.AddFeature("-gcs")
  23. }
  24. // NewGCSFs returns an error, GCS is disabled
  25. func NewGCSFs(_, _, _ string, _ GCSFsConfig) (Fs, error) {
  26. return nil, errors.New("Google Cloud Storage disabled at build time")
  27. }