core

package
v0.0.0-...-b7f4efd 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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiV2 = ApiDefinitionVersion("V2")
	ApiV4 = ApiDefinitionVersion("V4")
)
View Source
const (
	CRDGroup   = "gravitee.io"
	CRDVersion = "v1alpha1"

	CRDManagementContextResource = "managementcontexts"
	CRDApplicationResource       = "applications"
	CRDApiDefinitionResource     = "apidefinitions"
	CRDApiV4DefinitionResource   = "apiv4definitions"
	CRDResourceResource          = "apiresources"

	GraviteeComponentLabel      = "gravitee.io/component"
	IngressLabel                = "gravitee.io/ingress"
	IngressLabelValue           = "graviteeio"
	IngressClassAnnotation      = "kubernetes.io/ingress.class"
	IngressClassAnnotationValue = "graviteeio"
	IngressTemplateAnnotation   = "gravitee.io/template"
	GraviteePemRegistryLabel    = "kubernetes-pem-registry"
	LastSpecHashAnnotation      = "gravitee.io/last-spec-hash"

	Extends = "gravitee.io/extends"

	ApiDefinitionFinalizer         = "finalizers.gravitee.io/apidefinitiondeletion"
	ApiDefinitionTemplateFinalizer = "finalizers.gravitee.io/apidefinitiontemplate"
	ManagementContextFinalizer     = "finalizers.gravitee.io/managementcontextdeletion"
	ApiResourceFinalizer           = "finalizers.gravitee.io/apiresource"
	//nolint:gosec // This is not an hardcoded secret
	ManagementContextSecretFinalizer = "finalizers.gravitee.io/managementcontextSecret"
	IngressFinalizer                 = "finalizers.gravitee.io/ingress"
	KeyPairFinalizer                 = "finalizers.gravitee.io/keypair"
	ApplicationFinalizer             = "finalizers.gravitee.io/applicationdeletion"
	SubscriptionFinalizer            = "finalizers.gravitee.io/subscriptions"
	GroupFinalizer                   = "finalizers.gravitee.io/groups"
	TemplatingFinalizer              = "finalizers.gravitee.io/templating"
	SharedPolicyGroupFinalizer       = "finalizers.gravitee.io/sharedpolicygroups"

	CloudTokenSecretKey  = "cloudToken"
	BearerTokenSecretKey = "bearerToken"
	UsernameSecretKey    = "username"
	PasswordSecretKey    = "password"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiDefinitionModel

type ApiDefinitionModel interface {
	GetName() string
	GetDefinitionVersion() ApiDefinitionVersion
	GetContextPaths() []string
	SetDefinitionContext(DefinitionContext)
	GetDefinitionContext() DefinitionContext
	GetResources() []ObjectOrRef[ResourceModel]
	GetState() string
	HasPlans() bool
	GetPlan(string) PlanModel
	IsStopped() bool
	GetType() string
	GetGroups() []string
	SetGroups([]string)
	GetGroupRefs() []ObjectRef
}

+k8s:deepcopy-gen=false

type ApiDefinitionObject

type ApiDefinitionObject interface {
	ContextAwareObject
	ApiDefinitionModel
	GetDefinition() ApiDefinitionModel
	SetDefinitionContext(DefinitionContext)
	GetDefinitionContext() DefinitionContext
	IsSyncFromManagement() bool
}

+k8s:deepcopy-gen=false

type ApiDefinitionVersion

type ApiDefinitionVersion string

type ApplicationModel

type ApplicationModel interface {
	GetSettings() ApplicationSettings
}

+k8s:deepcopy-gen=false

type ApplicationObject

type ApplicationObject interface {
	ContextAwareObject
	GetModel() ApplicationModel
}

+k8s:deepcopy-gen=false

type ApplicationSettings

type ApplicationSettings interface {
	IsOAuth() bool
	GetOAuthType() string
	IsSimple() bool
	HasTLS() bool
	GetClientID() string
	GetClientCertificate() string
}

+k8s:deepcopy-gen=false

type Auth

type Auth interface {
	GetBearerToken() string
	HasCredentials() bool
	GetCredentials() BasicAuth
	GetSecretRef() ObjectRef
	SetCredentials(username, password string)
	SetToken(token string)
	SetSecretRef(ref ObjectRef)
}

+k8s:deepcopy-gen=false

type BasicAuth

type BasicAuth interface {
	GetUsername() string
	GetPassword() string
}

+k8s:deepcopy-gen=false

type Cloud

type Cloud interface {
	SecretAware
	GetToken() string
	IsEnabled() bool
}

+k8s:deepcopy-gen=false

type ContextAwareObject

type ContextAwareObject interface {
	Object
	ContextRef() ObjectRef
	HasContext() bool
	GetID() string
	PopulateIDs(context ContextModel)
	GetOrgID() string
	GetEnvID() string
}

+k8s:deepcopy-gen=false

type ContextModel

type ContextModel interface {
	SecretAware
	GetURL() string
	GetPath() *string
	GetEnvID() string
	GetOrgID() string
	HasAuthentication() bool
	GetAuth() Auth
	HasCloud() bool
	GetCloud() Cloud
	ConfigureCloud(url string, orgID string, envID string)
}

+k8s:deepcopy-gen=false

type ContextObject

type ContextObject interface {
	ContextModel
	Object
}

+k8s:deepcopy-gen=false

type DefinitionContext

type DefinitionContext interface {
	GetOrigin() string
	SetOrigin(string)
}

+k8s:deepcopy-gen=false

type Object

type Object interface {
	client.Object
	GetSpec() Spec
	GetStatus() Status
	GetRef() ObjectRef
	IsBeingDeleted() bool
}

+k8s:deepcopy-gen=false

type ObjectOrRef

type ObjectOrRef[T any] interface {
	IsRef() bool
	GetRef() ObjectRef
	GetObject() T
	SetObject(obj T)
}

+k8s:deepcopy-gen=false

type ObjectRef

type ObjectRef interface {
	fmt.Stringer
	NamespacedName() types.NamespacedName
	GetName() string
	GetNamespace() string
	GetKind() string
	HasNameSpace() bool
	IsMissingNamespace() bool
	SetNamespace(ns string)
}

+k8s:deepcopy-gen=false

type PlanModel

type PlanModel interface {
	GetSecurityType() string
	GetID() string
}

+k8s:deepcopy-gen=false

type ProcessingStatus

type ProcessingStatus string
const (
	ProcessingStatusCompleted ProcessingStatus = "Completed"
	ProcessingStatusFailed    ProcessingStatus = "Failed"
)

type ResourceModel

type ResourceModel interface {
	GetType() string
	GetResourceName() string
	GetConfig() *utils.GenericStringMap
}

+k8s:deepcopy-gen=false

type ResourceObject

type ResourceObject interface {
	ResourceModel
	Object
}

+k8s:deepcopy-gen=false

type SecretAware

type SecretAware interface {
	GetSecretRef() ObjectRef
	HasSecretRef() bool
}

+k8s:deepcopy-gen=false

type Spec

type Spec interface {
	Hash() string
}

+k8s:deepcopy-gen=false

type Status

type Status interface {
	SetProcessingStatus(status ProcessingStatus)
	IsFailed() bool
	DeepCopyFrom(obj client.Object) error
	DeepCopyTo(obj client.Object) error
}

+k8s:deepcopy-gen=false

type SubscribableStatus

type SubscribableStatus interface {
	Status
	GetSubscriptionCount() uint
	AddSubscription()
	RemoveSubscription()
}

type SubscriptionModel

type SubscriptionModel interface {
	GetAppRef() ObjectRef
	GetApiRef() ObjectRef
	SetApiKind(string)
	GetPlan() string
	GetEndingAt() *string
}

type SubscriptionObject

type SubscriptionObject interface {
	Object
	SubscriptionModel
}

Jump to

Keyboard shortcuts

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