Documentation ¶
Index ¶
- Variables
- func Create(db *model.DBEngine, store *storage.Storage) gin.HandlerFunc
- func CreatePage(c *gin.Context)
- func CreateV2(db *model.DBEngine, store *storage.Storage) gin.HandlerFunc
- func Delete(db *model.DBEngine, store *storage.Storage) gin.HandlerFunc
- func DeleteV2(db *model.DBEngine, store *storage.Storage) gin.HandlerFunc
- func Home(db *model.DBEngine, store *storage.Storage) gin.HandlerFunc
- func ShowRepo(db *model.DBEngine, store *storage.Storage) gin.HandlerFunc
- func ShowRepos(db *model.DBEngine) gin.HandlerFunc
- type CreateRequest
- type DeleteRequest
- type DeleteRequestV2
Constants ¶
This section is empty.
Variables ¶
View Source
var RepoAlreadyExistsError = errors.New("repo already exists")
Functions ¶
func CreatePage ¶
func Delete ¶
Delete repo record from database and git storage 1. backup .git -> .git.backup 2. delete .git 2. delete db record 3. commit txn 4. remove backup
TODO(adl): If the database crashes while deleting repository records, we need to recover the Git repository data again during the database recovery process. This process should be delegated to an external stable storage to record the task, such as Redis or message queues.
Types ¶
type CreateRequest ¶
type DeleteRequest ¶
type DeleteRequestV2 ¶
type DeleteRequestV2 struct {
RepoName string `json:"reponame"`
}
Click to show internal directories.
Click to hide internal directories.