endpoints

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const CRDNameLengthLimit = 53
View Source
const ContainerPrefix = "build-step-"

Unexported field within tekton "github.com/tektoncd/pipeline/pkg/reconciler/v1alpha1/taskrun/resources"

View Source
const GitOrgLabel = "gitOrg"
View Source
const GitRepoLabel = "gitRepo"
View Source
const GitServerLabel = "gitServer"

Variables

View Source
var LogChannel = make(chan broadcaster.SocketData)

Define all broadcasters/channels Keep broadcaster channels open indefinitely

View Source
var ResourcesChannel = make(chan broadcaster.SocketData)

Functions

func CredentialToSecret

func CredentialToSecret(cred Credential, namespace string, response *restful.Response) *corev1.Secret

Convert Credential struct into K8s secret struct

Types

type AppResponse

type AppResponse struct {
	ERROR   error
	MESSAGE string
	CODE    int
}

AppResponse represents an error with a code, message, and the error itself

type BuildInformation

type BuildInformation struct {
	REPOURL   string
	SHORTID   string
	COMMITID  string
	REPONAME  string
	TIMESTAMP string
}

BuildInformation - information required to build a particular commit from a Git repository.

type BuildRequest

type BuildRequest struct {
	/* Example payload
	{
		"repourl": "https://github.ibm.com/your-org/test-project",
		"commitid": "7d84981c66718ee2dda1af280f915cc2feb6ffow",
		"reponame": "test-project"
	}
	*/
	REPOURL  string `json:"repourl"`
	COMMITID string `json:"commitid"`
	REPONAME string `json:"reponame"`
	BRANCH   string `json:"branch"`
}

BuildRequest - a manual submission data struct

type Credential

type Credential struct {
	Name            string            `json:"name,omitempty"`
	Username        string            `json:"username,omitempty"`
	Password        string            `json:"password,omitempty"`
	Description     string            `json:"description,omitempty"`
	ResourceVersion string            `json:"resourceVersion,omitempty"`
	URL             map[string]string `json:"url,omitempty"`
	ServiceAccount  string            `json:"serviceAccount,omitempty"`
	Namespace       string            `json:"namespace,omitempty"`
}

Dashboard internal representation of secret

func SecretToCredential

func SecretToCredential(secret *corev1.Secret, mask bool) Credential

Convert K8s secret struct into Credential struct

type LogContainer

type LogContainer struct {
	Name string
	Logs []string
}

LogContainer - represents the logs for a given container

type ManualPipelineRun

type ManualPipelineRun struct {
	PIPELINENAME      string `json:"pipelinename"`
	REGISTRYLOCATION  string `json:"registrylocation,omitempty"`
	SERVICEACCOUNT    string `json:"serviceaccount,omitempty"`
	PIPELINERUNTYPE   string `json:"pipelineruntype,omitempty"`
	GITRESOURCENAME   string `json:"gitresourcename,omitempty"`
	IMAGERESOURCENAME string `json:"imageresourcename,omitempty"`
	GITCOMMIT         string `json:"gitcommit,omitempty"`
	REPONAME          string `json:"reponame,omitempty"`
	REPOURL           string `json:"repourl,omitempty"`
	HELMSECRET        string `json:"helmsecret,omitempty"`
	APPLYDIRECTORY    string `json:"applydirectory,omitempty"`
}

ManualPipelineRun - represents the data required to create a new PipelineRun

type Patch

type Patch struct {
	Operation string `json:"op"`
	Path      string `json:"path"`
}

path - struct for patch operation

type PipelineRunLog

type PipelineRunLog []TaskRunLog

type PipelineRunUpdateBody

type PipelineRunUpdateBody struct {
	STATUS string `json:"status"`
}

PipelineRunUpdateBody - represents a request that a user may provide for updating a PipelineRun Currently only modifying the status is supported but this gives us scope for adding additional fields

type Properties

type Properties struct {
	InstallNamespace string
}

Properties : properties we want to be able to retrieve via REST

type RebuildRequest

type RebuildRequest struct {
	PIPELINERUNNAME string `json:"pipelinerunname"`
}

PipelineRunRebuild - a name only for now

type Resource

type Resource struct {
	PipelineClient versioned.Interface
	K8sClient      k8sclientset.Interface
	RouteClient    routeclient.Interface
}

Store all types here that are reused throughout files Wrapper around all necessary clients used for endpoints

func (Resource) CheckHealth

func (r Resource) CheckHealth(request *restful.Request, response *restful.Response)

func (Resource) CreateCredential

func (r Resource) CreateCredential(request *restful.Request, response *restful.Response)

API route for creating a given credential * Required path parameters: * - namespace * Required query parameters: * - Name * - Username * - Password * - Type (must have the value 'accesstoken' or 'userpass')

func (Resource) CreatePipelineRun

func (r Resource) CreatePipelineRun(request *restful.Request, response *restful.Response)

func (Resource) DeleteCredential

func (r Resource) DeleteCredential(request *restful.Request, response *restful.Response)

API route for creating a given credential * Required path parameters: * - Namespace * - Name

func (Resource) EstablishResourcesWebsocket

func (r Resource) EstablishResourcesWebsocket(request *restful.Request, response *restful.Response)

Establish websocket and subscribe to pipelinerun events

func (Resource) GetAllCredentials

func (r Resource) GetAllCredentials(request *restful.Request, response *restful.Response)

API route for getting all credentials in a given namespace * Required path parameters: * - namespace

func (Resource) GetCredential

func (r Resource) GetCredential(request *restful.Request, response *restful.Response)

API route for getting a given credential by name in a given namespace * Required path parameters: * - Namespace * - Name

func (Resource) GetEndpoints added in v0.1.1

func (r Resource) GetEndpoints(request *restful.Request, response *restful.Response)

GetIngress returns the Ingress endpoint called "tektonDashboardIngressName" in the requested namespace

func (Resource) GetIngress

func (r Resource) GetIngress(request *restful.Request, response *restful.Response)

GetIngress returns the Ingress endpoint called "tektonDashboardIngressName" in the requested namespace

func (Resource) GetPipelineRun

func (r Resource) GetPipelineRun(request *restful.Request, response *restful.Response)

Get a given pipeline run by name in a given namespace

func (Resource) GetPipelineRunLog

func (r Resource) GetPipelineRunLog(request *restful.Request, response *restful.Response)

Get the logs for a given pipelinerun by name in a given namespace

func (Resource) GetProperties

func (r Resource) GetProperties(request *restful.Request, response *restful.Response)

GetProperties is used to get the installed namespace only so far

func (Resource) GetTaskRunLog

func (r Resource) GetTaskRunLog(request *restful.Request, response *restful.Response)

Get the logs for a given task run by name in a given namespace

func (Resource) ProxyRequest

func (r Resource) ProxyRequest(request *restful.Request, response *restful.Response)

ProxyRequest does as the name suggests: proxies requests and logs what's going on

func (Resource) RebuildPipelineRun

func (r Resource) RebuildPipelineRun(request *restful.Request, response *restful.Response)

RebuildPipelineRun rebuilds a given PipelineRun by name in a given namespace

func (Resource) UpdateCredential

func (r Resource) UpdateCredential(request *restful.Request, response *restful.Response)

API route for updating a given credential * Cannot update the Name field * Required path parameters: * - Namespace * - Name * Required query parameters: * - Username * - Password * - Type (must have the value 'accesstoken' or 'userpass')

func (Resource) UpdatePipelineRun

func (r Resource) UpdatePipelineRun(request *restful.Request, response *restful.Response)

Update a given PipelineRun by name in a given namespace

type ResourceBinding

type ResourceBinding struct {
	BINDINGNAME     string `json:"bindingname"`
	RESOURCEREFNAME string `json:"resourcerefname"`
}

ResourceBinding - a name and a reference to a resource

type TaskRunLog

type TaskRunLog struct {
	PodName string
	// Containers correlating to Task step definitions
	StepContainers []LogContainer
	// Additional Containers correlating to Task e.g. PipelineResources
	PodContainers  []LogContainer
	InitContainers []LogContainer
}

Jump to

Keyboard shortcuts

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