service

package
v1.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Module

func Module(c *di.Container)

Types

type Configuration

type Configuration struct {
	PublicAPIHostname string `long:"public-api-hostname" description:"Public API hostname. Used to fetch codebases from CI"`
}

type Service

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

func New

func New(
	logger *zap.Logger,
	executorProvider executor.Provider,

	configRepo db_integrations.IntegrationsRepository,
	ciCommitRepo db_ci.CommitRepository,
	changeRepo db_change.Repository,
	changeCommitRepo db_change.CommitRepository,

	cfg *Configuration,
	statusService *svc_statuses.Service,
	jwtService *service_jwt.Service,
) *Service

func (*Service) CreateIntegration

func (svc *Service) CreateIntegration(ctx context.Context, integration *integrations.Integration) error

func (*Service) Delete

func (svc *Service) Delete(ctx context.Context, integrationID string) error

func (*Service) GetByID

func (svc *Service) GetByID(ctx context.Context, integrationID string) (*integrations.Integration, error)

func (*Service) GetTrunkCommitID

func (svc *Service) GetTrunkCommitID(ctx context.Context, codebaseID, ciRepoCommitID string) (string, error)

func (*Service) ListByCodebaseID

func (svc *Service) ListByCodebaseID(ctx context.Context, codebaseID string) ([]*integrations.Integration, error)

func (*Service) Trigger

func (svc *Service) Trigger(ctx context.Context, ch *change.Change, opts ...TriggerOption) ([]*statuses.Status, error)

Trigger starts a contihuous integration build for the given change.

func (*Service) UpdateIntegration

func (svc *Service) UpdateIntegration(ctx context.Context, integration *integrations.Integration) error

type TriggerOption

type TriggerOption func(*TriggerOptions)

func WithProvider

func WithProvider(providerType integrations.ProviderType) TriggerOption

type TriggerOptions

type TriggerOptions struct {
	// Which integrations to trigger. If empty, all integrations will be triggered.
	Providers *map[integrations.ProviderType]bool
}

Jump to

Keyboard shortcuts

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