common

package
v1.2.12 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccessCode        = "accessCode"
	ClientCredentials = "clientCredentials"
	APIKey            = "apiKey"
	AppID             = "appID"
	AppName           = "appName"
	Authorization     = "authorization"

	AttrAPIID          = "API ID"
	AttrAssetID        = "Asset ID"
	AttrAssetVersion   = "Asset Version"
	AttrChecksum       = "checksum"
	AttrProductVersion = "Product Version"

	ClientID            = "client-id"
	ClientIDEnforcement = "client-id-enforcement"
	ClientIDLabel       = "Client ID"
	ClientSecret        = "client-secret"
	ClientSecretLabel   = "Client Secret"
	ContractID          = "contractID"
	CredOrigin          = "credentialsOriginHasHttpBasicAuthenticationHeader"

	ClientCredDesc = "This API supports client credentials for authenticating all API requests"
	Description    = "description"
	ExternalOauth  = "external-oauth2-access-token-enforcement"
	Header         = "header"

	Oauth2Desc     = "This API supports OAuth 2.0 for authenticating all API requests"
	Oauth2OASType  = "oauth2"
	Oauth2RAMLType = "OAuth 2.0"
	Oauth2Name     = "o_auth_2"

	BasicAuthDesc     = "This API supports Basic Authentication for authenticating all API requests"
	BasicAuthName     = "basicAuth"
	BasicAuthScheme   = "basic"
	BasicAuthOASType  = "http"
	BasicAuthRAMLType = "Basic Authentication"

	Scopes    = "scopes"
	SLABased  = "sla-based"
	SlaTier   = "sla-tier"
	SLAActive = "ACTIVE"

	TierLabel = "SLA Tier"
	TokenURL  = "tokenUrl"

	AxwayAgentSLATierName        = "Axway Agent Tier"
	AxwayAgentSLATierDescription = "SLA Tier created for Axway Agent Provisioning purposes"
)
View Source
const (
	RateLimitingSLABasedPolicy    = "348742"
	BasicAuthSimplePolicy         = "341474"
	OAuth2MuleOauthProviderPolicy = "386072"
	HeaderRemovalPolicy           = "341469"
	MessageLoggingPolicy          = "345754"
	JWTValidationPolicy           = "385922"
	RateLimitingPolicy            = "348741"
	BasicAuthLDAPPolicy           = "345188"
	ClientIDEnforcementPolicy     = "341473"
)

Variables

This section is empty.

Functions

func FormatAPICacheKey

func FormatAPICacheKey(apiID, stageName string) string

FormatAPICacheKey ensure consistent naming of the cache key for an API.

Types

type EventType added in v1.2.5

type EventType int
const (
	// Initialize -
	Initialize EventType = iota + 1
	// Metric -
	Metric
	// Completed -
	Completed
)

type MetricEvent added in v1.2.5

type MetricEvent struct {
	Type   EventType
	Metric Metrics
}

type Metrics added in v1.2.5

type Metrics struct {
	StartTime  time.Time
	EndTime    time.Time
	APIID      string
	Instance   *v1.ResourceInstance
	ClientID   string
	StatusCode string
	Count      int64
	Max        int64
	Min        int64
	Avg        float64
}

type PolicyDetail added in v1.1.5

type PolicyDetail struct {
	Policy     string
	IsSLABased bool
	APIId      string
}

PolicyDetail represents a policy

Jump to

Keyboard shortcuts

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