mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-29 01:16:12 -05:00
bd63aa3c6b
sed -i '1i/*\nCopyright (c) Edgeless Systems GmbH\n\nSPDX-License-Identifier: AGPL-3.0-only\n*/\n' `grep -rL --include='*.go' 'DO NOT EDIT'` gofumpt -w .
25 lines
479 B
Go
25 lines
479 B
Go
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
package kubernetes
|
|
|
|
import (
|
|
k8s "k8s.io/api/core/v1"
|
|
"k8s.io/apimachinery/pkg/runtime"
|
|
)
|
|
|
|
// Secrets represent a list of k8s Secret.
|
|
type Secrets []*k8s.Secret
|
|
|
|
// Marshal marshals secrets into multiple YAML documents.
|
|
func (s Secrets) Marshal() ([]byte, error) {
|
|
objects := make([]runtime.Object, len(s))
|
|
for i := range s {
|
|
objects[i] = s[i]
|
|
}
|
|
return MarshalK8SResourcesList(objects)
|
|
}
|