v1alpha4

package
v0.0.0-...-0e1f8f4 Latest Latest
Warning

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

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

Documentation

Overview

Package v1alpha4 contains API Schema definitions for the dp v1alpha4 API group +kubebuilder:object:generate=true +groupName=dp.wso2.com

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "dp.wso2.com", Version: "v1alpha4"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AIProvider

type AIProvider struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AIProviderSpec   `json:"spec,omitempty"`
	Status AIProviderStatus `json:"status,omitempty"`
}

AIProvider is the Schema for the aiproviders API

func (*AIProvider) DeepCopy

func (in *AIProvider) DeepCopy() *AIProvider

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIProvider.

func (*AIProvider) DeepCopyInto

func (in *AIProvider) DeepCopyInto(out *AIProvider)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AIProvider) DeepCopyObject

func (in *AIProvider) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AIProviderList

type AIProviderList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AIProvider `json:"items"`
}

AIProviderList contains a list of AIProvider

func (*AIProviderList) DeepCopy

func (in *AIProviderList) DeepCopy() *AIProviderList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIProviderList.

func (*AIProviderList) DeepCopyInto

func (in *AIProviderList) DeepCopyInto(out *AIProviderList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AIProviderList) DeepCopyObject

func (in *AIProviderList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AIProviderReference

type AIProviderReference struct {
	// Name is the referced CR's name of AIProvider resource.
	Name string `json:"name,omitempty"`
}

AIProviderReference holds reference to AIProvider resource

func (*AIProviderReference) DeepCopy

func (in *AIProviderReference) DeepCopy() *AIProviderReference

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIProviderReference.

func (*AIProviderReference) DeepCopyInto

func (in *AIProviderReference) DeepCopyInto(out *AIProviderReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AIProviderSpec

type AIProviderSpec struct {

	// +kubebuilder:validation:MinLength=1
	ProviderName       string          `json:"providerName"`
	ProviderAPIVersion string          `json:"providerAPIVersion"`
	Organization       string          `json:"organization"`
	SupportedModels    []string        `json:"supportedModels,omitempty"`
	Model              ValueDetails    `json:"model"`
	RateLimitFields    RateLimitFields `json:"rateLimitFields"`
}

AIProviderSpec defines the desired state of AIProvider

func (*AIProviderSpec) DeepCopy

func (in *AIProviderSpec) DeepCopy() *AIProviderSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIProviderSpec.

func (*AIProviderSpec) DeepCopyInto

func (in *AIProviderSpec) DeepCopyInto(out *AIProviderSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AIProviderStatus

type AIProviderStatus struct {
}

AIProviderStatus defines the observed state of AIProvider

func (*AIProviderStatus) DeepCopy

func (in *AIProviderStatus) DeepCopy() *AIProviderStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIProviderStatus.

func (*AIProviderStatus) DeepCopyInto

func (in *AIProviderStatus) DeepCopyInto(out *AIProviderStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type APIPolicy

type APIPolicy struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   APIPolicySpec   `json:"spec,omitempty"`
	Status APIPolicyStatus `json:"status,omitempty"`
}

APIPolicy is the Schema for the apipolicies API

func (*APIPolicy) DeepCopy

func (in *APIPolicy) DeepCopy() *APIPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIPolicy.

func (*APIPolicy) DeepCopyInto

func (in *APIPolicy) DeepCopyInto(out *APIPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*APIPolicy) DeepCopyObject

func (in *APIPolicy) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*APIPolicy) Default

func (r *APIPolicy) Default()

Default implements webhook.Defaulter so a webhook will be registered for the type

func (*APIPolicy) Hub

func (*APIPolicy) Hub()

Hub marks this type as a conversion hub.

func (*APIPolicy) SetupWebhookWithManager

func (r *APIPolicy) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager creates a new webhook builder for APIPolicy

func (*APIPolicy) ValidateCreate

func (r *APIPolicy) ValidateCreate() (admission.Warnings, error)

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*APIPolicy) ValidateDelete

func (r *APIPolicy) ValidateDelete() (admission.Warnings, error)

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*APIPolicy) ValidatePolicy

func (r *APIPolicy) ValidatePolicy() error

ValidatePolicy validates the APIPolicy

func (*APIPolicy) ValidateUpdate

func (r *APIPolicy) ValidateUpdate(old runtime.Object) (admission.Warnings, error)

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type APIPolicyList

type APIPolicyList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []APIPolicy `json:"items"`
}

APIPolicyList contains a list of APIPolicy

func (*APIPolicyList) DeepCopy

func (in *APIPolicyList) DeepCopy() *APIPolicyList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIPolicyList.

func (*APIPolicyList) DeepCopyInto

func (in *APIPolicyList) DeepCopyInto(out *APIPolicyList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*APIPolicyList) DeepCopyObject

func (in *APIPolicyList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type APIPolicySpec

type APIPolicySpec struct {
	Default   *PolicySpec                               `json:"default,omitempty"`
	Override  *PolicySpec                               `json:"override,omitempty"`
	TargetRef gwapiv1b1.NamespacedPolicyTargetReference `json:"targetRef,omitempty"`
}

APIPolicySpec defines the desired state of APIPolicy

func (*APIPolicySpec) DeepCopy

func (in *APIPolicySpec) DeepCopy() *APIPolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIPolicySpec.

func (*APIPolicySpec) DeepCopyInto

func (in *APIPolicySpec) DeepCopyInto(out *APIPolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type APIPolicyStatus

type APIPolicyStatus struct {
}

APIPolicyStatus defines the observed state of APIPolicy

func (*APIPolicyStatus) DeepCopy

func (in *APIPolicyStatus) DeepCopy() *APIPolicyStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIPolicyStatus.

func (*APIPolicyStatus) DeepCopyInto

func (in *APIPolicyStatus) DeepCopyInto(out *APIPolicyStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type BackendJWTToken

type BackendJWTToken struct {
	// Name holds the name of the BackendJWT resource.
	Name string `json:"name,omitempty"`
}

BackendJWTToken holds backend JWT token information

func (*BackendJWTToken) DeepCopy

func (in *BackendJWTToken) DeepCopy() *BackendJWTToken

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackendJWTToken.

func (*BackendJWTToken) DeepCopyInto

func (in *BackendJWTToken) DeepCopyInto(out *BackendJWTToken)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type CORSPolicy

type CORSPolicy struct {

	// Enabled is to enable CORs policy for the API.
	//
	// +kubebuilder:default=true
	// +optional
	Enabled bool `json:"enabled"`

	// AllowCredentials indicates whether the request can include user credentials like
	// cookies, HTTP authentication or client side SSL certificates.
	//
	// +optional
	AccessControlAllowCredentials bool `json:"accessControlAllowCredentials,omitempty"`

	// AccessControlAllowHeaders indicates which headers can be used
	// during the actual request.
	//
	// +optional
	AccessControlAllowHeaders []string `json:"accessControlAllowHeaders,omitempty"`

	// AccessControlAllowMethods indicates which methods can be used
	// during the actual request.
	//
	// +optional
	AccessControlAllowMethods []string `json:"accessControlAllowMethods,omitempty"`

	// AccessControlAllowOrigins indicates which origins can be used
	// during the actual request.
	//
	// +optional
	AccessControlAllowOrigins []string `json:"accessControlAllowOrigins,omitempty"`

	// AccessControlExposeHeaders indicates which headers can be exposed
	// as part of the response by listing their names.
	//
	// +optional
	AccessControlExposeHeaders []string `json:"accessControlExposeHeaders,omitempty"`

	// AccessControlMaxAge indicates how long the results of a preflight request
	// can be cached in a preflight result cache.
	//
	// +optional
	AccessControlMaxAge *int `json:"accessControlMaxAge,omitempty"`
}

CORSPolicy holds CORS policy information

func (*CORSPolicy) DeepCopy

func (in *CORSPolicy) DeepCopy() *CORSPolicy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CORSPolicy.

func (*CORSPolicy) DeepCopyInto

func (in *CORSPolicy) DeepCopyInto(out *CORSPolicy)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InterceptorReference

type InterceptorReference struct {
	// Name is the referced CR's name of InterceptorService resource.
	Name string `json:"name"`
}

InterceptorReference holds InterceptorService reference using name and namespace

func (*InterceptorReference) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InterceptorReference.

func (*InterceptorReference) DeepCopyInto

func (in *InterceptorReference) DeepCopyInto(out *InterceptorReference)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelBasedRoundRobin

type ModelBasedRoundRobin struct {
	OnQuotaExceedSuspendDuration int           `json:"onQuotaExceedSuspendDuration,omitempty"`
	Models                       []ModelWeight `json:"models"`
}

ModelBasedRoundRobin holds the model based round robin configurations

func (*ModelBasedRoundRobin) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelBasedRoundRobin.

func (*ModelBasedRoundRobin) DeepCopyInto

func (in *ModelBasedRoundRobin) DeepCopyInto(out *ModelBasedRoundRobin)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ModelWeight

type ModelWeight struct {
	Model  string `json:"model"`
	Weight int    `json:"weight,omitempty"`
}

ModelWeight holds the model configurations

func (*ModelWeight) DeepCopy

func (in *ModelWeight) DeepCopy() *ModelWeight

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ModelWeight.

func (*ModelWeight) DeepCopyInto

func (in *ModelWeight) DeepCopyInto(out *ModelWeight)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PolicySpec

type PolicySpec struct {
	// RequestInterceptors referenced to intercetor services to be applied
	// to the request flow.
	//
	// +optional
	// +nullable
	// +kubebuilder:validation:MaxItems=1
	RequestInterceptors []InterceptorReference `json:"requestInterceptors,omitempty"`

	// ResponseInterceptors referenced to intercetor services to be applied
	// to the response flow.
	//
	// +optional
	// +nullable
	// +kubebuilder:validation:MaxItems=1
	ResponseInterceptors []InterceptorReference `json:"responseInterceptors,omitempty"`

	// BackendJWTPolicy holds reference to backendJWT policy configurations
	BackendJWTPolicy *BackendJWTToken `json:"backendJwtPolicy,omitempty"`

	// CORS policy to be applied to the API.
	CORSPolicy *CORSPolicy `json:"cORSPolicy,omitempty"`

	// SubscriptionValidation denotes whether subscription validation is enabled for the API
	//
	// +kubebuilder:default:=false
	// +optional
	SubscriptionValidation bool `json:"subscriptionValidation"`

	// AIProvider referenced to AIProvider resource to be applied
	// to the API.
	AIProvider *AIProviderReference `json:"aiProvider,omitempty"`

	// ModelBasedRoundRobin holds the model based round robin configurations
	ModelBasedRoundRobin *ModelBasedRoundRobin `json:"modelBasedRoundRobin,omitempty"`
}

PolicySpec contains API policies

func (*PolicySpec) DeepCopy

func (in *PolicySpec) DeepCopy() *PolicySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicySpec.

func (*PolicySpec) DeepCopyInto

func (in *PolicySpec) DeepCopyInto(out *PolicySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RateLimitFields

type RateLimitFields struct {
	PromptTokens    ValueDetails `json:"promptTokens"`
	CompletionToken ValueDetails `json:"completionToken"`
	TotalToken      ValueDetails `json:"totalToken"`
}

RateLimitFields defines the Rate Limit fields

func (*RateLimitFields) DeepCopy

func (in *RateLimitFields) DeepCopy() *RateLimitFields

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitFields.

func (*RateLimitFields) DeepCopyInto

func (in *RateLimitFields) DeepCopyInto(out *RateLimitFields)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ValueDetails

type ValueDetails struct {
	In    string `json:"in"`
	Value string `json:"value"`
}

ValueDetails defines the value details

func (*ValueDetails) DeepCopy

func (in *ValueDetails) DeepCopy() *ValueDetails

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValueDetails.

func (*ValueDetails) DeepCopyInto

func (in *ValueDetails) DeepCopyInto(out *ValueDetails)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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