lambda

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2019 License: Apache-2.0 Imports: 17 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function struct {
	lambda.FunctionBase
	Tags  map[string]string `json:"tags"`
	Stats lambda.Stats      `json:"stats"`
}

Function contains the information of an Lambda function

type FunctionReport

type FunctionReport struct {
	utils.ReportBase
	Function Function `json:"function"`
}

FunctionReport has all the information of an Lambda function report

func GetLambdaDailyFunctions

func GetLambdaDailyFunctions(ctx context.Context, params LambdaQueryParams, user users.User, tx *sql.Tx) (int, []FunctionReport, error)

GetLambdaDailyFunctions does an elastic request and returns an array of functions daily report based on query params

func GetLambdaData

func GetLambdaData(ctx context.Context, parsedParams LambdaQueryParams, user users.User, tx *sql.Tx) (int, []FunctionReport, error)

GetLambdaData gets Lambda monthly reports based on query params, if there isn't a monthly report, it gets daily reports

type LambdaQueryParams

type LambdaQueryParams struct {
	AccountList []string
	IndexList   []string
	Date        time.Time
}

LambdaQueryParams will store the parsed query params

type ResponseLambdaDaily

type ResponseLambdaDaily struct {
	Accounts struct {
		Buckets []struct {
			Dates struct {
				Buckets []struct {
					Time      string `json:"key_as_string"`
					Functions struct {
						Hits struct {
							Hits []struct {
								Function lambda.FunctionReport `json:"_source"`
							} `json:"hits"`
						} `json:"hits"`
					} `json:"functions"`
				} `json:"buckets"`
			} `json:"dates"`
		} `json:"buckets"`
	} `json:"accounts"`
}

Structure that allow to parse ES response for Lambda Daily functions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL