Documentation ¶
Index ¶
- Constants
- type FilterOperator
- type FilterType
- type Resource
- func (r *Resource) AppProject() rortypes.AppProjectinterface
- func (r *Resource) Application() rortypes.Applicationinterface
- func (r *Resource) ApplyInputFilter() error
- func (r *Resource) Certificate() rortypes.Certificateinterface
- func (r *Resource) ClusterComplianceReport() rortypes.ClusterComplianceReportinterface
- func (r *Resource) ClusterOrder() rortypes.ClusterOrderinterface
- func (r *Resource) ClusterVulnerabilityReport() rortypes.ClusterVulnerabilityReportinterface
- func (r *Resource) ConfigAuditReport() rortypes.ConfigAuditReportinterface
- func (r *Resource) Configuration() rortypes.Configurationinterface
- func (r *Resource) DaemonSet() rortypes.DaemonSetinterface
- func (r *Resource) Deployment() rortypes.Deploymentinterface
- func (r *Resource) ExposedSecretReport() rortypes.ExposedSecretReportinterface
- func (r *Resource) GenRorHash()
- func (r *Resource) GetRorHash() string
- func (r *Resource) Ingress() rortypes.Ingressinterface
- func (r *Resource) IngressClass() rortypes.IngressClassinterface
- func (r *Resource) KubernetesCluster() rortypes.KubernetesClusterinterface
- func (r *Resource) Namespace() rortypes.Namespaceinterface
- func (r *Resource) Node() rortypes.Nodeinterface
- func (r *Resource) PersistentVolumeClaim() rortypes.PersistentVolumeClaiminterface
- func (r *Resource) Pod() rortypes.Podinterface
- func (r *Resource) PolicyReport() rortypes.PolicyReportinterface
- func (r *Resource) Project() rortypes.Projectinterface
- func (r *Resource) RbacAssessmentReport() rortypes.RbacAssessmentReportinterface
- func (r *Resource) ReplicaSet() rortypes.ReplicaSetinterface
- func (r *Resource) Route() rortypes.Routeinterface
- func (r *Resource) Service() rortypes.Serviceinterface
- func (r *Resource) SetAppProject(res *rortypes.ResourceAppProject)
- func (r *Resource) SetApplication(res *rortypes.ResourceApplication)
- func (r *Resource) SetCertificate(res *rortypes.ResourceCertificate)
- func (r *Resource) SetClusterComplianceReport(res *rortypes.ResourceClusterComplianceReport)
- func (r *Resource) SetClusterOrder(res *rortypes.ResourceClusterOrder)
- func (r *Resource) SetClusterVulnerabilityReport(res *rortypes.ResourceClusterVulnerabilityReport)
- func (r *Resource) SetCommonInterface(common rortypes.CommonResourceInterface)
- func (r *Resource) SetCommonResource(common rortypes.CommonResource)
- func (r *Resource) SetConfigAuditReport(res *rortypes.ResourceConfigAuditReport)
- func (r *Resource) SetConfiguration(res *rortypes.ResourceConfiguration)
- func (r *Resource) SetDaemonSet(res *rortypes.ResourceDaemonSet)
- func (r *Resource) SetDeployment(res *rortypes.ResourceDeployment)
- func (r *Resource) SetExposedSecretReport(res *rortypes.ResourceExposedSecretReport)
- func (r *Resource) SetIngress(res *rortypes.ResourceIngress)
- func (r *Resource) SetIngressClass(res *rortypes.ResourceIngressClass)
- func (r *Resource) SetKubernetesCluster(res *rortypes.ResourceKubernetesCluster)
- func (r *Resource) SetNamespace(res *rortypes.ResourceNamespace)
- func (r *Resource) SetNode(res *rortypes.ResourceNode)
- func (r *Resource) SetPersistentVolumeClaim(res *rortypes.ResourcePersistentVolumeClaim)
- func (r *Resource) SetPod(res *rortypes.ResourcePod)
- func (r *Resource) SetPolicyReport(res *rortypes.ResourcePolicyReport)
- func (r *Resource) SetProject(res *rortypes.ResourceProject)
- func (r *Resource) SetRbacAssessmentReport(res *rortypes.ResourceRbacAssessmentReport)
- func (r *Resource) SetReplicaSet(res *rortypes.ResourceReplicaSet)
- func (r *Resource) SetRoute(res *rortypes.ResourceRoute)
- func (r *Resource) SetService(res *rortypes.ResourceService)
- func (r *Resource) SetSlackMessage(res *rortypes.ResourceSlackMessage)
- func (r *Resource) SetStatefulSet(res *rortypes.ResourceStatefulSet)
- func (r *Resource) SetStorageClass(res *rortypes.ResourceStorageClass)
- func (r *Resource) SetTanzuKubernetesCluster(res *rortypes.ResourceTanzuKubernetesCluster)
- func (r *Resource) SetTanzuKubernetesRelease(res *rortypes.ResourceTanzuKubernetesRelease)
- func (r *Resource) SetVirtualMachineClass(res *rortypes.ResourceVirtualMachineClass)
- func (r *Resource) SetVirtualMachineClassBinding(res *rortypes.ResourceVirtualMachineClassBinding)
- func (r *Resource) SetVulnerabilityEvent(res *rortypes.ResourceVulnerabilityEvent)
- func (r *Resource) SetVulnerabilityReport(res *rortypes.ResourceVulnerabilityReport)
- func (r *Resource) SlackMessage() rortypes.SlackMessageinterface
- func (r *Resource) StatefulSet() rortypes.StatefulSetinterface
- func (r *Resource) StorageClass() rortypes.StorageClassinterface
- func (r *Resource) TanzuKubernetesCluster() rortypes.TanzuKubernetesClusterinterface
- func (r *Resource) TanzuKubernetesRelease() rortypes.TanzuKubernetesReleaseinterface
- func (r *Resource) VirtualMachineClass() rortypes.VirtualMachineClassinterface
- func (r *Resource) VirtualMachineClassBinding() rortypes.VirtualMachineClassBindinginterface
- func (r *Resource) VulnerabilityEvent() rortypes.VulnerabilityEventinterface
- func (r *Resource) VulnerabilityReport() rortypes.VulnerabilityReportinterface
- type ResourceQuery
- type ResourceQueryFilter
- type ResourceQueryOrder
- type ResourceSet
- func (r *ResourceSet) Add(add *Resource)
- func (r *ResourceSet) DeleteByUid(search string)
- func (r *ResourceSet) FilterByAPIVersionKind(apiVersion string, kind string) *ResourceSet
- func (r *ResourceSet) FilterByLabels(search map[string]string) *ResourceSet
- func (r *ResourceSet) FilterByOwnerReference(ownerRef rortypes.RorResourceOwnerReference) *ResourceSet
- func (r *ResourceSet) Get() *Resource
- func (r *ResourceSet) GetAll() []*Resource
- func (r *ResourceSet) GetByName(search string) *Resource
- func (r *ResourceSet) GetByUid(search string) *Resource
- func (rs *ResourceSet) GetQuery() *ResourceQuery
- func (r *ResourceSet) Len() int
- func (r *ResourceSet) Next() bool
- func (rs *ResourceSet) SetQuery(query *ResourceQuery)
- func (r *ResourceSet) ToJson() ([]byte, error)
- type ResourceUpdateResult
- type ResourceUpdateResults
Constants ¶
const ( FilterTypeString FilterType = "string" FilterTypeInt FilterType = "int" FilterTupeIntString FilterType = "intstring" FilterTypeBool FilterType = "bool" FilterTypeTime FilterType = "time" FilterTypeTimeString FilterType = "timestring" FilterOperatorEq FilterOperator = "eq" FilterOperatorNe FilterOperator = "ne" FilterOperatorRegexp FilterOperator = "regexp" FilterOperatorGt FilterOperator = "gt" FilterOperatorLt FilterOperator = "lt" FilterOperatorGe FilterOperator = "ge" FilterOperatorLe FilterOperator = "le" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterOperator ¶ added in v0.3.5
type FilterOperator string
type FilterType ¶
type FilterType string
type Resource ¶
type Resource struct { rortypes.CommonResource `json:",inline" bson:",inline"` NamespaceResource *rortypes.ResourceNamespace `json:"namespace,omitempty" bson:"namespace,omitempty"` NodeResource *rortypes.ResourceNode `json:"node,omitempty" bson:"node,omitempty"` PersistentVolumeClaimResource *rortypes.ResourcePersistentVolumeClaim `json:"persistentvolumeclaim,omitempty" bson:"persistentvolumeclaim,omitempty"` DeploymentResource *rortypes.ResourceDeployment `json:"deployment,omitempty" bson:"deployment,omitempty"` StorageClassResource *rortypes.ResourceStorageClass `json:"storageclass,omitempty" bson:"storageclass,omitempty"` PolicyReportResource *rortypes.ResourcePolicyReport `json:"policyreport,omitempty" bson:"policyreport,omitempty"` ApplicationResource *rortypes.ResourceApplication `json:"application,omitempty" bson:"application,omitempty"` AppProjectResource *rortypes.ResourceAppProject `json:"appproject,omitempty" bson:"appproject,omitempty"` CertificateResource *rortypes.ResourceCertificate `json:"certificate,omitempty" bson:"certificate,omitempty"` ServiceResource *rortypes.ResourceService `json:"service,omitempty" bson:"service,omitempty"` PodResource *rortypes.ResourcePod `json:"pod,omitempty" bson:"pod,omitempty"` ReplicaSetResource *rortypes.ResourceReplicaSet `json:"replicaset,omitempty" bson:"replicaset,omitempty"` StatefulSetResource *rortypes.ResourceStatefulSet `json:"statefulset,omitempty" bson:"statefulset,omitempty"` DaemonSetResource *rortypes.ResourceDaemonSet `json:"daemonset,omitempty" bson:"daemonset,omitempty"` IngressResource *rortypes.ResourceIngress `json:"ingress,omitempty" bson:"ingress,omitempty"` IngressClassResource *rortypes.ResourceIngressClass `json:"ingressclass,omitempty" bson:"ingressclass,omitempty"` VulnerabilityReportResource *rortypes.ResourceVulnerabilityReport `json:"vulnerabilityreport,omitempty" bson:"vulnerabilityreport,omitempty"` ExposedSecretReportResource *rortypes.ResourceExposedSecretReport `json:"exposedsecretreport,omitempty" bson:"exposedsecretreport,omitempty"` ConfigAuditReportResource *rortypes.ResourceConfigAuditReport `json:"configauditreport,omitempty" bson:"configauditreport,omitempty"` RbacAssessmentReportResource *rortypes.ResourceRbacAssessmentReport `json:"rbacassessmentreport,omitempty" bson:"rbacassessmentreport,omitempty"` TanzuKubernetesClusterResource *rortypes.ResourceTanzuKubernetesCluster `json:"tanzukubernetescluster,omitempty" bson:"tanzukubernetescluster,omitempty"` TanzuKubernetesReleaseResource *rortypes.ResourceTanzuKubernetesRelease `json:"tanzukubernetesrelease,omitempty" bson:"tanzukubernetesrelease,omitempty"` VirtualMachineClassResource *rortypes.ResourceVirtualMachineClass `json:"virtualmachineclass,omitempty" bson:"virtualmachineclass,omitempty"` VirtualMachineClassBindingResource *rortypes.ResourceVirtualMachineClassBinding `json:"virtualmachineclassbinding,omitempty" bson:"virtualmachineclassbinding,omitempty"` KubernetesClusterResource *rortypes.ResourceKubernetesCluster `json:"kubernetescluster,omitempty" bson:"kubernetescluster,omitempty"` ClusterOrderResource *rortypes.ResourceClusterOrder `json:"clusterorder,omitempty" bson:"clusterorder,omitempty"` ProjectResource *rortypes.ResourceProject `json:"project,omitempty" bson:"project,omitempty"` ConfigurationResource *rortypes.ResourceConfiguration `json:"configuration,omitempty" bson:"configuration,omitempty"` ClusterComplianceReportResource *rortypes.ResourceClusterComplianceReport `json:"clustercompliancereport,omitempty" bson:"clustercompliancereport,omitempty"` ClusterVulnerabilityReportResource *rortypes.ResourceClusterVulnerabilityReport `json:"clustervulnerabilityreport,omitempty" bson:"clustervulnerabilityreport,omitempty"` RouteResource *rortypes.ResourceRoute `json:"route,omitempty" bson:"route,omitempty"` SlackMessageResource *rortypes.ResourceSlackMessage `json:"slackmessage,omitempty" bson:"slackmessage,omitempty"` VulnerabilityEventResource *rortypes.ResourceVulnerabilityEvent `json:"vulnerabilityevent,omitempty" bson:"vulnerabilityevent,omitempty"` // contains filtered or unexported fields }
The Resource struct represents one resource in ror.
It implement common and resource specific methods by providing interfaces to the underlying resources
func NewResourceFromStruct ¶ added in v0.3.0
func NewRorResource ¶
NewRorResource provides a empty resource of a given kind/apiversion
func (*Resource) AppProject ¶
func (r *Resource) AppProject() rortypes.AppProjectinterface
AppProject is a wrapper for the underlying resource, it provides a AppProjectinterface to work with appprojects
func (*Resource) Application ¶
func (r *Resource) Application() rortypes.Applicationinterface
Application is a wrapper for the underlying resource, it provides a Applicationinterface to work with applications
func (*Resource) ApplyInputFilter ¶
func (*Resource) Certificate ¶
func (r *Resource) Certificate() rortypes.Certificateinterface
Certificate is a wrapper for the underlying resource, it provides a Certificateinterface to work with certificates
func (*Resource) ClusterComplianceReport ¶
func (r *Resource) ClusterComplianceReport() rortypes.ClusterComplianceReportinterface
ClusterComplianceReport is a wrapper for the underlying resource, it provides a ClusterComplianceReportinterface to work with clustercompliancereports
func (*Resource) ClusterOrder ¶
func (r *Resource) ClusterOrder() rortypes.ClusterOrderinterface
ClusterOrder is a wrapper for the underlying resource, it provides a ClusterOrderinterface to work with clusterorders
func (*Resource) ClusterVulnerabilityReport ¶ added in v0.2.3
func (r *Resource) ClusterVulnerabilityReport() rortypes.ClusterVulnerabilityReportinterface
ClusterVulnerabilityReport is a wrapper for the underlying resource, it provides a ClusterVulnerabilityReportinterface to work with clustervulnerabilityreports
func (*Resource) ConfigAuditReport ¶
func (r *Resource) ConfigAuditReport() rortypes.ConfigAuditReportinterface
ConfigAuditReport is a wrapper for the underlying resource, it provides a ConfigAuditReportinterface to work with configauditreports
func (*Resource) Configuration ¶
func (r *Resource) Configuration() rortypes.Configurationinterface
Configuration is a wrapper for the underlying resource, it provides a Configurationinterface to work with configurations
func (*Resource) DaemonSet ¶
func (r *Resource) DaemonSet() rortypes.DaemonSetinterface
DaemonSet is a wrapper for the underlying resource, it provides a DaemonSetinterface to work with daemonsets
func (*Resource) Deployment ¶
func (r *Resource) Deployment() rortypes.Deploymentinterface
Deployment is a wrapper for the underlying resource, it provides a Deploymentinterface to work with deployments
func (*Resource) ExposedSecretReport ¶
func (r *Resource) ExposedSecretReport() rortypes.ExposedSecretReportinterface
ExposedSecretReport is a wrapper for the underlying resource, it provides a ExposedSecretReportinterface to work with exposedsecretreports
func (*Resource) GenRorHash ¶ added in v0.3.0
func (r *Resource) GenRorHash()
(r *Resource) GenRorHash() calculates the hash of the resource and set the metadata header
func (*Resource) GetRorHash ¶
(r *Resource) GetRorHash() returns the hash from the common interface
func (*Resource) Ingress ¶
func (r *Resource) Ingress() rortypes.Ingressinterface
Ingress is a wrapper for the underlying resource, it provides a Ingressinterface to work with ingresses
func (*Resource) IngressClass ¶
func (r *Resource) IngressClass() rortypes.IngressClassinterface
IngressClass is a wrapper for the underlying resource, it provides a IngressClassinterface to work with ingressclasses
func (*Resource) KubernetesCluster ¶
func (r *Resource) KubernetesCluster() rortypes.KubernetesClusterinterface
KubernetesCluster is a wrapper for the underlying resource, it provides a KubernetesClusterinterface to work with kubernetesclusters
func (*Resource) Namespace ¶
func (r *Resource) Namespace() rortypes.Namespaceinterface
Namespace is a wrapper for the underlying resource, it provides a Namespaceinterface to work with namespaces
func (*Resource) Node ¶
func (r *Resource) Node() rortypes.Nodeinterface
Node is a wrapper for the underlying resource, it provides a Nodeinterface to work with nodes
func (*Resource) PersistentVolumeClaim ¶
func (r *Resource) PersistentVolumeClaim() rortypes.PersistentVolumeClaiminterface
PersistentVolumeClaim is a wrapper for the underlying resource, it provides a PersistentVolumeClaiminterface to work with persistentvolumeclaims
func (*Resource) Pod ¶
func (r *Resource) Pod() rortypes.Podinterface
Pod is a wrapper for the underlying resource, it provides a Podinterface to work with pods
func (*Resource) PolicyReport ¶
func (r *Resource) PolicyReport() rortypes.PolicyReportinterface
PolicyReport is a wrapper for the underlying resource, it provides a PolicyReportinterface to work with policyreports
func (*Resource) Project ¶
func (r *Resource) Project() rortypes.Projectinterface
Project is a wrapper for the underlying resource, it provides a Projectinterface to work with projects
func (*Resource) RbacAssessmentReport ¶
func (r *Resource) RbacAssessmentReport() rortypes.RbacAssessmentReportinterface
RbacAssessmentReport is a wrapper for the underlying resource, it provides a RbacAssessmentReportinterface to work with rbacassessmentreports
func (*Resource) ReplicaSet ¶
func (r *Resource) ReplicaSet() rortypes.ReplicaSetinterface
ReplicaSet is a wrapper for the underlying resource, it provides a ReplicaSetinterface to work with replicasets
func (*Resource) Route ¶ added in v0.2.3
func (r *Resource) Route() rortypes.Routeinterface
Route is a wrapper for the underlying resource, it provides a Routeinterface to work with routes
func (*Resource) Service ¶
func (r *Resource) Service() rortypes.Serviceinterface
Service is a wrapper for the underlying resource, it provides a Serviceinterface to work with services
func (*Resource) SetAppProject ¶
func (r *Resource) SetAppProject(res *rortypes.ResourceAppProject)
func (*Resource) SetApplication ¶
func (r *Resource) SetApplication(res *rortypes.ResourceApplication)
func (*Resource) SetCertificate ¶
func (r *Resource) SetCertificate(res *rortypes.ResourceCertificate)
func (*Resource) SetClusterComplianceReport ¶
func (r *Resource) SetClusterComplianceReport(res *rortypes.ResourceClusterComplianceReport)
func (*Resource) SetClusterOrder ¶
func (r *Resource) SetClusterOrder(res *rortypes.ResourceClusterOrder)
func (*Resource) SetClusterVulnerabilityReport ¶ added in v0.2.3
func (r *Resource) SetClusterVulnerabilityReport(res *rortypes.ResourceClusterVulnerabilityReport)
func (*Resource) SetCommonInterface ¶ added in v0.3.0
func (r *Resource) SetCommonInterface(common rortypes.CommonResourceInterface)
SetCommonInterface sets the common interface of the resource, the common interface implements common methods of the resource
func (*Resource) SetCommonResource ¶ added in v0.3.0
func (r *Resource) SetCommonResource(common rortypes.CommonResource)
SetCommonResource sets the common resource of the resource, the common resource implements common metadata of the resource
func (*Resource) SetConfigAuditReport ¶
func (r *Resource) SetConfigAuditReport(res *rortypes.ResourceConfigAuditReport)
func (*Resource) SetConfiguration ¶
func (r *Resource) SetConfiguration(res *rortypes.ResourceConfiguration)
func (*Resource) SetDaemonSet ¶
func (r *Resource) SetDaemonSet(res *rortypes.ResourceDaemonSet)
func (*Resource) SetDeployment ¶
func (r *Resource) SetDeployment(res *rortypes.ResourceDeployment)
func (*Resource) SetExposedSecretReport ¶
func (r *Resource) SetExposedSecretReport(res *rortypes.ResourceExposedSecretReport)
func (*Resource) SetIngress ¶
func (r *Resource) SetIngress(res *rortypes.ResourceIngress)
func (*Resource) SetIngressClass ¶
func (r *Resource) SetIngressClass(res *rortypes.ResourceIngressClass)
func (*Resource) SetKubernetesCluster ¶
func (r *Resource) SetKubernetesCluster(res *rortypes.ResourceKubernetesCluster)
func (*Resource) SetNamespace ¶
func (r *Resource) SetNamespace(res *rortypes.ResourceNamespace)
func (*Resource) SetNode ¶
func (r *Resource) SetNode(res *rortypes.ResourceNode)
func (*Resource) SetPersistentVolumeClaim ¶
func (r *Resource) SetPersistentVolumeClaim(res *rortypes.ResourcePersistentVolumeClaim)
func (*Resource) SetPod ¶
func (r *Resource) SetPod(res *rortypes.ResourcePod)
func (*Resource) SetPolicyReport ¶
func (r *Resource) SetPolicyReport(res *rortypes.ResourcePolicyReport)
func (*Resource) SetProject ¶
func (r *Resource) SetProject(res *rortypes.ResourceProject)
func (*Resource) SetRbacAssessmentReport ¶
func (r *Resource) SetRbacAssessmentReport(res *rortypes.ResourceRbacAssessmentReport)
func (*Resource) SetReplicaSet ¶
func (r *Resource) SetReplicaSet(res *rortypes.ResourceReplicaSet)
func (*Resource) SetRoute ¶ added in v0.2.3
func (r *Resource) SetRoute(res *rortypes.ResourceRoute)
func (*Resource) SetService ¶
func (r *Resource) SetService(res *rortypes.ResourceService)
func (*Resource) SetSlackMessage ¶ added in v0.2.3
func (r *Resource) SetSlackMessage(res *rortypes.ResourceSlackMessage)
func (*Resource) SetStatefulSet ¶
func (r *Resource) SetStatefulSet(res *rortypes.ResourceStatefulSet)
func (*Resource) SetStorageClass ¶
func (r *Resource) SetStorageClass(res *rortypes.ResourceStorageClass)
func (*Resource) SetTanzuKubernetesCluster ¶
func (r *Resource) SetTanzuKubernetesCluster(res *rortypes.ResourceTanzuKubernetesCluster)
func (*Resource) SetTanzuKubernetesRelease ¶
func (r *Resource) SetTanzuKubernetesRelease(res *rortypes.ResourceTanzuKubernetesRelease)
func (*Resource) SetVirtualMachineClass ¶
func (r *Resource) SetVirtualMachineClass(res *rortypes.ResourceVirtualMachineClass)
func (*Resource) SetVirtualMachineClassBinding ¶
func (r *Resource) SetVirtualMachineClassBinding(res *rortypes.ResourceVirtualMachineClassBinding)
func (*Resource) SetVulnerabilityEvent ¶ added in v0.3.10
func (r *Resource) SetVulnerabilityEvent(res *rortypes.ResourceVulnerabilityEvent)
func (*Resource) SetVulnerabilityReport ¶
func (r *Resource) SetVulnerabilityReport(res *rortypes.ResourceVulnerabilityReport)
func (*Resource) SlackMessage ¶ added in v0.2.3
func (r *Resource) SlackMessage() rortypes.SlackMessageinterface
SlackMessage is a wrapper for the underlying resource, it provides a SlackMessageinterface to work with slackmessages
func (*Resource) StatefulSet ¶
func (r *Resource) StatefulSet() rortypes.StatefulSetinterface
StatefulSet is a wrapper for the underlying resource, it provides a StatefulSetinterface to work with statefulsets
func (*Resource) StorageClass ¶
func (r *Resource) StorageClass() rortypes.StorageClassinterface
StorageClass is a wrapper for the underlying resource, it provides a StorageClassinterface to work with storageclasses
func (*Resource) TanzuKubernetesCluster ¶
func (r *Resource) TanzuKubernetesCluster() rortypes.TanzuKubernetesClusterinterface
TanzuKubernetesCluster is a wrapper for the underlying resource, it provides a TanzuKubernetesClusterinterface to work with tanzukubernetesclusters
func (*Resource) TanzuKubernetesRelease ¶
func (r *Resource) TanzuKubernetesRelease() rortypes.TanzuKubernetesReleaseinterface
TanzuKubernetesRelease is a wrapper for the underlying resource, it provides a TanzuKubernetesReleaseinterface to work with tanzukubernetesreleases
func (*Resource) VirtualMachineClass ¶
func (r *Resource) VirtualMachineClass() rortypes.VirtualMachineClassinterface
VirtualMachineClass is a wrapper for the underlying resource, it provides a VirtualMachineClassinterface to work with virtualmachineclasses
func (*Resource) VirtualMachineClassBinding ¶
func (r *Resource) VirtualMachineClassBinding() rortypes.VirtualMachineClassBindinginterface
VirtualMachineClassBinding is a wrapper for the underlying resource, it provides a VirtualMachineClassBindinginterface to work with virtualmachineclassbindings
func (*Resource) VulnerabilityEvent ¶ added in v0.3.10
func (r *Resource) VulnerabilityEvent() rortypes.VulnerabilityEventinterface
VulnerabilityEvent is a wrapper for the underlying resource, it provides a VulnerabilityEventinterface to work with vulnerabilityevents
func (*Resource) VulnerabilityReport ¶
func (r *Resource) VulnerabilityReport() rortypes.VulnerabilityReportinterface
VulnerabilityReport is a wrapper for the underlying resource, it provides a VulnerabilityReportinterface to work with vulnerabilityreports
type ResourceQuery ¶
type ResourceQuery struct { VersionKind schema.GroupVersionKind `json:"versionkind,omitempty"` // memory Uids []string `json:"uids,omitempty"` // memory OwnerRefs []rortypes.RorResourceOwnerReference `json:"ownerrefs,omitempty"` // memory Fields []string `json:"fields,omitempty"` // post or db Order []ResourceQueryOrder `json:"order,omitempty"` // post or db Filters []ResourceQueryFilter `json:"filters,omitempty"` // db Offset int `json:"offset,omitempty"` // post or db Limit int `json:"limit,omitempty"` // post or db RelatedResources []ResourceQuery `json:"relatedresources,omitempty"` // memory or db }
func NewResourceQuery ¶ added in v0.3.0
func NewResourceQuery() *ResourceQuery
func (ResourceQuery) GetOrderSorted ¶ added in v0.3.0
func (rq ResourceQuery) GetOrderSorted() []ResourceQueryOrder
func (*ResourceQuery) WithUID ¶ added in v0.3.0
func (rq *ResourceQuery) WithUID(uid string) *ResourceQuery
type ResourceQueryFilter ¶
type ResourceQueryFilter struct { Field string `json:"field,omitempty"` Value string `json:"value,omitempty"` Type FilterType `json:"type,omitempty"` Operator FilterOperator `json:"operator,omitempty"` }
type ResourceQueryOrder ¶
type ResourceSet ¶
type ResourceSet struct { Resources []*Resource `json:"resources,omitempty"` // contains filtered or unexported fields }
ResourceSet is the common way to present one or more resources in ror.
func NewResourceSet ¶
func NewResourceSet() *ResourceSet
func NewResourceSetFromStruct ¶
func NewResourceSetFromStruct(in ResourceSet) *ResourceSet
NewResourceSetFromStruct creates a new ResourceSet from a struct of the type ResourceSet the function restores common methods after transit eg by json.
func (*ResourceSet) Add ¶
func (r *ResourceSet) Add(add *Resource)
Add adds a resource to the ResourceSet If resource already exists it will be replaced.
func (*ResourceSet) DeleteByUid ¶
func (r *ResourceSet) DeleteByUid(search string)
Function to delete resource by uid.
func (*ResourceSet) FilterByAPIVersionKind ¶
func (r *ResourceSet) FilterByAPIVersionKind(apiVersion string, kind string) *ResourceSet
FilterByAPIVersionKind returns a ResourceSet filtered by apiversion and kind.
func (*ResourceSet) FilterByLabels ¶
func (r *ResourceSet) FilterByLabels(search map[string]string) *ResourceSet
FilterByLabels returns a ResourceSet filtered by label.
func (*ResourceSet) FilterByOwnerReference ¶
func (r *ResourceSet) FilterByOwnerReference(ownerRef rortypes.RorResourceOwnerReference) *ResourceSet
FilterByOwnerReference returns a ResourceSet filtered by ownerreference.
func (*ResourceSet) Get ¶
func (r *ResourceSet) Get() *Resource
Get returns the value of the current resource. can be used without moving the pointer in case the resourceset only contains one resource.
func (*ResourceSet) GetAll ¶
func (r *ResourceSet) GetAll() []*Resource
All returns a slice with all resources
func (*ResourceSet) GetByName ¶
func (r *ResourceSet) GetByName(search string) *Resource
Function to return resource by name.
func (*ResourceSet) GetByUid ¶
func (r *ResourceSet) GetByUid(search string) *Resource
Function to return resource by uid.
func (*ResourceSet) GetQuery ¶ added in v0.2.6
func (rs *ResourceSet) GetQuery() *ResourceQuery
func (*ResourceSet) Len ¶
func (r *ResourceSet) Len() int
Len returns the number of resources in the ResourceSetr
func (*ResourceSet) Next ¶
func (r *ResourceSet) Next() bool
Next moves the cursor along, use Get() to fetch the value eg:
for resourceSet.Next(){ stringhelper.PrettyprintStruct(resourceSet.Get()) }
func (*ResourceSet) SetQuery ¶ added in v0.2.6
func (rs *ResourceSet) SetQuery(query *ResourceQuery)
func (*ResourceSet) ToJson ¶
func (r *ResourceSet) ToJson() ([]byte, error)
type ResourceUpdateResult ¶
type ResourceUpdateResults ¶
type ResourceUpdateResults struct {
Results map[string]ResourceUpdateResult `json:"results,omitempty"`
}
func (*ResourceUpdateResults) GetFailedResources ¶
func (r *ResourceUpdateResults) GetFailedResources() map[string]ResourceUpdateResult
FailedResources is a method to return a list of failed resources.
Directories ¶
Path | Synopsis |
---|---|
The package provides the models and variables needed to generate code and endpoints for the implemented rorresources
|
The package provides the models and variables needed to generate code and endpoints for the implemented rorresources |
package delivers apicontracts for resources
|
package delivers apicontracts for resources |