Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrResourceNotFound = errors.New("resource not found") ErrResourceAlreadyExists = errors.New("resource already exists") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
CreateResource(ctx context.Context, namespaceName string, resource *openchoreov1alpha1.Resource) (*openchoreov1alpha1.Resource, error)
UpdateResource(ctx context.Context, namespaceName string, resource *openchoreov1alpha1.Resource) (*openchoreov1alpha1.Resource, error)
ListResources(ctx context.Context, namespaceName, projectName string, opts services.ListOptions) (*services.ListResult[openchoreov1alpha1.Resource], error)
GetResource(ctx context.Context, namespaceName, resourceName string) (*openchoreov1alpha1.Resource, error)
DeleteResource(ctx context.Context, namespaceName, resourceName string) error
}
Service defines the resource 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.
func NewService ¶
NewService creates a new resource service without authorization. It internally creates an unwrapped project service for project validation, avoiding double authz when used within the authz-wrapped resource service.
Click to show internal directories.
Click to hide internal directories.