github.com/opentofu/opentofu@v1.7.1/internal/encryption/keyprovider/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 keyprovider 7 8 // Descriptor is a high level description of a key provider. 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 pointer annotated with hcl tags. The Build() receiver on 14 // this struct must be able to build a KeyProvider from the configuration: 15 // 16 // Common errors: 17 // - Returning a struct without a pointer 18 // - Returning a non-struct 19 ConfigStruct() Config 20 }