Compare commits

..

20 Commits

Author SHA1 Message Date
dependabot[bot]
828ab4fdc2 Bump github.com/gobuffalo/packr/v2 from 2.8.1 to 2.8.3
Bumps [github.com/gobuffalo/packr/v2](https://github.com/gobuffalo/packr) from 2.8.1 to 2.8.3.
- [Release notes](https://github.com/gobuffalo/packr/releases)
- [Changelog](https://github.com/gobuffalo/packr/blob/master/.goreleaser.yml)
- [Commits](https://github.com/gobuffalo/packr/compare/v2.8.1...v2.8.3)

---
updated-dependencies:
- dependency-name: github.com/gobuffalo/packr/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-13 04:18:58 +00:00
dependabot[bot]
0d278f83ab Bump github.com/cheggaaa/pb/v3 from 3.0.5 to 3.1.0 (#662)
Bumps [github.com/cheggaaa/pb/v3](https://github.com/cheggaaa/pb) from 3.0.5 to 3.1.0.
- [Release notes](https://github.com/cheggaaa/pb/releases)
- [Commits](https://github.com/cheggaaa/pb/compare/v3.0.5...v3.1.0)

---
updated-dependencies:
- dependency-name: github.com/cheggaaa/pb/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-13 12:17:50 +08:00
Ahsan Nabi Dar
d91a7a09e3 Update README.md (#619)
fix file name in example
2021-06-10 18:43:14 +08:00
Minghe
bdece853f2 adopt new syntax (#616) 2021-06-09 09:53:21 +08:00
Minghe
416024b32e down grade the golang version to 1.15 (#615) 2021-06-08 23:47:52 +08:00
Minghe
525e19b4ac fix(Dockerfile):pack the static file into binary (#614)
* fix(Dockerfile): update the static file via go get -u github.com/gobuffalo/packr/v2/...
go get -u github.com/gobuffalo/packr/v2/packr2
packr2

* disable lint since it's out date

* bump version
2021-06-08 17:54:19 +08:00
dependabot[bot]
258f7bc2e0 Bump github.com/google/uuid from 1.1.4 to 1.2.0 (#596)
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.4 to 1.2.0.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.1.4...v1.2.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-06 17:06:28 +08:00
dependabot-preview[bot]
a861685d19 Bump github.com/google/uuid from 1.1.3 to 1.1.4 (#589)
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.3 to 1.1.4.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.1.3...v1.1.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-07 13:32:33 +08:00
dependabot-preview[bot]
01059aa9d1 Create Dependabot config file (#590)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-07 13:32:14 +08:00
dependabot-preview[bot]
5ec875215b Bump github.com/golang/protobuf from 1.3.3 to 1.4.3 (#574)
Bumps [github.com/golang/protobuf](https://github.com/golang/protobuf) from 1.3.3 to 1.4.3.
- [Release notes](https://github.com/golang/protobuf/releases)
- [Commits](https://github.com/golang/protobuf/compare/v1.3.3...v1.4.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Minghe <h.minghe@gmail.com>
2021-01-04 11:05:31 +08:00
dependabot-preview[bot]
c8507558d6 Bump github.com/urfave/cli from 1.22.4 to 1.22.5 (#578)
Bumps [github.com/urfave/cli](https://github.com/urfave/cli) from 1.22.4 to 1.22.5.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v1.22.4...v1.22.5)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Minghe <h.minghe@gmail.com>
2021-01-04 10:52:20 +08:00
dependabot-preview[bot]
4e3649cb93 Bump github.com/google/uuid from 1.1.2 to 1.1.3 (#587)
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/google/uuid/releases)
- [Commits](https://github.com/google/uuid/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Minghe <h.minghe@gmail.com>
2021-01-04 10:42:13 +08:00
dependabot-preview[bot]
5f554b4b96 Bump github.com/otiai10/copy from 1.3.0 to 1.4.2 (#588)
Bumps [github.com/otiai10/copy](https://github.com/otiai10/copy) from 1.3.0 to 1.4.2.
- [Release notes](https://github.com/otiai10/copy/releases)
- [Commits](https://github.com/otiai10/copy/compare/v1.3.0...v1.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-01-04 10:24:31 +08:00
dependabot-preview[bot]
7924f64eed Bump github.com/gobuffalo/packr/v2 from 2.8.0 to 2.8.1 (#580)
Bumps [github.com/gobuffalo/packr/v2](https://github.com/gobuffalo/packr) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/gobuffalo/packr/releases)
- [Changelog](https://github.com/gobuffalo/packr/blob/master/.goreleaser.yml)
- [Commits](https://github.com/gobuffalo/packr/compare/v2.8.0...v2.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-12-17 10:07:16 +08:00
dependabot-preview[bot]
1379ceb74c Bump google.golang.org/grpc from 1.32.0 to 1.34.0 (#581)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.32.0 to 1.34.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.32.0...v1.34.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Minghe <h.minghe@gmail.com>
2020-12-16 18:10:56 +08:00
dependabot-preview[bot]
0527e0f301 Bump github.com/otiai10/copy from 1.2.0 to 1.3.0 (#584)
Bumps [github.com/otiai10/copy](https://github.com/otiai10/copy) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/otiai10/copy/releases)
- [Commits](https://github.com/otiai10/copy/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-12-16 17:55:47 +08:00
kuaima
299e41da36 Update README.md (#582) 2020-12-11 19:55:31 +08:00
Minghe Huang
1af66e72c2 bump version 2020-11-02 13:34:37 +08:00
dependabot[bot]
5ee7dbe48d Bump node-fetch from 2.6.0 to 2.6.1 in /assets/dockerfiles/base/node (#569)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Minghe <h.minghe@gmail.com>
2020-10-15 13:52:12 +08:00
dependabot-preview[bot]
0ce73aea36 Bump google.golang.org/grpc from 1.21.0 to 1.32.0 (#573)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.21.0 to 1.32.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.21.0...v1.32.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-10-15 13:51:36 +08:00
37 changed files with 1016 additions and 431 deletions

8
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10

View File

@@ -17,9 +17,9 @@ jobs:
run: |
kind create cluster
- name: lint
run: |
make lint
# - name: lint
# run: |
# make lint
- name: unit test
env:

View File

@@ -22,10 +22,10 @@ jobs:
run: |
kind create cluster
- name: lint
run: |
docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint \
golangci-lint run -v
# - name: lint
# run: |
# docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint \
# golangci-lint run -v
- name: unit test
env:

View File

@@ -21,16 +21,14 @@ archives:
files:
- README.md
brews:
-
github:
owner: metrue
name: homebrew-fx
- homepage: "https://github.com/metrue/fx"
description: "fx, a simple but powerful Function as a Service build tools"
folder: Formula
commit_author:
name: metrue
email: h.minghe@gmail.com
folder: Formula
caveats: ""
homepage: "https://github.com/metrue/fx"
description: "fx, a simple but powerful Function as a Service build tools"
tap:
owner: metrue
name: homebrew-fx
dependencies:
- docker

View File

@@ -1,4 +1,4 @@
FROM golang:latest
FROM golang:1.15
# dependency management
RUN go get github.com/gin-gonic/gin

View File

@@ -12,6 +12,15 @@
"vary": "^1.1.2"
}
},
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
"integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
"requires": {
"mime-types": "~2.1.24",
"negotiator": "0.6.2"
}
},
"ajv": {
"version": "6.12.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
@@ -23,6 +32,11 @@
"uri-js": "^4.2.2"
}
},
"any-promise": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz",
"integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8="
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@@ -72,11 +86,41 @@
"resolved": "https://registry.npmjs.org/bintrees/-/bintrees-1.0.1.tgz",
"integrity": "sha1-DmVcm5wkNeqraL9AJyJtK1WjRSQ="
},
"bytes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
},
"cache-content-type": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz",
"integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==",
"requires": {
"mime-types": "^2.1.18",
"ylru": "^1.2.0"
}
},
"caseless": {
"version": "0.12.0",
"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw="
},
"co": {
"version": "4.6.0",
"resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
"integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ="
},
"co-body": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/co-body/-/co-body-6.0.0.tgz",
"integrity": "sha512-9ZIcixguuuKIptnY8yemEOuhb71L/lLf+Rl5JfJEUiDNJk0e02MBt7BPxR2GEh5mw8dPthQYR4jPI/BnS1MQgw==",
"requires": {
"inflation": "^2.0.0",
"qs": "^6.5.2",
"raw-body": "^2.3.3",
"type-is": "^1.6.16"
}
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
@@ -85,6 +129,19 @@
"delayed-stream": "~1.0.0"
}
},
"content-disposition": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
"integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
"requires": {
"safe-buffer": "5.1.2"
}
},
"content-type": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
},
"cookies": {
"version": "0.8.0",
"resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz",
@@ -94,6 +151,11 @@
"keygrip": "~1.1.0"
}
},
"copy-to": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/copy-to/-/copy-to-2.0.1.tgz",
"integrity": "sha1-JoD7uAaKSNCGVrYJgJK9r8kG9KU="
},
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
@@ -115,11 +177,21 @@
"ms": "^2.1.1"
}
},
"deep-equal": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz",
"integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU="
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
},
"depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -204,6 +276,11 @@
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
"get-port": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz",
"integrity": "sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw="
},
"getpass": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
@@ -226,6 +303,15 @@
"har-schema": "^2.0.0"
}
},
"http-assert": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.4.1.tgz",
"integrity": "sha512-rdw7q6GTlibqVVbXr0CKelfV5iY8G2HqEUkhSk297BMbSpSL8crXC+9rjKoMcZZEsksX30le6f/4ul4E28gegw==",
"requires": {
"deep-equal": "~1.0.1",
"http-errors": "~1.7.2"
}
},
"http-errors": {
"version": "1.7.3",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz",
@@ -255,11 +341,29 @@
"sshpk": "^1.7.0"
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"inflation": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/inflation/-/inflation-2.0.0.tgz",
"integrity": "sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8="
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is-generator-function": {
"version": "1.0.7",
"resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.7.tgz",
"integrity": "sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw=="
},
"is-typedarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
@@ -309,6 +413,94 @@
"tsscmp": "1.0.6"
}
},
"koa": {
"version": "2.13.0",
"resolved": "https://registry.npmjs.org/koa/-/koa-2.13.0.tgz",
"integrity": "sha512-i/XJVOfPw7npbMv67+bOeXr3gPqOAw6uh5wFyNs3QvJ47tUx3M3V9rIE0//WytY42MKz4l/MXKyGkQ2LQTfLUQ==",
"requires": {
"accepts": "^1.3.5",
"cache-content-type": "^1.0.0",
"content-disposition": "~0.5.2",
"content-type": "^1.0.4",
"cookies": "~0.8.0",
"debug": "~3.1.0",
"delegates": "^1.0.0",
"depd": "^1.1.2",
"destroy": "^1.0.4",
"encodeurl": "^1.0.2",
"escape-html": "^1.0.3",
"fresh": "~0.5.2",
"http-assert": "^1.3.0",
"http-errors": "^1.6.3",
"is-generator-function": "^1.0.7",
"koa-compose": "^4.1.0",
"koa-convert": "^1.2.0",
"on-finished": "^2.3.0",
"only": "~0.0.2",
"parseurl": "^1.3.2",
"statuses": "^1.5.0",
"type-is": "^1.6.16",
"vary": "^1.1.2"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
},
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
}
}
},
"koa-bodyparser": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/koa-bodyparser/-/koa-bodyparser-4.3.0.tgz",
"integrity": "sha512-uyV8G29KAGwZc4q/0WUAjH+Tsmuv9ImfBUF2oZVyZtaeo0husInagyn/JH85xMSxM0hEk/mbCII5ubLDuqW/Rw==",
"requires": {
"co-body": "^6.0.0",
"copy-to": "^2.0.1"
}
},
"koa-compose": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz",
"integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw=="
},
"koa-convert": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz",
"integrity": "sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA=",
"requires": {
"co": "^4.6.0",
"koa-compose": "^3.0.0"
},
"dependencies": {
"koa-compose": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-3.2.1.tgz",
"integrity": "sha1-qFzLQLfZhtjlo0Wzoazo6rz1Tec=",
"requires": {
"any-promise": "^1.1.0"
}
}
}
},
"media-typer": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
},
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
@@ -337,10 +529,15 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
},
"node-fetch": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw=="
},
"oauth-sign": {
"version": "0.9.0",
@@ -355,6 +552,16 @@
"ee-first": "1.1.1"
}
},
"only": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz",
"integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q="
},
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
},
"path-to-regexp": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.1.0.tgz",
@@ -393,6 +600,17 @@
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
},
"raw-body": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz",
"integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==",
"requires": {
"bytes": "3.1.0",
"http-errors": "1.7.3",
"iconv-lite": "0.4.24",
"unpipe": "1.0.0"
}
},
"request": {
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
@@ -567,6 +785,20 @@
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q="
},
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
"requires": {
"media-typer": "0.3.0",
"mime-types": "~2.1.24"
}
},
"unpipe": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
@@ -594,6 +826,11 @@
"core-util-is": "1.0.2",
"extsprintf": "^1.2.0"
}
},
"ylru": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz",
"integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ=="
}
}
}

View File

@@ -16,7 +16,7 @@
"is-generator-function": "^1.0.6",
"koa": "^2.3.0",
"koa-bodyparser": "^4.2.0",
"node-fetch": "^2.6.0",
"node-fetch": "^2.6.1",
"swagger-stats": "^0.95.17"
}
}

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package crystal
import _ "github.com/metrue/fx/packrd"

8
bundler/d/d-packr.go Normal file
View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package d
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package golang
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package java
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package julia
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package node
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package perl
import _ "github.com/metrue/fx/packrd"

8
bundler/php/php-packr.go Normal file
View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package php
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package python
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package ruby
import _ "github.com/metrue/fx/packrd"

View File

@@ -0,0 +1,8 @@
// +build !skippackr
// Code generated by github.com/gobuffalo/packr/v2. DO NOT EDIT.
// You can use the "packr clean" command to clean up this,
// and any other packr generated files.
package rust
import _ "github.com/metrue/fx/packrd"

View File

@@ -1,6 +0,0 @@
fx support Observerity for Node/JavaScript function natively.
```
ui: http://<host>:<port>/swagger-stats/ux
promethus: http://<host>:<port>/swagger-stats/metrics
```

View File

@@ -10,7 +10,7 @@ def fx(request):
then deploy it with `fx up` command,
```shell
$ fx up -p 8080:3000 func.go
$ fx up -p 8080:3000 func.py
```
test it using `curl`

View File

@@ -11,7 +11,7 @@ end
then deploy it with `fx up` command,
```shell
$ fx up -p 8080:3000 func.go
$ fx up -p 8080:3000 func.rb
```
test it using `curl`

View File

@@ -1,48 +0,0 @@
up:
fx up -n ping.go.0 -p 12341 --force fx.go
fx up -n ping.java.0 -p 12342 --force fx.java
fx up -n ping.js.0 -p 12343 --force fx.js
fx up -n ping.pl.0 -p 12344 --force fx.pl
fx up -n ping.py.0 -p 12345 --force fx.py
fx up -n ping.rb.0 -p 12346 --force fx.rb
fx up -n ping.rs.0 -p 12347 --force fx.rs
fx up -n ping.cr.0 -p 12348 --force fx.cr
fx up -n ping.d.0 -p 12349 --force fx.d
down:
fx down ping.go.0
fx down ping.java.0
fx down ping.js.0
fx down ping.pl.0
fx down ping.py.0
fx down ping.rb.0
fx down ping.rs.0
fx down ping.cr.0
fx down ping.d.0
l:
fx list
t:
@curl 127.0.0.1:12341
@echo ""
@curl 127.0.0.1:12343
@echo ""
@curl 127.0.0.1:12344
@echo ""
@curl 127.0.0.1:12345
@echo ""
@curl 127.0.0.1:12346
@echo ""
@curl 127.0.0.1:12348
@echo ""
@curl 127.0.0.1:12349
@echo ""
@curl -X POST -H 'Content-Type: application/json' 127.0.0.1:12342 -d '{"a": 1, "b": 1 }'
@echo ""
@curl -X POST -H 'Content-Type: application/json' 127.0.0.1:12347 -d '{"a": 1, "b": 2 }'
@echo ""
@curl -X POST -H 'Content-Type: application/json' 127.0.0.1:12349 -d '{"a": 1, "b": 3 }'
@echo ""
b:
ab -n 10000 -c 10 http://127.0.0.1:12343/
m:
open http://127.0.0.1:12343/swagger-stats/ux
open http://127.0.0.1:12343/swagger-stats/metrics

View File

@@ -1,63 +0,0 @@
{"version": 2, "width": 204, "height": 64, "timestamp": 1602561588, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}}
[1.881844, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
[2.04323, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;32m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m "]
[2.043443, "o", "\u001b[K"]
[2.043636, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[2.85694, "o", "f"]
[3.022723, "o", "\bfg"]
[3.167563, "o", "\u001b[?1l\u001b>"]
[3.167764, "o", "\u001b[?2004l\r\r\n"]
[3.16933, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
[3.169498, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
[3.169535, "o", "\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007"]
[3.169994, "o", "\u001b]1;..unctions/demo\u0007"]
[3.326735, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
[3.326893, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[4.239502, "o", "v"]
[4.355434, "o", "\bvi"]
[5.162926, "o", "\b\bv \b"]
[5.314817, "o", "\b \b"]
[5.601643, "o", "f"]
[5.69716, "o", "\bfg"]
[5.833094, "o", "\u001b[?1l\u001b>"]
[5.833277, "o", "\u001b[?2004l\r\r\n"]
[5.833948, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
[5.834301, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
[5.957947, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
[5.958194, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[6.547304, "o", "f"]
[6.707392, "o", "\bfg"]
[6.8212, "o", "\u001b[?1l\u001b>"]
[6.821279, "o", "\u001b[?2004l"]
[6.82149, "o", "\r\r\n"]
[6.822082, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
[6.82219, "o", "fg: no current job\r\n"]
[6.822268, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
[6.82273, "o", "\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
[6.963467, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
[6.963641, "o", "\u001b[?1h\u001b="]
[6.963776, "o", "\u001b[?2004h"]
[13.288488, "o", "f"]
[13.364954, "o", "\bfg"]
[13.511865, "o", "\u001b[?1l\u001b>"]
[13.512049, "o", "\u001b[?2004l\r\r\n"]
[13.512809, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
[13.513361, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
[13.745801, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
[13.746011, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[13.969195, "o", "f"]
[14.102194, "o", "\bfg"]
[14.236118, "o", "\u001b[?1l\u001b>"]
[14.236332, "o", "\u001b[?2004l\r\r\n"]
[14.237195, "o", "\u001b]2;fg\u0007\u001b]1;fg\u0007"]
[14.237358, "o", "fg: no current job\r\n\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m \r \r"]
[14.237948, "o", "\u001b]2;minhuang@FVFXG11WHV2J: ~/projects/fx/examples/functions/demo\u0007\u001b]1;..unctions/demo\u0007"]
[14.410771, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[01;31m➜ \u001b[36mdemo\u001b[00m \u001b[01;34mgit:(\u001b[31mdemo\u001b[34m) \u001b[33m✗\u001b[00m \u001b[K"]
[14.410938, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[14.812678, "o", "e"]
[15.058809, "o", "\bex"]
[15.147778, "o", "i"]
[15.356224, "o", "t"]
[15.604192, "o", "\u001b[?1l\u001b>"]
[15.604361, "o", "\u001b[?2004l\r\r\n"]
[15.606869, "o", "\u001b]2;exit\u0007\u001b]1;exit\u0007"]

View File

@@ -1,3 +0,0 @@
def fx(ctx)
"hello world, crystal"
end

View File

@@ -1,6 +0,0 @@
import std.json;
long executeFx(JSONValue input)
{
return input["a"].integer + input["b"].integer;
}

View File

@@ -1,9 +0,0 @@
package main
import "github.com/gin-gonic/gin"
func fx(ctx *gin.Context) {
ctx.JSON(200, gin.H{
"message": "hello world, Go",
})
}

View File

@@ -1,11 +0,0 @@
package fx;
import org.json.JSONObject;
public class Fx {
public int handle(JSONObject input) {
String a = input.get("a").toString();
String b = input.get("b").toString();
return Integer.parseInt(a) + Integer.parseInt(b);
}
}

View File

@@ -1,8 +0,0 @@
struct Input
a::Number
b::Number
end
fx = function(input::Input)
return input.a + input.b
end

View File

@@ -1,3 +0,0 @@
module.exports = (ctx) => {
ctx.body = 'hello world, JavaScript'
}

View File

@@ -1,5 +0,0 @@
sub fx {
return 'hello world, Perl'
}
1;

View File

@@ -1,2 +0,0 @@
def fx(request):
return "hello world, Python"

View File

@@ -1,3 +0,0 @@
def fx(ctx)
ctx[:response].body = "hello world, Ruby"
end

View File

@@ -1,18 +0,0 @@
pub mod fns {
#[derive(Serialize)]
pub struct Response {
pub result: i32,
}
#[derive(Deserialize)]
pub struct Request {
pub a: i32,
pub b: i32,
}
pub fn func(req: Request) -> Response {
Response {
result: req.a + req.b,
}
}
}

2
fx.go
View File

@@ -19,7 +19,7 @@ import (
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
)
const version = "0.9.46"
const version = "0.9.48"
func init() {
go checkForUpdate()

31
go.mod
View File

@@ -6,27 +6,22 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Microsoft/go-winio v0.4.14 // indirect
github.com/apex/log v1.8.0
github.com/cheggaaa/pb/v3 v3.0.5
github.com/cheggaaa/pb/v3 v3.1.0
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/docker v0.0.0-20190313072916-46036c230805
github.com/docker/go-connections v0.4.0
github.com/docker/go-units v0.3.3 // indirect
github.com/dsnet/compress v0.0.1 // indirect
github.com/gin-gonic/gin v1.6.3
github.com/gobuffalo/envy v1.9.0 // indirect
github.com/gobuffalo/packd v1.0.0
github.com/gobuffalo/packr v1.30.1 // indirect
github.com/gobuffalo/packr/v2 v2.8.0
github.com/golang/mock v1.4.4
github.com/golang/protobuf v1.3.3
github.com/gobuffalo/packd v1.0.1
github.com/gobuffalo/packr/v2 v2.8.3
github.com/golang/mock v1.5.0
github.com/golang/snappy v0.0.1 // indirect
github.com/google/go-querystring v1.0.0
github.com/google/uuid v1.1.2
github.com/google/uuid v1.2.0
github.com/googleapis/gnostic v0.3.1 // indirect
github.com/gorilla/mux v1.7.3 // indirect
github.com/imdario/mergo v0.3.7 // indirect
github.com/karrick/godirwalk v1.16.1 // indirect
github.com/konsorten/go-windows-terminal-sequences v1.0.3 // indirect
github.com/logrusorgru/aurora v0.0.0-20191017060258-dc85c304c434
github.com/metrue/go-ssh-client v0.0.0-20200317072149-19d54050aefd
github.com/mholt/archiver v3.1.1+incompatible
@@ -36,22 +31,14 @@ require (
github.com/olekukonko/tablewriter v0.0.4
github.com/opencontainers/go-digest v1.0.0-rc1 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/otiai10/copy v1.2.0
github.com/otiai10/copy v1.4.2
github.com/phayes/freeport v0.0.0-20180830031419-95f893ade6f2
github.com/pierrec/lz4 v0.0.0-20190222153722-062282ea0dcf // indirect
github.com/pkg/errors v0.9.1
github.com/rogpeppe/go-internal v1.6.2 // indirect
github.com/sirupsen/logrus v1.7.0 // indirect
github.com/spf13/cobra v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.6.1
github.com/urfave/cli v1.22.4
github.com/stretchr/testify v1.7.0
github.com/urfave/cli v1.22.5
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
golang.org/x/crypto v0.0.0-20201012173705-84dcc777aaee // indirect
golang.org/x/sync v0.0.0-20201008141435-b3e1573b7520 // indirect
golang.org/x/sys v0.0.0-20201013064817-56aa3af1a10a // indirect
golang.org/x/tools v0.0.0-20201013053347-2db1cd791039 // indirect
google.golang.org/grpc v1.21.0
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gotest.tools v2.2.0+incompatible // indirect
k8s.io/api v0.0.0-20190925180651-d58b53da08f5

705
go.sum

File diff suppressed because it is too large Load Diff

149
packrd/packed-packr.go Normal file

File diff suppressed because one or more lines are too long