exporter

package
v1.0.0-gitspaces-beta Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrJobRunning = errors.New("an export job is already running")
View Source
var (
	// ErrNotFound is returned if no export data was found.
	ErrNotFound = errors.New("export not found")
)

Functions

This section is empty.

Types

type HarnessCodeInfo

type HarnessCodeInfo struct {
	AccountID         string `json:"account_id"`
	ProjectIdentifier string `json:"project_identifier"`
	OrgIdentifier     string `json:"org_identifier"`
	Token             string `json:"token"`
}

type Input

type Input struct {
	Identifier      string          `json:"identifier"`
	ID              int64           `json:"id"`
	Description     string          `json:"description"`
	IsPublic        bool            `json:"is_public"`
	HarnessCodeInfo HarnessCodeInfo `json:"harness_code_info"`
}

type Repository

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

func ProvideSpaceExporter

func ProvideSpaceExporter(
	urlProvider url.Provider,
	git git.Interface,
	repoStore store.RepoStore,
	scheduler *job.Scheduler,
	executor *job.Executor,
	encrypter encrypt.Encrypter,
	sseStreamer sse.Streamer,
) (*Repository, error)

func (*Repository) GetProgressForSpace

func (r *Repository) GetProgressForSpace(ctx context.Context, spaceID int64) ([]job.Progress, error)

func (*Repository) Handle

func (r *Repository) Handle(ctx context.Context, data string, _ job.ProgressReporter) (string, error)

Handle is repository export background job handler.

func (*Repository) Register

func (r *Repository) Register(executor *job.Executor) error

func (*Repository) RunManyForSpace

func (r *Repository) RunManyForSpace(
	ctx context.Context,
	spaceID int64,
	repos []*types.Repository,
	harnessCodeInfo *HarnessCodeInfo,
) error

Jump to

Keyboard shortcuts

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