diff options
| author | navewindre <boneyaard@gmail.com> | 2025-07-13 06:42:05 +0200 |
|---|---|---|
| committer | navewindre <boneyaard@gmail.com> | 2025-07-13 06:42:05 +0200 |
| commit | 02f14a9cb152561a5e44062aac79f3b700403b40 (patch) | |
| tree | 2db8ebda3b7f6f8777783aeb5c60018e6e1359d8 /home/.oh-my-zsh/plugins/localstack/localstack.plugin.zsh | |
| parent | cbbdeb2f6b40a102a829f0c47cff052937231f00 (diff) | |
omz
Diffstat (limited to 'home/.oh-my-zsh/plugins/localstack/localstack.plugin.zsh')
| -rw-r--r-- | home/.oh-my-zsh/plugins/localstack/localstack.plugin.zsh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/home/.oh-my-zsh/plugins/localstack/localstack.plugin.zsh b/home/.oh-my-zsh/plugins/localstack/localstack.plugin.zsh new file mode 100644 index 0000000..080b14a --- /dev/null +++ b/home/.oh-my-zsh/plugins/localstack/localstack.plugin.zsh @@ -0,0 +1,37 @@ +# CLI support for LOCALSTACK interaction +# +# See README.md for details +lsk() { + case $1 in + sqs-send) + shift + sqs-send "$@" + ;; + *) + echo "Command not found: $1" + return 1 + ;; + esac +} + +# Send SQS function +# +# This function sends a given message in sqs to a given queue, when used Localstack +# +# Use: +# sqs-send <queue> <message> +# +# Parameters +# <queue> A given queue +# <message> A content of message em json archive +# +# Example +# sqs-send user user.json +sqs-send(){ + if [ -z "$1" ]; then + echo "Use: sqs-send <queue> <payload>" + return 1 + fi + + curl -X POST "http://localhost:4566/000000000000/$1" -d "Action=SendMessage" -d "MessageBody=$(cat $2)" +}
\ No newline at end of file |
