internal

package
v0.0.0-...-a230fe6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ABS_TYPE = "serviceModelDescription"
View Source
const KIND_DESCRIPTORFORMAT = "descriptor format"
View Source
const KIND_MODELVERSION = "service model version"
View Source
const KIND_SERVICEIDENTITY = "service identity"
View Source
const KIND_SERVICEVERSION = "service version"
View Source
const KIND_SERVICE_TYPE = "service type"
View Source
const REL_TYPE = "relativeServiceModelDescription"

Variables

This section is empty.

Functions

func AddServiceModelReferences

func AddServiceModelReferences(refs *crossref.CrossReferences, services []ServiceDescriptor, os ...identity.Origin)

func CommonReferences

func CommonReferences(s *CommonServiceSpec) crossref.References

func ContractReferences

func ContractReferences(s *metav1.Contract) crossref.References

func ContractToCanonicalForm

func ContractToCanonicalForm(in *metav1.Contract, c DescriptionContext) *metav1.Contract

func DependencyReferences

func DependencyReferences(s *metav1.Dependency) crossref.References

func DependencyResolutionReferences

func DependencyResolutionReferences(s *metav1.DependencyResolution) crossref.References

func DependencyToCanonicalForm

func DependencyToCanonicalForm(in *metav1.Dependency, c DescriptionContext) *metav1.Dependency

func Encode

func Encode(m *ServiceModelDescriptor, marshaller ...runtime.Marshaler) ([]byte, error)

func InstallerReferences

func InstallerReferences(s *metav1.Installer) crossref.References

func InstallerToCanonicalForm

func InstallerToCanonicalForm(in *metav1.Installer, c DescriptionContext) *metav1.Installer

func ManagedServiceReferences

func ManagedServiceReferences(s *metav1.ManagedService) crossref.References

func RegisterVersion

func RegisterVersion(v Version)

func ServiceInstanceReferences

func ServiceInstanceReferences(s *metav1.ServiceInstance) crossref.References

func ValidateCommon

func ValidateCommon(s *CommonServiceSpec, c DescriptionContext) error

func ValidateContract

func ValidateContract(s *metav1.Contract, c DescriptionContext) error

func ValidateDependency

func ValidateDependency(s *metav1.Dependency, c DescriptionContext) error

func ValidateDependencyResolution

func ValidateDependencyResolution(s *metav1.DependencyResolution, c DescriptionContext) error

func ValidateInstaller

func ValidateInstaller(s *metav1.Installer, c DescriptionContext) error

func ValidateManagedService

func ValidateManagedService(s *metav1.ManagedService, c DescriptionContext) error

func ValidateService

func ValidateService(e *ServiceDescriptor, c DescriptionContext) error

func ValidateServiceInstance

func ValidateServiceInstance(s *metav1.ServiceInstance, c DescriptionContext) error

Types

type CommonServiceSpec

type CommonServiceSpec = metav1.CommonServiceSpec

type ContextBuilder

type ContextBuilder interface {
	DescriptionContext
	WithResourceValidator(validator ResourceValidator) ContextBuilder
}

func NewDescriptionContext

func NewDescriptionContext(name, vers string, desc *ServiceModelDescriptor) ContextBuilder

type DescriptionContext

type DescriptionContext interface {
	common.VersionedElement
	IsCanonical() bool
	MatchComponent(metav1.ServiceIdentity) bool

	ValidateResource(reference *ocmmeta.ResourceReference) error
	LookupService(string) *ServiceDescriptor
}

type ResourceValidator

type ResourceValidator func(reference *ocmmeta.ResourceReference) error

type ServiceDescriptor

type ServiceDescriptor struct {
	CommonServiceSpec
	Kind   ServiceKindSpec
	Origin identity.Origin
}

func (*ServiceDescriptor) Copy

func (*ServiceDescriptor) GetId

func (*ServiceDescriptor) GetReferences

func (d *ServiceDescriptor) GetReferences() crossref.References

func (*ServiceDescriptor) GetType

func (d *ServiceDescriptor) GetType() string

func (*ServiceDescriptor) GetVariant

func (d *ServiceDescriptor) GetVariant() identity.Variant

type ServiceKindSpec

type ServiceKindSpec interface {
	runtime.TypedObject
	GetVariant() identity.Variant

	ToCanonicalForm(c DescriptionContext) ServiceKindSpec
	Validate(c DescriptionContext) error
	GetReferences() crossref.References
	Copy() ServiceKindSpec
}

type ServiceModelDescriptor

type ServiceModelDescriptor struct {
	DocType  runtime.VersionedObjectType `json:"type"`
	Services []ServiceDescriptor
}

func Decode

func Decode(data []byte, unmarshaller ...runtime.Unmarshaler) (*ServiceModelDescriptor, error)

func (*ServiceModelDescriptor) GetKind

func (d *ServiceModelDescriptor) GetKind() string

func (*ServiceModelDescriptor) GetType

func (d *ServiceModelDescriptor) GetType() string

func (*ServiceModelDescriptor) GetVersion

func (d *ServiceModelDescriptor) GetVersion() string

func (*ServiceModelDescriptor) ToCanonicalForm

func (*ServiceModelDescriptor) Validate

Jump to

Keyboard shortcuts

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