Feat(Initial): Initial Go codebase
All checks were successful
Webhook-Everything/Webhook-Everything/pipeline/head This commit looks good

This commit is contained in:
2022-05-29 00:06:52 +08:00
parent f31bc0cd52
commit 53829a2788
27 changed files with 1489 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
package webhookeverything
import (
"net/http"
"time"
"github.com/google/uuid"
"gorm.io/gorm"
)
type WebhookRoute struct {
ID uuid.UUID `gorm:"primaryKey;type:uuid;default:uuid_generate_v4()"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
WebhookID string `gorm:"index,unique"`
TelegramShortCode string `gorm:"index"`
}
type StatusMessage struct {
Status string `json:"status"`
Message string `json:"message"`
}
func (statusMessage *StatusMessage) Render(w http.ResponseWriter, r *http.Request) error {
// Pre-processing before a response is marshalled and sent across the wire
return nil
}