Documentation ¶
Index ¶
- Variables
- func CreateKeyValuePairs(m map[string]string) string
- type Account
- type AccountImage
- type EmailAddress
- type ErrorInfo
- type ErrorNotification
- type MessageType
- type MetricDb
- type Notification
- type Quote
- type RequestInfo
- type ResponseBodyNotification
- type ResponseCodeNotification
- type ResponseTimeNotification
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrResposeCode = errors.New("Response code does not Match expected value") ErrResposeBody = errors.New("Response body does not match expected value") ErrTimeout = errors.New("Request Time out Error") ErrCreateRequest = errors.New("Invalid Request Config. Not able to create request") ErrDoRequest = errors.New("Request failed") )
Functions ¶
func CreateKeyValuePairs ¶
Types ¶
type Account ¶
type Account struct { ID string `json:"id"` Name string `json:"name"` ServedBy string `json:"servedBy"` Quote Quote `json:"quote"` ImageData AccountImage `json:"imageData"` }
Account defines ...
type AccountImage ¶
AccountImage
func (*AccountImage) ToString ¶
func (a *AccountImage) ToString() string
ToString is a somewhat generic ToString method.
type EmailAddress ¶
type EmailAddress string
EmailAddress is just a little experiment with go types.
type ErrorNotification ¶
type MessageType ¶
type MessageType string
var ( // ResponseTimeMessage = "Warning notification From Endpoint Monitor" + // "\n\nAPI response is returning slower than expected." + // "\n\nDetails below:" + // "\nUrl: %v \nRequestType: %v \nCurrent Average Response Time: %v ms\nExpected Response Time: %v ms\n" ResponseTimeMessage MessageType = "Warning notification From Endpoint Monitor" + "\n\nAPI response is returning slower than expected." + "\n\nDetails below:" + "\nUrl: %v \nRequestType: %v \nCurrent Average Response Time: %v ms\nExpected Response Time: %v ms\n" ResponseCodeMessage MessageType = "ResponseCode" ResponseBodyMessage MessageType = "ResponseBody" CertMismatchMessage MessageType = "CertMismatch" CertExpiringMessage MessageType = "CertExpiring" CertExpiredMessage MessageType = "CertExpired" ErrorMessage MessageType = "Error notification From Endpoint Monitor" + "\n\nCannot communicate with " + "\n\nPlease find the Details below" + "\n\nUrl: %v \nRequestType: %v \nError Message: %v \nOther Info:%v\n" // "\n\nUrl: %v \nRequestType: %v \nError Message: %v \nResponse Body: %v\nOther Info:%v\n"+ // "\n\nThanks", errorNotification.Url, errorNotification.RequestType, errorNotification.Error, errorNotification.ResponseBody, model.ErrorNotification.OtherInfo) InformationMessage MessageType = "Information" )
type Notification ¶
type Notification struct { Url string MessageType MessageType Endpoints []string RequestType string Environment string Priority string ExpectedResponseCode int64 ResponseCode int64 ExpectedResponseTime int64 ExpectedResponseBody string ResponseTime int64 ResponseBody string Subject string Description string Message string Error string OtherInfo string Tags []string Details map[string]string Note string // contains filtered or unexported fields }
func CreateNotification ¶
func CreateNotification(n Notification) Notification
type Quote ¶
type Quote struct { Text string `json:"quote"` ServedBy string `json:"ipAddress"` Language string `json:"language"` }
Quote defines a Quote as provided by the quotes-service
type RequestInfo ¶
Click to show internal directories.
Click to hide internal directories.