34 lines
591 B
Go
34 lines
591 B
Go
package transform
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.maximumdirect.net/eric/distributor/internal/bundle"
|
|
"gitea.maximumdirect.net/eric/distributor/internal/storage"
|
|
)
|
|
|
|
type Output struct {
|
|
Path string
|
|
SourcePath string
|
|
Transform string
|
|
Data []byte
|
|
SHA256 string
|
|
Size int64
|
|
}
|
|
|
|
type Request struct {
|
|
SourceBundle bundle.Bundle
|
|
SourceBackend storage.Backend
|
|
Markdown MarkdownOptions
|
|
}
|
|
|
|
type MarkdownOptions struct {
|
|
Mode string
|
|
Input string
|
|
CssHref string
|
|
}
|
|
|
|
type Transformer interface {
|
|
Generate(ctx context.Context, req Request) ([]Output, error)
|
|
}
|