Documentation
¶
Overview ¶
Package s3/costs gets billing information from an ElasticSearch.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetS3UsageAndCostElasticSearchParams ¶
func GetS3UsageAndCostElasticSearchParams(accountList []string, durationBegin time.Time, durationEnd time.Time, filters []esFilter, client *elastic.Client, index string) *elastic.SearchService
GetS3UsageAndCostElasticSearchParams is used to construct an ElasticSearch *elastic.SearchService used to perform an S3 usage and cost request on ES It takes as paramters :
- accountList []uint : A slice of uint representing aws account number, in the format of the field 'awsdetailedlineitem.linked_account_id'
- durationBeing time.Time : A time.Time struct representing the begining of the time range in the query
- durationEnd time.Time : A time.Time struct representing the end of the time range in the query
- client *elastic.Client : an instance of *elastic.Client that represent an Elastic Search client.
- filters []esFilter : A slice of esFilter containing the filters (key/value) to apply to the request It needs to be fully configured and ready to execute a client.Search()
- index string : The Elastic Search index on wich to execute the query. In this context the default value should be "awsdetailedlineitems"
This function excepts arguments passed to it to be sanitize. If they are not, the following cases will make it crash :
- If the client is nil or malconfigured, it will crash
- If the index is not an index present in the ES, it will crash
Types ¶
Click to show internal directories.
Click to hide internal directories.