Documentation ¶
Index ¶
- func CreateTmpDir() (string, error)
- func CreateTmpFile(fileNamePattern, fileContent string) (string, error)
- func CreateTmpShipyardFile(shipyardContent string) (string, error)
- type KeptnAPI
- func (k KeptnAPI) AddServiceResource(projectName string, stageName string, serviceName string, path string, ...) error
- func (k KeptnAPI) CreateJobConfig(projectName string, stageName string, serviceName string, jobConfigYaml []byte) error
- func (k KeptnAPI) CreateProject(projectName string, shipyardYAML []byte) error
- func (k KeptnAPI) CreateService(projectName string, serviceName string) error
- func (k KeptnAPI) DeleteProject(projectName string) error
- func (k KeptnAPI) GetEvents(keptnContext *string) ([]*models.KeptnContextExtendedCE, error)
- func (k KeptnAPI) SendEvent(keptnEvent *models.KeptnContextExtendedCE) (*models.EventContext, error)
- type KeptnConnectionDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTmpDir ¶
CreateTmpDir creates a temporary directory on the file system
func CreateTmpFile ¶
CreateTmpFile creates a temporary file using the provided file content
func CreateTmpShipyardFile ¶
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 ¶
CreateProject creates a keptn project from the contents of a shipyard yaml file
func (KeptnAPI) CreateService ¶
CreateService creates a service in a given project
func (KeptnAPI) DeleteProject ¶
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 ¶
KeptnConnectionDetails contains the endpoint and the API token for Keptn