mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
global url replace
This commit is contained in:
10
Makefile
10
Makefile
@@ -25,11 +25,11 @@ run: build
|
|||||||
|
|
||||||
docker-dep:
|
docker-dep:
|
||||||
# todo: need to create a dep tool image for this (or just ditch this)
|
# todo: need to create a dep tool image for this (or just ditch this)
|
||||||
docker run --rm -it -v ${CURDIR}:/go/src/gitlab.oracledx.com/odx/functions -w /go/src/gitlab.oracledx.com/odx/functions treeder/glide install -v
|
docker run --rm -it -v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions -w /go/src/gitlab-odx.oracle.com/odx/functions treeder/glide install -v
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
docker pull funcy/go:dev
|
docker pull funcy/go:dev
|
||||||
docker run --rm -v ${CURDIR}:/go/src/gitlab.oracledx.com/odx/functions -w /go/src/gitlab.oracledx.com/odx/functions funcy/go:dev go build -o functions-alpine
|
docker run --rm -v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions -w /go/src/gitlab-odx.oracle.com/odx/functions funcy/go:dev go build -o functions-alpine
|
||||||
docker build --build-arg HTTP_PROXY -t treeder/functions:latest .
|
docker build --build-arg HTTP_PROXY -t treeder/functions:latest .
|
||||||
|
|
||||||
docker-run: docker-build
|
docker-run: docker-build
|
||||||
@@ -38,9 +38,9 @@ docker-run: docker-build
|
|||||||
docker-test:
|
docker-test:
|
||||||
docker run -ti --privileged --rm -e LOG_LEVEL=debug \
|
docker run -ti --privileged --rm -e LOG_LEVEL=debug \
|
||||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||||
-v ${CURDIR}:/go/src/gitlab.oracledx.com/odx/functions \
|
-v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions \
|
||||||
-w /go/src/gitlab.oracledx.com/odx/functions \
|
-w /go/src/gitlab-odx.oracle.com/odx/functions \
|
||||||
funcy/go:dev go test \
|
funcy/go:dev go test \
|
||||||
-v $(shell docker run -ti -v ${CURDIR}:/go/src/gitlab.oracledx.com/odx/functions -w /go/src/gitlab.oracledx.com/odx/functions -e GOPATH=/go golang:alpine sh -c 'go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fn | grep -v datastore')
|
-v $(shell docker run -ti -v ${CURDIR}:/go/src/gitlab-odx.oracle.com/odx/functions -w /go/src/gitlab-odx.oracle.com/odx/functions -e GOPATH=/go golang:alpine sh -c 'go list ./... | grep -v vendor | grep -v examples | grep -v tool | grep -v fn | grep -v datastore')
|
||||||
|
|
||||||
all: dep build
|
all: dep build
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ export API_URL=http://129.146.10.253:80
|
|||||||
|
|
||||||
Download the pre-built CLI binary:
|
Download the pre-built CLI binary:
|
||||||
|
|
||||||
1. Visit: https://gitlab.oracledx.com/odx/functions/tree/master/fn/releases/download/0.3.2
|
1. Visit: https://gitlab-odx.oracle.com/odx/functions/tree/master/fn/releases/download/0.3.2
|
||||||
2. Download the CLI for your platform
|
2. Download the CLI for your platform
|
||||||
3. Put in /usr/local/bin
|
3. Put in /usr/local/bin
|
||||||
4. chmod +x
|
4. chmod +x
|
||||||
@@ -139,7 +139,7 @@ you can update your code and run `fn deploy myapp` again.
|
|||||||
|
|
||||||
- TODO: Slack or Discord community
|
- TODO: Slack or Discord community
|
||||||
- Learn how to [contribute](CONTRIBUTING.md)
|
- Learn how to [contribute](CONTRIBUTING.md)
|
||||||
- See [milestones](https://gitlab.oracledx.com/odx/functions/milestones) for detailed issues
|
- See [milestones](https://gitlab-odx.oracle.com/odx/functions/milestones) for detailed issues
|
||||||
|
|
||||||
|
|
||||||
## User Interface
|
## User Interface
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoreutil"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoreutil"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BoltDatastore struct {
|
type BoltDatastore struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoretest"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpBolt = "/tmp/func_test_bolt.db"
|
const tmpBolt = "/tmp/func_test_bolt.db"
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/bolt"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/bolt"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/mysql"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/mysql"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/postgres"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/postgres"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/redis"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/redis"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New(dbURL string) (models.Datastore, error) {
|
func New(dbURL string) (models.Datastore, error) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package datastoreutil
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Datastore is a copy of models.Datastore, with additional comments on parameter guarantees.
|
// Datastore is a copy of models.Datastore, with additional comments on parameter guarantees.
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ package datastore
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoreutil"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoreutil"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type mock struct {
|
type mock struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package datastore
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoretest"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDatastore(t *testing.T) {
|
func TestDatastore(t *testing.T) {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/go-sql-driver/mysql"
|
"github.com/go-sql-driver/mysql"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoreutil"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoreutil"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
const routesTableCreate = `CREATE TABLE IF NOT EXISTS routes (
|
const routesTableCreate = `CREATE TABLE IF NOT EXISTS routes (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoretest"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpMysql = "mysql://root:root@tcp(%v:3307)/funcs"
|
const tmpMysql = "mysql://root:root@tcp(%v:3307)/funcs"
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoreutil"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoreutil"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"github.com/lib/pq"
|
"github.com/lib/pq"
|
||||||
_ "github.com/lib/pq"
|
_ "github.com/lib/pq"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoretest"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpPostgres = "postgres://postgres@%v:15432/funcs?sslmode=disable"
|
const tmpPostgres = "postgres://postgres@%v:15432/funcs?sslmode=disable"
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoreutil"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoreutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RedisDataStore struct {
|
type RedisDataStore struct {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore/internal/datastoretest"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore/internal/datastoretest"
|
||||||
)
|
)
|
||||||
|
|
||||||
const tmpRedis = "redis://%v:6301/"
|
const tmpRedis = "redis://%v:6301/"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/boltdb/bolt"
|
"github.com/boltdb/bolt"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type BoltDbMQ struct {
|
type BoltDbMQ struct {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
mq_config "github.com/iron-io/iron_go3/config"
|
mq_config "github.com/iron-io/iron_go3/config"
|
||||||
ironmq "github.com/iron-io/iron_go3/mq"
|
ironmq "github.com/iron-io/iron_go3/mq"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type assoc struct {
|
type assoc struct {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/google/btree"
|
"github.com/google/btree"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MemoryMQ struct {
|
type MemoryMQ struct {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package mqs
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Mock struct {
|
type Mock struct {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// New will parse the URL and return the correct MQ implementation.
|
// New will parse the URL and return the correct MQ implementation.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/garyburd/redigo/redis"
|
"github.com/garyburd/redigo/redis"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RedisMQ struct {
|
type RedisMQ struct {
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getTask(ctx context.Context, url string) (*models.Task, error) {
|
func getTask(ctx context.Context, url string) (*models.Task, error) {
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/mqs"
|
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setLogBuffer() *bytes.Buffer {
|
func setLogBuffer() *bytes.Buffer {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package common
|
package common
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common/stats"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common/stats"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An Environment is a long lived object that carries around 'configuration'
|
// An Environment is a long lived object that carries around 'configuration'
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ import (
|
|||||||
manifest "github.com/docker/distribution/manifest/schema1"
|
manifest "github.com/docker/distribution/manifest/schema1"
|
||||||
"github.com/fsouza/go-dockerclient"
|
"github.com/fsouza/go-dockerclient"
|
||||||
"github.com/heroku/docker-registry-client/registry"
|
"github.com/heroku/docker-registry-client/registry"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common/stats"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common/stats"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
const hubURL = "https://registry.hub.docker.com"
|
const hubURL = "https://registry.hub.docker.com"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/fsouza/go-dockerclient"
|
"github.com/fsouza/go-dockerclient"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/vrischmann/envconfig"
|
"github.com/vrischmann/envconfig"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
type taskDockerTest struct {
|
type taskDockerTest struct {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
func New() drivers.Driver {
|
func New() drivers.Driver {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
|
|
||||||
"context"
|
"context"
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FuncLogger interface {
|
type FuncLogger interface {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type MetricLogger interface {
|
type MetricLogger interface {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package protocol
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DefaultProtocol is the protocol used by cold-containers
|
// DefaultProtocol is the protocol used by cold-containers
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
var errInvalidProtocol = errors.New("Invalid Protocol")
|
var errInvalidProtocol = errors.New("Invalid Protocol")
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import (
|
|||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HTTPProtocol converts stdin/stdout streams into HTTP/1.1 compliant
|
// HTTPProtocol converts stdin/stdout streams into HTTP/1.1 compliant
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
driverscommon "gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
driverscommon "gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers/docker"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers/docker"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers/mock"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers/mock"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Runner struct {
|
type Runner struct {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRunnerHello(t *testing.T) {
|
func TestRunnerHello(t *testing.T) {
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
|
|
||||||
"github.com/docker/cli/cli/config/configfile"
|
"github.com/docker/cli/cli/config/configfile"
|
||||||
docker "github.com/fsouza/go-dockerclient"
|
docker "github.com/fsouza/go-dockerclient"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
var registries dockerRegistries
|
var registries dockerRegistries
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/drivers"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/drivers"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/protocol"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/protocol"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
// hot functions - theory of operation
|
// hot functions - theory of operation
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type AppListener interface {
|
type AppListener interface {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppCreate(c *gin.Context) {
|
func (s *Server) handleAppCreate(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppDelete(c *gin.Context) {
|
func (s *Server) handleAppDelete(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppGet(c *gin.Context) {
|
func (s *Server) handleAppGet(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppList(c *gin.Context) {
|
func (s *Server) handleAppList(c *gin.Context) {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/mqs"
|
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func setLogBuffer() *bytes.Buffer {
|
func setLogBuffer() *bytes.Buffer {
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleAppUpdate(c *gin.Context) {
|
func (s *Server) handleAppUpdate(c *gin.Context) {
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ApiHandlerFunc func(w http.ResponseWriter, r *http.Request)
|
type ApiHandlerFunc func(w http.ResponseWriter, r *http.Request)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ package routecache
|
|||||||
import (
|
import (
|
||||||
"container/list"
|
"container/list"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Cache holds an internal linkedlist for hotness management. It is not safe
|
// Cache holds an internal linkedlist for hotness management. It is not safe
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Middleware is the interface required for implementing functions middlewar
|
// Middleware is the interface required for implementing functions middlewar
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteCreate(c *gin.Context) {
|
func (s *Server) handleRouteCreate(c *gin.Context) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteDelete(c *gin.Context) {
|
func (s *Server) handleRouteDelete(c *gin.Context) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteGet(c *gin.Context) {
|
func (s *Server) handleRouteGet(c *gin.Context) {
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteList(c *gin.Context) {
|
func (s *Server) handleRouteList(c *gin.Context) {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/mqs"
|
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRouteCreate(t *testing.T) {
|
func TestRouteCreate(t *testing.T) {
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleRouteUpdate(c *gin.Context) {
|
func (s *Server) handleRouteUpdate(c *gin.Context) {
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ import (
|
|||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
uuid "github.com/satori/go.uuid"
|
uuid "github.com/satori/go.uuid"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner"
|
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
type runnerResponse struct {
|
type runnerResponse struct {
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/mqs"
|
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner"
|
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
"gitlab.oracledx.com/odx/functions/api/server/internal/routecache"
|
"gitlab-odx.oracle.com/odx/functions/api/server/internal/routecache"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testRouterAsync(ds models.Datastore, mq models.MessageQueue, rnr *runner.Runner, tasks chan task.Request, enqueue models.Enqueue) *gin.Engine {
|
func testRouterAsync(ds models.Datastore, mq models.MessageQueue, rnr *runner.Runner, tasks chan task.Request, enqueue models.Enqueue) *gin.Engine {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RunnerListener interface {
|
type RunnerListener interface {
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/mqs"
|
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner"
|
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
)
|
)
|
||||||
|
|
||||||
func testRunner(t *testing.T) (*runner.Runner, context.CancelFunc) {
|
func testRunner(t *testing.T) (*runner.Runner, context.CancelFunc) {
|
||||||
|
|||||||
@@ -15,14 +15,14 @@ import (
|
|||||||
"github.com/ccirello/supervisor"
|
"github.com/ccirello/supervisor"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"gitlab.oracledx.com/odx/functions/api"
|
"gitlab-odx.oracle.com/odx/functions/api"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/mqs"
|
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner"
|
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/common"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/common"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
"gitlab.oracledx.com/odx/functions/api/server/internal/routecache"
|
"gitlab-odx.oracle.com/odx/functions/api/server/internal/routecache"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/datastore"
|
"gitlab-odx.oracle.com/odx/functions/api/datastore"
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/mqs"
|
"gitlab-odx.oracle.com/odx/functions/api/mqs"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner"
|
"gitlab-odx.oracle.com/odx/functions/api/runner"
|
||||||
"gitlab.oracledx.com/odx/functions/api/runner/task"
|
"gitlab-odx.oracle.com/odx/functions/api/runner/task"
|
||||||
"gitlab.oracledx.com/odx/functions/api/server/internal/routecache"
|
"gitlab-odx.oracle.com/odx/functions/api/server/internal/routecache"
|
||||||
)
|
)
|
||||||
|
|
||||||
var tmpBolt = "/tmp/func_test_bolt.db"
|
var tmpBolt = "/tmp/func_test_bolt.db"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
// call is an in-flight or completed do call
|
// call is an in-flight or completed do call
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.oracledx.com/odx/functions/api/version"
|
"gitlab-odx.oracle.com/odx/functions/api/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
func handleVersion(c *gin.Context) {
|
func handleVersion(c *gin.Context) {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package database
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/models"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/models"
|
||||||
"gopkg.in/mgo.v2"
|
"gopkg.in/mgo.v2"
|
||||||
"gopkg.in/mgo.v2/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package database
|
package database
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/models"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/models"
|
||||||
"gopkg.in/mgo.v2"
|
"gopkg.in/mgo.v2"
|
||||||
"gopkg.in/mgo.v2/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/database"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/database"
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/models"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/models"
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/routes"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/routes"
|
||||||
)
|
)
|
||||||
|
|
||||||
var noAuth = map[string]interface{}{}
|
var noAuth = map[string]interface{}{}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/database"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/database"
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/models"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func HandlePostCreate(db *database.Database, auth map[string]interface{}) {
|
func HandlePostCreate(db *database.Database, auth map[string]interface{}) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package route
|
package route
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/database"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/database"
|
||||||
"gopkg.in/mgo.v2/bson"
|
"gopkg.in/mgo.v2/bson"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package route
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/database"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/database"
|
||||||
)
|
)
|
||||||
|
|
||||||
func HandlePostRead(db *database.Database, auth map[string]interface{}) {
|
func HandlePostRead(db *database.Database, auth map[string]interface{}) {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/dgrijalva/jwt-go"
|
"github.com/dgrijalva/jwt-go"
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/database"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/database"
|
||||||
"gitlab.oracledx.com/odx/functions/examples/blog/models"
|
"gitlab-odx.oracle.com/odx/functions/examples/blog/models"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import (
|
|||||||
"html"
|
"html"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/server"
|
"gitlab-odx.oracle.com/odx/functions/api/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/api/models"
|
"gitlab-odx.oracle.com/odx/functions/api/models"
|
||||||
"gitlab.oracledx.com/odx/functions/api/server"
|
"gitlab-odx.oracle.com/odx/functions/api/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
2
fn/Gopkg.lock
generated
2
fn/Gopkg.lock
generated
@@ -181,7 +181,7 @@ memo = "9e1d9db05f14e4fcb5786440592f93e0baab3f6b9ef00fc46cb39da2dd0d5fce"
|
|||||||
version = "v1.19.1"
|
version = "v1.19.1"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "gitlab.oracledx.com/odx/functions"
|
name = "gitlab-odx.oracle.com/odx/functions"
|
||||||
packages = ["api/version"]
|
packages = ["api/version"]
|
||||||
revision = "37b53a5820fd2f10a1afa3b04e2423408828afb5"
|
revision = "37b53a5820fd2f10a1afa3b04e2423408828afb5"
|
||||||
version = "0.3.7"
|
version = "0.3.7"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"text/template"
|
"text/template"
|
||||||
|
|
||||||
"gitlab.oracledx.com/odx/functions/fn/langs"
|
"gitlab-odx.oracle.com/odx/functions/fn/langs"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
"gitlab.oracledx.com/odx/functions/fn/langs"
|
"gitlab-odx.oracle.com/odx/functions/fn/langs"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
functions "github.com/iron-io/functions_go"
|
functions "github.com/iron-io/functions_go"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
vers "gitlab.oracledx.com/odx/functions/api/version"
|
vers "gitlab-odx.oracle.com/odx/functions/api/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
var aliases = map[string]cli.Command{
|
var aliases = map[string]cli.Command{
|
||||||
@@ -37,7 +37,7 @@ func newFn() *cli.App {
|
|||||||
app.Version = vers.Version
|
app.Version = vers.Version
|
||||||
app.Authors = []cli.Author{{Name: "Oracle Corporation"}}
|
app.Authors = []cli.Author{{Name: "Oracle Corporation"}}
|
||||||
app.Description = "Oracle Functions command line tools"
|
app.Description = "Oracle Functions command line tools"
|
||||||
app.UsageText = `Check the manual at https://gitlab.oracledx.com/odx/functions/blob/master/fn/README.md`
|
app.UsageText = `Check the manual at https://gitlab-odx.oracle.com/odx/functions/blob/master/fn/README.md`
|
||||||
|
|
||||||
cli.AppHelpTemplate = `{{.Name}} {{.Version}}{{if .Description}}
|
cli.AppHelpTemplate = `{{.Name}} {{.Version}}{{if .Description}}
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
cd lambda
|
#cd lambda
|
||||||
./release.sh
|
#./release.sh
|
||||||
cd ..
|
#cd ..
|
||||||
|
|
||||||
make dep
|
make dep
|
||||||
make release
|
make release
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
vers "gitlab.oracledx.com/odx/functions/api/version"
|
vers "gitlab-odx.oracle.com/odx/functions/api/version"
|
||||||
functions "github.com/iron-io/functions_go"
|
functions "github.com/iron-io/functions_go"
|
||||||
"github.com/urfave/cli"
|
"github.com/urfave/cli"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user