23 lines
571 B
Go
Raw Normal View History

2024-03-22 18:05:47 +08:00
package interfaces
import (
"context"
"github.com/loveuer/esgo2dump/model"
)
2024-03-22 18:05:47 +08:00
type DumpIO interface {
ReadData(ctx context.Context, size int, query map[string]any, includeFields []string) (<-chan []*model.ESSource, <-chan error)
2024-05-24 17:27:52 +08:00
WriteData(ctx context.Context, docsCh <-chan []*model.ESSource) error
2024-03-22 18:05:47 +08:00
ReadMapping(context.Context) (map[string]any, error)
WriteMapping(context.Context, map[string]any) error
ReadSetting(ctx context.Context) (map[string]any, error)
WriteSetting(context.Context, map[string]any) error
Close() error
IOType() IO
IsFile() bool
}