Back to godoc.org

Package mock

v0.0.0 (97f8edc)
Latest Go to latest
Published: 0 hours ago | License: Apache-2.0 | Module: istio.io/istio

Overview

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

type Kube

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

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

func NewKube

func NewKube() *Kube

NewKube returns a new instance of mock Kube.

func (*Kube) APIExtensionsClientset

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

APIExtensionsClientset implements client.Interfaces

func (*Kube) AddResponse

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

AddResponse adds a new response to this mock.

func (*Kube) DynamicInterface

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

DynamicInterface implementation.

func (*Kube) KubeClient

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

KubeClient implements client.Interfaces

type SelfSubjectAccessReviewImpl

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

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

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

CreateContext implements authorizationv1.SelfSubjectAccessReviewInterface

func (*SelfSubjectAccessReviewImpl) DisallowResourceAttributes

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

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

Watch is a mock implementation of watch.Interface.

func NewWatch

func NewWatch() *Watch

NewWatch returns a new Watch instance.

func (*Watch) ResultChan

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

ResultChan is an implementation of watch.Interface.ResultChan.

func (*Watch) Send

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

Send a watch event through the result channel.

func (*Watch) Stop

func (w *Watch) Stop()

Stop is an implementation of watch.Interface.Watch.

type Watches

type Watches []*Watch

func (Watches) Send

func (arr Watches) Send(event watch.Event)
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier