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/discord_index_request.go from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 921 Bytes
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/requests/discord_index_request.go
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway/api/pkg/requests/discord_index_request.go
-
curl -L -o discord_index_request.go https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/main/api/pkg/requests/discord_index_request.go
921 Bytes
| package requests | |
| import ( | |
| "strings" | |
| "github.com/NdoleStudio/httpsms/pkg/repositories" | |
| ) | |
| // DiscordIndex is the payload for fetching entities.Discord of a user | |
| type DiscordIndex struct { | |
| request | |
| Skip string `json:"skip" query:"skip"` | |
| Query string `json:"query" query:"query"` | |
| Limit string `json:"limit" query:"limit"` | |
| } | |
| // Sanitize sets defaults to MessageOutstanding | |
| func (input *DiscordIndex) Sanitize() DiscordIndex { | |
| if strings.TrimSpace(input.Limit) == "" { | |
| input.Limit = "1" | |
| } | |
| input.Query = strings.TrimSpace(input.Query) | |
| input.Skip = strings.TrimSpace(input.Skip) | |
| if input.Skip == "" { | |
| input.Skip = "0" | |
| } | |
| return *input | |
| } | |
| // ToIndexParams converts HeartbeatIndex to repositories.IndexParams | |
| func (input *DiscordIndex) ToIndexParams() repositories.IndexParams { | |
| return repositories.IndexParams{ | |
| Skip: input.getInt(input.Skip), | |
| Query: input.Query, | |
| Limit: input.getInt(input.Limit), | |
| } | |
| } | |