Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5b3655c46e
|
||
|
|
7714a7fd3e
|
||
|
|
a34ff04776
|
||
|
|
c6ca9063a3
|
||
|
|
e28e5c6755 |
@@ -18,14 +18,14 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25.3'
|
||||
go-version: '1.25.4'
|
||||
|
||||
- name: Create version
|
||||
id: version
|
||||
run: |
|
||||
echo "Creating version"
|
||||
|
||||
VERSION="0.0.1"
|
||||
VERSION="0.0.3"
|
||||
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
|
||||
BRANCH_REF="${{ gitea.ref }}"
|
||||
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
|
||||
|
||||
@@ -11,13 +11,13 @@ jobs:
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v4
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25.3'
|
||||
go-version: '1.25.4'
|
||||
- name: Configure Git for SSH
|
||||
run: |
|
||||
git config --global url."git@git.kundeng.us:".insteadOf "https://git.kundeng.us/"
|
||||
go env -w GOPRIVATE=git.kundeng.us/phoenix/*
|
||||
git config --global url."git@${{ secrets.GIT_HOST_ROOT }}:".insteadOf "https://${{ secrets.GIT_HOST_ROOT }}/"
|
||||
go env -w GOPRIVATE=${{ secrets.GIT_HOST_ROOT }}/phoenix/*
|
||||
|
||||
- name: Download dependencies
|
||||
run: |
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.MYREPO_TOKEN }}" > ~/.ssh/swoosh_deploy_key
|
||||
chmod 600 ~/.ssh/swoosh_deploy_key
|
||||
ssh-keyscan ${{ vars.MY_HOST }} >> ~/.ssh/known_hosts
|
||||
ssh-keyscan ${{ secrets.MY_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
eval $(ssh-agent -s)
|
||||
ssh-add -v ~/.ssh/swoosh_deploy_key
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module git.kundeng.us/phoenix/swoosh
|
||||
|
||||
go 1.25.3
|
||||
go 1.25.4
|
||||
|
||||
require (
|
||||
git.kundeng.us/phoenix/textsender-models v0.0.7-5-9bc1743bd9-556
|
||||
git.kundeng.us/phoenix/textsender-models v0.0.10
|
||||
github.com/twilio/twilio-go v1.28.6
|
||||
)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
git.kundeng.us/phoenix/textsender-models v0.0.7-5-9bc1743bd9-556 h1:/tIswN4wEFioG++uo25iBY1jPNdHjhH07l8Vh4qUDQo=
|
||||
git.kundeng.us/phoenix/textsender-models v0.0.7-5-9bc1743bd9-556/go.mod h1:lx5MCnOgGgsdpwzrfi9uph5xmkeb6H8AuexUNGss2no=
|
||||
git.kundeng.us/phoenix/textsender-models v0.0.10 h1:0AMe/zm4Xte2BcuqqhRP7+42m+4To+rUnHkR2a9eXlI=
|
||||
git.kundeng.us/phoenix/textsender-models v0.0.10/go.mod h1:9iPDQJg1Tc6WMNoW5+f8YKmnosMwlWHJ++hmxNLDEe0=
|
||||
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"git.kundeng.us/phoenix/textsender-models/pkg/config"
|
||||
"git.kundeng.us/phoenix/textsender-models/pkg/contact"
|
||||
"git.kundeng.us/phoenix/textsender-models/pkg/message"
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/config"
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/contact"
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/message"
|
||||
"github.com/twilio/twilio-go"
|
||||
twilioApi "github.com/twilio/twilio-go/rest/api/v2010"
|
||||
|
||||
@@ -15,10 +15,13 @@ import (
|
||||
)
|
||||
|
||||
type MessageSender struct {
|
||||
Config config.TwiloConfig
|
||||
Config *config.TwiloConfig
|
||||
}
|
||||
|
||||
func (m *MessageSender) Send(msg message.Message, number contact.Contact, sendTime *time.Time) (*types.TwilioResult, error) {
|
||||
if m.Config == nil {
|
||||
return nil, fmt.Errorf("Config has not been initialized")
|
||||
}
|
||||
now := time.Now()
|
||||
client := twilio.NewRestClientWithParams(twilio.ClientParams{
|
||||
Username: m.Config.AccountSID,
|
||||
|
||||
Reference in New Issue
Block a user