Datasources: provide generic function to extract custom headers (#66738)

This commit is contained in:
Jean-Philippe Quéméner
2023-04-19 17:04:30 +02:00
committed by GitHub
parent 772ddbc3c0
commit 42cdec369d
6 changed files with 97 additions and 3 deletions
+5
View File
@@ -54,6 +54,11 @@ type DataSourceService interface {
// DecryptedPassword decrypts the encrypted datasource password and returns the
// decrypted value.
DecryptedPassword(ctx context.Context, ds *DataSource) (string, error)
// CustomHeaders returns a map of custom headers the user might have
// configured for this Datasource. Not every datasource can has the option
// to configure those.
CustomHeaders(ctx context.Context, ds *DataSource) (map[string]string, error)
}
// CacheService interface for retrieving a cached datasource.