Documentation ¶
Overview ¶
nolint: lll
Pulling out some of the repeated strings tokens into constants would harm readability, so we just ignore the goconst linter's warning.
nolint: lll, goconst
nolint: lll
Index ¶
- Variables
- func GeneratePackage(tool string, pkg *schema.Package, extraFiles map[string][]byte) (map[string][]byte, error)
- func GenerateProgram(program *hcl2.Program) (map[string][]byte, hcl.Diagnostics, error)
- func LanguageResources(tool string, pkg *schema.Package) (map[string]LanguageResource, error)
- func Title(s string) string
- type CSharpPackageInfo
- type CSharpPropertyInfo
- type DocLanguageHelper
- func (d DocLanguageHelper) GetDocLinkForBuiltInType(typeName string) string
- func (d DocLanguageHelper) GetDocLinkForFunctionInputOrOutputType(pkg *schema.Package, moduleName, typeName string, input bool) string
- func (d DocLanguageHelper) GetDocLinkForPulumiType(pkg *schema.Package, typeName string) string
- func (d DocLanguageHelper) GetDocLinkForResourceInputOrOutputType(pkg *schema.Package, moduleName, typeName string, input bool) string
- func (d DocLanguageHelper) GetDocLinkForResourceType(pkg *schema.Package, _, typeName string) string
- func (d DocLanguageHelper) GetFunctionName(modName string, f *schema.Function) string
- func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName string, t schema.Type, input, optional bool) string
- func (d DocLanguageHelper) GetModuleDocLink(pkg *schema.Package, modName string) (string, string)
- func (d DocLanguageHelper) GetPropertyName(p *schema.Property) (string, error)
- func (d DocLanguageHelper) GetResourceFunctionResultName(modName string, f *schema.Function) string
- type LanguageResource
Constants ¶
This section is empty.
Variables ¶
var Importer schema.Language = importer(0)
Importer implements schema.Language for .NET.
Functions ¶
func GeneratePackage ¶
func GenerateProgram ¶ added in v2.3.0
func LanguageResources ¶ added in v2.6.0
LanguageResources returns a map of resources that can be used by downstream codegen. The map key is the resource schema token.
Types ¶
type CSharpPackageInfo ¶
type CSharpPackageInfo struct { PackageReferences map[string]string `json:"packageReferences,omitempty"` Namespaces map[string]string `json:"namespaces,omitempty"` Compatibility string `json:"compatibility,omitempty"` DictionaryConstructors bool `json:"dictionaryConstructors,omitempty"` }
CSharpPackageInfo represents the C# language-specific info for a package.
type CSharpPropertyInfo ¶ added in v2.1.0
type CSharpPropertyInfo struct {
Name string `json:"name,omitempty"`
}
CSharpPropertyInfo represents the C# language-specific info for a property.
type DocLanguageHelper ¶
type DocLanguageHelper struct { // Namespaces is a map of Pulumi schema module names to their // C# equivalent names, to be used when creating fully-qualified // property type strings. Namespaces map[string]string }
DocLanguageHelper is the DotNet-specific implementation of the DocLanguageHelper.
func (DocLanguageHelper) GetDocLinkForBuiltInType ¶
func (d DocLanguageHelper) GetDocLinkForBuiltInType(typeName string) string
GetDocLinkForBuiltInType returns the C# URL for a built-in type. Currently not using the typeName parameter because the returned link takes to a general top -level page containing info for all built in types.
func (DocLanguageHelper) GetDocLinkForFunctionInputOrOutputType ¶
func (d DocLanguageHelper) GetDocLinkForFunctionInputOrOutputType(pkg *schema.Package, moduleName, typeName string, input bool) string
GetDocLinkForFunctionInputOrOutputType returns the doc link for an input or output type of a Function.
func (DocLanguageHelper) GetDocLinkForPulumiType ¶
func (d DocLanguageHelper) GetDocLinkForPulumiType(pkg *schema.Package, typeName string) string
GetDocLinkForPulumiType returns the .Net API doc link for a Pulumi type.
func (DocLanguageHelper) GetDocLinkForResourceInputOrOutputType ¶
func (d DocLanguageHelper) GetDocLinkForResourceInputOrOutputType(pkg *schema.Package, moduleName, typeName string, input bool) string
GetDocLinkForResourceInputOrOutputType returns the doc link for an input or output type of a Resource.
func (DocLanguageHelper) GetDocLinkForResourceType ¶
func (d DocLanguageHelper) GetDocLinkForResourceType(pkg *schema.Package, _, typeName string) string
GetDocLinkForResourceType returns the .NET API doc URL for a type belonging to a resource provider.
func (DocLanguageHelper) GetFunctionName ¶ added in v2.1.0
func (d DocLanguageHelper) GetFunctionName(modName string, f *schema.Function) string
func (DocLanguageHelper) GetLanguageTypeString ¶
func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName string, t schema.Type, input, optional bool) string
GetLanguageTypeString returns the DotNet-specific type given a Pulumi schema type.
func (DocLanguageHelper) GetModuleDocLink ¶ added in v2.2.0
GetModuleDocLink returns the display name and the link for a module.
func (DocLanguageHelper) GetPropertyName ¶
func (d DocLanguageHelper) GetPropertyName(p *schema.Property) (string, error)
GetPropertyName uses the property's csharp-specific language info, if available, to generate the property name. Otherwise, returns the PascalCase as the default.
func (DocLanguageHelper) GetResourceFunctionResultName ¶
func (d DocLanguageHelper) GetResourceFunctionResultName(modName string, f *schema.Function) string
GetResourceFunctionResultName returns the name of the result type when a function is used to lookup an existing resource.