mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
32 lines
526 B
Go
32 lines
526 B
Go
package datastore
|
|
|
|
import (
|
|
"bytes"
|
|
"github.com/Sirupsen/logrus"
|
|
"github.com/gin-gonic/gin"
|
|
"github.com/iron-io/functions/api/models"
|
|
"log"
|
|
)
|
|
|
|
func setLogBuffer() *bytes.Buffer {
|
|
var buf bytes.Buffer
|
|
buf.WriteByte('\n')
|
|
logrus.SetOutput(&buf)
|
|
gin.DefaultErrorWriter = &buf
|
|
gin.DefaultWriter = &buf
|
|
log.SetOutput(&buf)
|
|
return &buf
|
|
}
|
|
|
|
var testApp = &models.App{
|
|
Name: "Test",
|
|
}
|
|
|
|
var testRoute = &models.Route{
|
|
AppName: testApp.Name,
|
|
Path: "/test",
|
|
Image: "iron/hello",
|
|
Type: "sync",
|
|
Format: "http",
|
|
}
|