Documentation ¶
Overview ¶
Code generated by mockery v1.0.0
Index ¶
- Variables
- type APIEndpoint
- func (api *APIEndpoint) GetPipeline(ctx context.Context, account, pipelineUID string) (*Pipeline, error)
- func (api *APIEndpoint) Ping() error
- func (api *APIEndpoint) PublishEvent(ctx context.Context, account string, eventURI string, ...) error
- func (api *APIEndpoint) RunPipeline(accountID string, pipelineUID string, vars map[string]string, ...) (string, error)
- type MockPipelineService
- func (_m *MockPipelineService) GetPipeline(ctx context.Context, account string, id string) (*Pipeline, error)
- func (_m *MockPipelineService) Ping() error
- func (_m *MockPipelineService) PublishEvent(ctx context.Context, account string, eventURI string, ...) error
- func (_m *MockPipelineService) RunPipeline(accountID string, id string, vars map[string]string, ...) (string, error)
- type Pipeline
- type PipelineService
Constants ¶
This section is empty.
Variables ¶
var ( // RequestID request ID for logging RequestID = "X-Request-Id" // AuthEntity Codefresh authenticated entity JSON AuthEntity = "X-Authenticated-Entity-Json" )
var ErrPipelineNoMatch = errors.New("codefresh: pipeline account does not match")
ErrPipelineNoMatch error when pipeline not found
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) 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 ¶
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 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