repoimport

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package repoimport is a generated GoMock package.

Package repoimport is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	// Index schedules import of repo and returns immediately (non blocking
	// operation). There are no guarantees if the import will be successful
	// and when will be done.
	Index(repo common.GitRepository)
	// Start continuously processes imports scheduled by Index function.
	// This function exits on context cancellation.
	Start(ctx context.Context)
}

Controller is the main interface for importing entire Git repositories.

func NewController

func NewController(f ImporterFactory) Controller

NewController creates import controller that can import desired repositories one at the time.

type Importer

type Importer interface {
	// Run starts importing desired repository.
	Run(context.Context) error
}

Importer defines interface for importing a repository.

func NewGitilesImporter

func NewGitilesImporter(ctx context.Context, repo common.GitRepository) Importer

NewGitilesImporter initializes gitilesImporter struct and returns its pointer.

type ImporterFactory

type ImporterFactory func(context.Context, common.GitRepository) Importer

ImporterFactory returns Importer for given repository.

type MockController

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

MockController is a mock of Controller interface.

func NewMockController

func NewMockController(ctrl *gomock.Controller) *MockController

NewMockController creates a new mock instance.

func (*MockController) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockController) Index

func (m *MockController) Index(repo common.GitRepository)

Index mocks base method.

func (*MockController) Start

func (m *MockController) Start(ctx context.Context)

Start mocks base method.

type MockControllerMockRecorder

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

MockControllerMockRecorder is the mock recorder for MockController.

func (*MockControllerMockRecorder) Index

func (mr *MockControllerMockRecorder) Index(repo interface{}) *gomock.Call

Index indicates an expected call of Index.

func (*MockControllerMockRecorder) Start

func (mr *MockControllerMockRecorder) Start(ctx interface{}) *gomock.Call

Start indicates an expected call of Start.

type MockImporter

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

MockImporter is a mock of Importer interface.

func NewMockImporter

func NewMockImporter(ctrl *gomock.Controller) *MockImporter

NewMockImporter creates a new mock instance.

func (*MockImporter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockImporter) Run

func (m *MockImporter) Run(arg0 context.Context) error

Run mocks base method.

type MockImporterMockRecorder

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

MockImporterMockRecorder is the mock recorder for MockImporter.

func (*MockImporterMockRecorder) Run

func (mr *MockImporterMockRecorder) Run(arg0 interface{}) *gomock.Call

Run indicates an expected call of Run.

Jump to

Keyboard shortcuts

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