github.com/opentofu/opentofu@v1.7.1/internal/encryption/keyprovider/static/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 static 7 8 import ( 9 "github.com/opentofu/opentofu/internal/encryption/keyprovider" 10 ) 11 12 func New() Descriptor { 13 return &descriptor{} 14 } 15 16 // Descriptor is an additional interface to allow for providing custom methods. 17 type Descriptor interface { 18 keyprovider.Descriptor 19 } 20 21 type descriptor struct { 22 } 23 24 func (f descriptor) ID() keyprovider.ID { 25 return "static" 26 } 27 28 func (f descriptor) ConfigStruct() keyprovider.Config { 29 return &Config{} 30 }