Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrComponentNotFound = errors.New("component not found") ErrComponentAlreadyExists = errors.New("component already exists") ErrComponentReleaseNotFound = errors.New("component release not found") ErrWorkloadNotFound = errors.New("workload not found") ErrTraitNotFound = errors.New("trait not found") ErrValidation = errors.New("validation error") ErrComponentTypeNotFound = errors.New("component type not found") )
Functions ¶
This section is empty.
Types ¶
type GenerateReleaseRequest ¶
type GenerateReleaseRequest struct {
ReleaseName string
}
GenerateReleaseRequest contains the parameters for generating a component release.
type Service ¶
type Service interface {
CreateComponent(ctx context.Context, namespaceName string, component *openchoreov1alpha1.Component) (*openchoreov1alpha1.Component, error)
UpdateComponent(ctx context.Context, namespaceName string, component *openchoreov1alpha1.Component) (*openchoreov1alpha1.Component, error)
ListComponents(ctx context.Context, namespaceName, projectName string, opts services.ListOptions) (*services.ListResult[openchoreov1alpha1.Component], error)
GetComponent(ctx context.Context, namespaceName, componentName string) (*openchoreov1alpha1.Component, error)
DeleteComponent(ctx context.Context, namespaceName, componentName string) error
GenerateRelease(ctx context.Context, namespaceName, componentName string, req *GenerateReleaseRequest) (*openchoreov1alpha1.ComponentRelease, error)
GetComponentSchema(ctx context.Context, namespaceName, componentName string) (*extv1.JSONSchemaProps, error)
GetComponentReleaseSchema(ctx context.Context, namespaceName, releaseName, componentName string) (*extv1.JSONSchemaProps, error)
}
Service defines the component service interface. Both the core service (no authz) and the authz-wrapped service implement this. Methods accept and return Kubernetes CRD types directly for alignment with the K8s-native API design (discussion #1716).
func NewService ¶
NewService creates a new component service without authorization. It internally creates an unwrapped project service for project validation, avoiding double authz when used within the authz-wrapped component service.
Click to show internal directories.
Click to hide internal directories.