api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCodeNoSuchEntityException = "NoSuchEntityException"
)

Variables

This section is empty.

Functions

func CreateApplication

func CreateApplication(client *gate.GatewayClient, applicationData *schema.ResourceData) error

func CreatePipeline

func CreatePipeline(client *gate.GatewayClient, pipeline interface{}) error

func CreatePipelineTemplate

func CreatePipelineTemplate(client *gate.GatewayClient, template interface{}) error

func CreatePipelineTemplateV2

func CreatePipelineTemplateV2(client *gate.GatewayClient, template *PipelineTemplateV2) error

CreatePipelineTemplateV2 creates a pipeline template.

func DeleteAppliation

func DeleteAppliation(client *gate.GatewayClient, applicationName string) error

func DeletePipeline

func DeletePipeline(client *gate.GatewayClient, applicationName, pipelineName string) error

func DeletePipelineTemplate

func DeletePipelineTemplate(client *gate.GatewayClient, templateID string) error

func DeletePipelineTemplateV2

func DeletePipelineTemplateV2(client *gate.GatewayClient, templateID, tag, digest string) error

DeletePipelineTemplateV2 deletes the pipeline template with templateID. Either digest or tag can be set on a delete request, but not both.

func GetApplication

func GetApplication(client *gate.GatewayClient, applicationName string, dest interface{}) error

func GetPipeline

func GetPipeline(client *gate.GatewayClient, applicationName, pipelineName string, dest interface{}) (map[string]interface{}, error)

func GetPipelineTemplate

func GetPipelineTemplate(client *gate.GatewayClient, templateID string, dest interface{}) error

func ListPipelineTemplateV2Versions

func ListPipelineTemplateV2Versions(client *gate.GatewayClient) (map[string][]*PipelineTemplateV2Version, error)

ListPipelineTemplateV2Versions lists versions of all available pipeline templates. The resulting map is keyed by template ID.

func RecreatePipeline

func RecreatePipeline(client *gate.GatewayClient, applicationName, pipelineName string, pipeline interface{}) error

RecreatePipeline is a convenience function for deleting and subsequently recreating a pipeline. It will return an error if either of the delete and create operations fails.

func UpdatePipeline

func UpdatePipeline(client *gate.GatewayClient, pipelineID string, pipeline interface{}) error

func UpdatePipelineTemplate

func UpdatePipelineTemplate(client *gate.GatewayClient, templateID string, template interface{}) error

func UpdatePipelineTemplateV2

func UpdatePipelineTemplateV2(client *gate.GatewayClient, template *PipelineTemplateV2) error

UpdatePipelineTemplateV2 updates the pipeline template with templateID with the data in template.

Types

type PipelineTemplateV2

type PipelineTemplateV2 struct {
	ID        string                       `json:"id,omitempty"`
	Metadata  PipelineTemplateV2Metadata   `json:"metadata"`
	Pipeline  interface{}                  `json:"pipeline"`
	Protect   *bool                        `json:"protect,omitempty"`
	Schema    string                       `json:"schema"`
	Variables []PipelineTemplateV2Variable `json:"variables,omitempty"`
}

PipelineTemplateV2 defines the schema of the pipeline template JSON.

func GetPipelineTemplateV2

func GetPipelineTemplateV2(client *gate.GatewayClient, templateID string) (*PipelineTemplateV2, error)

GetPipelineTemplateV2 fetches the pipeline template with templateID.

type PipelineTemplateV2Metadata

type PipelineTemplateV2Metadata struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Owner       *string  `json:"owner,omitempty"`
	Scopes      []string `json:"scopes,omitempty"`
}

type PipelineTemplateV2Variable

type PipelineTemplateV2Variable struct {
	Name         string      `json:"name"`
	Description  *string     `json:"description,omitempty"`
	DefaultValue interface{} `json:"defaultValue,omitempty"`
	Type         string      `json:"type"`
}

type PipelineTemplateV2Version

type PipelineTemplateV2Version struct {
	ID     string `json:"id"`
	Digest string `json:"digest"`
	Tag    string `json:"tag"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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