e2e

package
v0.0.0-...-8c3a307 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTmpDir

func CreateTmpDir() (string, error)

CreateTmpDir creates a temporary directory on the file system

func CreateTmpFile

func CreateTmpFile(fileNamePattern, fileContent string) (string, error)

CreateTmpFile creates a temporary file using the provided file content

func CreateTmpShipyardFile

func CreateTmpShipyardFile(shipyardContent string) (string, error)

CreateTmpShipyardFile creates a temporary shipyard file from the provided YAML content and returns the name of the file

Types

type KeptnAPI

type KeptnAPI struct {
	APIHandler      *api.APIHandler
	ProjectHandler  *api.ProjectHandler
	ResourceHandler *api.ResourceHandler
	EventHandler    *api.EventHandler
	// contains filtered or unexported fields
}

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

func NewKeptAPI

func NewKeptAPI(details KeptnConnectionDetails) KeptnAPI

NewKeptAPI 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