p
Size: a a a
p
IK
DP
АП
// Do sends an API request and returns the API response. The API response is
// JSON decoded and stored in the value pointed to by v, or returned as an
// error if an API error has occurred. If v implements the io.Writer
// interface, the raw response body will be written to v, without attempting to
// first decode it.
func (c *Client) Do(req *retryablehttp.Request, v interface{}) (*Response, error) {
resp, err := c.client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
response := newResponse(resp)
if v != nil {
if w, ok := v.(io.Writer); ok {
_, err = io.Copy(w, resp.Body)
} else {
err = json.NewDecoder(resp.Body).Decode(v)
}
}
return response, err
}
АП
АП
IK
АП
p
IK
i
IK
type Integration struct {
ID string `json:"id"`
Name string `json:"name"`
Link string `json:"link"`
Type string `json:"type"`
IncidentsCount int `json:"incidents_count"`
Templates Templates `json:"templates"`
Slack Slack `json:"slack"`
}
type Templates struct {
GroupingKey string `json:"grouping_key"`
ResolveSignal string `json:"resolve_signal"`
}
type Slack struct {
Title string `json:"title"`
Message string `json:"message"`
ImageUrl string `json:"image_url"`
}
АП
type Integration struct {
ID string `json:"id"`
Name string `json:"name"`
Link string `json:"link"`
Type string `json:"type"`
IncidentsCount int `json:"incidents_count"`
Templates Templates `json:"templates"`
Slack Slack `json:"slack"`
}
type Templates struct {
GroupingKey string `json:"grouping_key"`
ResolveSignal string `json:"resolve_signal"`
}
type Slack struct {
Title string `json:"title"`
Message string `json:"message"`
ImageUrl string `json:"image_url"`
}
IK
ЕИ
p
p
type Integration struct {
ID string `json:"id"`
Name string `json:"name"`
Link string `json:"link"`
Type string `json:"type"`
IncidentsCount int `json:"incidents_count"`
Templates Templates `json:"templates"`
Slack Slack `json:"slack"`
}
type Templates struct {
GroupingKey string `json:"grouping_key"`
ResolveSignal string `json:"resolve_signal"`
}
type Slack struct {
Title string `json:"title"`
Message string `json:"message"`
ImageUrl string `json:"image_url"`
}
АП
type AutoGenerated struct {
ID string `json:"id"`
Name string `json:"name"`
Link string `json:"link"`
IncidentsCount int `json:"incidents_count"`
Type string `json:"type"`
Templates struct {
GroupingKey string `json:"grouping_key"`
ResolveSignal string `json:"resolve_signal"`
Slack struct {
Title string `json:"title"`
Message string `json:"message"`
ImageURL string `json:"image_url"`
} `json:"slack"`
} `json:"templates"`
}
АП
АП