add experimental plugin system

This commit is contained in:
Nicola Murino
2021-07-11 15:26:51 +02:00
parent bfa4085932
commit bd5191dfc5
101 changed files with 3190 additions and 1612 deletions

View File

@@ -9,7 +9,7 @@ import (
"sync"
"time"
"github.com/drakkan/sftpgo/v2/utils"
"github.com/drakkan/sftpgo/v2/util"
)
// SecretProvider defines the interface for a KMS secrets provider
@@ -98,7 +98,7 @@ func NewPlainSecret(payload string) *Secret {
// GetSecretFromCompatString returns a secret from the previous format
func GetSecretFromCompatString(secret string) (*Secret, error) {
plain, err := utils.DecryptData(secret)
plain, err := util.DecryptData(secret)
if err != nil {
return &Secret{}, errMalformedCiphertext
}
@@ -401,7 +401,7 @@ func (s *Secret) IsValidInput() bool {
s.RLock()
defer s.RUnlock()
if !utils.IsStringInSlice(s.provider.GetStatus(), validSecretStatuses) {
if !util.IsStringInSlice(s.provider.GetStatus(), validSecretStatuses) {
return false
}
if s.provider.GetPayload() == "" {