Documentation
¶
Index ¶
- Constants
- Variables
- func BuildAggregateFunction() []map[string]any
- func BuildFieldFilters(input map[string][]string, output []map[string]string) []map[string]any
- func BuildFieldFiltersWithOperator(input map[string][]string, output []map[string]string, operator string) []map[string]any
- func BuildFilterValues(options *dto.CCMPerspectiveFilterValuesOptions) []map[string]any
- func BuildFilters(viewId string, timeFilters string, idFilters dto.CCMGraphQLFilters, ...) []map[string]any
- func BuildGroupBy(input map[string]any, outputFields []map[string]string, ...) []map[string]any
- func BuildKeyFieldFilter(input string, output map[string]map[string]any) ([]map[string]any, error)
- func BuildKeyFieldFilterWithOperator(fieldKey string, output map[string]map[string]any, operator string) ([]map[string]any, error)
- func BuildKeyValueFieldFilter(fieldKey string, fieldSubKey string, output map[string]map[string]any) ([]map[string]any, error)
- func BuildKeyValueFieldFilterWithOperator(fieldKey string, fieldSubKey string, output map[string]map[string]any, ...) ([]map[string]any, error)
- func BuildKeyValueFieldFilters(input dto.CCMGraphQLKeyValueFilters, output []map[string]string) []map[string]any
- func BuildKeyValueFieldFiltersWithOperator(input dto.CCMGraphQLKeyValueFilters, output []map[string]string, ...) []map[string]any
- func BuildLabelsV2KeysFilters(options *dto.CCMListLabelsV2KeysOptions) []map[string]any
- func BuildOutputFieldsMap() map[string]map[string]any
- func BuildPreferences() map[string]any
- func BuildTimeFilters(timeFilter string) []map[string]any
- func BuildViewFilter(viewId string) []map[string]any
- func DebugPayload(ctx context.Context, operation string, payload map[string]any)
- func GetFilterFieldByType(fieldType string) map[string]string
- func GetTimeRangeFromFilter(filter string, now time.Time) (start, end time.Time)
- func MapToJSONString(m map[string]any) string
Constants ¶
View Source
const CCMFetchPerspectiveFiltersValueQuery = `` /* 447-byte string literal not displayed */
View Source
const CCMMetadataQuery = `` /* 610-byte string literal not displayed */
View Source
const CCMPerspectiveBudgetQuery = `` /* 220-byte string literal not displayed */
View Source
const CCMPerspectiveGridQuery = `` /* 822-byte string literal not displayed */
View Source
const CCMPerspectiveRecommendationsQuery = `` /* 363-byte string literal not displayed */
View Source
const CCMPerspectiveSummaryWithBudgetQuery = `` /* 1316-byte string literal not displayed */
View Source
const CCMPerspectiveTimeSeriesQuery = `` /* 683-byte string literal not displayed */
Variables ¶
View Source
var ConditionFieldDescriptions = []map[string]string{
{
"fieldId": "region",
"description": "Use this field to create a view filter rule to filter by cloud region.",
},
{
"fieldId": "awsUsageaccountid",
"description": "Use this field to create a view filter rule to filter by AWS usage account ID.",
},
{
"fieldId": "awsServicecode",
"description": "Use this field to create a view filter rule to filter by AWS service code.",
},
{
"fieldId": "awsBillingEntity",
"description": "Use this field to create a view filter rule to filter by AWS billing entity.",
},
{
"fieldId": "awsInstancetype",
"description": "Use this field to create a view filter rule to filter by AWS instance type.",
},
{
"fieldId": "awsLineItemType",
"description": "Use this field to create a view filter rule to filter by AWS line item type.",
},
{
"fieldId": "awspayeraccountid",
"description": "Use this field to create a view filter rule to filter by AWS payer account ID.",
},
{
"fieldId": "awsUsageType",
"description": "Use this field to create a view filter rule to filter by AWS usage type.",
},
{
"fieldId": "cloudprovider",
"description": "use this field to create a view filter rule to filter by cloud provider.",
},
{
"fieldId": "none",
"description": "use this field to create a view filter rule with no filter or grouping applied.",
},
{
"fieldId": "product",
"description": "use this field to create a view filter rule to filter by product.",
},
}
View Source
var ConditionKeyValueFieldDescriptions = []map[string]string{
{
"fieldId": "label",
"description": labelDescription,
},
{
"fieldId": "label_v2",
"description": labelV2Description,
},
{
"fieldId": "business_mapping",
"description": costCategoryDescription,
},
}
View Source
var DefaultGroupBy = []map[string]any{ { "entityGroupBy": map[string]any{ "fieldId": "product", "fieldName": "Product", "identifier": "COMMON", "identifierName": "Common", }, }, }
View Source
var OutputFields = []map[string]string{
{
"fieldId": "region",
"fieldName": "Region",
"identifier": "COMMON",
"identifierName": "Common",
},
{
"fieldId": "awsUsageaccountid",
"fieldName": "Account",
"identifier": "AWS",
"identifierName": "AWS",
},
{
"fieldId": "awsServicecode",
"fieldName": "Service",
"identifier": "AWS",
"identifierName": "AWS",
},
{
"fieldId": "awsBillingEntity",
"fieldName": "Billing Entity",
"identifier": "AWS",
"identifierName": "AWS",
},
{
"fieldId": "awsInstancetype",
"fieldName": "Instance Type",
"identifier": "AWS",
"identifierName": "AWS",
},
{
"fieldId": "awsLineItemType",
"fieldName": "Line Item Type",
"identifier": "AWS",
"identifierName": "AWS",
},
{
"fieldId": "awspayeraccountid",
"fieldName": "Payer Account",
"identifier": "AWS",
"identifierName": "AWS",
},
{
"fieldId": "awsUsageType",
"fieldName": "Usage Type",
"identifier": "AWS",
"identifierName": "AWS",
},
{
"fieldId": "cloudProvider",
"fieldName": "Cloud Provider",
"identifier": "COMMON",
"identifierName": "Common",
},
{
"fieldId": "none",
"fieldName": "None",
"identifier": "COMMON",
"identifierName": "Common",
},
{
"fieldId": "product",
"fieldName": "Product",
"identifier": "COMMON",
"identifierName": "Common",
},
}
View Source
var OutputKeyFields = []map[string]string{
{
"fieldId": "labels.key",
"fieldName": "",
"identifier": "LABEL",
},
{
"fieldId": "labels.key2",
"fieldName": "",
"identifier": "LABEL_V2",
},
}
View Source
var OutputKeyValueFields = []map[string]string{
{
"fieldId": "labels.value",
"fieldName": "",
"identifier": "LABEL",
"identifierName": "Label",
},
{
"fieldId": "labels.value",
"fieldName": "",
"identifier": "LABEL_V2",
"identifierName": "Label V2",
},
{
"fieldId": "",
"fieldName": "",
"identifier": "BUSINESS_MAPPING",
"identifierName": "Cost Categories",
},
}
Functions ¶
func BuildAggregateFunction ¶
func BuildFieldFilters ¶
func BuildFilterValues ¶
func BuildFilterValues(options *dto.CCMPerspectiveFilterValuesOptions) []map[string]any
func BuildFilters ¶
func BuildFilters(viewId string, timeFilters string, idFilters dto.CCMGraphQLFilters, keyValueFilters dto.CCMGraphQLKeyValueFilters) []map[string]any
func BuildGroupBy ¶
func BuildKeyFieldFilter ¶
func BuildLabelsV2KeysFilters ¶
func BuildLabelsV2KeysFilters(options *dto.CCMListLabelsV2KeysOptions) []map[string]any
BuildLabelsV2KeysFilters builds the filters specifically for fetching labelsV2 keys
func BuildOutputFieldsMap ¶
func BuildPreferences ¶
func BuildTimeFilters ¶
func BuildViewFilter ¶
func DebugPayload ¶
func GetFilterFieldByType ¶
func GetTimeRangeFromFilter ¶
func MapToJSONString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.