mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Improving certain CLI commands: init, run (#207)
* Consolidating route type utilization Fixes: #197 * Adding --version to fn init CLI command * Updating functions_go to 0.1.36 * Updating route init process * Updating tests * Adding "memory" CLI flag to fn run * Make CLI memory flag override what's in func.yaml * Get rid of default value for memory flag * Revert UX impact func.yaml remains the same, no nested maps
This commit is contained in:
committed by
Travis Reeder
parent
1730a7d094
commit
24eacbbbbf
@@ -18,9 +18,6 @@ dep-up:
|
||||
test:
|
||||
./test.sh
|
||||
|
||||
test-integration:
|
||||
cd tests/ && go test -v ./...; cd ..
|
||||
|
||||
release:
|
||||
GOOS=linux go build -o fn_linux
|
||||
GOOS=darwin go build -o fn_mac
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
fnmodels "github.com/funcy/functions_go/models"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
@@ -39,20 +39,15 @@ type fftest struct {
|
||||
}
|
||||
|
||||
type funcfile struct {
|
||||
Name string `yaml:"name,omitempty" json:"name,omitempty"`
|
||||
Version string `yaml:"version,omitempty" json:"version,omitempty"`
|
||||
Runtime *string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
|
||||
Entrypoint string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
|
||||
Cmd string `yaml:"cmd,omitempty" json:"cmd,omitempty"`
|
||||
Type *string `yaml:"type,omitempty" json:"type,omitempty"`
|
||||
Memory *int64 `yaml:"memory,omitempty" json:"memory,omitempty"`
|
||||
Format *string `yaml:"format,omitempty" json:"format,omitempty"`
|
||||
Timeout *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"`
|
||||
Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"`
|
||||
Config map[string]string `yaml:"config,omitempty" json:"config,omitempty"`
|
||||
Build []string `yaml:"build,omitempty" json:"build,omitempty"`
|
||||
Tests []fftest `yaml:"tests,omitempty" json:"tests,omitempty"`
|
||||
Path string `yaml:"path,omitempty" json:"path,omitempty"`
|
||||
fnmodels.Route
|
||||
|
||||
Name string `yaml:"name,omitempty" json:"name,omitempty"`
|
||||
Version string `yaml:"version,omitempty" json:"version,omitempty"`
|
||||
Runtime *string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
|
||||
Entrypoint string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
|
||||
Cmd string `yaml:"cmd,omitempty" json:"cmd,omitempty"`
|
||||
Build []string `yaml:"build,omitempty" json:"build,omitempty"`
|
||||
Tests []fftest `yaml:"tests,omitempty" json:"tests,omitempty"`
|
||||
}
|
||||
|
||||
func (ff *funcfile) FullName() string {
|
||||
@@ -77,6 +72,65 @@ func (ff *funcfile) RuntimeTag() (runtime, tag string) {
|
||||
return rt[:tagpos], rt[tagpos+1:]
|
||||
}
|
||||
|
||||
type flatfuncfile struct {
|
||||
Name string `yaml:"name,omitempty" json:"name,omitempty"`
|
||||
Version string `yaml:"version,omitempty" json:"version,omitempty"`
|
||||
Runtime *string `yaml:"runtime,omitempty" json:"runtime,omitempty"`
|
||||
Entrypoint string `yaml:"entrypoint,omitempty" json:"entrypoint,omitempty"`
|
||||
Cmd string `yaml:"cmd,omitempty" json:"cmd,omitempty"`
|
||||
Build []string `yaml:"build,omitempty" json:"build,omitempty"`
|
||||
Tests []fftest `yaml:"tests,omitempty" json:"tests,omitempty"`
|
||||
|
||||
// route specific
|
||||
Type string `yaml:"type,omitempty" json:"type,omitempty"`
|
||||
Memory uint64 `yaml:"memory,omitempty" json:"memory,omitempty"`
|
||||
Format string `yaml:"format,omitempty" json:"format,omitempty"`
|
||||
Timeout *int32 `yaml:"timeout,omitempty" json:"timeout,omitempty"`
|
||||
Path string `yaml:"path,omitempty" json:"path,omitempty"`
|
||||
Config map[string]string `yaml:"config,omitempty" json:"config,omitempty"`
|
||||
Headers map[string][]string `yaml:"headers,omitempty" json:"headers,omitempty"`
|
||||
}
|
||||
|
||||
func (ff *funcfile) MakeFlat() flatfuncfile {
|
||||
return flatfuncfile{
|
||||
Name: ff.Name,
|
||||
Version: ff.Version,
|
||||
Runtime: ff.Runtime,
|
||||
Entrypoint: ff.Entrypoint,
|
||||
Cmd: ff.Cmd,
|
||||
Build: ff.Build,
|
||||
Tests: ff.Tests,
|
||||
// route-specific
|
||||
Type: ff.Type,
|
||||
Memory: ff.Memory,
|
||||
Format: ff.Format,
|
||||
Timeout: ff.Timeout,
|
||||
Path: ff.Path,
|
||||
Config: ff.Config,
|
||||
Headers: ff.Headers,
|
||||
}
|
||||
}
|
||||
|
||||
func (fff *flatfuncfile) MakeFuncFile() *funcfile {
|
||||
ff := &funcfile{
|
||||
Name: fff.Name,
|
||||
Version: fff.Version,
|
||||
Runtime: fff.Runtime,
|
||||
Entrypoint: fff.Entrypoint,
|
||||
Cmd: fff.Cmd,
|
||||
Build: fff.Build,
|
||||
Tests: fff.Tests,
|
||||
}
|
||||
ff.Type = fff.Type
|
||||
ff.Memory = fff.Memory
|
||||
ff.Format = fff.Format
|
||||
ff.Timeout = fff.Timeout
|
||||
ff.Path = fff.Path
|
||||
ff.Config = fff.Config
|
||||
ff.Headers = fff.Headers
|
||||
return ff
|
||||
}
|
||||
|
||||
func findFuncfile(path string) (string, error) {
|
||||
for _, fn := range validfn {
|
||||
fullfn := filepath.Join(path, fn)
|
||||
@@ -122,8 +176,9 @@ func decodeFuncfileJSON(path string) (*funcfile, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not open %s for parsing. Error: %v", path, err)
|
||||
}
|
||||
ff := new(funcfile)
|
||||
err = json.NewDecoder(f).Decode(ff)
|
||||
fff := new(flatfuncfile)
|
||||
err = json.NewDecoder(f).Decode(fff)
|
||||
ff := fff.MakeFuncFile()
|
||||
return ff, err
|
||||
}
|
||||
|
||||
@@ -132,8 +187,9 @@ func decodeFuncfileYAML(path string) (*funcfile, error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not open %s for parsing. Error: %v", path, err)
|
||||
}
|
||||
ff := new(funcfile)
|
||||
err = yaml.Unmarshal(b, ff)
|
||||
fff := new(flatfuncfile)
|
||||
err = yaml.Unmarshal(b, fff)
|
||||
ff := fff.MakeFuncFile()
|
||||
return ff, err
|
||||
}
|
||||
|
||||
@@ -142,11 +198,11 @@ func encodeFuncfileJSON(path string, ff *funcfile) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not open %s for encoding. Error: %v", path, err)
|
||||
}
|
||||
return json.NewEncoder(f).Encode(ff)
|
||||
return json.NewEncoder(f).Encode(ff.MakeFlat())
|
||||
}
|
||||
|
||||
func encodeFuncfileYAML(path string, ff *funcfile) error {
|
||||
b, err := yaml.Marshal(ff)
|
||||
b, err := yaml.Marshal(ff.MakeFlat())
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not encode function file. Error: %v", err)
|
||||
}
|
||||
|
||||
6
cli/glide.lock
generated
6
cli/glide.lock
generated
@@ -1,5 +1,5 @@
|
||||
hash: fc16e358787292cb0b0d7f71adf4f0685b5994ca1c81788fdd056de21ebe7e55
|
||||
updated: 2017-08-03T13:32:54.266338495-07:00
|
||||
hash: da81ae46b9ef53596e8daaaa1aeb662af8704d77ae34ce2d33c7da87e6bd1ef5
|
||||
updated: 2017-08-09T23:25:49.919468872+03:00
|
||||
imports:
|
||||
- name: github.com/asaskevich/govalidator
|
||||
version: aa5cce4a76edb1a5acecab1870c17abbffb5419e
|
||||
@@ -50,7 +50,7 @@ imports:
|
||||
- name: github.com/docker/go-units
|
||||
version: 0dadbb0345b35ec7ef35e228dabb8de89a65bf52
|
||||
- name: github.com/funcy/functions_go
|
||||
version: c540b7a8e1af8dad992a3b520175db85f8e53636
|
||||
version: fc7e7ca2fbc8bef236300b7b9f1075410a62447f
|
||||
subpackages:
|
||||
- client
|
||||
- client/apps
|
||||
|
||||
@@ -18,7 +18,7 @@ import:
|
||||
subpackages:
|
||||
- semver
|
||||
- package: github.com/funcy/functions_go
|
||||
version: ^0.1.35
|
||||
version: ^0.1.36
|
||||
subpackages:
|
||||
- client
|
||||
- client/apps
|
||||
|
||||
89
cli/init.go
89
cli/init.go
@@ -18,6 +18,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/fnproject/fn/cli/langs"
|
||||
"github.com/funcy/functions_go/models"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
@@ -49,8 +50,35 @@ type initFnCmd struct {
|
||||
runtime string
|
||||
entrypoint string
|
||||
cmd string
|
||||
format string
|
||||
typeS string
|
||||
version string
|
||||
}
|
||||
|
||||
func initFlags(a *initFnCmd) []cli.Flag {
|
||||
fgs := []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "force",
|
||||
Usage: "overwrite existing func.yaml",
|
||||
Destination: &a.force,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "runtime",
|
||||
Usage: "choose an existing runtime - " + strings.Join(fnInitRuntimes, ", "),
|
||||
Destination: &a.runtime,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "entrypoint",
|
||||
Usage: "entrypoint is the command to run to start this function - equivalent to Dockerfile ENTRYPOINT.",
|
||||
Destination: &a.entrypoint,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "version",
|
||||
Usage: "function version",
|
||||
Destination: &a.version,
|
||||
Value: initialVersion,
|
||||
},
|
||||
}
|
||||
|
||||
return append(fgs, routeFlags...)
|
||||
}
|
||||
|
||||
func initFn() cli.Command {
|
||||
@@ -62,39 +90,15 @@ func initFn() cli.Command {
|
||||
Description: "Creates a func.yaml file in the current directory. ",
|
||||
ArgsUsage: "<DOCKERHUB_USERNAME/FUNCTION_NAME>",
|
||||
Action: a.init,
|
||||
Flags: []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "force, f",
|
||||
Usage: "overwrite existing func.yaml",
|
||||
Destination: &a.force,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "runtime",
|
||||
Usage: "choose an existing runtime - " + strings.Join(fnInitRuntimes, ", "),
|
||||
Destination: &a.runtime,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "entrypoint",
|
||||
Usage: "entrypoint is the command to run to start this function - equivalent to Dockerfile ENTRYPOINT.",
|
||||
Destination: &a.entrypoint,
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "format",
|
||||
Usage: "hot function IO format - json or http",
|
||||
Destination: &a.format,
|
||||
Value: "",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "type",
|
||||
Usage: "sync or async",
|
||||
Destination: &a.typeS,
|
||||
Value: "",
|
||||
},
|
||||
},
|
||||
Flags: initFlags(&a),
|
||||
}
|
||||
}
|
||||
|
||||
func (a *initFnCmd) init(c *cli.Context) error {
|
||||
|
||||
rt := &models.Route{}
|
||||
routeWithFlags(c, rt)
|
||||
|
||||
if !a.force {
|
||||
ff, err := loadFuncfile()
|
||||
if _, ok := err.(*notFoundError); !ok && err != nil {
|
||||
@@ -119,22 +123,15 @@ func (a *initFnCmd) init(c *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
var ffmt *string
|
||||
if a.format != "" {
|
||||
ffmt = &a.format
|
||||
}
|
||||
|
||||
ff := &funcfile{
|
||||
Name: a.name,
|
||||
Runtime: &a.runtime,
|
||||
Version: initialVersion,
|
||||
Entrypoint: a.entrypoint,
|
||||
Cmd: a.cmd,
|
||||
Format: ffmt,
|
||||
Type: &a.typeS,
|
||||
}
|
||||
if ff.Type != nil && *ff.Type == "" {
|
||||
ff.Type = nil
|
||||
*rt,
|
||||
a.name,
|
||||
a.version,
|
||||
&a.runtime,
|
||||
a.entrypoint,
|
||||
a.cmd,
|
||||
[]string{},
|
||||
[]fftest{},
|
||||
}
|
||||
|
||||
_, path := appNamePath(ff.FullName())
|
||||
|
||||
@@ -180,12 +180,12 @@ func createFunctionYaml(opts createImageOptions, functionName string) error {
|
||||
|
||||
funcDesc := &funcfile{
|
||||
Name: opts.Name,
|
||||
Path: path,
|
||||
Config: opts.Config,
|
||||
Version: "0.0.1",
|
||||
Runtime: &opts.Base,
|
||||
Cmd: opts.Handler,
|
||||
}
|
||||
funcDesc.Config = opts.Config
|
||||
funcDesc.Path = path
|
||||
|
||||
out, err := yaml.Marshal(funcDesc)
|
||||
if err != nil {
|
||||
|
||||
@@ -22,6 +22,9 @@ func TestMainCommands(t *testing.T) {
|
||||
"deploy",
|
||||
"run",
|
||||
"push",
|
||||
"logs",
|
||||
"calls",
|
||||
"call",
|
||||
}
|
||||
|
||||
fnTestBin := path.Join(os.TempDir(), "fn-test")
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
"path"
|
||||
"strings"
|
||||
"text/tabwriter"
|
||||
"time"
|
||||
|
||||
client "github.com/fnproject/fn/cli/client"
|
||||
fnclient "github.com/funcy/functions_go/client"
|
||||
@@ -28,9 +29,10 @@ var routeFlags = []cli.Flag{
|
||||
Name: "image,i",
|
||||
Usage: "image name",
|
||||
},
|
||||
cli.Int64Flag{
|
||||
cli.Uint64Flag{
|
||||
Name: "memory,m",
|
||||
Usage: "memory in MiB",
|
||||
Value: uint64(128),
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "type,t",
|
||||
@@ -46,11 +48,18 @@ var routeFlags = []cli.Flag{
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "format,f",
|
||||
Usage: "hot container IO format - json or http",
|
||||
Usage: "hot container IO format - default or http",
|
||||
Value: "default",
|
||||
},
|
||||
cli.DurationFlag{
|
||||
Name: "timeout",
|
||||
Usage: "route timeout (eg. 30s)",
|
||||
Value: 30 * time.Second,
|
||||
},
|
||||
cli.DurationFlag{
|
||||
Name: "idle-timeout",
|
||||
Usage: "route idle timeout (eg. 30s)",
|
||||
Value: 30 * time.Second,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -223,7 +232,7 @@ func routeWithFlags(c *cli.Context, rt *fnmodels.Route) {
|
||||
rt.Type = t
|
||||
}
|
||||
|
||||
if m := c.Int64("memory"); m > 0 {
|
||||
if m := c.Uint64("memory"); m > 0 {
|
||||
rt.Memory = m
|
||||
}
|
||||
|
||||
@@ -232,6 +241,11 @@ func routeWithFlags(c *cli.Context, rt *fnmodels.Route) {
|
||||
rt.Timeout = &to
|
||||
}
|
||||
|
||||
if t := c.Duration("idle-timeout"); t > 0 {
|
||||
to := int32(t.Seconds())
|
||||
rt.IDLETimeout = &to
|
||||
}
|
||||
|
||||
if len(c.StringSlice("headers")) > 0 {
|
||||
headers := map[string][]string{}
|
||||
for _, header := range c.StringSlice("headers") {
|
||||
@@ -257,21 +271,20 @@ func routeWithFuncFile(c *cli.Context, ff *funcfile, rt *fnmodels.Route) error {
|
||||
if ff.FullName() != "" { // args take precedence
|
||||
rt.Image = ff.FullName()
|
||||
}
|
||||
if ff.Format != nil {
|
||||
rt.Format = *ff.Format
|
||||
if ff.Format != "" {
|
||||
rt.Format = ff.Format
|
||||
}
|
||||
if ff.Timeout != nil {
|
||||
to := int32(ff.Timeout.Seconds())
|
||||
rt.Timeout = &to
|
||||
rt.Timeout = ff.Timeout
|
||||
}
|
||||
if rt.Path == "" && ff.Path != "" {
|
||||
rt.Path = ff.Path
|
||||
}
|
||||
if rt.Type == "" && ff.Type != nil && *ff.Type != "" {
|
||||
rt.Type = *ff.Type
|
||||
if rt.Type == "" && ff.Type != "" {
|
||||
rt.Type = ff.Type
|
||||
}
|
||||
if ff.Memory != nil {
|
||||
rt.Memory = *ff.Memory
|
||||
if ff.Memory != 0 {
|
||||
rt.Memory = ff.Memory
|
||||
}
|
||||
// TODO idle_timeout? headers? config? why is a func file not a yaml unmarshal of a route?
|
||||
|
||||
|
||||
15
cli/run.go
15
cli/run.go
@@ -56,6 +56,10 @@ func runflags() []cli.Flag {
|
||||
Name: "runs",
|
||||
Usage: "for hot functions only, will call the function `runs` times in a row.",
|
||||
},
|
||||
cli.Uint64Flag{
|
||||
Name: "memory",
|
||||
Usage: "RAM to allocate for function, Units: MB",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,12 +86,18 @@ func (r *runCmd) run(c *cli.Context) error {
|
||||
}
|
||||
}
|
||||
|
||||
// means no memory specified through CLI args
|
||||
// memory from func.yaml applied
|
||||
if c.Uint64("memory") != 0 {
|
||||
ff.Memory = c.Uint64("memory")
|
||||
}
|
||||
|
||||
return runff(ff, stdin(), os.Stdout, os.Stderr, c.String("method"), c.StringSlice("e"), c.StringSlice("link"), c.String("format"), c.Int("runs"))
|
||||
}
|
||||
|
||||
// TODO: share all this stuff with the Docker driver in server or better yet, actually use the Docker driver
|
||||
func runff(ff *funcfile, stdin io.Reader, stdout, stderr io.Writer, method string, envVars []string, links []string, format string, runs int) error {
|
||||
sh := []string{"docker", "run", "--rm", "-i"}
|
||||
sh := []string{"docker", "run", "--rm", "-i", fmt.Sprintf("--memory=%dm", ff.Memory)}
|
||||
|
||||
var err error
|
||||
var env []string // env for the shelled out docker run command
|
||||
@@ -109,6 +119,7 @@ func runff(ff *funcfile, stdin io.Reader, stdout, stderr io.Writer, method strin
|
||||
runEnv = append(runEnv, kvEq("APP_NAME", "myapp"))
|
||||
runEnv = append(runEnv, kvEq("ROUTE", "/hello")) // TODO: should we change this to PATH ?
|
||||
runEnv = append(runEnv, kvEq("FN_FORMAT", format))
|
||||
runEnv = append(runEnv, kvEq("MEMORY_MB", fmt.Sprintf("%d", ff.Memory)))
|
||||
|
||||
// add user defined envs
|
||||
runEnv = append(runEnv, envVars...)
|
||||
@@ -130,7 +141,7 @@ func runff(ff *funcfile, stdin io.Reader, stdout, stderr io.Writer, method strin
|
||||
runs = 1
|
||||
}
|
||||
|
||||
if ff.Type != nil && *ff.Type == "async" {
|
||||
if ff.Type != "" && ff.Type == "async" {
|
||||
// if async, we'll run this in a separate thread and wait for it to complete
|
||||
// reqID := id.New().String()
|
||||
// I'm starting to think maybe `fn run` locally should work the same whether sync or async? Or how would we allow to test the output?
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/VERSION
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/VERSION
generated
vendored
@@ -1 +1 @@
|
||||
0.1.35
|
||||
0.1.36
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/apps_client.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/apps_client.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package apps
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
4
cli/vendor/github.com/funcy/functions_go/client/call/call_client.go
generated
vendored
4
cli/vendor/github.com/funcy/functions_go/client/call/call_client.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package call
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
@@ -36,7 +38,7 @@ func (a *Client) GetAppsAppCalls(params *GetAppsAppCallsParams) (*GetAppsAppCall
|
||||
result, err := a.transport.Submit(&runtime.ClientOperation{
|
||||
ID: "GetAppsAppCalls",
|
||||
Method: "GET",
|
||||
PathPattern: "/apps/{app}/calls/",
|
||||
PathPattern: "/apps/{app}/calls",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http", "https"},
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package call
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package call
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package call
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
6
cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go
generated
vendored
6
cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package call
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
@@ -56,7 +58,7 @@ type GetAppsAppCallsOK struct {
|
||||
}
|
||||
|
||||
func (o *GetAppsAppCallsOK) Error() string {
|
||||
return fmt.Sprintf("[GET /apps/{app}/calls/][%d] getAppsAppCallsOK %+v", 200, o.Payload)
|
||||
return fmt.Sprintf("[GET /apps/{app}/calls][%d] getAppsAppCallsOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetAppsAppCallsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
@@ -85,7 +87,7 @@ type GetAppsAppCallsNotFound struct {
|
||||
}
|
||||
|
||||
func (o *GetAppsAppCallsNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /apps/{app}/calls/][%d] getAppsAppCallsNotFound %+v", 404, o.Payload)
|
||||
return fmt.Sprintf("[GET /apps/{app}/calls][%d] getAppsAppCallsNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetAppsAppCallsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/functions_client.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/functions_client.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package client
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package operations
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package operations
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package operations
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package operations
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/operations/operations_client.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/operations/operations_client.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package operations
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/routes/routes_client.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/routes/routes_client.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package routes
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package tasks
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package tasks
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package tasks
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package version
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package version
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/client/version/version_client.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/client/version/version_client.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package version
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/app.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/app.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/app_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/app_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/apps_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/apps_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/call.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/call.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/call_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/call_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/calls_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/calls_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/error.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/error.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/error_body.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/error_body.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/log.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/log.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/log_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/log_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
4
cli/vendor/github.com/funcy/functions_go/models/route.go
generated
vendored
4
cli/vendor/github.com/funcy/functions_go/models/route.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
@@ -33,7 +35,7 @@ type Route struct {
|
||||
Image string `json:"image,omitempty"`
|
||||
|
||||
// Max usable memory for this route (MiB).
|
||||
Memory int64 `json:"memory,omitempty"`
|
||||
Memory uint64 `json:"memory,omitempty"`
|
||||
|
||||
// URL path that will be matched to this route
|
||||
// Read Only: true
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/route_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/route_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/routes_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/routes_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/task.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/task.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/task_wrapper.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/task_wrapper.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
2
cli/vendor/github.com/funcy/functions_go/models/version.go
generated
vendored
2
cli/vendor/github.com/funcy/functions_go/models/version.go
generated
vendored
@@ -1,3 +1,5 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
|
||||
Reference in New Issue
Block a user