fakejxfactory

package
v0.0.90 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFakeFactory

func NewFakeFactory() jxfactory.Factory

NewFakeFactory returns a fake factory for testing

func NewFakeFactoryWithObjects

func NewFakeFactoryWithObjects(kubeObjects []runtime.Object, jxObjects []runtime.Object, namespace string) jxfactory.Factory

NewFakeFactory returns a fake factory for testing with the given initial objects

Types

type FakeFactory

type FakeFactory struct {
	KubeClient   kubernetes.Interface
	JXClient     versioned.Interface
	TektonClient tektonclient.Interface
	Namespace    string
}

FakeFactory represents a fake factory

func (*FakeFactory) CreateJXClient

func (f *FakeFactory) CreateJXClient() (versioned.Interface, string, error)

func (*FakeFactory) CreateKubeClient

func (f *FakeFactory) CreateKubeClient() (kubernetes.Interface, string, error)

func (*FakeFactory) CreateKubeConfig

func (f *FakeFactory) CreateKubeConfig() (*rest.Config, error)

func (*FakeFactory) CreateTektonClient

func (f *FakeFactory) CreateTektonClient() (tektonclient.Interface, string, error)

func (*FakeFactory) ImpersonateUser

func (f *FakeFactory) ImpersonateUser(user string) jxfactory.Factory

func (*FakeFactory) KubeConfig

func (f *FakeFactory) KubeConfig() kube.Kuber

func (*FakeFactory) LoadConfig

func (f *FakeFactory) LoadConfig() (*api.Config, *clientcmd.PathOptions, error)

func (*FakeFactory) UpdateConfig

func (f *FakeFactory) UpdateConfig(namespace string, server string, caData string, user string, token string) error

func (*FakeFactory) WithBearerToken

func (f *FakeFactory) WithBearerToken(token string) jxfactory.Factory

Jump to

Keyboard shortcuts

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