Add initial Go server skeleton with HTTP handlers, middleware, job runner, and stubs

This commit is contained in:
Dev
2025-12-13 15:18:04 +00:00
commit 61570cae23
28 changed files with 921 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package service
import (
"context"
"github.com/example/storage-appliance/internal/domain"
)
type DiskService interface {
List(ctx context.Context) ([]domain.Disk, error)
Inspect(ctx context.Context, path string) (domain.Disk, error)
}
type ZFSService interface {
ListPools(ctx context.Context) ([]domain.Pool, error)
CreatePool(ctx context.Context, name string, vdevs []string) (string, error)
}
type JobRunner interface {
Enqueue(ctx context.Context, j domain.Job) (string, error)
}