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: lll, goconst
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
Index ¶
- func GeneratePackage(tool string, pkg *schema.Package) (map[string][]byte, error)
- func GetDocLinkForBuiltInType(typeName string) string
- func Title(s string) string
- type DocLanguageHelper
- func (d *DocLanguageHelper) GeneratePackagesMap(pkg *schema.Package, tool string, goInfo GoInfo)
- func (d DocLanguageHelper) GetDocLinkForFunctionInputOrOutputType(packageName, moduleName, typeName string, input bool) string
- func (d DocLanguageHelper) GetDocLinkForResourceInputOrOutputType(packageName, moduleName, typeName string, input bool) string
- func (d DocLanguageHelper) GetDocLinkForResourceType(packageName string, moduleName string, typeName string) string
- func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName string, t schema.Type, input, optional bool) string
- func (d DocLanguageHelper) GetPropertyName(p *schema.Property) (string, error)
- func (d DocLanguageHelper) GetResourceFunctionResultName(resourceName string) string
- type GoInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GeneratePackage ¶
func GetDocLinkForBuiltInType ¶
GetDocLinkForBuiltInType returns the godoc URL for a built-in type.
Types ¶
type DocLanguageHelper ¶
type DocLanguageHelper struct {
// contains filtered or unexported fields
}
DocLanguageHelper is the Go-specific implementation of the DocLanguageHelper.
func (*DocLanguageHelper) GeneratePackagesMap ¶
func (d *DocLanguageHelper) GeneratePackagesMap(pkg *schema.Package, tool string, goInfo GoInfo)
GeneratePackagesMap generates a map of Go packages for resources, functions and types.
func (DocLanguageHelper) GetDocLinkForFunctionInputOrOutputType ¶
func (d DocLanguageHelper) GetDocLinkForFunctionInputOrOutputType(packageName, moduleName, typeName string, input bool) string
GetDocLinkForFunctionInputOrOutputType returns the doc link for an input or output type of a Function.
func (DocLanguageHelper) GetDocLinkForResourceInputOrOutputType ¶
func (d DocLanguageHelper) GetDocLinkForResourceInputOrOutputType(packageName, moduleName, typeName string, input bool) string
GetDocLinkForResourceInputOrOutputType returns the godoc URL for an input or output type.
func (DocLanguageHelper) GetDocLinkForResourceType ¶
func (d DocLanguageHelper) GetDocLinkForResourceType(packageName string, moduleName string, typeName string) string
GetDocLinkForResourceType returns the godoc URL for a type belonging to a resource provider.
func (DocLanguageHelper) GetLanguageTypeString ¶
func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName string, t schema.Type, input, optional bool) string
GetLanguageTypeString returns the Go-specific type given a Pulumi schema type.
func (DocLanguageHelper) GetPropertyName ¶
func (d DocLanguageHelper) GetPropertyName(p *schema.Property) (string, error)
GetPropertyName returns the property name specific to Go.
func (DocLanguageHelper) GetResourceFunctionResultName ¶
func (d DocLanguageHelper) GetResourceFunctionResultName(resourceName string) string
GetResourceFunctionResultName returns the name of the result type when a function is used to lookup an existing resource.
type GoInfo ¶
type GoInfo struct { // Base path for package imports // // github.com/pulumi/pulumi-kubernetes/sdk/go/kubernetes ImportBasePath string `json:"importBasePath,omitempty"` // Map from module -> package name // // { "flowcontrol.apiserver.k8s.io/v1alpha1": "flowcontrol/v1alpha1" } // ModuleToPackage map[string]string `json:"moduleToPackage,omitempty"` // Map from package name -> package alias // // { "github.com/pulumi/pulumi-kubernetes/sdk/go/kubernetes/flowcontrol/v1alpha1": "flowcontrolv1alpha1" } // PackageImportAliases map[string]string `json:"packageImportAliases,omitempty"` }
GoInfo holds information required to generate the Go SDK from a schema.