httpdriver

package
v1.0.0-beta.228 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToAPIMeter

func ToAPIMeter(m meter.Meter) api.Meter

ToAPIMeter converts a meter.Meter to an api.Meter.

func ToAPIMeterQueryResult

func ToAPIMeterQueryResult(from *time.Time, to *time.Time, windowSize *api.WindowSize, rows []meter.MeterQueryRow) api.MeterQueryResult

ToAPIMeterQueryResult constructs an api.MeterQueryResult

func ToAPIMeterQueryRow

func ToAPIMeterQueryRow(row meter.MeterQueryRow) api.MeterQueryRow

ToAPIMeterQueryRow converts a meter.MeterQueryRow to an api.MeterQueryRow.

func ToAPIMeterQueryRowList

func ToAPIMeterQueryRowList(rows []meter.MeterQueryRow) []api.MeterQueryRow

ToAPIMeterQueryRowList converts a list of meter.MeterQueryRow to a list of api.MeterQueryRow.

func ToRequestFromQueryParamsPOSTBody

func ToRequestFromQueryParamsPOSTBody(apiParams api.QueryMeterParams) api.QueryMeterPostJSONRequestBody

ToQueryParamsFromAPIParams converts a api.QueryMeterParams to a streaming.QueryParams. This is used to convert an API POST query body to GET request params.

Types

type CreateMeterRequest

type CreateMeterRequest = struct {
	Namespace string
	api.MeterCreate
}

type CreateMeterResponse

type CreateMeterResponse = api.Meter

type DeleteMeterParams

type DeleteMeterParams = string

type DeleteMeterRequest

type DeleteMeterRequest = models.NamespacedID

type DeleteMeterResponse

type DeleteMeterResponse = any

type GetMeterParams

type GetMeterParams = string

type GetMeterRequest

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

type GetMeterResponse

type GetMeterResponse = api.Meter

type Handler

type Handler interface {
	MeterHandler
}

func New

func New(
	namespaceDecoder namespacedriver.NamespaceDecoder,
	customerService customer.Service,
	meterService meter.ManageService,
	streaming streaming.Connector,
	subjectService subject.Service,
	options ...httptransport.HandlerOption,
) Handler

type ListGroupByValuesParams

type ListGroupByValuesParams struct {
	IdOrSlug   string
	GroupByKey string
	From       *time.Time
	To         *time.Time
	Search     *string
}

type ListGroupByValuesRequest

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

type ListGroupByValuesResponse

type ListGroupByValuesResponse = *[]string

type ListMetersParams

type ListMetersParams = api.ListMetersParams

type ListMetersRequest

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

type ListMetersResponse

type ListMetersResponse = []api.Meter

type ListSubjectsParams

type ListSubjectsParams struct {
	IdOrSlug string
	From     *time.Time
	To       *time.Time
}

type ListSubjectsRequest

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

type ListSubjectsResponse

type ListSubjectsResponse = *[]string

type MeterHandler

type MeterHandler interface {
	ListMeters() ListMetersHandler
	GetMeter() GetMeterHandler
	CreateMeter() CreateMeterHandler
	UpdateMeter() UpdateMeterHandler
	DeleteMeter() DeleteMeterHandler
	QueryMeter() QueryMeterHandler
	QueryMeterPost() QueryMeterPostHandler
	QueryMeterPostCSV() QueryMeterPostCSVHandler
	QueryMeterCSV() QueryMeterCSVHandler
	ListSubjects() ListSubjectsHandler
	ListGroupByValues() ListGroupByValuesHandler
}

type QueryMeterCSVParams

type QueryMeterCSVParams = QueryMeterParams

type QueryMeterCSVRequest

type QueryMeterCSVRequest = QueryMeterRequest

type QueryMeterCSVResponse

type QueryMeterCSVResponse = commonhttp.CSVResponse

func NewQueryMeterCSVResult

func NewQueryMeterCSVResult(meterSlug string, queryGroupBy []string, rows []meter.MeterQueryRow, subjectsByKey map[string]subject.Subject) QueryMeterCSVResponse

type QueryMeterParams

type QueryMeterParams struct {
	api.QueryMeterParams
	IdOrSlug string
}

type QueryMeterPostCSVParams

type QueryMeterPostCSVParams = QueryMeterPostParams

type QueryMeterPostCSVRequest

type QueryMeterPostCSVRequest = QueryMeterPostRequest

type QueryMeterPostCSVResponse

type QueryMeterPostCSVResponse = commonhttp.CSVResponse

type QueryMeterPostParams

type QueryMeterPostParams = string // meterIdOrSlug

type QueryMeterPostRequest

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

type QueryMeterPostResponse

type QueryMeterPostResponse = QueryMeterResponse

type QueryMeterRequest

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

type QueryMeterResponse

type QueryMeterResponse = *api.MeterQueryResult

type UpdateMeterRequest

type UpdateMeterRequest = struct {
	api.MeterUpdate
	// contains filtered or unexported fields
}

type UpdateMeterResponse

type UpdateMeterResponse = api.Meter

Jump to

Keyboard shortcuts

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