A simple bot for the Bluegrass Developers guild .... Gilda. or should it be Guilda? 🤷♂️
Please feel free to submit PRs for any issues, errors, and/or additional functionality. Before doing so see the code of conduct.
- Start the local server:
fn start --log-level debug - Create Gilda app:
fn create app gilda - Deploy locally:
fn --verbose deploy --app gilda --all --local --no-bump - Create a new function:
fn init --runtime python --trigger http <function name> - Run your function:
echo -n '<args>' | fn invoke gilda <function name>
- Insomnia Core
- Terraform
- OCI CLI
- Slack Events API
-
Current events we are using
-
-
Start the local server
fn start --log-level debug -
See local apps
fn list apps -
Create environment variables:
- if you don't want to use Slack or OCI endpoints (everything stays local)
fn cf a gilda is_local Trueto deletefn cf a gilda is_local "" - to use OCI local config
fn cf a gilda local_oci_config Trueto deletefn cf a gilda local_oci_config "" fn cf a gilda random_channel_id <some_id>fn cf a gilda slack_bot_token <some token>fn cf a gilda compartment_id <oracle OCID>fn cf a gilda web_auth_token auth_1234fn cf a gilda local_oci_config True
- if you don't want to use Slack or OCI endpoints (everything stays local)
-
Deploy locally:
fn --verbose deploy --app gilda --all --local --no-bump -
List functions:
fn list functions gilda -
Grab local url:
fn inspect function gilda events -
List http triggers:
fn list triggers gilda
- create context
fn create context gilda --provider oracle --registry yyz.ocir.io/<id>/gilda --api-url https://functions.ca-toronto-1.oraclecloud.com fn use context gildafn update context oracle.compartment-idfn --verbose deploy --app Gilda --all
use the fn command echo -n '{"name":"Bob"}' | fn invoke gilda events
or simply good old fashioned curl, like your mother taught you:
curl -X "POST" -H "Content-Type: application/json" -d '{ "type": "url_verification","token": "JRoGaO6sIgohYqywBlT3Q0vz","challenge": "wnxwuwy1LjvmMB7HWTV3M2KRiYDhQgeLqlxhT2064MIvVFtOYTN1", "event": {"type": "member_joined_channel", "channel":"<some_id>", "user": "<some_url>"} }' http://localhost:8080/t/gilda/events
curl -X "POST" -H "Content-Type: application/json" -d '{"token": "auth_1234"}' http://localhost:8080/t/gilda/learning
Or use Insomnia Core and import the insomnia_export.json