mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Search bar for issues/pulls (#530)
This commit is contained in:
14
modules/indexer/indexer.go
Normal file
14
modules/indexer/indexer.go
Normal file
@@ -0,0 +1,14 @@
|
||||
// Copyright 2016 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package indexer
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/models"
|
||||
)
|
||||
|
||||
// NewContext start indexer service
|
||||
func NewContext() {
|
||||
models.InitIssueIndexer()
|
||||
}
|
@@ -123,6 +123,12 @@ var (
|
||||
UsePostgreSQL bool
|
||||
UseTiDB bool
|
||||
|
||||
// Indexer settings
|
||||
Indexer struct {
|
||||
IssuePath string
|
||||
UpdateQueueLength int
|
||||
}
|
||||
|
||||
// Webhook settings
|
||||
Webhook = struct {
|
||||
QueueLength int
|
||||
|
25
modules/util/util.go
Normal file
25
modules/util/util.go
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright 2017 The Gitea Authors. All rights reserved.
|
||||
// Use of this source code is governed by a MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package util
|
||||
|
||||
// OptionalBool a boolean that can be "null"
|
||||
type OptionalBool byte
|
||||
|
||||
const (
|
||||
// OptionalBoolNone a "null" boolean value
|
||||
OptionalBoolNone = iota
|
||||
// OptionalBoolTrue a "true" boolean value
|
||||
OptionalBoolTrue
|
||||
// OptionalBoolFalse a "false" boolean value
|
||||
OptionalBoolFalse
|
||||
)
|
||||
|
||||
// OptionalBoolOf get the corresponding OptionalBool of a bool
|
||||
func OptionalBoolOf(b bool) OptionalBool {
|
||||
if b {
|
||||
return OptionalBoolTrue
|
||||
}
|
||||
return OptionalBoolFalse
|
||||
}
|
Reference in New Issue
Block a user