diff --git a/agent.go b/agent.go index f8e6f51..d1eb1de 100644 --- a/agent.go +++ b/agent.go @@ -97,7 +97,7 @@ func (c *Client) GetAgents() (*Agents, error) { } // GetAgent - Get agent -func (c *Client) GetAgent(id int) (*Agent, error) { +func (c *Client) GetAgent(id int64) (*Agent, error) { resp, err := c.get(fmt.Sprintf("/agents/%d", id)) if err != nil { return nil, err diff --git a/agent_agent.go b/agent_agent.go index 6d1ca16..263b98f 100644 --- a/agent_agent.go +++ b/agent_agent.go @@ -89,7 +89,7 @@ func (t *AgentAgent) AddAlertRule(id int64) { } // GetAgentAgent - Get an agent to agent test -func (c *Client) GetAgentAgent(id int) (*AgentAgent, error) { +func (c *Client) GetAgentAgent(id int64) (*AgentAgent, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &AgentAgent{}, err @@ -118,7 +118,7 @@ func (c Client) CreateAgentAgent(t AgentAgent) (*AgentAgent, error) { } //DeleteAgentAgent - delete agent to agent test -func (c *Client) DeleteAgentAgent(id int) error { +func (c *Client) DeleteAgentAgent(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/agent-to-agent/%d/delete", id), nil, nil) if err != nil { return err @@ -130,7 +130,7 @@ func (c *Client) DeleteAgentAgent(id int) error { } // UpdateAgentAgent - update agent to agent test -func (c *Client) UpdateAgentAgent(id int, t AgentAgent) (*AgentAgent, error) { +func (c *Client) UpdateAgentAgent(id int64, t AgentAgent) (*AgentAgent, error) { resp, err := c.post(fmt.Sprintf("/tests/agent-to-agent/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/agent_agent_test.go b/agent_agent_test.go index db3bc0d..6318bc0 100644 --- a/agent_agent_test.go +++ b/agent_agent_test.go @@ -106,7 +106,7 @@ func TestClient_DeleteAgentAgent(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteAgentAgent(id) if err != nil { diff --git a/agent_server.go b/agent_server.go index 74eceb4..11c89b1 100644 --- a/agent_server.go +++ b/agent_server.go @@ -106,7 +106,7 @@ func (t *AgentServer) AddAlertRule(id int64) { } // GetAgentServer - Get agent to server test -func (c *Client) GetAgentServer(id int) (*AgentServer, error) { +func (c *Client) GetAgentServer(id int64) (*AgentServer, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &AgentServer{}, err @@ -145,7 +145,7 @@ func (c Client) CreateAgentServer(t AgentServer) (*AgentServer, error) { } // DeleteAgentServer - Delete agent to server test -func (c *Client) DeleteAgentServer(id int) error { +func (c *Client) DeleteAgentServer(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/agent-to-server/%d/delete", id), nil, nil) if err != nil { return err @@ -157,7 +157,7 @@ func (c *Client) DeleteAgentServer(id int) error { } // UpdateAgentServer - Update agent to server test -func (c *Client) UpdateAgentServer(id int, t AgentServer) (*AgentServer, error) { +func (c *Client) UpdateAgentServer(id int64, t AgentServer) (*AgentServer, error) { resp, err := c.post(fmt.Sprintf("/tests/agent-to-server/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/agent_server_test.go b/agent_server_test.go index d4e9c2d..f7a002f 100644 --- a/agent_server_test.go +++ b/agent_server_test.go @@ -102,7 +102,7 @@ func TestClient_DeleteAgentServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteAgentServer(id) if err != nil { diff --git a/alert_test.go b/alert_test.go index d4d6ccd..02781c5 100644 --- a/alert_test.go +++ b/alert_test.go @@ -49,7 +49,7 @@ func TestClient_DeleteAlertRule(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteAlertRule(id) if err != nil { @@ -66,7 +66,7 @@ func TestClient_UpdateAlertRule(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) u := AlertRule{RoundsViolatingOutOf: Int(2)} res, err := client.UpdateAlertRule(id, u) if err != nil { diff --git a/alerts.go b/alerts.go index 1c39a7b..71d8381 100644 --- a/alerts.go +++ b/alerts.go @@ -134,7 +134,7 @@ func (c Client) GetAlertRules() (*AlertRules, error) { } // GetAlertRule - Get single alert rule by ID -func (c *Client) GetAlertRule(id int) (*AlertRule, error) { +func (c *Client) GetAlertRule(id int64) (*AlertRule, error) { log.Printf("[INFO] Getting Alert Rule %v", id) resp, err := c.get(fmt.Sprintf("/alert-rules/%d", id)) if err != nil { @@ -151,7 +151,7 @@ func (c *Client) GetAlertRule(id int) (*AlertRule, error) { } //DeleteAlertRule - delete alert rule -func (c Client) DeleteAlertRule(id int) error { +func (c Client) DeleteAlertRule(id int64) error { resp, err := c.post(fmt.Sprintf("/alert-rules/%d/delete", id), nil, nil) if err != nil { return err @@ -163,7 +163,7 @@ func (c Client) DeleteAlertRule(id int) error { } //UpdateAlertRule - update alert rule -func (c Client) UpdateAlertRule(id int, a AlertRule) (*AlertRule, error) { +func (c Client) UpdateAlertRule(id int64, a AlertRule) (*AlertRule, error) { resp, err := c.post(fmt.Sprintf("/alert-rules/%d/update", id), a, nil) if err != nil { return nil, err diff --git a/bgp.go b/bgp.go index 7bfe077..c143965 100644 --- a/bgp.go +++ b/bgp.go @@ -68,7 +68,7 @@ func (t *BGP) AddAlertRule(id int64) { } // GetBGP - get bgp test -func (c *Client) GetBGP(id int) (*BGP, error) { +func (c *Client) GetBGP(id int64) (*BGP, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &BGP{}, err @@ -97,7 +97,7 @@ func (c Client) CreateBGP(t BGP) (*BGP, error) { } //DeleteBGP - delete bgp test -func (c *Client) DeleteBGP(id int) error { +func (c *Client) DeleteBGP(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/bgp/%d/delete", id), nil, nil) if err != nil { return err @@ -109,7 +109,7 @@ func (c *Client) DeleteBGP(id int) error { } //UpdateBGP - - Update bgp trace test -func (c *Client) UpdateBGP(id int, t BGP) (*BGP, error) { +func (c *Client) UpdateBGP(id int64, t BGP) (*BGP, error) { resp, err := c.post(fmt.Sprintf("/tests/bgp/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/bgp_test.go b/bgp_test.go index eb5e432..d5837b8 100644 --- a/bgp_test.go +++ b/bgp_test.go @@ -155,7 +155,7 @@ func TestClient_DeleteBGP(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteBGP(id) if err != nil { @@ -172,7 +172,7 @@ func TestClient_UpdateBGP(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) dnsS := BGP{} res, err := client.UpdateBGP(id, dnsS) if err != nil { diff --git a/dns_dnssec.go b/dns_dnssec.go index 664bca9..1343296 100644 --- a/dns_dnssec.go +++ b/dns_dnssec.go @@ -73,7 +73,7 @@ func (t *DNSSec) AddAlertRule(id int64) { } // GetDNSSec - get DNSSec test -func (c *Client) GetDNSSec(id int) (*DNSSec, error) { +func (c *Client) GetDNSSec(id int64) (*DNSSec, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &DNSSec{}, err @@ -102,7 +102,7 @@ func (c Client) CreateDNSSec(t DNSSec) (*DNSSec, error) { } // DeleteDNSSec - delete DNSSec test -func (c *Client) DeleteDNSSec(id int) error { +func (c *Client) DeleteDNSSec(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/dns-dnssec/%d/delete", id), nil, nil) if err != nil { return err @@ -114,7 +114,7 @@ func (c *Client) DeleteDNSSec(id int) error { } // UpdateDNSSec - update DNSSec test -func (c *Client) UpdateDNSSec(id int, t DNSSec) (*DNSSec, error) { +func (c *Client) UpdateDNSSec(id int64, t DNSSec) (*DNSSec, error) { resp, err := c.post(fmt.Sprintf("/tests/dns-dnssec/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/dns_dnssec_test.go b/dns_dnssec_test.go index 45d938a..0f0295e 100644 --- a/dns_dnssec_test.go +++ b/dns_dnssec_test.go @@ -172,7 +172,7 @@ func TestClient_DeleteDNSSec(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteDNSSec(id) if err != nil { @@ -196,7 +196,7 @@ func TestClient_UpdateDNSSec(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) dnsp := DNSSec{Domain: String("webex.com")} res, err := client.UpdateDNSSec(id, dnsp) if err != nil { diff --git a/dns_server.go b/dns_server.go index 899620f..ed9af38 100644 --- a/dns_server.go +++ b/dns_server.go @@ -92,7 +92,7 @@ func (t *DNSServer) AddAlertRule(id int64) { } //GetDNSServer - get dns server test -func (c *Client) GetDNSServer(id int) (*DNSServer, error) { +func (c *Client) GetDNSServer(id int64) (*DNSServer, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &DNSServer{}, err @@ -121,7 +121,7 @@ func (c Client) CreateDNSServer(t DNSServer) (*DNSServer, error) { } //DeleteDNSServer - delete dns server test -func (c *Client) DeleteDNSServer(id int) error { +func (c *Client) DeleteDNSServer(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/dns-server/%d/delete", id), nil, nil) if err != nil { return err @@ -133,7 +133,7 @@ func (c *Client) DeleteDNSServer(id int) error { } //UpdateDNSServer - - Update dns server test -func (c *Client) UpdateDNSServer(id int, t DNSServer) (*DNSServer, error) { +func (c *Client) UpdateDNSServer(id int64, t DNSServer) (*DNSServer, error) { resp, err := c.post(fmt.Sprintf("/tests/dns-server/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/dns_server_test.go b/dns_server_test.go index a2100ce..1766b4f 100644 --- a/dns_server_test.go +++ b/dns_server_test.go @@ -236,7 +236,7 @@ func TestClient_DeleteDNSServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteDNSServer(id) if err != nil { @@ -253,7 +253,7 @@ func TestClient_UpdateDNSServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) dnsS := DNSServer{Domain: String("webex.com")} res, err := client.UpdateDNSServer(id, dnsS) if err != nil { diff --git a/dns_trace.go b/dns_trace.go index f3954df..19ee0e3 100644 --- a/dns_trace.go +++ b/dns_trace.go @@ -74,7 +74,7 @@ func (t *DNSTrace) AddAlertRule(id int64) { } // GetDNSTrace - get dns trace test -func (c *Client) GetDNSTrace(id int) (*DNSTrace, error) { +func (c *Client) GetDNSTrace(id int64) (*DNSTrace, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &DNSTrace{}, err @@ -103,7 +103,7 @@ func (c Client) CreateDNSTrace(t DNSTrace) (*DNSTrace, error) { } //DeleteDNSTrace - delete dns trace test -func (c *Client) DeleteDNSTrace(id int) error { +func (c *Client) DeleteDNSTrace(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/dns-trace/%d/delete", id), nil, nil) if err != nil { return err @@ -115,7 +115,7 @@ func (c *Client) DeleteDNSTrace(id int) error { } //UpdateDNSTrace - update dns trace test -func (c *Client) UpdateDNSTrace(id int, t DNSTrace) (*DNSTrace, error) { +func (c *Client) UpdateDNSTrace(id int64, t DNSTrace) (*DNSTrace, error) { resp, err := c.post(fmt.Sprintf("/tests/dns-trace/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/dns_trace_test.go b/dns_trace_test.go index 3484229..fbd878c 100644 --- a/dns_trace_test.go +++ b/dns_trace_test.go @@ -179,7 +179,7 @@ func TestClient_DeleteDNSTrace(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteDNSTrace(id) if err != nil { @@ -203,7 +203,7 @@ func TestClient_UpdateDNSTrace(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) dnsS := DNSTrace{Domain: String("webex.com")} res, err := client.UpdateDNSTrace(id, dnsS) if err != nil { diff --git a/ftp_server.go b/ftp_server.go index 9aa9e5e..465d5c0 100644 --- a/ftp_server.go +++ b/ftp_server.go @@ -88,7 +88,7 @@ func (t *FTPServer) AddAlertRule(id int64) { } // GetFTPServer - get ftp server test -func (c *Client) GetFTPServer(id int) (*FTPServer, error) { +func (c *Client) GetFTPServer(id int64) (*FTPServer, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &FTPServer{}, err @@ -117,7 +117,7 @@ func (c Client) CreateFTPServer(t FTPServer) (*FTPServer, error) { } // DeleteFTPServer - delete ftp server test -func (c *Client) DeleteFTPServer(id int) error { +func (c *Client) DeleteFTPServer(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/ftp-server/%d/delete", id), nil, nil) if err != nil { return err @@ -129,7 +129,7 @@ func (c *Client) DeleteFTPServer(id int) error { } // UpdateFTPServer - - Update ftp server test -func (c *Client) UpdateFTPServer(id int, t FTPServer) (*FTPServer, error) { +func (c *Client) UpdateFTPServer(id int64, t FTPServer) (*FTPServer, error) { resp, err := c.post(fmt.Sprintf("/tests/ftp-server/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/ftp_server_test.go b/ftp_server_test.go index 1bf66ac..ba9a43b 100644 --- a/ftp_server_test.go +++ b/ftp_server_test.go @@ -179,7 +179,7 @@ func TestClient_DeleteFTPServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteFTPServer(id) if err != nil { @@ -203,7 +203,7 @@ func TestClient_UpdateFTPServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) ftpServer := FTPServer{URL: String("webex.com")} res, err := client.UpdateFTPServer(id, ftpServer) if err != nil { diff --git a/group_label.go b/group_label.go index 12b09ed..00d2c11 100644 --- a/group_label.go +++ b/group_label.go @@ -76,7 +76,7 @@ func (c *Client) GetGroupLabelsByType(t string) (*GroupLabels, error) { } // GetGroupLabel - Get single group label by ID -func (c *Client) GetGroupLabel(id int) (*GroupLabel, error) { +func (c *Client) GetGroupLabel(id int64) (*GroupLabel, error) { resp, err := c.get(fmt.Sprintf("/groups/%d", id)) if err != nil { return &GroupLabel{}, err @@ -114,7 +114,7 @@ func (c Client) CreateGroupLabel(a GroupLabel) (*GroupLabel, error) { } //DeleteGroupLabel - delete label -func (c Client) DeleteGroupLabel(id int) error { +func (c Client) DeleteGroupLabel(id int64) error { resp, err := c.post(fmt.Sprintf("/groups/%d/delete", id), nil, nil) if err != nil { return err @@ -126,7 +126,7 @@ func (c Client) DeleteGroupLabel(id int) error { } //UpdateGroupLabel - update label -func (c Client) UpdateGroupLabel(id int, a GroupLabel) (*GroupLabels, error) { +func (c Client) UpdateGroupLabel(id int64, a GroupLabel) (*GroupLabels, error) { resp, err := c.post(fmt.Sprintf("/groups/%d/update", id), a, nil) if err != nil { return nil, err diff --git a/group_label_test.go b/group_label_test.go index d89569c..fdd7287 100644 --- a/group_label_test.go +++ b/group_label_test.go @@ -134,7 +134,7 @@ func TestClient_DeleteGroupLabel(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteGroupLabel(id) if err != nil { @@ -152,7 +152,7 @@ func TestClient_UpdateGroupLabel(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 222 + id := int64(222) u := GroupLabel{Type: String("tests")} res, err := client.UpdateGroupLabel(id, u) if err != nil { diff --git a/http_server.go b/http_server.go index 33de460..fbcf746 100644 --- a/http_server.go +++ b/http_server.go @@ -109,7 +109,7 @@ func (t *HTTPServer) AddAgent(id int64) { } //GetHTTPServer - Get an HTTP Server test -func (c *Client) GetHTTPServer(id int) (*HTTPServer, error) { +func (c *Client) GetHTTPServer(id int64) (*HTTPServer, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &HTTPServer{}, err @@ -138,7 +138,7 @@ func (c Client) CreateHTTPServer(t HTTPServer) (*HTTPServer, error) { } //DeleteHTTPServer - delete an http server -func (c *Client) DeleteHTTPServer(id int) error { +func (c *Client) DeleteHTTPServer(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/http-server/%d/delete", id), nil, nil) if err != nil { return err @@ -150,7 +150,7 @@ func (c *Client) DeleteHTTPServer(id int) error { } //UpdateHTTPServer - Update an http server test -func (c *Client) UpdateHTTPServer(id int, t HTTPServer) (*HTTPServer, error) { +func (c *Client) UpdateHTTPServer(id int64, t HTTPServer) (*HTTPServer, error) { resp, err := c.post(fmt.Sprintf("/tests/http-server/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/http_server_test.go b/http_server_test.go index ea40808..9ac3a93 100644 --- a/http_server_test.go +++ b/http_server_test.go @@ -228,7 +228,7 @@ func TestClient_DeleteHTTPServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteHTTPServer(id) if err != nil { @@ -245,7 +245,7 @@ func TestClient_UpdateHTTPServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) httpS := HTTPServer{URL: String("https://test.com")} res, err := client.UpdateHTTPServer(id, httpS) if err != nil { diff --git a/page_load.go b/page_load.go index 322f528..c429c1d 100644 --- a/page_load.go +++ b/page_load.go @@ -96,7 +96,7 @@ func (t *PageLoad) AddAgent(id int64) { } //GetPageLoad - get page load test -func (c *Client) GetPageLoad(id int) (*PageLoad, error) { +func (c *Client) GetPageLoad(id int64) (*PageLoad, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &PageLoad{}, err @@ -125,7 +125,7 @@ func (c Client) CreatePageLoad(t PageLoad) (*PageLoad, error) { } // DeletePageLoad - Delete page load tes -func (c *Client) DeletePageLoad(id int) error { +func (c *Client) DeletePageLoad(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/page-load/%d/delete", id), nil, nil) if err != nil { return err @@ -137,7 +137,7 @@ func (c *Client) DeletePageLoad(id int) error { } //UpdatePageLoad - Upload page load -func (c *Client) UpdatePageLoad(id int, t PageLoad) (*PageLoad, error) { +func (c *Client) UpdatePageLoad(id int64, t PageLoad) (*PageLoad, error) { resp, err := c.post(fmt.Sprintf("/tests/page-load/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/page_load_test.go b/page_load_test.go index 12812b3..f354a06 100644 --- a/page_load_test.go +++ b/page_load_test.go @@ -227,7 +227,7 @@ func TestClient_DeletePageLoad(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeletePageLoad(id) if err != nil { @@ -245,7 +245,7 @@ func TestClient_UpdatePageLoad(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) httpS := PageLoad{URL: String("https://test.com")} res, err := client.UpdatePageLoad(id, httpS) if err != nil { diff --git a/role.go b/role.go index 0fb9e3b..298c403 100644 --- a/role.go +++ b/role.go @@ -94,7 +94,7 @@ func (c *Client) GetRoles() (*[]AccountGroupRole, error) { } // GetRole - get role -func (c *Client) GetRole(id int) (*AccountGroupRole, error) { +func (c *Client) GetRole(id int64) (*AccountGroupRole, error) { resp, err := c.get(fmt.Sprintf("/roles/%d", id)) if err != nil { return nil, err @@ -108,7 +108,7 @@ func (c *Client) GetRole(id int) (*AccountGroupRole, error) { } // DeleteRole - delete role -func (c *Client) DeleteRole(id int) error { +func (c *Client) DeleteRole(id int64) error { resp, err := c.post(fmt.Sprintf("/roles/%d/delete", id), nil, nil) if err != nil { return err @@ -120,7 +120,7 @@ func (c *Client) DeleteRole(id int) error { } // UpdateRole - update role -func (c *Client) UpdateRole(id int, role AccountGroupRole) (*AccountGroupRole, error) { +func (c *Client) UpdateRole(id int64, role AccountGroupRole) (*AccountGroupRole, error) { resp, err := c.post(fmt.Sprintf("/roles/%d/update", id), role, nil) if err != nil { return nil, err diff --git a/sip_server.go b/sip_server.go index cd8febc..d64a522 100644 --- a/sip_server.go +++ b/sip_server.go @@ -98,7 +98,7 @@ func (t *SIPServer) AddAlertRule(id int64) { } // GetSIPServer - get sip server test -func (c *Client) GetSIPServer(id int) (*SIPServer, error) { +func (c *Client) GetSIPServer(id int64) (*SIPServer, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &SIPServer{}, err @@ -162,7 +162,7 @@ func (c Client) CreateSIPServer(t SIPServer) (*SIPServer, error) { } //DeleteSIPServer - delete sip server test -func (c *Client) DeleteSIPServer(id int) error { +func (c *Client) DeleteSIPServer(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/sip-server/%d/delete", id), nil, nil) if err != nil { return err @@ -174,7 +174,7 @@ func (c *Client) DeleteSIPServer(id int) error { } //UpdateSIPServer - - update sip server test -func (c *Client) UpdateSIPServer(id int, t SIPServer) (*SIPServer, error) { +func (c *Client) UpdateSIPServer(id int64, t SIPServer) (*SIPServer, error) { resp, err := c.post(fmt.Sprintf("/tests/sip-server/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/sip_server_test.go b/sip_server_test.go index d2d79e1..e7ef674 100644 --- a/sip_server_test.go +++ b/sip_server_test.go @@ -173,7 +173,7 @@ func TestClient_DeleteSIPServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteSIPServer(id) if err != nil { @@ -190,7 +190,7 @@ func TestClient_UpdateSIPServer(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) sipS := SIPServer{ TestName: String("test1"), } diff --git a/tests.go b/tests.go index 53d17e8..b1dcfa9 100644 --- a/tests.go +++ b/tests.go @@ -72,7 +72,7 @@ func (c *Client) GetTests() (*[]GenericTest, error) { } // GetTest - Get test -func (c *Client) GetTest(id int) (*GenericTest, error) { +func (c *Client) GetTest(id int64) (*GenericTest, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return nil, err diff --git a/users.go b/users.go index 3aeb9b3..c562c03 100644 --- a/users.go +++ b/users.go @@ -32,7 +32,7 @@ func (c *Client) GetUsers() (*[]User, error) { } // GetUser - get user -func (c *Client) GetUser(id int) (*User, error) { +func (c *Client) GetUser(id int64) (*User, error) { resp, err := c.get(fmt.Sprintf("/users/%d", id)) if err != nil { return nil, err @@ -46,7 +46,7 @@ func (c *Client) GetUser(id int) (*User, error) { } // DeleteUser - delete user -func (c *Client) DeleteUser(id int) error { +func (c *Client) DeleteUser(id int64) error { resp, err := c.post(fmt.Sprintf("/users/%d/delete", id), nil, nil) if err != nil { return err @@ -58,7 +58,7 @@ func (c *Client) DeleteUser(id int) error { } // UpdateUser - update user -func (c *Client) UpdateUser(id int, user User) (*User, error) { +func (c *Client) UpdateUser(id int64, user User) (*User, error) { resp, err := c.post(fmt.Sprintf("/users/%d/update", id), user, nil) if err != nil { return nil, err diff --git a/voice.go b/voice.go index bbc2d1b..b668068 100644 --- a/voice.go +++ b/voice.go @@ -82,7 +82,7 @@ func (t *RTPStream) AddAgent(id int64) { } // GetRTPStream - get voice call test -func (c *Client) GetRTPStream(id int) (*RTPStream, error) { +func (c *Client) GetRTPStream(id int64) (*RTPStream, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &RTPStream{}, err @@ -111,7 +111,7 @@ func (c Client) CreateRTPStream(t RTPStream) (*RTPStream, error) { } //DeleteRTPStream - delete voice call test -func (c *Client) DeleteRTPStream(id int) error { +func (c *Client) DeleteRTPStream(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/voice/%d/delete", id), nil, nil) if err != nil { return err @@ -123,7 +123,7 @@ func (c *Client) DeleteRTPStream(id int) error { } //UpdateRTPStream - update voice call test -func (c *Client) UpdateRTPStream(id int, t RTPStream) (*RTPStream, error) { +func (c *Client) UpdateRTPStream(id int64, t RTPStream) (*RTPStream, error) { resp, err := c.post(fmt.Sprintf("/tests/voice/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/voice_test.go b/voice_test.go index 2830238..95b934c 100644 --- a/voice_test.go +++ b/voice_test.go @@ -149,7 +149,7 @@ func TestClient_DeleteRTPStream(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteRTPStream(id) if err != nil { @@ -166,7 +166,7 @@ func TestClient_UpdateRTPStream(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) sipS := RTPStream{ TestName: String("RTP Stream - AWS RTP server"), CodecID: Int64(0), diff --git a/web_transaction.go b/web_transaction.go index 79cefc7..9cc59f5 100644 --- a/web_transaction.go +++ b/web_transaction.go @@ -103,7 +103,7 @@ func (c Client) CreateWebTransaction(t WebTransaction) (*WebTransaction, error) } //GetWebTransaction - get a web transactiont test -func (c *Client) GetWebTransaction(id int) (*WebTransaction, error) { +func (c *Client) GetWebTransaction(id int64) (*WebTransaction, error) { resp, err := c.get(fmt.Sprintf("/tests/%d", id)) if err != nil { return &WebTransaction{}, err @@ -116,7 +116,7 @@ func (c *Client) GetWebTransaction(id int) (*WebTransaction, error) { } //DeleteWebTransaction - delete a web transactiont est -func (c *Client) DeleteWebTransaction(id int) error { +func (c *Client) DeleteWebTransaction(id int64) error { resp, err := c.post(fmt.Sprintf("/tests/web-transactions/%d/delete", id), nil, nil) if err != nil { return err @@ -128,7 +128,7 @@ func (c *Client) DeleteWebTransaction(id int) error { } // UpdateWebTransaction - update a web transaction test -func (c *Client) UpdateWebTransaction(id int, t WebTransaction) (*WebTransaction, error) { +func (c *Client) UpdateWebTransaction(id int64, t WebTransaction) (*WebTransaction, error) { resp, err := c.post(fmt.Sprintf("/tests/web-transactions/%d/update", id), t, nil) if err != nil { return &t, err diff --git a/web_transaction_test.go b/web_transaction_test.go index 8b9bf7d..19d5065 100644 --- a/web_transaction_test.go +++ b/web_transaction_test.go @@ -70,7 +70,7 @@ func TestClient_DeleteWebTransaction(t *testing.T) { }) var client = &Client{APIEndpoint: server.URL, AuthToken: "foo"} - id := 1 + id := int64(1) err := client.DeleteWebTransaction(id) if err != nil {