goldsmith/interface.go

27 lines
390 B
Go
Raw Normal View History

2018-12-08 19:18:51 +00:00
package goldsmith
type Initializer interface {
2018-12-10 01:00:46 +00:00
Initialize(context *Context) (Filter, error)
2018-12-08 19:18:51 +00:00
}
type Processor interface {
2018-12-10 01:00:46 +00:00
Process(context *Context, file *File) error
2018-12-08 19:18:51 +00:00
}
type Finalizer interface {
2018-12-10 01:00:46 +00:00
Finalize(context *Context) error
2018-12-08 19:18:51 +00:00
}
type Component interface {
Name() string
}
type Filter interface {
Component
2019-04-03 02:01:36 +00:00
Accept(file *File) (bool, error)
2018-12-08 19:18:51 +00:00
}
type Plugin interface {
Component
}