jx-api

module
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0

README

jx-api

Provides an API for JX, can be used with Jenkins X Kube Client to create a programatic interface

Here's an example which also uses Jenkins X logging

import (
    "github.com/jenkins-x/jx-kube-client/pkg/kubeclient"
    "github.com/jenkins-x/jx-logging/pkg/log"
    "github.com/jenkins-x/jx-api/pkg/client/clientset/versioned"
)

func main() {
    f := kubeclient.NewFactory()
    cfg, err := f.CreateKubeConfig()
    if err != nil {
        log.Logger().Fatalf("failed to get kubernetes config: %v", err)
    }


    jxClient, err := versioned.NewForConfig(cfg)
    if err != nil {
        log.Logger().Fatalf("error building jx client: %v", err)
    }
}

Part of Jenkins X shared libraries.

Directories

Path Synopsis
cmd
pkg
apis/jenkins.io/v1
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v1 is the v1 version of the API.
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v1 is the v1 version of the API.
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/jenkins.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/jenkins.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
client/openapi/all
Code generated by jx create client.
Code generated by jx create client.
config
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v1 is the v1 version of the API.
+k8s:deepcopy-gen=package +k8s:openapi-gen=true Package v1 is the v1 version of the API.

Jump to

Keyboard shortcuts

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