This repository was archived by the owner on Oct 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +31
-0
lines changed
src/main/java/com/github/kaklakariada/aws/lambda/controller Expand file tree Collapse file tree 6 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 23
23
import java .lang .annotation .Retention ;
24
24
import java .lang .annotation .Target ;
25
25
26
+ /**
27
+ * Get the header value with the given name.
28
+ */
26
29
@ Retention (RUNTIME )
27
30
@ Target (PARAMETER )
28
31
public @interface HeaderValue {
Original file line number Diff line number Diff line change 17
17
*/
18
18
package com .github .kaklakariada .aws .lambda .controller ;
19
19
20
+ /**
21
+ * Marker interface for lambda controllers. Controller must have exactly one
22
+ * method annotated with {@link RequestHandlerMethod}.
23
+ */
20
24
public interface LambdaController {
21
25
}
Original file line number Diff line number Diff line change 23
23
import java .lang .annotation .Retention ;
24
24
import java .lang .annotation .Target ;
25
25
26
+ /**
27
+ * Get the path parameter with the given name.
28
+ */
26
29
@ Retention (RUNTIME )
27
30
@ Target (PARAMETER )
28
31
public @interface PathParameter {
Original file line number Diff line number Diff line change 23
23
import java .lang .annotation .Retention ;
24
24
import java .lang .annotation .Target ;
25
25
26
+ /**
27
+ * Get the query string with the given name.
28
+ */
26
29
@ Retention (RUNTIME )
27
30
@ Target (PARAMETER )
28
31
public @interface QueryStringParameter {
Original file line number Diff line number Diff line change 23
23
import java .lang .annotation .Retention ;
24
24
import java .lang .annotation .Target ;
25
25
26
+ /**
27
+ * Get the request body.
28
+ */
26
29
@ Retention (RUNTIME )
27
30
@ Target (PARAMETER )
28
31
public @interface RequestBody {
Original file line number Diff line number Diff line change 23
23
import java .lang .annotation .Retention ;
24
24
import java .lang .annotation .Target ;
25
25
26
+ import com .amazonaws .services .lambda .runtime .Context ;
27
+ import com .github .kaklakariada .aws .lambda .model .request .ApiGatewayRequest ;
28
+
29
+ /**
30
+ * Marks a method of a {@link LambdaController} as the request handler.
31
+ * Supported method arguments:
32
+ * <ul>
33
+ * <li>Type {@link ApiGatewayRequest}
34
+ * <li>Type {@link Context}
35
+ * <li>Argument annotation {@link RequestBody}
36
+ * <li>Argument annotation {@link HeaderValue}
37
+ * <li>Argument annotation {@link PathParameter}
38
+ * <li>Argument annotation {@link QueryStringParameter}
39
+ * </ul>
40
+ */
26
41
@ Retention (RUNTIME )
27
42
@ Target (METHOD )
28
43
public @interface RequestHandlerMethod {
You can’t perform that action at this time.
0 commit comments