31 lines
609 B
Go
31 lines
609 B
Go
|
package command
|
||
|
|
||
|
import (
|
||
|
"github.com/urfave/cli/v2"
|
||
|
"go-mod.ewintr.nl/planner/plan/storage"
|
||
|
)
|
||
|
|
||
|
var SyncCmd = &cli.Command{
|
||
|
Name: "sync",
|
||
|
Usage: "Synchonize with server",
|
||
|
Flags: []cli.Flag{
|
||
|
&cli.BoolFlag{
|
||
|
Name: "full",
|
||
|
Aliases: []string{"f"},
|
||
|
Usage: "Force full sync",
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
|
||
|
func NewSyncCmd(localRepo storage.LocalID, eventRepo storage.Event) *cli.Command {
|
||
|
SyncCmd.Action = func(cCtx *cli.Context) error {
|
||
|
return Sync(localRepo, eventRepo, cCtx.Bool("full"))
|
||
|
}
|
||
|
return SyncCmd
|
||
|
}
|
||
|
|
||
|
func Sync(localRepo storage.LocalID, eventRepo storage.Event, full bool) error {
|
||
|
|
||
|
return nil
|
||
|
}
|