requests

package
v0.0.0-...-7c0796b Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterMetricSubrequest

type CounterMetricSubrequest struct {
	MetricName   string `json:"id"`
	MetricType   string `json:"type"`
	CounterValue int64  `json:"delta"`
}

type GaugeMetricSubrequest

type GaugeMetricSubrequest struct {
	MetricName string  `json:"id"`
	MetricType string  `json:"type"`
	GaugeValue float64 `json:"value"`
}

type GetMetricRequest

type GetMetricRequest struct {
	MetricType string `json:"type"`
	MetricName string `json:"id"`
	IsJSON     bool   `json:"-"`
	Error      error  `json:"-"`
}

type SaveMetricListRequest

type SaveMetricListRequest []*SaveMetricRequest

type SaveMetricRequest

type SaveMetricRequest struct {
	MetricType   string   `json:"type"`
	MetricName   string   `json:"id"`
	CounterValue *int64   `json:"delta,omitempty"` // значение метрики в случае передачи counter
	GaugeValue   *float64 `json:"value,omitempty"` // значение метрики в случае передачи gauge
	IsJSON       bool     `json:"-"`
	Error        error    `json:"-"`
}

func (*SaveMetricRequest) GetCounterValue

func (r *SaveMetricRequest) GetCounterValue() *int64

func (*SaveMetricRequest) GetGaugeValue

func (r *SaveMetricRequest) GetGaugeValue() *float64

func (*SaveMetricRequest) GetIsJSON

func (r *SaveMetricRequest) GetIsJSON() bool

func (*SaveMetricRequest) GetMetricName

func (r *SaveMetricRequest) GetMetricName() string

func (*SaveMetricRequest) GetMetricType

func (r *SaveMetricRequest) GetMetricType() string

Jump to

Keyboard shortcuts

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