You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
870 B
Go
57 lines
870 B
Go
2 years ago
|
package obspipeline
|
||
|
|
||
|
import (
|
||
|
"go.uber.org/zap"
|
||
|
)
|
||
|
|
||
|
func NewPipeline(dev bool) *Pipeline {
|
||
|
var p Pipeline
|
||
|
var l *zap.Logger
|
||
|
|
||
|
l, _ = zap.NewProduction()
|
||
|
if dev {
|
||
|
l, _ = zap.NewDevelopment()
|
||
|
}
|
||
|
p.L = l
|
||
|
p.Attachments = make(map[string]string)
|
||
|
p.Posts = make([]string, 0)
|
||
|
|
||
|
return &p
|
||
|
}
|
||
|
|
||
|
type Pipeline struct {
|
||
|
Source, Target string
|
||
|
Attachments map[string]string
|
||
|
Notes, Posts []string
|
||
|
L *zap.Logger
|
||
|
BlogDir, AttachmentsDir string
|
||
|
}
|
||
|
|
||
|
func (p *Pipeline) FindAttachments() error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (p *Pipeline) FindNotes() error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (p *Pipeline) FindPosts() error {
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (p *Pipeline) CopyPost(post string) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (p *Pipeline) MoveAttachments(post string) error {
|
||
|
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (p *Pipeline) SanitizePost(post string) error {
|
||
|
|
||
|
return nil
|
||
|
}
|