Documentation ¶
Index ¶
- func FakeIstioAnnotations() map[string]string
- func FakeNamespace(name string) *core_v1.Namespace
- func FakePodList() []core_v1.Pod
- func FakePodListWithoutSidecar() []core_v1.Pod
- type K8SClientFactoryMock
- type K8SClientMock
- func (o *K8SClientMock) CreateIstioObject(api, namespace, resourceType, json string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) DeleteIstioObject(api, namespace, objectType, objectName string) error
- func (o *K8SClientMock) GetAdapter(namespace, adapterType, adapterName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetAdapters(namespace, labelSelector string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetAuthorizationDetails(namespace string) (*kubernetes.RBACDetails, error)
- func (o *K8SClientMock) GetAuthorizationPolicies(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetAuthorizationPolicy(namespace string, policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetClusterRbacConfig(policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetClusterRbacConfigs() ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetCronJobs(namespace string) ([]batch_apps_v1.CronJob, error)
- func (o *K8SClientMock) GetDeployment(namespace string, deploymentName string) (*apps_v1.Deployment, error)
- func (o *K8SClientMock) GetDeploymentConfig(namespace string, deploymentName string) (*osapps_v1.DeploymentConfig, error)
- func (o *K8SClientMock) GetDeploymentConfigs(namespace string) ([]osapps_v1.DeploymentConfig, error)
- func (o *K8SClientMock) GetDeployments(namespace string) ([]apps_v1.Deployment, error)
- func (o *K8SClientMock) GetDeploymentsByLabel(namespace string, labelSelector string) ([]apps_v1.Deployment, error)
- func (o *K8SClientMock) GetDestinationRule(namespace string, destinationrule string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetDestinationRules(namespace string, serviceName string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetEndpoints(namespace string, serviceName string) (*core_v1.Endpoints, error)
- func (o *K8SClientMock) GetGateway(namespace string, gateway string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetGateways(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetIstioDetails(namespace string, serviceName string) (*kubernetes.IstioDetails, error)
- func (o *K8SClientMock) GetIstioRule(namespace string, istiorule string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetIstioRules(namespace string, labelSelector string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetJobs(namespace string) ([]batch_v1.Job, error)
- func (o *K8SClientMock) GetMeshPolicies() ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetMeshPolicy(policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetNamespace(namespace string) (*core_v1.Namespace, error)
- func (o *K8SClientMock) GetNamespaces(labelSelector string) ([]core_v1.Namespace, error)
- func (o *K8SClientMock) GetPod(namespace, name string) (*core_v1.Pod, error)
- func (o *K8SClientMock) GetPodLogs(namespace, name string, opts *core_v1.PodLogOptions) (*kubernetes.PodLogs, error)
- func (o *K8SClientMock) GetPods(namespace, labelSelector string) ([]core_v1.Pod, error)
- func (o *K8SClientMock) GetPolicies(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetPolicy(namespace string, policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetProject(project string) (*osproject_v1.Project, error)
- func (o *K8SClientMock) GetProjects(labelSelector string) ([]osproject_v1.Project, error)
- func (o *K8SClientMock) GetQuotaSpec(namespace string, quotaSpecName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetQuotaSpecBinding(namespace string, quotaSpecBindingName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetQuotaSpecBindings(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetQuotaSpecs(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetRbacConfig(namespace string, policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetRbacConfigs(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, error)
- func (o *K8SClientMock) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error)
- func (o *K8SClientMock) GetRoute(namespace, name string) (*osroutes_v1.Route, error)
- func (o *K8SClientMock) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error)
- func (o *K8SClientMock) GetServerVersion() (*version.Info, error)
- func (o *K8SClientMock) GetService(namespace string, serviceName string) (*core_v1.Service, error)
- func (o *K8SClientMock) GetServiceEntries(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceEntry(namespace string, serviceEntryName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceMeshPolicies(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceMeshPolicy(namespace string, policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceMeshRbacConfig(namespace string, policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceMeshRbacConfigs(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceRole(namespace string, policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceRoleBinding(namespace string, policyName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceRoleBindings(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServiceRoles(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetServices(namespace string, selectorLabels map[string]string) ([]core_v1.Service, error)
- func (o *K8SClientMock) GetSidecar(namespace string, sidecar string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetSidecars(namespace string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetStatefulSet(namespace string, statefulsetName string) (*apps_v1.StatefulSet, error)
- func (o *K8SClientMock) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error)
- func (o *K8SClientMock) GetTemplate(namespace, templateType, templateName string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetTemplates(namespace, labelSelector string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetToken() string
- func (o *K8SClientMock) GetVirtualService(namespace string, virtualservice string) (kubernetes.IstioObject, error)
- func (o *K8SClientMock) GetVirtualServices(namespace string, serviceName string) ([]kubernetes.IstioObject, error)
- func (o *K8SClientMock) IsMaistraApi() bool
- func (o *K8SClientMock) IsOpenShift() bool
- func (o *K8SClientMock) MockEmptyWorkload(namespace interface{}, workload interface{})
- func (o *K8SClientMock) MockEmptyWorkloads(namespace interface{})
- func (o *K8SClientMock) MockService(namespace, name string)
- func (o *K8SClientMock) MockServices(namespace string, names []string)
- func (o *K8SClientMock) UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (kubernetes.IstioObject, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakeIstioAnnotations ¶ added in v0.15.0
func FakeNamespace ¶ added in v0.11.0
func FakePodList ¶ added in v0.11.0
func FakePodListWithoutSidecar ¶ added in v0.15.0
Types ¶
type K8SClientFactoryMock ¶ added in v0.16.0
func NewK8SClientFactoryMock ¶ added in v0.16.0
func NewK8SClientFactoryMock(k8s kubernetes.IstioClientInterface) *K8SClientFactoryMock
Constructor
func (*K8SClientFactoryMock) GetClient ¶ added in v0.17.0
func (o *K8SClientFactoryMock) GetClient(token string) (kubernetes.IstioClientInterface, error)
Business Methods
type K8SClientMock ¶
func NewK8SClientMock ¶ added in v0.8.0
func NewK8SClientMock() *K8SClientMock
func (*K8SClientMock) CreateIstioObject ¶ added in v0.14.0
func (o *K8SClientMock) CreateIstioObject(api, namespace, resourceType, json string) (kubernetes.IstioObject, error)
func (*K8SClientMock) DeleteIstioObject ¶ added in v0.9.1
func (o *K8SClientMock) DeleteIstioObject(api, namespace, objectType, objectName string) error
func (*K8SClientMock) GetAdapter ¶ added in v0.11.0
func (o *K8SClientMock) GetAdapter(namespace, adapterType, adapterName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetAdapters ¶ added in v0.11.0
func (o *K8SClientMock) GetAdapters(namespace, labelSelector string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetAuthorizationDetails ¶ added in v0.17.0
func (o *K8SClientMock) GetAuthorizationDetails(namespace string) (*kubernetes.RBACDetails, error)
func (*K8SClientMock) GetAuthorizationPolicies ¶ added in v1.12.0
func (o *K8SClientMock) GetAuthorizationPolicies(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetAuthorizationPolicy ¶ added in v1.12.0
func (o *K8SClientMock) GetAuthorizationPolicy(namespace string, policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetClusterRbacConfig ¶ added in v0.15.0
func (o *K8SClientMock) GetClusterRbacConfig(policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetClusterRbacConfigs ¶ added in v0.15.0
func (o *K8SClientMock) GetClusterRbacConfigs() ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetCronJobs ¶ added in v0.9.0
func (o *K8SClientMock) GetCronJobs(namespace string) ([]batch_apps_v1.CronJob, error)
func (*K8SClientMock) GetDeployment ¶ added in v0.6.0
func (o *K8SClientMock) GetDeployment(namespace string, deploymentName string) (*apps_v1.Deployment, error)
func (*K8SClientMock) GetDeploymentConfig ¶ added in v0.9.0
func (o *K8SClientMock) GetDeploymentConfig(namespace string, deploymentName string) (*osapps_v1.DeploymentConfig, error)
func (*K8SClientMock) GetDeploymentConfigs ¶ added in v0.9.0
func (o *K8SClientMock) GetDeploymentConfigs(namespace string) ([]osapps_v1.DeploymentConfig, error)
func (*K8SClientMock) GetDeployments ¶ added in v0.6.0
func (o *K8SClientMock) GetDeployments(namespace string) ([]apps_v1.Deployment, error)
func (*K8SClientMock) GetDeploymentsByLabel ¶ added in v0.20.0
func (o *K8SClientMock) GetDeploymentsByLabel(namespace string, labelSelector string) ([]apps_v1.Deployment, error)
It returns an error on any problem.
func (*K8SClientMock) GetDestinationRule ¶
func (o *K8SClientMock) GetDestinationRule(namespace string, destinationrule string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetDestinationRules ¶
func (o *K8SClientMock) GetDestinationRules(namespace string, serviceName string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetEndpoints ¶ added in v0.8.0
func (*K8SClientMock) GetGateway ¶
func (o *K8SClientMock) GetGateway(namespace string, gateway string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetGateways ¶
func (o *K8SClientMock) GetGateways(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetIstioDetails ¶
func (o *K8SClientMock) GetIstioDetails(namespace string, serviceName string) (*kubernetes.IstioDetails, error)
func (*K8SClientMock) GetIstioRule ¶ added in v0.11.0
func (o *K8SClientMock) GetIstioRule(namespace string, istiorule string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetIstioRules ¶
func (o *K8SClientMock) GetIstioRules(namespace string, labelSelector string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetJobs ¶ added in v0.9.0
func (o *K8SClientMock) GetJobs(namespace string) ([]batch_v1.Job, error)
func (*K8SClientMock) GetMeshPolicies ¶ added in v0.15.0
func (o *K8SClientMock) GetMeshPolicies() ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetMeshPolicy ¶ added in v0.15.0
func (o *K8SClientMock) GetMeshPolicy(policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetNamespace ¶ added in v0.9.1
func (o *K8SClientMock) GetNamespace(namespace string) (*core_v1.Namespace, error)
func (*K8SClientMock) GetNamespaces ¶
func (o *K8SClientMock) GetNamespaces(labelSelector string) ([]core_v1.Namespace, error)
func (*K8SClientMock) GetPod ¶ added in v0.18.0
func (o *K8SClientMock) GetPod(namespace, name string) (*core_v1.Pod, error)
func (*K8SClientMock) GetPodLogs ¶ added in v0.18.0
func (o *K8SClientMock) GetPodLogs(namespace, name string, opts *core_v1.PodLogOptions) (*kubernetes.PodLogs, error)
func (*K8SClientMock) GetPods ¶
func (o *K8SClientMock) GetPods(namespace, labelSelector string) ([]core_v1.Pod, error)
func (*K8SClientMock) GetPolicies ¶ added in v0.14.0
func (o *K8SClientMock) GetPolicies(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetPolicy ¶ added in v0.14.0
func (o *K8SClientMock) GetPolicy(namespace string, policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetProject ¶ added in v0.9.1
func (o *K8SClientMock) GetProject(project string) (*osproject_v1.Project, error)
func (*K8SClientMock) GetProjects ¶ added in v0.8.0
func (o *K8SClientMock) GetProjects(labelSelector string) ([]osproject_v1.Project, error)
func (*K8SClientMock) GetQuotaSpec ¶ added in v0.5.0
func (o *K8SClientMock) GetQuotaSpec(namespace string, quotaSpecName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetQuotaSpecBinding ¶ added in v0.5.0
func (o *K8SClientMock) GetQuotaSpecBinding(namespace string, quotaSpecBindingName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetQuotaSpecBindings ¶ added in v0.5.0
func (o *K8SClientMock) GetQuotaSpecBindings(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetQuotaSpecs ¶ added in v0.5.0
func (o *K8SClientMock) GetQuotaSpecs(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetRbacConfig ¶ added in v0.16.0
func (o *K8SClientMock) GetRbacConfig(namespace string, policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetRbacConfigs ¶ added in v0.16.0
func (o *K8SClientMock) GetRbacConfigs(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetReplicaSets ¶ added in v0.9.0
func (o *K8SClientMock) GetReplicaSets(namespace string) ([]apps_v1.ReplicaSet, error)
func (*K8SClientMock) GetReplicationControllers ¶ added in v0.9.0
func (o *K8SClientMock) GetReplicationControllers(namespace string) ([]core_v1.ReplicationController, error)
func (*K8SClientMock) GetRoute ¶ added in v0.20.0
func (o *K8SClientMock) GetRoute(namespace, name string) (*osroutes_v1.Route, error)
func (*K8SClientMock) GetSelfSubjectAccessReview ¶ added in v0.9.1
func (o *K8SClientMock) GetSelfSubjectAccessReview(namespace, api, resourceType string, verbs []string) ([]*auth_v1.SelfSubjectAccessReview, error)
func (*K8SClientMock) GetServerVersion ¶ added in v0.20.0
func (o *K8SClientMock) GetServerVersion() (*version.Info, error)
func (*K8SClientMock) GetService ¶
func (*K8SClientMock) GetServiceEntries ¶ added in v0.5.0
func (o *K8SClientMock) GetServiceEntries(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceEntry ¶ added in v0.5.0
func (o *K8SClientMock) GetServiceEntry(namespace string, serviceEntryName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceMeshPolicies ¶ added in v1.0.4
func (o *K8SClientMock) GetServiceMeshPolicies(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceMeshPolicy ¶ added in v1.0.4
func (o *K8SClientMock) GetServiceMeshPolicy(namespace string, policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceMeshRbacConfig ¶ added in v1.0.4
func (o *K8SClientMock) GetServiceMeshRbacConfig(namespace string, policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceMeshRbacConfigs ¶ added in v1.0.4
func (o *K8SClientMock) GetServiceMeshRbacConfigs(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceRole ¶ added in v0.15.0
func (o *K8SClientMock) GetServiceRole(namespace string, policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceRoleBinding ¶ added in v0.15.0
func (o *K8SClientMock) GetServiceRoleBinding(namespace string, policyName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceRoleBindings ¶ added in v0.15.0
func (o *K8SClientMock) GetServiceRoleBindings(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetServiceRoles ¶ added in v0.15.0
func (o *K8SClientMock) GetServiceRoles(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetServices ¶
func (*K8SClientMock) GetSidecar ¶ added in v0.21.0
func (o *K8SClientMock) GetSidecar(namespace string, sidecar string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetSidecars ¶ added in v0.21.0
func (o *K8SClientMock) GetSidecars(namespace string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetStatefulSet ¶ added in v0.9.0
func (o *K8SClientMock) GetStatefulSet(namespace string, statefulsetName string) (*apps_v1.StatefulSet, error)
func (*K8SClientMock) GetStatefulSets ¶ added in v0.9.0
func (o *K8SClientMock) GetStatefulSets(namespace string) ([]apps_v1.StatefulSet, error)
func (*K8SClientMock) GetTemplate ¶ added in v0.11.0
func (o *K8SClientMock) GetTemplate(namespace, templateType, templateName string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetTemplates ¶ added in v0.11.0
func (o *K8SClientMock) GetTemplates(namespace, labelSelector string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) GetToken ¶ added in v1.8.0
func (o *K8SClientMock) GetToken() string
func (*K8SClientMock) GetVirtualService ¶
func (o *K8SClientMock) GetVirtualService(namespace string, virtualservice string) (kubernetes.IstioObject, error)
func (*K8SClientMock) GetVirtualServices ¶
func (o *K8SClientMock) GetVirtualServices(namespace string, serviceName string) ([]kubernetes.IstioObject, error)
func (*K8SClientMock) IsMaistraApi ¶ added in v1.0.4
func (o *K8SClientMock) IsMaistraApi() bool
func (*K8SClientMock) IsOpenShift ¶ added in v0.8.0
func (o *K8SClientMock) IsOpenShift() bool
func (*K8SClientMock) MockEmptyWorkload ¶ added in v0.15.0
func (o *K8SClientMock) MockEmptyWorkload(namespace interface{}, workload interface{})
MockEmptyWorkload setup the current mock to return an empty workload for every type of workloads (deployment, dc, rs, jobs, etc.)
func (*K8SClientMock) MockEmptyWorkloads ¶ added in v0.15.0
func (o *K8SClientMock) MockEmptyWorkloads(namespace interface{})
MockEmptyWorkloads setup the current mock to return empty workloads for every type of workloads (deployment, dc, rs, jobs, etc.)
func (*K8SClientMock) MockService ¶ added in v0.16.0
func (o *K8SClientMock) MockService(namespace, name string)
func (*K8SClientMock) MockServices ¶ added in v0.16.0
func (o *K8SClientMock) MockServices(namespace string, names []string)
func (*K8SClientMock) UpdateIstioObject ¶ added in v0.12.0
func (o *K8SClientMock) UpdateIstioObject(api, namespace, resourceType, name, jsonPatch string) (kubernetes.IstioObject, error)
Click to show internal directories.
Click to hide internal directories.