resourcesmongodbrepo

package
v0.0.0-...-b028101 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

TODO: This library is imported from ror, should determine if its a public library or not

package implements repofunctions to do crud operations on resources

Index

Constants

View Source
const (
	ResourceCollectionName = "resources"
)

Variables

This section is empty.

Functions

func CreateResourceAppProject

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceAppProject]

func CreateResourceApplication

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceApplication]

func CreateResourceCertificate

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceCertificate]

func CreateResourceClusterComplianceReport

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceClusterComplianceReport]

func CreateResourceClusterOrder

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceClusterOrder]

func CreateResourceClusterVulnerabilityReport

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceClusterVulnerabilityReport]

func CreateResourceConfigAuditReport

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceConfigAuditReport]

func CreateResourceConfiguration

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceConfiguration]

func CreateResourceDaemonSet

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceDaemonSet]

func CreateResourceDeployment

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceDeployment]

func CreateResourceExposedSecretReport

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceExposedSecretReport]

func CreateResourceIngress

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceIngress]

func CreateResourceIngressClass

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceIngressClass]

func CreateResourceKubernetesCluster

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceKubernetesCluster]

func CreateResourceNamespace

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceNamespace]

func CreateResourceNode

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceNode]

func CreateResourcePersistentVolumeClaim

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourcePersistentVolumeClaim]

func CreateResourcePod

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourcePod]

func CreateResourcePolicyReport

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourcePolicyReport]

func CreateResourceProject

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceProject]

func CreateResourceRbacAssessmentReport

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceRbacAssessmentReport]

func CreateResourceReplicaSet

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceReplicaSet]

func CreateResourceRoute

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceRoute]

func CreateResourceService

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceService]

func CreateResourceSlackMessage

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceSlackMessage]

func CreateResourceStatefulSet

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceStatefulSet]

func CreateResourceStorageClass

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceStorageClass]

func CreateResourceTanzuKubernetesCluster

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceTanzuKubernetesCluster]

func CreateResourceTanzuKubernetesRelease

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceTanzuKubernetesRelease]

func CreateResourceVirtualMachine

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVirtualMachine]

func CreateResourceVirtualMachineClass

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVirtualMachineClass]

func CreateResourceVirtualMachineClassBinding

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVirtualMachineClassBinding]

func CreateResourceVulnerabilityEvent

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVulnerabilityEvent]

func CreateResourceVulnerabilityReport

Creates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVulnerabilityReport]

func DeleteResourceByUid

func DeleteResourceByUid(resourceUpdate apiresourcecontracts.ResourceUpdateModel, ctx context.Context) error

DeleteResourceByUid Delete resource by uid

func GetHashList

GetHashList return list of registerd hashes by ownerref

func GetResourceByUid

func GetResourceByUid[T apiresourcecontracts.Resourcetypes](ctx context.Context, uid string) (T, error)

Only internal use, does not implement owner check

func MapToResourceModel

func MapToResourceModel[D any](input any) D

function to map resource to provided resourcemodel

func PatchResource

func PatchResource(ctx context.Context, uid string, resourceUpdate bson.M) (mongo.UpdateResult, error)

func ResourceExistbyUid

func ResourceExistbyUid(uid string, ctx context.Context) bool

Checks if resource exists by uid, return bool, error

func UpdateResourceAppProject

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceAppProject] by uid

func UpdateResourceApplication

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceApplication] by uid

func UpdateResourceCertificate

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceCertificate] by uid

func UpdateResourceClusterComplianceReport

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceClusterComplianceReport] by uid

func UpdateResourceClusterOrder

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceClusterOrder] by uid

func UpdateResourceClusterVulnerabilityReport

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceClusterVulnerabilityReport] by uid

func UpdateResourceConfigAuditReport

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceConfigAuditReport] by uid

func UpdateResourceConfiguration

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceConfiguration] by uid

func UpdateResourceDaemonSet

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceDaemonSet] by uid

func UpdateResourceDeployment

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceDeployment] by uid

func UpdateResourceExposedSecretReport

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceExposedSecretReport] by uid

func UpdateResourceIngress

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceIngress] by uid

func UpdateResourceIngressClass

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceIngressClass] by uid

func UpdateResourceKubernetesCluster

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceKubernetesCluster] by uid

func UpdateResourceNamespace

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceNamespace] by uid

func UpdateResourceNode

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceNode] by uid

func UpdateResourcePersistentVolumeClaim

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourcePersistentVolumeClaim] by uid

func UpdateResourcePod

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourcePod] by uid

func UpdateResourcePolicyReport

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourcePolicyReport] by uid

func UpdateResourceProject

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceProject] by uid

func UpdateResourceRbacAssessmentReport

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceRbacAssessmentReport] by uid

func UpdateResourceReplicaSet

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceReplicaSet] by uid

func UpdateResourceRoute

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceRoute] by uid

func UpdateResourceService

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceService] by uid

func UpdateResourceSlackMessage

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceSlackMessage] by uid

func UpdateResourceStatefulSet

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceStatefulSet] by uid

func UpdateResourceStorageClass

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceStorageClass] by uid

func UpdateResourceTanzuKubernetesCluster

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceTanzuKubernetesCluster] by uid

func UpdateResourceTanzuKubernetesRelease

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceTanzuKubernetesRelease] by uid

func UpdateResourceVirtualMachine

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVirtualMachine] by uid

func UpdateResourceVirtualMachineClass

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVirtualMachineClass] by uid

func UpdateResourceVirtualMachineClassBinding

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVirtualMachineClassBinding] by uid

func UpdateResourceVulnerabilityEvent

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVulnerabilityEvent] by uid

func UpdateResourceVulnerabilityReport

Updates resource entry of type apiresourcecontracts.ResourceModel[apiresourcecontracts.ResourceVulnerabilityReport] by uid

Types

This section is empty.

Jump to

Keyboard shortcuts

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