Documentation ¶
Index ¶
- Constants
- func GetRecordFieldStringValue(field string, fieldIndexes map[string]int, record []string) *string
- func GetRecordReservationProvider(fieldIndexes map[string]int, record []string) (*string, error)
- func MapReservationResourceToGenericReservation(resource ReservationResource) sdk.CastaiInventoryV1beta1GenericReservation
- func MapReservationsHeaderToReservationFieldIndexes(columns []string) map[string]int
- type ReservationResource
- func MapCsvRecordsToReservationResources(csvRecords [][]string) ([]*ReservationResource, error)
- func MapReservationDetailsToReservationResource(reservation sdk.CastaiInventoryV1beta1ReservationDetails) *ReservationResource
- func MapToReservationResourcesWithCommonFieldsOnly(reservationResources []*ReservationResource) []*ReservationResource
Constants ¶
View Source
const ( FieldReservationsCSV = "reservations_csv" FieldReservationsOrganizationId = "organization_id" FieldReservations = "reservations" FieldReservationName = "name" FieldReservationProvider = "provider" FieldReservationRegion = "region" FieldReservationInstanceType = "instance_type" FieldReservationPrice = "price" FieldReservationCount = "count" FieldReservationStartDate = "start_date" FieldReservationEndDate = "end_date" FieldReservationZoneId = "zone_id" FieldReservationZoneName = "zone_name" // Azure specific fields FieldReservationProductName = "product_name" FieldReservationQuantity = "quantity" FieldReservationPurchaseDate = "purchase_date" FieldReservationExpirationDate = "expiration_date" FieldReservationType = "type" FieldReservationDeepLinkToReservation = "deep_link_to_reservation" FieldReservationID = "reservation_id" FieldReservationScopeResourceGroup = "scope_resource_group" FieldReservationScopeSubscription = "scope_subscription" FieldReservationScopeStatus = "scope_status" FieldReservationScope = "scope" FieldReservationTerm = "term" FieldReservationStatus = "status" )
Variables ¶
This section is empty.
Functions ¶
func MapReservationResourceToGenericReservation ¶
func MapReservationResourceToGenericReservation(resource ReservationResource) sdk.CastaiInventoryV1beta1GenericReservation
Types ¶
type ReservationResource ¶
func MapCsvRecordsToReservationResources ¶
func MapCsvRecordsToReservationResources(csvRecords [][]string) ([]*ReservationResource, error)
func MapReservationDetailsToReservationResource ¶
func MapReservationDetailsToReservationResource(reservation sdk.CastaiInventoryV1beta1ReservationDetails) *ReservationResource
func MapToReservationResourcesWithCommonFieldsOnly ¶
func MapToReservationResourcesWithCommonFieldsOnly(reservationResources []*ReservationResource) []*ReservationResource
Click to show internal directories.
Click to hide internal directories.