(aws-iotevents): golang: export _bind so that L2 constructs can be written in Go
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### Describe the feature
I want to write my own `IAction` in Go (for SNS publishing), but I cannot seem to satisfy the correct interface.
Looking at the definition:
```ts
export interface IAction {
/**
* Returns the AWS IoT Events action specification.
* @internal
*/
_bind(scope: Construct, options: ActionBindOptions): ActionConfig;
}
```
`_bind` is not exported so it is not part of the generated Go IAction.
the `aws-iot` Actions used to have `Bind` exported and I could write my own actions before CDK officially supported the DynamoDBv2 action.
Passing in a Go a struct with method:
`func (action *IoTEventSNSAction) _Bind(scope constructs.Construct, options *iotevents.ActionBindOptions) *iotevents.ActionConfig {`
results in `panic: action._bind is not a function`.
Alternatively, is there another way to achieve this?
### Use Case
I have no way to extend the functionality here, except first write a Typescript class.
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.73.0
### Environment details (OS name and version, etc.)
macOS 13.3
Contributor guide
Research direction
Start by tracing the TypeScript IAction interface and the generated Go IAction interface to understand how the unexported _bind method is handled across languages. Check the existing aws-iot action interfaces for their exported Bind behavior, then determine whether exposing _bind preserves the intended contract and whether the generated Go interface can accept a custom SNS action.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100