ParseConfig is a convenience function to create a BuildableConfig given a provider name and configuration. Returns an error if there is no registered builder for the given name or if the config parsing fails.
(name string, config any)
| 178 | // provider name and configuration. Returns an error if there is no registered |
| 179 | // builder for the given name or if the config parsing fails. |
| 180 | func ParseConfig(name string, config any) (*BuildableConfig, error) { |
| 181 | parser := getBuilder(name) |
| 182 | if parser == nil { |
| 183 | return nil, fmt.Errorf("no certificate provider builder found for %q", name) |
| 184 | } |
| 185 | return parser.ParseConfig(config) |
| 186 | } |
| 187 | |
| 188 | // GetProvider is a convenience function to create a provider given the name, |
| 189 | // config and build options. |
no test coverage detected