func SecretsInNamespace(client kubernetes.Interface, namespace string) ([]corev1.Secret, error) {
	secretList, err := client.CoreV1().Secrets(namespace).List(context.TODO(), metav1.ListOptions{})
	if err != nil {
		return nil, err
	}
	return secretList.Items, nil
}
SecretsInNamespace lists all secrets in a given namespace
package havener
import (
	"context"
	"fmt"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"github.com/gonvenience/wrap"
	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
	"k8s.io/apimachinery/pkg/runtime/schema"
	"k8s.io/client-go/dynamic"
	"k8s.io/client-go/kubernetes"
)
func ListStatefulSetsInNamespace(client kubernetes.Interface, namespace string) ([]string, error) {
	list, err := client.AppsV1beta1().StatefulSets(namespace).List(context.TODO(), metav1.ListOptions{})
	if err != nil {
		return nil, err
	}
	result := make([]string, len(list.Items))
	for idx, item := range list.Items {
		result[idx] = item.Name
	}
	return result, nil
}
func ListDeploymentsInNamespace(client kubernetes.Interface, namespace string) ([]string, error) {
	list, err := client.AppsV1beta1().Deployments(namespace).List(context.TODO(), metav1.ListOptions{})
	if err != nil {
		return nil, err
	}
	result := make([]string, len(list.Items))
	for idx, item := range list.Items {
		result[idx] = item.Name
	}
	return result, nil
}
func ListNamespaces(client kubernetes.Interface) ([]string, error) {
	namespaceList, err := client.CoreV1().Namespaces().List(context.TODO(), metav1.ListOptions{})
	if err != nil {
		return nil, err
	}
	result := make([]string, len(namespaceList.Items))
	for i, namespace := range namespaceList.Items {
		result[i] = namespace.Name
	}
	return result, nil
}
func ListSecretsInNamespace(client kubernetes.Interface, namespace string) ([]string, error) {
	secretList, err := client.CoreV1().Secrets(namespace).List(context.TODO(), metav1.ListOptions{})
	if err != nil {
		return nil, err
	}
	result := make([]string, len(secretList.Items))
	for i, secret := range secretList.Items {
		result[i] = secret.Name
	}
	return result, nil
}