command

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2021 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BuildTime     string
	Version       string
	BuildPlatform string
)

Functions

func CatchupFactory

func CatchupFactory() (cli.Command, error)

CatchupFactory of command `catchup`

func ConfigFactory

func ConfigFactory() (cli.Command, error)

ConfigFactory of command `push`

func Exec

func Exec()

Exec exec command

func ExecCatchup

func ExecCatchup(c contrib.Contrib, r repository.HeadReader) error

ExecCatchup catchup contrib with repo head

func ExecGetConfig

func ExecGetConfig(key string, r repository.ConfigReader) (string, error)

ExecGetConfig get config

func ExecPush

func ExecPush(c contrib.Contrib, r repository.Files) error

ExecPush push changed and deleted files to contrib

func ExecSetup

func ExecSetup(c contrib.Contrib, repo repository.Files) error

ExecSetup setup command handler

func ExecUpdateConfig

func ExecUpdateConfig(key, value string, r repository.ConfigWriter) error

ExecUpdateConfig update config

func NewContrib

func NewContrib(repo repository.Repository) (contrib.Contrib, int)

func NewRepo

func NewRepo(base, remote string) (repository.Repository, int)

NewRepo new repo instance

func PushFactory

func PushFactory() (cli.Command, error)

PushFactory command `push`

func Register

func Register() map[string]cli.CommandFactory

Register all syner command factories

func SetupFactory

func SetupFactory() (cli.Command, error)

SetupFactory command `setup` factory

Types

type BasicOptions

type BasicOptions struct {
	Base   string `flag:"base" value:"" usage:"Base dir path to run syncer"`
	Branch string `flag:"branch" value:"" usage:"Push a specific branch"`
	Remote string `flag:"remote" value:"" usage:"Push to specific remote"`
}

BasicOptions basic options for command

type OptionsParser

type OptionsParser func(args []string) int

func OptionsBinder

func OptionsBinder(options interface{}, flags *flag.FlagSet) OptionsParser

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL