Documentation
¶
Index ¶
- Variables
- func Expand(task config.Task, params Params) ([]config.Task, error)
- type Controller
- type EventQueue
- type Executor
- type Expr
- type FileReader
- type FileWriter
- type GitHub
- type Params
- type Phase
- func (phase *Phase) Get(name string) []Task
- func (phase *Phase) IsReady(task Task, params Params) (bool, error)
- func (phase Phase) Meta() map[string]interface{}
- func (phase Phase) Name() string
- func (phase *Phase) PrepareCommandTask(task Task, params Params, wd string) (Task, error)
- func (phase *Phase) PrepareTask(task Task, params Params, wd string) (Task, error)
- func (phase *Phase) Run(ctx context.Context, params Params, wd string) error
- func (phase *Phase) RunTask(ctx context.Context, idx int, task Task, params Params, wd string) error
- func (phase Phase) ToTemplate() map[string]interface{}
- type Task
- type TaskList
- type TaskQueue
- type Timer
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBuildFail = errors.New("build failed")
Functions ¶
Types ¶
type Controller ¶
type Controller struct {
GitHub GitHub
Config config.Config
Executor Executor
FileReader FileReader
FileWriter FileWriter
Timer Timer
Stdout io.Writer
Stderr io.Writer
}
func (Controller) ReadExternalFiles ¶ added in v0.5.0
func (ctrl Controller) ReadExternalFiles(ctx context.Context, wd string) error
type EventQueue ¶
type EventQueue struct {
Queue chan struct{}
// contains filtered or unexported fields
}
func (*EventQueue) Close ¶
func (queue *EventQueue) Close()
func (*EventQueue) Pop ¶
func (queue *EventQueue) Pop()
func (*EventQueue) Push ¶
func (queue *EventQueue) Push()
type FileReader ¶
type FileReader interface {
Read(path string) (domain.FileResult, error)
}
type FileWriter ¶ added in v0.4.0
type FileWriter interface {
Write(path, text string) (domain.FileResult, error)
}
type GitHub ¶
type GitHub interface {
GetPR(ctx context.Context, params gh.ParamsGetPR) (*github.PullRequest, *github.Response, error)
GetPRFiles(ctx context.Context, params gh.ParamsGetPRFiles) ([]*github.CommitFile, *github.Response, error)
ListPRsWithCommit(ctx context.Context, params gh.ParamsListPRsWithCommit) ([]*github.PullRequest, *github.Response, error)
}
type Params ¶
type Params struct {
PR interface{}
Files interface{}
Phases map[string]Phase
TaskIdx int
PhaseName string
Item config.Item
Meta map[string]interface{}
}
func (Params) ToTemplate ¶
type Phase ¶
type Phase struct {
Config config.Phase
EventQueue *EventQueue
Stdout io.Writer
Stderr io.Writer
TaskQueue TaskQueue
Status string
Error error
Exit bool
Tasks *TaskList
}
func (*Phase) PrepareCommandTask ¶ added in v0.5.0
func (*Phase) PrepareTask ¶ added in v0.4.0
func (Phase) ToTemplate ¶ added in v0.4.0
type Task ¶
type Task struct {
Result domain.Result
Config config.Task
Executor Executor
FileReader FileReader
FileWriter FileWriter
Timer Timer
Stdout io.Writer
Stderr io.Writer
}
func (Task) ToTemplate ¶
Click to show internal directories.
Click to hide internal directories.