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.