Documentation ¶
Overview ¶
the resource service package provides services to get and manipulate resources
Index ¶
- func CheckResourceExist(ctx context.Context, uid string) bool
- func GetAppProjectByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceAppProject, error)
- func GetApplicationByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceApplication, error)
- func GetApplications(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListApplications, error)
- func GetAppprojects(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListAppprojects, error)
- func GetCertificateByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceCertificate, error)
- func GetCertificates(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListCertificates, error)
- func GetClusterComplianceReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceClusterComplianceReport, error)
- func GetClusterOrderByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceClusterOrder, error)
- func GetClusterVulnerabilityReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceClusterVulnerabilityReport, error)
- func GetClustercompliancereports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListClustercompliancereports, error)
- func GetClusterorders(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListClusterorders, error)
- func GetClustervulnerabilityreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListClustervulnerabilityreports, error)
- func GetConfigAuditReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceConfigAuditReport, error)
- func GetConfigauditreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListConfigauditreports, error)
- func GetConfigurationByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceConfiguration, error)
- func GetConfigurations(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListConfigurations, error)
- func GetDaemonSetByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceDaemonSet, error)
- func GetDaemonsets(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListDaemonsets, error)
- func GetDeploymentByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceDeployment, error)
- func GetDeployments(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListDeployments, error)
- func GetEndpoints(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListEndpoints, error)
- func GetEndpointsByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceEndpoints, error)
- func GetExposedSecretReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceExposedSecretReport, error)
- func GetExposedsecretreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListExposedsecretreports, error)
- func GetIngressByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceIngress, error)
- func GetIngressClassByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceIngressClass, error)
- func GetIngressclasses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListIngressclasses, error)
- func GetIngresses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListIngresses, error)
- func GetKubernetesClusterByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceKubernetesCluster, error)
- func GetKubernetesclusters(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListKubernetesclusters, error)
- func GetNamespaceByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceNamespace, error)
- func GetNamespaces(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListNamespaces, error)
- func GetNetworkPolicyByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceNetworkPolicy, error)
- func GetNetworkpolicies(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListNetworkpolicies, error)
- func GetNodeByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceNode, error)
- func GetNodes(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListNodes, error)
- func GetPersistentVolumeClaimByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourcePersistentVolumeClaim, error)
- func GetPersistentvolumeclaims(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListPersistentvolumeclaims, error)
- func GetPodByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourcePod, error)
- func GetPods(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListPods, error)
- func GetPolicyReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourcePolicyReport, error)
- func GetPolicyreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListPolicyreports, error)
- func GetProjectByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceProject, error)
- func GetProjects(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListProjects, error)
- func GetRbacAssessmentReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceRbacAssessmentReport, error)
- func GetRbacassessmentreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListRbacassessmentreports, error)
- func GetReplicaSetByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceReplicaSet, error)
- func GetReplicasets(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListReplicasets, error)
- func GetResource[T apiresourcecontracts.Resourcetypes](ctx context.Context, query apiresourcecontracts.ResourceQuery) (T, error)
- func GetResources[T apiresourcecontracts.Resourcetypes](ctx context.Context, query apiresourcecontracts.ResourceQuery) ([]T, error)
- func GetRouteByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceRoute, error)
- func GetRoutes(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListRoutes, error)
- func GetServiceByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceService, error)
- func GetServices(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListServices, error)
- func GetSlackMessageByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceSlackMessage, error)
- func GetSlackmessages(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListSlackmessages, error)
- func GetStatefulSetByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceStatefulSet, error)
- func GetStatefulsets(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListStatefulsets, error)
- func GetStorageClassByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceStorageClass, error)
- func GetStorageclasses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListStorageclasses, error)
- func GetTanzuKubernetesClusterByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceTanzuKubernetesCluster, error)
- func GetTanzuKubernetesReleaseByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceTanzuKubernetesRelease, error)
- func GetTanzukubernetesclusters(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListTanzukubernetesclusters, error)
- func GetTanzukubernetesreleases(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListTanzukubernetesreleases, error)
- func GetVirtualMachineByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceVirtualMachine, error)
- func GetVirtualMachineClassBindingByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceVirtualMachineClassBinding, error)
- func GetVirtualMachineClassByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceVirtualMachineClass, error)
- func GetVirtualmachineclassbindings(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVirtualmachineclassbindings, error)
- func GetVirtualmachineclasses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVirtualmachineclasses, error)
- func GetVirtualmachines(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVirtualmachines, error)
- func GetVulnerabilityEventByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceVulnerabilityEvent, error)
- func GetVulnerabilityReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, ...) (apiresourcecontracts.ResourceVulnerabilityReport, error)
- func GetVulnerabilityevents(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVulnerabilityevents, error)
- func GetVulnerabilityreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVulnerabilityreports, error)
- func PatchResource(ctx context.Context, uid string, resourceUpdate bson.M) (mongo.UpdateResult, error)
- func ResourceCreateService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
- func ResourceDeleteService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
- func ResourceGetHashlist(ctx context.Context, owner apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.HashList, error)
- func ResourceNewCreateService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
- func ResourceUpdateService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckResourceExist ¶
CheckResourceExist checks whether a resource with the provided `uid` exists in the MongoDB database. The function uses the `resourcesmongodbrepo.ResourceExistbyUid` function to query the database and returns `true` if a matching resource is found, otherwise it returns `false`.
func GetAppProjectByUid ¶
func GetAppProjectByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceAppProject, error)
Functions to get Appprojects by uid,ownerref The function is intended for use by internal functions
func GetApplicationByUid ¶
func GetApplicationByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceApplication, error)
Functions to get Applications by uid,ownerref The function is intended for use by internal functions
func GetApplications ¶
func GetApplications(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListApplications, error)
Functions to get Applications by ownerref The function is intended for use by internal functions
func GetAppprojects ¶
func GetAppprojects(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListAppprojects, error)
Functions to get Appprojects by ownerref The function is intended for use by internal functions
func GetCertificateByUid ¶
func GetCertificateByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceCertificate, error)
Functions to get Certificates by uid,ownerref The function is intended for use by internal functions
func GetCertificates ¶
func GetCertificates(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListCertificates, error)
Functions to get Certificates by ownerref The function is intended for use by internal functions
func GetClusterComplianceReportByUid ¶
func GetClusterComplianceReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceClusterComplianceReport, error)
Functions to get Clustercompliancereports by uid,ownerref The function is intended for use by internal functions
func GetClusterOrderByUid ¶
func GetClusterOrderByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceClusterOrder, error)
Functions to get Clusterorders by uid,ownerref The function is intended for use by internal functions
func GetClusterVulnerabilityReportByUid ¶
func GetClusterVulnerabilityReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceClusterVulnerabilityReport, error)
Functions to get Clustervulnerabilityreports by uid,ownerref The function is intended for use by internal functions
func GetClustercompliancereports ¶
func GetClustercompliancereports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListClustercompliancereports, error)
Functions to get Clustercompliancereports by ownerref The function is intended for use by internal functions
func GetClusterorders ¶
func GetClusterorders(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListClusterorders, error)
Functions to get Clusterorders by ownerref The function is intended for use by internal functions
func GetClustervulnerabilityreports ¶
func GetClustervulnerabilityreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListClustervulnerabilityreports, error)
Functions to get Clustervulnerabilityreports by ownerref The function is intended for use by internal functions
func GetConfigAuditReportByUid ¶
func GetConfigAuditReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceConfigAuditReport, error)
Functions to get Configauditreports by uid,ownerref The function is intended for use by internal functions
func GetConfigauditreports ¶
func GetConfigauditreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListConfigauditreports, error)
Functions to get Configauditreports by ownerref The function is intended for use by internal functions
func GetConfigurationByUid ¶
func GetConfigurationByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceConfiguration, error)
Functions to get Configurations by uid,ownerref The function is intended for use by internal functions
func GetConfigurations ¶
func GetConfigurations(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListConfigurations, error)
Functions to get Configurations by ownerref The function is intended for use by internal functions
func GetDaemonSetByUid ¶
func GetDaemonSetByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceDaemonSet, error)
Functions to get Daemonsets by uid,ownerref The function is intended for use by internal functions
func GetDaemonsets ¶
func GetDaemonsets(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListDaemonsets, error)
Functions to get Daemonsets by ownerref The function is intended for use by internal functions
func GetDeploymentByUid ¶
func GetDeploymentByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceDeployment, error)
Functions to get Deployments by uid,ownerref The function is intended for use by internal functions
func GetDeployments ¶
func GetDeployments(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListDeployments, error)
Functions to get Deployments by ownerref The function is intended for use by internal functions
func GetEndpoints ¶
func GetEndpoints(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListEndpoints, error)
Functions to get Endpoints by ownerref The function is intended for use by internal functions
func GetEndpointsByUid ¶
func GetEndpointsByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceEndpoints, error)
Functions to get Endpoints by uid,ownerref The function is intended for use by internal functions
func GetExposedSecretReportByUid ¶
func GetExposedSecretReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceExposedSecretReport, error)
Functions to get Exposedsecretreports by uid,ownerref The function is intended for use by internal functions
func GetExposedsecretreports ¶
func GetExposedsecretreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListExposedsecretreports, error)
Functions to get Exposedsecretreports by ownerref The function is intended for use by internal functions
func GetIngressByUid ¶
func GetIngressByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceIngress, error)
Functions to get Ingresses by uid,ownerref The function is intended for use by internal functions
func GetIngressClassByUid ¶
func GetIngressClassByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceIngressClass, error)
Functions to get Ingressclasses by uid,ownerref The function is intended for use by internal functions
func GetIngressclasses ¶
func GetIngressclasses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListIngressclasses, error)
Functions to get Ingressclasses by ownerref The function is intended for use by internal functions
func GetIngresses ¶
func GetIngresses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListIngresses, error)
Functions to get Ingresses by ownerref The function is intended for use by internal functions
func GetKubernetesClusterByUid ¶
func GetKubernetesClusterByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceKubernetesCluster, error)
Functions to get Kubernetesclusters by uid,ownerref The function is intended for use by internal functions
func GetKubernetesclusters ¶
func GetKubernetesclusters(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListKubernetesclusters, error)
Functions to get Kubernetesclusters by ownerref The function is intended for use by internal functions
func GetNamespaceByUid ¶
func GetNamespaceByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceNamespace, error)
Functions to get Namespaces by uid,ownerref The function is intended for use by internal functions
func GetNamespaces ¶
func GetNamespaces(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListNamespaces, error)
Functions to get Namespaces by ownerref The function is intended for use by internal functions
func GetNetworkPolicyByUid ¶
func GetNetworkPolicyByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceNetworkPolicy, error)
Functions to get Networkpolicies by uid,ownerref The function is intended for use by internal functions
func GetNetworkpolicies ¶
func GetNetworkpolicies(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListNetworkpolicies, error)
Functions to get Networkpolicies by ownerref The function is intended for use by internal functions
func GetNodeByUid ¶
func GetNodeByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceNode, error)
Functions to get Nodes by uid,ownerref The function is intended for use by internal functions
func GetNodes ¶
func GetNodes(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListNodes, error)
Functions to get Nodes by ownerref The function is intended for use by internal functions
func GetPersistentVolumeClaimByUid ¶
func GetPersistentVolumeClaimByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourcePersistentVolumeClaim, error)
Functions to get Persistentvolumeclaims by uid,ownerref The function is intended for use by internal functions
func GetPersistentvolumeclaims ¶
func GetPersistentvolumeclaims(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListPersistentvolumeclaims, error)
Functions to get Persistentvolumeclaims by ownerref The function is intended for use by internal functions
func GetPodByUid ¶
func GetPodByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourcePod, error)
Functions to get Pods by uid,ownerref The function is intended for use by internal functions
func GetPods ¶
func GetPods(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListPods, error)
Functions to get Pods by ownerref The function is intended for use by internal functions
func GetPolicyReportByUid ¶
func GetPolicyReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourcePolicyReport, error)
Functions to get Policyreports by uid,ownerref The function is intended for use by internal functions
func GetPolicyreports ¶
func GetPolicyreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListPolicyreports, error)
Functions to get Policyreports by ownerref The function is intended for use by internal functions
func GetProjectByUid ¶
func GetProjectByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceProject, error)
Functions to get Projects by uid,ownerref The function is intended for use by internal functions
func GetProjects ¶
func GetProjects(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListProjects, error)
Functions to get Projects by ownerref The function is intended for use by internal functions
func GetRbacAssessmentReportByUid ¶
func GetRbacAssessmentReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceRbacAssessmentReport, error)
Functions to get Rbacassessmentreports by uid,ownerref The function is intended for use by internal functions
func GetRbacassessmentreports ¶
func GetRbacassessmentreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListRbacassessmentreports, error)
Functions to get Rbacassessmentreports by ownerref The function is intended for use by internal functions
func GetReplicaSetByUid ¶
func GetReplicaSetByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceReplicaSet, error)
Functions to get Replicasets by uid,ownerref The function is intended for use by internal functions
func GetReplicasets ¶
func GetReplicasets(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListReplicasets, error)
Functions to get Replicasets by ownerref The function is intended for use by internal functions
func GetResource ¶
func GetResource[T apiresourcecontracts.Resourcetypes](ctx context.Context, query apiresourcecontracts.ResourceQuery) (T, error)
Get one resource by query (owner/apiVersion/Kind/uid)
func GetResources ¶
func GetResources[T apiresourcecontracts.Resourcetypes](ctx context.Context, query apiresourcecontracts.ResourceQuery) ([]T, error)
GetResources retrieves resources of type `T` from Mongo DB based on the provided `ResourceQuery`. The function queries the `resourcesmongodbrepo` using `GetResourcesByQuery[T]` method and returns a slice of the retrieved resources if successful. The function returns an error if the resource retrieval process fails.
func GetRouteByUid ¶
func GetRouteByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceRoute, error)
Functions to get Routes by uid,ownerref The function is intended for use by internal functions
func GetRoutes ¶
func GetRoutes(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListRoutes, error)
Functions to get Routes by ownerref The function is intended for use by internal functions
func GetServiceByUid ¶
func GetServiceByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceService, error)
Functions to get Services by uid,ownerref The function is intended for use by internal functions
func GetServices ¶
func GetServices(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListServices, error)
Functions to get Services by ownerref The function is intended for use by internal functions
func GetSlackMessageByUid ¶
func GetSlackMessageByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceSlackMessage, error)
Functions to get Slackmessages by uid,ownerref The function is intended for use by internal functions
func GetSlackmessages ¶
func GetSlackmessages(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListSlackmessages, error)
Functions to get Slackmessages by ownerref The function is intended for use by internal functions
func GetStatefulSetByUid ¶
func GetStatefulSetByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceStatefulSet, error)
Functions to get Statefulsets by uid,ownerref The function is intended for use by internal functions
func GetStatefulsets ¶
func GetStatefulsets(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListStatefulsets, error)
Functions to get Statefulsets by ownerref The function is intended for use by internal functions
func GetStorageClassByUid ¶
func GetStorageClassByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceStorageClass, error)
Functions to get Storageclasses by uid,ownerref The function is intended for use by internal functions
func GetStorageclasses ¶
func GetStorageclasses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListStorageclasses, error)
Functions to get Storageclasses by ownerref The function is intended for use by internal functions
func GetTanzuKubernetesClusterByUid ¶
func GetTanzuKubernetesClusterByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceTanzuKubernetesCluster, error)
Functions to get Tanzukubernetesclusters by uid,ownerref The function is intended for use by internal functions
func GetTanzuKubernetesReleaseByUid ¶
func GetTanzuKubernetesReleaseByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceTanzuKubernetesRelease, error)
Functions to get Tanzukubernetesreleases by uid,ownerref The function is intended for use by internal functions
func GetTanzukubernetesclusters ¶
func GetTanzukubernetesclusters(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListTanzukubernetesclusters, error)
Functions to get Tanzukubernetesclusters by ownerref The function is intended for use by internal functions
func GetTanzukubernetesreleases ¶
func GetTanzukubernetesreleases(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListTanzukubernetesreleases, error)
Functions to get Tanzukubernetesreleases by ownerref The function is intended for use by internal functions
func GetVirtualMachineByUid ¶
func GetVirtualMachineByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceVirtualMachine, error)
Functions to get Virtualmachines by uid,ownerref The function is intended for use by internal functions
func GetVirtualMachineClassBindingByUid ¶
func GetVirtualMachineClassBindingByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceVirtualMachineClassBinding, error)
Functions to get Virtualmachineclassbindings by uid,ownerref The function is intended for use by internal functions
func GetVirtualMachineClassByUid ¶
func GetVirtualMachineClassByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceVirtualMachineClass, error)
Functions to get Virtualmachineclasses by uid,ownerref The function is intended for use by internal functions
func GetVirtualmachineclassbindings ¶
func GetVirtualmachineclassbindings(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVirtualmachineclassbindings, error)
Functions to get Virtualmachineclassbindings by ownerref The function is intended for use by internal functions
func GetVirtualmachineclasses ¶
func GetVirtualmachineclasses(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVirtualmachineclasses, error)
Functions to get Virtualmachineclasses by ownerref The function is intended for use by internal functions
func GetVirtualmachines ¶
func GetVirtualmachines(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVirtualmachines, error)
Functions to get Virtualmachines by ownerref The function is intended for use by internal functions
func GetVulnerabilityEventByUid ¶
func GetVulnerabilityEventByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceVulnerabilityEvent, error)
Functions to get Vulnerabilityevents by uid,ownerref The function is intended for use by internal functions
func GetVulnerabilityReportByUid ¶
func GetVulnerabilityReportByUid(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference, uid string) (apiresourcecontracts.ResourceVulnerabilityReport, error)
Functions to get Vulnerabilityreports by uid,ownerref The function is intended for use by internal functions
func GetVulnerabilityevents ¶
func GetVulnerabilityevents(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVulnerabilityevents, error)
Functions to get Vulnerabilityevents by ownerref The function is intended for use by internal functions
func GetVulnerabilityreports ¶
func GetVulnerabilityreports(ctx context.Context, ownerref apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.ResourceListVulnerabilityreports, error)
Functions to get Vulnerabilityreports by ownerref The function is intended for use by internal functions
func PatchResource ¶
func PatchResource(ctx context.Context, uid string, resourceUpdate bson.M) (mongo.UpdateResult, error)
PatchResource updates a resource in the MongoDB database based on the provided `ResourceQuery` and `ResourceUpdateModel`. The function returns an error if the resource update process fails. The resourceUpdate parameter is a `bson.M` type which should be flattened to the following format:
bson.M{ "metadata.name": "test", }
This function is inteded used by internal functions and does not perform any validation on the provided parameters.
func ResourceCreateService ¶
func ResourceCreateService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
Function to creates a resource by the 'apiresourcecontracts.ResourceUpdateModel'
func ResourceDeleteService ¶
func ResourceDeleteService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
Function deletes a resource
func ResourceGetHashlist ¶
func ResourceGetHashlist(ctx context.Context, owner apiresourcecontracts.ResourceOwnerReference) (apiresourcecontracts.HashList, error)
returns the list of hashes owned by the ownerref
func ResourceNewCreateService ¶
func ResourceNewCreateService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
wrapper to allow create to update if hashlist is bugged or download failed
func ResourceUpdateService ¶
func ResourceUpdateService(ctx context.Context, resourceUpdate apiresourcecontracts.ResourceUpdateModel) error
Function to update a resource by the 'apiresourcecontracts.ResourceUpdateModel' struct
Types ¶
This section is empty.
Source Files ¶
- resourceService.go
- resourceServices_filterAppProject.go
- resourceServices_filterApplication.go
- resourceServices_filterCertificate.go
- resourceServices_filterClusterComplianceReport.go
- resourceServices_filterClusterOrder.go
- resourceServices_filterClusterVulnerabilityReport.go
- resourceServices_filterConfigAuditReport.go
- resourceServices_filterConfiguration.go
- resourceServices_filterDaemonSet.go
- resourceServices_filterDeployment.go
- resourceServices_filterEndpoints.go
- resourceServices_filterExposedSecretReport.go
- resourceServices_filterIngress.go
- resourceServices_filterIngressClass.go
- resourceServices_filterKubernetesCluster.go
- resourceServices_filterNamespace.go
- resourceServices_filterNetworkPolicy.go
- resourceServices_filterNode.go
- resourceServices_filterPersistentVolumeClaim.go
- resourceServices_filterPod.go
- resourceServices_filterPolicyReport.go
- resourceServices_filterProject.go
- resourceServices_filterRbacAssessmentReport.go
- resourceServices_filterReplicaSet.go
- resourceServices_filterRoute.go
- resourceServices_filterService.go
- resourceServices_filterSlackMessage.go
- resourceServices_filterStatefulSet.go
- resourceServices_filterStorageClass.go
- resourceServices_filterTanzuKubernetesCluster.go
- resourceServices_filterTanzuKubernetesRelease.go
- resourceServices_filterVirtualMachineClass.go
- resourceServices_filterVirtualMachineClassBinding.go
- resourceServices_filterVm.go
- resourceServices_filterVulnerabilityEvent.go
- resourceServices_filterVulnerabilityReport.go
- resourceServices_generated.go