2026-05-31 02:28:48 +00:00
|
|
|
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
|
2026-06-01 21:20:02 +00:00
|
|
|
Markdown MarkdownOptions
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type MarkdownOptions struct {
|
2026-06-13 22:16:15 -05:00
|
|
|
Mode string
|
|
|
|
|
Input string
|
|
|
|
|
CssHref string
|
2026-05-31 02:28:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Transformer interface {
|
|
|
|
|
Generate(ctx context.Context, req Request) ([]Output, error)
|
|
|
|
|
}
|