-
Notifications
You must be signed in to change notification settings - Fork 17
/
HttpRouteKey.go
100 lines (87 loc) · 2.01 KB
/
HttpRouteKey.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package awsapigatewayv2
import (
_init_ "github.com/aws/aws-cdk-go/awscdk/jsii"
_jsii_ "github.com/aws/jsii-runtime-go/runtime"
)
// HTTP route in APIGateway is a combination of the HTTP method and the path component.
//
// This class models that combination.
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import "github.com/aws/aws-cdk-go/awscdk"
//
// httpRouteKey := awscdk.Aws_apigatewayv2.HttpRouteKey_With(jsii.String("path"), awscdk.Aws_apigatewayv2.HttpMethod_ANY)
//
// Experimental.
type HttpRouteKey interface {
// The key to the RouteKey as recognized by APIGateway.
// Experimental.
Key() *string
// The method of the route.
// Experimental.
Method() HttpMethod
// The path part of this RouteKey.
//
// Returns `undefined` when `RouteKey.DEFAULT` is used.
// Experimental.
Path() *string
}
// The jsii proxy struct for HttpRouteKey
type jsiiProxy_HttpRouteKey struct {
_ byte // padding
}
func (j *jsiiProxy_HttpRouteKey) Key() *string {
var returns *string
_jsii_.Get(
j,
"key",
&returns,
)
return returns
}
func (j *jsiiProxy_HttpRouteKey) Method() HttpMethod {
var returns HttpMethod
_jsii_.Get(
j,
"method",
&returns,
)
return returns
}
func (j *jsiiProxy_HttpRouteKey) Path() *string {
var returns *string
_jsii_.Get(
j,
"path",
&returns,
)
return returns
}
// Create a route key with the combination of the path and the method.
// Experimental.
func HttpRouteKey_With(path *string, method HttpMethod) HttpRouteKey {
_init_.Initialize()
if err := validateHttpRouteKey_WithParameters(path); err != nil {
panic(err)
}
var returns HttpRouteKey
_jsii_.StaticInvoke(
"monocdk.aws_apigatewayv2.HttpRouteKey",
"with",
[]interface{}{path, method},
&returns,
)
return returns
}
func HttpRouteKey_DEFAULT() HttpRouteKey {
_init_.Initialize()
var returns HttpRouteKey
_jsii_.StaticGet(
"monocdk.aws_apigatewayv2.HttpRouteKey",
"DEFAULT",
&returns,
)
return returns
}