Commit graph

24 commits

Author SHA1 Message Date
James Nugent
f73ec2fc71
[codegen/go] Permit production of flat Go packages (#6862)
When working in a monorepo environment, it can be desirable to generate
Go SDKs into a structure less like the upstream SDKs, and more like
this:

github.com/x/mymonorepo/sdk/go/package-name

Where `package-name` is also the root of a Go module. Since
`package-name` is not a valid package name in Go, it's also desirable to
be able to choose a replacement name and reduce the amount of nesting.

This commit adds a new Go option to the schema, `rootPackageName`, which
can be used to modify the generated root package name (e.g. to
`mypackage` instead of `package-name`, and remove the additional layer
of nesting.

Test coverage is added to ensure that the correct file structure and
package names are generated.
2021-04-29 13:30:01 -06:00
Paul Stack
e955a6b06a Refactor Mock newResource and call to accept property bag rather than individual args (#6672) 2021-04-14 19:32:18 +01:00
pulumi-bot
73a66f48ea [breaking] Changing the version of go.mod in sdk / pkg to be v3 2021-04-14 19:32:18 +01:00
Vivek Lakshmanan
78c48d5d31 Fix comment/example handling 2021-03-30 22:24:45 -07:00
Vivek Lakshmanan
3151d23f09 Fix to create inputs for nested collections types 2021-03-30 22:24:11 -07:00
Vivek Lakshmanan
700a576b70 Support nested collection types 2021-03-30 22:24:11 -07:00
Justin Van Patten
572c74826c
Add schema & codegen support for plain properties (#6481)
This change adds schema and codegen support for plain properties which
are emitted typed as the plain type rather than wrapped as an `Input`.
Plain properties require a prompt value and do not accept a value that
is `Output`.
2021-03-10 07:08:08 -08:00
Vivek Lakshmanan
92571f8f12 Adding enum container types support for go codegen 2021-02-25 22:26:37 -08:00
Vivek Lakshmanan
4da8a45eb2 Option to generate container types resources now specified in GoPackageInfo 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
38ac84038c Make resource container-type generation optional 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
3aa566d286 Fix tests 2021-01-20 11:29:01 -08:00
Vivek Lakshmanan
22896074f3 Expand testing to cover all generated files 2021-01-20 11:29:01 -08:00
Levi Blackstone
2dfec71a5c
[codegen/go] Register resource modules/packages (#6121) 2021-01-19 16:59:51 -07:00
Vivek Lakshmanan
81b6a1b83d Linting 2021-01-11 09:58:32 -08:00
Vivek Lakshmanan
b70c89eeec Allow optional strict enum types to be omitted
Fixes https://github.com/pulumi/pulumi/issues/6068
2021-01-11 09:58:32 -08:00
Levi Blackstone
d3c75afce1
[codegen/go] Fix Input/Output methods for Go resources (#5916) 2020-12-11 11:49:08 -07:00
Vivek Lakshmanan
6e466e4ec0 Apply suggestions from code review
Co-authored-by: Komal <komal@pulumi.com>

Address PR comments
2020-11-18 00:08:09 -08:00
Vivek Lakshmanan
65e027062d Add an underscore if enum values have underscores 2020-11-18 00:07:42 -08:00
Vivek Lakshmanan
41fff5dc08 Add type as prefix for enum values 2020-11-18 00:07:42 -08:00
Vivek Lakshmanan
169fb47154 Consolidate tests 2020-11-18 00:07:42 -08:00
Vivek Lakshmanan
43e48950df Adding support for go enum generation 2020-11-18 00:07:42 -08:00
Levi Blackstone
64e5de1edc
[codegen/go] Add support for ResourceType and isComponent (#5497) 2020-11-09 11:55:53 -07:00
Mikhail Shilkov
da1f25928d
[codegen] Adjust Go/Python package naming for Azure NextGen (#5373) 2020-09-15 13:56:58 +02:00
Evan Boyle
3efbc3705d
Update go codegen to include usage hints on Input types (#4279) 2020-04-02 19:59:08 -07:00