common

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KuadrantRateLimitClusterName = "kuadrant-rate-limiting-service"
	AuthPolicyBackRefAnnotation  = "kuadrant.io/authpolicy"
	NamespaceSeparator           = '/'
	LimitadorName                = "limitador"
)

TODO: move the const to a proper place, or get it from config

Variables

This section is empty.

Functions

func DecodeFile

func DecodeFile(ctx context.Context, fileData []byte, scheme *runtime.Scheme, cb DecodeCallback) error

DecodeFile decodes the provided file data (encoded YAML documents) into Kubernetes objects using the specified scheme, and invokes the callback function for each decoded object. Returns an error if any decoding error occurs.

func FindAuthorinoStatusCondition

func FindAuthorinoStatusCondition(conditions []authorinov1beta1.Condition, conditionType string) *authorinov1beta1.Condition

func MergeMapStringString added in v0.2.0

func MergeMapStringString(existing *map[string]string, desired map[string]string) bool

MergeMapStringString Merge desired into existing. Not Thread-Safe. Does it matter?

func ToBase36Hash added in v0.7.0

func ToBase36Hash(s string) string

func ToBase36HashLen added in v0.7.0

func ToBase36HashLen(s string, l int) string

func UnMarshallLimitNamespace added in v0.2.0

func UnMarshallLimitNamespace(ns string) (client.ObjectKey, string, error)

UnMarshallLimitNamespace parses limit namespace with format "gwNS/gwName#domain"

func UnMarshallObjectKey added in v0.2.0

func UnMarshallObjectKey(keyStr string) (client.ObjectKey, error)

UnMarshallObjectKey takes a string input and converts it into an ObjectKey struct that can be used to access a specific Kubernetes object. The input string is expected to be in the format "namespace/name". If the input string does not contain a NamespaceSeparator (typically '/') or has too few components, this function returns an error.

Types

type DecodeCallback

type DecodeCallback = func(runtime.Object) error

Jump to

Keyboard shortcuts

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