opentofu/internal/encryption/method/descriptor.go
Janos 19a994ee7f
Documentation updates for 1.7.0-alpha1 (state encryption) (#1396)
Signed-off-by: Janos <86970079+janosdebugs@users.noreply.github.com>
2024-03-14 15:05:05 +01:00

21 lines
690 B
Go

// Copyright (c) The OpenTofu Authors
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) 2023 HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package method
// Descriptor contains the details on an encryption method and produces a configuration structure with default values.
type Descriptor interface {
// ID returns the unique identifier used when parsing HCL or JSON configs.
ID() ID
// ConfigStruct creates a new configuration struct annotated with hcl tags. The Build() receiver on
// this struct must be able to build a Method from the configuration.
//
// Common errors:
// - Returning a struct without a pointer
// - Returning a non-struct
ConfigStruct() Config
}