// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// Package resources provides common Talos resources settings.
package resources

import "github.com/cosi-project/runtime/pkg/resource"

// RedactableSpec requires a spec to have Redact method to redact sensitive information.
//
// Implementations are generated by the redactgen tool (tools/redactgen): mark the spec with the
// //redactgen:gen comment, and mark the sensitive fields (including the ones in the nested structs)
// with the `redact:"replace"` struct tag.
type RedactableSpec[T any] interface {
	RedactSecrets(md resource.Metadata) T
}
