util

package
v1.1.79 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 9 Imported by: 4

Documentation

Index

Constants

View Source
const (

	// SummaryEventProxyIDPrefix - Prefix for proxyID in summary event
	SummaryEventProxyIDPrefix = "remoteApiId_"

	// SummaryEventApplicationIDPrefix - Prefix for application.ID in summary event
	SummaryEventApplicationIDPrefix = "remoteAppId_"
)

Variables

This section is empty.

Functions

func FormatApplicationID

func FormatApplicationID(applicationID string) string

FormatApplicationID - Returns the prefixed applicationID for summary event.

func FormatProxyID

func FormatProxyID(proxyID string) string

FormatProxyID - Returns the prefixed proxyID for summary event.

func GetAccessRequest

func GetAccessRequest(cacheManager cache.Manager, managedApp *v1.ResourceInstance, apiID, stage, version string) *management.AccessRequest

GetAccessRequest -

func GetConsumerApplication

func GetConsumerApplication(ri *v1.ResourceInstance) (string, string)

GetConsumerApplication -

func GetConsumerOrgID

func GetConsumerOrgID(ri *v1.ResourceInstance) string

GetConsumerOrgID -

func GetSubscriptionID

func GetSubscriptionID(subscription *v1.ResourceInstance) string

GetSubscriptionID -

func GetTransactionEventStatus

func GetTransactionEventStatus(status int) string

GetTransactionEventStatus - Returns the transaction event status based on HTTP status code.

func GetTransactionSummaryStatus

func GetTransactionSummaryStatus(status int) string

GetTransactionSummaryStatus - Returns the summary status based on HTTP status code.

func IsExceptionStatus

func IsExceptionStatus(status int) bool

IsExceptionStatus - Returns true if the HTTP status is between 500 and 511

func IsFailureStatus

func IsFailureStatus(status int) bool

IsFailureStatus - Returns true if the HTTP status is between 400 and 500

func IsHTTPExceptionStatus

func IsHTTPExceptionStatus(status int) bool

IsHTTPExceptionStatus - Returns true if the HTTP status is between 500 and 511

func IsHTTPFailureStatus

func IsHTTPFailureStatus(status int) bool

IsHTTPFailureStatus - Returns true if the HTTP status is between 400 and 500

func IsHTTPSuccessStatus

func IsHTTPSuccessStatus(status int) bool

IsHTTPSuccessStatus - Returns true if the HTTP status is between 200 and 400

func IsSuccessStatus

func IsSuccessStatus(status int) bool

IsSuccessStatus - Returns true if the HTTP status is between 200 and 400

func MarshalHeadersAsJSONString

func MarshalHeadersAsJSONString(headers map[string]string) string

MarshalHeadersAsJSONString - Serializes the header key/values in map as JSON string

func UpdateWithConsumerDetails

func UpdateWithConsumerDetails(accessRequest *management.AccessRequest, managedApp *v1.ResourceInstance, log log.FieldLogger) *models.ConsumerDetails

UpdateWithConsumerDetails -

Types

This section is empty.

Jump to

Keyboard shortcuts

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