Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c857772953 | ||
|
|
ec371ec86b | ||
|
|
f4e2336771 | ||
|
|
6f9e112b72 | ||
|
|
7c21f243ed | ||
|
|
7db9914bc4 | ||
|
|
564a3936e3 | ||
|
|
44848fdffd |
@@ -18,14 +18,14 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25.4'
|
||||
go-version: '1.26.1'
|
||||
|
||||
- name: Create version
|
||||
id: version
|
||||
run: |
|
||||
echo "Creating version"
|
||||
|
||||
VERSION="0.0.14"
|
||||
VERSION="0.2.0"
|
||||
PROJECT_COMMIT_HASH=$(git rev-parse HEAD | cut -c 1-10)
|
||||
BRANCH_REF="${{ gitea.ref }}"
|
||||
BRANCH_NAME=$(echo "$BRANCH_REF" | cut -d '/' -f 3)
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: '1.25.4'
|
||||
go-version: '1.26.1'
|
||||
- name: Configure Git for SSH
|
||||
run: |
|
||||
git config --global url."git@${{ secrets.GIT_HOST_ROOT }}:".insteadOf "https://${{ secrets.GIT_HOST_ROOT }}/"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
module git.kundeng.us/phoenix/textsender-models
|
||||
|
||||
go 1.25.4
|
||||
go 1.26.1
|
||||
|
||||
require (
|
||||
github.com/golang-jwt/jwt/v5 v5.3.0
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1
|
||||
github.com/google/uuid v1.6.0
|
||||
)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
github.com/golang-jwt/jwt/v5 v5.3.0 h1:pv4AsKCKKZuqlgs5sUmn4x8UlGa0kEVt/puTpKx9vvo=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.0/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1 h1:kYf81DTWFe7t+1VvL7eS+jKFVWaUnK9cB1qbwn63YCY=
|
||||
github.com/golang-jwt/jwt/v5 v5.3.1/go.mod h1:fxCRLWMO43lRc8nhHWY6LGqRcf+1gQWArsqaEUEa5bE=
|
||||
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
|
||||
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package config
|
||||
package auxiliary
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
@@ -0,0 +1,18 @@
|
||||
package event
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type MessageEventResponse struct {
|
||||
Id uuid.UUID `json:"id,omitempty"`
|
||||
ScheduledMessageEventId uuid.UUID `json:"scheduled_message_event_id,omitempty"`
|
||||
Response map[string]any `json:"response"`
|
||||
UserId uuid.UUID `json:"user_id,omitempty"`
|
||||
ContactId *uuid.UUID `json:"contact_id,omitempty"`
|
||||
MessageId *uuid.UUID `json:"message_id,omitempty"`
|
||||
Status string `json:"status"`
|
||||
Sent time.Time `json:"sent"`
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package event
|
||||
|
||||
const (
|
||||
Message_Event_Response_Status_Instant = "INSTANT"
|
||||
Message_Event_Response_Status_Scheduled = "SCHEDULED"
|
||||
)
|
||||
@@ -1,25 +0,0 @@
|
||||
package message
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"git.kundeng.us/phoenix/textsender-models/tx0/types"
|
||||
)
|
||||
|
||||
type MessageEventResponse struct {
|
||||
Id uuid.UUID `json:"id,omitempty"`
|
||||
ScheduledMessageEventId uuid.UUID `json:"scheduled_message_event_id,omitempty"`
|
||||
Response types.JSONB `json:"response"`
|
||||
UserId uuid.UUID `json:"user_id,omitempty"`
|
||||
ContactId *uuid.UUID `json:"contact_id,omitempty"`
|
||||
MessageId *uuid.UUID `json:"message_id,omitempty"`
|
||||
Status string `json:"status"`
|
||||
Sent time.Time `json:"sent"`
|
||||
}
|
||||
|
||||
const (
|
||||
Message_Event_Response_Status_Instant = "INSTANT"
|
||||
Message_Event_Response_Status_Scheduled = "SCHEDULED"
|
||||
)
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type ScheduledMessageEvent struct {
|
||||
Id uuid.UUID `json:"id"`
|
||||
RecipientId uuid.UUID `json:"recipient_id"`
|
||||
ContactId uuid.UUID `json:"contact_id"`
|
||||
MessageId uuid.UUID `json:"message_id"`
|
||||
ScheduledMessageId uuid.UUID `json:"scheduled_message_id"`
|
||||
Created time.Time `json:"created"`
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// NOTE: Might end up removing this
|
||||
type JSONB json.RawMessage
|
||||
|
||||
// Scan implements sql.Scanner
|
||||
|
||||
@@ -7,8 +7,10 @@ import (
|
||||
)
|
||||
|
||||
type ServiceUser struct {
|
||||
Id uuid.UUID `json:"id"`
|
||||
Username string `json:"username,omitempty"`
|
||||
Passphrase string `json:"passphrase,omitempty"`
|
||||
Created time.Time `json:"date_created"`
|
||||
Id uuid.UUID `json:"id"`
|
||||
// TODO: Remove the omitempty tags at a later point
|
||||
Username string `json:"username,omitempty"`
|
||||
Passphrase string `json:"passphrase,omitempty"`
|
||||
Created time.Time `json:"created"`
|
||||
LastLogin *time.Time `json:"last_login,omitempty"`
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,6 +13,6 @@ type User struct {
|
||||
Password string `json:"password"`
|
||||
Firstname *string `json:"first_name,omitempty"`
|
||||
Lastname *string `json:"last_name,omitempty"`
|
||||
Created time.Time `json:"date_created"`
|
||||
Created time.Time `json:"created"`
|
||||
LastLogin *time.Time `json:"last_login,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user