repoprojects

package
v3.1.12+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package repoprojects contains the common filtering code for the main integration projects (or repos).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilterConfig

type FilterConfig struct {
	OnlyIncludeReadableIDs []string
	ExcludedIDs            []string
	IncludedIDs            []string
	StopAfterN             int
}

type Process

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

func NewProcess

func NewProcess(opts ProcessOpts) *Process

func (*Process) Run

func (s *Process) Run() (allRes []rpcdef.ExportProject, rerr error)

type ProcessOpts

type ProcessOpts struct {
	Logger               hclog.Logger
	ProjectFn            ProjectFn
	ProjectLastProcessFn ProjectLastProcessFn
	Concurrency          int
	Projects             []RepoProject

	IntegrationType inconfig.IntegrationType
	CustomerID      string
	RefType         string

	Sender *objsender.Session
}

type ProjectCtx

type ProjectCtx struct {
	Project RepoProject
	Logger  hclog.Logger
	// contains filtered or unexported fields
}

func (*ProjectCtx) Session

func (s *ProjectCtx) Session(modelName datamodel.ModelNameType) (_ *objsender.Session, rerr error)

type ProjectFn

type ProjectFn func(ctx *ProjectCtx) error

type ProjectLastProcessFn

type ProjectLastProcessFn func(ctx *ProjectCtx) (string, error)

type RepoProject

type RepoProject interface {
	// ID returns an internal database id. Not necessary readable.
	// TODO: rename to RefID
	GetID() string
	// ReadableID returns human readable id or name. In case of repos it would be "org/repo_name" or in case of jira project "EXAM".
	GetReadableID() string
}

func Filter

func Filter(logger hclog.Logger, repos []RepoProject, config FilterConfig) (res []RepoProject)

Jump to

Keyboard shortcuts

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