billing

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsoluteEvent

type AbsoluteEvent struct {
	IdempotencyKey string    `json:"idempotency_key"`
	MetricName     string    `json:"metric"`
	Type           string    `json:"type"`
	TenantID       string    `json:"tenant_id"`
	TimelineID     string    `json:"timeline_id"`
	Time           time.Time `json:"time"`
	Value          int       `json:"value"`
}

type Batch

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

func (*Batch) AddAbsoluteEvent

func (b *Batch) AddAbsoluteEvent(e AbsoluteEvent)

func (*Batch) AddIncrementalEvent

func (b *Batch) AddIncrementalEvent(e IncrementalEvent)

func (*Batch) Count added in v0.1.9

func (b *Batch) Count() int

Count returns the number of events in the batch

func (*Batch) Send

func (b *Batch) Send(ctx context.Context) error

type Client

type Client struct {
	BaseURL string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(url string, c *http.Client) Client

func (Client) NewBatch

func (c Client) NewBatch() *Batch

type IncrementalEvent

type IncrementalEvent struct {
	IdempotencyKey string    `json:"idempotency_key"`
	MetricName     string    `json:"metric"`
	Type           string    `json:"type"`
	EndpointID     string    `json:"endpoint_id"`
	StartTime      time.Time `json:"start_time"`
	StopTime       time.Time `json:"stop_time"`
	Value          int       `json:"value"`
}

Jump to

Keyboard shortcuts

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