From 24eacbbbbf66d56ef9e0b7f69fdbc7dcdd3b293c Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Fri, 18 Aug 2017 21:14:29 +0300 Subject: [PATCH] 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 --- cli/Makefile | 3 - cli/funcfile.go | 98 +++++++++++++++---- cli/glide.lock | 6 +- cli/glide.yaml | 2 +- cli/init.go | 89 ++++++++--------- cli/lambda.go | 4 +- cli/main_test.go | 3 + cli/routes.go | 35 ++++--- cli/run.go | 15 ++- .../github.com/funcy/functions_go/VERSION | 2 +- .../functions_go/client/apps/apps_client.go | 2 + .../client/apps/delete_apps_app_parameters.go | 2 + .../client/apps/delete_apps_app_responses.go | 2 + .../client/apps/get_apps_app_parameters.go | 2 + .../client/apps/get_apps_app_responses.go | 2 + .../client/apps/get_apps_parameters.go | 2 + .../client/apps/get_apps_responses.go | 2 + .../client/apps/patch_apps_app_parameters.go | 2 + .../client/apps/patch_apps_app_responses.go | 2 + .../client/apps/post_apps_parameters.go | 2 + .../client/apps/post_apps_responses.go | 2 + .../functions_go/client/call/call_client.go | 4 +- .../get_apps_app_calls_call_parameters.go | 2 + .../call/get_apps_app_calls_call_responses.go | 2 + .../call/get_apps_app_calls_parameters.go | 2 + .../call/get_apps_app_calls_responses.go | 6 +- .../functions_go/client/functions_client.go | 2 + ...lete_apps_app_calls_call_log_parameters.go | 2 + ...elete_apps_app_calls_call_log_responses.go | 2 + .../get_apps_app_calls_call_log_parameters.go | 2 + .../get_apps_app_calls_call_log_responses.go | 2 + .../client/operations/operations_client.go | 2 + ...delete_apps_app_routes_route_parameters.go | 2 + .../delete_apps_app_routes_route_responses.go | 2 + .../routes/get_apps_app_routes_parameters.go | 2 + .../routes/get_apps_app_routes_responses.go | 2 + .../get_apps_app_routes_route_parameters.go | 2 + .../get_apps_app_routes_route_responses.go | 2 + .../patch_apps_app_routes_route_parameters.go | 2 + .../patch_apps_app_routes_route_responses.go | 2 + .../routes/post_apps_app_routes_parameters.go | 2 + .../routes/post_apps_app_routes_responses.go | 2 + .../put_apps_app_routes_route_parameters.go | 2 + .../put_apps_app_routes_route_responses.go | 2 + .../client/routes/routes_client.go | 2 + .../client/tasks/get_tasks_parameters.go | 2 + .../client/tasks/get_tasks_responses.go | 2 + .../functions_go/client/tasks/tasks_client.go | 2 + .../client/version/get_version_parameters.go | 2 + .../client/version/get_version_responses.go | 2 + .../client/version/version_client.go | 2 + .../funcy/functions_go/models/app.go | 2 + .../funcy/functions_go/models/app_wrapper.go | 2 + .../funcy/functions_go/models/apps_wrapper.go | 2 + .../funcy/functions_go/models/call.go | 2 + .../funcy/functions_go/models/call_wrapper.go | 2 + .../functions_go/models/calls_wrapper.go | 2 + .../funcy/functions_go/models/error.go | 2 + .../funcy/functions_go/models/error_body.go | 2 + .../funcy/functions_go/models/log.go | 2 + .../funcy/functions_go/models/log_wrapper.go | 2 + .../funcy/functions_go/models/route.go | 4 +- .../functions_go/models/route_wrapper.go | 2 + .../functions_go/models/routes_wrapper.go | 2 + .../funcy/functions_go/models/task.go | 2 + .../funcy/functions_go/models/task_wrapper.go | 2 + .../funcy/functions_go/models/version.go | 2 + docs/function-file.md | 8 +- test/fn-api-tests/utils.go | 1 + 69 files changed, 291 insertions(+), 97 deletions(-) diff --git a/cli/Makefile b/cli/Makefile index 981383638..a0042906d 100644 --- a/cli/Makefile +++ b/cli/Makefile @@ -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 diff --git a/cli/funcfile.go b/cli/funcfile.go index 73e589ad9..9977d7f1b 100644 --- a/cli/funcfile.go +++ b/cli/funcfile.go @@ -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) } diff --git a/cli/glide.lock b/cli/glide.lock index ac74d709d..b54acedcd 100644 --- a/cli/glide.lock +++ b/cli/glide.lock @@ -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 diff --git a/cli/glide.yaml b/cli/glide.yaml index 3d71ca7c9..1f93f9f13 100644 --- a/cli/glide.yaml +++ b/cli/glide.yaml @@ -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 diff --git a/cli/init.go b/cli/init.go index adabe9c76..b51d6f9f7 100644 --- a/cli/init.go +++ b/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: "", 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()) diff --git a/cli/lambda.go b/cli/lambda.go index 47020c5bc..0c966bad6 100644 --- a/cli/lambda.go +++ b/cli/lambda.go @@ -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 { diff --git a/cli/main_test.go b/cli/main_test.go index d9d0e344c..9710361f7 100644 --- a/cli/main_test.go +++ b/cli/main_test.go @@ -22,6 +22,9 @@ func TestMainCommands(t *testing.T) { "deploy", "run", "push", + "logs", + "calls", + "call", } fnTestBin := path.Join(os.TempDir(), "fn-test") diff --git a/cli/routes.go b/cli/routes.go index c48015bfe..13240c0ac 100644 --- a/cli/routes.go +++ b/cli/routes.go @@ -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? diff --git a/cli/run.go b/cli/run.go index a18ffff99..3ffc2ef9d 100644 --- a/cli/run.go +++ b/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? diff --git a/cli/vendor/github.com/funcy/functions_go/VERSION b/cli/vendor/github.com/funcy/functions_go/VERSION index 9d77e730c..d3662a8dd 100644 --- a/cli/vendor/github.com/funcy/functions_go/VERSION +++ b/cli/vendor/github.com/funcy/functions_go/VERSION @@ -1 +1 @@ -0.1.35 \ No newline at end of file +0.1.36 \ No newline at end of file diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/apps_client.go b/cli/vendor/github.com/funcy/functions_go/client/apps/apps_client.go index 2e06a940c..61cd89802 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/apps_client.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/apps_client.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go index 60aba725e..27e8ac7b9 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go b/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go index bc4d24988..fd6d72d59 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go index cb1c35684..3e3ff3ae8 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go index 5404dff14..902c17c2d 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go index d05d36110..65dd2d233 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go index fa4ceecd6..06de78f73 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go index 09b9318fc..2890a2553 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go b/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go index d94b7a5be..e8cd5f2a5 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go index baa411d41..36268651d 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go b/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go index 3207d7b57..9b381d8d6 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package apps // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/call/call_client.go b/cli/vendor/github.com/funcy/functions_go/client/call/call_client.go index 541bcb004..c0d6172b7 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/call/call_client.go +++ b/cli/vendor/github.com/funcy/functions_go/client/call/call_client.go @@ -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"}, diff --git a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_parameters.go index 01e9989ec..f5e6c84c8 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package call // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_responses.go b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_responses.go index ba614d0e8..1a85bae55 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package call // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_parameters.go index 54fe1d111..ea653e9ec 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package call // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go index 8e9a9ba52..4f766add9 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go @@ -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 { diff --git a/cli/vendor/github.com/funcy/functions_go/client/functions_client.go b/cli/vendor/github.com/funcy/functions_go/client/functions_client.go index 813901b29..7604c416e 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/functions_client.go +++ b/cli/vendor/github.com/funcy/functions_go/client/functions_client.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package client // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_parameters.go index 09f1033f3..83b929965 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package operations // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_responses.go b/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_responses.go index 62a5beaf6..3b0219340 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package operations // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_parameters.go index abe49b6aa..a5cbff4cb 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package operations // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_responses.go b/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_responses.go index 4b2e6c4df..9b6d48660 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package operations // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/operations/operations_client.go b/cli/vendor/github.com/funcy/functions_go/client/operations/operations_client.go index 867f0ecd5..d035c6ae0 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/operations/operations_client.go +++ b/cli/vendor/github.com/funcy/functions_go/client/operations/operations_client.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package operations // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_parameters.go index c23c4076b..824aa05e1 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_responses.go b/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_responses.go index fdc9ba8b0..2896224a8 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_parameters.go index b1b46da96..878241a5e 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_responses.go b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_responses.go index 63ceabb10..3236f3a4d 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_parameters.go index 6b752bb8b..aa42dc628 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_responses.go b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_responses.go index cd43ee1ed..87f64bf3e 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_parameters.go index 533af4a25..e62734c49 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_responses.go b/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_responses.go index a2941a619..885847015 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_parameters.go index a1c11e224..d7faa8b37 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_responses.go b/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_responses.go index c6f94f376..93df10580 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_parameters.go index fb9d5479b..501a374d1 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_responses.go b/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_responses.go index 0e973c669..bcfd1dc30 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/routes/routes_client.go b/cli/vendor/github.com/funcy/functions_go/client/routes/routes_client.go index aa672873b..ffc5d95b0 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/routes/routes_client.go +++ b/cli/vendor/github.com/funcy/functions_go/client/routes/routes_client.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package routes // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go index 4a393a3c7..5398ab931 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package tasks // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go b/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go index e809faa6f..4dee4b7f6 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package tasks // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go b/cli/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go index 71526e283..fdd690d61 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go +++ b/cli/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package tasks // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go b/cli/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go index 602d6f755..062b0a2f8 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go +++ b/cli/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package version // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go b/cli/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go index c917160f5..123a54b27 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go +++ b/cli/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package version // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/client/version/version_client.go b/cli/vendor/github.com/funcy/functions_go/client/version/version_client.go index 30a9256d7..0624a0e2c 100644 --- a/cli/vendor/github.com/funcy/functions_go/client/version/version_client.go +++ b/cli/vendor/github.com/funcy/functions_go/client/version/version_client.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package version // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/app.go b/cli/vendor/github.com/funcy/functions_go/models/app.go index f38528ca8..0c980ab98 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/app.go +++ b/cli/vendor/github.com/funcy/functions_go/models/app.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/app_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/app_wrapper.go index 51a4e5eee..441f52879 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/app_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/app_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/apps_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/apps_wrapper.go index 1c767e8ce..a3052fa29 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/apps_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/apps_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/call.go b/cli/vendor/github.com/funcy/functions_go/models/call.go index 6cb8cbd10..a1b59c5c2 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/call.go +++ b/cli/vendor/github.com/funcy/functions_go/models/call.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/call_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/call_wrapper.go index 86cd0c346..48594aeb2 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/call_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/call_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/calls_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/calls_wrapper.go index c5fbe46ea..03b4edd24 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/calls_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/calls_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/error.go b/cli/vendor/github.com/funcy/functions_go/models/error.go index 703068aeb..00080eb53 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/error.go +++ b/cli/vendor/github.com/funcy/functions_go/models/error.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/error_body.go b/cli/vendor/github.com/funcy/functions_go/models/error_body.go index 0f6001bb0..2df71285c 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/error_body.go +++ b/cli/vendor/github.com/funcy/functions_go/models/error_body.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/log.go b/cli/vendor/github.com/funcy/functions_go/models/log.go index a7b5a12ce..429a6c74a 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/log.go +++ b/cli/vendor/github.com/funcy/functions_go/models/log.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/log_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/log_wrapper.go index 2973ceb9e..dbc1c8e21 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/log_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/log_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/route.go b/cli/vendor/github.com/funcy/functions_go/models/route.go index cd53c815f..4aa3b430f 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/route.go +++ b/cli/vendor/github.com/funcy/functions_go/models/route.go @@ -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 diff --git a/cli/vendor/github.com/funcy/functions_go/models/route_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/route_wrapper.go index 42adbdb24..1de7cd4cf 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/route_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/route_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/routes_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/routes_wrapper.go index 864c7a574..a65aee1a3 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/routes_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/routes_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/task.go b/cli/vendor/github.com/funcy/functions_go/models/task.go index 1247fc71a..f265c99d7 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/task.go +++ b/cli/vendor/github.com/funcy/functions_go/models/task.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/task_wrapper.go b/cli/vendor/github.com/funcy/functions_go/models/task_wrapper.go index 781008b90..099d162ba 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/task_wrapper.go +++ b/cli/vendor/github.com/funcy/functions_go/models/task_wrapper.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/cli/vendor/github.com/funcy/functions_go/models/version.go b/cli/vendor/github.com/funcy/functions_go/models/version.go index 20fa15b4a..db845cf27 100644 --- a/cli/vendor/github.com/funcy/functions_go/models/version.go +++ b/cli/vendor/github.com/funcy/functions_go/models/version.go @@ -1,3 +1,5 @@ +// Code generated by go-swagger; DO NOT EDIT. + package models // This file was generated by the swagger tool. diff --git a/docs/function-file.md b/docs/function-file.md index 7a53e9a54..7fb4f18ad 100644 --- a/docs/function-file.md +++ b/docs/function-file.md @@ -36,6 +36,11 @@ position. You may use it to override the calculated route. If you plan to use `version` represents current version of the function. When deploying, it is appended to the image as a tag. +`runtime` represents programming language runtime (go, python3, java, etc.). + +`build` (optional) is an array of local shell calls which are used to help +building the function. + `type` (optional) allows you to set the type of the route. `sync`, for functions whose response are sent back to the requester; or `async`, for functions that are started and return a task ID to customer while it executes in background. @@ -54,9 +59,6 @@ this function calls. setup. These configuration options shall override application configuration during functions execution. -`build` (optional) is an array of local shell calls which are used to help -building the function. - ## Hot functions hot functions support also adds two extra options to this configuration file. diff --git a/test/fn-api-tests/utils.go b/test/fn-api-tests/utils.go index 2b9da4276..35976f02d 100644 --- a/test/fn-api-tests/utils.go +++ b/test/fn-api-tests/utils.go @@ -130,6 +130,7 @@ func SetupDefaultSuite() *SuiteSetup { RouteConfig: map[string]string{}, RouteHeaders: map[string][]string{}, Cancel: cancel, + Memory: uint64(256), } _, ok := ss.Client.Version.GetVersion(nil)