blob: 5d12fa896bfed7d9c5ad0fbf10717a9012f4eeef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package input
import (
"io"
"time"
"github.com/SayaAndy/saya-today-thumbnail-generator/config"
)
type InputClient interface {
Scan() ([]string, error)
ReadMetadata(string) (*MetadataStruct, error)
GetReader(string) (io.ReadCloser, error)
}
type MetadataStruct struct {
Name string
StorageType string
Hash string
ContentType string
FirstCreated time.Time
LastModified time.Time
Misc map[string]string
}
var NewInputClientMap = map[string]func(cfg *config.InputConfig) (InputClient, error){
"b2": NewB2InputClient,
"local-unix": NewLocalUnixInputClient,
}
|