44 lines
995 B
Go
44 lines
995 B
Go
package archive
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.kmsign.ru/royalcat/tstor/src/daemon"
|
|
"git.kmsign.ru/royalcat/tstor/src/vfs"
|
|
"github.com/knadh/koanf/v2"
|
|
"go.opentelemetry.io/otel"
|
|
)
|
|
|
|
const DaemonName string = "archive"
|
|
|
|
var _ daemon.DaemonConstructor = NewDaemon
|
|
|
|
func NewDaemon(ctx context.Context, koanf *koanf.Koanf) (daemon.Daemon, error) {
|
|
return &Daemon{}, nil
|
|
}
|
|
|
|
var tracer = otel.Tracer("git.kmsign.ru/royalcat/tstor/daemons/archive")
|
|
|
|
var _ daemon.Daemon = (*Daemon)(nil)
|
|
|
|
type Daemon struct{}
|
|
|
|
// Name implements daemon.Daemon.
|
|
func (d *Daemon) Name() string {
|
|
return DaemonName
|
|
}
|
|
|
|
// Extensions implements daemon.Daemon.
|
|
func (d *Daemon) Extensions() []string {
|
|
return []string{".zip", ".rar", ".7z"}
|
|
}
|
|
|
|
// GetFS implements daemon.Daemon.
|
|
func (d *Daemon) GetFS(ctx context.Context, sourcePath string, file vfs.File) (vfs.Filesystem, error) {
|
|
panic("unimplemented")
|
|
}
|
|
|
|
// Close implements daemon.Daemon.
|
|
func (d *Daemon) Close(ctx context.Context) error {
|
|
panic("unimplemented")
|
|
}
|