Documentation ¶
Overview ¶
Pulling out some of the repeated strings tokens into constants would harm readability, so we just ignore the goconst linter's warning.
nolint: goconst
Index ¶
- Constants
- Variables
- func GenerateSchema(info tfbridge.ProviderInfo, sink diag.Sink) (pschema.PackageSpec, error)
- func LoadGoMod() (*modfile.File, error)
- func Main(pkg string, version string, prov tfbridge.ProviderInfo)
- type CoverageTracker
- type DocKind
- type GeneralExampleInfo
- type GenerateOptions
- type Generator
- type GeneratorOptions
- type Language
- type LanguageConversionResult
Constants ¶
const ( Success = 0 Warning = 1 Failure = 2 Fatal = 3 )
Failure severity values
Variables ¶
Functions ¶
func GenerateSchema ¶
func GenerateSchema(info tfbridge.ProviderInfo, sink diag.Sink) (pschema.PackageSpec, error)
Types ¶
type CoverageTracker ¶ added in v3.6.0
type CoverageTracker struct { ProviderName string // Name of the provider ProviderVersion string // Version of the provider EncounteredExamples map[string]*GeneralExampleInfo // Mapping example names to their general information // contains filtered or unexported fields }
Main overarching structure for storing coverage data on how many examples were processed, how many failed, and for what reason. At different stages, the code translator notifies the tracker of what is going on. Notifications are treated as an ordered stream of events. INTERFACE: foundExample(), languageConversionSuccess(), languageConversionFailure(), languageConversionPanic().
type DocKind ¶
type DocKind string
DocKind indicates what kind of entity's documentation is being requested.
type GeneralExampleInfo ¶ added in v3.6.0
type GeneralExampleInfo struct { Name string OriginalHCL string LanguagesConvertedTo map[string]*LanguageConversionResult // Mapping language names to their conversion diagnostics NameFoundMultipleTimes bool // Current name has already been encountered before }
General information about an example, and how successful it was at being converted to different languages
type GenerateOptions ¶
type GenerateOptions struct {
ModuleFormat string
}
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator(opts GeneratorOptions) (*Generator, error)
NewGenerator returns a code-generator for the given language runtime and package info.
type GeneratorOptions ¶
type GeneratorOptions struct { Package string Version string Language Language ProviderInfo tfbridge.ProviderInfo Root afero.Fs ProviderInfoSource il.ProviderInfoSource PluginHost plugin.Host TerraformVersion string Sink diag.Sink Debug bool SkipDocs bool SkipExamples bool CoverageTracker *CoverageTracker }
type LanguageConversionResult ¶ added in v3.6.0
type LanguageConversionResult struct { TargetLanguage string FailureSeverity int // [Success, Warning, Failure, Fatal] FailureInfo string // Additional in-depth information // !! Current example name has already been converted for this specific language before. // Either the example is duplicated, or a bug is present !! MultipleTranslations bool }
Individual language information concerning how successfully an example was converted to Pulumi