{"modulePath":"github.com/Optum/dce","version":"v1.3.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package main\n\n## Constants\n\n```go\nconst (\n\tStartDateParam       = \"startDate\"\n\tEndDateParam         = \"endDate\"\n\tPrincipalIDParam     = \"principalId\"\n\tAccountIDParam       = \"accountId\"\n\tNextPrincipalIDParam = \"nextPrincipalId\"\n\tNextStartDateParam   = \"nextStartDate\"\n\tLimitParam           = \"limit\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\t// UsageSvc - Service for getting usage\n\tUsageSvc *usage.DB\n)\n```\n\n## Functions\n\n```go\nfunc GetUsage(w http.ResponseWriter, r *http.Request)\n```\nGetUsage - Gets all of the usage\n\n```go\nfunc GetUsageByStartDateAndEndDate(w http.ResponseWriter, r *http.Request)\n```\nGetUsageByStartDateAndEndDate - Returns a list of usage by startDate and endDate\n\n```go\nfunc GetUsageByStartDateAndPrincipalID(w http.ResponseWriter, r *http.Request)\n```\nGetUsageByStartDateAndPrincipalID - Returns a list of usage by principalID and starting from start date to current date\n\n```go\nfunc Handler(ctx context.Context, req events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error)\n```\nHandler - Handle the lambda function\n\n```go\nfunc SumCostAmountByPrincipalID(input []*response.UsageResponse) []*response.UsageResponse\n```\nSumCostAmountByPrincipalID returns a unique subset of the input slice by finding unique PrincipalIds and adding cost amount for it.\n\n","path":"github.com/Optum/dce/cmd/lambda/usage","name":"main","synopsis":"","isRedistributable":true}
