e2e

package
v0.0.0-...-7a5e26d Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildK8sConfig

func BuildK8sConfig() (*rest.Config, error)

BuildK8sConfig builds the kubernetes configuration from default or the configuration file that is specified in the KUBECONFIG environment variable.

func NewK8sClient

func NewK8sClient() (*kubernetes.Clientset, error)

NewK8sClient creates a K8s client from the KUBECONFIG environment variable

Types

type KeptnAPI

type KeptnAPI struct {
	APISet          *api.APISet
	APIHandler      api.APIV1Interface
	ProjectHandler  api.ProjectsV1Interface
	ResourceHandler api.ResourcesV1Interface
	EventHandler    api.EventsV1Interface
}

KeptnAPI structure holds different api handlers for the keptn api such that they can be used more easily

func NewKeptnAPI

func NewKeptnAPI(details KeptnConnectionDetails) (*KeptnAPI, error)

NewKeptnAPI creates a KeptnAPI structure from KeptnConnectionDetails

func (KeptnAPI) AddServiceResource

func (k KeptnAPI) AddServiceResource(projectName string, stageName string, serviceName string, path string, data string) error

AddServiceResource uploads a resource to a specific service and stage

func (KeptnAPI) CreateJobConfig

func (k KeptnAPI) CreateJobConfig(projectName string, stageName string, serviceName string, jobConfigYaml []byte) error

CreateJobConfig uploads the job configuration for the job-executor-service to a specific service and stage

func (KeptnAPI) CreateProject

func (k KeptnAPI) CreateProject(projectName string, shipyardYAML []byte) error

CreateProject creates a keptn project from the contents of a shipyard yaml file

func (KeptnAPI) CreateService

func (k KeptnAPI) CreateService(projectName string, serviceName string) error

CreateService creates a service in a given project

func (KeptnAPI) DeleteProject

func (k KeptnAPI) DeleteProject(projectName string) error

DeleteProject deletes a project by a given name

func (KeptnAPI) GetEvents

func (k KeptnAPI) GetEvents(keptnContext *string) ([]*models.KeptnContextExtendedCE, error)

GetEvents returns a list of events for the given context from keptn

func (KeptnAPI) SendEvent

func (k KeptnAPI) SendEvent(keptnEvent *models.KeptnContextExtendedCE) (*models.EventContext, error)

SendEvent sends an event to Keptn

type KeptnConnectionDetails

type KeptnConnectionDetails struct {
	Endpoint string
	APIToken string
}

KeptnConnectionDetails contains the endpoint and the API token for Keptn

Jump to

Keyboard shortcuts

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