Documentation ¶
Overview ¶
Copyright 2009 The Go Authors. All rights reserved. Copyright 2014 The Gogs Authors. All rights reserved. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( COMMANDS_READONLY = map[string]models.AccessType{ "git-upload-pack": models.WRITABLE, "git upload-pack": models.WRITABLE, "git-upload-archive": models.WRITABLE, } COMMANDS_WRITE = map[string]models.AccessType{ "git-receive-pack": models.READABLE, "git receive-pack": models.READABLE, } )
View Source
var CmdCert = 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{ cli.StringFlag{"host", "", "Comma-separated hostnames and IPs to generate a certificate for", ""}, cli.StringFlag{"ecdsa-curve", "", "ECDSA curve to use to generate a key. Valid values are P224, P256, P384, P521", ""}, cli.IntFlag{"rsa-bits", 2048, "Size of RSA key to generate. Ignored if --ecdsa-curve is set", ""}, cli.StringFlag{"start-date", "", "Creation date formatted as Jan 1 15:04:05 2011", ""}, cli.DurationFlag{"duration", 365 * 24 * time.Hour, "Duration that certificate is valid for", ""}, cli.BoolFlag{"ca", "whether this cert should be its own Certificate Authority", ""}, }, }
View Source
var CmdDump = cli.Command{ Name: "dump", Usage: "Dump Gogs files and database", Description: `Dump compresses all related files and database into zip file. It can be used for backup and capture Gogs server image to send to maintainer`, Action: runDump, Flags: []cli.Flag{ cli.BoolFlag{"verbose, v", "show process details", ""}, }, }
View Source
var CmdFix = cli.Command{ Name: "fix", Usage: "This command for upgrade from old version", Action: runFix, Subcommands: fixCommands, Flags: []cli.Flag{}, }
View Source
var CmdServ = cli.Command{ Name: "serv", Usage: "This command should only be called by SSH shell", Description: `Serv provide access auth for repositories`, Action: runServ, Flags: []cli.Flag{}, }
View Source
var CmdUpdate = cli.Command{ Name: "update", Usage: "This command should only be called by SSH shell", Description: `Update get pushed info and insert into database`, Action: runUpdate, Flags: []cli.Flag{}, }
View Source
var CmdWeb = cli.Command{ Name: "web", Usage: "Start Gogs web server", Description: `Gogs web server is the only thing you need to run, and it takes care of all the other things for you`, Action: runWeb, Flags: []cli.Flag{}, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.