faasd/pkg/provider/labeller.go
Nitishkumar Singh a2ea804d2c Handled list secrets for no secret in namespaces
Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>

Test case included for default and non-default

Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>

Changed Fake Labeller Implementation

Signed-off-by: Nitishkumar Singh <nitishkumarsingh71@gmail.com>
2022-01-19 18:05:56 +00:00

19 lines
446 B
Go

package provider
import "context"
type Labeller interface {
Labels(ctx context.Context, namespace string) (map[string]string, error)
}
/*
* FakeLabeller can be used to fake labels applied on namespace to mark them valid/invalid for openfaas functions
*/
type FakeLabeller struct {
FakeLabels map[string]string
}
func (s *FakeLabeller) Labels(ctx context.Context, namespace string) (map[string]string, error) {
return s.FakeLabels, nil
}