You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
707 B
28 lines
707 B
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
|
|
}
|