diff --git a/template/golang-http-armhf/Dockerfile b/template/golang-http-armhf/Dockerfile index a712e7a..59d719b 100644 --- a/template/golang-http-armhf/Dockerfile +++ b/template/golang-http-armhf/Dockerfile @@ -1,13 +1,13 @@ -FROM openfaas/of-watchdog:0.7.7 as watchdog +FROM openfaas/of-watchdog:0.8.0 as watchdog FROM golang:1.13-alpine3.11 as build RUN apk --no-cache add git +ENV CGO_ENABLED=0 + COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog -ENV CGO_ENABLED=0 - RUN mkdir -p /go/src/handler WORKDIR /go/src/handler COPY . . diff --git a/template/golang-http-armhf/function/Gopkg.toml b/template/golang-http-armhf/function/Gopkg.toml deleted file mode 100644 index 374d74c..0000000 --- a/template/golang-http-armhf/function/Gopkg.toml +++ /dev/null @@ -1,7 +0,0 @@ -# Gopkg.toml - -ignored = ["github.com/openfaas-incubator/go-function-sdk"] - -[prune] - go-tests = true - unused-packages = true diff --git a/template/golang-http-armhf/function/handler.go b/template/golang-http-armhf/function/handler.go index 9e212e7..877ef17 100644 --- a/template/golang-http-armhf/function/handler.go +++ b/template/golang-http-armhf/function/handler.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/openfaas-incubator/go-function-sdk" + handler "github.com/openfaas/templates-sdk/go-http" ) // Handle a function invocation diff --git a/template/golang-http-armhf/go.mod b/template/golang-http-armhf/go.mod index 930f39e..59f85d3 100644 --- a/template/golang-http-armhf/go.mod +++ b/template/golang-http-armhf/go.mod @@ -4,4 +4,4 @@ go 1.13 replace handler/function => ./function -require github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 +require github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625 diff --git a/template/golang-http-armhf/go.sum b/template/golang-http-armhf/go.sum index 9f41c78..80dafb4 100644 --- a/template/golang-http-armhf/go.sum +++ b/template/golang-http-armhf/go.sum @@ -1,2 +1,2 @@ -github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 h1:KhbcrtXR+IO7IWF08RzKpgMudBhEeRRqNmRurE1iph4= -github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33/go.mod h1:F37Kp+hwdHP+o3UKjkGzikQg4weKiMvcegT9vCQjvjE= +github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625 h1:6JSt10GDCOw0F67bWnqZ6AYg92pbqCcchTu181aT1w0= +github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625/go.mod h1:JWcVHdzlHcR7nLuaDL88Mz68wOqDvOn0CLO6t27OMhk= diff --git a/template/golang-http-armhf/main.go b/template/golang-http-armhf/main.go index 7661c40..edb5b18 100644 --- a/template/golang-http-armhf/main.go +++ b/template/golang-http-armhf/main.go @@ -15,7 +15,7 @@ import ( "handler/function" - handler "github.com/openfaas-incubator/go-function-sdk" + handler "github.com/openfaas/templates-sdk/go-http" ) var ( diff --git a/template/golang-http-armhf/template.yml b/template/golang-http-armhf/template.yml index 5015c40..b7e0fd3 100644 --- a/template/golang-http-armhf/template.yml +++ b/template/golang-http-armhf/template.yml @@ -1,2 +1,2 @@ -language: golang-http-armhf +language: golang-http fprocess: ./handler diff --git a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/.DEREK.yml b/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/.DEREK.yml deleted file mode 100644 index 8f544aa..0000000 --- a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/.DEREK.yml +++ /dev/null @@ -1 +0,0 @@ -redirect: https://raw.githubusercontent.com/openfaas/faas/master/.DEREK.yml diff --git a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/.gitignore b/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/.gitignore deleted file mode 100644 index 723ef36..0000000 --- a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea \ No newline at end of file diff --git a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/LICENSE b/template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/LICENSE similarity index 97% rename from template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/LICENSE rename to template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/LICENSE index 8d01a43..7ecb7d7 100644 --- a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/LICENSE +++ b/template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Alex Ellis +Copyright (c) 2020 OpenFaaS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/README.md b/template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/go-http/README.md similarity index 81% rename from template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/README.md rename to template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/go-http/README.md index 0964488..a4a5be7 100644 --- a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/README.md +++ b/template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/go-http/README.md @@ -1,31 +1,30 @@ -# go-function-sdk -An SDK for building OpenFaaS functions in Go +# go-http SDK +An SDK for building OpenFaaS functions in Go ## Installing Use `go get` to retrieve the SDK to add it to your `GOPATH` workspace, or project's Go module dependencies. - go get github.com/openfaas-incubator/go-function-sdk + go get github.com/openfaas/templates-sdk/go-http To update the SDK use `go get -u` to retrieve the latest version of the SDK. - go get -u github.com/openfaas-incubator/go-function-sdk + go get -u github.com/openfaas/templates-sdk/go-http ## Features ### Handler definition + ```go type FunctionHandler interface { Handle(req Request) (Response, error) } ``` -`FunctionHandler` interface is used by [golang-http](https://github.com/openfaas-incubator/golang-http-template/tree/master/template/golang-http) -template to define a functions handler - +`FunctionHandler` interface is used by [golang-http](https://github.com/openfaas-incubator/golang-http-template/tree/master/template/golang-http) template to define a functions handler ### Secrets For the time being please use the secrets function from `github.com/openfaas/openfaas-cloud/sdk` @@ -39,4 +38,4 @@ secret, err := sdk.ReadSecret("MY_SECRET") if err != nil { return fmt.Errorf("error reading secret. %v", err) } -``` \ No newline at end of file +``` diff --git a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/handler.go b/template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/go-http/handler.go similarity index 88% rename from template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/handler.go rename to template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/go-http/handler.go index cff9155..4f5d376 100644 --- a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/handler.go +++ b/template/golang-http-armhf/vendor/github.com/openfaas/templates-sdk/go-http/handler.go @@ -1,3 +1,5 @@ +// Copyright (c) Alex Ellis 2018. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. package handler import ( diff --git a/template/golang-http-armhf/vendor/modules.txt b/template/golang-http-armhf/vendor/modules.txt index 23c8937..08e7770 100644 --- a/template/golang-http-armhf/vendor/modules.txt +++ b/template/golang-http-armhf/vendor/modules.txt @@ -1,2 +1,2 @@ -# github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 -github.com/openfaas-incubator/go-function-sdk +# github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625 +github.com/openfaas/templates-sdk/go-http diff --git a/template/golang-http/Dockerfile b/template/golang-http/Dockerfile index 4a8f22c..59d719b 100644 --- a/template/golang-http/Dockerfile +++ b/template/golang-http/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/of-watchdog:0.7.7 as watchdog +FROM openfaas/of-watchdog:0.8.0 as watchdog FROM golang:1.13-alpine3.11 as build RUN apk --no-cache add git @@ -8,8 +8,6 @@ ENV CGO_ENABLED=0 COPY --from=watchdog /fwatchdog /usr/bin/fwatchdog RUN chmod +x /usr/bin/fwatchdog -ENV CGO_ENABLED=0 - RUN mkdir -p /go/src/handler WORKDIR /go/src/handler COPY . . diff --git a/template/golang-http/function/handler.go b/template/golang-http/function/handler.go index d201cfd..877ef17 100644 --- a/template/golang-http/function/handler.go +++ b/template/golang-http/function/handler.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - handler "github.com/openfaas-incubator/go-function-sdk" + handler "github.com/openfaas/templates-sdk/go-http" ) // Handle a function invocation diff --git a/template/golang-http/go.mod b/template/golang-http/go.mod index 930f39e..59f85d3 100644 --- a/template/golang-http/go.mod +++ b/template/golang-http/go.mod @@ -4,4 +4,4 @@ go 1.13 replace handler/function => ./function -require github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 +require github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625 diff --git a/template/golang-http/go.sum b/template/golang-http/go.sum index 9f41c78..80dafb4 100644 --- a/template/golang-http/go.sum +++ b/template/golang-http/go.sum @@ -1,2 +1,2 @@ -github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 h1:KhbcrtXR+IO7IWF08RzKpgMudBhEeRRqNmRurE1iph4= -github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33/go.mod h1:F37Kp+hwdHP+o3UKjkGzikQg4weKiMvcegT9vCQjvjE= +github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625 h1:6JSt10GDCOw0F67bWnqZ6AYg92pbqCcchTu181aT1w0= +github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625/go.mod h1:JWcVHdzlHcR7nLuaDL88Mz68wOqDvOn0CLO6t27OMhk= diff --git a/template/golang-http/main.go b/template/golang-http/main.go index 7661c40..edb5b18 100644 --- a/template/golang-http/main.go +++ b/template/golang-http/main.go @@ -15,7 +15,7 @@ import ( "handler/function" - handler "github.com/openfaas-incubator/go-function-sdk" + handler "github.com/openfaas/templates-sdk/go-http" ) var ( diff --git a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/.DEREK.yml b/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/.DEREK.yml deleted file mode 100644 index 8f544aa..0000000 --- a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/.DEREK.yml +++ /dev/null @@ -1 +0,0 @@ -redirect: https://raw.githubusercontent.com/openfaas/faas/master/.DEREK.yml diff --git a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/.gitignore b/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/.gitignore deleted file mode 100644 index 723ef36..0000000 --- a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.idea \ No newline at end of file diff --git a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/LICENSE b/template/golang-http/vendor/github.com/openfaas/templates-sdk/LICENSE similarity index 97% rename from template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/LICENSE rename to template/golang-http/vendor/github.com/openfaas/templates-sdk/LICENSE index 8d01a43..7ecb7d7 100644 --- a/template/golang-http-armhf/vendor/github.com/openfaas-incubator/go-function-sdk/LICENSE +++ b/template/golang-http/vendor/github.com/openfaas/templates-sdk/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 Alex Ellis +Copyright (c) 2020 OpenFaaS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/README.md b/template/golang-http/vendor/github.com/openfaas/templates-sdk/go-http/README.md similarity index 81% rename from template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/README.md rename to template/golang-http/vendor/github.com/openfaas/templates-sdk/go-http/README.md index 0964488..a4a5be7 100644 --- a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/README.md +++ b/template/golang-http/vendor/github.com/openfaas/templates-sdk/go-http/README.md @@ -1,31 +1,30 @@ -# go-function-sdk -An SDK for building OpenFaaS functions in Go +# go-http SDK +An SDK for building OpenFaaS functions in Go ## Installing Use `go get` to retrieve the SDK to add it to your `GOPATH` workspace, or project's Go module dependencies. - go get github.com/openfaas-incubator/go-function-sdk + go get github.com/openfaas/templates-sdk/go-http To update the SDK use `go get -u` to retrieve the latest version of the SDK. - go get -u github.com/openfaas-incubator/go-function-sdk + go get -u github.com/openfaas/templates-sdk/go-http ## Features ### Handler definition + ```go type FunctionHandler interface { Handle(req Request) (Response, error) } ``` -`FunctionHandler` interface is used by [golang-http](https://github.com/openfaas-incubator/golang-http-template/tree/master/template/golang-http) -template to define a functions handler - +`FunctionHandler` interface is used by [golang-http](https://github.com/openfaas-incubator/golang-http-template/tree/master/template/golang-http) template to define a functions handler ### Secrets For the time being please use the secrets function from `github.com/openfaas/openfaas-cloud/sdk` @@ -39,4 +38,4 @@ secret, err := sdk.ReadSecret("MY_SECRET") if err != nil { return fmt.Errorf("error reading secret. %v", err) } -``` \ No newline at end of file +``` diff --git a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/handler.go b/template/golang-http/vendor/github.com/openfaas/templates-sdk/go-http/handler.go similarity index 88% rename from template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/handler.go rename to template/golang-http/vendor/github.com/openfaas/templates-sdk/go-http/handler.go index cff9155..4f5d376 100644 --- a/template/golang-http/vendor/github.com/openfaas-incubator/go-function-sdk/handler.go +++ b/template/golang-http/vendor/github.com/openfaas/templates-sdk/go-http/handler.go @@ -1,3 +1,5 @@ +// Copyright (c) Alex Ellis 2018. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. package handler import ( diff --git a/template/golang-http/vendor/modules.txt b/template/golang-http/vendor/modules.txt index 23c8937..08e7770 100644 --- a/template/golang-http/vendor/modules.txt +++ b/template/golang-http/vendor/modules.txt @@ -1,2 +1,2 @@ -# github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 -github.com/openfaas-incubator/go-function-sdk +# github.com/openfaas/templates-sdk v0.0.0-20200723092016-0ebf61253625 +github.com/openfaas/templates-sdk/go-http diff --git a/template/golang-middleware-armhf/Dockerfile b/template/golang-middleware-armhf/Dockerfile index a712e7a..25b4f4c 100644 --- a/template/golang-middleware-armhf/Dockerfile +++ b/template/golang-middleware-armhf/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/of-watchdog:0.7.7 as watchdog +FROM openfaas/of-watchdog:0.8.0 as watchdog FROM golang:1.13-alpine3.11 as build RUN apk --no-cache add git diff --git a/template/golang-middleware/Dockerfile b/template/golang-middleware/Dockerfile index 11b9eba..aea7603 100644 --- a/template/golang-middleware/Dockerfile +++ b/template/golang-middleware/Dockerfile @@ -1,4 +1,4 @@ -FROM openfaas/of-watchdog:0.7.7 as watchdog +FROM openfaas/of-watchdog:0.8.0 as watchdog FROM golang:1.13-alpine3.11 as build RUN apk --no-cache add git