jx: github.com/jenkins-x/jx/pkg/jxfactory Index | Files | Directories

package jxfactory

import "github.com/jenkins-x/jx/pkg/jxfactory"


Package Files

factory.go interface.go

type Factory Uses

type Factory interface {
    // WithBearerToken creates a factory from a k8s bearer token
    WithBearerToken(token string) Factory

    // ImpersonateUser creates a factory with an impersonated users
    ImpersonateUser(user string) Factory

    // CreateKubeClient creates a new Kubernetes client
    CreateKubeClient() (kubernetes.Interface, string, error)

    // CreateKubeConfig creates the kubernetes configuration
    CreateKubeConfig() (*rest.Config, error)

    // CreateJXClient creates a new Kubernetes client for Jenkins X CRDs
    CreateJXClient() (versioned.Interface, string, error)

    // CreateTektonClient create a new Kubernetes client for Tekton resources
    CreateTektonClient() (tektonclient.Interface, string, error)

    // CreateTektonPipelineResourceClient creates a new Kubernetes client for Tekton PipelineResources
    CreateTektonPipelineResourceClient() (resourceclient.Interface, string, error)

    // KubeConfig returns a Kuber instance to interact with the kube configuration.
    KubeConfig() kube.Kuber

Factory is the interface defined for Kubernetes, Jenkins X, and Tekton REST APIs go:generate pegomock generate github.com/jenkins-x/jx/v2/pkg/jxfactory Factory -o mocks/factory.go

func NewFactory Uses

func NewFactory() Factory

NewFactory creates a factory with the default Kubernetes resources defined if optionalClientConfig is nil, then flags will be bound to a new clientcmd.ClientConfig. if optionalClientConfig is not nil, then this factory will make use of it.



Package jxfactory imports 15 packages (graph) and is imported by 2 packages. Updated 2020-08-20. Refresh now. Tools for package owners.