Documentation ¶
Index ¶
Constants ¶
const GetHistoriesResult = `` /* 358-byte string literal not displayed */
GetHistoriesResult provides a single page of Usage results.
const ListResult = `` /* 766-byte string literal not displayed */
ListResult provides a single page of Usage results.
Variables ¶
var ExpectedHistories = &usages.UsageHistories{ Unit: "License", ResourceID: "1bc271e7a8af4d988ff91612f5b122f8", LicenseType: "vCenter Server 6.x Standard", Histories: []usages.History{FirstHistory, SecondHistory}, }
ExpectedHistories is the UsageHistories expected to be returned from GetHistoriesResult.
var ExpectedUsagesSlice = []usages.Usage{FirstUsage, SecondUsage}
ExpectedUsagesSlice is the slice of LicenseTypes expected to be returned from ListResult.
var FirstHistory = usages.History{ Time: time.Date(2019, 10, 10, 0, 0, 0, 0, time.UTC), Value: "1", }
FirstHistory is the first History in the Get histories request.
var FirstUsage = usages.Usage{ ID: "9ada4c06-a2a4-46d5-b969-72ac12433a79", Type: "dedicated-hypervisor.guest-image.vcenter-server-6-0-standard", Value: "2", Unit: "License", Name: "vCenter Server 6.x Standard", Description: "vCenter Server 6.x Standard", HasLicenseKey: true, ResourceID: "1bc271e7a8af4d988ff91612f5b122f8", }
FirstUsage is the first Usage in the List request.
var SecondHistory = usages.History{ Time: time.Date(2019, 10, 10, 1, 0, 0, 0, time.UTC), Value: "1", }
SecondHistory is the second History in the Get histories request.
var SecondUsage = usages.Usage{ ID: "9da9116d-cc44-4ad8-aca5-7db398fcb478", Type: "dedicated-hypervisor.guest-image.sql-server-2014-standard", Value: "6", Unit: "vCPU", Name: "SQL Server 2014 Standard Edition", Description: "SQL Server 2014 Standard Edition", HasLicenseKey: false, ResourceID: "d-cc44-4ad8-aca5-7db398fcb477bbbbbb", }
SecondUsage is the second Usage in the List request.
Functions ¶
func HandleGetHistoriesSuccessfully ¶
HandleGetHistoriesSuccessfully creates an HTTP handler at `/usages/<usageID>/histories` on the test handler mux that responds with usage histories.
func HandleListUsagesSuccessfully ¶
HandleListUsagesSuccessfully creates an HTTP handler at `/usages` on the test handler mux that responds with a list of two Usages.
Types ¶
This section is empty.