providers

package
v0.0.0-...-9b02830 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ANALYTICS_QUERY_ORACLE = `` /* 138-byte string literal not displayed */
View Source
const APP_ANALYTICS_QUERY_ORACLE = `
SELECT   count(*) as total_requests,
         MAX (elapsed_time) max_elapsed_time,
         AVG (elapsed_time) avg_elapsed_time,
		 MIN (elapsed_time) min_elapsed_time,
		 '','','',
		 c.name,
		 1
    FROM gapi_request_logs a,
             gapi_services b
         LEFT JOIN
             gapi_services_apps_groups c
         ON b.applicationgroupid = c.id
   WHERE a.index_name <> '` + constants.GAPI_API_LOGS_INDEX + `' and a.service_name = b.matchinguri ##WHERE_CLAUSE##
GROUP BY c.name`
View Source
const LOGS_QUERY_ORACLE = `SELECT id,method,uri,request_body,host,user_agent,remote_addr,remote_ip,headers,query_args,date_time,response,elapsed_time,status_code,service_name,index_name,request_grouper_date FROM gapi_request_logs
where index_name <> '` + constants.GAPI_API_LOGS_INDEX + `' and status_code >= 300
`

Variables

This section is empty.

Functions

func APIAnalyticsElastic

func APIAnalyticsElastic(apiEndpoint string) (string, int)

func APIAnalyticsOracle

func APIAnalyticsOracle(apiEndpoint string) (string, int)

func APIAnalyticsQuery

func APIAnalyticsQuery(apiEndpoint string) string

func ApplicationAnalyticsElastic

func ApplicationAnalyticsElastic(appGroupId string) (string, int)

func ApplicationAnalyticsOracle

func ApplicationAnalyticsOracle(applicationId string) (string, int)

func ApplicationAnalyticsQuery

func ApplicationAnalyticsQuery(services []service.Service) string

func LogsElastic

func LogsElastic(apiEndpoint string) (string, int)

func LogsOracle

func LogsOracle(apiEndpoint string) (string, int)

func LogsQuery

func LogsQuery(apiEndpoint string) string

func LogsURL

func LogsURL() string

func RowsToLogRequestModel

func RowsToLogRequestModel(rows *sql.Rows, containsPagination bool) []logsModels.RequestLogging

Types

type ApiAnalytics

type ApiAnalytics struct {
	Key            string `json:"key"`
	MaxElapsedTime MaxElapsedTimeStruct
	MinElapsedTime MinElapsedTimeStruct
	AvgElapsedTime AvgElapsedTimeStruct
	TotalRequests  int `json:"doc_count"`
	RemoteAddr     RemoteAddrStruct
	UserAgent      UserAgentStruct
	StatusCode     StatusCodeStruct
}

func RowsToApiAnalyticsModel

func RowsToApiAnalyticsModel(rows *sql.Rows) []ApiAnalytics

type AvgElapsedTimeStruct

type AvgElapsedTimeStruct struct {
	Value float32 `json:"value"`
}

type BucketStruct

type BucketStruct struct {
	Key      string `json:"key"`
	DocCount int    `json:"doc_count"`
}

type MaxElapsedTimeStruct

type MaxElapsedTimeStruct struct {
	Value float32 `json:"value"`
}

type MinElapsedTimeStruct

type MinElapsedTimeStruct struct {
	Value float32 `json:"value"`
}

type RemoteAddrStruct

type RemoteAddrStruct struct {
	Buckets []BucketStruct `json:"buckets"`
}

type StatusCodeStruct

type StatusCodeStruct struct {
	Buckets []BucketStruct `json:"buckets"`
}

type UserAgentStruct

type UserAgentStruct struct {
	Buckets []BucketStruct `json:"buckets"`
}

Jump to

Keyboard shortcuts

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