codefresh

package
v0.0.0-...-6d75b34 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Code generated by mockery v1.0.0

Index

Constants

This section is empty.

Variables

View Source
var (
	// RequestID request ID for logging
	RequestID = "X-Request-Id"
	// AuthEntity Codefresh authenticated entity JSON
	AuthEntity = "X-Authenticated-Entity-Json"
)
View Source
var ErrPipelineNoMatch = errors.New("codefresh: pipeline account does not match")

ErrPipelineNoMatch error when pipeline not found

View Source
var ErrPipelineNotFound = errors.New("codefresh: pipeline not found")

ErrPipelineNotFound error when pipeline not found

Functions

This section is empty.

Types

type APIEndpoint

type APIEndpoint struct {
	// contains filtered or unexported fields
}

APIEndpoint Codefresh API endpoint

func (*APIEndpoint) GetPipeline

func (api *APIEndpoint) GetPipeline(ctx context.Context, account, pipelineUID string) (*Pipeline, error)

GetPipeline get existing pipeline

func (*APIEndpoint) Ping

func (api *APIEndpoint) Ping() error

Ping Codefresh API

func (*APIEndpoint) PublishEvent

func (api *APIEndpoint) PublishEvent(ctx context.Context, account string, eventURI string, event model.NormalizedEvent) error

PublishEvent publish trigger-event normalized event to eventbus

func (*APIEndpoint) RunPipeline

func (api *APIEndpoint) RunPipeline(accountID string, pipelineUID string, vars map[string]string, event model.NormalizedEvent) (string, error)

RunPipeline run Codefresh pipeline

type MockPipelineService

type MockPipelineService struct {
	mock.Mock
}

MockPipelineService is an autogenerated mock type for the PipelineService type

func (*MockPipelineService) GetPipeline

func (_m *MockPipelineService) GetPipeline(ctx context.Context, account string, id string) (*Pipeline, error)

GetPipeline provides a mock function with given fields: ctx, account, id

func (*MockPipelineService) Ping

func (_m *MockPipelineService) Ping() error

Ping provides a mock function with given fields:

func (*MockPipelineService) PublishEvent

func (_m *MockPipelineService) PublishEvent(ctx context.Context, account string, eventURI string, event model.NormalizedEvent) error

PublishEvent provides a mock function with given fields: ctx, account, eventURI, event

func (*MockPipelineService) RunPipeline

func (_m *MockPipelineService) RunPipeline(accountID string, id string, vars map[string]string, event model.NormalizedEvent) (string, error)

RunPipeline provides a mock function with given fields: accountID, id, vars, event

type Pipeline

type Pipeline struct {
	ID      string
	Account string
}

Pipeline codefresh pipeline identifier

type PipelineService

type PipelineService interface {
	GetPipeline(ctx context.Context, account, id string) (*Pipeline, error)
	RunPipeline(accountID string, id string, vars map[string]string, event model.NormalizedEvent) (string, error)
	PublishEvent(ctx context.Context, account string, eventURI string, event model.NormalizedEvent) error
	Ping() error
}

PipelineService Codefresh Service

func NewCodefreshEndpoint

func NewCodefreshEndpoint(url, token string) PipelineService

NewCodefreshEndpoint create new Codefresh API endpoint from url and API token

Jump to

Keyboard shortcuts

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