mirror of
https://github.com/kopia/kopia.git
synced 2026-01-23 13:58:08 -05:00
* tools: upgraded linter to 1.40.1 * lint: fixed nolintlint vionlations * lint: disabled tagliatele linter * lint: fixed remaining warnings
24 lines
605 B
Go
24 lines
605 B
Go
package cli
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/kopia/kopia/internal/apiclient"
|
|
"github.com/kopia/kopia/internal/serverapi"
|
|
)
|
|
|
|
type commandServerPause struct {
|
|
sf serverClientFlags
|
|
}
|
|
|
|
func (c *commandServerPause) setup(svc appServices, parent commandParent) {
|
|
cmd := parent.Command("pause", "Pause the scheduled snapshots for one or more sources")
|
|
c.sf.setup(cmd)
|
|
cmd.Action(svc.serverAction(&c.sf, runServerPause))
|
|
}
|
|
|
|
func runServerPause(ctx context.Context, cli *apiclient.KopiaAPIClient) error {
|
|
// nolint:wrapcheck
|
|
return cli.Post(ctx, "sources/pause", &serverapi.Empty{}, &serverapi.Empty{})
|
|
}
|