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/entities/auth_context.go from red-kit/httpsms-gateway: direct link, hf CLI and curl.
- Browser
- Download file 435 Bytes
-
https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/6917738ca6db1603dee9e07994b4e42d5e1ae9b2/api/pkg/entities/auth_context.go
- Command line
-
hf download hf://spaces/red-kit/httpsms-gateway@6917738ca6db1603dee9e07994b4e42d5e1ae9b2/api/pkg/entities/auth_context.go
-
curl -L -o auth_context.go https://huggingface.co/spaces/red-kit/httpsms-gateway/resolve/6917738ca6db1603dee9e07994b4e42d5e1ae9b2/api/pkg/entities/auth_context.go
435 Bytes
| package entities | |
| import "github.com/google/uuid" | |
| // AuthContext is the user gotten from an auth request | |
| type AuthContext struct { | |
| ID UserID `json:"id"` | |
| PhoneAPIKeyID *uuid.UUID `json:"phone_api_key_id"` | |
| PhoneNumbers []string `json:"phone_numbers"` | |
| Email string `json:"email"` | |
| } | |
| // IsNoop checks if a user is empty | |
| func (user AuthContext) IsNoop() bool { | |
| return user.ID == "" || user.Email == "" | |
| } | |