Skip to content

Commit 0ac72fd

Browse files
chore(release): v0.0.2
1 parent 8ad2bbf commit 0ac72fd

22 files changed

+515
-197
lines changed

cdk8svarious/KongTcpBackend.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package cdk8svarious
2+
3+
4+
type KongTcpBackend struct {
5+
ServiceName *string `field:"required" json:"serviceName" yaml:"serviceName"`
6+
ServicePort *float64 `field:"required" json:"servicePort" yaml:"servicePort"`
7+
}
8+

cdk8svarious/KongTcpIngress.go

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
package cdk8svarious
2+
3+
import (
4+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
5+
_init_ "github.com/opencdk8s/cdk8s-various-go/cdk8svarious/jsii"
6+
7+
"github.com/aws/constructs-go/constructs/v10"
8+
"github.com/opencdk8s/cdk8s-various-go/cdk8svarious/internal"
9+
)
10+
11+
type KongTcpIngress interface {
12+
constructs.Construct
13+
// The tree node.
14+
Node() constructs.Node
15+
// Returns a string representation of this construct.
16+
ToString() *string
17+
}
18+
19+
// The jsii proxy struct for KongTcpIngress
20+
type jsiiProxy_KongTcpIngress struct {
21+
internal.Type__constructsConstruct
22+
}
23+
24+
func (j *jsiiProxy_KongTcpIngress) Node() constructs.Node {
25+
var returns constructs.Node
26+
_jsii_.Get(
27+
j,
28+
"node",
29+
&returns,
30+
)
31+
return returns
32+
}
33+
34+
35+
func NewKongTcpIngress(scope constructs.Construct, name *string, opts *KongTcpOptions) KongTcpIngress {
36+
_init_.Initialize()
37+
38+
if err := validateNewKongTcpIngressParameters(scope, name, opts); err != nil {
39+
panic(err)
40+
}
41+
j := jsiiProxy_KongTcpIngress{}
42+
43+
_jsii_.Create(
44+
"cdk8s-various.KongTcpIngress",
45+
[]interface{}{scope, name, opts},
46+
&j,
47+
)
48+
49+
return &j
50+
}
51+
52+
func NewKongTcpIngress_Override(k KongTcpIngress, scope constructs.Construct, name *string, opts *KongTcpOptions) {
53+
_init_.Initialize()
54+
55+
_jsii_.Create(
56+
"cdk8s-various.KongTcpIngress",
57+
[]interface{}{scope, name, opts},
58+
k,
59+
)
60+
}
61+
62+
// Checks if `x` is a construct.
63+
//
64+
// Returns: true if `x` is an object created from a class which extends `Construct`.
65+
// Deprecated: use `x instanceof Construct` instead.
66+
func KongTcpIngress_IsConstruct(x interface{}) *bool {
67+
_init_.Initialize()
68+
69+
if err := validateKongTcpIngress_IsConstructParameters(x); err != nil {
70+
panic(err)
71+
}
72+
var returns *bool
73+
74+
_jsii_.StaticInvoke(
75+
"cdk8s-various.KongTcpIngress",
76+
"isConstruct",
77+
[]interface{}{x},
78+
&returns,
79+
)
80+
81+
return returns
82+
}
83+
84+
func (k *jsiiProxy_KongTcpIngress) ToString() *string {
85+
var returns *string
86+
87+
_jsii_.Invoke(
88+
k,
89+
"toString",
90+
nil, // no parameters
91+
&returns,
92+
)
93+
94+
return returns
95+
}
96+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//go:build !no_runtime_type_checking
2+
3+
package cdk8svarious
4+
5+
import (
6+
"fmt"
7+
8+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
9+
10+
"github.com/aws/constructs-go/constructs/v10"
11+
)
12+
13+
func validateKongTcpIngress_IsConstructParameters(x interface{}) error {
14+
if x == nil {
15+
return fmt.Errorf("parameter x is required, but nil was provided")
16+
}
17+
18+
return nil
19+
}
20+
21+
func validateNewKongTcpIngressParameters(scope constructs.Construct, name *string, opts *KongTcpOptions) error {
22+
if scope == nil {
23+
return fmt.Errorf("parameter scope is required, but nil was provided")
24+
}
25+
26+
if name == nil {
27+
return fmt.Errorf("parameter name is required, but nil was provided")
28+
}
29+
30+
if opts == nil {
31+
return fmt.Errorf("parameter opts is required, but nil was provided")
32+
}
33+
if err := _jsii_.ValidateStruct(opts, func() string { return "parameter opts" }); err != nil {
34+
return err
35+
}
36+
37+
return nil
38+
}
39+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//go:build no_runtime_type_checking
2+
3+
package cdk8svarious
4+
5+
// Building without runtime type checking enabled, so all the below just return nil
6+
7+
func validateKongTcpIngress_IsConstructParameters(x interface{}) error {
8+
return nil
9+
}
10+
11+
func validateNewKongTcpIngressParameters(scope constructs.Construct, name *string, opts *KongTcpOptions) error {
12+
return nil
13+
}
14+

cdk8svarious/KongTcpOptions.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package cdk8svarious
2+
3+
4+
type KongTcpOptions struct {
5+
Annotations *map[string]*string `field:"optional" json:"annotations" yaml:"annotations"`
6+
Rules *[]*KongTcpRule `field:"optional" json:"rules" yaml:"rules"`
7+
}
8+

cdk8svarious/KongTcpRule.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package cdk8svarious
2+
3+
4+
type KongTcpRule struct {
5+
Backend *KongTcpBackend `field:"required" json:"backend" yaml:"backend"`
6+
Port *float64 `field:"required" json:"port" yaml:"port"`
7+
}
8+

cdk8svarious/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# cdk8s-various
22

3-
Holds many useful fully typed cdk8s objects.
3+
Holds many useful fully typed cdk8s objects..
44

55
## Available objects:
66

77
1. SecurityGroupPolicy
8+
2. Untyped ConfigMap

cdk8svarious/SecurityGroupPolicy.go

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
package cdk8svarious
2+
3+
import (
4+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
5+
_init_ "github.com/opencdk8s/cdk8s-various-go/cdk8svarious/jsii"
6+
7+
"github.com/aws/constructs-go/constructs/v10"
8+
"github.com/opencdk8s/cdk8s-various-go/cdk8svarious/internal"
9+
)
10+
11+
type SecurityGroupPolicy interface {
12+
constructs.Construct
13+
// The tree node.
14+
Node() constructs.Node
15+
// Returns a string representation of this construct.
16+
ToString() *string
17+
}
18+
19+
// The jsii proxy struct for SecurityGroupPolicy
20+
type jsiiProxy_SecurityGroupPolicy struct {
21+
internal.Type__constructsConstruct
22+
}
23+
24+
func (j *jsiiProxy_SecurityGroupPolicy) Node() constructs.Node {
25+
var returns constructs.Node
26+
_jsii_.Get(
27+
j,
28+
"node",
29+
&returns,
30+
)
31+
return returns
32+
}
33+
34+
35+
func NewSecurityGroupPolicy(scope constructs.Construct, name *string, opts *SecurityGroupPolicyOptions) SecurityGroupPolicy {
36+
_init_.Initialize()
37+
38+
if err := validateNewSecurityGroupPolicyParameters(scope, name, opts); err != nil {
39+
panic(err)
40+
}
41+
j := jsiiProxy_SecurityGroupPolicy{}
42+
43+
_jsii_.Create(
44+
"cdk8s-various.SecurityGroupPolicy",
45+
[]interface{}{scope, name, opts},
46+
&j,
47+
)
48+
49+
return &j
50+
}
51+
52+
func NewSecurityGroupPolicy_Override(s SecurityGroupPolicy, scope constructs.Construct, name *string, opts *SecurityGroupPolicyOptions) {
53+
_init_.Initialize()
54+
55+
_jsii_.Create(
56+
"cdk8s-various.SecurityGroupPolicy",
57+
[]interface{}{scope, name, opts},
58+
s,
59+
)
60+
}
61+
62+
// Checks if `x` is a construct.
63+
//
64+
// Returns: true if `x` is an object created from a class which extends `Construct`.
65+
// Deprecated: use `x instanceof Construct` instead.
66+
func SecurityGroupPolicy_IsConstruct(x interface{}) *bool {
67+
_init_.Initialize()
68+
69+
if err := validateSecurityGroupPolicy_IsConstructParameters(x); err != nil {
70+
panic(err)
71+
}
72+
var returns *bool
73+
74+
_jsii_.StaticInvoke(
75+
"cdk8s-various.SecurityGroupPolicy",
76+
"isConstruct",
77+
[]interface{}{x},
78+
&returns,
79+
)
80+
81+
return returns
82+
}
83+
84+
func (s *jsiiProxy_SecurityGroupPolicy) ToString() *string {
85+
var returns *string
86+
87+
_jsii_.Invoke(
88+
s,
89+
"toString",
90+
nil, // no parameters
91+
&returns,
92+
)
93+
94+
return returns
95+
}
96+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package cdk8svarious
2+
3+
4+
type SecurityGroupPolicyOptions struct {
5+
SecurityGroupIds *[]*string `field:"optional" json:"securityGroupIds" yaml:"securityGroupIds"`
6+
Selector *map[string]*string `field:"optional" json:"selector" yaml:"selector"`
7+
}
8+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//go:build !no_runtime_type_checking
2+
3+
package cdk8svarious
4+
5+
import (
6+
"fmt"
7+
8+
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
9+
10+
"github.com/aws/constructs-go/constructs/v10"
11+
)
12+
13+
func validateSecurityGroupPolicy_IsConstructParameters(x interface{}) error {
14+
if x == nil {
15+
return fmt.Errorf("parameter x is required, but nil was provided")
16+
}
17+
18+
return nil
19+
}
20+
21+
func validateNewSecurityGroupPolicyParameters(scope constructs.Construct, name *string, opts *SecurityGroupPolicyOptions) error {
22+
if scope == nil {
23+
return fmt.Errorf("parameter scope is required, but nil was provided")
24+
}
25+
26+
if name == nil {
27+
return fmt.Errorf("parameter name is required, but nil was provided")
28+
}
29+
30+
if opts == nil {
31+
return fmt.Errorf("parameter opts is required, but nil was provided")
32+
}
33+
if err := _jsii_.ValidateStruct(opts, func() string { return "parameter opts" }); err != nil {
34+
return err
35+
}
36+
37+
return nil
38+
}
39+

0 commit comments

Comments
 (0)