everbridgesdk

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: MIT Imports: 12 Imported by: 0

README

Everbridge SDK for Go

Build Status Go Report Card Docs License

The everbridgesdk package provides a Golang SDK for Everbridge using the Everbridge REST API.

Contributing

Features, Issues, and Pull Requests are always welcome.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	ClientCore            ClientCore
	EndpointContacts      EndpointContacts
	EndpointOrganizations EndpointOrganizations
}

func NewClient

func NewClient(username string, password string, dataDir string) Client

type ClientCore

type ClientCore struct {
	Protocol      string
	Hostname      string
	BaseURL       string
	BasicAuthz    string
	NetHTTPClient *http.Client
	DataDir       string
}

func NewClientCore

func NewClientCore(username string, password string, dataDir string) ClientCore

func (*ClientCore) LoadClient

func (cc *ClientCore) LoadClient()

func (*ClientCore) LoadCredentials

func (cc *ClientCore) LoadCredentials(username string, password string)

func (*ClientCore) NewRequestForMethodAndURL added in v0.2.0

func (cc *ClientCore) NewRequestForMethodAndURL(method string, url string) (*http.Request, error)

type EndpointContacts

type EndpointContacts struct {
	ClientCore ClientCore
}

func NewEndpointsContacts

func NewEndpointsContacts() EndpointContacts

func (*EndpointContacts) Get

func (ep *EndpointContacts) Get(organizationID int64, pageNumber int64) (*http.Response, error)

func (*EndpointContacts) GetFilenameForOrgIDAndPageNum added in v0.2.0

func (ep *EndpointContacts) GetFilenameForOrgIDAndPageNum(organizationID int64, pageNumber int64) string

func (*EndpointContacts) GetStoreAll

func (ep *EndpointContacts) GetStoreAll(organizationID int64, dir string) error

type EndpointContactsResponse

type EndpointContactsResponse struct {
	Message      string `json:"message"`
	FirstPageURI string `json:"firstPageUri"`
	NextPageURI  string `json:"nextPageUri"`
	LastPageURI  string `json:"lastPageUri"`
	Page         EndpointContactsResponseObjectPage
}

func GetEprContactsForBody

func GetEprContactsForBody(content []byte) (EndpointContactsResponse, error)

type EndpointContactsResponseObjectContactAttribute

type EndpointContactsResponseObjectContactAttribute struct {
	Values    []string `json:"Values"`
	OrgAttrID int64    `json:"OrgAttrId"`
	Name      string   `json:"Name"`
}

type EndpointContactsResponseObjectContactPath

type EndpointContactsResponseObjectContactPath struct {
	WaitTime    int64  `json:"WaitTime"`
	Status      string `json:"Status"`
	PathID      int64  `json:"PathId"`
	CountryCode string `json:"CountryCode"`
	Value       string `json:"Value"`
}

type EndpointContactsResponseObjectContactWrapper

type EndpointContactsResponseObjectContactWrapper struct {
	LastModifiedTime  int64                                            `json:"lastModifiedTime"`
	OrganizationID    int64                                            `json:"organizationId"`
	CreatedDate       int64                                            `json:"createdDate"`
	Groups            []int64                                          `json:"groups"`
	CreatedName       string                                           `json:"createdName"`
	LastName          string                                           `json:"lastName"`
	Status            string                                           `json:"status"`
	Country           string                                           `json:"country"`
	RecordTypeID      int64                                            `json:"recordTypeId"`
	LastModifiedName  string                                           `json:"lastModifiedName"`
	AccountID         int64                                            `json:"accountId"`
	ExternalID        string                                           `json:"externalId"`
	ID                int64                                            `json:"id"`
	FirstName         string                                           `json:"firstName"`
	UploadProcessing  bool                                             `json:"uploadProcessing"`
	ResourceBundleID  int64                                            `json:"resourceBundleId"`
	CreatedID         int64                                            `json:"createdId"`
	LastModifiedID    int64                                            `json:"lastModifiedId"`
	LastModifiedDate  int64                                            `json:"lastModifiedDate"`
	ContactAttributes []EndpointContactsResponseObjectContactAttribute `json:"contactAttributes"`
	Paths             []EndpointContactsResponseObjectContactPath      `json:"paths"`
}

func GetEpoContactsForBody

func GetEpoContactsForBody(content []byte) ([]EndpointContactsResponseObjectContactWrapper, error)

func GetEpoContactsForPath

func GetEpoContactsForPath(filepath string) ([]EndpointContactsResponseObjectContactWrapper, error)

type EndpointContactsResponseObjectPage

type EndpointContactsResponseObjectPage struct {
	Data           []EndpointContactsResponseObjectContactWrapper `json:"data"`
	PageSize       int64                                          `json:"pageSize"`
	Start          int64                                          `json:"start"`
	TotalCount     int64                                          `json:"totalCount"`
	TotalPageCount int64                                          `json:"totalPageCount"`
	CurrentPageNo  int64                                          `json:"currentPageNo"`
}

type EndpointOrganizations

type EndpointOrganizations struct {
	ClientCore ClientCore
}

func (*EndpointOrganizations) Get

func (epo *EndpointOrganizations) Get() (*http.Response, error)

func (*EndpointOrganizations) GetOrganizationIds

func (epo *EndpointOrganizations) GetOrganizationIds() ([]int64, error)

Jump to

Keyboard shortcuts

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