-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(gateway): add VPNaaS support #306
Conversation
Authentication GatewayIPSecAuthType `json:"authentication,omitempty"` | ||
// PSK is a user-provided pre-shared key. | ||
// Note that this field is only meant to be used when providing API with your pre-shared key; it will always be empty in API responses | ||
PSK string `json:"psk,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively I could remove PSK
field from here and create a separate type for create/modify request that has both Authentication
and PSK
fields.
I went with this option because IMO we already have a lot of types around gateways and the less types we have, the easier it is to use SDK. But I don't have a strong opinion on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we already use both approaches (different type in request
package vs. shared type from upcloud
package) elsewhere as well and this seems quite clean to me 👍
|
||
GatewayTunnelIPSecAuthTypePSK GatewayIPSecAuthType = "psk" | ||
|
||
GatewayIPSecAlgorithm_aes128gcm16 GatewayIPSecAlgorithm = "aes128gcm16" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an underscore in those constants, as I believe it's easier to parse with eyes when the actual algorithm type is separated a bit more from the rest.
Could edit the PR title to e.g. |
This PR adds support for VPNaaS:
Connections
field and allow to modify it