admin_gin.go 634 B

12345678910111213141516171819202122232425
  1. // Copyright 2016 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package cmd
  5. import (
  6. "github.com/urfave/cli"
  7. "github.com/G-Node/gogs/models"
  8. )
  9. var (
  10. subcmdRebuildSearchIndex = cli.Command{
  11. Name: "rebuild-index",
  12. Usage: "Rebuild the search index for all repositories",
  13. Action: adminDashboardOperation(
  14. models.RebuildIndex,
  15. "Sending all existing repositories to the gin-dex server for reindexing",
  16. ),
  17. Flags: []cli.Flag{
  18. stringFlag("config, c", "custom/conf/app.ini", "Custom configuration file path"),
  19. },
  20. }
  21. )