processors

package
v0.0.0-...-081ecb4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: AGPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusSentToQueue = "sent_to_queue"
	StatusProcessing  = "processing"
	StatusProcessed   = "processed"
	StatusNotFound    = "not_found"
	StatusError       = "error"
)

Variables

View Source
var (
	ErrNothingToAnalyze = errors.New("nothing to analyze")

	ErrUnrecoverable = errors.New("unrecoverable error")
)

Functions

This section is empty.

Types

type BasicPull

type BasicPull struct {
	BasicPullConfig
}

func NewBasicPull

func NewBasicPull(cfg *BasicPullConfig) *BasicPull

func (BasicPull) Process

func (p BasicPull) Process(ctx *PullContext) error

type BasicPullProcessorFactory

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

func NewBasicPullProcessorFactory

func NewBasicPullProcessorFactory(cfg *BasicPullConfig) *BasicPullProcessorFactory

func (BasicPullProcessorFactory) BuildProcessor

func (pf BasicPullProcessorFactory) BuildProcessor(ctx *PullContext) (PullProcessor, func(), error)

type IgnoredError

type IgnoredError struct {
	Status     github.Status
	StatusDesc string
}

func (IgnoredError) Error

func (e IgnoredError) Error() string

type JSONDuration

type JSONDuration time.Duration

func (JSONDuration) MarshalJSON

func (d JSONDuration) MarshalJSON() ([]byte, error)

func (JSONDuration) String

func (d JSONDuration) String() string

type NopProcessor

type NopProcessor struct{}

func (NopProcessor) Process

func (p NopProcessor) Process(ctx context.Context) error

type PullContext

type PullContext struct {
	Ctx          context.Context
	UserID       int
	AnalysisGUID string
	CommitSHA    string
	ProviderCtx  *github.Context
	LogCtx       logutil.Context
	Log          logutil.Log
	// contains filtered or unexported fields
}

type PullProcessor

type PullProcessor interface {
	Process(ctx *PullContext) error
}

type PullProcessorFactory

type PullProcessorFactory interface {
	BuildProcessor(ctx *PullContext) (PullProcessor, func(), error)
}

type Repo

type Repo struct {
	RepoConfig
}

func NewRepo

func NewRepo(cfg *RepoConfig) *Repo

func (Repo) Process

func (r Repo) Process(ctx *RepoContext) error

type RepoContext

type RepoContext struct {
	Ctx context.Context

	AnalysisGUID string
	Branch       string
	Repo         *github.Repo // TODO: abstract from repo provider

	PrivateAccessToken string
	CommitSHA          string

	Log logutil.Log

	BuildConfig *envconfig.Service
}

type RepoProcessorFactory

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

func NewRepoProcessorFactory

func NewRepoProcessorFactory(cfg *StaticRepoConfig) *RepoProcessorFactory

func (RepoProcessorFactory) BuildProcessor

func (f RepoProcessorFactory) BuildProcessor(ctx *RepoContext) (*Repo, func(), error)

type StaticBasicPullConfig

type StaticBasicPullConfig struct {
	RepoFetcher     fetchers.Fetcher
	Linters         []linters.Linter
	Runner          linters.Runner
	ProviderClient  github.Client
	State           prstate.Storage
	Cfg             config.Config
	DistLockFactory *redsync.Redsync
	AwsSess         *session.Session
}

type StaticRepoConfig

type StaticRepoConfig struct {
	RepoFetcher fetchers.Fetcher
	Linters     []linters.Linter
	Runner      linters.Runner
	State       repostate.Storage
	Cfg         config.Config
	Et          apperrors.Tracker
	AwsSess     *session.Session
}

type Timing

type Timing struct {
	Name     string
	Duration JSONDuration `json:"DurationMs"`
}

type Warning

type Warning struct {
	Tag  string
	Text string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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