Documentation ¶
Index ¶
- type BillableEvent
- type BillableEventConsolidator
- type BillableEventForecaster
- type BillableEventReader
- type BillableEventRows
- type ConsolidatedBillableEventReader
- type CurrencyRate
- type CurrencyRateReader
- type EventFetcher
- type EventFilter
- type EventStore
- type Price
- type PriceComponent
- type PricingPlan
- type PricingPlanComponent
- type PricingPlanReader
- type RawEvent
- type RawEventFilter
- type RawEventReader
- type RawEventWriter
- type TimeRangeFilter
- type TotalCost
- type TotalCostReader
- type UsageEvent
- type UsageEventReader
- type UsageEventRows
- type VATRate
- type VATRateReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BillableEvent ¶
type BillableEvent struct { EventGUID string `json:"event_guid"` EventStart string `json:"event_start"` EventStop string `json:"event_stop"` ResourceGUID string `json:"resource_guid"` ResourceName string `json:"resource_name"` ResourceType string `json:"resource_type"` OrgGUID string `json:"org_guid"` OrgName string `json:"org_name"` SpaceGUID string `json:"space_guid"` SpaceName string `json:"space_name"` PlanGUID string `json:"plan_guid"` PlanName string `json:"plan_name"` QuotaDefinitionGUID string `json:"quota_definition_guid"` NumberOfNodes int64 `json:"number_of_nodes"` MemoryInMB int64 `json:"memory_in_mb"` StorageInMB int64 `json:"storage_in_mb"` Price Price `json:"price"` }
func (*BillableEvent) Scan ¶
func (e *BillableEvent) Scan(src interface{}) error
type BillableEventConsolidator ¶ added in v0.43.0
type BillableEventForecaster ¶
type BillableEventForecaster interface { ForecastBillableEventRows(ctx context.Context, events []UsageEvent, filter EventFilter) (BillableEventRows, error) ForecastBillableEvents(events []UsageEvent, filter EventFilter) ([]BillableEvent, error) }
type BillableEventReader ¶
type BillableEventReader interface { GetBillableEventRows(ctx context.Context, filter EventFilter) (BillableEventRows, error) GetBillableEvents(filter EventFilter) ([]BillableEvent, error) }
type BillableEventRows ¶
type ConsolidatedBillableEventReader ¶ added in v0.43.0
type ConsolidatedBillableEventReader interface { GetConsolidatedBillableEventRows(ctx context.Context, filter EventFilter) (BillableEventRows, error) GetConsolidatedBillableEvents(filter EventFilter) ([]BillableEvent, error) IsRangeConsolidated(filter EventFilter) (bool, error) }
type CurrencyRate ¶ added in v0.24.0
type CurrencyRateReader ¶ added in v0.57.0
type CurrencyRateReader interface {
GetCurrencyRates(filter TimeRangeFilter) ([]CurrencyRate, error)
}
type EventFetcher ¶
type EventFilter ¶
func (*EventFilter) SplitByMonth ¶ added in v0.43.0
func (filter *EventFilter) SplitByMonth() ([]EventFilter, error)
func (*EventFilter) String ¶ added in v0.132.0
func (filter *EventFilter) String() string
func (*EventFilter) TruncateMonth ¶ added in v0.43.0
func (filter *EventFilter) TruncateMonth() (EventFilter, error)
func (*EventFilter) Validate ¶
func (filter *EventFilter) Validate() error
type EventStore ¶
type EventStore interface { Init() error Refresh() error RecordPeriodicMetrics() error Ping() error PricingPlanReader CurrencyRateReader VATRateReader RawEventWriter RawEventReader UsageEventReader TotalCostReader BillableEventReader BillableEventForecaster ConsolidatedBillableEventReader BillableEventConsolidator }
type Price ¶
type Price struct { IncVAT string `json:"inc_vat"` ExVAT string `json:"ex_vat"` Details []PriceComponent `json:"details"` }
type PriceComponent ¶
type PriceComponent struct { Name string `json:"name"` PlanName string `json:"plan_name"` Start string `json:"start"` Stop string `json:"stop"` VatRate string `json:"vat_rate"` VatCode string `json:"vat_code"` CurrencyCode string `json:"currency_code"` IncVAT string `json:"inc_vat"` ExVAT string `json:"ex_vat"` }
type PricingPlan ¶ added in v0.24.0
type PricingPlan struct { Name string `json:"name"` PlanGUID string `json:"plan_guid"` ValidFrom string `json:"valid_from"` Components []PricingPlanComponent `json:"components"` MemoryInMB uint `json:"memory_in_mb"` StorageInMB uint `json:"storage_in_mb"` NumberOfNodes uint `json:"number_of_nodes"` }
type PricingPlanComponent ¶ added in v0.24.0
type PricingPlanReader ¶ added in v0.24.0
type PricingPlanReader interface {
GetPricingPlans(filter TimeRangeFilter) ([]PricingPlan, error)
}
type RawEvent ¶
type RawEventFilter ¶
type RawEventReader ¶
type RawEventReader interface {
GetEvents(filter RawEventFilter) ([]RawEvent, error)
}
type RawEventWriter ¶
type TimeRangeFilter ¶ added in v0.57.0
func (*TimeRangeFilter) Validate ¶ added in v0.57.0
func (filter *TimeRangeFilter) Validate() error
type TotalCostReader ¶ added in v0.65.0
type UsageEvent ¶
type UsageEvent struct { EventGUID string `json:"event_guid"` EventStart string `json:"event_start"` EventStop string `json:"event_stop"` ResourceGUID string `json:"resource_guid"` ResourceName string `json:"resource_name"` ResourceType string `json:"resource_type"` OrgGUID string `json:"org_guid"` OrgName string `json:"org_name"` SpaceGUID string `json:"space_guid"` SpaceName string `json:"space_name"` PlanGUID string `json:"plan_guid"` PlanName string `json:"plan_name"` ServiceGUID string `json:"service_guid"` ServiceName string `json:"service_name"` NumberOfNodes int64 `json:"number_of_nodes"` MemoryInMB int64 `json:"memory_in_mb"` StorageInMB int64 `json:"storage_in_mb"` }
type UsageEventReader ¶
type UsageEventReader interface { GetUsageEventRows(filter EventFilter) (UsageEventRows, error) GetUsageEvents(filter EventFilter) ([]UsageEvent, error) }
type UsageEventRows ¶
type VATRateReader ¶ added in v0.57.0
type VATRateReader interface {
GetVATRates(filter TimeRangeFilter) ([]VATRate, error)
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.