Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Admin admin Admin = cli.Command{ Name: "admin", Usage: "Perform admin operations on command line", Description: `Allow using internal logic of Gogs without hacking into the source code to make automatic initialization process more smoothly`, Subcommands: []cli.Command{ subcmdCreateUser, subcmdDeleteInactivateUsers, subcmdDeleteRepositoryArchives, subcmdDeleteMissingRepositories, subcmdGitGcRepos, subcmdRewriteAuthorizedKeys, subcmdSyncRepositoryHooks, subcmdReinitMissingRepositories, }, } )
View Source
var Backup = cli.Command{ Name: "backup", Usage: "Backup files and database", Description: `Backup dumps and compresses all related files and database into zip file, which can be used for migrating Gogs to another server. The output format is meant to be portable among all supported database engines.`, Action: runBackup, Flags: []cli.Flag{ stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"), boolFlag("verbose, v", "Show process details"), stringFlag("tempdir, t", os.TempDir(), "Temporary directory path"), stringFlag("target", "./", "Target directory path to save backup archive"), stringFlag("archive-name", fmt.Sprintf("gogs-backup-%s.zip", time.Now().Format("20060102150405")), "Name of backup archive"), boolFlag("database-only", "Only dump database"), boolFlag("exclude-repos", "Exclude repositories"), }, }
Backup backup
View Source
var Cert = cli.Command{ Name: "cert", Usage: "Generate self-signed certificate", Description: `Generate a self-signed X.509 certificate for a TLS server. Outputs to 'cert.pem' and 'key.pem' and will overwrite existing files.`, Action: runCert, Flags: []cli.Flag{ stringFlag("host", "", "Comma-separated hostnames and IPs to generate a certificate for"), stringFlag("ecdsa-curve", "", "ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521"), intFlag("rsa-bits", 2048, "Size of RSA key to generate. Ignored if --ecdsa-curve is set"), stringFlag("start-date", "", "Creation date formatted as Jan 1 15:04:05 2011"), durationFlag("duration", 365*24*time.Hour, "Duration that certificate is valid for"), boolFlag("ca", "whether this cert should be its own Certificate Authority"), }, }
Cert cert
View Source
var ( Hook = cli.Command{ Name: "hook", Usage: "Delegate commands to corresponding Git hooks", Description: "All sub-commands should only be called by Git", Flags: []cli.Flag{ stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"), }, Subcommands: []cli.Command{ subcmdHookPreReceive, subcmdHookUpadte, subcmdHookPostReceive, }, } )
Hook hook
View Source
var ( // Import import Import = cli.Command{ Name: "import", Usage: "import portable data as local gogs data", Description: "allow user import ", Subcommands: []cli.Command{ subcmdImportLocale, }, } )
View Source
var Restore = cli.Command{ Name: "restore", Usage: "Restore files and database from backup", Description: " retore imports all related file ", Action: runRestore, Flags: []cli.Flag{ stringFlag("config,c", "custom/conf/app.ini", "custom config"), boolFlag("verbose,v", "show prosess detail"), stringFlag("tempdir,t", os.TempDir(), "temporary directory"), stringFlag("from", "", "path to backup archive"), boolFlag("database-only", "only import database"), boolFlag("exclude-repos", "exclude repositories"), }, }
Restore restore
View Source
var Serv = cli.Command{ Name: "serv", Usage: "this command should only be called by ssh shel", Description: "serv provide access auth for repositories", Action: runServ, Flags: []cli.Flag{ stringFlag("config,c", "custom/conf/app.ini", "custom config file path"), }, }
Serv i dont know
View Source
var Web = cli.Command{ Name: "web", Usage: "start web server", Description: `autopub is a publish tool`, Action: runWeb, Flags: []cli.Flag{ stringFlag("port,p", "5408", "Temporary port number to prevent conflict"), stringFlag("config,c", "custom/conf/app.ini", "Custom configuration file path"), }, }
Functions ¶
func SubcmdImportLocale ¶
SubcmdImportLocale local sub cmd
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.