// GetStatusCodesCounts returns map with counts of the response codes
431983
func (m *RoundTripMetrics) GetStatusCodesCounts() map[int]int64 {
	sc := make(map[int]int64)
	for k, v := range m.statusCodes {
		if v.Count() != 0 {
			sc[k] = v.Count()
		}
	}
	return sc
}
727266
func GetEncodedStatus(ctx context.Context, config libkbfs.Config) (
	data []byte, t time.Time, err error) {
	status, _, err := config.KBFSOps().Status(ctx)
	if err != nil {
		config.Reporter().ReportErr(ctx, "", tlf.Private, libkbfs.ReadMode, err)
	}
	data, err = PrettyJSON(status)
	return
}
1001999
func (cs *Stats) GetStatistics() StatsEntry {
	cs.mutex.Lock()
	defer cs.mutex.Unlock()
	return cs.StatsEntry
}
282320
func statusCode(code int) string {
	if code >= 100 {
		switch {
		case code < 200:
			return statusCodeWithTable(code-100, statusCode100[:])
		case code < 300:
			return statusCodeWithTable(code-200, statusCode200[:])
		case code < 400:
			return statusCodeWithTable(code-300, statusCode300[:])
		case code < 500:
			return statusCodeWithTable(code-400, statusCode400[:])
		case code < 600:
			return statusCodeWithTable(code-500, statusCode500[:])
		}
	}
	return strconv.Itoa(code)
}
897405
func (p IDInfo) GetCounts() (Counts, int, error) {
	return p.Metrics.Counts, 0, nil
}
21524
func (o *GetOrderDefault) WithStatusCode(code int) *GetOrderDefault {
	o._statusCode = code
	return o
}
1259880
func (rb *ResponseBuffer) StatusCodeWriter(w http.ResponseWriter) http.ResponseWriter {
	return forcedStatusCodeWriter{w, rb}
}
977782
func (c *Client) GetWAFRuleStatuses(i *GetWAFRuleStatusesInput) (GetWAFRuleStatusesResponse, error) {
	statusResponse := GetWAFRuleStatusesResponse{Rules: []*WAFRuleStatus{}}
	if i.Service == "" {
		return statusResponse, ErrMissingService
	}
	if i.WAF == "" {
		return statusResponse, ErrMissingWAFID
	}

	path := fmt.Sprintf("/service/%s/wafs/%s/rule_statuses", i.Service, i.WAF)
	filters := &RequestOptions{Params: i.formatFilters()}

	resp, err := c.Get(path, filters)
	if err != nil {
		return statusResponse, err
	}
	err = c.interpretWAFRuleStatusesPage(&statusResponse, resp)
	// NOTE: It's possible for statusResponse to be partially completed before an error
	// was encountered, so the presence of a statusResponse doesn't preclude the presence of
	// an error.
	return statusResponse, err
}
999438
func (p *ProxyWriter) StatusCode() int {
	if p.code == 0 {
		// per contract standard lib will set this to http.StatusOK if not set
		// by user, here we avoid the confusion by mirroring this logic
		return http.StatusOK
	}
	return p.code
}
1215374
func getExitStatuses(p *pkgPod.Pod) (map[string]int, error) {
	_, manifest, err := p.PodManifest()
	if err != nil {
		return nil, err
	}

	stats := make(map[string]int)
	for _, app := range manifest.Apps {
		exitCode, err := p.AppExitCode(app.Name.String())
		if err != nil {
			continue
		}
		stats[app.Name.String()] = exitCode
	}
	return stats, nil
}
135182
func (o *GetAuthCallbackDefault) WithStatusCode(code int) *GetAuthCallbackDefault {
	o._statusCode = code
	return o
}
893453
func GetAppStatusCode(err error) (code keybase1.StatusCode, ok bool) {
	code = keybase1.StatusCode_SCGeneric
	switch err := err.(type) {
	case AppStatusError:
		return keybase1.StatusCode(err.Code), true
	default:
		return code, false
	}
}
294828
func (o *GetItemsDefault) WithStatusCode(code int) *GetItemsDefault {
	o._statusCode = code
	return o
}
915047
func (gc *GenericChannelAspect) GetStats() interface{} {
	gc.gcdLock.RLock()
	defer gc.gcdLock.RUnlock()

	var mod bytes.Buffer
	enc := gob.NewEncoder(&mod)
	dec := gob.NewDecoder(&mod)

	err := enc.Encode(gc.Gcd)
	if err != nil {
		return err
	}

	var cpy map[string]GenericChannelData
	err = dec.Decode(&cpy)
	if err != nil {
		return err
	}

	return cpy
}
582084
func (c *Client) GetStats(i *GetStatsInput) (*StatsResponse, error) {

	p := "/stats"

	if i.Service != "" {
		p = fmt.Sprintf("%s/service/%s", p, i.Service)
	}

	if i.Field != "" {
		p = fmt.Sprintf("%s/field/%s", p, i.Field)
	}

	r, err := c.Get(p, &RequestOptions{
		Params: map[string]string{
			"from":   i.From,
			"to":     i.To,
			"by":     i.By,
			"region": i.Region,
		},
	})
	if err != nil {
		return nil, err
	}

	var sr *StatsResponse
	if err := decodeJSON(&sr, r.Body); err != nil {
		return nil, err
	}

	return sr, nil
}
391527
func (o *AddOneDefault) WithStatusCode(code int) *AddOneDefault {
	o._statusCode = code
	return o
}
294770
func getStatus(db Database, globalKey, badge string) (_ status.StatusInfo, err error) {
	defer errors.DeferredAnnotatef(&err, "cannot get status")
	statuses, closer := db.GetCollection(statusesC)
	defer closer()

	var doc statusDoc
	err = statuses.FindId(globalKey).One(&doc)
	if err == mgo.ErrNotFound {
		return status.StatusInfo{}, errors.NotFoundf(badge)
	} else if err != nil {
		return status.StatusInfo{}, errors.Trace(err)
	}

	return status.StatusInfo{
		Status:  doc.Status,
		Message: doc.StatusInfo,
		Data:    utils.UnescapeKeys(doc.StatusData),
		Since:   unixNanoToTime(doc.Updated),
	}, nil
}