| 35 | after_help = "Full command documentation: https://www.cargo-lambda.info/commands/invoke.html" |
| 36 | )] |
| 37 | pub struct Invoke { |
| 38 | #[cfg_attr( |
| 39 | target_os = "windows", |
| 40 | arg(short = 'a', long, default_value = "127.0.0.1") |
| 41 | )] |
| 42 | #[cfg_attr( |
| 43 | not(target_os = "windows"), |
| 44 | arg(short = 'A', long, default_value = "::1") |
| 45 | )] |
| 46 | /// Local address host (IPv4 or IPv6) to send invoke requests |
| 47 | invoke_address: String, |
| 48 | |
| 49 | /// Local port to send invoke requests |
| 50 | #[arg(short = 'P', long, default_value = "9000")] |
| 51 | invoke_port: u16, |
| 52 | |
| 53 | /// File to read the invoke payload from |
| 54 | #[arg(short = 'F', long, value_hint = ValueHint::FilePath)] |
| 55 | data_file: Option<PathBuf>, |
| 56 | |
| 57 | /// Invoke payload as a string |
| 58 | #[arg(short = 'A', long)] |
| 59 | data_ascii: Option<String>, |
| 60 | |
| 61 | /// Example payload from AWS Lambda Events |
| 62 | #[arg(short = 'E', long)] |
| 63 | data_example: Option<String>, |
| 64 | |
| 65 | /// Invoke the function already deployed on AWS Lambda |
| 66 | #[arg(short = 'R', long)] |
| 67 | remote: bool, |
| 68 | |
| 69 | #[command(flatten)] |
| 70 | remote_config: RemoteConfig, |
| 71 | |
| 72 | /// JSON string representing the client context for the function invocation |
| 73 | #[arg(long)] |
| 74 | client_context_ascii: Option<String>, |
| 75 | |
| 76 | /// Path to a file with the JSON representation of the client context for the function invocation |
| 77 | #[arg(long)] |
| 78 | client_context_file: Option<PathBuf>, |
| 79 | |
| 80 | /// Format to render the output (text, or json) |
| 81 | #[arg(short, long, default_value_t = OutputFormat::Text)] |
| 82 | output_format: OutputFormat, |
| 83 | |
| 84 | #[command(flatten)] |
| 85 | cognito: Option<CognitoIdentity>, |
| 86 | |
| 87 | /// Ignore data stored in the local cache |
| 88 | #[arg(long, default_value_t = false)] |
| 89 | skip_cache: bool, |
| 90 | |
| 91 | /// Name of the function to invoke |
| 92 | #[arg(default_value = DEFAULT_PACKAGE_FUNCTION)] |
| 93 | function_name: String, |
| 94 |
no outgoing calls
no test coverage detected