thousandeyes

package module
v2.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

README

GoDoc Go Report Card License

thousandeyes-sdk-go

thousandeyes-sdk-go is a go client library for the Thousandeyes v6 API.

Installation

thousandeyes-sdk-go is compatible with modern Go releases in module mode, with Go installed:

go get github.com/thousandeyes/thousandeyes-sdk-go/v2

will resolve and add the package to the current development module, along with its dependencies.

Alternatively the same can be achieved if you use import in a package:

import "github.com/thousandeyes/thousandeyes-sdk-go/v2"

and run go get without parameters.

Usage

Example code to list ThousandEyes agents:

package main

import (
	"fmt"
	"os"

	"github.com/thousandeyes/thousandeyes-sdk-go/v2"
)

func main() {
	opts := thousandeyes.ClientOptions{
		AuthToken: os.Getenv("TE_TOKEN"),
		AccountID: os.Getenv("TE_AID"),
	}

	client := thousandeyes.NewClient(&opts)
	agents, err := client.GetAgents()
	if err != nil {
		panic(err)
	}
	for _, a := range *agents {
		fmt.Println(*a.AgentName)
	}
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

This library is distributed under the Apache 2.0 license found in the LICENSE file.

Maintenance and Acknowledgements

This project is maintained by the ThousandEyes engineering team and accepts community contributions.

ThousandEyes would like to extend a thank you to William Fleming, John Dyer, and Joshua Blanchard for their contributions and community maintenance of this project.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int value to store v and returns a pointer to it.

func Int64

func Int64(v int64) *int64

Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

Types

type APILink struct {
	Href *string `json:"href,omitempty"`
	Rel  *string `json:"rel,omitempty"`
}

APILink - an api link

type APILinks []APILink

APILinks - List of APILink

type AccountGroup

type AccountGroup struct {
	AccountGroupName *string `json:"accountGroupName,omitempty"`
	AID              *int64  `json:"aid,omitempty"`
}

AccountGroup - An account within a ThousandEyes organization

type AccountGroupRole

type AccountGroupRole struct {
	RoleName                 *string       `json:"roleName,omitempty"`
	RoleID                   *int64        `json:"roleId,omitempty"`
	HasManagementPermissions *bool         `json:"hasManagementPermissions,omitempty" te:"int-bool"`
	Builtin                  *bool         `json:"builtin,omitempty" te:"int-bool"`
	Permissions              *[]Permission `json:"permissions,omitempty"`
}

AccountGroupRole - an account group role

func (AccountGroupRole) MarshalJSON

func (t AccountGroupRole) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*AccountGroupRole) UnmarshalJSON

func (t *AccountGroupRole) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type AccountGroups

type AccountGroups []AccountGroup

AccountGroups - list of account groups

type Agent

type Agent struct {
	AgentID               *int64               `json:"agentId,omitempty"`
	AgentName             *string              `json:"agentName,omitempty"`
	AgentType             *string              `json:"agentType,omitempty"`
	CountryID             *string              `json:"countryId,omitempty"`
	ClusterMembers        *[]ClusterMember     `json:"clusterMembers,omitempty"`
	IPAddresses           *[]string            `json:"ipAddresses,omitempty"`
	Groups                *GroupLabels         `json:"groups,omitempty"`
	Location              *string              `json:"location,omitempty"`
	ErrorDetails          *[]AgentErrorDetails `json:"errorDetails,omitempty"`
	Hostname              *string              `json:"hostname,omitempty"`
	Prefix                *string              `json:"prefix,omitempty"`
	Enabled               *bool                `json:"enabled,omitempty" te:"int-bool"`
	Network               *string              `json:"network,omitempty"`
	CreatedDate           *string              `json:"createdDate,omitempty"`
	LastSeen              *string              `json:"lastSeen,omitempty"`
	AgentState            *string              `json:"agentState,omitempty"`
	VerifySslCertificates *bool                `json:"verifySslCertificate,omitempty" te:"int-bool"`
	KeepBrowserCache      *bool                `json:"keepBrowserCache,omitempty" te:"int-bool"`
	Utilization           *int                 `json:"utilization,omitempty"`
	Ipv6Policy            *string              `json:"IPV6Policy,omitempty"`
	TargetForTests        *string              `json:"targetForTests,omitempty"`
}

Agent - Agent struct

func (Agent) MarshalJSON

func (t Agent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*Agent) UnmarshalJSON

func (t *Agent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type AgentAgent

type AgentAgent struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents                 *[]Agent      `json:"agents,omitempty"`
	BGPMeasurements        *bool         `json:"bgpMeasurements,omitempty" te:"int-bool"`
	BGPMonitors            *[]BGPMonitor `json:"bgpMonitors,omitempty"`
	Direction              *string       `json:"direction,omitempty"`
	DSCP                   *string       `json:"dscp,omitempty"`
	DSCPID                 *int64        `json:"dscpId"`
	Interval               *int          `json:"interval,omitempty"`
	MSS                    *int          `json:"mss,omitempty"`
	NetworkMeasurements    *bool         `json:"networkMeasurements,omitempty" te:"int-bool"`
	MTUMeasurements        *bool         `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NumPathTraces          *int          `json:"numPathTraces,omitempty"`
	PathTraceMode          *string       `json:"pathTraceMode,omitempty"`
	Port                   *int          `json:"port,omitempty"`
	Protocol               *string       `json:"protocol,omitempty"`
	TargetAgentID          *int64        `json:"targetAgentId,omitempty"`
	ThroughputDuration     *int          `json:"throughputDuration,omitempty"`
	ThroughputMeasurements *bool         `json:"throughputMeasurements,omitempty" te:"int-bool"`
	ThroughputRate         *int          `json:"throughputRate,omitempty"`
	UsePublicBGP           *bool         `json:"usePublicBgp,omitempty" te:"int-bool"`
}

AgentAgent - test

func (*AgentAgent) AddAgent

func (t *AgentAgent) AddAgent(id int64)

AddAgent - Adds an agent to agent test

func (*AgentAgent) AddAlertRule

func (t *AgentAgent) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (AgentAgent) MarshalJSON

func (t AgentAgent) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*AgentAgent) UnmarshalJSON

func (t *AgentAgent) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type AgentErrorDetails

type AgentErrorDetails struct {
	Code        *string `json:"code,omitempty"`
	Description *string `json:"description,omitempty"`
}

AgentErrorDetails - Agent error details

type AgentServer

type AgentServer struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents                *[]Agent      `json:"agents,omitempty"`
	BandwidthMeasurements *bool         `json:"bandwidthMeasurements,omitempty" te:"int-bool"`
	BGPMeasurements       *bool         `json:"bgpMeasurements,omitempty" te:"int-bool"`
	BGPMonitors           *[]BGPMonitor `json:"bgpMonitors,omitempty"`
	Interval              *int          `json:"interval,omitempty"`
	MTUMeasurements       *bool         `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NetworkMeasurements   *bool         `json:"networkMeasurements,omitempty" te:"int-bool"`
	NumPathTraces         *int          `json:"numPathTraces,omitempty"`
	PathTraceMode         *string       `json:"pathTraceMode,omitempty"`
	Port                  *int          `json:"port,omitempty"`
	ProbeMode             *string       `json:"probeMode,omitempty"`
	Protocol              *string       `json:"protocol,omitempty"`
	Server                *string       `json:"server,omitempty"`
	UsePublicBGP          *bool         `json:"usePublicBgp,omitempty" te:"int-bool"`
}

AgentServer - Agent to server test

func (*AgentServer) AddAgent

func (t *AgentServer) AddAgent(id int64)

AddAgent - Add agent to server test

func (*AgentServer) AddAlertRule

func (t *AgentServer) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (AgentServer) MarshalJSON

func (t AgentServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*AgentServer) UnmarshalJSON

func (t *AgentServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type Agents

type Agents []Agent

Agents - list of agents

type Alert

type Alert struct {
	AlertID        *int64     `json:"alertId,omitempty"`
	TestID         *int64     `json:"testId,omitempty"`
	TestName       *string    `json:"testName,omitempty"`
	Active         *int       `json:"active,omitempty"`
	RuleExpression *string    `json:"ruleExpression,omitempty"`
	DateStart      *string    `json:"dateStart,omitempty"`
	DateEnd        *string    `json:"dateEnd,omitempty"`
	ViolationCount *int       `json:"violationCount,omitempty"`
	RuleName       *string    `json:"ruleName,omitempty"`
	Permalink      *string    `json:"permalink,omitempty"`
	Type           *string    `json:"type,omitempty"`
	Agents         *[]Agent   `json:"agents,omitempty"`
	Monitors       *[]Monitor `json:"monitors,omitempty"`
	APILinks       *[]APILink `json:"apiLinks,omitempty"`
}

Alert - An alert

type AlertRule

type AlertRule struct {
	AlertRuleID             *int64         `json:"alertRuleId,omitempty"`
	AlertType               *string        `json:"alertType,omitempty"`
	Default                 *bool          `json:"default,omitempty" te:"int-bool"`
	Direction               *string        `json:"direction,omitempty"`
	Expression              *string        `json:"expression,omitempty"`
	IncludeCoveredPrefixes  *int           `json:"includeCoveredPrefixes,omitempty"`
	MinimumSources          *int           `json:"minimumSources,omitempty"`
	MinimumSourcesPct       *int           `json:"minimumSourcesPct,omitempty"`
	NotifyOnClear           *bool          `json:"notifyOnClear,omitempty" te:"int-bool"`
	RoundsViolatingMode     *string        `json:"roundsViolatingMode,omitempty"`
	RoundsViolatingOutOf    *int           `json:"roundsViolatingOutOf,omitempty"`
	RoundsViolatingRequired *int           `json:"roundsViolatingRequired,omitempty"`
	RuleID                  *int64         `json:"ruleId,omitempty"`
	RuleName                *string        `json:"ruleName,omitempty"`
	Tests                   *[]GenericTest `json:"tests,omitempty"`
	TestIds                 *[]int64       `json:"testIds,omitempty"`
	Notifications           *Notification  `json:"notifications,omitempty"`
	Severity                *string        `json:"severity,omitempty"`
}

AlertRule - An alert rule

func (AlertRule) MarshalJSON

func (t AlertRule) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*AlertRule) UnmarshalJSON

func (t *AlertRule) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type AlertRules

type AlertRules []AlertRule

AlertRules - list of alert rules

type Alerts

type Alerts []Alert

Alerts - list of alerts

type BGP

type BGP struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	BGPMonitors            *[]BGPMonitor `json:"bgpMonitors,omitempty"`
	IncludeCoveredPrefixes *bool         `json:"includeCoveredPrefixes,omitempty" te:"int-bool"`
	Prefix                 *string       `json:"prefix,omitempty"`
	UsePublicBGP           *bool         `json:"usePublicBgp,omitempty" te:"int-bool"`
}

BGP - BGP trace test

func (*BGP) AddAlertRule

func (t *BGP) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (BGP) MarshalJSON

func (t BGP) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*BGP) UnmarshalJSON

func (t *BGP) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type BGPMonitor

type BGPMonitor struct {
	MonitorID   *int64  `json:"monitorId,omitempty"`
	IPAddress   *string `json:"ipAddress,omitempty"`
	Network     *string `json:"network,omitempty"`
	MonitorType *string `json:"monitorType,omitempty"`
	MonitorName *string `json:"monitorName,omitempty"`
}

BGPMonitor - BGPMonitor struct

type BGPMonitors

type BGPMonitors []BGPMonitor

BGPMonitors - list of bgp montors

type Client

type Client struct {
	AuthToken      string
	AccountGroupID string
	APIEndpoint    string
	HTTPClient     http.Client
	Limiter        Limiter
	UserAgent      string
}

Client wraps http client

func NewClient

func NewClient(opts *ClientOptions) *Client

NewClient creates an API client

func (*Client) AddAgentsToCluster

func (c *Client) AddAgentsToCluster(cluster int, ids []int) (*[]Agent, error)

AddAgentsToCluster - add agent to cluster

func (Client) CreateAgentAgent

func (c Client) CreateAgentAgent(t AgentAgent) (*AgentAgent, error)

CreateAgentAgent - Create an agent to agent test

func (Client) CreateAgentServer

func (c Client) CreateAgentServer(t AgentServer) (*AgentServer, error)

CreateAgentServer - Create agent to server test

func (Client) CreateAlertRule

func (c Client) CreateAlertRule(a AlertRule) (*AlertRule, error)

CreateAlertRule - Create alert rule

func (Client) CreateBGP

func (c Client) CreateBGP(t BGP) (*BGP, error)

CreateBGP - Create bgp test

func (Client) CreateDNSSec

func (c Client) CreateDNSSec(t DNSSec) (*DNSSec, error)

CreateDNSSec - Create DNSSec test

func (Client) CreateDNSServer

func (c Client) CreateDNSServer(t DNSServer) (*DNSServer, error)

CreateDNSServer - Create dns server test

func (Client) CreateDNSTrace

func (c Client) CreateDNSTrace(t DNSTrace) (*DNSTrace, error)

CreateDNSTrace - Create dns trace test

func (Client) CreateFTPServer

func (c Client) CreateFTPServer(t FTPServer) (*FTPServer, error)

CreateFTPServer - Create ftp server test

func (Client) CreateGroupLabel

func (c Client) CreateGroupLabel(a GroupLabel) (*GroupLabel, error)

CreateGroupLabel - Create label

func (Client) CreateHTTPServer

func (c Client) CreateHTTPServer(t HTTPServer) (*HTTPServer, error)

CreateHTTPServer - create a http server

func (Client) CreatePageLoad

func (c Client) CreatePageLoad(t PageLoad) (*PageLoad, error)

CreatePageLoad - create pager load test

func (Client) CreateRTPStream

func (c Client) CreateRTPStream(t RTPStream) (*RTPStream, error)

CreateRTPStream - Create voice call test

func (*Client) CreateRole

func (c *Client) CreateRole(user AccountGroupRole) (*AccountGroupRole, error)

CreateRole - create role

func (Client) CreateSIPServer

func (c Client) CreateSIPServer(t SIPServer) (*SIPServer, error)

CreateSIPServer - Create sip server test

func (*Client) CreateUser

func (c *Client) CreateUser(user User) (*User, error)

CreateUser - create user

func (Client) CreateWebTransaction

func (c Client) CreateWebTransaction(t WebTransaction) (*WebTransaction, error)

CreateWebTransaction - Create a web transaction test

func (*Client) DeleteAgentAgent

func (c *Client) DeleteAgentAgent(id int64) error

DeleteAgentAgent - delete agent to agent test

func (*Client) DeleteAgentServer

func (c *Client) DeleteAgentServer(id int64) error

DeleteAgentServer - Delete agent to server test

func (Client) DeleteAlertRule

func (c Client) DeleteAlertRule(id int64) error

DeleteAlertRule - delete alert rule

func (*Client) DeleteBGP

func (c *Client) DeleteBGP(id int64) error

DeleteBGP - delete bgp test

func (*Client) DeleteDNSSec

func (c *Client) DeleteDNSSec(id int64) error

DeleteDNSSec - delete DNSSec test

func (*Client) DeleteDNSServer

func (c *Client) DeleteDNSServer(id int64) error

DeleteDNSServer - delete dns server test

func (*Client) DeleteDNSTrace

func (c *Client) DeleteDNSTrace(id int64) error

DeleteDNSTrace - delete dns trace test

func (*Client) DeleteFTPServer

func (c *Client) DeleteFTPServer(id int64) error

DeleteFTPServer - delete ftp server test

func (Client) DeleteGroupLabel

func (c Client) DeleteGroupLabel(id int64) error

DeleteGroupLabel - delete label

func (*Client) DeleteHTTPServer

func (c *Client) DeleteHTTPServer(id int64) error

DeleteHTTPServer - delete an http server

func (*Client) DeletePageLoad

func (c *Client) DeletePageLoad(id int64) error

DeletePageLoad - Delete page load tes

func (*Client) DeleteRTPStream

func (c *Client) DeleteRTPStream(id int64) error

DeleteRTPStream - delete voice call test

func (*Client) DeleteRole

func (c *Client) DeleteRole(id int64) error

DeleteRole - delete role

func (*Client) DeleteSIPServer

func (c *Client) DeleteSIPServer(id int64) error

DeleteSIPServer - delete sip server test

func (*Client) DeleteUser

func (c *Client) DeleteUser(id int64) error

DeleteUser - delete user

func (*Client) DeleteWebTransaction

func (c *Client) DeleteWebTransaction(id int64) error

DeleteWebTransaction - delete a web transactiont est

func (*Client) GetAccountGroups

func (c *Client) GetAccountGroups() (*[]SharedWithAccount, error)

GetAccountGroups - Get third party and webhook integrations

func (*Client) GetAgent

func (c *Client) GetAgent(id int64) (*Agent, error)

GetAgent - Get agent

func (*Client) GetAgentAgent

func (c *Client) GetAgentAgent(id int64) (*AgentAgent, error)

GetAgentAgent - Get an agent to agent test

func (*Client) GetAgentServer

func (c *Client) GetAgentServer(id int64) (*AgentServer, error)

GetAgentServer - Get agent to server test

func (*Client) GetAgents

func (c *Client) GetAgents() (*Agents, error)

GetAgents - Get agents

func (*Client) GetAlertRule

func (c *Client) GetAlertRule(id int64) (*AlertRule, error)

GetAlertRule - Get single alert rule by ID

func (Client) GetAlertRules

func (c Client) GetAlertRules() (*AlertRules, error)

GetAlertRules - Get alert rules

func (*Client) GetBGP

func (c *Client) GetBGP(id int64) (*BGP, error)

GetBGP - get bgp test

func (*Client) GetBPGMonitors

func (c *Client) GetBPGMonitors() (*BGPMonitors, error)

GetBPGMonitors - Get bgp monitors

func (*Client) GetDNSSec

func (c *Client) GetDNSSec(id int64) (*DNSSec, error)

GetDNSSec - get DNSSec test

func (*Client) GetDNSServer

func (c *Client) GetDNSServer(id int64) (*DNSServer, error)

GetDNSServer - get dns server test

func (*Client) GetDNSTrace

func (c *Client) GetDNSTrace(id int64) (*DNSTrace, error)

GetDNSTrace - get dns trace test

func (*Client) GetFTPServer

func (c *Client) GetFTPServer(id int64) (*FTPServer, error)

GetFTPServer - get ftp server test

func (*Client) GetGroupLabel

func (c *Client) GetGroupLabel(id int64) (*GroupLabel, error)

GetGroupLabel - Get single group label by ID

func (*Client) GetGroupLabels

func (c *Client) GetGroupLabels() (*GroupLabels, error)

GetGroupLabels - Get labels

func (*Client) GetGroupLabelsByType

func (c *Client) GetGroupLabelsByType(t string) (*GroupLabels, error)

GetGroupLabelsByType - Get label by type

func (*Client) GetHTTPServer

func (c *Client) GetHTTPServer(id int64) (*HTTPServer, error)

GetHTTPServer - Get an HTTP Server test

func (*Client) GetIntegrations

func (c *Client) GetIntegrations() (*[]Integration, error)

GetIntegrations - Get third party and webhook integrations

func (*Client) GetPageLoad

func (c *Client) GetPageLoad(id int64) (*PageLoad, error)

GetPageLoad - get page load test

func (*Client) GetRTPStream

func (c *Client) GetRTPStream(id int64) (*RTPStream, error)

GetRTPStream - get voice call test

func (*Client) GetRole

func (c *Client) GetRole(id int64) (*AccountGroupRole, error)

GetRole - get role

func (*Client) GetRoles

func (c *Client) GetRoles() (*[]AccountGroupRole, error)

GetRoles - get roles

func (*Client) GetSIPServer

func (c *Client) GetSIPServer(id int64) (*SIPServer, error)

GetSIPServer - get sip server test

func (*Client) GetTest

func (c *Client) GetTest(id int64) (*GenericTest, error)

GetTest - Get test

func (*Client) GetTests

func (c *Client) GetTests() (*[]GenericTest, error)

GetTests - get all tests

func (*Client) GetUser

func (c *Client) GetUser(id int64) (*User, error)

GetUser - get user

func (*Client) GetUsers

func (c *Client) GetUsers() (*[]User, error)

GetUsers - get users

func (*Client) GetWebTransaction

func (c *Client) GetWebTransaction(id int64) (*WebTransaction, error)

GetWebTransaction - get a web transactiont test

func (*Client) RemoveAgentsFromCluster

func (c *Client) RemoveAgentsFromCluster(cluster int, ids []int) (*[]Agent, error)

RemoveAgentsFromCluster - remove agent from cluster

func (*Client) UpdateAgentAgent

func (c *Client) UpdateAgentAgent(id int64, t AgentAgent) (*AgentAgent, error)

UpdateAgentAgent - update agent to agent test

func (*Client) UpdateAgentServer

func (c *Client) UpdateAgentServer(id int64, t AgentServer) (*AgentServer, error)

UpdateAgentServer - Update agent to server test

func (Client) UpdateAlertRule

func (c Client) UpdateAlertRule(id int64, a AlertRule) (*AlertRule, error)

UpdateAlertRule - update alert rule

func (*Client) UpdateBGP

func (c *Client) UpdateBGP(id int64, t BGP) (*BGP, error)

UpdateBGP - - Update bgp trace test

func (*Client) UpdateDNSSec

func (c *Client) UpdateDNSSec(id int64, t DNSSec) (*DNSSec, error)

UpdateDNSSec - update DNSSec test

func (*Client) UpdateDNSServer

func (c *Client) UpdateDNSServer(id int64, t DNSServer) (*DNSServer, error)

UpdateDNSServer - - Update dns server test

func (*Client) UpdateDNSTrace

func (c *Client) UpdateDNSTrace(id int64, t DNSTrace) (*DNSTrace, error)

UpdateDNSTrace - update dns trace test

func (*Client) UpdateFTPServer

func (c *Client) UpdateFTPServer(id int64, t FTPServer) (*FTPServer, error)

UpdateFTPServer - - Update ftp server test

func (Client) UpdateGroupLabel

func (c Client) UpdateGroupLabel(id int64, a GroupLabel) (*GroupLabels, error)

UpdateGroupLabel - update label

func (*Client) UpdateHTTPServer

func (c *Client) UpdateHTTPServer(id int64, t HTTPServer) (*HTTPServer, error)

UpdateHTTPServer - Update an http server test

func (*Client) UpdatePageLoad

func (c *Client) UpdatePageLoad(id int64, t PageLoad) (*PageLoad, error)

UpdatePageLoad - Upload page load

func (*Client) UpdateRTPStream

func (c *Client) UpdateRTPStream(id int64, t RTPStream) (*RTPStream, error)

UpdateRTPStream - update voice call test

func (*Client) UpdateRole

func (c *Client) UpdateRole(id int64, role AccountGroupRole) (*AccountGroupRole, error)

UpdateRole - update role

func (*Client) UpdateSIPServer

func (c *Client) UpdateSIPServer(id int64, t SIPServer) (*SIPServer, error)

UpdateSIPServer - - update sip server test

func (*Client) UpdateUser

func (c *Client) UpdateUser(id int64, user User) (*User, error)

UpdateUser - update user

func (*Client) UpdateWebTransaction

func (c *Client) UpdateWebTransaction(id int64, t WebTransaction) (*WebTransaction, error)

UpdateWebTransaction - update a web transaction test

type ClientOptions

type ClientOptions struct {
	APIEndpoint string
	Limiter     Limiter
	AccountID   string
	AuthToken   string
	Timeout     time.Duration
	// http client user-agent
	UserAgent string
}

ClientOptions - Thousandeyes client options for apiEndpoint, accountID, AuthToken, rate limiter, and HTTP client settings

type ClusterMember

type ClusterMember struct {
	MemberID          *int64    `json:"memberId,omitempty"`
	Name              *string   `json:"name,omitempty"`
	IPAddresses       *[]string `json:"IPAddresses,omitempty"`
	PublicIPAddresses *[]string `json:"PublicIPAddresses,omitempty"`
	Prefix            *string   `json:"Prefix,omitempty"`
	Network           *string   `json:"network,omitempty"`
	LastSeen          *string   `json:"lastSeen,omitempty"`
	AgentState        *string   `json:"agentState,omitempty"`
	Utilization       *int      `json:"utilization,omitempty"`
	TargetForTests    *string   `json:"targetForTests,omitempty"`
}

ClusterMember - ClusterMember struct

type CustomHeaders

type CustomHeaders struct {
	Root    *map[string]string            `json:"root,omitempty"`
	All     *map[string]string            `json:"all,omitempty"`
	Domains *map[string]map[string]string `json:"domains,omitempty"`
}

CustomHeaders represents the JSON object exchanged for specifying custom HTTP headers in HTTP Server, Page Load, and Web Transaction tests.

type DNSSec

type DNSSec struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents   *[]Agent `json:"agents,omitempty"`
	Domain   *string  `json:"domain,omitempty"`
	Interval *int     `json:"interval,omitempty"`
}

DNSSec - DNSSec test

func (*DNSSec) AddAgent

func (t *DNSSec) AddAgent(id int64)

AddAgent - Add agent to DNSSec test

func (*DNSSec) AddAlertRule

func (t *DNSSec) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (DNSSec) MarshalJSON

func (t DNSSec) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*DNSSec) UnmarshalJSON

func (t *DNSSec) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type DNSServer

type DNSServer struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents                *[]Agent      `json:"agents,omitempty"`
	BandwidthMeasurements *bool         `json:"bandwidthMeasurements,omitempty" te:"int-bool"`
	BGPMeasurements       *bool         `json:"bgpMeasurements,omitempty" te:"int-bool"`
	BGPMonitors           *[]BGPMonitor `json:"bgpMonitors,omitempty"`
	DNSServers            *[]Server     `json:"dnsServers,omitempty"`
	DNSTransportProtocol  *string       `json:"dnsTransportProtocol,omitempty"`
	Domain                *string       `json:"domain,omitempty"`
	Interval              *int          `json:"interval,omitempty"`
	MTUMeasurements       *bool         `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NetworkMeasurements   *bool         `json:"networkMeasurements,omitempty" te:"int-bool"`
	NumPathTraces         *int          `json:"numPathTraces,omitempty"`
	PathTraceMode         *string       `json:"pathTraceMode,omitempty"`
	ProbeMode             *string       `json:"probeMode,omitempty"`
	Protocol              *string       `json:"protocol,omitempty"`
	RecursiveQueries      *bool         `json:"recursiveQueries,omitempty" te:"int-bool"`
	UsePublicBGP          *bool         `json:"usePublicBgp,omitempty" te:"int-bool"`
}

DNSServer - dns server test

func (*DNSServer) AddAgent

func (t *DNSServer) AddAgent(id int64)

AddAgent - Add dns server test

func (*DNSServer) AddAlertRule

func (t *DNSServer) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (DNSServer) MarshalJSON

func (t DNSServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*DNSServer) UnmarshalJSON

func (t *DNSServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type DNSTrace

type DNSTrace struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents               *[]Agent `json:"agents,omitempty"`
	DNSTransportProtocol *string  `json:"dnsTransportProtocol,omitempty"`
	Domain               *string  `json:"domain,omitempty"`
	Interval             *int     `json:"interval,omitempty"`
}

DNSTrace - DNS trace test

func (*DNSTrace) AddAgent

func (t *DNSTrace) AddAgent(id int64)

AddAgent - Add agent to DNS Trace test

func (*DNSTrace) AddAlertRule

func (t *DNSTrace) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (DNSTrace) MarshalJSON

func (t DNSTrace) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*DNSTrace) UnmarshalJSON

func (t *DNSTrace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type DefaultLimiter

type DefaultLimiter struct{}

DefaultLimiter - thousandeyes rate limit is 240 per minute

func (DefaultLimiter) Wait

func (l DefaultLimiter) Wait()

Wait - Satisfying the Limiter interface and wait on 300ms to avoid TE 240 per minute default

type FTPServer

type FTPServer struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents              *[]Agent `json:"agents,omitempty"`
	BGPMeasurements     *bool    `json:"bgpMeasurements,omitempty" te:"int-bool"`
	DownloadLimit       *int     `json:"downloadLimit,omitempty"`
	FTPTargetTime       *int     `json:"ftpTargetTime,omitempty"`
	FTPTimeLimit        *int     `json:"ftpTimeLimit,omitempty"`
	Interval            *int     `json:"interval,omitempty"`
	MTUMeasurements     *bool    `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NetworkMeasurements *bool    `json:"networkMeasurements,omitempty" te:"int-bool"`
	NumPathTraces       *int     `json:"numPathTraces,omitempty"`
	Password            *string  `json:"password,omitempty"`
	PathTraceMode       *string  `json:"pathTraceMode,omitempty"`
	ProbeMode           *string  `json:"probeMode,omitempty"`
	Protocol            *string  `json:"protocol,omitempty"`
	RequestType         *string  `json:"requestType,omitempty"`
	URL                 *string  `json:"url,omitempty"`
	UseActiveFTP        *int     `json:"useActiveFtp,omitempty"`
	UseExplicitFTPS     *int     `json:"useExplicitFtps,omitempty"`
	Username            *string  `json:"username,omitempty"`
}

FTPServer - ftp server test

func (*FTPServer) AddAgent

func (t *FTPServer) AddAgent(id int64)

AddAgent - Add ftp server test

func (*FTPServer) AddAlertRule

func (t *FTPServer) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (FTPServer) MarshalJSON

func (t FTPServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*FTPServer) UnmarshalJSON

func (t *FTPServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type GenericTest

type GenericTest struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`

	// Fields unique to this test
	Agents *[]Agent `json:"agents,omitempty"`
}

GenericTest - GenericTest struct to represent all test types

func (GenericTest) MarshalJSON

func (t GenericTest) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*GenericTest) UnmarshalJSON

func (t *GenericTest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type GroupLabel

type GroupLabel struct {
	Name    *string        `json:"name,omitempty"`
	GroupID *int64         `json:"groupId,omitempty"`
	Builtin *bool          `json:"builtin,omitempty" te:"int-bool"`
	Type    *string        `json:"type,omitempty"`
	Agents  *[]Agent       `json:"agents,omitempty"`
	Tests   *[]GenericTest `json:"tests,omitempty"`
}

GroupLabel - label

func (GroupLabel) MarshalJSON

func (t GroupLabel) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*GroupLabel) UnmarshalJSON

func (t *GroupLabel) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type GroupLabels

type GroupLabels []GroupLabel

GroupLabels - list of labels

type HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

HTTPClient - an http client

type HTTPServer

type HTTPServer struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents                *[]Agent       `json:"agents,omitempty"`
	AuthType              *string        `json:"authType,omitempty"`
	BandwidthMeasurements *bool          `json:"bandwidthMeasurements,omitempty" te:"int-bool"`
	BGPMeasurements       *bool          `json:"bgpMeasurements,omitempty" te:"int-bool"`
	BGPMonitors           *[]Monitor     `json:"bgpMonitors,omitempty"`
	ClientCertificate     *string        `json:"clientCertificate,omitempty"`
	ContentRegex          *string        `json:"contentRegex,omitempty"`
	CustomHeaders         *CustomHeaders `json:"customHeaders,omitempty"`
	DesiredStatusCode     *string        `json:"desiredStatusCode,omitempty"`
	DownloadLimit         *int64         `json:"downloadLimit,omitempty"`
	DNSOverride           *string        `json:"dnsOverride,omitempty"`
	FollowRedirects       *bool          `json:"followRedirects,omitempty" te:"int-bool"`
	Headers               *[]string      `json:"headers,omitempty"`
	HTTPVersion           *int           `json:"httpVersion,omitempty"`
	HTTPTargetTime        *int           `json:"httpTargetTime,omitempty"`
	HTTPTimeLimit         *int           `json:"httpTimeLimit,omitempty"`
	Interval              *int           `json:"interval,omitempty"`
	MTUMeasurements       *bool          `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NetworkMeasurements   *bool          `json:"networkMeasurements,omitempty" te:"int-bool"`
	NumPathTraces         *int           `json:"numPathTraces,omitempty"`
	Password              *string        `json:"password,omitempty"`
	PathTraceMode         *string        `json:"pathTraceMode,omitempty"`
	PostBody              *string        `json:"postBody,omitempty"`
	ProbeMode             *string        `json:"probeMode,omitempty"`
	Protocol              *string        `json:"protocol,omitempty"`
	SSLVersion            *string        `json:"sslVersion,omitempty"`
	SSLVersionID          *int64         `json:"sslVersionId,omitempty"`
	URL                   *string        `json:"url,omitempty"`
	UseNTLM               *bool          `json:"useNtlm,omitempty" te:"int-bool"` // TODO: BasicAuth not working
	UserAgent             *string        `json:"userAgent,omitempty"`
	Username              *string        `json:"username,omitempty"`
	VerifyCertificate     *bool          `json:"verifyCertificate,omitempty" te:"int-bool"`
}

HTTPServer - a http server test

func (*HTTPServer) AddAgent

func (t *HTTPServer) AddAgent(id int64)

AddAgent - add an agent

func (HTTPServer) MarshalJSON

func (t HTTPServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*HTTPServer) UnmarshalJSON

func (t *HTTPServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type HTTPServerResponse

type HTTPServerResponse struct {
	// contains filtered or unexported fields
}

HTTPServerResponse - a http server response

type Integration

type Integration struct {
	AuthMethod      *string `json:"authMethod,omitempty"`
	AuthUser        *string `json:"authUser,omitempty"`
	AuthToken       *string `json:"authToken,omitempty"`
	Channel         *string `json:"channel,omitempty"`
	IntegrationID   *string `json:"integrationId,omitempty"`
	IntegrationName *string `json:"integrationName,omitempty"`
	IntegrationType *string `json:"integrationType,omitempty"`
	Target          *string `json:"target,omitempty"`
}

Integration - Integration struct

type Limiter

type Limiter interface {
	Wait()
}

Limiter - Rate limiter interface

type Monitor

type Monitor struct {
	MonitorID   *int64  `json:"monitorId,omitempty"`
	IPAddress   *string `json:"ipAddress,omitempty"`
	CountryID   *string `json:"countryId,omitempty"`
	MonitorName *string `json:"monitorName,omitempty"`
	Network     *string `json:"network,omitempty"`
	MonitorType *string `json:"monitorType,omitempty"`
}

Monitor - A monitor

type Monitors

type Monitors []Monitor

Monitors - List of monitor

type Notification

type Notification struct {
	Email      *NotificationEmail        `json:"email,omitempty"`
	ThirdParty *[]NotificationThirdParty `json:"thirdParty,omitempty"`
	Webhook    *[]NotificationWebhook    `json:"webhook,omitempty"`
}

Notification - Alert Rule Notification structure

type NotificationEmail

type NotificationEmail struct {
	Message   *string   `json:"message,omitempty"`
	Recipient *[]string `json:"recipient,omitempty"`
}

NotificationEmail - Alert Rule Notification Email structure

type NotificationThirdParty added in v2.2.0

type NotificationThirdParty struct {
	IntegrationID   *string `json:"integrationId,omitempty"`
	IntegrationName *string `json:"integrationName,omitempty"`
	IntegrationType *string `json:"integrationType,omitempty"`
	Target          *string `json:"target,omitempty"`
	AuthMethod      *string `json:"authMethod,omitempty"`
	AuthUser        *string `json:"authUser,omitempty"`
	AuthToken       *string `json:"authToken,omitempty"`
	Channel         *string `json:"channel,omitempty"`
}

NotificationThirdParty - Alert Rule Notification ThirdParty structure

type NotificationWebhook added in v2.4.2

type NotificationWebhook struct {
	IntegrationID   *string `json:"integrationId,omitempty"`
	IntegrationName *string `json:"integrationName,omitempty"`
	IntegrationType *string `json:"integrationType,omitempty"`
	Target          *string `json:"target,omitempty"`
}

NotificationWebhook - Alert Rule Notification Webhook structure

type PageLoad

type PageLoad struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents                *[]Agent       `json:"agents,omitempty"`
	AuthType              *string        `json:"authType,omitempty"`
	BandwidthMeasurements *bool          `json:"bandwidthMeasurements,omitempty" te:"int-bool"`
	BGPMeasurements       *bool          `json:"bgpMeasurements,omitempty" te:"int-bool"`
	BGPMonitors           *[]BGPMonitor  `json:"bgpMonitors,omitempty"`
	ContentRegex          *string        `json:"contentRegex,omitempty"`
	CustomHeaders         *CustomHeaders `json:"customHeaders,omitempty"`
	FollowRedirects       *bool          `json:"followRedirects,omitempty" te:"int-bool"`
	HTTPInterval          *int           `json:"httpInterval,omitempty"`
	HTTPTargetTime        *int           `json:"httpTargetTime,omitempty"`
	HTTPTimeLimit         *int           `json:"httpTimeLimit,omitempty"`
	HTTPVersion           *int           `json:"httpVersion,omitempty"`
	IncludeHeaders        *bool          `json:"includeHeaders,omitempty" te:"int-bool"`
	Interval              *int           `json:"interval,omitempty"`
	MTUMeasurements       *bool          `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NetworkMeasurements   *bool          `json:"networkMeasurements,omitempty" te:"int-bool"`
	NumPathTraces         *int           `json:"numPathTraces,omitempty"`
	PageLoadTargetTime    *int           `json:"pageLoadTargetTime,omitempty"`
	PageLoadTimeLimit     *int           `json:"pageLoadTimeLimit,omitempty"`
	Password              *string        `json:"password,omitempty"`
	PathTraceMode         *string        `json:"pathTraceMode,omitempty"`
	ProbeMode             *string        `json:"probeMode,omitempty"`
	Protocol              *string        `json:"protocol,omitempty"`
	SSLVersion            *string        `json:"sslVersion,omitempty"`
	SSLVersionID          *int64         `json:"sslVersionId,omitempty"`
	Subinterval           *int           `json:"subinterval,omitempty"`
	URL                   *string        `json:"url,omitempty"`
	UseNTLM               *bool          `json:"useNtlm,omitempty" te:"int-bool"`
	UsePublicBGP          *bool          `json:"usePublicBgp,omitempty" te:"int-bool"`
	UserAgent             *string        `json:"userAgent,omitempty"`
	Username              *string        `json:"username,omitempty"`
	VerifyCertificate     *bool          `json:"verifyCertificate,omitempty" te:"int-bool"`
}

PageLoad - a page log struct

func (*PageLoad) AddAgent

func (t *PageLoad) AddAgent(id int64)

AddAgent - add an aget

func (PageLoad) MarshalJSON

func (t PageLoad) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*PageLoad) UnmarshalJSON

func (t *PageLoad) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type Permission

type Permission struct {
	IsManagementPermission *bool   `json:"isManagementPermission" te:"int-bool"`
	Label                  *string `json:"label"`
	PermissionID           *int64  `json:"permissionId"`
}

Permission - permission attached to roles

func (Permission) MarshalJSON

func (t Permission) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*Permission) UnmarshalJSON

func (t *Permission) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type RTPStream

type RTPStream struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents          *[]Agent      `json:"agents,omitempty"`
	BGPMeasurements *bool         `json:"bgpMeasurements,omitempty" te:"int-bool"`
	BGPMonitors     *[]BGPMonitor `json:"bgpMonitors,omitempty"`
	Codec           *string       `json:"codec,omitempty"`
	CodecID         *int64        `json:"codecId,omitempty"`
	DSCP            *string       `json:"dscp,omitempty"`
	DSCPID          *int64        `json:"dscpId,omitempty"`
	Duration        *int          `json:"duration,omitempty"`
	Interval        *int          `json:"interval,omitempty"`
	JitterBuffer    *int          `json:"jitterBuffer,omitempty"`
	MTUMeasurements *bool         `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NumPathTraces   *int          `json:"numPathTraces,omitempty"`
	TargetAgentID   *int64        `json:"targetAgentId,omitempty"`
	UsePublicBGP    *bool         `json:"usePublicBgp,omitempty" te:"int-bool"`
}

RTPStream - RTPStream trace test

func (*RTPStream) AddAgent

func (t *RTPStream) AddAgent(id int64)

AddAgent - Add agent to voice call test

func (RTPStream) MarshalJSON

func (t RTPStream) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*RTPStream) UnmarshalJSON

func (t *RTPStream) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type RateLimit

type RateLimit struct {
	Limit              int64
	Remaining          int64
	Reset              int64
	LastRemaining      int64
	ConcurrentMessages []time.Time
}

RateLimit contains data representing rate limit headers returned in ThousandEyes API responses. int64 everywhere for ease of interacting with time values.

type SIPAuthData

type SIPAuthData struct {
	AuthUser     *string `json:"authUser,omitempty"`
	Password     *string `json:"password,omitempty"`
	Port         *int    `json:"port,omitempty"`
	Protocol     *string `json:"protocol,omitempty"`
	SIPProxy     *string `json:"sipProxy,omitempty"`
	SIPRegistrar *string `json:"sipRegistrar,omitempty"`
	User         *string `json:"user,omitempty"`
}

SIPAuthData - Authentication fields for SIP tests

type SIPServer

type SIPServer struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents                *[]Agent     `json:"agents,omitempty"`
	BandwidthMeasurements *bool        `json:"bandwidthMeasurements,omitempty" te:"int-bool"`
	BGPMeasurements       *bool        `json:"bgpMeasurements,omitempty" te:"int-bool"`
	Interval              *int         `json:"interval,omitempty"`
	MTUMeasurements       *bool        `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NetworkMeasurements   *bool        `json:"networkMeasurements,omitempty" te:"int-bool"`
	NumPathTraces         *int         `json:"numPathTraces,omitempty"`
	OptionsRegex          *string      `json:"options_regex,omitempty"`
	PathTraceMode         *string      `json:"pathTraceMode,omitempty"`
	ProbeMode             *string      `json:"probeMode,omitempty"`
	RegisterEnabled       *bool        `json:"registerEnabled,omitempty" te:"int-bool"`
	SIPTargetTime         *int         `json:"sipTargetTime,omitempty"`
	SIPTimeLimit          *int         `json:"sipTimeLimit,omitempty"`
	TargetSIPCredentials  *SIPAuthData `json:"targetSipCredentials,omitempty"`
	UsePublicBGP          *bool        `json:"usePublicBgp,omitempty" te:"int-bool"`
}

SIPServer - SIPServer trace test

func (*SIPServer) AddAgent

func (t *SIPServer) AddAgent(id int64)

AddAgent - Add agemt to sip server test

func (*SIPServer) AddAlertRule

func (t *SIPServer) AddAlertRule(id int64)

AddAlertRule - Adds an alert to agent test

func (SIPServer) MarshalJSON

func (t SIPServer) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*SIPServer) UnmarshalJSON

func (t *SIPServer) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

type Server

type Server struct {
	ServerID   *int64  `json:"serverId,omitempty"`
	ServerName *string `json:"serverName,omitempty"`
}

Server - a server ?

type SharedWithAccount

type SharedWithAccount struct {
	AccountGroupName *string `json:"name,omitempty"`
	AID              *int64  `json:"aid,omitempty"`
}

SharedWithAccount describes accounts with which a resource is shared. This is separate from the AccountGroup above only due to the difference in JSON object names.

type User

type User struct {
	Name                 *string             `json:"name,omitempty"`
	Email                *string             `json:"email,omitempty"`
	UID                  *int64              `json:"uid,omitempty"`
	LastLogin            *time.Time          `json:"lastLogin,omitempty"`
	DateRegistered       *time.Time          `json:"dateRegistered,omitempty"`
	LoginAccountGroup    *AccountGroup       `json:"loginAccountGroup,omitempty"`
	AccountGroupRoles    *[]AccountGroupRole `json:"accountGroupRoles,omitempty"`
	AllAccountGroupRoles *[]AccountGroupRole `json:"allAccountGroupRoles,omitempty"`
}

User - a user

type WebTransaction

type WebTransaction struct {
	// Common test fields
	AlertsEnabled      *bool                `json:"alertsEnabled,omitempty" te:"int-bool"`
	AlertRules         *[]AlertRule         `json:"alertRules,omitempty"`
	APILinks           *[]APILink           `json:"apiLinks,omitempty"`
	CreatedBy          *string              `json:"createdBy,omitempty"`
	CreatedDate        *string              `json:"createdDate,omitempty"`
	Description        *string              `json:"description,omitempty"`
	Enabled            *bool                `json:"enabled,omitempty" te:"int-bool"`
	Groups             *[]GroupLabel        `json:"groups,omitempty"`
	ModifiedBy         *string              `json:"modifiedBy,omitempty"`
	ModifiedDate       *string              `json:"modifiedDate,omitempty"`
	SavedEvent         *bool                `json:"savedEvent,omitempty" te:"int-bool"`
	SharedWithAccounts *[]SharedWithAccount `json:"sharedWithAccounts,omitempty"`
	TestID             *int64               `json:"testId,omitempty"`
	TestName           *string              `json:"testName,omitempty"`
	Type               *string              `json:"type,omitempty"`
	LiveShare          *bool                `json:"liveShare,omitempty" te:"int-bool"`

	// Fields unique to this test
	Agents                *[]Agent       `json:"agents,omitempty"`
	AuthType              *string        `json:"authType,omitempty"`
	BandwidthMeasurements *bool          `json:"bandwidthMeasurements,omitempty" te:"int-bool"`
	ContentRegex          *string        `json:"contentRegex,omitempty"`
	Credentials           *[]int         `json:"credentials,omitempty"`
	CustomHeaders         *CustomHeaders `json:"customHeaders,omitempty"`
	DesiredStatusCode     *string        `json:"desiredStatusCode,omitempty"`
	HTTPTargetTime        *int           `json:"httpTargetTime,omitempty"`
	HTTPTimeLimit         *int           `json:"httpTimeLimit,omitempty"`
	HTTPVersion           *int           `json:"httpVersion,omitempty"`
	IncludeHeaders        *bool          `json:"includeHeaders,omitempty" te:"int-bool"`
	Interval              *int           `json:"interval,omitempty"`
	MTUMeasurements       *bool          `json:"mtuMeasurements,omitempty" te:"int-bool"`
	NetworkMeasurements   *bool          `json:"networkMeasurements,omitempty" te:"int-bool"`
	NumPathTraces         *int           `json:"numPathTraces,omitempty"`
	Password              *string        `json:"password,omitempty"`
	PathTraceMode         *string        `json:"pathTraceMode,omitempty"`
	ProbeMode             *string        `json:"probeMode,omitempty"`
	Protocol              *string        `json:"protocol,omitempty"`
	SSLVersionID          *int64         `json:"sslVersionId,omitempty"`
	SubInterval           *int           `json:"subinterval,omitempty"`
	TargetTime            *int           `json:"targetTime,omitempty"`
	TimeLimit             *int           `json:"timeLimit,omitempty"`
	TransactionScript     *string        `json:"transactionScript,omitempty"`
	URL                   *string        `json:"url,omitempty"`
	UseNTLM               *bool          `json:"useNtlm,omitempty" te:"int-bool"`
	UserAgent             *string        `json:"userAgent,omitempty"`
	Username              *string        `json:"username,omitempty"`
	VerifyCertificate     *bool          `json:"verifyCertificate,omitempty" te:"int-bool"`
}

WebTransaction - a web transcation test

func (WebTransaction) MarshalJSON

func (t WebTransaction) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

func (*WebTransaction) UnmarshalJSON

func (t *WebTransaction) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface. It ensures that ThousandEyes int fields that only use the values 0 or 1 are treated as booleans.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL