├── vendor ├── github.com │ ├── gin-gonic │ │ └── gin │ │ │ ├── wercker.yml │ │ │ ├── codecov.yml │ │ │ ├── doc.go │ │ │ ├── context_appengine.go │ │ │ ├── json │ │ │ ├── json.go │ │ │ └── jsoniter.go │ │ │ ├── test_helpers.go │ │ │ ├── binding │ │ │ ├── query.go │ │ │ ├── xml.go │ │ │ ├── msgpack.go │ │ │ ├── json.go │ │ │ ├── protobuf.go │ │ │ ├── default_validator.go │ │ │ └── form.go │ │ │ ├── render │ │ │ ├── data.go │ │ │ ├── xml.go │ │ │ ├── redirect.go │ │ │ ├── yaml.go │ │ │ ├── msgpack.go │ │ │ ├── text.go │ │ │ ├── render.go │ │ │ ├── json.go │ │ │ └── html.go │ │ │ ├── CONTRIBUTING.md │ │ │ ├── deprecated.go │ │ │ ├── LICENSE │ │ │ ├── fs.go │ │ │ ├── Makefile │ │ │ ├── mode.go │ │ │ └── debug.go │ ├── ugorji │ │ └── go │ │ │ ├── codec │ │ │ ├── prebuild.go │ │ │ ├── gen_17.go │ │ │ ├── gen_16.go │ │ │ ├── gen_15.go │ │ │ ├── decode_go14.go │ │ │ ├── decode_go.go │ │ │ ├── helper_unsafe.go │ │ │ ├── fast-path.not.go │ │ │ └── helper_not_unsafe.go │ │ │ └── LICENSE │ ├── mattn │ │ ├── go-isatty │ │ │ ├── doc.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_linux.go │ │ │ ├── isatty_solaris.go │ │ │ ├── isatty_appengine.go │ │ │ ├── isatty_bsd.go │ │ │ ├── LICENSE │ │ │ └── README.md │ │ └── go-sqlite3 │ │ │ ├── sqlite3_json1.go │ │ │ ├── sqlite3_other.go │ │ │ ├── sqlite3_fts5.go │ │ │ ├── sqlite3_icu.go │ │ │ ├── sqlite3_libsqlite3.go │ │ │ ├── sqlite3_windows.go │ │ │ ├── sqlite3_omit_load_extension.go │ │ │ ├── LICENSE │ │ │ ├── sqlite3_type.go │ │ │ └── sqlite3_load_extension.go │ ├── shogo82148 │ │ └── androidbinary │ │ │ ├── const_go17.go │ │ │ ├── const_fallback.go │ │ │ ├── LICENSE │ │ │ └── README.md │ ├── jinzhu │ │ ├── gorm │ │ │ ├── test_all.sh │ │ │ ├── model.go │ │ │ ├── interface.go │ │ │ ├── callback_row_query.go │ │ │ ├── License │ │ │ ├── field.go │ │ │ ├── wercker.yml │ │ │ ├── errors.go │ │ │ └── README.md │ │ └── inflection │ │ │ ├── LICENSE │ │ │ └── README.md │ ├── DHowett │ │ └── go-plist │ │ │ ├── zerocopy_appengine.go │ │ │ ├── fuzz.go │ │ │ ├── doc.go │ │ │ ├── zerocopy.go │ │ │ ├── README.md │ │ │ ├── util.go │ │ │ ├── bplist.go │ │ │ ├── must.go │ │ │ └── text_tables.go │ ├── json-iterator │ │ └── go │ │ │ ├── test.sh │ │ │ ├── feature_json_number.go │ │ │ ├── fuzzy_mode_convert_table.md │ │ │ ├── jsoniter.go │ │ │ ├── LICENSE │ │ │ ├── feature_any_nil.go │ │ │ ├── feature_pool.go │ │ │ ├── feature_iter_array.go │ │ │ ├── feature_any_int64.go │ │ │ ├── feature_any_int32.go │ │ │ ├── feature_any_uint64.go │ │ │ ├── feature_any_uint32.go │ │ │ ├── feature_any_float.go │ │ │ └── feature_any_invalid.go │ ├── phinexdaz │ │ └── ipapk │ │ │ └── README.md │ ├── gin-contrib │ │ ├── sse │ │ │ ├── writer.go │ │ │ ├── LICENSE │ │ │ └── README.md │ │ └── location │ │ │ ├── LICENSE │ │ │ ├── config.go │ │ │ └── location.go │ ├── boombuler │ │ └── barcode │ │ │ ├── utils │ │ │ ├── runeint.go │ │ │ ├── reedsolomon.go │ │ │ ├── base1dcode.go │ │ │ └── galoisfield.go │ │ │ ├── qr │ │ │ ├── automatic.go │ │ │ ├── errorcorrection.go │ │ │ ├── unicode.go │ │ │ ├── numeric.go │ │ │ ├── alphanumeric.go │ │ │ └── blocks.go │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ └── barcode.go │ ├── pkg │ │ └── errors │ │ │ ├── appveyor.yml │ │ │ └── LICENSE │ ├── andrianbdn │ │ └── iospng │ │ │ ├── README.md │ │ │ └── LICENSE │ ├── satori │ │ └── go.uuid │ │ │ ├── LICENSE │ │ │ └── README.md │ ├── zpatrick │ │ └── go-bytesize │ │ │ ├── LICENSE │ │ │ └── README.md │ └── golang │ │ └── protobuf │ │ ├── LICENSE │ │ └── proto │ │ └── Makefile ├── gopkg.in │ ├── go-playground │ │ └── validator.v8 │ │ │ ├── logo.png │ │ │ └── LICENSE │ └── yaml.v2 │ │ ├── LICENSE │ │ └── LICENSE.libyaml └── golang.org │ └── x │ ├── sys │ ├── unix │ │ ├── asm.s │ │ ├── constants.go │ │ ├── syscall_no_getwd.go │ │ ├── zsysnum_solaris_amd64.go │ │ ├── env_unset.go │ │ ├── flock_linux_32bit.go │ │ ├── asm_solaris_amd64.s │ │ ├── gccgo_linux_amd64.go │ │ ├── race0.go │ │ ├── env_unix.go │ │ ├── asm_linux_arm64.s │ │ ├── str.go │ │ ├── race.go │ │ ├── asm_linux_s390x.s │ │ ├── asm_linux_ppc64x.s │ │ ├── asm_linux_arm.s │ │ ├── asm_linux_mips64x.s │ │ ├── asm_freebsd_arm.s │ │ ├── asm_netbsd_arm.s │ │ ├── asm_darwin_386.s │ │ ├── asm_freebsd_386.s │ │ ├── asm_netbsd_386.s │ │ ├── asm_openbsd_386.s │ │ ├── asm_darwin_amd64.s │ │ ├── asm_freebsd_amd64.s │ │ ├── asm_linux_amd64.s │ │ ├── asm_netbsd_amd64.s │ │ ├── asm_openbsd_amd64.s │ │ ├── asm_dragonfly_amd64.s │ │ ├── asm_darwin_arm.s │ │ ├── bluetooth_linux.go │ │ ├── asm_darwin_arm64.s │ │ ├── flock.go │ │ ├── mksysnum_darwin.pl │ │ ├── asm_linux_386.s │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_openbsd_386.go │ │ ├── gccgo_c.c │ │ ├── sockcmsg_linux.go │ │ ├── mksysnum_dragonfly.pl │ │ ├── mksysnum_openbsd.pl │ │ ├── mksysnum_netbsd.pl │ │ ├── mksysnum_linux.pl │ │ ├── syscall_dragonfly_amd64.go │ │ ├── syscall_freebsd_amd64.go │ │ ├── syscall_freebsd_arm.go │ │ ├── syscall_freebsd_386.go │ │ ├── gccgo.go │ │ ├── mksysnum_freebsd.pl │ │ ├── mkpost.go │ │ └── syscall_darwin_arm.go │ ├── PATENTS │ └── LICENSE │ └── net │ ├── PATENTS │ └── LICENSE ├── s1.png ├── .gitignore ├── config.json ├── nginx └── ipapk.conf ├── Makefile ├── models ├── version.go ├── base.go └── plist.go ├── serializers └── bundle.go ├── public ├── static │ └── css │ │ ├── app.min.css │ │ └── app.css └── views │ ├── version.html │ ├── change.html │ └── build.html ├── templates └── template.go ├── conf └── config.go └── README.md /vendor/github.com/gin-gonic/gin/wercker.yml: -------------------------------------------------------------------------------- 1 | box: wercker/default -------------------------------------------------------------------------------- /s1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alsan/ipapk-server/HEAD/s1.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .ca 3 | .data 4 | .idea 5 | *.db 6 | release 7 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/prebuild.go: -------------------------------------------------------------------------------- 1 | package codec 2 | 3 | //go:generate bash prebuild.sh 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/gopkg.in/go-playground/validator.v8/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alsan/ipapk-server/HEAD/vendor/gopkg.in/go-playground/validator.v8/logo.png -------------------------------------------------------------------------------- /vendor/github.com/shogo82148/androidbinary/const_go17.go: -------------------------------------------------------------------------------- 1 | // +build go17 2 | 3 | package androidbinary 4 | 5 | import "io" 6 | 7 | const seekStart = io.SeekStart 8 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "host": "127.0.0.1", 3 | "port": "8080", 4 | "database": "username:password@tcp(127.0.0.1:3306)/ipapk?charset=utf8&parseTime=true&loc=Local" 5 | } -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | notify: 3 | gitter: 4 | default: 5 | url: https://webhooks.gitter.im/e/d90dcdeeab2f1e357165 6 | -------------------------------------------------------------------------------- /vendor/github.com/shogo82148/androidbinary/const_fallback.go: -------------------------------------------------------------------------------- 1 | // +build !go17 2 | 3 | package androidbinary 4 | 5 | import "os" 6 | 7 | const seekStart = os.SEEK_SET 8 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/test_all.sh: -------------------------------------------------------------------------------- 1 | dialects=("postgres" "mysql" "mssql" "sqlite") 2 | 3 | for dialect in "${dialects[@]}" ; do 4 | GORM_DIALECT=${dialect} go test 5 | done 6 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/zerocopy_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package plist 4 | 5 | func zeroCopy8BitString(buf []byte, off int, len int) string { 6 | return string(buf[off : off+len]) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package gin implements a HTTP web framework called gin. 3 | 4 | See https://gin-gonic.github.io/gin/ for more information about gin. 5 | */ 6 | package gin // import "github.com/gin-gonic/gin" 7 | -------------------------------------------------------------------------------- /nginx/ipapk.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name localhost; 4 | 5 | location /ipapk { 6 | rewrite /ipapk(.*) $1 break; 7 | proxy_pass http://127.0.0.1:8080; 8 | proxy_redirect off; 9 | } 10 | } -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/gen_17.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.7 5 | 6 | package codec 7 | 8 | func init() { 9 | genCheckVendor = true 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | TEXT ·use(SB),NOSPLIT,$0 10 | RET 11 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package plist 4 | 5 | import ( 6 | "bytes" 7 | ) 8 | 9 | func Fuzz(data []byte) int { 10 | buf := bytes.NewReader(data) 11 | 12 | var obj interface{} 13 | if err := NewDecoder(buf).Decode(&obj); err != nil { 14 | return 0 15 | } 16 | return 1 17 | } 18 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | BINARY := ipapk-server 2 | VERSION ?= v1.0.0 3 | PLATFORMS := windows linux darwin 4 | 5 | .PHONY: $(PLATFORMS) 6 | $(PLATFORMS): 7 | CGO_ENABLED=1 GO15VENDOREXPERIMENT=1 GOOS=$@ GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o $(BINARY)-$(VERSION)-$@-amd64 8 | 9 | .PHONY: release 10 | release: windows linux darwin -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/context_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 4 | // Use of this source code is governed by a MIT style 5 | // license that can be found in the LICENSE file. 6 | 7 | package gin 8 | 9 | func init() { 10 | defaultAppEngine = true 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -coverprofile=profile.out $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 7 | // terminal. This is also always false on this environment. 8 | func IsCygwinTerminal(fd uintptr) bool { 9 | return false 10 | } 11 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_json1.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build json1 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -DSQLITE_ENABLE_JSON1 11 | */ 12 | import "C" 13 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/gen_16.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.6 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | func init() { 11 | genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0" 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/gen_15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5,!go1.6 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | func init() { 11 | genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build !windows 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -I. 11 | #cgo linux LDFLAGS: -ldl 12 | */ 13 | import "C" 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_fts5.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build fts5 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -DSQLITE_ENABLE_FTS5 11 | #cgo LDFLAGS: -lm 12 | */ 13 | import "C" 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | const ( 10 | R_OK = 0x4 11 | W_OK = 0x2 12 | X_OK = 0x1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/feature_json_number.go: -------------------------------------------------------------------------------- 1 | package jsoniter 2 | 3 | import "encoding/json" 4 | 5 | type Number string 6 | 7 | func CastJsonNumber(val interface{}) (string, bool) { 8 | switch typedVal := val.(type) { 9 | case json.Number: 10 | return string(typedVal), true 11 | case Number: 12 | return string(typedVal), true 13 | } 14 | return "", false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_icu.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build icu 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo LDFLAGS: -licuuc -licui18n 11 | #cgo CFLAGS: -DSQLITE_ENABLE_ICU 12 | */ 13 | import "C" 14 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/doc.go: -------------------------------------------------------------------------------- 1 | // Package plist implements encoding and decoding of Apple's "property list" format. 2 | // Property lists come in three sorts: plain text (GNUStep and OpenStep), XML and binary. 3 | // plist supports all of them. 4 | // The mapping between property list and Go objects is described in the documentation for the Marshal and Unmarshal functions. 5 | package plist 6 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_no_getwd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /models/version.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | type VersionInfo []vInfo 4 | 5 | type vInfo struct { 6 | Version string 7 | Builds int 8 | } 9 | 10 | func (v VersionInfo) Len() int { 11 | return len(v) 12 | } 13 | 14 | func (v VersionInfo) Less(i, j int) bool { 15 | return v[i].Version > v[j].Version 16 | } 17 | 18 | func (v VersionInfo) Swap(i, j int) { 19 | v[i], v[j] = v[j], v[i] 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/phinexdaz/ipapk/README.md: -------------------------------------------------------------------------------- 1 | # ipapk 2 | ipa or apk parser written in golang, aims to extract app information 3 | 4 | ## INSTALL 5 | $ go get github.com/phinexdaz/ipapk 6 | 7 | ## USE 8 | ```go 9 | package main 10 | 11 | import ( 12 | "fmt" 13 | "github.com/phinexdaz/ipapk" 14 | ) 15 | 16 | func main() { 17 | apk, _ := ipapk.NewAppParser("test.apk") 18 | fmt.Println(apk) 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/zerocopy.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package plist 4 | 5 | import ( 6 | "reflect" 7 | "unsafe" 8 | ) 9 | 10 | func zeroCopy8BitString(buf []byte, off int, len int) string { 11 | if len == 0 { 12 | return "" 13 | } 14 | 15 | var s string 16 | hdr := (*reflect.StringHeader)(unsafe.Pointer(&s)) 17 | hdr.Data = uintptr(unsafe.Pointer(&buf[off])) 18 | hdr.Len = len 19 | return s 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/json/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Bo-Yi Wu. 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 | 5 | // +build !jsoniter 6 | 7 | package json 8 | 9 | import ( 10 | "encoding/json" 11 | ) 12 | 13 | var ( 14 | Marshal = json.Marshal 15 | MarshalIndent = json.MarshalIndent 16 | NewDecoder = json.NewDecoder 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/decode_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = false 11 | 12 | func reflectArrayOf(rvn reflect.Value) (rvn2 reflect.Value) { 13 | panic("reflect.ArrayOf unsupported") 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/model.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import "time" 4 | 5 | // Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embedded in your models 6 | // type User struct { 7 | // gorm.Model 8 | // } 9 | type Model struct { 10 | ID uint `gorm:"primary_key"` 11 | CreatedAt time.Time 12 | UpdatedAt time.Time 13 | DeletedAt *time.Time `sql:"index"` 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_libsqlite3.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build libsqlite3 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -DUSE_LIBSQLITE3 11 | #cgo linux LDFLAGS: -lsqlite3 12 | #cgo darwin LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3 13 | */ 14 | import "C" 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // +build linux,386 linux,arm 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | package unix 8 | 9 | func init() { 10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 12 | fcntl64Syscall = SYS_FCNTL64 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build windows 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -I. -fno-stack-check -fno-stack-protector -mno-stack-arg-probe 11 | #cgo windows,386 CFLAGS: -D_USE_32BIT_TIME_T 12 | #cgo LDFLAGS: -lmingwex -lmingw32 13 | */ 14 | import "C" 15 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/decode_go.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = true 11 | 12 | func reflectArrayOf(rvn reflect.Value) (rvn2 reflect.Value) { 13 | rvn2 = reflect.New(reflect.ArrayOf(rvn.Len(), intfTyp)).Elem() 14 | reflect.Copy(rvn2, rvn) 15 | return 16 | } 17 | -------------------------------------------------------------------------------- /models/base.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | _ "github.com/go-sql-driver/mysql" 6 | "github.com/jinzhu/gorm" 7 | "github.com/phinexdaz/ipapk-server/conf" 8 | ) 9 | 10 | var orm *gorm.DB 11 | 12 | func InitDB() error { 13 | var err error 14 | orm, err = gorm.Open("mysql", conf.AppConfig.Database) 15 | if err != nil { 16 | return err 17 | } 18 | if gin.Mode() != "release" { 19 | orm.LogMode(true) 20 | } 21 | orm.AutoMigrate(&Bundle{}) 22 | return nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/README.md: -------------------------------------------------------------------------------- 1 | # plist - A pure Go property list transcoder 2 | ## INSTALL 3 | $ go get howett.net/plist 4 | 5 | ## FEATURES 6 | * Supports encoding/decoding property lists (Apple XML, Apple Binary, OpenStep and GNUStep) from/to arbitrary Go types 7 | 8 | ## USE 9 | ```go 10 | package main 11 | import ( 12 | "howett.net/plist" 13 | "os" 14 | ) 15 | func main() { 16 | encoder := plist.NewEncoder(os.Stdout) 17 | encoder.Encode(map[string]string{"hello": "world"}) 18 | } 19 | ``` 20 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_linux.go: -------------------------------------------------------------------------------- 1 | // +build linux 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TCGETS 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/json/jsoniter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Bo-Yi Wu. 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 | 5 | // +build jsoniter 6 | 7 | package json 8 | 9 | import ( 10 | "github.com/json-iterator/go" 11 | ) 12 | 13 | var ( 14 | json = jsoniter.ConfigCompatibleWithStandardLibrary 15 | Marshal = json.Marshal 16 | MarshalIndent = json.MarshalIndent 17 | NewDecoder = json.NewDecoder 18 | ) 19 | -------------------------------------------------------------------------------- /serializers/bundle.go: -------------------------------------------------------------------------------- 1 | package serializers 2 | 3 | type BundleJSON struct { 4 | UUID string `json:"uuid"` 5 | Name string `json:"name"` 6 | Platform string `json:"platform"` 7 | BundleId string `json:"bundleId"` 8 | Version string `json:"version"` 9 | Build string `json:"build"` 10 | InstallUrl string `json:"install_url"` 11 | QRCodeUrl string `json:"qrcode_url"` 12 | IconUrl string `json:"icon_url"` 13 | Changelog string `json:"changelog"` 14 | Downloads uint64 `json:"downloads"` 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on on appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | 11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 12 | // terminal. This is also always false on this environment. 13 | func IsCygwinTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 11 | // 12 | 13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-64 14 | JMP syscall·sysvicall6(SB) 15 | 16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 17 | JMP syscall·rawSysvicall6(SB) 18 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/writer.go: -------------------------------------------------------------------------------- 1 | package sse 2 | 3 | import "io" 4 | 5 | type stringWriter interface { 6 | io.Writer 7 | WriteString(string) (int, error) 8 | } 9 | 10 | type stringWrapper struct { 11 | io.Writer 12 | } 13 | 14 | func (w stringWrapper) WriteString(str string) (int, error) { 15 | return w.Writer.Write([]byte(str)) 16 | } 17 | 18 | func checkWriter(writer io.Writer) stringWriter { 19 | if w, ok := writer.(stringWriter); ok { 20 | return w 21 | } else { 22 | return stringWrapper{writer} 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | 13 | // IsTerminal return true if the file descriptor is terminal. 14 | func IsTerminal(fd uintptr) bool { 15 | var termios syscall.Termios 16 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 17 | return err == 0 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/test_helpers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. 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 | 5 | package gin 6 | 7 | import ( 8 | "net/http" 9 | ) 10 | 11 | // CreateTestContext returns a fresh engine and context for testing purposes 12 | func CreateTestContext(w http.ResponseWriter) (c *Context, r *Engine) { 13 | r = New() 14 | c = r.allocateContext() 15 | c.reset() 16 | c.writermem.reset(w) 17 | return 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/util.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | import "io" 4 | 5 | type countedWriter struct { 6 | io.Writer 7 | nbytes int 8 | } 9 | 10 | func (w *countedWriter) Write(p []byte) (int, error) { 11 | n, err := w.Writer.Write(p) 12 | w.nbytes += n 13 | return n, err 14 | } 15 | 16 | func (w *countedWriter) BytesWritten() int { 17 | return w.nbytes 18 | } 19 | 20 | func unsignedGetBase(s string) (string, int) { 21 | if len(s) > 1 && s[0] == '0' && (s[1] == 'x' || s[1] == 'X') { 22 | return s[2:], 16 23 | } 24 | return s, 10 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo,linux,amd64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern gettimeofday 12 | func realGettimeofday(*Timeval, *byte) int32 13 | 14 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 15 | r := realGettimeofday(tv, nil) 16 | if r < 0 { 17 | return syscall.GetErrno() 18 | } 19 | return 0 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/utils/runeint.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | // RuneToInt converts a rune between '0' and '9' to an integer between 0 and 9 4 | // If the rune is outside of this range -1 is returned. 5 | func RuneToInt(r rune) int { 6 | if r >= '0' && r <= '9' { 7 | return int(r - '0') 8 | } 9 | return -1 10 | } 11 | 12 | // IntToRune converts a digit 0 - 9 to the rune '0' - '9'. If the given int is outside 13 | // of this range 'F' is returned! 14 | func IntToRune(i int) rune { 15 | if i >= 0 && i <= 9 { 16 | return rune(i + '0') 17 | } 18 | return 'F' 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/query.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. 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 | 5 | package binding 6 | 7 | import ( 8 | "net/http" 9 | ) 10 | 11 | type queryBinding struct{} 12 | 13 | func (queryBinding) Name() string { 14 | return "query" 15 | } 16 | 17 | func (queryBinding) Bind(req *http.Request, obj interface{}) error { 18 | values := req.URL.Query() 19 | if err := mapForm(obj, values); err != nil { 20 | return err 21 | } 22 | return validate(obj) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/interface.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import "database/sql" 4 | 5 | // SQLCommon is the minimal database connection functionality gorm requires. Implemented by *sql.DB. 6 | type SQLCommon interface { 7 | Exec(query string, args ...interface{}) (sql.Result, error) 8 | Prepare(query string) (*sql.Stmt, error) 9 | Query(query string, args ...interface{}) (*sql.Rows, error) 10 | QueryRow(query string, args ...interface{}) *sql.Row 11 | } 12 | 13 | type sqlDb interface { 14 | Begin() (*sql.Tx, error) 15 | } 16 | 17 | type sqlTx interface { 18 | Commit() error 19 | Rollback() error 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package binding 6 | 7 | import ( 8 | "encoding/xml" 9 | "net/http" 10 | ) 11 | 12 | type xmlBinding struct{} 13 | 14 | func (xmlBinding) Name() string { 15 | return "xml" 16 | } 17 | 18 | func (xmlBinding) Bind(req *http.Request, obj interface{}) error { 19 | decoder := xml.NewDecoder(req.Body) 20 | if err := decoder.Decode(obj); err != nil { 21 | return err 22 | } 23 | return validate(obj) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "unsafe" 11 | ) 12 | 13 | const raceenabled = false 14 | 15 | func raceAcquire(addr unsafe.Pointer) { 16 | } 17 | 18 | func raceReleaseMerge(addr unsafe.Pointer) { 19 | } 20 | 21 | func raceReadRange(addr unsafe.Pointer, len int) { 22 | } 23 | 24 | func raceWriteRange(addr unsafe.Pointer, len int) { 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/msgpack.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. 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 | 5 | package binding 6 | 7 | import ( 8 | "net/http" 9 | 10 | "github.com/ugorji/go/codec" 11 | ) 12 | 13 | type msgpackBinding struct{} 14 | 15 | func (msgpackBinding) Name() string { 16 | return "msgpack" 17 | } 18 | 19 | func (msgpackBinding) Bind(req *http.Request, obj interface{}) error { 20 | if err := codec.NewDecoder(req.Body, new(codec.MsgpackHandle)).Decode(&obj); err != nil { 21 | return err 22 | } 23 | return validate(obj) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/data.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import "net/http" 8 | 9 | type Data struct { 10 | ContentType string 11 | Data []byte 12 | } 13 | 14 | // Render (Data) writes data with custom ContentType. 15 | func (r Data) Render(w http.ResponseWriter) (err error) { 16 | r.WriteContentType(w) 17 | _, err = w.Write(r.Data) 18 | return 19 | } 20 | 21 | func (r Data) WriteContentType(w http.ResponseWriter) { 22 | writeContentType(w, []string{r.ContentType}) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import ( 8 | "encoding/xml" 9 | "net/http" 10 | ) 11 | 12 | type XML struct { 13 | Data interface{} 14 | } 15 | 16 | var xmlContentType = []string{"application/xml; charset=utf-8"} 17 | 18 | func (r XML) Render(w http.ResponseWriter) error { 19 | r.WriteContentType(w) 20 | return xml.NewEncoder(w).Encode(r.Data) 21 | } 22 | 23 | func (r XML) WriteContentType(w http.ResponseWriter) { 24 | writeContentType(w, xmlContentType) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | // Unix environment variables. 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | func Getenv(key string) (value string, found bool) { 14 | return syscall.Getenv(key) 15 | } 16 | 17 | func Setenv(key, value string) error { 18 | return syscall.Setenv(key, value) 19 | } 20 | 21 | func Clearenv() { 22 | syscall.Clearenv() 23 | } 24 | 25 | func Environ() []string { 26 | return syscall.Environ() 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | - With issues: 4 | - Use the search tool before opening a new issue. 5 | - Please provide source code and commit sha if you found a bug. 6 | - Review existing issues and provide feedback or react to them. 7 | 8 | - With pull requests: 9 | - Open your pull request against `master` 10 | - Your pull request should have no more than two commits, if not you should squash them. 11 | - It should pass all tests in the available continuous integrations systems such as TravisCI. 12 | - You should add/modify tests to cover your proposed code changes. 13 | - If your pull request contains a new feature, please document it on the README. 14 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/qr/automatic.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/boombuler/barcode/utils" 7 | ) 8 | 9 | func encodeAuto(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { 10 | bits, vi, _ := Numeric.getEncoder()(content, ecl) 11 | if bits != nil && vi != nil { 12 | return bits, vi, nil 13 | } 14 | bits, vi, _ = AlphaNumeric.getEncoder()(content, ecl) 15 | if bits != nil && vi != nil { 16 | return bits, vi, nil 17 | } 18 | bits, vi, _ = Unicode.getEncoder()(content, ecl) 19 | if bits != nil && vi != nil { 20 | return bits, vi, nil 21 | } 22 | return nil, nil, fmt.Errorf("No encoding found to encode \"%s\"", content) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build arm64 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // Just jump to package syscall's implementation for all these functions. 12 | // The runtime may know about them. 13 | 14 | TEXT ·Syscall(SB),NOSPLIT,$0-56 15 | B syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 18 | B syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_omit_load_extension.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2014 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build sqlite_omit_load_extension 6 | 7 | package sqlite3 8 | 9 | /* 10 | #cgo CFLAGS: -DSQLITE_OMIT_LOAD_EXTENSION 11 | */ 12 | import "C" 13 | import ( 14 | "errors" 15 | ) 16 | 17 | func (c *SQLiteConn) loadExtensions(extensions []string) error { 18 | return errors.New("Extensions have been disabled for static builds") 19 | } 20 | 21 | func (c *SQLiteConn) LoadExtension(lib string, entry string) error { 22 | return errors.New("Extensions have been disabled for static builds") 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + uitoa(uint(-val)) 12 | } 13 | return uitoa(uint(val)) 14 | } 15 | 16 | func uitoa(val uint) string { 17 | var buf [32]byte // big enough for int64 18 | i := len(buf) - 1 19 | for val >= 10 { 20 | buf[i] = byte(val%10 + '0') 21 | i-- 22 | val /= 10 23 | } 24 | buf[i] = byte(val + '0') 25 | return string(buf[i:]) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/redirect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import ( 8 | "fmt" 9 | "net/http" 10 | ) 11 | 12 | type Redirect struct { 13 | Code int 14 | Request *http.Request 15 | Location string 16 | } 17 | 18 | func (r Redirect) Render(w http.ResponseWriter) error { 19 | if (r.Code < 300 || r.Code > 308) && r.Code != 201 { 20 | panic(fmt.Sprintf("Cannot redirect with status code %d", r.Code)) 21 | } 22 | http.Redirect(w, r.Request, r.Location, r.Code) 23 | return nil 24 | } 25 | 26 | func (r Redirect) WriteContentType(http.ResponseWriter) {} 27 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/bplist.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | type bplistTrailer struct { 4 | Unused [5]uint8 5 | SortVersion uint8 6 | OffsetIntSize uint8 7 | ObjectRefSize uint8 8 | NumObjects uint64 9 | TopObject uint64 10 | OffsetTableOffset uint64 11 | } 12 | 13 | const ( 14 | bpTagNull uint8 = 0x00 15 | bpTagBoolFalse = 0x08 16 | bpTagBoolTrue = 0x09 17 | bpTagInteger = 0x10 18 | bpTagReal = 0x20 19 | bpTagDate = 0x30 20 | bpTagData = 0x40 21 | bpTagASCIIString = 0x50 22 | bpTagUTF16String = 0x60 23 | bpTagUID = 0x80 24 | bpTagArray = 0xA0 25 | bpTagDictionary = 0xD0 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin,race linux,race freebsd,race 6 | 7 | package unix 8 | 9 | import ( 10 | "runtime" 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = true 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | runtime.RaceAcquire(addr) 18 | } 19 | 20 | func raceReleaseMerge(addr unsafe.Pointer) { 21 | runtime.RaceReleaseMerge(addr) 22 | } 23 | 24 | func raceReadRange(addr unsafe.Pointer, len int) { 25 | runtime.RaceReadRange(addr, len) 26 | } 27 | 28 | func raceWriteRange(addr unsafe.Pointer, len int) { 29 | runtime.RaceWriteRange(addr, len) 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package binding 6 | 7 | import ( 8 | "net/http" 9 | 10 | "github.com/gin-gonic/gin/json" 11 | ) 12 | 13 | var ( 14 | EnableDecoderUseNumber = false 15 | ) 16 | 17 | type jsonBinding struct{} 18 | 19 | func (jsonBinding) Name() string { 20 | return "json" 21 | } 22 | 23 | func (jsonBinding) Bind(req *http.Request, obj interface{}) error { 24 | decoder := json.NewDecoder(req.Body) 25 | if EnableDecoderUseNumber { 26 | decoder.UseNumber() 27 | } 28 | if err := decoder.Decode(obj); err != nil { 29 | return err 30 | } 31 | return validate(obj) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_s390x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build s390x 6 | // +build linux 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for s390x, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/yaml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import ( 8 | "net/http" 9 | 10 | "gopkg.in/yaml.v2" 11 | ) 12 | 13 | type YAML struct { 14 | Data interface{} 15 | } 16 | 17 | var yamlContentType = []string{"application/x-yaml; charset=utf-8"} 18 | 19 | func (r YAML) Render(w http.ResponseWriter) error { 20 | r.WriteContentType(w) 21 | 22 | bytes, err := yaml.Marshal(r.Data) 23 | if err != nil { 24 | return err 25 | } 26 | 27 | w.Write(bytes) 28 | return nil 29 | } 30 | 31 | func (r YAML) WriteContentType(w http.ResponseWriter) { 32 | writeContentType(w, yamlContentType) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build ppc64 ppc64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for ppc64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | BR syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | BR syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for arm, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_mips64x.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux 6 | // +build mips64 mips64le 7 | // +build !gccgo 8 | 9 | #include "textflag.h" 10 | 11 | // 12 | // System calls for mips64, Linux 13 | // 14 | 15 | // Just jump to package syscall's implementation for all these functions. 16 | // The runtime may know about them. 17 | 18 | TEXT ·Syscall(SB),NOSPLIT,$0-56 19 | JMP syscall·Syscall(SB) 20 | 21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 22 | JMP syscall·Syscall6(SB) 23 | 24 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/qr/errorcorrection.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "github.com/boombuler/barcode/utils" 5 | ) 6 | 7 | type errorCorrection struct { 8 | rs *utils.ReedSolomonEncoder 9 | } 10 | 11 | var ec = newErrorCorrection() 12 | 13 | func newErrorCorrection() *errorCorrection { 14 | fld := utils.NewGaloisField(285, 256, 0) 15 | return &errorCorrection{utils.NewReedSolomonEncoder(fld)} 16 | } 17 | 18 | func (ec *errorCorrection) calcECC(data []byte, eccCount byte) []byte { 19 | dataInts := make([]int, len(data)) 20 | for i := 0; i < len(data); i++ { 21 | dataInts[i] = int(data[i]) 22 | } 23 | res := ec.rs.Encode(dataInts, int(eccCount)) 24 | result := make([]byte, len(res)) 25 | for i := 0; i < len(res); i++ { 26 | result[i] = byte(res[i]) 27 | } 28 | return result 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for ARM, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for 386, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, Darwin 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, FreeBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for AMD64, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, NetBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, OpenBSD 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/qr/unicode.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/boombuler/barcode/utils" 7 | ) 8 | 9 | func encodeUnicode(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { 10 | data := []byte(content) 11 | 12 | vi := findSmallestVersionInfo(ecl, byteMode, len(data)*8) 13 | if vi == nil { 14 | return nil, nil, errors.New("To much data to encode") 15 | } 16 | 17 | // It's not correct to add the unicode bytes to the result directly but most readers can't handle the 18 | // required ECI header... 19 | res := new(utils.BitList) 20 | res.AddBits(int(byteMode), 4) 21 | res.AddBits(len(content), vi.charCountBits(byteMode)) 22 | for _, b := range data { 23 | res.AddByte(b) 24 | } 25 | addPaddingAndTerminator(res, vi) 26 | return res, vi, nil 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System call support for AMD64, DragonFly 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for ARM, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-28 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/deprecated.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package gin 6 | 7 | import ( 8 | "log" 9 | 10 | "github.com/gin-gonic/gin/binding" 11 | ) 12 | 13 | // BindWith binds the passed struct pointer using the specified binding engine. 14 | // See the binding package. 15 | func (c *Context) BindWith(obj interface{}, b binding.Binding) error { 16 | log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to 17 | be deprecated, please check issue #662 and either use MustBindWith() if you 18 | want HTTP 400 to be automatically returned if any error occur, of use 19 | ShouldBindWith() if you need to manage the error.`) 20 | return c.MustBindWith(obj, b) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_darwin_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | // +build arm64,darwin 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for AMD64, Darwin 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | B syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | B syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | B syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | B syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | B syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /public/static/css/app.min.css: -------------------------------------------------------------------------------- 1 | .weui-media-box_appmsg .weui-media-box__hd{width:90px!important;height:90px!important;line-height:90px!important;margin-right:.5em!important}.weui-panel__hd{color:unset!important;font-size:14px}.weui-cell:before,.weui-media-box:before,.weui-panel__hd:after{left:0!important}.weui-media-box__hd img{border:1px solid #e5e5e5;border-radius:20px}.weui-media-box__desc{color:#777!important}.weui-media-box__info__meta__link{color:#586c94;font-size:13px}.weui-media-box__title{font-size:14px}.weui-btn{font-size:unset!important}.weui-btn_mini{font-size:12px!important;line-height:2.1!important}.page__bd_spacing{padding:15px}.weui-loadmore{margin:1.5em auto!important}.weui-cell__ft{height:25px}.weui-cell__hd img{width:20px;margin-right:5px;display:block;border:1px solid #e5e5e5;border-radius:5px}.qr-wrapper{margin:-30px auto 0}.qr{width:160px;height:160px;margin:0 auto} -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd openbsd netbsd dragonfly 2 | 3 | // Copyright 2014 The Go Authors. All rights reserved. 4 | // Use of this source code is governed by a BSD-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/callback_row_query.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import "database/sql" 4 | 5 | // Define callbacks for row query 6 | func init() { 7 | DefaultCallback.RowQuery().Register("gorm:row_query", rowQueryCallback) 8 | } 9 | 10 | type RowQueryResult struct { 11 | Row *sql.Row 12 | } 13 | 14 | type RowsQueryResult struct { 15 | Rows *sql.Rows 16 | Error error 17 | } 18 | 19 | // queryCallback used to query data from database 20 | func rowQueryCallback(scope *Scope) { 21 | if result, ok := scope.InstanceGet("row_query_result"); ok { 22 | scope.prepareQuerySQL() 23 | 24 | if rowResult, ok := result.(*RowQueryResult); ok { 25 | rowResult.Row = scope.SQLDB().QueryRow(scope.SQL, scope.SQLVars...) 26 | } else if rowsResult, ok := result.(*RowsQueryResult); ok { 27 | rowsResult.Rows, rowsResult.Error = scope.SQLDB().Query(scope.SQL, scope.SQLVars...) 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /templates/template.go: -------------------------------------------------------------------------------- 1 | package templates 2 | 3 | import ( 4 | "fmt" 5 | "html/template" 6 | "strings" 7 | "time" 8 | 9 | "github.com/zpatrick/go-bytesize" 10 | ) 11 | 12 | func formatTime(t time.Time) string { 13 | return t.Format("2006-01-02 15:04") 14 | } 15 | 16 | func formatBinary(size int64) string { 17 | b := bytesize.Bytesize(size) 18 | return fmt.Sprintf("%.1f MB", b.Megabytes()) 19 | } 20 | 21 | func formatLog(logs string) []string { 22 | out := strings.Split(logs, "\\n") 23 | return out 24 | } 25 | 26 | func previewLog(logs []string) []string { 27 | if len(logs) > 3 { 28 | return logs[0:3] 29 | } 30 | return logs 31 | } 32 | 33 | var TplFuncMap = template.FuncMap{ 34 | "formatTime": formatTime, 35 | "formatBinary": formatBinary, 36 | "safeURL": func(u string) template.URL { return template.URL(u) }, 37 | "formatLog": formatLog, 38 | "previewLog": previewLog, 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/msgpack.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import ( 8 | "net/http" 9 | 10 | "github.com/ugorji/go/codec" 11 | ) 12 | 13 | type MsgPack struct { 14 | Data interface{} 15 | } 16 | 17 | var msgpackContentType = []string{"application/msgpack; charset=utf-8"} 18 | 19 | func (r MsgPack) WriteContentType(w http.ResponseWriter) { 20 | writeContentType(w, msgpackContentType) 21 | } 22 | 23 | func (r MsgPack) Render(w http.ResponseWriter) error { 24 | return WriteMsgPack(w, r.Data) 25 | } 26 | 27 | func WriteMsgPack(w http.ResponseWriter, obj interface{}) error { 28 | writeContentType(w, msgpackContentType) 29 | var h codec.Handle = new(codec.MsgpackHandle) 30 | return codec.NewEncoder(w, h).Encode(obj) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print < 0 { 32 | fmt.Fprintf(w, format, data...) 33 | } else { 34 | io.WriteString(w, format) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_linux_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !gccgo 6 | 7 | #include "textflag.h" 8 | 9 | // 10 | // System calls for 386, Linux 11 | // 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·socketcall(SB),NOSPLIT,$0-36 29 | JMP syscall·socketcall(SB) 30 | 31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 32 | JMP syscall·rawsocketcall(SB) 33 | 34 | TEXT ·seek(SB),NOSPLIT,$0-28 35 | JMP syscall·seek(SB) 36 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md: -------------------------------------------------------------------------------- 1 | | json type \ dest type | bool | int | uint | float |string| 2 | | --- | --- | --- | --- |--|--| 3 | | number | positive => true
negative => true
zero => false| 23.2 => 23
-32.1 => -32| 12.1 => 12
-12.1 => 0|as normal|same as origin| 4 | | string | empty string => false
string "0" => false
other strings => true | "123.32" => 123
"-123.4" => -123
"123.23xxxw" => 123
"abcde12" => 0
"-32.1" => -32| 13.2 => 13
-1.1 => 0 |12.1 => 12.1
-12.3 => -12.3
12.4xxa => 12.4
+1.1e2 =>110 |same as origin| 5 | | bool | true => true
false => false| true => 1
false => 0 | true => 1
false => 0 |true => 1
false => 0|true => "true"
false => "false"| 6 | | object | true | 0 | 0 |0|originnal json| 7 | | array | empty array => false
nonempty array => true| [] => 0
[1,2] => 1 | [] => 0
[1,2] => 1 |[] => 0
[1,2] => 1|original json| -------------------------------------------------------------------------------- /conf/config.go: -------------------------------------------------------------------------------- 1 | package conf 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "github.com/phinexdaz/ipapk-server/utils" 7 | "io/ioutil" 8 | ) 9 | 10 | var AppConfig *Config 11 | 12 | type Config struct { 13 | Host string `json:"host"` 14 | Port string `json:"port"` 15 | Proxy string `json:"proxy"` 16 | Database string `json:"database"` 17 | } 18 | 19 | func InitConfig(filename string) error { 20 | data, err := ioutil.ReadFile(filename) 21 | if err != nil { 22 | return err 23 | } 24 | 25 | if err := json.Unmarshal(data, &AppConfig); err != nil { 26 | return err 27 | } 28 | return nil 29 | } 30 | 31 | func (c *Config) Addr() string { 32 | return fmt.Sprintf("%v:%v", c.Host, c.Port) 33 | } 34 | 35 | func (c *Config) ProxyURL() string { 36 | if c.Proxy == "" { 37 | localIp, err := utils.LocalIP() 38 | if err != nil { 39 | panic(err) 40 | } 41 | return fmt.Sprintf("https://%v:%v", localIp.String(), c.Port) 42 | } 43 | return c.Proxy 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/render.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import "net/http" 8 | 9 | type Render interface { 10 | Render(http.ResponseWriter) error 11 | WriteContentType(w http.ResponseWriter) 12 | } 13 | 14 | var ( 15 | _ Render = JSON{} 16 | _ Render = IndentedJSON{} 17 | _ Render = SecureJSON{} 18 | _ Render = XML{} 19 | _ Render = String{} 20 | _ Render = Redirect{} 21 | _ Render = Data{} 22 | _ Render = HTML{} 23 | _ HTMLRender = HTMLDebug{} 24 | _ HTMLRender = HTMLProduction{} 25 | _ Render = YAML{} 26 | _ Render = MsgPack{} 27 | ) 28 | 29 | func writeContentType(w http.ResponseWriter, value []string) { 30 | header := w.Header() 31 | if val := header["Content-Type"]; len(val) == 0 { 32 | header["Content-Type"] = value 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/jsoniter.go: -------------------------------------------------------------------------------- 1 | // Package jsoniter implements encoding and decoding of JSON as defined in 2 | // RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json. 3 | // Converting from encoding/json to jsoniter is no more than replacing the package with jsoniter 4 | // and variable type declarations (if any). 5 | // jsoniter interfaces gives 100% compatibility with code using standard lib. 6 | // 7 | // "JSON and Go" 8 | // (https://golang.org/doc/articles/json_and_go.html) 9 | // gives a description of how Marshal/Unmarshal operate 10 | // between arbitrary or predefined json objects and bytes, 11 | // and it applies to jsoniter.Marshal/Unmarshal as well. 12 | // 13 | // Besides, jsoniter.Iterator provides a different set of interfaces 14 | // iterating given bytes/string/reader 15 | // and yielding parsed elements one by one. 16 | // This set of interfaces reads input as required and gives 17 | // better performance. 18 | package jsoniter 19 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/must.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | import ( 4 | "io" 5 | "strconv" 6 | ) 7 | 8 | type mustWriter struct { 9 | io.Writer 10 | } 11 | 12 | func (w mustWriter) Write(p []byte) (int, error) { 13 | n, err := w.Writer.Write(p) 14 | if err != nil { 15 | panic(err) 16 | } 17 | return n, nil 18 | } 19 | 20 | func mustParseInt(str string, base, bits int) int64 { 21 | i, err := strconv.ParseInt(str, base, bits) 22 | if err != nil { 23 | panic(err) 24 | } 25 | return i 26 | } 27 | 28 | func mustParseUint(str string, base, bits int) uint64 { 29 | i, err := strconv.ParseUint(str, base, bits) 30 | if err != nil { 31 | panic(err) 32 | } 33 | return i 34 | } 35 | 36 | func mustParseFloat(str string, bits int) float64 { 37 | i, err := strconv.ParseFloat(str, bits) 38 | if err != nil { 39 | panic(err) 40 | } 41 | return i 42 | } 43 | 44 | func mustParseBool(str string) bool { 45 | i, err := strconv.ParseBool(str) 46 | if err != nil { 47 | panic(err) 48 | } 49 | return i 50 | } 51 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,solaris 6 | 7 | package unix 8 | 9 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 10 | 11 | func NsecToTimespec(nsec int64) (ts Timespec) { 12 | ts.Sec = nsec / 1e9 13 | ts.Nsec = nsec % 1e9 14 | return 15 | } 16 | 17 | func NsecToTimeval(nsec int64) (tv Timeval) { 18 | nsec += 999 // round up to microsecond 19 | tv.Usec = nsec % 1e9 / 1e3 20 | tv.Sec = int64(nsec / 1e9) 21 | return 22 | } 23 | 24 | func (iov *Iovec) SetLen(length int) { 25 | iov.Len = uint64(length) 26 | } 27 | 28 | func (cmsg *Cmsghdr) SetLen(length int) { 29 | cmsg.Len = uint32(length) 30 | } 31 | 32 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 33 | // TODO(aram): implement this, see issue 5847. 34 | panic("unimplemented") 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/andrianbdn/iospng/README.md: -------------------------------------------------------------------------------- 1 | # iOS PNG File Normalizer 2 | 3 | This package reverts optimizations that are done by Xcode for PNG files when packaging iOS apps: 4 | 5 | - Removes CgBI chunks 6 | - Fixes compressed IDAT chunks 7 | - removes alpha pre-multiply 8 | 9 | The package does similar things like ipin.py or xcrun -sdk iphoneos pngcrush -revert-iphone-optimizations 10 | 11 | ## Installation 12 | 13 | 14 | The import path for the package is *github.com/andrianbdn/iospng*. 15 | 16 | To install it, run: 17 | 18 | go get github.com/andrianbdn/iospng 19 | 20 | 21 | ## Usage 22 | 23 | #### func PngRevertOptimization 24 | 25 | 26 | ```go 27 | func PngRevertOptimization(reader io.Reader, writer io.Writer) error 28 | ``` 29 | 30 | This function actually does everything: reads PNG from reader and in case it is iOS-optimized, reverts optimization. 31 | Function does not change data if PNG does not have CgBI chunk. 32 | 33 | 34 | ## See also 35 | 36 | - [CgBI file format](http://iphonedevwiki.net/index.php/CgBI_file_format) 37 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) Yasuhiro MATSUMOTO 2 | 3 | MIT License (Expat) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = nsec / 1e9 15 | ts.Nsec = nsec % 1e9 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = nsec % 1e9 / 1e3 22 | tv.Sec = nsec / 1e9 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint64(fd) 28 | k.Filter = int16(mode) 29 | k.Flags = uint16(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint64(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /public/views/version.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 内测应用分发服务 7 | 8 | 9 | 10 | 11 |
12 |
13 |
历史版本
14 |
15 | {{ range .versions }} 16 | 17 |
18 |

{{ .Version }}

19 |
20 |
{{ .Builds }} 个构建
21 |
22 | {{end}} 23 |
24 | 27 |
28 |
29 | 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 json-iterator 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,netbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int64(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint64(fd) 28 | k.Filter = uint32(mode) 29 | k.Flags = uint32(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint64(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_openbsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,openbsd 6 | 7 | package unix 8 | 9 | func Getpagesize() int { return 4096 } 10 | 11 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 12 | 13 | func NsecToTimespec(nsec int64) (ts Timespec) { 14 | ts.Sec = int64(nsec / 1e9) 15 | ts.Nsec = int32(nsec % 1e9) 16 | return 17 | } 18 | 19 | func NsecToTimeval(nsec int64) (tv Timeval) { 20 | nsec += 999 // round up to microsecond 21 | tv.Usec = int32(nsec % 1e9 / 1e3) 22 | tv.Sec = int64(nsec / 1e9) 23 | return 24 | } 25 | 26 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 27 | k.Ident = uint32(fd) 28 | k.Filter = int16(mode) 29 | k.Flags = uint16(flags) 30 | } 31 | 32 | func (iov *Iovec) SetLen(length int) { 33 | iov.Len = uint32(length) 34 | } 35 | 36 | func (msghdr *Msghdr) SetControllen(length int) { 37 | msghdr.Controllen = uint32(length) 38 | } 39 | 40 | func (cmsg *Cmsghdr) SetLen(length int) { 41 | cmsg.Len = uint32(length) 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/location/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Brad Rydzewski 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/satori/go.uuid/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2013-2016 by Maxim Bublis 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/inflection/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 - Jinzhu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/zpatrick/go-bytesize/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2017, Zack Patrick 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/andrianbdn/iospng/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | The MIT License (MIT) 3 | 4 | Copyright (c) 2017 Andrian Budantsov 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Yasuhiro Matsumoto 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Florian Sundermann 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/README.md: -------------------------------------------------------------------------------- 1 | ## Introduction ## 2 | This is a package for GO which can be used to create different types of barcodes. 3 | 4 | ## Supported Barcode Types ## 5 | * 2 of 5 6 | * Aztec Code 7 | * Codabar 8 | * Code 128 9 | * Code 39 10 | * Code 93 11 | * Datamatrix 12 | * EAN 13 13 | * EAN 8 14 | * PDF 417 15 | * QR Code 16 | 17 | ## Example ## 18 | 19 | This is a simple example on how to create a QR-Code and write it to a png-file 20 | ```go 21 | package main 22 | 23 | import ( 24 | "image/png" 25 | "os" 26 | 27 | "github.com/boombuler/barcode" 28 | "github.com/boombuler/barcode/qr" 29 | ) 30 | 31 | func main() { 32 | // Create the barcode 33 | qrCode, _ := qr.Encode("Hello World", qr.M, qr.Auto) 34 | 35 | // Scale the barcode to 200x200 pixels 36 | qrCode, _ = barcode.Scale(qrCode, 200, 200) 37 | 38 | // create the output file 39 | file, _ := os.Create("qrcode.png") 40 | defer file.Close() 41 | 42 | // encode the barcode as png 43 | png.Encode(file, qrCode) 44 | } 45 | ``` 46 | 47 | ## Documentation ## 48 | See [GoDoc](https://godoc.org/github.com/boombuler/barcode) 49 | 50 | To create a barcode use the Encode function from one of the subpackages. 51 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Manuel Martínez-Almeida 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Manuel Martínez-Almeida 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/default_validator.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. 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 | 5 | package binding 6 | 7 | import ( 8 | "reflect" 9 | "sync" 10 | 11 | "gopkg.in/go-playground/validator.v8" 12 | ) 13 | 14 | type defaultValidator struct { 15 | once sync.Once 16 | validate *validator.Validate 17 | } 18 | 19 | var _ StructValidator = &defaultValidator{} 20 | 21 | func (v *defaultValidator) ValidateStruct(obj interface{}) error { 22 | if kindOfData(obj) == reflect.Struct { 23 | v.lazyinit() 24 | if err := v.validate.Struct(obj); err != nil { 25 | return error(err) 26 | } 27 | } 28 | return nil 29 | } 30 | 31 | func (v *defaultValidator) lazyinit() { 32 | v.once.Do(func() { 33 | config := &validator.Config{TagName: "binding"} 34 | v.validate = validator.New(config) 35 | }) 36 | } 37 | 38 | func kindOfData(data interface{}) reflect.Kind { 39 | value := reflect.ValueOf(data) 40 | valueType := value.Kind() 41 | if valueType == reflect.Ptr { 42 | valueType = value.Elem().Kind() 43 | } 44 | return valueType 45 | } 46 | -------------------------------------------------------------------------------- /vendor/github.com/shogo82148/androidbinary/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Ichinose Shogo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/gopkg.in/go-playground/validator.v8/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Dean Karn 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/License: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-NOW Jinzhu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2015 Ugorji Nwoke. 4 | All rights reserved. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_c.c: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | #define _STRINGIFY2_(x) #x 12 | #define _STRINGIFY_(x) _STRINGIFY2_(x) 13 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) 14 | 15 | // Call syscall from C code because the gccgo support for calling from 16 | // Go to C does not support varargs functions. 17 | 18 | struct ret { 19 | uintptr_t r; 20 | uintptr_t err; 21 | }; 22 | 23 | struct ret 24 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) 25 | { 26 | struct ret r; 27 | 28 | errno = 0; 29 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); 30 | r.err = errno; 31 | return r; 32 | } 33 | 34 | // Define the use function in C so that it is not inlined. 35 | 36 | extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); 37 | 38 | void 39 | use(void *p __attribute__ ((unused))) 40 | { 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/DHowett/go-plist/text_tables.go: -------------------------------------------------------------------------------- 1 | package plist 2 | 3 | type characterSet [4]uint64 4 | 5 | func (s *characterSet) Contains(ch rune) bool { 6 | return ch >= 0 && ch <= 255 && s.ContainsByte(byte(ch)) 7 | } 8 | 9 | func (s *characterSet) ContainsByte(ch byte) bool { 10 | return (s[ch/64]&(1<<(ch%64)) > 0) 11 | } 12 | 13 | // Bitmap of characters that must be inside a quoted string 14 | // when written to an old-style property list 15 | // Low bits represent lower characters, and each uint64 represents 64 characters. 16 | var gsQuotable = characterSet{ 17 | 0x78001385ffffffff, 18 | 0xa800000138000000, 19 | 0xffffffffffffffff, 20 | 0xffffffffffffffff, 21 | } 22 | 23 | // 7f instead of 3f in the top line: CFOldStylePlist.c says . is valid, but they quote it. 24 | var osQuotable = characterSet{ 25 | 0xf4007f6fffffffff, 26 | 0xf8000001f8000001, 27 | 0xffffffffffffffff, 28 | 0xffffffffffffffff, 29 | } 30 | 31 | var whitespace = characterSet{ 32 | 0x0000000100003f00, 33 | 0x0000000000000000, 34 | 0x0000000000000000, 35 | 0x0000000000000000, 36 | } 37 | 38 | var newlineCharacterSet = characterSet{ 39 | 0x0000000000002400, 40 | 0x0000000000000000, 41 | 0x0000000000000000, 42 | 0x0000000000000000, 43 | } 44 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/barcode.go: -------------------------------------------------------------------------------- 1 | package barcode 2 | 3 | import "image" 4 | 5 | const ( 6 | TypeAztec = "Aztec" 7 | TypeCodabar = "Codabar" 8 | TypeCode128 = "Code 128" 9 | TypeCode39 = "Code 39" 10 | TypeCode93 = "Code 93" 11 | TypeDataMatrix = "DataMatrix" 12 | TypeEAN8 = "EAN 8" 13 | TypeEAN13 = "EAN 13" 14 | TypePDF = "PDF417" 15 | TypeQR = "QR Code" 16 | Type2of5 = "2 of 5" 17 | Type2of5Interleaved = "2 of 5 (interleaved)" 18 | ) 19 | 20 | // Contains some meta information about a barcode 21 | type Metadata struct { 22 | // the name of the barcode kind 23 | CodeKind string 24 | // contains 1 for 1D barcodes or 2 for 2D barcodes 25 | Dimensions byte 26 | } 27 | 28 | // a rendered and encoded barcode 29 | type Barcode interface { 30 | image.Image 31 | // returns some meta information about the barcode 32 | Metadata() Metadata 33 | // the data that was encoded in this barcode 34 | Content() string 35 | } 36 | 37 | // Additional interface that some barcodes might implement to provide 38 | // the value of its checksum. 39 | type BarcodeIntCS interface { 40 | Barcode 41 | CheckSum() int 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/helper_unsafe.go: -------------------------------------------------------------------------------- 1 | // +build unsafe 2 | 3 | // Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. 4 | // Use of this source code is governed by a MIT license found in the LICENSE file. 5 | 6 | package codec 7 | 8 | import ( 9 | "runtime" 10 | "unsafe" 11 | ) 12 | 13 | // This file has unsafe variants of some helper methods. 14 | // NOTE: See helper_not_unsafe.go for the usage information. 15 | 16 | type unsafeString struct { 17 | Data uintptr 18 | Len int 19 | } 20 | 21 | type unsafeSlice struct { 22 | Data uintptr 23 | Len int 24 | Cap int 25 | } 26 | 27 | func stringView(v []byte) string { 28 | if len(v) == 0 { 29 | return "" 30 | } 31 | 32 | bx := (*unsafeSlice)(unsafe.Pointer(&v)) 33 | sx := unsafeString{bx.Data, bx.Len} 34 | return *(*string)(unsafe.Pointer(&sx)) 35 | } 36 | 37 | func bytesView(v string) []byte { 38 | if len(v) == 0 { 39 | return zeroByteSlice 40 | } 41 | 42 | sx := (*unsafeString)(unsafe.Pointer(&v)) 43 | bx := unsafeSlice{sx.Data, sx.Len, sx.Len} 44 | return *(*[]byte)(unsafe.Pointer(&bx)) 45 | } 46 | 47 | func keepAlive4BytesView(v string) { 48 | runtime.KeepAlive(v) 49 | } 50 | 51 | func keepAlive4StringView(v []byte) { 52 | runtime.KeepAlive(v) 53 | } 54 | -------------------------------------------------------------------------------- /public/views/change.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 内测应用分发服务 7 | 8 | 9 | 10 | 12 | 13 | 14 |
15 |
16 |
17 |
更新日志
18 |
19 |
20 | {{ range .changelog | formatLog }} 21 |

{{ . }}

22 | {{ end }} 23 |
24 |
25 |
26 | 29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Socket control messages 6 | 7 | package unix 8 | 9 | import "unsafe" 10 | 11 | // UnixCredentials encodes credentials into a socket control message 12 | // for sending to another process. This can be used for 13 | // authentication. 14 | func UnixCredentials(ucred *Ucred) []byte { 15 | b := make([]byte, CmsgSpace(SizeofUcred)) 16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0])) 17 | h.Level = SOL_SOCKET 18 | h.Type = SCM_CREDENTIALS 19 | h.SetLen(CmsgLen(SizeofUcred)) 20 | *((*Ucred)(cmsgData(h))) = *ucred 21 | return b 22 | } 23 | 24 | // ParseUnixCredentials decodes a socket control message that contains 25 | // credentials in a Ucred structure. To receive such a message, the 26 | // SO_PASSCRED option must be enabled on the socket. 27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) { 28 | if m.Header.Level != SOL_SOCKET { 29 | return nil, EINVAL 30 | } 31 | if m.Header.Type != SCM_CREDENTIALS { 32 | return nil, EINVAL 33 | } 34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0])) 35 | return &ucred, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/fast-path.not.go: -------------------------------------------------------------------------------- 1 | // +build notfastpath 2 | 3 | package codec 4 | 5 | import "reflect" 6 | 7 | const fastpathEnabled = false 8 | 9 | // The generated fast-path code is very large, and adds a few seconds to the build time. 10 | // This causes test execution, execution of small tools which use codec, etc 11 | // to take a long time. 12 | // 13 | // To mitigate, we now support the notfastpath tag. 14 | // This tag disables fastpath during build, allowing for faster build, test execution, 15 | // short-program runs, etc. 16 | 17 | func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false } 18 | func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false } 19 | func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false } 20 | func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false } 21 | 22 | type fastpathT struct{} 23 | type fastpathE struct { 24 | rtid uintptr 25 | rt reflect.Type 26 | encfn func(*encFnInfo, reflect.Value) 27 | decfn func(*decFnInfo, reflect.Value) 28 | } 29 | type fastpathA [0]fastpathE 30 | 31 | func (x fastpathA) index(rtid uintptr) int { return -1 } 32 | 33 | var fastpathAV fastpathA 34 | var fastpathTV fastpathT 35 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/feature_any_nil.go: -------------------------------------------------------------------------------- 1 | package jsoniter 2 | 3 | type nilAny struct { 4 | baseAny 5 | } 6 | 7 | func (any *nilAny) LastError() error { 8 | return nil 9 | } 10 | 11 | func (any *nilAny) ValueType() ValueType { 12 | return NilValue 13 | } 14 | 15 | func (any *nilAny) MustBeValid() Any { 16 | return any 17 | } 18 | 19 | func (any *nilAny) ToBool() bool { 20 | return false 21 | } 22 | 23 | func (any *nilAny) ToInt() int { 24 | return 0 25 | } 26 | 27 | func (any *nilAny) ToInt32() int32 { 28 | return 0 29 | } 30 | 31 | func (any *nilAny) ToInt64() int64 { 32 | return 0 33 | } 34 | 35 | func (any *nilAny) ToUint() uint { 36 | return 0 37 | } 38 | 39 | func (any *nilAny) ToUint32() uint32 { 40 | return 0 41 | } 42 | 43 | func (any *nilAny) ToUint64() uint64 { 44 | return 0 45 | } 46 | 47 | func (any *nilAny) ToFloat32() float32 { 48 | return 0 49 | } 50 | 51 | func (any *nilAny) ToFloat64() float64 { 52 | return 0 53 | } 54 | 55 | func (any *nilAny) ToString() string { 56 | return "" 57 | } 58 | 59 | func (any *nilAny) WriteTo(stream *Stream) { 60 | stream.WriteNil() 61 | } 62 | 63 | func (any *nilAny) Parse() *Iterator { 64 | return nil 65 | } 66 | 67 | func (any *nilAny) GetInterface() interface{} { 68 | return nil 69 | } 70 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_dragonfly.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for DragonFly from master list 7 | # (for example, /usr/src/sys/kern/syscalls.master). 8 | 9 | use strict; 10 | 11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 12 | print STDERR "GOARCH or GOOS not defined in environment\n"; 13 | exit 1; 14 | } 15 | 16 | my $command = "mksysnum_dragonfly.pl " . join(' ', @ARGV); 17 | 18 | print <){ 30 | if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $2; 33 | my $name = "SYS_$3"; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <){ 30 | if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $3; 33 | my $name = $4; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | 44 | print " $name = $num; // $proto\n"; 45 | } 46 | } 47 | 48 | print <= len(rs.polynomes) { 24 | last := rs.polynomes[len(rs.polynomes)-1] 25 | for d := len(rs.polynomes); d <= degree; d++ { 26 | next := last.Multiply(NewGFPoly(rs.gf, []int{1, rs.gf.ALogTbl[d-1+rs.gf.Base]})) 27 | rs.polynomes = append(rs.polynomes, next) 28 | last = next 29 | } 30 | } 31 | return rs.polynomes[degree] 32 | } 33 | 34 | func (rs *ReedSolomonEncoder) Encode(data []int, eccCount int) []int { 35 | generator := rs.getPolynomial(eccCount) 36 | info := NewGFPoly(rs.gf, data) 37 | info = info.MultByMonominal(eccCount, 1) 38 | _, remainder := info.Divide(generator) 39 | 40 | result := make([]int, eccCount) 41 | numZero := int(eccCount) - len(remainder.Coefficients) 42 | copy(result[numZero:], remainder.Coefficients) 43 | return result 44 | } 45 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/README.md: -------------------------------------------------------------------------------- 1 | # go-isatty 2 | 3 | [![Godoc Reference](https://godoc.org/github.com/mattn/go-isatty?status.svg)](http://godoc.org/github.com/mattn/go-isatty) 4 | [![Build Status](https://travis-ci.org/mattn/go-isatty.svg?branch=master)](https://travis-ci.org/mattn/go-isatty) 5 | [![Coverage Status](https://coveralls.io/repos/github/mattn/go-isatty/badge.svg?branch=master)](https://coveralls.io/github/mattn/go-isatty?branch=master) 6 | [![Go Report Card](https://goreportcard.com/badge/mattn/go-isatty)](https://goreportcard.com/report/mattn/go-isatty) 7 | 8 | isatty for golang 9 | 10 | ## Usage 11 | 12 | ```go 13 | package main 14 | 15 | import ( 16 | "fmt" 17 | "github.com/mattn/go-isatty" 18 | "os" 19 | ) 20 | 21 | func main() { 22 | if isatty.IsTerminal(os.Stdout.Fd()) { 23 | fmt.Println("Is Terminal") 24 | } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) { 25 | fmt.Println("Is Cygwin/MSYS2 Terminal") 26 | } else { 27 | fmt.Println("Is Not Terminal") 28 | } 29 | } 30 | ``` 31 | 32 | ## Installation 33 | 34 | ``` 35 | $ go get github.com/mattn/go-isatty 36 | ``` 37 | 38 | ## License 39 | 40 | MIT 41 | 42 | ## Author 43 | 44 | Yasuhiro Matsumoto (a.k.a mattn) 45 | 46 | ## Thanks 47 | 48 | * k-takata: base idea for IsCygwinTerminal 49 | 50 | https://github.com/k-takata/go-iscygpty 51 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/fs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. 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 | 5 | package gin 6 | 7 | import ( 8 | "net/http" 9 | "os" 10 | ) 11 | 12 | type onlyfilesFS struct { 13 | fs http.FileSystem 14 | } 15 | 16 | type neuteredReaddirFile struct { 17 | http.File 18 | } 19 | 20 | // Dir returns a http.Filesystem that can be used by http.FileServer(). It is used internally 21 | // in router.Static(). 22 | // if listDirectory == true, then it works the same as http.Dir() otherwise it returns 23 | // a filesystem that prevents http.FileServer() to list the directory files. 24 | func Dir(root string, listDirectory bool) http.FileSystem { 25 | fs := http.Dir(root) 26 | if listDirectory { 27 | return fs 28 | } 29 | return &onlyfilesFS{fs} 30 | } 31 | 32 | // Open conforms to http.Filesystem. 33 | func (fs onlyfilesFS) Open(name string) (http.File, error) { 34 | f, err := fs.fs.Open(name) 35 | if err != nil { 36 | return nil, err 37 | } 38 | return neuteredReaddirFile{f}, nil 39 | } 40 | 41 | // Readdir overrides the http.File default implementation. 42 | func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) { 43 | // this disables directory listing 44 | return nil, nil 45 | } 46 | -------------------------------------------------------------------------------- /public/static/css/app.css: -------------------------------------------------------------------------------- 1 | .weui-media-box_appmsg .weui-media-box__hd { 2 | width: 90px !important; 3 | height: 90px !important; 4 | line-height: 90px !important; 5 | margin-right: .5em !important; 6 | } 7 | .weui-panel__hd { 8 | color: unset !important; 9 | font-size: 14px; 10 | } 11 | .weui-panel__hd:after, .weui-media-box:before, .weui-cell:before { 12 | left: 0 !important; 13 | } 14 | .weui-media-box__hd img { 15 | border: 1px solid #e5e5e5; 16 | border-radius: 20px; 17 | } 18 | .weui-media-box__desc { 19 | color: #777 !important; 20 | } 21 | .weui-media-box__info__meta__link { 22 | color: #586c94; 23 | font-size: 13px; 24 | } 25 | .weui-media-box__title { 26 | font-size: 14px; 27 | } 28 | .weui-btn { 29 | font-size: unset !important; 30 | } 31 | .weui-btn_mini { 32 | font-size: 12px !important; 33 | line-height: 2.1 !important; 34 | } 35 | .page__bd_spacing { 36 | padding: 15px; 37 | } 38 | .weui-loadmore { 39 | margin: 1.5em auto !important; 40 | } 41 | .weui-cell__ft { 42 | height: 25px; 43 | } 44 | .weui-cell__hd img { 45 | width:20px; 46 | margin-right:5px; 47 | display:block; 48 | border: 1px solid #e5e5e5; 49 | border-radius:5px 50 | } 51 | .qr-wrapper { 52 | margin: -30px auto 0; 53 | } 54 | .qr { 55 | width: 160px; 56 | height: 160px; 57 | margin: 0 auto; 58 | } -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/feature_pool.go: -------------------------------------------------------------------------------- 1 | package jsoniter 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // IteratorPool a thread safe pool of iterators with same configuration 8 | type IteratorPool interface { 9 | BorrowIterator(data []byte) *Iterator 10 | ReturnIterator(iter *Iterator) 11 | } 12 | 13 | // StreamPool a thread safe pool of streams with same configuration 14 | type StreamPool interface { 15 | BorrowStream(writer io.Writer) *Stream 16 | ReturnStream(stream *Stream) 17 | } 18 | 19 | func (cfg *frozenConfig) BorrowStream(writer io.Writer) *Stream { 20 | select { 21 | case stream := <-cfg.streamPool: 22 | stream.Reset(writer) 23 | return stream 24 | default: 25 | return NewStream(cfg, writer, 512) 26 | } 27 | } 28 | 29 | func (cfg *frozenConfig) ReturnStream(stream *Stream) { 30 | stream.Error = nil 31 | select { 32 | case cfg.streamPool <- stream: 33 | return 34 | default: 35 | return 36 | } 37 | } 38 | 39 | func (cfg *frozenConfig) BorrowIterator(data []byte) *Iterator { 40 | select { 41 | case iter := <-cfg.iteratorPool: 42 | iter.ResetBytes(data) 43 | return iter 44 | default: 45 | return ParseBytes(cfg, data) 46 | } 47 | } 48 | 49 | func (cfg *frozenConfig) ReturnIterator(iter *Iterator) { 50 | iter.Error = nil 51 | select { 52 | case cfg.iteratorPool <- iter: 53 | return 54 | default: 55 | return 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /vendor/golang.org/x/net/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/PATENTS: -------------------------------------------------------------------------------- 1 | Additional IP Rights Grant (Patents) 2 | 3 | "This implementation" means the copyrightable works distributed by 4 | Google as part of the Go project. 5 | 6 | Google hereby grants to You a perpetual, worldwide, non-exclusive, 7 | no-charge, royalty-free, irrevocable (except as stated in this section) 8 | patent license to make, have made, use, offer to sell, sell, import, 9 | transfer and otherwise run, modify and propagate the contents of this 10 | implementation of Go, where such license applies only to those patent 11 | claims, both currently owned or controlled by Google and acquired in 12 | the future, licensable by Google that are necessarily infringed by this 13 | implementation of Go. This grant does not include claims that would be 14 | infringed only as a consequence of further modification of this 15 | implementation. If you or your agent or exclusive licensee institute or 16 | order or agree to the institution of patent litigation against any 17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging 18 | that this implementation of Go or any code incorporated within this 19 | implementation of Go constitutes direct or contributory patent 20 | infringement, or inducement of patent infringement, then any patent 21 | rights granted to you under this License for this implementation of Go 22 | shall terminate as of the date such litigation is filed. 23 | -------------------------------------------------------------------------------- /public/views/build.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 内测应用分发服务 7 | 8 | 9 | 10 | 11 | 12 |
13 |
14 |
历史版本
15 |
16 | {{ range .builds }} 17 |
18 |
19 | 20 |
21 |
22 |

{{ .Version }} ({{ .Build }})

23 |
24 |
25 | 安装 26 |
27 |
28 | {{ end }} 29 |
30 | 33 |
34 |
35 | 36 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/qr/numeric.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "strconv" 7 | 8 | "github.com/boombuler/barcode/utils" 9 | ) 10 | 11 | func encodeNumeric(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { 12 | contentBitCount := (len(content) / 3) * 10 13 | switch len(content) % 3 { 14 | case 1: 15 | contentBitCount += 4 16 | case 2: 17 | contentBitCount += 7 18 | } 19 | vi := findSmallestVersionInfo(ecl, numericMode, contentBitCount) 20 | if vi == nil { 21 | return nil, nil, errors.New("To much data to encode") 22 | } 23 | res := new(utils.BitList) 24 | res.AddBits(int(numericMode), 4) 25 | res.AddBits(len(content), vi.charCountBits(numericMode)) 26 | 27 | for pos := 0; pos < len(content); pos += 3 { 28 | var curStr string 29 | if pos+3 <= len(content) { 30 | curStr = content[pos : pos+3] 31 | } else { 32 | curStr = content[pos:] 33 | } 34 | 35 | i, err := strconv.Atoi(curStr) 36 | if err != nil || i < 0 { 37 | return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, Numeric) 38 | } 39 | var bitCnt byte 40 | switch len(curStr) % 3 { 41 | case 0: 42 | bitCnt = 10 43 | case 1: 44 | bitCnt = 4 45 | break 46 | case 2: 47 | bitCnt = 7 48 | break 49 | } 50 | 51 | res.AddBits(i, bitCnt) 52 | } 53 | 54 | addPaddingAndTerminator(res, vi) 55 | return res, vi, nil 56 | } 57 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015, Dave Cheney 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/LICENSE.libyaml: -------------------------------------------------------------------------------- 1 | The following files were ported to Go from C files of libyaml, and thus 2 | are still covered by their original copyright and license: 3 | 4 | apic.go 5 | emitterc.go 6 | parserc.go 7 | readerc.go 8 | scannerc.go 9 | writerc.go 10 | yamlh.go 11 | yamlprivateh.go 12 | 13 | Copyright (c) 2006 Kirill Simonov 14 | 15 | Permission is hereby granted, free of charge, to any person obtaining a copy of 16 | this software and associated documentation files (the "Software"), to deal in 17 | the Software without restriction, including without limitation the rights to 18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 19 | of the Software, and to permit persons to whom the Software is furnished to do 20 | so, subject to the following conditions: 21 | 22 | The above copyright notice and this permission notice shall be included in all 23 | copies or substantial portions of the Software. 24 | 25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 31 | SOFTWARE. 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_netbsd.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for OpenBSD from master list 7 | # (for example, /usr/src/sys/kern/syscalls.master). 8 | 9 | use strict; 10 | 11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 12 | print STDERR "GOARCH or GOOS not defined in environment\n"; 13 | exit 1; 14 | } 15 | 16 | my $command = "mksysnum_netbsd.pl " . join(' ', @ARGV); 17 | 18 | print <){ 31 | if($line =~ /^(.*)\\$/) { 32 | # Handle continuation 33 | $line = $1; 34 | $_ =~ s/^\s+//; 35 | $line .= $_; 36 | } else { 37 | # New line 38 | $line = $_; 39 | } 40 | next if $line =~ /\\$/; 41 | if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) { 42 | my $num = $1; 43 | my $proto = $6; 44 | my $compat = $8; 45 | my $name = "$7_$9"; 46 | 47 | $name = "$7_$11" if $11 ne ''; 48 | $name =~ y/a-z/A-Z/; 49 | 50 | if($compat eq '' || $compat eq '30' || $compat eq '50') { 51 | print " $name = $num; // $proto\n"; 52 | } 53 | } 54 | } 55 | 56 | print < 999){ 29 | # ignore deprecated syscalls that are no longer implemented 30 | # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716 31 | return; 32 | } 33 | $name =~ y/a-z/A-Z/; 34 | print " SYS_$name = $num;\n"; 35 | } 36 | 37 | my $prev; 38 | open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc"; 39 | while(){ 40 | if(/^#define __NR_syscalls\s+/) { 41 | # ignore redefinitions of __NR_syscalls 42 | } 43 | elsif(/^#define __NR_(\w+)\s+([0-9]+)/){ 44 | $prev = $2; 45 | fmt($1, $2); 46 | } 47 | elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){ 48 | $prev = $2; 49 | fmt($1, $2); 50 | } 51 | elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){ 52 | fmt($1, $prev+$2) 53 | } 54 | } 55 | 56 | print <= fieldSize { 25 | x = (x ^ pp) & (fieldSize - 1) 26 | } 27 | } 28 | 29 | for i := 0; i < fieldSize; i++ { 30 | result.LogTbl[result.ALogTbl[i]] = int(i) 31 | } 32 | 33 | return result 34 | } 35 | 36 | func (gf *GaloisField) Zero() *GFPoly { 37 | return NewGFPoly(gf, []int{0}) 38 | } 39 | 40 | // AddOrSub add or substract two numbers 41 | func (gf *GaloisField) AddOrSub(a, b int) int { 42 | return a ^ b 43 | } 44 | 45 | // Multiply multiplys two numbers 46 | func (gf *GaloisField) Multiply(a, b int) int { 47 | if a == 0 || b == 0 { 48 | return 0 49 | } 50 | return gf.ALogTbl[(gf.LogTbl[a]+gf.LogTbl[b])%(gf.Size-1)] 51 | } 52 | 53 | // Divide divides two numbers 54 | func (gf *GaloisField) Divide(a, b int) int { 55 | if b == 0 { 56 | panic("divide by zero") 57 | } else if a == 0 { 58 | return 0 59 | } 60 | return gf.ALogTbl[(gf.LogTbl[a]-gf.LogTbl[b])%(gf.Size-1)] 61 | } 62 | 63 | func (gf *GaloisField) Invers(num int) int { 64 | return gf.ALogTbl[(gf.Size-1)-gf.LogTbl[num]] 65 | } 66 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/field.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import ( 4 | "database/sql" 5 | "errors" 6 | "fmt" 7 | "reflect" 8 | ) 9 | 10 | // Field model field definition 11 | type Field struct { 12 | *StructField 13 | IsBlank bool 14 | Field reflect.Value 15 | } 16 | 17 | // Set set a value to the field 18 | func (field *Field) Set(value interface{}) (err error) { 19 | if !field.Field.IsValid() { 20 | return errors.New("field value not valid") 21 | } 22 | 23 | if !field.Field.CanAddr() { 24 | return ErrUnaddressable 25 | } 26 | 27 | reflectValue, ok := value.(reflect.Value) 28 | if !ok { 29 | reflectValue = reflect.ValueOf(value) 30 | } 31 | 32 | fieldValue := field.Field 33 | if reflectValue.IsValid() { 34 | if reflectValue.Type().ConvertibleTo(fieldValue.Type()) { 35 | fieldValue.Set(reflectValue.Convert(fieldValue.Type())) 36 | } else { 37 | if fieldValue.Kind() == reflect.Ptr { 38 | if fieldValue.IsNil() { 39 | fieldValue.Set(reflect.New(field.Struct.Type.Elem())) 40 | } 41 | fieldValue = fieldValue.Elem() 42 | } 43 | 44 | if reflectValue.Type().ConvertibleTo(fieldValue.Type()) { 45 | fieldValue.Set(reflectValue.Convert(fieldValue.Type())) 46 | } else if scanner, ok := fieldValue.Addr().Interface().(sql.Scanner); ok { 47 | err = scanner.Scan(reflectValue.Interface()) 48 | } else { 49 | err = fmt.Errorf("could not convert argument of field %s from %s to %s", field.Name, reflectValue.Type(), fieldValue.Type()) 50 | } 51 | } 52 | } else { 53 | field.Field.Set(reflect.Zero(field.Field.Type())) 54 | } 55 | 56 | field.IsBlank = isBlank(field.Field) 57 | return err 58 | } 59 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/Makefile: -------------------------------------------------------------------------------- 1 | GOFMT ?= gofmt "-s" 2 | PACKAGES ?= $(shell go list ./... | grep -v /vendor/) 3 | GOFILES := $(shell find . -name "*.go" -type f -not -path "./vendor/*") 4 | 5 | all: build 6 | 7 | install: deps 8 | govendor sync 9 | 10 | .PHONY: test 11 | test: 12 | go test -v -covermode=count -coverprofile=coverage.out 13 | 14 | .PHONY: fmt 15 | fmt: 16 | $(GOFMT) -w $(GOFILES) 17 | 18 | .PHONY: fmt-check 19 | fmt-check: 20 | # get all go files and run go fmt on them 21 | @diff=$$($(GOFMT) -d $(GOFILES)); \ 22 | if [ -n "$$diff" ]; then \ 23 | echo "Please run 'make fmt' and commit the result:"; \ 24 | echo "$${diff}"; \ 25 | exit 1; \ 26 | fi; 27 | 28 | vet: 29 | go vet $(PACKAGES) 30 | 31 | deps: 32 | @hash govendor > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ 33 | go get -u github.com/kardianos/govendor; \ 34 | fi 35 | @hash embedmd > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ 36 | go get -u github.com/campoy/embedmd; \ 37 | fi 38 | 39 | embedmd: 40 | embedmd -d *.md 41 | 42 | .PHONY: lint 43 | lint: 44 | @hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ 45 | go get -u github.com/golang/lint/golint; \ 46 | fi 47 | for PKG in $(PACKAGES); do golint -set_exit_status $$PKG || exit 1; done; 48 | 49 | .PHONY: misspell-check 50 | misspell-check: 51 | @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ 52 | go get -u github.com/client9/misspell/cmd/misspell; \ 53 | fi 54 | misspell -error $(GOFILES) 55 | 56 | .PHONY: misspell 57 | misspell: 58 | @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ 59 | go get -u github.com/client9/misspell/cmd/misspell; \ 60 | fi 61 | misspell -w $(GOFILES) 62 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 简介 2 | ============== 3 | IPA、APK内测应用分发服务,纯 golang 开发 4 | 5 | # 支持 6 | - Linux 7 | - Mac OSX 8 | 9 | # 编译 10 | ```sh 11 | go get github.com/phinexdaz/ipapk-server 12 | # for linux 13 | make linux 14 | # for mac 15 | make darwin 16 | ``` 17 | 18 | # 用法 19 | ## 配置文件 20 | ```json 21 | { 22 | "host": "127.0.0.1", 23 | "port": "8080", 24 | "proxy": "http://127.0.0.1:8080" // 自签证书不需要此项配置 25 | } 26 | ``` 27 | 28 | ## SSL 证书 29 | 该项目会自动生成自签名HTTPS证书,需要手动安装、信任 30 | 31 | ### iOS 安装、信任证书 32 | 1. 点击安装证书 33 | 2. 设置 > 通用 > 关于 > 证书信任设置 > 对需要的证书启用完全信任 34 | 35 | ### 使用商业证书 36 | 1. 在项目根目录新建`.ca`目录并拷贝`cer`和`key`文件到此目录 37 | 2. `config.json`文件中配置`proxy`值为证书域名 38 | ``` 39 | .ca 40 | ├── mycert1.cer 41 | └── mycert1.key 42 | ``` 43 | ## 开启服务 44 | `$ ./ipapk-server` 45 | 46 | ## 上传 47 | path: 48 | ``` 49 | POST /upload 50 | ``` 51 | param: 52 | ``` 53 | package:安装包文件, reqiured 54 | changelog:ChangeLog, 仅支持\n换行, optional 55 | ``` 56 | response: 57 | ```json 58 | { 59 | "uid": "820e8c1b-954a-4489-8d6c-7ea2c47d1ec1", 60 | "name": "xxxxxxx", 61 | "platform": "ios", 62 | "bundleId": "com.xxxxxx", 63 | "version": "1.0.0", 64 | "build": "100", 65 | "install_url": "itms-services://?action=download-manifest&url=https://127.0.0.1:8080/plist/820e8c1b-954a-4489-8d6c-7ea2c47d1ec1", 66 | "qrcode_url": "https://127.0.0.1:8080/qrcode/820e8c1b-954a-4489-8d6c-7ea2c47d1ec1", 67 | "icon_url": "https://127.0.0.1:8080/icon/820e8c1b-954a-4489-8d6c-7ea2c47d1ec1", 68 | "downloads": 0 69 | } 70 | ``` 71 | 示例: 72 | ```sh 73 | curl -X POST https://127.0.0.1:8080/upload -F "file=@test.ipa" -F "changelog=123" --insecure 74 | ``` 75 | 76 | # 截图 77 | ![s1](s1.png) 78 | 79 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/feature_any_float.go: -------------------------------------------------------------------------------- 1 | package jsoniter 2 | 3 | import ( 4 | "strconv" 5 | ) 6 | 7 | type floatAny struct { 8 | baseAny 9 | val float64 10 | } 11 | 12 | func (any *floatAny) Parse() *Iterator { 13 | return nil 14 | } 15 | 16 | func (any *floatAny) ValueType() ValueType { 17 | return NumberValue 18 | } 19 | 20 | func (any *floatAny) MustBeValid() Any { 21 | return any 22 | } 23 | 24 | func (any *floatAny) LastError() error { 25 | return nil 26 | } 27 | 28 | func (any *floatAny) ToBool() bool { 29 | return any.ToFloat64() != 0 30 | } 31 | 32 | func (any *floatAny) ToInt() int { 33 | return int(any.val) 34 | } 35 | 36 | func (any *floatAny) ToInt32() int32 { 37 | return int32(any.val) 38 | } 39 | 40 | func (any *floatAny) ToInt64() int64 { 41 | return int64(any.val) 42 | } 43 | 44 | func (any *floatAny) ToUint() uint { 45 | if any.val > 0 { 46 | return uint(any.val) 47 | } 48 | return 0 49 | } 50 | 51 | func (any *floatAny) ToUint32() uint32 { 52 | if any.val > 0 { 53 | return uint32(any.val) 54 | } 55 | return 0 56 | } 57 | 58 | func (any *floatAny) ToUint64() uint64 { 59 | if any.val > 0 { 60 | return uint64(any.val) 61 | } 62 | return 0 63 | } 64 | 65 | func (any *floatAny) ToFloat32() float32 { 66 | return float32(any.val) 67 | } 68 | 69 | func (any *floatAny) ToFloat64() float64 { 70 | return any.val 71 | } 72 | 73 | func (any *floatAny) ToString() string { 74 | return strconv.FormatFloat(any.val, 'E', -1, 64) 75 | } 76 | 77 | func (any *floatAny) WriteTo(stream *Stream) { 78 | stream.WriteFloat64(any.val) 79 | } 80 | 81 | func (any *floatAny) GetInterface() interface{} { 82 | return any.val 83 | } 84 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/wercker.yml: -------------------------------------------------------------------------------- 1 | # use the default golang container from Docker Hub 2 | box: golang 3 | 4 | services: 5 | - id: mariadb:10.0 6 | env: 7 | MYSQL_DATABASE: gorm 8 | MYSQL_USER: gorm 9 | MYSQL_PASSWORD: gorm 10 | MYSQL_RANDOM_ROOT_PASSWORD: "yes" 11 | - id: postgres 12 | env: 13 | POSTGRES_USER: gorm 14 | POSTGRES_PASSWORD: gorm 15 | POSTGRES_DB: gorm 16 | 17 | # The steps that will be executed in the build pipeline 18 | build: 19 | # The steps that will be executed on build 20 | steps: 21 | # Sets the go workspace and places you package 22 | # at the right place in the workspace tree 23 | - setup-go-workspace 24 | 25 | # Gets the dependencies 26 | - script: 27 | name: go get 28 | code: | 29 | cd $WERCKER_SOURCE_DIR 30 | go version 31 | go get -t ./... 32 | 33 | # Build the project 34 | - script: 35 | name: go build 36 | code: | 37 | go build ./... 38 | 39 | # Test the project 40 | - script: 41 | name: test sqlite 42 | code: | 43 | go test ./... 44 | 45 | - script: 46 | name: test mysql 47 | code: | 48 | GORM_DIALECT=mysql GORM_DBADDRESS=mariadb:3306 go test ./... 49 | 50 | - script: 51 | name: test postgres 52 | code: | 53 | GORM_DIALECT=postgres GORM_DBHOST=postgres go test ./... 54 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/location/config.go: -------------------------------------------------------------------------------- 1 | package location 2 | 3 | import ( 4 | "net/http" 5 | "net/url" 6 | "strings" 7 | 8 | "github.com/gin-gonic/gin" 9 | ) 10 | 11 | type ( 12 | location struct { 13 | scheme string 14 | host string 15 | base string 16 | headers headers 17 | } 18 | 19 | headers struct { 20 | scheme string 21 | host string 22 | } 23 | ) 24 | 25 | func newLocation(config Config) *location { 26 | return &location{ 27 | scheme: config.Scheme, 28 | host: config.Host, 29 | base: config.Base, 30 | headers: headers{ 31 | scheme: "X-Forwarded-Proto", 32 | host: "X-Forwarded-For", 33 | }, 34 | } 35 | } 36 | 37 | func (l *location) applyToContext(c *gin.Context) { 38 | value := new(url.URL) 39 | value.Scheme = l.resolveScheme(c.Request) 40 | value.Host = l.resolveHost(c.Request) 41 | value.Path = l.base 42 | c.Set(key, value) 43 | } 44 | 45 | func (l *location) resolveScheme(r *http.Request) string { 46 | switch { 47 | case r.Header.Get(l.headers.scheme) == "https": 48 | return "https" 49 | case r.URL.Scheme == "https": 50 | return "https" 51 | case r.TLS != nil: 52 | return "https" 53 | case strings.HasPrefix(r.Proto, "HTTPS"): 54 | return "https" 55 | default: 56 | return l.scheme 57 | } 58 | } 59 | 60 | func (l *location) resolveHost(r *http.Request) (host string) { 61 | switch { 62 | case r.Header.Get(l.headers.host) != "": 63 | return r.Header.Get(l.headers.host) 64 | case r.Header.Get("X-Host") != "": 65 | return r.Header.Get("X-Host") 66 | case r.Host != "": 67 | return r.Host 68 | case r.URL.Host != "": 69 | return r.URL.Host 70 | default: 71 | return l.host 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,dragonfly 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func Getpagesize() int { return 4096 } 15 | 16 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 17 | 18 | func NsecToTimespec(nsec int64) (ts Timespec) { 19 | ts.Sec = nsec / 1e9 20 | ts.Nsec = nsec % 1e9 21 | return 22 | } 23 | 24 | func NsecToTimeval(nsec int64) (tv Timeval) { 25 | nsec += 999 // round up to microsecond 26 | tv.Usec = nsec % 1e9 / 1e3 27 | tv.Sec = int64(nsec / 1e9) 28 | return 29 | } 30 | 31 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 32 | k.Ident = uint64(fd) 33 | k.Filter = int16(mode) 34 | k.Flags = uint16(flags) 35 | } 36 | 37 | func (iov *Iovec) SetLen(length int) { 38 | iov.Len = uint64(length) 39 | } 40 | 41 | func (msghdr *Msghdr) SetControllen(length int) { 42 | msghdr.Controllen = uint32(length) 43 | } 44 | 45 | func (cmsg *Cmsghdr) SetLen(length int) { 46 | cmsg.Len = uint32(length) 47 | } 48 | 49 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 50 | var writtenOut uint64 = 0 51 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 52 | 53 | written = int(writtenOut) 54 | 55 | if e1 != 0 { 56 | err = e1 57 | } 58 | return 59 | } 60 | 61 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 62 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build amd64,freebsd 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func Getpagesize() int { return 4096 } 15 | 16 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 17 | 18 | func NsecToTimespec(nsec int64) (ts Timespec) { 19 | ts.Sec = nsec / 1e9 20 | ts.Nsec = nsec % 1e9 21 | return 22 | } 23 | 24 | func NsecToTimeval(nsec int64) (tv Timeval) { 25 | nsec += 999 // round up to microsecond 26 | tv.Usec = nsec % 1e9 / 1e3 27 | tv.Sec = int64(nsec / 1e9) 28 | return 29 | } 30 | 31 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 32 | k.Ident = uint64(fd) 33 | k.Filter = int16(mode) 34 | k.Flags = uint16(flags) 35 | } 36 | 37 | func (iov *Iovec) SetLen(length int) { 38 | iov.Len = uint64(length) 39 | } 40 | 41 | func (msghdr *Msghdr) SetControllen(length int) { 42 | msghdr.Controllen = uint32(length) 43 | } 44 | 45 | func (cmsg *Cmsghdr) SetLen(length int) { 46 | cmsg.Len = uint32(length) 47 | } 48 | 49 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 50 | var writtenOut uint64 = 0 51 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) 52 | 53 | written = int(writtenOut) 54 | 55 | if e1 != 0 { 56 | err = e1 57 | } 58 | return 59 | } 60 | 61 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 62 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_type.go: -------------------------------------------------------------------------------- 1 | package sqlite3 2 | 3 | /* 4 | #ifndef USE_LIBSQLITE3 5 | #include 6 | #else 7 | #include 8 | #endif 9 | */ 10 | import "C" 11 | import ( 12 | "reflect" 13 | "time" 14 | ) 15 | 16 | // ColumnTypeDatabaseTypeName implement RowsColumnTypeDatabaseTypeName. 17 | func (rc *SQLiteRows) ColumnTypeDatabaseTypeName(i int) string { 18 | return C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))) 19 | } 20 | 21 | /* 22 | func (rc *SQLiteRows) ColumnTypeLength(index int) (length int64, ok bool) { 23 | return 0, false 24 | } 25 | 26 | func (rc *SQLiteRows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) { 27 | return 0, 0, false 28 | } 29 | */ 30 | 31 | // ColumnTypeNullable implement RowsColumnTypeNullable. 32 | func (rc *SQLiteRows) ColumnTypeNullable(i int) (nullable, ok bool) { 33 | return true, true 34 | } 35 | 36 | // ColumnTypeScanType implement RowsColumnTypeScanType. 37 | func (rc *SQLiteRows) ColumnTypeScanType(i int) reflect.Type { 38 | switch C.sqlite3_column_type(rc.s.s, C.int(i)) { 39 | case C.SQLITE_INTEGER: 40 | switch C.GoString(C.sqlite3_column_decltype(rc.s.s, C.int(i))) { 41 | case "timestamp", "datetime", "date": 42 | return reflect.TypeOf(time.Time{}) 43 | case "boolean": 44 | return reflect.TypeOf(false) 45 | } 46 | return reflect.TypeOf(int64(0)) 47 | case C.SQLITE_FLOAT: 48 | return reflect.TypeOf(float64(0)) 49 | case C.SQLITE_BLOB: 50 | return reflect.SliceOf(reflect.TypeOf(byte(0))) 51 | case C.SQLITE_NULL: 52 | return reflect.TypeOf(nil) 53 | case C.SQLITE_TEXT: 54 | return reflect.TypeOf("") 55 | } 56 | return reflect.SliceOf(reflect.TypeOf(byte(0))) 57 | } 58 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/errors.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import ( 4 | "errors" 5 | "strings" 6 | ) 7 | 8 | var ( 9 | // ErrRecordNotFound record not found error, happens when haven't find any matched data when looking up with a struct 10 | ErrRecordNotFound = errors.New("record not found") 11 | // ErrInvalidSQL invalid SQL error, happens when you passed invalid SQL 12 | ErrInvalidSQL = errors.New("invalid SQL") 13 | // ErrInvalidTransaction invalid transaction when you are trying to `Commit` or `Rollback` 14 | ErrInvalidTransaction = errors.New("no valid transaction") 15 | // ErrCantStartTransaction can't start transaction when you are trying to start one with `Begin` 16 | ErrCantStartTransaction = errors.New("can't start transaction") 17 | // ErrUnaddressable unaddressable value 18 | ErrUnaddressable = errors.New("using unaddressable value") 19 | ) 20 | 21 | // Errors contains all happened errors 22 | type Errors []error 23 | 24 | // GetErrors gets all happened errors 25 | func (errs Errors) GetErrors() []error { 26 | return errs 27 | } 28 | 29 | // Add adds an error 30 | func (errs Errors) Add(newErrors ...error) Errors { 31 | for _, err := range newErrors { 32 | if errors, ok := err.(Errors); ok { 33 | errs = errs.Add(errors...) 34 | } else { 35 | ok = true 36 | for _, e := range errs { 37 | if err == e { 38 | ok = false 39 | } 40 | } 41 | if ok { 42 | errs = append(errs, err) 43 | } 44 | } 45 | } 46 | return errs 47 | } 48 | 49 | // Error format happened errors 50 | func (errs Errors) Error() string { 51 | var errors = []string{} 52 | for _, e := range errs { 53 | errors = append(errors, e.Error()) 54 | } 55 | return strings.Join(errors, "; ") 56 | } 57 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build arm,freebsd 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func Getpagesize() int { return 4096 } 15 | 16 | func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) } 17 | 18 | func NsecToTimespec(nsec int64) (ts Timespec) { 19 | ts.Sec = nsec / 1e9 20 | ts.Nsec = int32(nsec % 1e9) 21 | return 22 | } 23 | 24 | func NsecToTimeval(nsec int64) (tv Timeval) { 25 | nsec += 999 // round up to microsecond 26 | tv.Usec = int32(nsec % 1e9 / 1e3) 27 | tv.Sec = nsec / 1e9 28 | return 29 | } 30 | 31 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 32 | k.Ident = uint32(fd) 33 | k.Filter = int16(mode) 34 | k.Flags = uint16(flags) 35 | } 36 | 37 | func (iov *Iovec) SetLen(length int) { 38 | iov.Len = uint32(length) 39 | } 40 | 41 | func (msghdr *Msghdr) SetControllen(length int) { 42 | msghdr.Controllen = uint32(length) 43 | } 44 | 45 | func (cmsg *Cmsghdr) SetLen(length int) { 46 | cmsg.Len = uint32(length) 47 | } 48 | 49 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 50 | var writtenOut uint64 = 0 51 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) 52 | 53 | written = int(writtenOut) 54 | 55 | if e1 != 0 { 56 | err = e1 57 | } 58 | return 59 | } 60 | 61 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 62 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/LICENSE: -------------------------------------------------------------------------------- 1 | Go support for Protocol Buffers - Google's data interchange format 2 | 3 | Copyright 2010 The Go Authors. All rights reserved. 4 | https://github.com/golang/protobuf 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are 8 | met: 9 | 10 | * Redistributions of source code must retain the above copyright 11 | notice, this list of conditions and the following disclaimer. 12 | * Redistributions in binary form must reproduce the above 13 | copyright notice, this list of conditions and the following disclaimer 14 | in the documentation and/or other materials provided with the 15 | distribution. 16 | * Neither the name of Google Inc. nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_freebsd_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build 386,freebsd 6 | 7 | package unix 8 | 9 | import ( 10 | "syscall" 11 | "unsafe" 12 | ) 13 | 14 | func Getpagesize() int { return 4096 } 15 | 16 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 17 | 18 | func NsecToTimespec(nsec int64) (ts Timespec) { 19 | ts.Sec = int32(nsec / 1e9) 20 | ts.Nsec = int32(nsec % 1e9) 21 | return 22 | } 23 | 24 | func NsecToTimeval(nsec int64) (tv Timeval) { 25 | nsec += 999 // round up to microsecond 26 | tv.Usec = int32(nsec % 1e9 / 1e3) 27 | tv.Sec = int32(nsec / 1e9) 28 | return 29 | } 30 | 31 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 32 | k.Ident = uint32(fd) 33 | k.Filter = int16(mode) 34 | k.Flags = uint16(flags) 35 | } 36 | 37 | func (iov *Iovec) SetLen(length int) { 38 | iov.Len = uint32(length) 39 | } 40 | 41 | func (msghdr *Msghdr) SetControllen(length int) { 42 | msghdr.Controllen = uint32(length) 43 | } 44 | 45 | func (cmsg *Cmsghdr) SetLen(length int) { 46 | cmsg.Len = uint32(length) 47 | } 48 | 49 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 50 | var writtenOut uint64 = 0 51 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) 52 | 53 | written = int(writtenOut) 54 | 55 | if e1 != 0 { 56 | err = e1 57 | } 58 | return 59 | } 60 | 61 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) 62 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/location/location.go: -------------------------------------------------------------------------------- 1 | package location 2 | 3 | import ( 4 | "net/url" 5 | 6 | "github.com/gin-gonic/gin" 7 | ) 8 | 9 | const key = "location" 10 | 11 | // Config represents all available options for the middleware. 12 | type Config struct { 13 | // Scheme is the default scheme that should be used when it cannot otherwise 14 | // be ascertained from the incoming http.Request. 15 | Scheme string 16 | 17 | // Host is the default host that should be used when it cannot otherwise 18 | // be ascertained from the incoming http.Request. 19 | Host string 20 | 21 | // Base is the base path that should be used in conjunction with proxy 22 | // servers that do path re-writing. 23 | Base string 24 | } 25 | 26 | // DefaultConfig returns a generic default configuration mapped to localhost. 27 | func DefaultConfig() Config { 28 | return Config{ 29 | Host: "localhost:8080", 30 | Scheme: "http", 31 | } 32 | } 33 | 34 | // Default returns the location middleware with default configuration. 35 | func Default() gin.HandlerFunc { 36 | config := DefaultConfig() 37 | return New(config) 38 | } 39 | 40 | // New returns the location middleware with user-defined custom configuration. 41 | func New(config Config) gin.HandlerFunc { 42 | location := newLocation(config) 43 | 44 | return func(c *gin.Context) { 45 | location.applyToContext(c) 46 | } 47 | } 48 | 49 | // Get returns the Location information for the incoming http.Request from the 50 | // context. If the location is not set a nil value is returned. 51 | func Get(c *gin.Context) *url.URL { 52 | v, ok := c.Get(key) 53 | 54 | if !ok { 55 | return nil 56 | } 57 | 58 | vv, ok := v.(*url.URL) 59 | 60 | if !ok { 61 | return nil 62 | } 63 | 64 | return vv 65 | } 66 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/qr/alphanumeric.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | "strings" 7 | 8 | "github.com/boombuler/barcode/utils" 9 | ) 10 | 11 | const charSet string = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:" 12 | 13 | func stringToAlphaIdx(content string) <-chan int { 14 | result := make(chan int) 15 | go func() { 16 | for _, r := range content { 17 | idx := strings.IndexRune(charSet, r) 18 | result <- idx 19 | if idx < 0 { 20 | break 21 | } 22 | } 23 | close(result) 24 | }() 25 | 26 | return result 27 | } 28 | 29 | func encodeAlphaNumeric(content string, ecl ErrorCorrectionLevel) (*utils.BitList, *versionInfo, error) { 30 | 31 | contentLenIsOdd := len(content)%2 == 1 32 | contentBitCount := (len(content) / 2) * 11 33 | if contentLenIsOdd { 34 | contentBitCount += 6 35 | } 36 | vi := findSmallestVersionInfo(ecl, alphaNumericMode, contentBitCount) 37 | if vi == nil { 38 | return nil, nil, errors.New("To much data to encode") 39 | } 40 | 41 | res := new(utils.BitList) 42 | res.AddBits(int(alphaNumericMode), 4) 43 | res.AddBits(len(content), vi.charCountBits(alphaNumericMode)) 44 | 45 | encoder := stringToAlphaIdx(content) 46 | 47 | for idx := 0; idx < len(content)/2; idx++ { 48 | c1 := <-encoder 49 | c2 := <-encoder 50 | if c1 < 0 || c2 < 0 { 51 | return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, AlphaNumeric) 52 | } 53 | res.AddBits(c1*45+c2, 11) 54 | } 55 | if contentLenIsOdd { 56 | c := <-encoder 57 | if c < 0 { 58 | return nil, nil, fmt.Errorf("\"%s\" can not be encoded as %s", content, AlphaNumeric) 59 | } 60 | res.AddBits(c, 6) 61 | } 62 | 63 | addPaddingAndTerminator(res, vi) 64 | 65 | return res, vi, nil 66 | } 67 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build gccgo 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | // We can't use the gc-syntax .s files for gccgo. On the plus side 12 | // much of the functionality can be written directly in Go. 13 | 14 | //extern gccgoRealSyscall 15 | func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) 16 | 17 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 18 | syscall.Entersyscall() 19 | r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) 20 | syscall.Exitsyscall() 21 | return r, 0, syscall.Errno(errno) 22 | } 23 | 24 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 25 | syscall.Entersyscall() 26 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) 27 | syscall.Exitsyscall() 28 | return r, 0, syscall.Errno(errno) 29 | } 30 | 31 | func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) { 32 | syscall.Entersyscall() 33 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9) 34 | syscall.Exitsyscall() 35 | return r, 0, syscall.Errno(errno) 36 | } 37 | 38 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { 39 | r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) 40 | return r, 0, syscall.Errno(errno) 41 | } 42 | 43 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { 44 | r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) 45 | return r, 0, syscall.Errno(errno) 46 | } 47 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/feature_any_invalid.go: -------------------------------------------------------------------------------- 1 | package jsoniter 2 | 3 | import "fmt" 4 | 5 | type invalidAny struct { 6 | baseAny 7 | err error 8 | } 9 | 10 | func newInvalidAny(path []interface{}) *invalidAny { 11 | return &invalidAny{baseAny{}, fmt.Errorf("%v not found", path)} 12 | } 13 | 14 | func (any *invalidAny) LastError() error { 15 | return any.err 16 | } 17 | 18 | func (any *invalidAny) ValueType() ValueType { 19 | return InvalidValue 20 | } 21 | 22 | func (any *invalidAny) MustBeValid() Any { 23 | panic(any.err) 24 | } 25 | 26 | func (any *invalidAny) ToBool() bool { 27 | return false 28 | } 29 | 30 | func (any *invalidAny) ToInt() int { 31 | return 0 32 | } 33 | 34 | func (any *invalidAny) ToInt32() int32 { 35 | return 0 36 | } 37 | 38 | func (any *invalidAny) ToInt64() int64 { 39 | return 0 40 | } 41 | 42 | func (any *invalidAny) ToUint() uint { 43 | return 0 44 | } 45 | 46 | func (any *invalidAny) ToUint32() uint32 { 47 | return 0 48 | } 49 | 50 | func (any *invalidAny) ToUint64() uint64 { 51 | return 0 52 | } 53 | 54 | func (any *invalidAny) ToFloat32() float32 { 55 | return 0 56 | } 57 | 58 | func (any *invalidAny) ToFloat64() float64 { 59 | return 0 60 | } 61 | 62 | func (any *invalidAny) ToString() string { 63 | return "" 64 | } 65 | 66 | func (any *invalidAny) WriteTo(stream *Stream) { 67 | } 68 | 69 | func (any *invalidAny) Get(path ...interface{}) Any { 70 | if any.err == nil { 71 | return &invalidAny{baseAny{}, fmt.Errorf("get %v from invalid", path)} 72 | } 73 | return &invalidAny{baseAny{}, fmt.Errorf("%v, get %v from invalid", any.err, path)} 74 | } 75 | 76 | func (any *invalidAny) Parse() *Iterator { 77 | return nil 78 | } 79 | 80 | func (any *invalidAny) GetInterface() interface{} { 81 | return nil 82 | } 83 | -------------------------------------------------------------------------------- /models/plist.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "io" 5 | "strings" 6 | 7 | "github.com/DHowett/go-plist" 8 | ) 9 | 10 | const ( 11 | PlistFileName = "test.plist" 12 | AssetKind = "software-package" 13 | DefaultMetadataBundleIdentifier = "com.example.test" 14 | MetadataKind = "software" 15 | ) 16 | 17 | type Plist struct { 18 | Items []*Item `plist:"items"` 19 | } 20 | 21 | type Item struct { 22 | Assets []*Asset `plist:"assets"` 23 | Metadata *Metadata `plist:"metadata"` 24 | } 25 | 26 | type Asset struct { 27 | Kind string `plist:"kind"` 28 | Url string `plist:"url"` 29 | } 30 | 31 | type Metadata struct { 32 | BundleIdentifier string `plist:"bundle-identifier"` 33 | BundleVersion string `plist:"bundle-version"` 34 | Kind string `plist:"kind"` 35 | Title string `plist:"title"` 36 | } 37 | 38 | func NewPlist(title, version, identifier, ipaUrl string) *Plist { 39 | if len(identifier) == 0 { 40 | identifier = DefaultMetadataBundleIdentifier 41 | } 42 | 43 | return &Plist{ 44 | Items: []*Item{ 45 | &Item{ 46 | Assets: []*Asset{ 47 | &Asset{ 48 | Kind: AssetKind, 49 | Url: ipaUrl, 50 | }, 51 | }, 52 | Metadata: &Metadata{ 53 | BundleIdentifier: identifier, 54 | BundleVersion: version, 55 | Kind: MetadataKind, 56 | Title: title, 57 | }, 58 | }, 59 | }, 60 | } 61 | } 62 | 63 | func (p *Plist) Marshall() ([]byte, error) { 64 | return plist.MarshalIndent(p, plist.XMLFormat, "\t") 65 | } 66 | 67 | func (p *Plist) Reader() (io.Reader, error) { 68 | data, err := p.Marshall() 69 | if err != nil { 70 | return nil, err 71 | } 72 | 73 | return strings.NewReader(string(data)), nil 74 | } 75 | -------------------------------------------------------------------------------- /vendor/github.com/shogo82148/androidbinary/README.md: -------------------------------------------------------------------------------- 1 | androidbinary 2 | ===== 3 | 4 | [![Build Status](https://travis-ci.org/shogo82148/androidbinary.svg?branch=master)](https://travis-ci.org/shogo82148/androidbinary) 5 | [![GoDoc](https://godoc.org/github.com/shogo82148/androidbinary?status.svg)](https://godoc.org/github.com/shogo82148/androidbinary) 6 | 7 | Android binary file parser 8 | 9 | ## High Level API 10 | 11 | ### Parse APK files 12 | 13 | ``` go 14 | package main 15 | 16 | import ( 17 | "github.com/shogo82148/androidbinary/apk" 18 | ) 19 | 20 | func main() { 21 | pkg, _ := apk.OpenFile("your-android-app.apk") 22 | defer pkg.Close() 23 | 24 | icon, _ := apk.Icon(nil) // returns the icon of APK as image.Image 25 | pkgName := pkg.PackageName() // returns the pakcage name 26 | } 27 | ``` 28 | 29 | ## Low Lebel API 30 | 31 | ### Parse XML binary 32 | 33 | ``` go 34 | package main 35 | 36 | import ( 37 | "encoding/xml" 38 | 39 | "github.com/shogo82148/androidbinary" 40 | "github.com/shogo82148/androidbinary/apk" 41 | ) 42 | 43 | func main() { 44 | f, _ := os.Open("AndroidManifest.xml") 45 | xml, _ := androidbinary.NewXMLFile(f) 46 | reader := xml.Reader() 47 | 48 | // read XML from reader 49 | var manifest apk.Manifest 50 | data, _ := ioutil.ReadAll(reader) 51 | xml.Unmarshal(data, &manifest) 52 | } 53 | ``` 54 | 55 | ### Parse Resource files 56 | 57 | ``` go 58 | package main 59 | 60 | import ( 61 | "fmt" 62 | "github.com/shogo82148/androidbinary" 63 | ) 64 | 65 | func main() { 66 | f, _ := os.Open("resources.arsc") 67 | rsc, _ := androidbinary.NewTableFile(f) 68 | resorce, _ := rsc.GetResource(androidbinary.ResID(0xCAFEBABE), nil) 69 | fmt.Println(resource) 70 | } 71 | ``` 72 | 73 | ## License 74 | 75 | This software is released under the MIT License, see LICENSE. 76 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/gorm/README.md: -------------------------------------------------------------------------------- 1 | # GORM 2 | 3 | The fantastic ORM library for Golang, aims to be developer friendly. 4 | 5 | [![Join the chat at https://gitter.im/jinzhu/gorm](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jinzhu/gorm?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 6 | [![wercker status](https://app.wercker.com/status/0cb7bb1039e21b74f8274941428e0921/s/master "wercker status")](https://app.wercker.com/project/bykey/0cb7bb1039e21b74f8274941428e0921) 7 | [![GoDoc](https://godoc.org/github.com/jinzhu/gorm?status.svg)](https://godoc.org/github.com/jinzhu/gorm) 8 | 9 | ## Overview 10 | 11 | * Full-Featured ORM (almost) 12 | * Associations (Has One, Has Many, Belongs To, Many To Many, Polymorphism) 13 | * Callbacks (Before/After Create/Save/Update/Delete/Find) 14 | * Preloading (eager loading) 15 | * Transactions 16 | * Composite Primary Key 17 | * SQL Builder 18 | * Auto Migrations 19 | * Logger 20 | * Extendable, write Plugins based on GORM callbacks 21 | * Every feature comes with tests 22 | * Developer Friendly 23 | 24 | ## Getting Started 25 | 26 | * GORM Guides [jinzhu.github.com/gorm](http://jinzhu.github.io/gorm) 27 | 28 | ## Upgrading To V1.0 29 | 30 | * [CHANGELOG](http://jinzhu.github.io/gorm/changelog.html) 31 | 32 | ## Supporting the project 33 | 34 | [![http://patreon.com/jinzhu](http://patreon_public_assets.s3.amazonaws.com/sized/becomeAPatronBanner.png)](http://patreon.com/jinzhu) 35 | 36 | ## Author 37 | 38 | **jinzhu** 39 | 40 | * 41 | * 42 | * 43 | 44 | ## Contributors 45 | 46 | https://github.com/jinzhu/gorm/graphs/contributors 47 | 48 | ## License 49 | 50 | Released under the [MIT License](https://github.com/jinzhu/gorm/blob/master/License). 51 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/inflection/README.md: -------------------------------------------------------------------------------- 1 | Inflection 2 | ========= 3 | 4 | Inflection pluralizes and singularizes English nouns 5 | 6 | ## Basic Usage 7 | 8 | ```go 9 | inflection.Plural("person") => "people" 10 | inflection.Plural("Person") => "People" 11 | inflection.Plural("PERSON") => "PEOPLE" 12 | inflection.Plural("bus") => "buses" 13 | inflection.Plural("BUS") => "BUSES" 14 | inflection.Plural("Bus") => "Buses" 15 | 16 | inflection.Singular("people") => "person" 17 | inflection.Singular("People") => "Person" 18 | inflection.Singular("PEOPLE") => "PERSON" 19 | inflection.Singular("buses") => "bus" 20 | inflection.Singular("BUSES") => "BUS" 21 | inflection.Singular("Buses") => "Bus" 22 | 23 | inflection.Plural("FancyPerson") => "FancyPeople" 24 | inflection.Singular("FancyPeople") => "FancyPerson" 25 | ``` 26 | 27 | ## Register Rules 28 | 29 | Standard rules are from Rails's ActiveSupport (https://github.com/rails/rails/blob/master/activesupport/lib/active_support/inflections.rb) 30 | 31 | If you want to register more rules, follow: 32 | 33 | ``` 34 | inflection.AddUncountable("fish") 35 | inflection.AddIrregular("person", "people") 36 | inflection.AddPlural("(bu)s$", "${1}ses") # "bus" => "buses" / "BUS" => "BUSES" / "Bus" => "Buses" 37 | inflection.AddSingular("(bus)(es)?$", "${1}") # "buses" => "bus" / "Buses" => "Bus" / "BUSES" => "BUS" 38 | ``` 39 | 40 | ## Supporting the project 41 | 42 | [![http://patreon.com/jinzhu](http://patreon_public_assets.s3.amazonaws.com/sized/becomeAPatronBanner.png)](http://patreon.com/jinzhu) 43 | 44 | 45 | ## Author 46 | 47 | **jinzhu** 48 | 49 | * 50 | * 51 | * 52 | 53 | ## License 54 | 55 | Released under the [MIT License](http://www.opensource.org/licenses/MIT). 56 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/mode.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package gin 6 | 7 | import ( 8 | "io" 9 | "os" 10 | 11 | "github.com/gin-gonic/gin/binding" 12 | ) 13 | 14 | const ENV_GIN_MODE = "GIN_MODE" 15 | 16 | const ( 17 | DebugMode string = "debug" 18 | ReleaseMode string = "release" 19 | TestMode string = "test" 20 | ) 21 | const ( 22 | debugCode = iota 23 | releaseCode 24 | testCode 25 | ) 26 | 27 | // DefaultWriter is the default io.Writer used the Gin for debug output and 28 | // middleware output like Logger() or Recovery(). 29 | // Note that both Logger and Recovery provides custom ways to configure their 30 | // output io.Writer. 31 | // To support coloring in Windows use: 32 | // import "github.com/mattn/go-colorable" 33 | // gin.DefaultWriter = colorable.NewColorableStdout() 34 | var DefaultWriter io.Writer = os.Stdout 35 | var DefaultErrorWriter io.Writer = os.Stderr 36 | 37 | var ginMode = debugCode 38 | var modeName = DebugMode 39 | 40 | func init() { 41 | mode := os.Getenv(ENV_GIN_MODE) 42 | if len(mode) == 0 { 43 | SetMode(DebugMode) 44 | } else { 45 | SetMode(mode) 46 | } 47 | } 48 | 49 | func SetMode(value string) { 50 | switch value { 51 | case DebugMode: 52 | ginMode = debugCode 53 | case ReleaseMode: 54 | ginMode = releaseCode 55 | case TestMode: 56 | ginMode = testCode 57 | default: 58 | panic("gin mode unknown: " + value) 59 | } 60 | modeName = value 61 | } 62 | 63 | func DisableBindValidation() { 64 | binding.Validator = nil 65 | } 66 | 67 | func EnableJsonDecoderUseNumber() { 68 | binding.EnableDecoderUseNumber = true 69 | } 70 | 71 | func Mode() string { 72 | return modeName 73 | } 74 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/mksysnum_freebsd.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for FreeBSD from master list 7 | # (for example, /usr/src/sys/kern/syscalls.master). 8 | 9 | use strict; 10 | 11 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 12 | print STDERR "GOARCH or GOOS not defined in environment\n"; 13 | exit 1; 14 | } 15 | 16 | my $command = "mksysnum_freebsd.pl " . join(' ', @ARGV); 17 | 18 | print <){ 30 | if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){ 31 | my $num = $1; 32 | my $proto = $2; 33 | my $name = "SYS_$3"; 34 | $name =~ y/a-z/A-Z/; 35 | 36 | # There are multiple entries for enosys and nosys, so comment them out. 37 | if($name =~ /^SYS_E?NOSYS$/){ 38 | $name = "// $name"; 39 | } 40 | if($name eq 'SYS_SYS_EXIT'){ 41 | $name = 'SYS_EXIT'; 42 | } 43 | if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){ 44 | next 45 | } 46 | 47 | print " $name = $num; // $proto\n"; 48 | 49 | # We keep Capsicum syscall numbers for FreeBSD 50 | # 9-STABLE here because we are not sure whether they 51 | # are mature and stable. 52 | if($num == 513){ 53 | print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n"; 54 | print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n"; 55 | print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n"; 56 | print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n"; 57 | } 58 | } 59 | } 60 | 61 | print <. 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | // +build !sqlite_omit_load_extension 6 | 7 | package sqlite3 8 | 9 | /* 10 | #ifndef USE_LIBSQLITE3 11 | #include 12 | #else 13 | #include 14 | #endif 15 | #include 16 | */ 17 | import "C" 18 | import ( 19 | "errors" 20 | "unsafe" 21 | ) 22 | 23 | func (c *SQLiteConn) loadExtensions(extensions []string) error { 24 | rv := C.sqlite3_enable_load_extension(c.db, 1) 25 | if rv != C.SQLITE_OK { 26 | return errors.New(C.GoString(C.sqlite3_errmsg(c.db))) 27 | } 28 | 29 | for _, extension := range extensions { 30 | cext := C.CString(extension) 31 | defer C.free(unsafe.Pointer(cext)) 32 | rv = C.sqlite3_load_extension(c.db, cext, nil, nil) 33 | if rv != C.SQLITE_OK { 34 | C.sqlite3_enable_load_extension(c.db, 0) 35 | return errors.New(C.GoString(C.sqlite3_errmsg(c.db))) 36 | } 37 | } 38 | 39 | rv = C.sqlite3_enable_load_extension(c.db, 0) 40 | if rv != C.SQLITE_OK { 41 | return errors.New(C.GoString(C.sqlite3_errmsg(c.db))) 42 | } 43 | return nil 44 | } 45 | 46 | // LoadExtension load the sqlite3 extension. 47 | func (c *SQLiteConn) LoadExtension(lib string, entry string) error { 48 | rv := C.sqlite3_enable_load_extension(c.db, 1) 49 | if rv != C.SQLITE_OK { 50 | return errors.New(C.GoString(C.sqlite3_errmsg(c.db))) 51 | } 52 | 53 | clib := C.CString(lib) 54 | defer C.free(unsafe.Pointer(clib)) 55 | centry := C.CString(entry) 56 | defer C.free(unsafe.Pointer(centry)) 57 | 58 | rv = C.sqlite3_load_extension(c.db, clib, centry, nil) 59 | if rv != C.SQLITE_OK { 60 | return errors.New(C.GoString(C.sqlite3_errmsg(c.db))) 61 | } 62 | 63 | rv = C.sqlite3_enable_load_extension(c.db, 0) 64 | if rv != C.SQLITE_OK { 65 | return errors.New(C.GoString(C.sqlite3_errmsg(c.db))) 66 | } 67 | 68 | return nil 69 | } 70 | -------------------------------------------------------------------------------- /vendor/github.com/boombuler/barcode/qr/blocks.go: -------------------------------------------------------------------------------- 1 | package qr 2 | 3 | type block struct { 4 | data []byte 5 | ecc []byte 6 | } 7 | type blockList []*block 8 | 9 | func splitToBlocks(data <-chan byte, vi *versionInfo) blockList { 10 | result := make(blockList, vi.NumberOfBlocksInGroup1+vi.NumberOfBlocksInGroup2) 11 | 12 | for b := 0; b < int(vi.NumberOfBlocksInGroup1); b++ { 13 | blk := new(block) 14 | blk.data = make([]byte, vi.DataCodeWordsPerBlockInGroup1) 15 | for cw := 0; cw < int(vi.DataCodeWordsPerBlockInGroup1); cw++ { 16 | blk.data[cw] = <-data 17 | } 18 | blk.ecc = ec.calcECC(blk.data, vi.ErrorCorrectionCodewordsPerBlock) 19 | result[b] = blk 20 | } 21 | 22 | for b := 0; b < int(vi.NumberOfBlocksInGroup2); b++ { 23 | blk := new(block) 24 | blk.data = make([]byte, vi.DataCodeWordsPerBlockInGroup2) 25 | for cw := 0; cw < int(vi.DataCodeWordsPerBlockInGroup2); cw++ { 26 | blk.data[cw] = <-data 27 | } 28 | blk.ecc = ec.calcECC(blk.data, vi.ErrorCorrectionCodewordsPerBlock) 29 | result[int(vi.NumberOfBlocksInGroup1)+b] = blk 30 | } 31 | 32 | return result 33 | } 34 | 35 | func (bl blockList) interleave(vi *versionInfo) []byte { 36 | var maxCodewordCount int 37 | if vi.DataCodeWordsPerBlockInGroup1 > vi.DataCodeWordsPerBlockInGroup2 { 38 | maxCodewordCount = int(vi.DataCodeWordsPerBlockInGroup1) 39 | } else { 40 | maxCodewordCount = int(vi.DataCodeWordsPerBlockInGroup2) 41 | } 42 | resultLen := (vi.DataCodeWordsPerBlockInGroup1+vi.ErrorCorrectionCodewordsPerBlock)*vi.NumberOfBlocksInGroup1 + 43 | (vi.DataCodeWordsPerBlockInGroup2+vi.ErrorCorrectionCodewordsPerBlock)*vi.NumberOfBlocksInGroup2 44 | 45 | result := make([]byte, 0, resultLen) 46 | for i := 0; i < maxCodewordCount; i++ { 47 | for b := 0; b < len(bl); b++ { 48 | if len(bl[b].data) > i { 49 | result = append(result, bl[b].data[i]) 50 | } 51 | } 52 | } 53 | for i := 0; i < int(vi.ErrorCorrectionCodewordsPerBlock); i++ { 54 | for b := 0; b < len(bl); b++ { 55 | result = append(result, bl[b].ecc[i]) 56 | } 57 | } 58 | return result 59 | } 60 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_darwin_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | import ( 8 | "syscall" 9 | "unsafe" 10 | ) 11 | 12 | func Getpagesize() int { return 4096 } 13 | 14 | func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } 15 | 16 | func NsecToTimespec(nsec int64) (ts Timespec) { 17 | ts.Sec = int32(nsec / 1e9) 18 | ts.Nsec = int32(nsec % 1e9) 19 | return 20 | } 21 | 22 | func NsecToTimeval(nsec int64) (tv Timeval) { 23 | nsec += 999 // round up to microsecond 24 | tv.Usec = int32(nsec % 1e9 / 1e3) 25 | tv.Sec = int32(nsec / 1e9) 26 | return 27 | } 28 | 29 | //sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) 30 | func Gettimeofday(tv *Timeval) (err error) { 31 | // The tv passed to gettimeofday must be non-nil 32 | // but is otherwise unused. The answers come back 33 | // in the two registers. 34 | sec, usec, err := gettimeofday(tv) 35 | tv.Sec = int32(sec) 36 | tv.Usec = int32(usec) 37 | return err 38 | } 39 | 40 | func SetKevent(k *Kevent_t, fd, mode, flags int) { 41 | k.Ident = uint32(fd) 42 | k.Filter = int16(mode) 43 | k.Flags = uint16(flags) 44 | } 45 | 46 | func (iov *Iovec) SetLen(length int) { 47 | iov.Len = uint32(length) 48 | } 49 | 50 | func (msghdr *Msghdr) SetControllen(length int) { 51 | msghdr.Controllen = uint32(length) 52 | } 53 | 54 | func (cmsg *Cmsghdr) SetLen(length int) { 55 | cmsg.Len = uint32(length) 56 | } 57 | 58 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 59 | var length = uint64(count) 60 | 61 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0) 62 | 63 | written = int(length) 64 | 65 | if e1 != 0 { 66 | err = e1 67 | } 68 | return 69 | } 70 | 71 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic 72 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import ( 8 | "bytes" 9 | "net/http" 10 | 11 | "github.com/gin-gonic/gin/json" 12 | ) 13 | 14 | type JSON struct { 15 | Data interface{} 16 | } 17 | 18 | type IndentedJSON struct { 19 | Data interface{} 20 | } 21 | 22 | type SecureJSON struct { 23 | Prefix string 24 | Data interface{} 25 | } 26 | 27 | type SecureJSONPrefix string 28 | 29 | var jsonContentType = []string{"application/json; charset=utf-8"} 30 | 31 | func (r JSON) Render(w http.ResponseWriter) (err error) { 32 | if err = WriteJSON(w, r.Data); err != nil { 33 | panic(err) 34 | } 35 | return 36 | } 37 | 38 | func (r JSON) WriteContentType(w http.ResponseWriter) { 39 | writeContentType(w, jsonContentType) 40 | } 41 | 42 | func WriteJSON(w http.ResponseWriter, obj interface{}) error { 43 | writeContentType(w, jsonContentType) 44 | jsonBytes, err := json.Marshal(obj) 45 | if err != nil { 46 | return err 47 | } 48 | w.Write(jsonBytes) 49 | return nil 50 | } 51 | 52 | func (r IndentedJSON) Render(w http.ResponseWriter) error { 53 | r.WriteContentType(w) 54 | jsonBytes, err := json.MarshalIndent(r.Data, "", " ") 55 | if err != nil { 56 | return err 57 | } 58 | w.Write(jsonBytes) 59 | return nil 60 | } 61 | 62 | func (r IndentedJSON) WriteContentType(w http.ResponseWriter) { 63 | writeContentType(w, jsonContentType) 64 | } 65 | 66 | func (r SecureJSON) Render(w http.ResponseWriter) error { 67 | r.WriteContentType(w) 68 | jsonBytes, err := json.Marshal(r.Data) 69 | if err != nil { 70 | return err 71 | } 72 | // if the jsonBytes is array values 73 | if bytes.HasPrefix(jsonBytes, []byte("[")) && bytes.HasSuffix(jsonBytes, []byte("]")) { 74 | w.Write([]byte(r.Prefix)) 75 | } 76 | w.Write(jsonBytes) 77 | return nil 78 | } 79 | 80 | func (r SecureJSON) WriteContentType(w http.ResponseWriter) { 81 | writeContentType(w, jsonContentType) 82 | } 83 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/debug.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package gin 6 | 7 | import ( 8 | "bytes" 9 | "html/template" 10 | "log" 11 | ) 12 | 13 | func init() { 14 | log.SetFlags(0) 15 | } 16 | 17 | // IsDebugging returns true if the framework is running in debug mode. 18 | // Use SetMode(gin.Release) to disable debug mode. 19 | func IsDebugging() bool { 20 | return ginMode == debugCode 21 | } 22 | 23 | func debugPrintRoute(httpMethod, absolutePath string, handlers HandlersChain) { 24 | if IsDebugging() { 25 | nuHandlers := len(handlers) 26 | handlerName := nameOfFunction(handlers.Last()) 27 | debugPrint("%-6s %-25s --> %s (%d handlers)\n", httpMethod, absolutePath, handlerName, nuHandlers) 28 | } 29 | } 30 | 31 | func debugPrintLoadTemplate(tmpl *template.Template) { 32 | if IsDebugging() { 33 | var buf bytes.Buffer 34 | for _, tmpl := range tmpl.Templates() { 35 | buf.WriteString("\t- ") 36 | buf.WriteString(tmpl.Name()) 37 | buf.WriteString("\n") 38 | } 39 | debugPrint("Loaded HTML Templates (%d): \n%s\n", len(tmpl.Templates()), buf.String()) 40 | } 41 | } 42 | 43 | func debugPrint(format string, values ...interface{}) { 44 | if IsDebugging() { 45 | log.Printf("[GIN-debug] "+format, values...) 46 | } 47 | } 48 | 49 | func debugPrintWARNINGNew() { 50 | debugPrint(`[WARNING] Running in "debug" mode. Switch to "release" mode in production. 51 | - using env: export GIN_MODE=release 52 | - using code: gin.SetMode(gin.ReleaseMode) 53 | 54 | `) 55 | } 56 | 57 | func debugPrintWARNINGSetHTMLTemplate() { 58 | debugPrint(`[WARNING] Since SetHTMLTemplate() is NOT thread-safe. It should only be called 59 | at initialization. ie. before any route is registered or the router is listening in a socket: 60 | 61 | router := gin.Default() 62 | router.SetHTMLTemplate(template) // << good place 63 | 64 | `) 65 | } 66 | 67 | func debugPrintError(err error) { 68 | if err != nil { 69 | debugPrint("[ERROR] %v\n", err) 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/proto/Makefile: -------------------------------------------------------------------------------- 1 | # Go support for Protocol Buffers - Google's data interchange format 2 | # 3 | # Copyright 2010 The Go Authors. All rights reserved. 4 | # https://github.com/golang/protobuf 5 | # 6 | # Redistribution and use in source and binary forms, with or without 7 | # modification, are permitted provided that the following conditions are 8 | # met: 9 | # 10 | # * Redistributions of source code must retain the above copyright 11 | # notice, this list of conditions and the following disclaimer. 12 | # * Redistributions in binary form must reproduce the above 13 | # copyright notice, this list of conditions and the following disclaimer 14 | # in the documentation and/or other materials provided with the 15 | # distribution. 16 | # * Neither the name of Google Inc. nor the names of its 17 | # contributors may be used to endorse or promote products derived from 18 | # this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | install: 33 | go install 34 | 35 | test: install generate-test-pbs 36 | go test 37 | 38 | 39 | generate-test-pbs: 40 | make install 41 | make -C testdata 42 | protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto 43 | make 44 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/html.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. 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 | 5 | package render 6 | 7 | import ( 8 | "html/template" 9 | "net/http" 10 | ) 11 | 12 | type Delims struct { 13 | Left string 14 | Right string 15 | } 16 | 17 | type HTMLRender interface { 18 | Instance(string, interface{}) Render 19 | } 20 | 21 | type HTMLProduction struct { 22 | Template *template.Template 23 | Delims Delims 24 | } 25 | 26 | type HTMLDebug struct { 27 | Files []string 28 | Glob string 29 | Delims Delims 30 | FuncMap template.FuncMap 31 | } 32 | 33 | type HTML struct { 34 | Template *template.Template 35 | Name string 36 | Data interface{} 37 | } 38 | 39 | var htmlContentType = []string{"text/html; charset=utf-8"} 40 | 41 | func (r HTMLProduction) Instance(name string, data interface{}) Render { 42 | return HTML{ 43 | Template: r.Template, 44 | Name: name, 45 | Data: data, 46 | } 47 | } 48 | 49 | func (r HTMLDebug) Instance(name string, data interface{}) Render { 50 | return HTML{ 51 | Template: r.loadTemplate(), 52 | Name: name, 53 | Data: data, 54 | } 55 | } 56 | func (r HTMLDebug) loadTemplate() *template.Template { 57 | if r.FuncMap == nil { 58 | r.FuncMap = template.FuncMap{} 59 | } 60 | if len(r.Files) > 0 { 61 | return template.Must(template.New("").Delims(r.Delims.Left, r.Delims.Right).Funcs(r.FuncMap).ParseFiles(r.Files...)) 62 | } 63 | if len(r.Glob) > 0 { 64 | return template.Must(template.New("").Delims(r.Delims.Left, r.Delims.Right).Funcs(r.FuncMap).ParseGlob(r.Glob)) 65 | } 66 | panic("the HTML debug render was created without files or glob pattern") 67 | } 68 | 69 | func (r HTML) Render(w http.ResponseWriter) error { 70 | r.WriteContentType(w) 71 | 72 | if len(r.Name) == 0 { 73 | return r.Template.Execute(w, r.Data) 74 | } 75 | return r.Template.ExecuteTemplate(w, r.Name, r.Data) 76 | } 77 | 78 | func (r HTML) WriteContentType(w http.ResponseWriter) { 79 | writeContentType(w, htmlContentType) 80 | } 81 | -------------------------------------------------------------------------------- /vendor/github.com/satori/go.uuid/README.md: -------------------------------------------------------------------------------- 1 | # UUID package for Go language 2 | 3 | [![Build Status](https://travis-ci.org/satori/go.uuid.png?branch=master)](https://travis-ci.org/satori/go.uuid) 4 | [![Coverage Status](https://coveralls.io/repos/github/satori/go.uuid/badge.svg?branch=master)](https://coveralls.io/github/satori/go.uuid) 5 | [![GoDoc](http://godoc.org/github.com/satori/go.uuid?status.png)](http://godoc.org/github.com/satori/go.uuid) 6 | 7 | This package provides pure Go implementation of Universally Unique Identifier (UUID). Supported both creation and parsing of UUIDs. 8 | 9 | With 100% test coverage and benchmarks out of box. 10 | 11 | Supported versions: 12 | * Version 1, based on timestamp and MAC address (RFC 4122) 13 | * Version 2, based on timestamp, MAC address and POSIX UID/GID (DCE 1.1) 14 | * Version 3, based on MD5 hashing (RFC 4122) 15 | * Version 4, based on random numbers (RFC 4122) 16 | * Version 5, based on SHA-1 hashing (RFC 4122) 17 | 18 | ## Installation 19 | 20 | Use the `go` command: 21 | 22 | $ go get github.com/satori/go.uuid 23 | 24 | ## Requirements 25 | 26 | UUID package requires Go >= 1.2. 27 | 28 | ## Example 29 | 30 | ```go 31 | package main 32 | 33 | import ( 34 | "fmt" 35 | "github.com/satori/go.uuid" 36 | ) 37 | 38 | func main() { 39 | // Creating UUID Version 4 40 | u1 := uuid.NewV4() 41 | fmt.Printf("UUIDv4: %s\n", u1) 42 | 43 | // Parsing UUID from string input 44 | u2, err := uuid.FromString("6ba7b810-9dad-11d1-80b4-00c04fd430c8") 45 | if err != nil { 46 | fmt.Printf("Something gone wrong: %s", err) 47 | } 48 | fmt.Printf("Successfully parsed: %s", u2) 49 | } 50 | ``` 51 | 52 | ## Documentation 53 | 54 | [Documentation](http://godoc.org/github.com/satori/go.uuid) is hosted at GoDoc project. 55 | 56 | ## Links 57 | * [RFC 4122](http://tools.ietf.org/html/rfc4122) 58 | * [DCE 1.1: Authentication and Security Services](http://pubs.opengroup.org/onlinepubs/9696989899/chap5.htm#tagcjh_08_02_01_01) 59 | 60 | ## Copyright 61 | 62 | Copyright (C) 2013-2016 by Maxim Bublis . 63 | 64 | UUID package released under MIT License. 65 | See [LICENSE](https://github.com/satori/go.uuid/blob/master/LICENSE) for details. 66 | --------------------------------------------------------------------------------