github.com/opentofu/opentofu@v1.7.1/internal/encryption/method/descriptor.go (about) 1 // Copyright (c) The OpenTofu Authors 2 // SPDX-License-Identifier: MPL-2.0 3 // Copyright (c) 2023 HashiCorp, Inc. 4 // SPDX-License-Identifier: MPL-2.0 5 6 package method 7 8 // Descriptor contains the details on an encryption method and produces a configuration structure with default values. 9 type Descriptor interface { 10 // ID returns the unique identifier used when parsing HCL or JSON configs. 11 ID() ID 12 13 // ConfigStruct creates a new configuration struct annotated with hcl tags. The Build() receiver on 14 // this struct must be able to build a Method from the configuration. 15 // 16 // Common errors: 17 // - Returning a struct without a pointer 18 // - Returning a non-struct 19 ConfigStruct() Config 20 }