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/message_outstanding_request.go from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/requests/message_outstanding_request.go
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway/api/pkg/requests/message_outstanding_request.go
-
curl -L -o message_outstanding_request.go https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/requests/message_outstanding_request.go
1.01 kB
| package requests | |
| import ( | |
| "strings" | |
| "time" | |
| "github.com/NdoleStudio/httpsms/pkg/entities" | |
| "github.com/NdoleStudio/httpsms/pkg/services" | |
| "github.com/google/uuid" | |
| ) | |
| // MessageOutstanding is the payload fetching outstanding entities.Message | |
| type MessageOutstanding struct { | |
| request | |
| MessageID string `json:"message_id" query:"message_id"` | |
| } | |
| // Sanitize sets defaults to MessageOutstanding | |
| func (input *MessageOutstanding) Sanitize() MessageOutstanding { | |
| input.MessageID = strings.TrimSpace(input.MessageID) | |
| return *input | |
| } | |
| // ToGetOutstandingParams converts MessageOutstanding into services.MessageGetOutstandingParams | |
| func (input *MessageOutstanding) ToGetOutstandingParams(source string, authCtx entities.AuthContext, timestamp time.Time) services.MessageGetOutstandingParams { | |
| return services.MessageGetOutstandingParams{ | |
| Source: source, | |
| PhoneNumbers: authCtx.PhoneNumbers, | |
| UserID: authCtx.ID, | |
| MessageID: uuid.MustParse(input.MessageID), | |
| Timestamp: timestamp, | |
| } | |
| } | |