diff --git a/components/payments/Earthfile b/components/payments/Earthfile index 56939d6a16..d776a9a25d 100644 --- a/components/payments/Earthfile +++ b/components/payments/Earthfile @@ -17,9 +17,23 @@ sources: COPY main.go . SAVE ARTIFACT /src +compile-configs: + FROM core+builder-image + COPY (+sources/*) /src + WORKDIR /src/components/payments/internal/connectors/plugins/public + FOR c IN $(ls -d */ | sed 's#/##') + RUN echo "{\"$c\":" >> raw_configs.json + RUN cat /src/components/payments/internal/connectors/plugins/public/$c/config.json >> raw_configs.json + RUN echo "}" >> raw_configs.json + END + RUN cat raw_configs.json + RUN jq --slurp 'add' raw_configs.json > configs.json + SAVE ARTIFACT /src/components/payments/internal/connectors/plugins/public/configs.json /configs.json + compile-plugins: FROM core+builder-image COPY (+sources/*) /src + COPY (+compile-configs/configs.json) /src/components/payments/internal/connectors/plugins/configs.json WORKDIR /src/components/payments/internal/connectors/plugins/public FOR c IN $(ls -d */ | sed 's#/##') WORKDIR /src/components/payments/internal/connectors/plugins/public/$c/cmd @@ -31,6 +45,7 @@ compile-plugins: compile: FROM core+builder-image COPY (+sources/*) /src + COPY (+compile-configs/configs.json) /src/components/payments/internal/connectors/plugins/configs.json WORKDIR /src/components/payments ARG VERSION=latest DO --pass-args core+GO_COMPILE --VERSION=$VERSION diff --git a/components/payments/internal/connectors/plugins/configs.json b/components/payments/internal/connectors/plugins/configs.json index 2d96e68618..e69de29bb2 100644 --- a/components/payments/internal/connectors/plugins/configs.json +++ b/components/payments/internal/connectors/plugins/configs.json @@ -1,114 +0,0 @@ -{ - "bankingcircle": { - "username": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "password": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "endpoint": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "authorizationEndpoint": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "userCertificate": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "userCertificateKey": { - "dataType": "string", - "required": true, - "defaultValue": "" - } - }, - "currencycloud": { - "loginID": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "apiKey": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "endpoint": { - "dataType": "string", - "required": true, - "defaultValue": "" - } - }, - "mangopay": { - "clientID": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "apiKey": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "endpoint": { - "dataType": "string", - "required": true, - "defaultValue": "" - } - }, - "modulr": { - "apiKey": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "apiSecret": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "endpoint": { - "dataType": "string", - "required": true, - "defaultValue": "" - } - }, - "moneycorp": { - "clientID": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "apiKey": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "endpoint": { - "dataType": "string", - "required": true, - "defaultValue": "" - } - }, - "wise": { - "apiKey": { - "dataType": "string", - "required": true, - "defaultValue": "" - }, - "webhookPublicKey": { - "dataType": "string", - "required": true, - "defaultValue": "" - } - } -} \ No newline at end of file diff --git a/components/payments/internal/connectors/plugins/public/bankingcircle/config.json b/components/payments/internal/connectors/plugins/public/bankingcircle/config.json new file mode 100644 index 0000000000..8dbaa54095 --- /dev/null +++ b/components/payments/internal/connectors/plugins/public/bankingcircle/config.json @@ -0,0 +1,32 @@ +{ + "username": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "password": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "endpoint": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "authorizationEndpoint": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "userCertificate": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "userCertificateKey": { + "dataType": "string", + "required": true, + "defaultValue": "" + } +} \ No newline at end of file diff --git a/components/payments/internal/connectors/plugins/public/currencycloud/config.json b/components/payments/internal/connectors/plugins/public/currencycloud/config.json new file mode 100644 index 0000000000..ba46c4ee57 --- /dev/null +++ b/components/payments/internal/connectors/plugins/public/currencycloud/config.json @@ -0,0 +1,17 @@ +{ + "loginID": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "apiKey": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "endpoint": { + "dataType": "string", + "required": true, + "defaultValue": "" + } +} \ No newline at end of file diff --git a/components/payments/internal/connectors/plugins/public/mangopay/config.json b/components/payments/internal/connectors/plugins/public/mangopay/config.json new file mode 100644 index 0000000000..59bacea9dc --- /dev/null +++ b/components/payments/internal/connectors/plugins/public/mangopay/config.json @@ -0,0 +1,17 @@ +{ + "clientID": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "apiKey": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "endpoint": { + "dataType": "string", + "required": true, + "defaultValue": "" + } +} \ No newline at end of file diff --git a/components/payments/internal/connectors/plugins/public/modulr/config.json b/components/payments/internal/connectors/plugins/public/modulr/config.json new file mode 100644 index 0000000000..c2b6ee2d03 --- /dev/null +++ b/components/payments/internal/connectors/plugins/public/modulr/config.json @@ -0,0 +1,17 @@ +{ + "apiKey": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "apiSecret": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "endpoint": { + "dataType": "string", + "required": true, + "defaultValue": "" + } +} \ No newline at end of file diff --git a/components/payments/internal/connectors/plugins/public/moneycorp/config.json b/components/payments/internal/connectors/plugins/public/moneycorp/config.json new file mode 100644 index 0000000000..59bacea9dc --- /dev/null +++ b/components/payments/internal/connectors/plugins/public/moneycorp/config.json @@ -0,0 +1,17 @@ +{ + "clientID": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "apiKey": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "endpoint": { + "dataType": "string", + "required": true, + "defaultValue": "" + } +} \ No newline at end of file diff --git a/components/payments/internal/connectors/plugins/public/wise/config.json b/components/payments/internal/connectors/plugins/public/wise/config.json new file mode 100644 index 0000000000..0c049a96e5 --- /dev/null +++ b/components/payments/internal/connectors/plugins/public/wise/config.json @@ -0,0 +1,12 @@ +{ + "apiKey": { + "dataType": "string", + "required": true, + "defaultValue": "" + }, + "webhookPublicKey": { + "dataType": "string", + "required": true, + "defaultValue": "" + } +} \ No newline at end of file