istio: istio.io/istio/galley/pkg/testing/mock Index | Files

package mock

import "istio.io/istio/galley/pkg/testing/mock"

Copyright Istio Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Package Files

appsv1.go authorizationv1.go configmaps.go corev1.go deployments.go endpoints.go extensionsv1.go ingresses.go kube.go kube_interface.go namespaces.go nodes.go pods.go selfsubjectaccessreviews.go services.go watch.go

type Kube Uses

type Kube struct {
    APIExtClientSet *fake.Clientset
    // contains filtered or unexported fields
}

Kube is a mock implementation of galley/pkg/common/Kube

func NewKube Uses

func NewKube() *Kube

NewKube returns a new instance of mock Kube.

func (*Kube) APIExtensionsClientset Uses

func (k *Kube) APIExtensionsClientset() (clientset.Interface, error)

APIExtensionsClientset implements client.Interfaces

func (*Kube) AddResponse Uses

func (k *Kube) AddResponse(r1 interface{}, r2 error)

AddResponse adds a new response to this mock.

func (*Kube) DynamicInterface Uses

func (k *Kube) DynamicInterface() (dynamic.Interface, error)

DynamicInterface implementation.

func (*Kube) KubeClient Uses

func (k *Kube) KubeClient() (kubernetes.Interface, error)

KubeClient implements client.Interfaces

type SelfSubjectAccessReviewImpl Uses

type SelfSubjectAccessReviewImpl struct {
    // contains filtered or unexported fields
}

SelfSubjectAccessReviewImpl is a mock implementation of SelfSubjectAccessReviewInterface Exported so that helpers can be used to set expected mock behavior

func (*SelfSubjectAccessReviewImpl) Create Uses

func (i *SelfSubjectAccessReviewImpl) Create(ctx context.Context, sar *authorizationapi.SelfSubjectAccessReview,
    opts metav1.CreateOptions) (result *authorizationapi.SelfSubjectAccessReview, err error)

Create implements authorizationv1.SelfSubjectAccessReviewInterface

func (*SelfSubjectAccessReviewImpl) CreateContext Uses

func (i *SelfSubjectAccessReviewImpl) CreateContext(ctx context.Context,
    sar *authorizationapi.SelfSubjectAccessReview) (result *authorizationapi.SelfSubjectAccessReview, err error)

CreateContext implements authorizationv1.SelfSubjectAccessReviewInterface

func (*SelfSubjectAccessReviewImpl) DisallowResourceAttributes Uses

func (i *SelfSubjectAccessReviewImpl) DisallowResourceAttributes(r *authorizationapi.ResourceAttributes)

DisallowResourceAttributes is a helper for testing that marks particular resource attributes as not allowed in the mock.

type Watch Uses

type Watch struct {
    // contains filtered or unexported fields
}

Watch is a mock implementation of watch.Interface.

func NewWatch Uses

func NewWatch() *Watch

NewWatch returns a new Watch instance.

func (*Watch) ResultChan Uses

func (w *Watch) ResultChan() <-chan watch.Event

ResultChan is an implementation of watch.Interface.ResultChan.

func (*Watch) Send Uses

func (w *Watch) Send(event watch.Event)

Send a watch event through the result channel.

func (*Watch) Stop Uses

func (w *Watch) Stop()

Stop is an implementation of watch.Interface.Watch.

type Watches Uses

type Watches []*Watch

func (Watches) Send Uses

func (arr Watches) Send(event watch.Event)

Package mock imports 61 packages (graph). Updated 2020-06-02. Refresh now. Tools for package owners.