Spaces:
Paused
Paused
ML Intern deploy
Deploy httpSMS gateway to Hugging Face Spaces (Docker SDK): nginx :7860 -> Go API :8000, Nuxt SPA, Android APK, bootstrap-mode entrypoint
83a59ca Download api/pkg/requests/webhook_update_request.go from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 919 Bytes
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/83a59cae175e3c9a43b6f5d3f8749ca61b6b5072/api/pkg/requests/webhook_update_request.go
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway@83a59cae175e3c9a43b6f5d3f8749ca61b6b5072/api/pkg/requests/webhook_update_request.go
-
curl -L -o webhook_update_request.go https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/83a59cae175e3c9a43b6f5d3f8749ca61b6b5072/api/pkg/requests/webhook_update_request.go
919 Bytes
| package requests | |
| import ( | |
| "github.com/NdoleStudio/httpsms/pkg/entities" | |
| "github.com/NdoleStudio/httpsms/pkg/services" | |
| "github.com/google/uuid" | |
| ) | |
| // WebhookUpdate is the payload for updating an entities.Webhook | |
| type WebhookUpdate struct { | |
| WebhookStore | |
| WebhookID string `json:"webhookID" swaggerignore:"true"` // used internally for validation | |
| } | |
| // Sanitize sets defaults to WebhookUpdate | |
| func (input *WebhookUpdate) Sanitize() WebhookUpdate { | |
| input.WebhookStore.Sanitize() | |
| return *input | |
| } | |
| // ToUpdateParams converts WebhookUpdate to services.WebhookUpdateParams | |
| func (input *WebhookUpdate) ToUpdateParams(user entities.AuthContext) *services.WebhookUpdateParams { | |
| return &services.WebhookUpdateParams{ | |
| UserID: user.ID, | |
| WebhookID: uuid.MustParse(input.WebhookID), | |
| SigningKey: input.SigningKey, | |
| URL: input.URL, | |
| PhoneNumbers: input.PhoneNumbers, | |
| Events: input.Events, | |
| } | |
| } | |