Skip to content

Commit

Permalink
feat: implement repo, edit, and supporting RPCs
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Nov 12, 2023
1 parent a6fdb46 commit a99cc85
Show file tree
Hide file tree
Showing 29 changed files with 1,194 additions and 353 deletions.
12 changes: 10 additions & 2 deletions cmd/resticui/resticui.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import (
"syscall"

"github.com/garethgeorge/resticui/internal/api"
"github.com/garethgeorge/resticui/static"
"github.com/garethgeorge/resticui/internal/config"
"github.com/garethgeorge/resticui/internal/orchestrator"
static "github.com/garethgeorge/resticui/webui"
"go.uber.org/zap"

_ "embed"
Expand All @@ -21,6 +23,10 @@ func main() {
ctx, cancel := context.WithCancel(ctx)
go onterm(cancel)

if _, err := config.Default.Get(); err != nil {
zap.S().Fatalf("Error loading config: %v", err)
}

var wg sync.WaitGroup

// Configure the HTTP mux
Expand All @@ -32,11 +38,13 @@ func main() {
Handler: mux,
}

orchestrator := orchestrator.NewOrchestrator(config.Default)

// Serve the API
wg.Add(1)
go func() {
defer wg.Done()
err := api.ServeAPI(ctx, mux)
err := api.ServeAPI(ctx, orchestrator, mux)
if err != nil {
zap.S().Fatal("Error serving API", zap.Error(err))
}
Expand Down
226 changes: 83 additions & 143 deletions gen/go/v1/config.pb.go

Large diffs are not rendered by default.

227 changes: 146 additions & 81 deletions gen/go/v1/restic.pb.go

Large diffs are not rendered by default.

204 changes: 153 additions & 51 deletions gen/go/v1/service.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a99cc85

Please sign in to comment.