Package xmatters-go provides a Go client for interacting with the xMatters REST API.
xMatters is a communication platform that enables enterprises to manage and automate communication with their employees, customers, and other stakeholders during incidents and other critical events. This package allows you to programmatically access and utilize the xMatters REST API to integrate xMatters functionality into your Go applications.
This client library is primarily used by the xMatters Terraform Provider.
go get github.com/xmatters/xmatters-go
// Create a new XMattersAPI client with your API Token
apiToken := "your-api-token"
xmattersClient, err := xmatters.NewWithAPIToken(&apiToken)
if err != nil {
log.Fatal(err)
}
// Use the client to interact with the xMatters REST API
// For example, retrieve information about users:
users, err := xmattersClient.GetPersonList(nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(users)
type Device
type Device struct { ... }
Device represents a device in xMatters.
- func (*XMattersAPI) GetDevice
- func (*XMattersAPI) GetDeviceList
- func (*XMattersAPI) PushDevice
- func (*XMattersAPI) DeleteDevice
type Group
type Group struct { ... }
Group represents a group in xMatters.
- func (XMattersAPI) GetGroup
- func (*XMattersAPI) GetGroupList
- func (*XMattersAPI) PushGroup
- func (*XMattersAPI) DeleteGroup
type GroupMember
type GroupMember struct { ... }
GroupMember represents a shorthand version of a group member. It contains the ID and type of the member, which can be a person, device, or group.
- func (*XMattersAPI) GetGroupRoster
- func (*XMattersAPI) PushGroupRoster
- func (*XMattersAPI) PushGroupMembership
- func (*XMattersAPI) DeleteGroupMembership
type Person
type Person struct { ... }
Person represents a person in xMatters.
- func (*XMattersAPI) GetPerson
- func (*XMattersAPI) GetPersonList
- func (*XMattersAPI) PushPerson
- func (*XMattersAPI) DeletePerson
type Service
type Service struct { ... }
Service represents a service in xMatters.
- func (*XMattersAPI) GetService
- func (*XMattersAPI) GetServiceList
- func (*XMattersAPI) PushService
- func (*XMattersAPI) DeleteService
- func (*XMattersAPI) GetServiceDependency
- func (*XMattersAPI) PushServiceDependency
- func (*XMattersAPI) DeleteServiceDependency
type Site
type Site struct { ... }
Site represents a site in xMatters.
- func (*XMattersAPI) GetSite
- func (*XMattersAPI) GetSiteList
- func (*XMattersAPI) PushSite
- func (*XMattersAPI) DeleteSite