Documentation ¶
Index ¶
- Constants
- Variables
- func ApplyExistingAPIRuleAttributes(src, dst *apigatewayv1beta1.APIRule)
- func GetService(svcName string, port uint32) apigatewayv1beta1.Service
- func IsSubscriptionStatusEqual(oldStatus, newStatus eventingv1alpha2.SubscriptionStatus) bool
- func NewAPIRule(ns, namePrefix string, opts ...Option) *apigatewayv1beta1.APIRule
- func RemoveDuplicateValues(values []string) []string
- func StringsToMethods(methods []string) []apigatewayv1beta1.HttpMethod
- type Option
Constants ¶
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 ¶
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 ¶
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 WithLabels ¶
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 ¶
WithService sets the Service of an APIRule.