mirror of
https://github.com/cuigh/swirl
synced 2025-05-04 20:11:13 +00:00
Support go modules
This commit is contained in:
parent
aabf017479
commit
6760b1de8b
@ -4,7 +4,7 @@ ADD . .
|
||||
#RUN dep ensure
|
||||
RUN CGO_ENABLED=0 go build -ldflags "-s -w"
|
||||
|
||||
FROM alpine:3.7
|
||||
FROM alpine:3.8
|
||||
LABEL maintainer="cuigh <noname@live.com>"
|
||||
WORKDIR /app
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
374
Gopkg.lock
generated
374
Gopkg.lock
generated
@ -1,374 +0,0 @@
|
||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:214ec96f580117856bef40a4b76c90411fa0ae55d0cfd7e305af9f034574ac10"
|
||||
name = "github.com/CloudyKit/fastprinter"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "74b38d55f37af5d6c05ca11147d616b613a3420e"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:18f735ce6bacedab1b003b2d3eb19dc67cca8228e346af90ffb90ff56ef65f7d"
|
||||
name = "github.com/CloudyKit/jet"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "2b064536b25ab0e9c54245f9e2cc5bd4766033fe"
|
||||
version = "v2.1.2"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:6331095c1906771fbe129fe4a1f94ac5b5a97b0f60f2f80653bb95c3e5dad81e"
|
||||
name = "github.com/Microsoft/go-winio"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "7da180ee92d8bd8bb8c37fc560e673e6557c392f"
|
||||
version = "v0.4.7"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:15d8c38b5661cc3c1e82f0141feaf9743bf84a4cafd87d94893cf1f417a19a60"
|
||||
name = "github.com/boltdb/bolt"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "48ea1b39c25fc1bab3506fbc712ecbaa842c4d2d"
|
||||
source = "https://github.com/coreos/bbolt.git"
|
||||
version = "v1.3.1-coreos.6"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:f4c88ff57ed3d5bae8a8bd829ddde62aeb536504c9fa9deb44c9a936383a7bc8"
|
||||
name = "github.com/cuigh/auxo"
|
||||
packages = [
|
||||
".",
|
||||
"app",
|
||||
"app/flag",
|
||||
"byte/size",
|
||||
"cache",
|
||||
"cache/memory",
|
||||
"config",
|
||||
"data",
|
||||
"data/guid",
|
||||
"data/set",
|
||||
"data/valid",
|
||||
"encoding/yaml",
|
||||
"errors",
|
||||
"ext/files",
|
||||
"ext/reflects",
|
||||
"ext/texts",
|
||||
"ext/times",
|
||||
"log",
|
||||
"log/console",
|
||||
"log/file",
|
||||
"net/web",
|
||||
"net/web/filter",
|
||||
"net/web/filter/auth",
|
||||
"net/web/renderer",
|
||||
"net/web/renderer/jet",
|
||||
"net/web/router",
|
||||
"security",
|
||||
"security/certify",
|
||||
"security/certify/ldap",
|
||||
"security/passwd",
|
||||
"util/cast",
|
||||
"util/debug",
|
||||
"util/i18n",
|
||||
"util/lazy",
|
||||
"util/run",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "9855e0c983b3355b993c7b8af526a30594eccfe8"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:1a8fd913b087787e048c4da5bbba21b6dfa9f1920d1ff6791dbc0af7a640f589"
|
||||
name = "github.com/docker/distribution"
|
||||
packages = [
|
||||
".",
|
||||
"digestset",
|
||||
"reference",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "83389a148052d74ac602f5f1d62f86ff2f3c4aa5"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:959373261310f0f620fad51f79d7967bde832e6b7577ad69d05129c3deb64dda"
|
||||
name = "github.com/docker/docker"
|
||||
packages = [
|
||||
"api",
|
||||
"api/types",
|
||||
"api/types/blkiodev",
|
||||
"api/types/container",
|
||||
"api/types/events",
|
||||
"api/types/filters",
|
||||
"api/types/image",
|
||||
"api/types/mount",
|
||||
"api/types/network",
|
||||
"api/types/registry",
|
||||
"api/types/strslice",
|
||||
"api/types/swarm",
|
||||
"api/types/swarm/runtime",
|
||||
"api/types/time",
|
||||
"api/types/versions",
|
||||
"api/types/volume",
|
||||
"client",
|
||||
"pkg/stdcopy",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "ea579a6194525ce3b98eba04f74de19a106bf918"
|
||||
source = "https://github.com/moby/moby.git"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:a5ecc2e70260a87aa263811281465a5effcfae8a54bac319cee87c4625f04d63"
|
||||
name = "github.com/docker/go-connections"
|
||||
packages = [
|
||||
"nat",
|
||||
"sockets",
|
||||
"tlsconfig",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "3ede32e2033de7505e6500d6c868c2b9ed9f169d"
|
||||
version = "v0.3.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:582d54fcb7233da8dde1dfd2210a5b9675d0685f84246a8d317b07d680c18b1b"
|
||||
name = "github.com/docker/go-units"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "47565b4f722fb6ceae66b95f853feed578a4a51c"
|
||||
version = "v0.3.3"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:2f95ebdbaf8e9173a8957b0a3450ae170e7045db73657e7ff5a238074f33ae58"
|
||||
name = "github.com/globalsign/mgo"
|
||||
packages = [
|
||||
".",
|
||||
"bson",
|
||||
"internal/json",
|
||||
"internal/sasl",
|
||||
"internal/scram",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "f76e4f9da92ecd56e3be26f5ba92580af1ef97b4"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:367baf06b7dbd0ef0bbdd785f6a79f929c96b0c18e9d3b29c0eed1ac3f5db133"
|
||||
name = "github.com/go-ldap/ldap"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9"
|
||||
version = "v2.5.1"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:be23fcfb36ec6756f321989ab9498008c1a8ee4153af546f058863e08ad26b0b"
|
||||
name = "github.com/gobwas/httphead"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "2c6c146eadee0b69f856f87e3e9f1d0cd6aad2f5"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:173252fb31220c85b98c22c3e2e31b3c7b6dae82544ba1a56e5a10c3c599c73a"
|
||||
name = "github.com/gobwas/pool"
|
||||
packages = [
|
||||
".",
|
||||
"internal/pmath",
|
||||
"pbufio",
|
||||
"pbytes",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "fa3125c39d7eca32e1387bb69b1b38dcb31b1e0b"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:21ed3e85cef4521f432e92006872c4ed6a72ac63b1c25c1d2ba079de3fab33bb"
|
||||
name = "github.com/gobwas/ws"
|
||||
packages = [
|
||||
".",
|
||||
"wsutil",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "b93773f50025fc1c14bbd7e97a3b170aae9a0977"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:0a3f6a0c68ab8f3d455f8892295503b179e571b7fefe47cc6c556405d1f83411"
|
||||
name = "github.com/gogo/protobuf"
|
||||
packages = ["proto"]
|
||||
pruneopts = ""
|
||||
revision = "1adfc126b41513cc696b209667c8656ea7aac67c"
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:477cce5379198d3b8230b5c0961c61fcd1b337371cda81318e89a109245d83cb"
|
||||
name = "github.com/mattn/go-shellwords"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "02e3cf038dcea8290e44424da473dd12be796a8a"
|
||||
version = "v1.0.3"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:59fa50d593e5673a0dfffa1852b66fd700c05b35e368680b4b89a68fdb2c1379"
|
||||
name = "github.com/mitchellh/mapstructure"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "00c29f56e2386353d58c599509e8dc3801b0d716"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:5d9b668b0b4581a978f07e7d2e3314af18eb27b3fb5d19b70185b7c575723d11"
|
||||
name = "github.com/opencontainers/go-digest"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "279bed98673dd5bef374d3b6e4b09e2af76183bf"
|
||||
version = "v1.0.0-rc1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:f26c8670b11e29a49c8e45f7ec7f2d5bac62e8fd4e3c0ae1662baa4a697f984a"
|
||||
name = "github.com/opencontainers/image-spec"
|
||||
packages = [
|
||||
"specs-go",
|
||||
"specs-go/v1",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "d60099175f88c47cd379c4738d158884749ed235"
|
||||
version = "v1.0.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:7365acd48986e205ccb8652cc746f09c8b7876030d53710ea6ef7d0bd0dcd7ca"
|
||||
name = "github.com/pkg/errors"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
|
||||
version = "v0.8.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:2f69dc6b2685b31a1a410ef697410aa8a669704fb201d45dbd8c1911728afa75"
|
||||
name = "github.com/prometheus/client_golang"
|
||||
packages = [
|
||||
"api",
|
||||
"api/prometheus/v1",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "967789050ba94deca04a5e84cce8ad472ce313c1"
|
||||
version = "v0.9.0-pre1"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:af21ee3e0a8212f17bb317cd7237f9920bcb2641a291ac111f30f63b3cab817f"
|
||||
name = "github.com/prometheus/common"
|
||||
packages = ["model"]
|
||||
pruneopts = ""
|
||||
revision = "d0f7cd64bda49e08b22ae8a730aa57aa0db125d6"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:47ff8b3229cff95d3cf3738c7a8461fdeacd3f46801e54d301a62500605ce202"
|
||||
name = "golang.org/x/crypto"
|
||||
packages = [
|
||||
"acme",
|
||||
"acme/autocert",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "d6449816ce06963d9d136eee5a56fca5b0616e7e"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:fa627c9ebce73369832336a9eb84b7b495059fc447612d424874ba5b941f052b"
|
||||
name = "golang.org/x/net"
|
||||
packages = [
|
||||
"context",
|
||||
"context/ctxhttp",
|
||||
"internal/socks",
|
||||
"proxy",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "500e7a4f953ddaf55d316b4d3adc516aa0379622"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:b2db832baab812d1cbe1f3f0dc293fdded0cfdfd5fafbcf9ebc2b3c6fc9fa287"
|
||||
name = "golang.org/x/sys"
|
||||
packages = [
|
||||
"unix",
|
||||
"windows",
|
||||
]
|
||||
pruneopts = ""
|
||||
revision = "2f57af4873d00d535c5c9028850aa2152e6a5566"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:3cad99e0d1f94b8c162787c12e59d0a0b9df1ef75590eb145cdd625479091efe"
|
||||
name = "gopkg.in/asn1-ber.v1"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "379148ca0225df7a432012b8df0355c2a2063ac0"
|
||||
version = "v1.2"
|
||||
|
||||
[[projects]]
|
||||
branch = "v2"
|
||||
digest = "1:f0620375dd1f6251d9973b5f2596228cc8042e887cd7f827e4220bc1ce8c30e2"
|
||||
name = "gopkg.in/yaml.v2"
|
||||
packages = ["."]
|
||||
pruneopts = ""
|
||||
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
input-imports = [
|
||||
"github.com/boltdb/bolt",
|
||||
"github.com/cuigh/auxo/app",
|
||||
"github.com/cuigh/auxo/app/flag",
|
||||
"github.com/cuigh/auxo/byte/size",
|
||||
"github.com/cuigh/auxo/cache",
|
||||
"github.com/cuigh/auxo/cache/memory",
|
||||
"github.com/cuigh/auxo/config",
|
||||
"github.com/cuigh/auxo/data",
|
||||
"github.com/cuigh/auxo/data/guid",
|
||||
"github.com/cuigh/auxo/data/set",
|
||||
"github.com/cuigh/auxo/data/valid",
|
||||
"github.com/cuigh/auxo/errors",
|
||||
"github.com/cuigh/auxo/ext/texts",
|
||||
"github.com/cuigh/auxo/ext/times",
|
||||
"github.com/cuigh/auxo/log",
|
||||
"github.com/cuigh/auxo/net/web",
|
||||
"github.com/cuigh/auxo/net/web/filter",
|
||||
"github.com/cuigh/auxo/net/web/filter/auth",
|
||||
"github.com/cuigh/auxo/net/web/renderer/jet",
|
||||
"github.com/cuigh/auxo/security",
|
||||
"github.com/cuigh/auxo/security/certify",
|
||||
"github.com/cuigh/auxo/security/certify/ldap",
|
||||
"github.com/cuigh/auxo/security/passwd",
|
||||
"github.com/cuigh/auxo/util/cast",
|
||||
"github.com/cuigh/auxo/util/i18n",
|
||||
"github.com/cuigh/auxo/util/lazy",
|
||||
"github.com/cuigh/auxo/util/run",
|
||||
"github.com/docker/distribution",
|
||||
"github.com/docker/docker/api/types",
|
||||
"github.com/docker/docker/api/types/container",
|
||||
"github.com/docker/docker/api/types/filters",
|
||||
"github.com/docker/docker/api/types/image",
|
||||
"github.com/docker/docker/api/types/mount",
|
||||
"github.com/docker/docker/api/types/network",
|
||||
"github.com/docker/docker/api/types/swarm",
|
||||
"github.com/docker/docker/api/types/versions",
|
||||
"github.com/docker/docker/api/types/volume",
|
||||
"github.com/docker/docker/client",
|
||||
"github.com/docker/docker/pkg/stdcopy",
|
||||
"github.com/docker/go-connections/nat",
|
||||
"github.com/docker/go-units",
|
||||
"github.com/globalsign/mgo",
|
||||
"github.com/globalsign/mgo/bson",
|
||||
"github.com/gobwas/ws",
|
||||
"github.com/gobwas/ws/wsutil",
|
||||
"github.com/mattn/go-shellwords",
|
||||
"github.com/mitchellh/mapstructure",
|
||||
"github.com/pkg/errors",
|
||||
"github.com/prometheus/client_golang/api",
|
||||
"github.com/prometheus/client_golang/api/prometheus/v1",
|
||||
"github.com/prometheus/common/model",
|
||||
"gopkg.in/yaml.v2",
|
||||
]
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
51
Gopkg.toml
51
Gopkg.toml
@ -1,51 +0,0 @@
|
||||
required = ["github.com/docker/distribution"]
|
||||
|
||||
[[override]]
|
||||
branch = "master"
|
||||
name = "github.com/gobwas/pool"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/cuigh/auxo"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/docker/docker"
|
||||
branch = "master"
|
||||
source = "https://github.com/moby/moby.git"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/docker/go-connections"
|
||||
version = "0.3.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/docker/go-units"
|
||||
version = "0.3.2"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/mattn/go-shellwords"
|
||||
version = "1.0.3"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/mitchellh/mapstructure"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/pkg/errors"
|
||||
version = "0.8.0"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/globalsign/mgo"
|
||||
|
||||
[[constraint]]
|
||||
branch = "v2"
|
||||
name = "gopkg.in/yaml.v2"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/docker/distribution"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/boltdb/bolt"
|
||||
source = "https://github.com/coreos/bbolt.git"
|
||||
version = "1.3.1-coreos.6"
|
@ -165,10 +165,9 @@ swirl.scale | Service auto scaling | `swirl.scale=min=1,max=5,cpu=30:50`
|
||||
|
||||
## Build
|
||||
|
||||
**Swirl** use `dep` as dependency management tool. You can build **Swirl**
|
||||
To build **Swirl** from source, you need `go1.11` installed.
|
||||
|
||||
```sh
|
||||
$ dep ensure
|
||||
$ go build
|
||||
```
|
||||
|
||||
|
@ -145,7 +145,7 @@ func containerConnect(ctx web.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
conn, _, _, err := ws.UpgradeHTTP(ctx.Request(), ctx.Response(), nil)
|
||||
conn, _, _, err := ws.UpgradeHTTP(ctx.Request(), ctx.Response())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
32
go.mod
Normal file
32
go.mod
Normal file
@ -0,0 +1,32 @@
|
||||
module github.com/cuigh/swirl
|
||||
|
||||
require (
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a
|
||||
github.com/CloudyKit/jet v2.1.2+incompatible
|
||||
github.com/Microsoft/go-winio v0.4.11
|
||||
github.com/boltdb/bolt v1.3.1
|
||||
github.com/cuigh/auxo v0.0.0-20180910024834-ee4737b5b47d
|
||||
github.com/docker/distribution v0.0.0-20180327202408-83389a148052
|
||||
github.com/docker/docker v0.0.0-20180415161252-ea579a619452
|
||||
github.com/docker/go-connections v0.4.0
|
||||
github.com/docker/go-units v0.3.3
|
||||
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb
|
||||
github.com/go-ldap/ldap v2.5.1+incompatible
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee
|
||||
github.com/gobwas/pool v0.2.0
|
||||
github.com/gobwas/ws v1.0.0
|
||||
github.com/gogo/protobuf v1.1.1
|
||||
github.com/mattn/go-shellwords v1.0.3
|
||||
github.com/mitchellh/mapstructure v1.0.0
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1
|
||||
github.com/opencontainers/image-spec v1.0.1
|
||||
github.com/pkg/errors v0.8.0
|
||||
github.com/prometheus/client_golang v0.9.0-pre1
|
||||
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e
|
||||
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e
|
||||
gopkg.in/asn1-ber.v1 v1.0.0-20170511165959-379148ca0225
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.1
|
||||
)
|
74
go.sum
Normal file
74
go.sum
Normal file
@ -0,0 +1,74 @@
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a h1:3SgJcK9l5uPdBC/X17wanyJAMxM33+4ZhEIV96MIH8U=
|
||||
github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a/go.mod h1:EFZQ978U7x8IRnstaskI3IysnWY5Ao3QgZUKOXlsAdw=
|
||||
github.com/CloudyKit/jet v2.1.2+incompatible h1:ybZoYzMBdoijK6I+Ke3vg9GZsmlKo/ZhKdNMWz0P26c=
|
||||
github.com/CloudyKit/jet v2.1.2+incompatible/go.mod h1:HPYO+50pSWkPoj9Q/eq0aRGByCL6ScRlUmiEX5Zgm+w=
|
||||
github.com/Microsoft/go-winio v0.4.7/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
|
||||
github.com/boltdb/bolt v1.3.1 h1:JQmyP4ZBrce+ZQu0dY660FMfatumYDLun9hBCUVIkF4=
|
||||
github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps=
|
||||
github.com/cuigh/auxo v0.0.0-20180417034426-9855e0c983b3 h1:7hg8vqZm4xNYhESUZTcO0XsLsGmLjEKn0H3Zf0CLHCE=
|
||||
github.com/cuigh/auxo v0.0.0-20180417034426-9855e0c983b3/go.mod h1:d1PEypAL3Oqwb3OILA0KaBNmhz7gSXdzRABgefRbHr8=
|
||||
github.com/cuigh/auxo v0.0.0-20180910024834-ee4737b5b47d h1:i842L3OQIgdT5APCnJdU1bMHlvVFcsm6bAJvBYETBBY=
|
||||
github.com/cuigh/auxo v0.0.0-20180910024834-ee4737b5b47d/go.mod h1:d1PEypAL3Oqwb3OILA0KaBNmhz7gSXdzRABgefRbHr8=
|
||||
github.com/docker/distribution v0.0.0-20180327202408-83389a148052 h1:bYklS+YB8BZreSEY+/WqaH+S8upfuYf0Hq/EmNOQMIA=
|
||||
github.com/docker/distribution v0.0.0-20180327202408-83389a148052/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v0.0.0-20180415161252-ea579a619452 h1:3DHHYhTKAP1ZgL0g+msknSuFuZBA0UW6BqcAA5qsWWc=
|
||||
github.com/docker/docker v0.0.0-20180415161252-ea579a619452/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/go-connections v0.3.0 h1:3lOnM9cSzgGwx8VfK/NGOW5fLQ0GjIlCkaktF+n1M6o=
|
||||
github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
|
||||
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
|
||||
github.com/docker/go-units v0.3.3 h1:Xk8S3Xj5sLGlG5g67hJmYMmUgXv5N4PhkjJHHqrwnTk=
|
||||
github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
|
||||
github.com/globalsign/mgo v0.0.0-20180403085842-f76e4f9da92e h1:hmrbHva/wKD6X4M7pgHVbg/KfVV1wwgr1NEkQaVD3rU=
|
||||
github.com/globalsign/mgo v0.0.0-20180403085842-f76e4f9da92e/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
|
||||
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb h1:D4uzjWwKYQ5XnAvUbuvHW93esHg7F8N/OYeBBcJoTr0=
|
||||
github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
|
||||
github.com/go-ldap/ldap v2.5.1+incompatible h1:Opaoft5zMW8IU/VRULB0eGMBQ9P5buRvCW6sFTRmMn8=
|
||||
github.com/go-ldap/ldap v2.5.1+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
|
||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
||||
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
|
||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
||||
github.com/gobwas/ws v0.1.0 h1:AtmD7V/hwKfZs+A87A3ajWiTtooOM5DSbRks2ELDmFA=
|
||||
github.com/gobwas/ws v0.1.0/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/gobwas/ws v1.0.0 h1:1WdyfgUcImUfVBvYbsW2krIsnko+1QU2t45soaF8v1M=
|
||||
github.com/gobwas/ws v1.0.0/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
||||
github.com/gogo/protobuf v1.0.0 h1:2jyBKDKU/8v3v2xVR2PtiWQviFUyiaGk2rpfyFT8rTM=
|
||||
github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo=
|
||||
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
|
||||
github.com/mattn/go-shellwords v1.0.3 h1:K/VxK7SZ+cvuPgFSLKi5QPI9Vr/ipOf4C1gN+ntueUk=
|
||||
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238 h1:+MZW2uvHgN8kYvksEN3f7eFL2wpzk0GxmlFsMybWc7E=
|
||||
github.com/mitchellh/mapstructure v0.0.0-20180220230111-00c29f56e238/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/mitchellh/mapstructure v1.0.0 h1:vVpGvMXJPqSDh2VYHF7gsfQj8Ncx+Xw5Y1KHeTRY+7I=
|
||||
github.com/mitchellh/mapstructure v1.0.0/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
|
||||
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
|
||||
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
|
||||
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
|
||||
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
|
||||
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/prometheus/client_golang v0.9.0-pre1 h1:AWTOhsOI9qxeirTuA0A4By/1Es1+y9EcCGY6bBZ2fhM=
|
||||
github.com/prometheus/client_golang v0.9.0-pre1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
|
||||
github.com/prometheus/common v0.0.0-20180413074202-d0f7cd64bda4 h1:rPmL0pCWefiqV7RjMYuBUrLbMJmNVjRKz82caELPTUQ=
|
||||
github.com/prometheus/common v0.0.0-20180413074202-d0f7cd64bda4/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e h1:n/3MEhJQjQxrOUCzh1Y3Re6aJUUWRp2M9+Oc3eVn/54=
|
||||
github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
|
||||
golang.org/x/crypto v0.0.0-20180411161317-d6449816ce06 h1:EOqG0JqGlLr+punVB69jvWCv/ErZKGlC7PMdyHfv+Bc=
|
||||
golang.org/x/crypto v0.0.0-20180411161317-d6449816ce06/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b h1:2b9XGzhjiYsYPnKXoEfL7klWZQIt8IfyRCz62gCqqlQ=
|
||||
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/net v0.0.0-20180415214307-500e7a4f953d h1:YbPBOQdSo5fFDiZgBDcltE4XjtOLk2wUw16mtGFpoOg=
|
||||
golang.org/x/net v0.0.0-20180415214307-500e7a4f953d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd h1:nTDtHvHSdCn1m6ITfMRqtOd/9+7a3s8RBNOZ3eYZzJA=
|
||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
||||
golang.org/x/sys v0.0.0-20180416112224-2f57af4873d0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
gopkg.in/asn1-ber.v1 v1.0.0-20170511165959-379148ca0225 h1:JBwmEvLfCqgPcIq8MjVMQxsF3LVL4XG/HH0qiG0+IFY=
|
||||
gopkg.in/asn1-ber.v1 v1.0.0-20170511165959-379148ca0225/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
|
||||
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
12
main.go
12
main.go
@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/pkg/errors"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
|
||||
@ -11,7 +11,6 @@ import (
|
||||
_ "github.com/cuigh/auxo/cache/memory"
|
||||
"github.com/cuigh/auxo/config"
|
||||
"github.com/cuigh/auxo/data/valid"
|
||||
"github.com/cuigh/auxo/log"
|
||||
"github.com/cuigh/auxo/net/web"
|
||||
"github.com/cuigh/auxo/net/web/filter"
|
||||
"github.com/cuigh/auxo/net/web/filter/auth"
|
||||
@ -30,17 +29,15 @@ func main() {
|
||||
app.Name = "Swirl"
|
||||
app.Version = "0.8.3"
|
||||
app.Desc = "A web management UI for Docker, focused on swarm cluster"
|
||||
app.Action = func(ctx *app.Context) {
|
||||
app.Action = func(ctx *app.Context) error {
|
||||
err := config.UnmarshalOption("swirl", &misc.Options)
|
||||
if err != nil {
|
||||
log.Get(app.Name).Error("Failed to load options: ", err)
|
||||
os.Exit(1)
|
||||
return errors.Wrap(err, "Failed to load options")
|
||||
}
|
||||
|
||||
setting, err := biz.Setting.Get()
|
||||
if err != nil {
|
||||
log.Get(app.Name).Error("Failed to load settings: ", err)
|
||||
os.Exit(1)
|
||||
return errors.Wrap(err, "Failed to load settings: ")
|
||||
}
|
||||
|
||||
biz.Stack.Migrate()
|
||||
@ -48,6 +45,7 @@ func main() {
|
||||
scaler.Start()
|
||||
}
|
||||
app.Run(server(setting))
|
||||
return nil
|
||||
}
|
||||
app.Flags.Register(flag.All)
|
||||
app.Start()
|
||||
|
Loading…
Reference in New Issue
Block a user