github.com/clerkinc/clerk-sdk-go@v1.49.1/clerk/proxy_checks.go (about) 1 package clerk 2 3 import "net/http" 4 5 type ProxyChecksService service 6 7 type ProxyCheck struct { 8 Object string `json:"object"` 9 ID string `json:"id"` 10 DomainID string `json:"domain_id"` 11 ProxyURL string `json:"proxy_url"` 12 Successful bool `json:"successful"` 13 LastRunAt *int64 `json:"last_run_at"` 14 CreatedAt int64 `json:"created_at"` 15 UpdatedAt int64 `json:"updated_at"` 16 } 17 18 type CreateProxyCheckParams struct { 19 DomainID string `json:"domain_id"` 20 ProxyURL string `json:"proxy_url"` 21 } 22 23 func (s *ProxyChecksService) Create(params CreateProxyCheckParams) (*ProxyCheck, error) { 24 req, _ := s.client.NewRequest(http.MethodPost, ProxyChecksURL, ¶ms) 25 var proxyCheck ProxyCheck 26 _, err := s.client.Do(req, &proxyCheck) 27 if err != nil { 28 return nil, err 29 } 30 return &proxyCheck, nil 31 }