Add functionality to upload images to S3
This change adds the following functionality:
- Add the motion detection image to a S3 bucket.
- Pass a presigned URL linking to the image in the JSON payload of the
MQTT event message.
- Add the possibility of customizing whether images are uploaded to a S3
bucket or not.
Change-Id: Id82401839e92dbc62f3bbd1e7e7f0adeeb5718a6
diff --git a/cmd/hichipbridge/env.sample b/cmd/hichipbridge/env.sample
index ae7017f..6b79851 100644
--- a/cmd/hichipbridge/env.sample
+++ b/cmd/hichipbridge/env.sample
@@ -12,3 +12,15 @@
HICHIPBRIDGE_MQTT_TOPIC=hichipbridge
# Token for the email notifications
HICHIPBRIDGE_EMAIL_TOKEN=superconfidentialtoken;)
+# Whether images should be saved in a S3 storage bucket (true/false)
+HICHIPBRIDGE_S3_ENABLED=false
+# The S3 storage endpoint
+HICHIPBRIDGE_S3_ENDPOINT=s3.example.com
+# The S3 access key ID
+HICHIPBRIDGE_S3_ACCESS_KEY=username
+# The S3 secret access key
+HICHIPBRIDGE_S3_SECRET_KEY=password
+# Whether S3 uses SSL (true/false)
+HICHIPBRIDGE_S3_USE_SSL=true
+# The S3 bucket name
+HICHIPBRIDGE_S3_BUCKET=hichipbridge