Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClusterTraitNotFound = errors.New("cluster trait not found") ErrClusterTraitAlreadyExists = errors.New("cluster trait already exists") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service interface {
CreateClusterTrait(ctx context.Context, ct *openchoreov1alpha1.ClusterTrait) (*openchoreov1alpha1.ClusterTrait, error)
UpdateClusterTrait(ctx context.Context, ct *openchoreov1alpha1.ClusterTrait) (*openchoreov1alpha1.ClusterTrait, error)
ListClusterTraits(ctx context.Context, opts services.ListOptions) (*services.ListResult[openchoreov1alpha1.ClusterTrait], error)
GetClusterTrait(ctx context.Context, clusterTraitName string) (*openchoreov1alpha1.ClusterTrait, error)
DeleteClusterTrait(ctx context.Context, clusterTraitName string) error
GetClusterTraitSchema(ctx context.Context, clusterTraitName string) (map[string]any, error)
}
Service defines the cluster trait 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 cluster trait service without authorization.
Click to show internal directories.
Click to hide internal directories.