1
0
Fork 0
forked from forgejo/forgejo

Use Go1.11 module (#5743)

* Migrate to go modules

* make vendor

* Update mvdan.cc/xurls

* make vendor

* Update code.gitea.io/git

* make fmt-check

* Update github.com/go-sql-driver/mysql

* make vendor
This commit is contained in:
Mura Li 2019-03-27 19:15:23 +08:00 committed by Lunny Xiao
parent d578b71d61
commit d77176912b
575 changed files with 63239 additions and 13963 deletions

18
vendor/github.com/lunny/dingtalk_webhook/README.md generated vendored Normal file
View file

@ -0,0 +1,18 @@
# 非官方 Dingtalk webhook Golang SDK
## 此工程仅封装了 Dingtalk 的 webhook 部分的请求
## 使用
首先在dingtalk中创建一个机器人将accessToken拷贝出来然后执行下面方法即可
```Go
webhook := dingtalk.Webhook(accessToken)
webhook.SendTextMsg("这是一个没有AT的文本消息", false)
```
## License
This project is licensed under the MIT License.
See the [LICENSE](https://github.com/lunny/webhook_dingtalk/blob/master/LICENSE) file
for the full license text.

3
vendor/github.com/lunny/levelqueue/.gitignore generated vendored Normal file
View file

@ -0,0 +1,3 @@
queue/
queue_pop/
queue_push/

23
vendor/github.com/lunny/levelqueue/README.md generated vendored Normal file
View file

@ -0,0 +1,23 @@
# levelqueue
Level queue is a simple queue golang library base on go-leveldb.
[![CircleCI](https://circleci.com/gh/lunny/levelqueue.svg?style=shield)](https://circleci.com/gh/lunny/levelqueue)
[![codecov](https://codecov.io/gh/lunny/levelqueue/branch/master/graph/badge.svg)](https://codecov.io/gh/lunny/levelqueue)
[![](https://goreportcard.com/badge/github.com/lunny/levelqueue)](https://goreportcard.com/report/github.com/lunny/levelqueue)
## Installation
```
go get github.com/lunny/levelqueue
```
## Usage
```Go
queue, err := levelqueue.Open("./queue")
err = queue.RPush([]byte("test"))
data, err = queue.LPop()
```

3
vendor/github.com/lunny/levelqueue/go.mod generated vendored Normal file
View file

@ -0,0 +1,3 @@
module github.com/lunny/levelqueue
require github.com/syndtr/goleveldb v0.0.0-20190203031304-2f17a3356c66

18
vendor/github.com/lunny/levelqueue/go.sum generated vendored Normal file
View file

@ -0,0 +1,18 @@
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/syndtr/goleveldb v0.0.0-20190203031304-2f17a3356c66 h1:AwmkkZT+TucFotNCL+aNJ/0KCMsRtlXN9fs8uoOMSRk=
github.com/syndtr/goleveldb v0.0.0-20190203031304-2f17a3356c66/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

26
vendor/github.com/lunny/log/.gitignore generated vendored Normal file
View file

@ -0,0 +1,26 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
log.db
*.log
logs
.vscode

49
vendor/github.com/lunny/log/README.md generated vendored Normal file
View file

@ -0,0 +1,49 @@
## log
[![GoDoc](https://godoc.org/github.com/lunny/log?status.png)](https://godoc.org/github.com/lunny/log)
[简体中文](https://github.com/lunny/log/blob/master/README_CN.md)
# Installation
```
go get github.com/lunny/log
```
# Features
* Add color support for unix console
* Implemented dbwriter to save log to database
* Implemented FileWriter to save log to file by date or time.
* Location configuration
# Example
For Single File:
```Go
f, _ := os.Create("my.log")
log.Std.SetOutput(f)
```
For Multiple Writer:
```Go
f, _ := os.Create("my.log")
log.Std.SetOutput(io.MultiWriter(f, os.Stdout))
```
For log files by date or time:
```Go
w := log.NewFileWriter(log.FileOptions{
ByType:log.ByDay,
Dir:"./logs",
})
log.Std.SetOutput(w)
```
# About
This repo is an extension of Golang log.
# LICENSE
BSD License
[http://creativecommons.org/licenses/BSD/](http://creativecommons.org/licenses/BSD/)

52
vendor/github.com/lunny/log/README_CN.md generated vendored Normal file
View file

@ -0,0 +1,52 @@
## log
[![GoDoc](https://godoc.org/github.com/lunny/log?status.png)](https://godoc.org/github.com/lunny/log)
[English](https://github.com/lunny/log/blob/master/README.md)
# 安装
```
go get github.com/lunny/log
```
# 特性
* 对unix增加控制台颜色支持
* 实现了保存log到数据库支持
* 实现了保存log到按日期的文件支持
* 实现了设置日期的地区
# 例子
保存到单个文件:
```Go
f, _ := os.Create("my.log")
log.Std.SetOutput(f)
```
保存到数据库:
```Go
f, _ := os.Create("my.log")
log.Std.SetOutput(io.MultiWriter(f, os.Stdout))
```
保存到按时间分隔的文件:
```Go
w := log.NewFileWriter(log.FileOptions{
ByType:log.ByDay,
Dir:"./logs",
})
log.Std.SetOutput(w)
```
# 关于
本 Log 是在 golang 的 log 之上的扩展
# LICENSE
BSD License
[http://creativecommons.org/licenses/BSD/](http://creativecommons.org/licenses/BSD/)

7
vendor/github.com/lunny/nodb/.gitignore generated vendored Normal file
View file

@ -0,0 +1,7 @@
build
*.pyc
.DS_Store
nohup.out
build_config.mk
var
.vscode

84
vendor/github.com/lunny/nodb/README.md generated vendored Normal file
View file

@ -0,0 +1,84 @@
# NoDB
[中文](https://github.com/lunny/nodb/blob/master/README_CN.md)
Nodb is a fork of [ledisdb](https://github.com/siddontang/ledisdb) and shrink version. It's get rid of all C or other language codes and only keep Go's. It aims to provide a nosql database library rather than a redis like server. So if you want a redis like server, ledisdb is the best choose.
Nodb is a pure Go and high performance NoSQL database library. It supports some data structure like kv, list, hash, zset, bitmap, set.
Nodb now use [goleveldb](https://github.com/syndtr/goleveldb) as backend to store data.
## Features
+ Rich data structure: KV, List, Hash, ZSet, Bitmap, Set.
+ Stores lots of data, over the memory limit.
+ Supports expiration and ttl.
+ Easy to embed in your own Go application.
## Install
go get github.com/lunny/nodb
## Package Example
### Open And Select database
```go
import(
"github.com/lunny/nodb"
"github.com/lunny/nodb/config"
)
cfg := new(config.Config)
cfg.DataDir = "./"
dbs, err := nodb.Open(cfg)
if err != nil {
fmt.Printf("nodb: error opening db: %v", err)
}
db, _ := dbs.Select(0)
```
### KV
KV is the most basic nodb type like any other key-value database.
```go
err := db.Set(key, value)
value, err := db.Get(key)
```
### List
List is simply lists of values, sorted by insertion order.
You can push or pop value on the list head (left) or tail (right).
```go
err := db.LPush(key, value1)
err := db.RPush(key, value2)
value1, err := db.LPop(key)
value2, err := db.RPop(key)
```
### Hash
Hash is a map between fields and values.
```go
n, err := db.HSet(key, field1, value1)
n, err := db.HSet(key, field2, value2)
value1, err := db.HGet(key, field1)
value2, err := db.HGet(key, field2)
```
### ZSet
ZSet is a sorted collections of values.
Every member of zset is associated with score, a int64 value which used to sort, from smallest to greatest score.
Members are unique, but score may be same.
```go
n, err := db.ZAdd(key, ScorePair{score1, member1}, ScorePair{score2, member2})
ay, err := db.ZRangeByScore(key, minScore, maxScore, 0, -1)
```
## Links
+ [Ledisdb Official Website](http://ledisdb.com)
+ [GoDoc](https://godoc.org/github.com/lunny/nodb)
+ [GoWalker](https://gowalker.org/github.com/lunny/nodb)
## Thanks
Gmail: siddontang@gmail.com

81
vendor/github.com/lunny/nodb/README_CN.md generated vendored Normal file
View file

@ -0,0 +1,81 @@
# NoDB
[English](https://github.com/lunny/nodb/blob/master/README.md)
Nodb 是 [ledisdb](https://github.com/siddontang/ledisdb) 的克隆和缩减版本。该版本去掉了所有C和其它语言的依赖只保留Go语言的。目标是提供一个Nosql数据库的开发库而不是提供一个像Redis那样的服务器。因此如果你想要的是一个独立服务器你可以直接选择ledisdb。
Nodb 是一个纯Go的高性能 NoSQL 数据库。他支持 kv, list, hash, zset, bitmap, set 等数据结构。
Nodb 当前底层使用 (goleveldb)[https://github.com/syndtr/goleveldb] 来存储数据。
## 特性
+ 丰富的数据结构支持: KV, List, Hash, ZSet, Bitmap, Set。
+ 永久存储并且不受内存的限制。
+ 高性能那个。
+ 可以方便的嵌入到你的应用程序中。
## 安装
go get github.com/lunny/nodb
## 例子
### 打开和选择数据库
```go
import(
"github.com/lunny/nodb"
"github.com/lunny/nodb/config"
)
cfg := new(config.Config)
cfg.DataDir = "./"
dbs, err := nodb.Open(cfg)
if err != nil {
fmt.Printf("nodb: error opening db: %v", err)
}
db, _ := dbs.Select(0)
```
### KV
KV 是最基础的功能和其它Nosql一样。
```go
err := db.Set(key, value)
value, err := db.Get(key)
```
### List
List 是一些值的简单列表按照插入的顺序排列。你可以从左或右push和pop值。
```go
err := db.LPush(key, value1)
err := db.RPush(key, value2)
value1, err := db.LPop(key)
value2, err := db.RPop(key)
```
### Hash
Hash 是一个field和value对应的map。
```go
n, err := db.HSet(key, field1, value1)
n, err := db.HSet(key, field2, value2)
value1, err := db.HGet(key, field1)
value2, err := db.HGet(key, field2)
```
### ZSet
ZSet 是一个排序的值集合。zset的每个成员对应一个score这是一个int64的值用于从小到大排序。成员不可重复但是score可以相同。
```go
n, err := db.ZAdd(key, ScorePair{score1, member1}, ScorePair{score2, member2})
ay, err := db.ZRangeByScore(key, minScore, maxScore, 0, -1)
```
## 链接
+ [Ledisdb Official Website](http://ledisdb.com)
+ [GoDoc](https://godoc.org/github.com/lunny/nodb)
+ [GoWalker](https://gowalker.org/github.com/lunny/nodb)
## 感谢
Gmail: siddontang@gmail.com

45
vendor/github.com/lunny/nodb/config/config.toml generated vendored Normal file
View file

@ -0,0 +1,45 @@
# LedisDB configuration
# Server listen address
addr = "127.0.0.1:6380"
# Server http listen address, set empty to disable
http_addr = "127.0.0.1:11181"
# Data store path, all ledisdb's data will be saved here
data_dir = "/tmp/ledis_server"
# Log server command, set empty to disable
access_log = ""
# Set slaveof to enable replication from master, empty, no replication
slaveof = ""
# Choose which backend storage to use, now support:
#
# leveldb
# rocksdb
# goleveldb
# lmdb
# boltdb
# hyperleveldb
# memory
#
db_name = "leveldb"
[leveldb]
compression = false
block_size = 32768
write_buffer_size = 67108864
cache_size = 524288000
max_open_files = 1024
[lmdb]
map_size = 524288000
nosync = true
[binlog]
max_file_size = 0
max_file_num = 0