object

package
v0.0.0-...-a7b4c27 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OAuthHandlerNameOAuth2Introspection OAuth handler name supported in Kyma for oauth2_introspection.
	OAuthHandlerNameOAuth2Introspection = "oauth2_introspection"

	// OAuthHandlerNameJWT OAuth handler name supported in Kyma for jwt.
	OAuthHandlerNameJWT = "jwt"

	// JWKSURLFormat the format of the jwks URL.
	JWKSURLFormat = `{"jwks_urls":["%s"]}`
)

Variables

View Source
var Semantic = conversion.EqualitiesOrDie(
	apiRuleEqual,
	publisherProxyDeploymentEqual,
	serviceAccountEqual,
	clusterRoleEqual,
	clusterRoleBindingEqual,
	serviceEqual,
	hpaEqual,
)

Semantic can do semantic deep equality checks for API objects. Fields which are not relevant for the reconciliation logic are intentionally omitted.

Functions

func ApplyExistingAPIRuleAttributes

func ApplyExistingAPIRuleAttributes(src, dst *apigatewayv1beta1.APIRule)

ApplyExistingAPIRuleAttributes copies some important attributes from a given source APIRule to a destination APIRule.

func GetService

func GetService(svcName string, port uint32) apigatewayv1beta1.Service

func IsSubscriptionStatusEqual

func IsSubscriptionStatusEqual(oldStatus, newStatus eventingv1alpha2.SubscriptionStatus) bool

func NewAPIRule

func NewAPIRule(ns, namePrefix string, opts ...Option) *apigatewayv1beta1.APIRule

NewAPIRule creates a APIRule object.

func RemoveDuplicateValues

func RemoveDuplicateValues(values []string) []string

RemoveDuplicateValues appends the values if the key (values of the slice) is not equal to the already present value in new slice (list).

func StringsToMethods

func StringsToMethods(methods []string) []apigatewayv1beta1.HttpMethod

StringsToMethods converts a slice of strings into a slice of HttpMethod as defined by api-gateway.

Types

type Option

type Option func(*apigatewayv1beta1.APIRule)

Option is a functional option for API objects builders.

func WithGateway

func WithGateway(gw string) Option

WithGateway sets the gateway of an APIRule.

func WithLabels

func WithLabels(labels map[string]string) Option

WithLabels sets the labels for an APIRule.

func WithOwnerReference

func WithOwnerReference(subs []eventingv1alpha2.Subscription) Option

WithOwnerReference sets the OwnerReferences of an APIRule.

func WithRules

func WithRules(certsURL string, subs []eventingv1alpha2.Subscription, svc apigatewayv1beta1.Service,
	methods ...string,
) Option

WithRules sets the rules of an APIRule for all Subscriptions for a subscriber.

func WithService

func WithService(host, svcName string, port uint32) Option

WithService sets the Service of an APIRule.

Jump to

Keyboard shortcuts

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