application

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config           Config
	TargetScriptList domain.TargetScriptList
	Parser           domain.EventParser
	ScriptValidator  TargetScriptListValidator
	EventValidator   ParsedEventValidator
	Logger           Logger
}

func New

func New(config *Config, parser domain.EventParser, scriptValidator TargetScriptListValidator, eventValidator ParsedEventValidator, logger Logger) *App

func (*App) IsValid

func (a *App) IsValid(event domain.ParsedEvent) bool

func (*App) LoadTargetScriptList

func (a *App) LoadTargetScriptList(event domain.ParsedEvent) error

func (*App) LoadTargetScripts

func (a *App) LoadTargetScripts(event domain.ParsedEvent) error

func (*App) ParseEvent

func (a *App) ParseEvent() (domain.ParsedEvent, error)

func (*App) Run

func (a *App) Run(invoker ShellInvoker) error

func (*App) ValidateTargetScripts

func (a *App) ValidateTargetScripts() bool

type Config

type Config struct {
	RequiredLabel       string
	BaseBranch          string
	TargetScriptListDir string
}

type Logger

type Logger interface {
	Debug(string, ...any)
	Info(string, ...any)
	Error(string, ...any)
}

type ParsedEventValidator

type ParsedEventValidator interface {
	Validate(event domain.ParsedEvent) bool
}

type ShellInvoker

type ShellInvoker interface {
	Execute(domain.TargetScriptList) error
}

type TargetScriptListValidator

type TargetScriptListValidator interface {
	Validate(list domain.TargetScriptList) bool
}

Directories

Path Synopsis
Package application is a generated GoMock package.
Package application is a generated GoMock package.

Jump to

Keyboard shortcuts

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