api

package
v0.8.9-1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: BSD-2-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Cfg() *config.Config
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(app Application, storage *storage.Storage) *Handler

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Handler) Shutdown

func (h *Handler) Shutdown() error

type MetricToolArgs

type MetricToolArgs struct {
	ID         float64 `json:"id"`
	From       float64 `json:"from"`
	To         float64 `json:"to"`
	Step       float64 `json:"step"`
	Aggregator string  `json:"aggregator"`
}

type MetricsToolArgs

type MetricsToolArgs struct {
	From     float64 `json:"from"`
	To       float64 `json:"to"`
	Step     float64 `json:"step"`
	Page     float64 `json:"page"`
	PageSize float64 `json:"page-size"` //nolint:tagliatelle
}

type MockApplication

type MockApplication struct {
	mock.Mock
}

MockApplication is an autogenerated mock type for the Application type

func NewMockApplication

func NewMockApplication(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockApplication

NewMockApplication creates a new instance of MockApplication. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockApplication) Cfg

func (_m *MockApplication) Cfg() *config.Config

Cfg provides a mock function with no fields

Jump to

Keyboard shortcuts

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