Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connector ¶
type Connector interface {
namespace.Handler
CountEvents(ctx context.Context, namespace string, params CountEventsParams) ([]CountEventRow, error)
ListEvents(ctx context.Context, namespace string, params meterevent.ListEventsParams) ([]RawEvent, error)
ListEventsV2(ctx context.Context, params meterevent.ListEventsV2Params) ([]RawEvent, error)
CreateMeter(ctx context.Context, namespace string, meter meter.Meter) error
UpdateMeter(ctx context.Context, namespace string, meter meter.Meter) error
DeleteMeter(ctx context.Context, namespace string, meter meter.Meter) error
QueryMeter(ctx context.Context, namespace string, meter meter.Meter, params QueryParams) ([]meter.MeterQueryRow, error)
ListMeterSubjects(ctx context.Context, namespace string, meter meter.Meter, params ListMeterSubjectsParams) ([]string, error)
BatchInsert(ctx context.Context, events []RawEvent) error
ValidateJSONPath(ctx context.Context, jsonPath string) (bool, error)
}
type CountEventRow ¶
CountEventRow represents a row in the count events response.
type CountEventsParams ¶
type ListMeterSubjectsParams ¶
ListMeterSubjectsParams is a parameter object for listing subjects.
func (ListMeterSubjectsParams) Validate ¶
func (p ListMeterSubjectsParams) Validate() error
Validate validates the list meters parameters.
type QueryParams ¶
type QueryParams struct {
ClientID *string
From *time.Time
To *time.Time
FilterSubject []string
FilterGroupBy map[string][]string
GroupBy []string
WindowSize *meter.WindowSize
WindowTimeZone *time.Location
}
func (*QueryParams) Validate ¶
func (p *QueryParams) Validate() error
Validate validates query params focusing on `from` and `to` being aligned with query and meter window sizes
type RawEvent ¶
type RawEvent struct {
Namespace string `ch:"namespace"`
ID string `ch:"id"`
Type string `ch:"type"`
Source string `ch:"source"`
Subject string `ch:"subject"`
Time time.Time `ch:"time"`
Data string `ch:"data"`
IngestedAt time.Time `ch:"ingested_at"`
StoredAt time.Time `ch:"stored_at"`
}
RawEvent represents a single raw event
Click to show internal directories.
Click to hide internal directories.