Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct { Version string `json:"version"` Metrics map[string]interface{} `json:"metrics"` Os string `json:"os"` Arch string `json:"arch"` Edition string `json:"edition"` HasValidLicense bool `json:"hasValidLicense"` Packaging string `json:"packaging"` UsageStatsId string `json:"usageStatsId"` }
type SendReportCallbackFunc ¶
type SendReportCallbackFunc func()
type Service ¶
type Service interface { GetUsageReport(context.Context) (Report, error) RegisterMetricsFunc(MetricsFunc) RegisterSendReportCallback(SendReportCallbackFunc) SetReadyToReport(context.Context) }
type UsageStatsMock ¶
func (*UsageStatsMock) GetUsageReport ¶
func (usm *UsageStatsMock) GetUsageReport(ctx context.Context) (Report, error)
func (*UsageStatsMock) RegisterMetricsFunc ¶
func (usm *UsageStatsMock) RegisterMetricsFunc(fn MetricsFunc)
func (*UsageStatsMock) RegisterSendReportCallback ¶
func (usm *UsageStatsMock) RegisterSendReportCallback(_ SendReportCallbackFunc)
func (*UsageStatsMock) SetReadyToReport ¶
func (usm *UsageStatsMock) SetReadyToReport(_ context.Context)
Click to show internal directories.
Click to hide internal directories.