Spaces:
Running
Running
Download test/model/user.go from miss-clean-spa/api: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/spaces/miss-clean-spa/api/resolve/main/test/model/user.go
- Command line
-
hf download hf://spaces/miss-clean-spa/api/test/model/user.go
-
curl -L -o user.go https://huggingface.co/spaces/miss-clean-spa/api/resolve/main/test/model/user.go
1.02 kB
| package model | |
| import "errors" | |
| type Order struct { | |
| ID string `json:"id" pact:"example=001"` | |
| FirstName string `json:"firstName" pact:"example=Sally"` | |
| LastName string `json:"lastName" pact:"example=McSmiley Face😀😍"` | |
| Email string `json:"email" pact:"example=sally@gmail.com"` | |
| Status string `json:"status" pact:"example=pending,regex=^(pending|cancel|complete)$"` | |
| } | |
| var OrdersData = []Order{ | |
| {ID: "001", FirstName: "anousone", LastName: "aworlakoumman", Email: "aworlakoumman@gmail.com", Status: "pending"}, | |
| {ID: "002", FirstName: "sone", LastName: "fs", Email: "sone@gmail.com", Status: "complete"}, | |
| {ID: "003", FirstName: "ya", LastName: "souliya", Email: "souliya@gmail.com", Status: "cancel"}, | |
| } | |
| var ( | |
| // ErrNotFound represents a resource not found (404) | |
| ErrNotFound = errors.New("not found") | |
| // ErrUnauthorized represents a Forbidden (403) | |
| ErrUnauthorized = errors.New("unauthorized") | |
| // ErrEmpty is returned when input string is empty | |
| ErrEmpty = errors.New("empty string") | |
| ) | |