├── third_party ├── go.mod └── VENDOR-LICENSE │ ├── github.com │ ├── hashicorp │ │ ├── hcl │ │ │ ├── hcl │ │ │ │ ├── test-fixtures │ │ │ │ │ ├── empty.hcl │ │ │ │ │ ├── comment_single.hcl │ │ │ │ │ ├── list.hcl │ │ │ │ │ ├── complex_key.hcl │ │ │ │ │ ├── list_comma.hcl │ │ │ │ │ ├── multiple.hcl │ │ │ │ │ ├── structure_empty.hcl │ │ │ │ │ ├── old.hcl │ │ │ │ │ ├── array_comment.hcl │ │ │ │ │ ├── structure_basic.hcl │ │ │ │ │ ├── assign_colon.hcl │ │ │ │ │ ├── structure.hcl │ │ │ │ │ ├── types.hcl │ │ │ │ │ └── comment.hcl │ │ │ │ ├── fmtcmd │ │ │ │ │ └── test-fixtures │ │ │ │ │ │ ├── dir.ignore │ │ │ │ │ │ ├── good.hcl │ │ │ │ │ │ ├── .hidden.ignore │ │ │ │ │ │ └── file.ignore │ │ │ │ ├── parser │ │ │ │ │ ├── test-fixtures │ │ │ │ │ │ ├── empty.hcl │ │ │ │ │ │ ├── comment_lastline.hcl │ │ │ │ │ │ ├── comment_single.hcl │ │ │ │ │ │ ├── git_crypt.hcl │ │ │ │ │ │ ├── key_without_value.hcl │ │ │ │ │ │ ├── complex_key.hcl │ │ │ │ │ │ ├── list.hcl │ │ │ │ │ │ ├── list_comma.hcl │ │ │ │ │ │ ├── multiple.hcl │ │ │ │ │ │ ├── object_list_comma.hcl │ │ │ │ │ │ ├── structure_empty.hcl │ │ │ │ │ │ ├── object_key_without_value.hcl │ │ │ │ │ │ ├── unterminated_object.hcl │ │ │ │ │ │ ├── object_key_assign_without_value.hcl │ │ │ │ │ │ ├── old.hcl │ │ │ │ │ │ ├── array_comment.hcl │ │ │ │ │ │ ├── object_key_assign_without_value2.hcl │ │ │ │ │ │ ├── object_key_assign_without_value3.hcl │ │ │ │ │ │ ├── assign_deep.hcl │ │ │ │ │ │ ├── structure_basic.hcl │ │ │ │ │ │ ├── assign_colon.hcl │ │ │ │ │ │ ├── structure.hcl │ │ │ │ │ │ ├── types.hcl │ │ │ │ │ │ ├── missing_braces.hcl │ │ │ │ │ │ ├── comment.hcl │ │ │ │ │ │ ├── unterminated_object_2.hcl │ │ │ │ │ │ ├── comment_crlf.hcl │ │ │ │ │ │ └── array_comment_2.hcl │ │ │ │ │ ├── error_test.go │ │ │ │ │ └── error.go │ │ │ │ └── printer │ │ │ │ │ └── testdata │ │ │ │ │ ├── comment_newline.input │ │ │ │ │ ├── comment_newline.golden │ │ │ │ │ ├── comment_end_file.input │ │ │ │ │ ├── comment_end_file.golden │ │ │ │ │ ├── object_with_heredoc.golden │ │ │ │ │ ├── object_with_heredoc.input │ │ │ │ │ ├── list_comment.input │ │ │ │ │ ├── comment_multiline_no_stanza.input │ │ │ │ │ ├── comment_multiline_no_stanza.golden │ │ │ │ │ ├── list_comment.golden │ │ │ │ │ ├── multiline_string.golden │ │ │ │ │ ├── multiline_string.input │ │ │ │ │ ├── list_of_objects.golden │ │ │ │ │ ├── list_of_objects.input │ │ │ │ │ ├── empty_block.golden │ │ │ │ │ ├── comment_object_multi.golden │ │ │ │ │ ├── comment_object_multi.input │ │ │ │ │ ├── empty_block.input │ │ │ │ │ ├── comment_array.input │ │ │ │ │ ├── comment_array.golden │ │ │ │ │ ├── comment_multiline_indent.golden │ │ │ │ │ ├── comment_multiline_indent.input │ │ │ │ │ ├── comment_multiline_stanza.golden │ │ │ │ │ ├── comment_multiline_stanza.input │ │ │ │ │ ├── comment_standalone.input │ │ │ │ │ ├── comment_standalone.golden │ │ │ │ │ ├── object_singleline.input │ │ │ │ │ ├── object_singleline.golden │ │ │ │ │ ├── list.input │ │ │ │ │ ├── list.golden │ │ │ │ │ └── comment_aligned.input │ │ │ ├── test-fixtures │ │ │ │ ├── git_crypt.hcl │ │ │ │ ├── empty.hcl │ │ │ │ ├── float.hcl │ │ │ │ ├── basic_int_string.hcl │ │ │ │ ├── multiline_no_marker.hcl │ │ │ │ ├── flat.hcl │ │ │ │ ├── unterminated_block_comment.hcl │ │ │ │ ├── block_assign.hcl │ │ │ │ ├── float.json │ │ │ │ ├── list_of_lists.hcl │ │ │ │ ├── multiline.json │ │ │ │ ├── structure_list_empty.json │ │ │ │ ├── multiline.hcl │ │ │ │ ├── multiline_bad.hcl │ │ │ │ ├── multiline_literal.hcl │ │ │ │ ├── unterminated_brace.hcl │ │ │ │ ├── basic.hcl │ │ │ │ ├── assign_deep.hcl │ │ │ │ ├── multiline_literal_with_hil.hcl │ │ │ │ ├── multiline_no_eof.hcl │ │ │ │ ├── nested_block_comment.hcl │ │ │ │ ├── basic_squish.hcl │ │ │ │ ├── multiline_indented.hcl │ │ │ │ ├── structure_list.hcl │ │ │ │ ├── basic.json │ │ │ │ ├── interpolate.json │ │ │ │ ├── structure_flatmap.hcl │ │ │ │ ├── structure_multi.hcl │ │ │ │ ├── tfvars.hcl │ │ │ │ ├── multiline_no_hanging_indent.hcl │ │ │ │ ├── scientific.hcl │ │ │ │ ├── terraform_heroku.hcl │ │ │ │ ├── terraform_variable_invalid.json │ │ │ │ ├── null_strings.json │ │ │ │ ├── structure.hcl │ │ │ │ ├── object_with_bool.hcl │ │ │ │ ├── structure_list.json │ │ │ │ ├── nested_provider_bad.hcl │ │ │ │ ├── structure.json │ │ │ │ ├── structure_flat.json │ │ │ │ ├── list_of_maps.hcl │ │ │ │ ├── slice_expand.hcl │ │ │ │ ├── terraform_heroku.json │ │ │ │ ├── scientific.json │ │ │ │ ├── structure_multi.json │ │ │ │ ├── structure2.json │ │ │ │ ├── structure2.hcl │ │ │ │ ├── escape.hcl │ │ │ │ ├── decode_tf_variable.hcl │ │ │ │ ├── escape_backslash.hcl │ │ │ │ ├── decode_policy.hcl │ │ │ │ ├── decode_tf_variable.json │ │ │ │ ├── decode_policy.json │ │ │ │ ├── structure_list_deep.json │ │ │ │ └── object_list.json │ │ │ ├── json │ │ │ │ ├── parser │ │ │ │ │ └── test-fixtures │ │ │ │ │ │ ├── bad_input_128.json │ │ │ │ │ │ ├── basic.json │ │ │ │ │ │ ├── object.json │ │ │ │ │ │ ├── array.json │ │ │ │ │ │ ├── bad_input_tf_8110.json │ │ │ │ │ │ ├── good_input_tf_8110.json │ │ │ │ │ │ └── types.json │ │ │ │ ├── test-fixtures │ │ │ │ │ ├── basic.json │ │ │ │ │ ├── array.json │ │ │ │ │ ├── object.json │ │ │ │ │ └── types.json │ │ │ │ └── token │ │ │ │ │ └── token_test.go │ │ │ ├── go.mod │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── go.sum │ │ │ ├── testhelper │ │ │ │ └── unix2dos.go │ │ │ ├── Makefile │ │ │ ├── appveyor.yml │ │ │ ├── hcl_test.go │ │ │ ├── .github │ │ │ │ └── ISSUE_TEMPLATE.md │ │ │ ├── hcl.go │ │ │ ├── lex_test.go │ │ │ └── lex.go │ │ ├── errwrap │ │ │ └── go.mod │ │ ├── go-retryablehttp │ │ │ ├── CODEOWNERS │ │ │ ├── .gitignore │ │ │ ├── go.mod │ │ │ ├── Makefile │ │ │ ├── .github │ │ │ │ ├── dependabot.yml │ │ │ │ └── workflows │ │ │ │ │ └── actionlint.yml │ │ │ └── CHANGELOG.md │ │ ├── golang-lru │ │ │ ├── go.mod │ │ │ ├── testing.go │ │ │ ├── README.md │ │ │ ├── .gitignore │ │ │ └── .golangci.yml │ │ ├── go-cleanhttp │ │ │ └── go.mod │ │ └── go-multierror │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── sort.go │ │ │ ├── flatten.go │ │ │ └── format_test.go │ ├── aws │ │ ├── smithy-go │ │ │ └── NOTICE │ │ └── aws-sdk-go-v2 │ │ │ └── NOTICE.txt │ ├── moby │ │ ├── spdystream │ │ │ └── NOTICE │ │ └── patternmatcher │ │ │ └── NOTICE │ ├── coreos │ │ └── go-semver │ │ │ └── semver │ │ │ └── NOTICE │ ├── agext │ │ └── levenshtein │ │ │ └── NOTICE │ ├── prometheus │ │ ├── client_model │ │ │ └── go │ │ │ │ └── NOTICE │ │ ├── statsd_exporter │ │ │ └── pkg │ │ │ │ └── NOTICE │ │ ├── common │ │ │ └── NOTICE │ │ └── procfs │ │ │ └── NOTICE │ ├── paketo-buildpacks │ │ └── libpak │ │ │ └── NOTICE │ ├── docker │ │ ├── go-metrics │ │ │ └── NOTICE │ │ ├── cli │ │ │ └── cli │ │ │ │ └── NOTICE │ │ └── docker │ │ │ └── NOTICE │ ├── containerd │ │ └── containerd │ │ │ └── NOTICE │ ├── opencontainers │ │ └── runc │ │ │ └── libcontainer │ │ │ └── user │ │ │ └── NOTICE │ ├── jmespath │ │ └── go-jmespath │ │ │ └── LICENSE │ ├── skeema │ │ └── knownhosts │ │ │ └── NOTICE │ ├── buildpacks │ │ └── libcnb │ │ │ └── NOTICE │ ├── containers │ │ └── storage │ │ │ └── pkg │ │ │ └── NOTICE │ └── blendle │ │ └── zapdriver │ │ └── LICENSE │ ├── gopkg.in │ ├── yaml.v2 │ │ └── NOTICE │ └── yaml.v3 │ │ └── NOTICE │ ├── gotest.tools │ └── v3 │ │ └── LICENSE │ ├── google.golang.org │ └── grpc │ │ └── NOTICE.txt │ └── sigs.k8s.io │ ├── yaml │ └── goyaml.v2 │ │ └── NOTICE │ └── kustomize │ └── kyaml │ └── internal │ └── forked │ └── github.com │ └── go-yaml │ └── yaml │ └── NOTICE ├── pkg ├── oci │ ├── testdata │ │ └── test-links │ │ │ ├── a.lnk │ │ │ ├── b │ │ │ ├── linkToRoot │ │ │ ├── c │ │ │ │ └── linkToParent │ │ │ ├── linkToCurrentDir │ │ │ ├── linkToRootsParent │ │ │ └── linkOutsideRootsParent │ │ │ ├── linkToRoot │ │ │ ├── a.txt │ │ │ ├── ...validName.lnk │ │ │ └── ...validName.txt │ └── errors.go ├── pipelines │ ├── init.go │ ├── tekton │ │ └── testdata │ │ │ └── fn-src │ │ │ ├── .gitignore │ │ │ ├── hello.txt │ │ │ └── hello.txt.lnk │ └── metadata.go ├── filesystem │ └── testdata │ │ ├── root │ │ └── a │ │ │ ├── hello.lnk │ │ │ └── hello.txt │ │ ├── repo.git │ │ ├── HEAD │ │ ├── refs │ │ │ └── heads │ │ │ │ └── master │ │ ├── config │ │ ├── description │ │ ├── objects │ │ │ ├── 73 │ │ │ │ └── 2af9ed648c3488e3b314ab1b3f6ee65cac5161 │ │ │ ├── 98 │ │ │ │ └── 0a0d5f19a64b4b30a87d4206aade58726b60e3 │ │ │ ├── 7e │ │ │ │ └── 6db979cdd45dff20bdde1bd3233a99acd9110c │ │ │ ├── 8b │ │ │ │ └── 3ca73a54c5388fb90004d927bdabfd498b1a89 │ │ │ └── a5 │ │ │ │ └── 162f80d4a6782b7cb2a0a197f834e683cb9eb1 │ │ ├── hooks │ │ │ ├── post-update.sample │ │ │ ├── pre-merge-commit.sample │ │ │ ├── pre-applypatch.sample │ │ │ ├── applypatch-msg.sample │ │ │ └── pre-receive.sample │ │ └── info │ │ │ └── exclude │ │ └── fs.zip ├── config │ └── testdata │ │ ├── func │ │ └── config.yaml │ │ ├── TestLoad │ │ └── func │ │ │ └── config.yaml │ │ └── TestDefaultNamespace │ │ └── kubeconfig ├── functions │ ├── testdata │ │ ├── repository-a.git │ │ │ ├── hooks │ │ │ │ └── .gitinclude │ │ │ ├── refs │ │ │ │ ├── heads │ │ │ │ │ ├── .gitinclude │ │ │ │ │ └── main │ │ │ │ ├── tags │ │ │ │ │ └── .gitinclude │ │ │ │ └── remotes │ │ │ │ │ └── origin │ │ │ │ │ └── HEAD │ │ │ ├── objects │ │ │ │ ├── 32 │ │ │ │ │ └── bad9e3775e80ae9b7483acf6d7630bf8b945e9 │ │ │ │ ├── 88 │ │ │ │ │ └── 3ff23f61018546cac0c302c5c75e3c65ed832d │ │ │ │ ├── 91 │ │ │ │ │ └── f1295d025a69a8ae87296ea5fda680672275d9 │ │ │ │ ├── info │ │ │ │ │ └── .gitinclude │ │ │ │ ├── pack │ │ │ │ │ ├── .gitinclude │ │ │ │ │ ├── pack-3cc26077b1d72f3ffb9484d7baca188936db8c5e.idx │ │ │ │ │ └── pack-3cc26077b1d72f3ffb9484d7baca188936db8c5e.pack │ │ │ │ ├── af │ │ │ │ │ └── e663f9ef928be2b5cb93f836c0905e60f09ab2 │ │ │ │ ├── d5 │ │ │ │ │ └── c0914f5e90ce1ccc3ee90e44ab610f466c774f │ │ │ │ ├── dd │ │ │ │ │ └── c6c5f6af77cfd92693c2b5b910b22a26379d01 │ │ │ │ ├── e7 │ │ │ │ │ └── ca8dffd312a48aac1f2aadd64a13ac34e021b9 │ │ │ │ ├── ee │ │ │ │ │ └── f72a905e2866c0e4b4d13cb14bf118c8e8aa0b │ │ │ │ └── ef │ │ │ │ │ └── 1e6c8ed28e25dec915e8cd7479dacf671665ed │ │ │ ├── HEAD │ │ │ ├── COMMIT_EDITMSG │ │ │ ├── config │ │ │ ├── description │ │ │ ├── index │ │ │ ├── packed-refs │ │ │ ├── logs │ │ │ │ ├── refs │ │ │ │ │ ├── remotes │ │ │ │ │ │ └── origin │ │ │ │ │ │ │ └── HEAD │ │ │ │ │ └── heads │ │ │ │ │ │ └── main │ │ │ │ └── HEAD │ │ │ └── info │ │ │ │ └── exclude │ │ ├── repositories │ │ │ ├── customTemplateRepo │ │ │ │ ├── README.md │ │ │ │ ├── node │ │ │ │ │ └── json │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── json.js │ │ │ │ ├── customRuntime │ │ │ │ │ ├── .gitinclude │ │ │ │ │ └── customTemplate │ │ │ │ │ │ └── custom.impl │ │ │ │ ├── go │ │ │ │ │ └── customTemplate │ │ │ │ │ │ └── custom.go │ │ │ │ └── test │ │ │ │ │ ├── tpla │ │ │ │ │ └── customtpl.txt │ │ │ │ │ ├── tplc │ │ │ │ │ └── customtpl.txt │ │ │ │ │ └── tplb │ │ │ │ │ └── executable.sh │ │ │ ├── customLanguagePackRepo │ │ │ │ ├── templates │ │ │ │ │ ├── customRuntime │ │ │ │ │ │ └── customTemplate │ │ │ │ │ │ │ └── custom.impl │ │ │ │ │ └── manifestedRuntime │ │ │ │ │ │ ├── customTemplate │ │ │ │ │ │ └── custom.impl │ │ │ │ │ │ ├── manifestedTemplate │ │ │ │ │ │ └── custom.impl │ │ │ │ │ │ └── manifest.yaml │ │ │ │ └── manifest.yaml │ │ │ └── README.md │ │ ├── repository.git │ │ │ ├── HEAD │ │ │ ├── refs │ │ │ │ └── heads │ │ │ │ │ ├── main │ │ │ │ │ └── master │ │ │ ├── description │ │ │ ├── config │ │ │ ├── objects │ │ │ │ ├── 27 │ │ │ │ │ └── d75d0e58009a59e1ff8a52a3297e1e0574138b │ │ │ │ ├── 43 │ │ │ │ │ └── 0739f6d9930f74a6aef1a410f0f0727d171cef │ │ │ │ ├── 44 │ │ │ │ │ └── 788c5d0e56a8bb819c56a307b6c8de4045e020 │ │ │ │ ├── 93 │ │ │ │ │ └── bd2fa63bb19bf11231dde8709672bd1428e57c │ │ │ │ ├── 00 │ │ │ │ │ └── 9641334a89d30963a68442a132e5f8ef389ba8 │ │ │ │ ├── b2 │ │ │ │ │ └── 7e306a552e80fcae0bfa959bd6e8652de70c69 │ │ │ │ ├── b7 │ │ │ │ │ └── 5832d0a4a4bb0409cca573b2c97b017d088f90 │ │ │ │ ├── c8 │ │ │ │ │ └── fdee8e0a172c9e1544bc127b2bfb35829ffe1f │ │ │ │ └── e6 │ │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ ├── hooks │ │ │ │ ├── post-update.sample │ │ │ │ ├── pre-merge-commit.sample │ │ │ │ ├── pre-applypatch.sample │ │ │ │ ├── applypatch-msg.sample │ │ │ │ └── pre-receive.sample │ │ │ └── info │ │ │ │ └── exclude │ │ ├── testFunctionMarshallingError │ │ │ └── func.yaml │ │ ├── testClientRunTimeout │ │ │ ├── go.mod │ │ │ └── f.go │ │ ├── testClientRunReadiness │ │ │ ├── go.mod │ │ │ └── f.go │ │ ├── example.com │ │ │ └── region1 │ │ │ │ └── README.md │ │ ├── testFunctionMigrationError │ │ │ └── func.yaml │ │ ├── default_home │ │ │ └── README.md │ │ ├── migrations │ │ │ ├── README.md │ │ │ ├── v0.35.0 │ │ │ │ └── func.yaml │ │ │ ├── v0.35.0-nondefault │ │ │ │ └── func.yaml │ │ │ ├── v0.25.0 │ │ │ │ └── func.yaml │ │ │ ├── v0.23.0 │ │ │ │ └── func.yaml │ │ │ ├── v0.19.0 │ │ │ │ └── func.yaml │ │ │ ├── v0.23.0-customized │ │ │ │ └── func.yaml │ │ │ └── v0.34.0 │ │ │ │ └── func.yaml │ │ └── cluster.yaml │ ├── function_envs_test.go │ └── templates_embedded.go ├── version │ └── version.go ├── scaffolding │ └── testdata │ │ ├── testwrite │ │ ├── go │ │ │ └── scaffolding │ │ │ │ └── instanced-http │ │ │ │ ├── go.mod │ │ │ │ └── main.go │ │ └── certs │ │ │ └── README.md │ │ └── testnotfound │ │ └── go │ │ └── README.md ├── builders │ └── testdata │ │ └── go-fn-with-private-deps │ │ ├── func.yaml │ │ ├── go.mod │ │ ├── .funcignore │ │ ├── go.sum │ │ ├── .gitignore │ │ ├── handle.go │ │ ├── handle_test.go │ │ └── README.md ├── k8s │ ├── labels │ │ └── labels.go │ ├── manifestival.go │ ├── describer_int_test.go │ ├── lister_int_test.go │ ├── dialer_unit_test.go │ ├── remover_int_test.go │ ├── serviceaccount.go │ ├── secrets_test.go │ └── configmaps_test.go ├── ssh │ ├── ssh_agent_conf.go │ ├── ssh_agent_conf_windows.go │ └── ssh_posix_test.go ├── docker │ ├── docker_client_nonlinux.go │ └── close_guarding_client.go ├── mcp │ ├── instructions.go │ ├── resources_templates.go │ ├── resources_language.go │ └── resources.go ├── mock │ ├── dnsProvider.go │ ├── remover.go │ ├── mcp_server.go │ ├── builder.go │ ├── pusher.go │ ├── lister.go │ └── describer.go ├── knative │ ├── describer_int_test.go │ ├── lister_int_test.go │ ├── remover_int_test.go │ └── errors.go └── http │ └── openshift_int_test.go ├── templates ├── node │ ├── http │ │ ├── .gitignore │ │ └── package.json │ └── cloudevents │ │ ├── .gitignore │ │ ├── manifest.yaml │ │ └── package.json ├── rust │ ├── http │ │ ├── .gitignore │ │ └── Cargo.toml │ ├── cloudevents │ │ ├── .gitignore │ │ ├── manifest.yaml │ │ └── Cargo.toml │ └── manifest.yaml ├── go │ ├── scaffolding │ │ ├── static-http │ │ │ ├── f │ │ │ ├── go.mod │ │ │ └── main.go │ │ ├── instanced-http │ │ │ ├── f │ │ │ ├── main.go │ │ │ └── go.mod │ │ ├── static-cloudevents │ │ │ ├── f │ │ │ └── main.go │ │ ├── instanced-cloudevents │ │ │ ├── f │ │ │ └── main.go │ │ └── README.md │ ├── http │ │ ├── go.mod │ │ ├── handle.go │ │ └── handle_test.go │ ├── .instanced-http │ │ ├── go.mod │ │ ├── function_test.go │ │ └── README.md │ ├── cloudevents │ │ ├── go.mod │ │ ├── manifest.yaml │ │ └── handle_test.go │ └── .instanced-cloudevents │ │ ├── go.mod │ │ ├── manifest.yaml │ │ └── function_test.go ├── typescript │ ├── http │ │ ├── .gitignore │ │ ├── .prettierrc │ │ └── .eslintrc │ ├── cloudevents │ │ ├── .gitignore │ │ ├── manifest.yaml │ │ ├── .prettierrc │ │ └── .eslintrc │ └── manifest.yaml ├── python │ ├── scaffolding │ │ ├── instanced-http │ │ │ ├── f │ │ │ ├── service │ │ │ │ └── __init__.py │ │ │ ├── README.md │ │ │ └── pyproject.toml │ │ └── instanced-cloudevents │ │ │ ├── f │ │ │ ├── service │ │ │ └── __init__.py │ │ │ ├── README.md │ │ │ └── pyproject.toml │ ├── http │ │ ├── function │ │ │ └── __init__.py │ │ └── pyproject.toml │ └── cloudevents │ │ ├── function │ │ └── __init__.py │ │ ├── manifest.yaml │ │ └── pyproject.toml ├── quarkus │ ├── cloudevents │ │ ├── manifest.yaml │ │ ├── src │ │ │ ├── main │ │ │ │ ├── resources │ │ │ │ │ └── application.properties │ │ │ │ └── java │ │ │ │ │ └── functions │ │ │ │ │ ├── Input.java │ │ │ │ │ └── Output.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── functions │ │ │ │ └── NativeFunctionIT.java │ │ └── .gitignore │ ├── http │ │ ├── src │ │ │ ├── main │ │ │ │ ├── resources │ │ │ │ │ └── application.properties │ │ │ │ └── java │ │ │ │ │ └── functions │ │ │ │ │ ├── Input.java │ │ │ │ │ ├── Output.java │ │ │ │ │ └── Function.java │ │ │ └── test │ │ │ │ └── java │ │ │ │ └── functions │ │ │ │ └── NativeFunctionIT.java │ │ └── .gitignore │ └── manifest.yaml ├── springboot │ ├── http │ │ ├── src │ │ │ └── main │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ ├── .editorconfig │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ └── maven-wrapper.properties │ │ └── .gitignore │ ├── cloudevents │ │ ├── src │ │ │ └── main │ │ │ │ └── resources │ │ │ │ └── application.properties │ │ ├── .editorconfig │ │ ├── .mvn │ │ │ └── wrapper │ │ │ │ └── maven-wrapper.properties │ │ ├── manifest.yaml │ │ └── .gitignore │ └── manifest.yaml ├── manifest.yaml └── certs │ └── README.md ├── cmd ├── testdata │ ├── repository.git │ │ ├── hooks │ │ │ └── .gitinclude │ │ ├── objects │ │ │ ├── 25 │ │ │ │ └── 128199189ce87956e5e41fa8113bbf5cb6c39a │ │ │ ├── 27 │ │ │ │ └── d75d0e58009a59e1ff8a52a3297e1e0574138b │ │ │ ├── 43 │ │ │ │ └── 0739f6d9930f74a6aef1a410f0f0727d171cef │ │ │ ├── 67 │ │ │ │ └── 00ea8078422674e91189c1b513d1ab0696b150 │ │ │ ├── 98 │ │ │ │ └── 68959b2b456ac7767bf351a84b369f9fbadb3a │ │ │ ├── info │ │ │ │ └── packs │ │ │ ├── 00 │ │ │ │ └── 9641334a89d30963a68442a132e5f8ef389ba8 │ │ │ ├── 6f │ │ │ │ └── 6a77b977041c978dbdd431f9e7b2952c6908a3 │ │ │ ├── 8b │ │ │ │ └── 57110b1cc8f2019ca4b2ed51a450ee0873eaaf │ │ │ ├── 9a │ │ │ │ └── c29c7ad8c06fa6613b794521568fbd7ea007dd │ │ │ ├── b2 │ │ │ │ └── 7e306a552e80fcae0bfa959bd6e8652de70c69 │ │ │ ├── b7 │ │ │ │ └── 5832d0a4a4bb0409cca573b2c97b017d088f90 │ │ │ ├── c7 │ │ │ │ └── e84596af04680b8e7a39b9a527f19ccd75f287 │ │ │ ├── ca │ │ │ │ ├── 1a6296f97eced6c9497d05598ef508852cac5d │ │ │ │ └── 5019f945b1d769d042c5f87d39f5d7a15f290c │ │ │ ├── e6 │ │ │ │ └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │ │ │ └── f3 │ │ │ │ └── a9c97a29b561e7d72668581ea82284de2f1ca0 │ │ ├── refs │ │ │ ├── tags │ │ │ │ └── .gitinclude │ │ │ └── heads │ │ │ │ └── main │ │ ├── HEAD │ │ ├── info │ │ │ ├── refs │ │ │ └── exclude │ │ ├── description │ │ ├── packed-refs │ │ └── config │ ├── Test_defaultNamespace │ │ ├── func │ │ │ └── config.yaml │ │ └── kubeconfig │ ├── TestX_ConfigApplied │ │ └── func │ │ │ └── config.yaml │ ├── TestX_ConfigPrecedence │ │ └── func │ │ │ └── config.yaml │ ├── default_kubeconfig │ ├── TestDeploy_NamespaceDefaults │ │ └── kubeconfig │ └── TestDeploy_NamespaceRedeployWarning │ │ └── kubeconfig ├── func │ └── main.go ├── testing │ └── factory.go └── tkn_tasks.go ├── e2e └── testdata │ └── templates │ ├── python │ └── http │ │ ├── README.md │ │ ├── function │ │ └── __init__.py │ │ └── pyproject.toml │ └── manifest.yaml ├── .unicode-control-characters.config.py ├── func-util-symlinks.tgz ├── main.go ├── .ko.yaml ├── CODE-OF-CONDUCT.md ├── CLAUDE.md ├── OWNERS ├── AUTHORS ├── .github └── workflows │ ├── knative-stale.yaml │ ├── knative-go-build.yaml │ ├── knative-style.yaml │ ├── knative-security.yaml │ ├── knative-go-test.yaml │ └── update-ca-bundle.yaml ├── .versionrc ├── .gitattributes ├── docs └── reference │ ├── func_repository_list.md │ ├── func_repository_add.md │ ├── func_repository_remove.md │ ├── func_repository_rename.md │ ├── func_config_ci.md │ ├── func_completion.md │ ├── func_mcp_start.md │ └── func_config_labels_remove.md ├── SECURITY.md ├── Dockerfile.utils ├── hack ├── component-versions.json ├── tools.go └── component-versions.sh └── .codecov.yaml /third_party/go.mod: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/a.lnk: -------------------------------------------------------------------------------- 1 | ./a.txt -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/b/linkToRoot: -------------------------------------------------------------------------------- 1 | .. -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/linkToRoot: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /pkg/pipelines/init.go: -------------------------------------------------------------------------------- 1 | package pipelines 2 | -------------------------------------------------------------------------------- /templates/node/http/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /templates/rust/http/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /cmd/testdata/repository.git/hooks/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/a.txt: -------------------------------------------------------------------------------- 1 | file a 2 | -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/b/c/linkToParent: -------------------------------------------------------------------------------- 1 | .. -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/b/linkToCurrentDir: -------------------------------------------------------------------------------- 1 | . -------------------------------------------------------------------------------- /templates/go/scaffolding/static-http/f: -------------------------------------------------------------------------------- 1 | ../../http -------------------------------------------------------------------------------- /templates/typescript/http/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /cmd/testdata/repository.git/objects/info/packs: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /cmd/testdata/repository.git/refs/tags/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/root/a/hello.lnk: -------------------------------------------------------------------------------- 1 | hello.txt -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/b/linkToRootsParent: -------------------------------------------------------------------------------- 1 | ../.. -------------------------------------------------------------------------------- /templates/node/cloudevents/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /templates/rust/cloudevents/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | -------------------------------------------------------------------------------- /cmd/testdata/repository.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/main 2 | -------------------------------------------------------------------------------- /e2e/testdata/templates/python/http/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | -------------------------------------------------------------------------------- /pkg/config/testdata/func/config.yaml: -------------------------------------------------------------------------------- 1 | language: custom 2 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/root/a/hello.txt: -------------------------------------------------------------------------------- 1 | Hello World! 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/hooks/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/python/scaffolding/instanced-http/f: -------------------------------------------------------------------------------- 1 | ../../http -------------------------------------------------------------------------------- /templates/typescript/cloudevents/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/refs/heads/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/refs/tags/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/...validName.lnk: -------------------------------------------------------------------------------- 1 | ...validName.txt -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/...validName.txt: -------------------------------------------------------------------------------- 1 | validName.txt 2 | -------------------------------------------------------------------------------- /pkg/oci/testdata/test-links/b/linkOutsideRootsParent: -------------------------------------------------------------------------------- 1 | ../../.. -------------------------------------------------------------------------------- /pkg/pipelines/tekton/testdata/fn-src/.gitignore: -------------------------------------------------------------------------------- 1 | **/a.out 2 | -------------------------------------------------------------------------------- /pkg/pipelines/tekton/testdata/fn-src/hello.txt: -------------------------------------------------------------------------------- 1 | Hello World! 2 | -------------------------------------------------------------------------------- /pkg/pipelines/tekton/testdata/fn-src/hello.txt.lnk: -------------------------------------------------------------------------------- 1 | hello.txt -------------------------------------------------------------------------------- /templates/go/http/go.mod: -------------------------------------------------------------------------------- 1 | module function 2 | 3 | go 1.21 4 | -------------------------------------------------------------------------------- /templates/go/scaffolding/instanced-http/f: -------------------------------------------------------------------------------- 1 | ../../.instanced-http -------------------------------------------------------------------------------- /templates/go/scaffolding/static-cloudevents/f: -------------------------------------------------------------------------------- 1 | ../../cloudevents -------------------------------------------------------------------------------- /templates/python/scaffolding/instanced-http/service/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.unicode-control-characters.config.py: -------------------------------------------------------------------------------- 1 | scan_exclude = [ 2 | ] 3 | -------------------------------------------------------------------------------- /pkg/config/testdata/TestLoad/func/config.yaml: -------------------------------------------------------------------------------- 1 | language: custom 2 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/objects/info/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/objects/pack/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/python/http/function/__init__.py: -------------------------------------------------------------------------------- 1 | from .func import new 2 | -------------------------------------------------------------------------------- /templates/quarkus/cloudevents/manifest.yaml: -------------------------------------------------------------------------------- 1 | invoke: "cloudevent" 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customTemplateRepo/README.md: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/main 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository.git/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /templates/go/.instanced-http/go.mod: -------------------------------------------------------------------------------- 1 | module function 2 | 3 | go 1.21 4 | -------------------------------------------------------------------------------- /templates/python/scaffolding/instanced-cloudevents/f: -------------------------------------------------------------------------------- 1 | ../../cloudevents -------------------------------------------------------------------------------- /templates/python/scaffolding/instanced-cloudevents/service/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/typescript/cloudevents/manifest.yaml: -------------------------------------------------------------------------------- 1 | invoke: "cloudevent" 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customTemplateRepo/node/json/index.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customTemplateRepo/node/json/json.js: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/COMMIT_EDITMSG: -------------------------------------------------------------------------------- 1 | add manifest.yaml 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/testFunctionMarshallingError/func.yaml: -------------------------------------------------------------------------------- 1 | name: "hel 2 | -------------------------------------------------------------------------------- /templates/go/scaffolding/instanced-cloudevents/f: -------------------------------------------------------------------------------- 1 | ../../.instanced-cloudevents -------------------------------------------------------------------------------- /templates/python/cloudevents/function/__init__.py: -------------------------------------------------------------------------------- 1 | from .func import new 2 | -------------------------------------------------------------------------------- /cmd/testdata/Test_defaultNamespace/func/config.yaml: -------------------------------------------------------------------------------- 1 | namespace: "globaldefault" 2 | -------------------------------------------------------------------------------- /e2e/testdata/templates/python/http/function/__init__.py: -------------------------------------------------------------------------------- 1 | from .func import new 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customTemplateRepo/customRuntime/.gitinclude: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pkg/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | var Vers, Kver, Hash string 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/test-fixtures/empty.hcl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cmd/testdata/repository.git/refs/heads/main: -------------------------------------------------------------------------------- 1 | 6f6a77b977041c978dbdd431f9e7b2952c6908a3 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/testClientRunTimeout/go.mod: -------------------------------------------------------------------------------- 1 | module function 2 | 3 | go 1.17 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/dir.ignore: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/good.hcl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /func-util-symlinks.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knative/func/HEAD/func-util-symlinks.tgz -------------------------------------------------------------------------------- /pkg/functions/testdata/testClientRunReadiness/go.mod: -------------------------------------------------------------------------------- 1 | module function 2 | 3 | go 1.17 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/git_crypt.hcl: -------------------------------------------------------------------------------- 1 | GITCRYPT 2 | -------------------------------------------------------------------------------- /cmd/testdata/repository.git/info/refs: -------------------------------------------------------------------------------- 1 | 6f6a77b977041c978dbdd431f9e7b2952c6908a3 refs/heads/main 2 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 7e6db979cdd45dff20bdde1bd3233a99acd9110c 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/example.com/region1/README.md: -------------------------------------------------------------------------------- 1 | # region1 2 | 3 | Used as a test target. 4 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/refs/remotes/origin/HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/remotes/origin/main 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository.git/refs/heads/main: -------------------------------------------------------------------------------- 1 | 44788c5d0e56a8bb819c56a307b6c8de4045e020 2 | -------------------------------------------------------------------------------- /templates/rust/manifest.yaml: -------------------------------------------------------------------------------- 1 | buildEnvs: 2 | - name: BP_RUSTUP_ENABLED 3 | value: "false" 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/empty.hcl: -------------------------------------------------------------------------------- 1 | resource "foo" {} 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/float.hcl: -------------------------------------------------------------------------------- 1 | a = 1.02 2 | b = 2 3 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customTemplateRepo/customRuntime/customTemplate/custom.impl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customTemplateRepo/go/customTemplate/custom.go: -------------------------------------------------------------------------------- 1 | package custom 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/refs/heads/main: -------------------------------------------------------------------------------- 1 | d5c0914f5e90ce1ccc3ee90e44ab610f466c774f 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository.git/refs/heads/master: -------------------------------------------------------------------------------- 1 | 44788c5d0e56a8bb819c56a307b6c8de4045e020 2 | -------------------------------------------------------------------------------- /pkg/scaffolding/testdata/testwrite/go/scaffolding/instanced-http/go.mod: -------------------------------------------------------------------------------- 1 | module s 2 | 3 | go 1.22 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/errwrap/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/hashicorp/errwrap 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/.hidden.ignore: -------------------------------------------------------------------------------- 1 | invalid 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/file.ignore: -------------------------------------------------------------------------------- 1 | invalid 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl: -------------------------------------------------------------------------------- 1 | #foo -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/test-fixtures/comment_single.hcl: -------------------------------------------------------------------------------- 1 | # Hello 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/test-fixtures/list.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo"] 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/basic_int_string.hcl: -------------------------------------------------------------------------------- 1 | count = "3" 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/multiline_no_marker.hcl: -------------------------------------------------------------------------------- 1 | foo = << 2 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/fs.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/knative/func/HEAD/pkg/filesystem/testdata/fs.zip -------------------------------------------------------------------------------- /templates/springboot/http/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Spring Functions Configuration 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/go-retryablehttp/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @hashicorp/release-engineering -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl: -------------------------------------------------------------------------------- 1 | # Hello 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl: -------------------------------------------------------------------------------- 1 | GITCRYPT 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/test-fixtures/complex_key.hcl: -------------------------------------------------------------------------------- 1 | foo.bar = "baz" 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/json/parser/test-fixtures/bad_input_128.json: -------------------------------------------------------------------------------- 1 | {:{ 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/flat.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | Key = 7 3 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "knative.dev/func/pkg/app" 4 | 5 | func main() { 6 | app.Main() 7 | } 8 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl: -------------------------------------------------------------------------------- 1 | foo.bar = "baz" 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo"] 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/test-fixtures/list_comma.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo",] 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/test-fixtures/multiple.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | key = 7 3 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/unterminated_block_comment.hcl: -------------------------------------------------------------------------------- 1 | /* 2 | Foo 3 | -------------------------------------------------------------------------------- /cmd/testdata/repository.git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customLanguagePackRepo/templates/customRuntime/customTemplate/custom.impl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customLanguagePackRepo/templates/manifestedRuntime/customTemplate/custom.impl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/go-retryablehttp/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | *.iml 3 | *.test 4 | .vscode/ -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo",] 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/comment_newline.input: -------------------------------------------------------------------------------- 1 | # Hello 2 | # World 3 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/test-fixtures/structure_empty.hcl: -------------------------------------------------------------------------------- 1 | resource "foo" "bar" {} 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/json/test-fixtures/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/block_assign.hcl: -------------------------------------------------------------------------------- 1 | environment = "aws" { 2 | } 3 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/float.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": 1.02, 3 | "b": 2 4 | } 5 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/list_of_lists.hcl: -------------------------------------------------------------------------------- 1 | foo = [["foo"], ["bar"]] 2 | 3 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/multiline.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar\nbaz" 3 | } 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/structure_list_empty.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": [] 3 | } 4 | -------------------------------------------------------------------------------- /cmd/func/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "knative.dev/func/pkg/app" 4 | 5 | func main() { 6 | app.Main() 7 | } 8 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = true 4 | bare = true 5 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customLanguagePackRepo/templates/manifestedRuntime/manifestedTemplate/custom.impl: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | key = 7 3 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/json/parser/test-fixtures/basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar" 3 | } 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/multiline.hcl: -------------------------------------------------------------------------------- 1 | foo = < 1632511912 -0400 clone: from file://./home/lanceball/src/github.com/knative/func/testdata/repository-a.git 2 | -------------------------------------------------------------------------------- /templates/quarkus/http/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.funqy.export=function 4 | quarkus.smallrye-health.root-path=/health 5 | quarkus.smallrye-health.liveness-path=liveness 6 | quarkus.smallrye-health.readiness-path=readiness 7 | -------------------------------------------------------------------------------- /templates/springboot/http/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /pkg/builders/testdata/go-fn-with-private-deps/.funcignore: -------------------------------------------------------------------------------- 1 | 2 | # Use the .funcignore file to exclude files which should not be 3 | # tracked in the image build. To instruct the system not to track 4 | # files in the image build, add the regex pattern or file information 5 | # to this file. 6 | -------------------------------------------------------------------------------- /templates/quarkus/cloudevents/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Configuration file 2 | # key = value 3 | quarkus.funqy.export=function 4 | quarkus.smallrye-health.root-path=/health 5 | quarkus.smallrye-health.liveness-path=liveness 6 | quarkus.smallrye-health.readiness-path=readiness 7 | -------------------------------------------------------------------------------- /templates/springboot/cloudevents/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.golden: -------------------------------------------------------------------------------- 1 | variable "environment" { 2 | default = {} 3 | 4 | # default { 5 | # "region" = "us-west-2" 6 | # "sg" = "playground" 7 | # "env" = "prod" 8 | # } 9 | } 10 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/comment_object_multi.input: -------------------------------------------------------------------------------- 1 | variable "environment" { 2 | default = {} 3 | 4 | # default { 5 | # "region" = "us-west-2" 6 | # "sg" = "playground" 7 | # "env" = "prod" 8 | # } 9 | } 10 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/empty_block.input: -------------------------------------------------------------------------------- 1 | variable "foo" {} 2 | variable "foo" { 3 | } 4 | 5 | variable "foo" { 6 | # Standalone comment should be still here 7 | } 8 | 9 | foo { 10 | } 11 | 12 | foo { 13 | bar = "mssola" 14 | } 15 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/decode_policy.hcl: -------------------------------------------------------------------------------- 1 | key "" { 2 | policy = "read" 3 | } 4 | 5 | key "foo/" { 6 | policy = "write" 7 | } 8 | 9 | key "foo/bar/" { 10 | policy = "read" 11 | } 12 | 13 | key "foo/bar/baz" { 14 | policy = "deny" 15 | } 16 | -------------------------------------------------------------------------------- /pkg/builders/testdata/go-fn-with-private-deps/go.sum: -------------------------------------------------------------------------------- 1 | git-private.localtest.me/foo.git v0.0.0-20250704181237-d1e4de9dcd02 h1:8zZccH+dkzYMYRJN+sPw4fed4NlwC5W9hfNM4kl6RlM= 2 | git-private.localtest.me/foo.git v0.0.0-20250704181237-d1e4de9dcd02/go.mod h1:jqnvPQqnKYxxNNRBi9Wmpo5coeutnzAYIim12Lo9qRc= 3 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.input: -------------------------------------------------------------------------------- 1 | banana = [ 2 | # I really want to comment this item in the array. 3 | "a", 4 | 5 | # This as well 6 | "b", 7 | 8 | "c", # And C 9 | "d", 10 | 11 | # And another 12 | "e", 13 | ] 14 | -------------------------------------------------------------------------------- /cmd/testdata/repository.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.golden: -------------------------------------------------------------------------------- 1 | banana = [ 2 | # I really want to comment this item in the array. 3 | "a", 4 | 5 | # This as well 6 | "b", 7 | 8 | "c", # And C 9 | "d", 10 | 11 | # And another 12 | "e", 13 | ] 14 | -------------------------------------------------------------------------------- /OWNERS: -------------------------------------------------------------------------------- 1 | # The OWNERS file is used by prow to automatically merge approved PRs. 2 | 3 | approvers: 4 | - technical-oversight-committee 5 | - knative-release-leads 6 | - client-writers 7 | - func-writers 8 | - functions-wg-leads 9 | 10 | reviewers: 11 | - client-writers 12 | - func-reviewers 13 | 14 | -------------------------------------------------------------------------------- /pkg/builders/testdata/go-fn-with-private-deps/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Functions use the .func directory for local runtime data which should 3 | # generally not be tracked in source control. To instruct the system to track 4 | # .func in source control, comment the following line (prefix it with '# '). 5 | /.func 6 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /pkg/docker/docker_client_nonlinux.go: -------------------------------------------------------------------------------- 1 | //go:build !linux 2 | // +build !linux 3 | 4 | package docker 5 | 6 | import "github.com/docker/docker/client" 7 | 8 | func newClientWithPodmanService() (dockerClient client.APIClient, dockerHost string, err error) { 9 | panic("only implemented on Linux") 10 | } 11 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository.git/info/exclude: -------------------------------------------------------------------------------- 1 | # git ls-files --others --exclude-from=.git/info/exclude 2 | # Lines that start with '#' are comments. 3 | # For a project mostly in C, the following would be a good set of 4 | # exclude patterns (uncomment them if you want to use them): 5 | # *.[oa] 6 | # *~ 7 | -------------------------------------------------------------------------------- /templates/quarkus/http/src/test/java/functions/NativeFunctionIT.java: -------------------------------------------------------------------------------- 1 | package functions; 2 | 3 | import io.quarkus.test.junit.QuarkusIntegrationTest; 4 | 5 | @QuarkusIntegrationTest 6 | public class NativeFunctionIT extends FunctionTest { 7 | 8 | // Execute the same tests but in native mode. 9 | } 10 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.golden: -------------------------------------------------------------------------------- 1 | resource "provider" "resource" { 2 | /* 3 | SPACE_SENSITIVE_CODE = < ./f 4 | 5 | go 1.21 6 | 7 | require ( 8 | function v0.0.0-00010101000000-000000000000 9 | knative.dev/func-go v0.21.3 10 | ) 11 | 12 | require ( 13 | github.com/mattn/go-colorable v0.1.13 // indirect 14 | github.com/mattn/go-isatty v0.0.20 // indirect 15 | github.com/rs/zerolog v1.32.0 // indirect 16 | golang.org/x/sys v0.18.0 // indirect 17 | ) 18 | -------------------------------------------------------------------------------- /.versionrc: -------------------------------------------------------------------------------- 1 | { 2 | "bumpFiles": [{ 3 | "filename": "version.txt", 4 | "type": "plain-text" 5 | }], 6 | "types": [ 7 | {"type":"feat","section":"Features"}, 8 | {"type":"fix","section":"Bug Fixes"}, 9 | {"type":"chore","section":"Miscellaneous"}, 10 | {"type":"docs","section":"Documentation"}, 11 | {"type":"refactor","section":"Miscellaneous"} 12 | ], 13 | "skip": { 14 | "tag": true 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /templates/go/scaffolding/instanced-http/go.mod: -------------------------------------------------------------------------------- 1 | module s 2 | 3 | replace function => ./f 4 | 5 | go 1.21 6 | 7 | require ( 8 | function v0.0.0-00010101000000-000000000000 9 | knative.dev/func-go v0.21.3 10 | ) 11 | 12 | require ( 13 | github.com/mattn/go-colorable v0.1.13 // indirect 14 | github.com/mattn/go-isatty v0.0.20 // indirect 15 | github.com/rs/zerolog v1.32.0 // indirect 16 | golang.org/x/sys v0.18.0 // indirect 17 | ) 18 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/test-fixtures/object_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "resource": { 3 | "aws_instance": { 4 | "db": { 5 | "vpc": "foo", 6 | "provisioner": [{ 7 | "file": { 8 | "source": "foo", 9 | "destination": "bar" 10 | } 11 | }] 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /templates/quarkus/http/src/main/java/functions/Input.java: -------------------------------------------------------------------------------- 1 | package functions; 2 | 3 | public class Input { 4 | private String message; 5 | 6 | public Input() {} 7 | 8 | public Input(String message) { 9 | this.message = message; 10 | } 11 | 12 | public String getMessage() { 13 | return message; 14 | } 15 | 16 | public void setMessage(String message) { 17 | this.message = message; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /templates/quarkus/http/src/main/java/functions/Output.java: -------------------------------------------------------------------------------- 1 | package functions; 2 | 3 | public class Output { 4 | private String message; 5 | 6 | public Output() {} 7 | 8 | public Output(String message) { 9 | this.message = message; 10 | } 11 | 12 | public String getMessage() { 13 | return message; 14 | } 15 | 16 | public void setMessage(String message) { 17 | this.message = message; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /pkg/docker/close_guarding_client.go: -------------------------------------------------------------------------------- 1 | package docker 2 | 3 | import ( 4 | "sync" 5 | 6 | "github.com/docker/docker/client" 7 | ) 8 | 9 | // Client that panics when used after Close() 10 | type closeGuardingClient struct { 11 | pimpl client.APIClient 12 | m sync.RWMutex 13 | closed bool 14 | } 15 | 16 | func (c *closeGuardingClient) Close() error { 17 | c.m.Lock() 18 | defer c.m.Unlock() 19 | c.closed = true 20 | return c.pimpl.Close() 21 | } 22 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | testdata/repository-a.git/objects/*/* ignore-lint=true 2 | testdata/repository.git/objects/*/* ignore-lint=true 3 | templates/node/*/package-lock.json ignore-lint=true 4 | templates/typescript/*/package-lock.json ignore-lint=true 5 | version.txt linguist-generated=true 6 | zz_filesystem_generated.go linguist-generated=true 7 | docker/zz_close_guarding_client_generated.go linguist-generated=true 8 | pkg/oci/testdata/test-links/* ignore-lint=true 9 | 10 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "build-{branch}-{build}" 2 | image: Visual Studio 2015 3 | clone_folder: c:\gopath\src\github.com\hashicorp\hcl 4 | environment: 5 | GOPATH: c:\gopath 6 | init: 7 | - git config --global core.autocrlf false 8 | install: 9 | - cmd: >- 10 | echo %Path% 11 | 12 | go version 13 | 14 | go env 15 | 16 | go get -t ./... 17 | 18 | build_script: 19 | - cmd: go test -v ./... 20 | -------------------------------------------------------------------------------- /templates/rust/cloudevents/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "function" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [profile.release] 7 | codegen-units = 1 8 | debug = 0 9 | incremental = true 10 | lto = true 11 | opt-level = "z" 12 | strip = "symbols" 13 | 14 | [dependencies] 15 | actix-rt = "2.8.0" 16 | actix-web = "4.3.1" 17 | cloudevents-sdk = { version = "0.7.0", features = ["actix"] } 18 | env_logger = "0.10.0" 19 | log = "0.4.18" 20 | serde_json = "1.0.96" 21 | -------------------------------------------------------------------------------- /docs/reference/func_repository_list.md: -------------------------------------------------------------------------------- 1 | ## func repository list 2 | 3 | List repositories 4 | 5 | ``` 6 | func repository list 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM) 13 | -h, --help help for list 14 | -v, --verbose Print verbose logs ($FUNC_VERBOSE) 15 | ``` 16 | 17 | ### SEE ALSO 18 | 19 | * [func repository](func_repository.md) - Manage installed template repositories 20 | 21 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.input: -------------------------------------------------------------------------------- 1 | variable "foo" {} 2 | variable "bar" {} 3 | variable "baz" {} 4 | 5 | variable "qux" {} 6 | variable "foo" { foo = "bar" } 7 | 8 | variable "foo" {} 9 | # lead comment 10 | variable "bar" {} 11 | 12 | variable "foo" { default = "bar" } 13 | variable "bar" {} 14 | 15 | # Purposeful newline check below: 16 | 17 | variable "foo" {} 18 | 19 | variable "purposeful-newline" {} 20 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl_test.go: -------------------------------------------------------------------------------- 1 | package hcl 2 | 3 | import ( 4 | "io/ioutil" 5 | "path/filepath" 6 | "testing" 7 | ) 8 | 9 | // This is the directory where our test fixtures are. 10 | const fixtureDir = "./test-fixtures" 11 | 12 | func testReadFile(t *testing.T, n string) string { 13 | d, err := ioutil.ReadFile(filepath.Join(fixtureDir, n)) 14 | if err != nil { 15 | t.Fatalf("err: %s", err) 16 | } 17 | 18 | return string(d) 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/knative-security.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2020 The Knative Authors. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # This file is automagically synced here from github.com/knative-extensions/knobots 5 | 6 | name: 'Security' 7 | 8 | on: 9 | push: 10 | branches: [ 'main', 'release-*' ] 11 | 12 | pull_request: 13 | branches: [ 'main', 'release-*' ] 14 | 15 | jobs: 16 | analyze: 17 | uses: knative/actions/.github/workflows/reusable-security.yaml@main 18 | -------------------------------------------------------------------------------- /docs/reference/func_repository_add.md: -------------------------------------------------------------------------------- 1 | ## func repository add 2 | 3 | Add a repository 4 | 5 | ``` 6 | func repository add 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM) 13 | -h, --help help for add 14 | -v, --verbose Print verbose logs ($FUNC_VERBOSE) 15 | ``` 16 | 17 | ### SEE ALSO 18 | 19 | * [func repository](func_repository.md) - Manage installed template repositories 20 | 21 | -------------------------------------------------------------------------------- /docs/reference/func_repository_remove.md: -------------------------------------------------------------------------------- 1 | ## func repository remove 2 | 3 | Remove a repository 4 | 5 | ``` 6 | func repository remove 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM) 13 | -h, --help help for remove 14 | -v, --verbose Print verbose logs ($FUNC_VERBOSE) 15 | ``` 16 | 17 | ### SEE ALSO 18 | 19 | * [func repository](func_repository.md) - Manage installed template repositories 20 | 21 | -------------------------------------------------------------------------------- /pkg/k8s/describer_int_test.go: -------------------------------------------------------------------------------- 1 | //go:build integration 2 | // +build integration 3 | 4 | package k8s_test 5 | 6 | import ( 7 | "testing" 8 | 9 | describertesting "knative.dev/func/pkg/describer/testing" 10 | "knative.dev/func/pkg/k8s" 11 | ) 12 | 13 | func TestInt_Describe(t *testing.T) { 14 | describertesting.TestInt_Describe(t, 15 | k8s.NewDescriber(true), 16 | k8s.NewDeployer(k8s.WithDeployerVerbose(true)), 17 | k8s.NewRemover(true), 18 | k8s.KubernetesDeployerName) 19 | } 20 | -------------------------------------------------------------------------------- /pkg/ssh/ssh_posix_test.go: -------------------------------------------------------------------------------- 1 | //go:build !windows 2 | // +build !windows 3 | 4 | package ssh_test 5 | 6 | import ( 7 | "errors" 8 | "net" 9 | "os" 10 | ) 11 | 12 | func fixupPrivateKeyMod(path string) { 13 | err := os.Chmod(path, 0600) 14 | if err != nil { 15 | panic(err) 16 | } 17 | } 18 | 19 | func listen(addr string) (net.Listener, error) { 20 | return net.Listen("unix", addr) 21 | } 22 | 23 | func isErrClosed(err error) bool { 24 | return errors.Is(err, net.ErrClosed) 25 | } 26 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### HCL Template 2 | ```hcl 3 | # Place your HCL configuration file here 4 | ``` 5 | 6 | ### Expected behavior 7 | What should have happened? 8 | 9 | ### Actual behavior 10 | What actually happened? 11 | 12 | ### Steps to reproduce 13 | 1. 14 | 2. 15 | 3. 16 | 17 | ### References 18 | Are there any other GitHub issues (open or closed) that should 19 | be linked here? For example: 20 | - GH-1234 21 | - ... 22 | -------------------------------------------------------------------------------- /docs/reference/func_repository_rename.md: -------------------------------------------------------------------------------- 1 | ## func repository rename 2 | 3 | Rename a repository 4 | 5 | ``` 6 | func repository rename 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM) 13 | -h, --help help for rename 14 | -v, --verbose Print verbose logs ($FUNC_VERBOSE) 15 | ``` 16 | 17 | ### SEE ALSO 18 | 19 | * [func repository](func_repository.md) - Manage installed template repositories 20 | 21 | -------------------------------------------------------------------------------- /templates/go/scaffolding/static-http/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "os" 7 | 8 | fhttp "knative.dev/func-go/http" 9 | 10 | f "function" 11 | ) 12 | 13 | type fx func(http.ResponseWriter, *http.Request) 14 | 15 | func (f fx) Handle(w http.ResponseWriter, r *http.Request) { 16 | f(w, r) 17 | } 18 | 19 | func main() { 20 | if err := fhttp.Start(fx(f.Handle)); err != nil { 21 | fmt.Fprintln(os.Stderr, err.Error()) 22 | os.Exit(1) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /pkg/functions/testdata/migrations/v0.25.0/func.yaml: -------------------------------------------------------------------------------- 1 | version: 0.23.0 2 | name: testfunc 3 | namespace: "" 4 | runtime: node 5 | registry: "" 6 | image: "" 7 | imageDigest: "" 8 | build: local 9 | git: {} 10 | buildpacks: [] 11 | volumes: [] 12 | buildEnvs: [] 13 | envs: [] 14 | annotations: {} 15 | options: {} 16 | labels: [] 17 | healthEndpoints: 18 | liveness: /health/liveness 19 | readiness: /health/readiness 20 | created: 2022-06-28T18:33:40.585047-04:00 21 | invocation: 22 | format: http 23 | -------------------------------------------------------------------------------- /pkg/k8s/lister_int_test.go: -------------------------------------------------------------------------------- 1 | //go:build integration 2 | // +build integration 3 | 4 | package k8s_test 5 | 6 | import ( 7 | "testing" 8 | 9 | "knative.dev/func/pkg/k8s" 10 | listertesting "knative.dev/func/pkg/lister/testing" 11 | ) 12 | 13 | func TestInt_List(t *testing.T) { 14 | listertesting.TestInt_List(t, 15 | k8s.NewLister(true), 16 | k8s.NewDeployer(k8s.WithDeployerVerbose(true)), 17 | k8s.NewDescriber(true), 18 | k8s.NewRemover(true), 19 | k8s.KubernetesDeployerName) 20 | } 21 | -------------------------------------------------------------------------------- /pkg/mock/mcp_server.go: -------------------------------------------------------------------------------- 1 | package mock 2 | 3 | import ( 4 | "context" 5 | ) 6 | 7 | type MCPServer struct { 8 | StartInvoked bool 9 | StartFn func(context.Context, bool) error 10 | } 11 | 12 | func NewMCPServer() *MCPServer { 13 | return &MCPServer{ 14 | StartFn: func(context.Context, bool) error { return nil }, 15 | } 16 | } 17 | 18 | func (s *MCPServer) Start(ctx context.Context, writeEnabled bool) error { 19 | s.StartInvoked = true 20 | return s.StartFn(ctx, writeEnabled) 21 | } 22 | -------------------------------------------------------------------------------- /templates/quarkus/http/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .classpath 4 | .settings/ 5 | bin/ 6 | 7 | # IntelliJ 8 | .idea 9 | *.ipr 10 | *.iml 11 | *.iws 12 | 13 | # NetBeans 14 | nb-configuration.xml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | .factorypath 19 | 20 | # OSX 21 | .DS_Store 22 | 23 | # Vim 24 | *.swp 25 | *.swo 26 | 27 | # patch 28 | *.orig 29 | *.rej 30 | 31 | # Maven 32 | target/ 33 | pom.xml.tag 34 | pom.xml.releaseBackup 35 | pom.xml.versionsBackup 36 | release.properties -------------------------------------------------------------------------------- /pkg/k8s/dialer_unit_test.go: -------------------------------------------------------------------------------- 1 | package k8s 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestDetectSocatSuccess(t *testing.T) { 8 | ch := make(chan struct{}, 1) 9 | w := detectConnSuccess(ch) 10 | _, err := w.Write([]byte("some data successucces")) 11 | if err != nil { 12 | t.Fatal(err) 13 | } 14 | _, err = w.Write([]byte("sfully connected")) 15 | if err != nil { 16 | t.Fatal(err) 17 | } 18 | select { 19 | case <-ch: 20 | t.Log("OK") 21 | default: 22 | t.Error("NOK") 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/go-retryablehttp/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.7.5 (Nov 8, 2023) 2 | 3 | BUG FIXES 4 | 5 | - client: fixes an issue where the request body is not preserved on temporary redirects or re-established HTTP/2 connections [GH-207] 6 | 7 | ## 0.7.4 (Jun 6, 2023) 8 | 9 | BUG FIXES 10 | 11 | - client: fixing an issue where the Content-Type header wouldn't be sent with an empty payload when using HTTP/2 [GH-194] 12 | 13 | ## 0.7.3 (May 15, 2023) 14 | 15 | Initial release 16 | -------------------------------------------------------------------------------- /pkg/k8s/remover_int_test.go: -------------------------------------------------------------------------------- 1 | //go:build integration 2 | // +build integration 3 | 4 | package k8s_test 5 | 6 | import ( 7 | "testing" 8 | 9 | "knative.dev/func/pkg/k8s" 10 | removertesting "knative.dev/func/pkg/remover/testing" 11 | ) 12 | 13 | func TestInt_Remove(t *testing.T) { 14 | removertesting.TestInt_Remove(t, 15 | k8s.NewRemover(true), 16 | k8s.NewDeployer(k8s.WithDeployerVerbose(true)), 17 | k8s.NewDescriber(true), 18 | k8s.NewLister(true), 19 | k8s.KubernetesDeployerName) 20 | } 21 | -------------------------------------------------------------------------------- /pkg/mock/builder.go: -------------------------------------------------------------------------------- 1 | package mock 2 | 3 | import ( 4 | "context" 5 | 6 | fn "knative.dev/func/pkg/functions" 7 | ) 8 | 9 | type Builder struct { 10 | BuildInvoked bool 11 | BuildFn func(fn.Function) error 12 | } 13 | 14 | func NewBuilder() *Builder { 15 | return &Builder{ 16 | BuildFn: func(fn.Function) error { return nil }, 17 | } 18 | } 19 | 20 | func (i *Builder) Build(ctx context.Context, f fn.Function, _ []fn.Platform) error { 21 | i.BuildInvoked = true 22 | return i.BuildFn(f) 23 | } 24 | -------------------------------------------------------------------------------- /pkg/scaffolding/testdata/testwrite/certs/README.md: -------------------------------------------------------------------------------- 1 | # Test Certs 2 | 3 | This directory mocks the existence of a 'certs' directory peer to the various 4 | languages in the templates directory. This directory is required for the 5 | error-free execution of Scaffolding Write tests, since it is used to 6 | create the certificates container layer. 7 | 8 | The actual certs used are located in templates/certs, and are refreshed 9 | by running `make certs` or by running a `make clean` 10 | before a `make`. 11 | 12 | -------------------------------------------------------------------------------- /templates/go/scaffolding/README.md: -------------------------------------------------------------------------------- 1 | # Go Scaffolding 2 | 3 | Organized into directories conforming to the naming convention 4 | [signature]-[invocation] where signature is the method signature group expected 5 | (static, instanced etc) and the invocation is the hint of what kind of requests 6 | the function expects. 7 | 8 | Together, these constitute a compound primary key of the type of method 9 | signature (or signatures) the included implementation assumes of the linked f 10 | (user function source code). 11 | -------------------------------------------------------------------------------- /templates/quarkus/cloudevents/.gitignore: -------------------------------------------------------------------------------- 1 | # Eclipse 2 | .project 3 | .classpath 4 | .settings/ 5 | bin/ 6 | 7 | # IntelliJ 8 | .idea 9 | *.ipr 10 | *.iml 11 | *.iws 12 | 13 | # NetBeans 14 | nb-configuration.xml 15 | 16 | # Visual Studio Code 17 | .vscode 18 | .factorypath 19 | 20 | # OSX 21 | .DS_Store 22 | 23 | # Vim 24 | *.swp 25 | *.swo 26 | 27 | # patch 28 | *.orig 29 | *.rej 30 | 31 | # Maven 32 | target/ 33 | pom.xml.tag 34 | pom.xml.releaseBackup 35 | pom.xml.versionsBackup 36 | release.properties -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Knative Security Policy 2 | 3 | We're extremely grateful for security researchers and users that report vulnerabilities to the Knative Open Source Community. All reports are thoroughly investigated by a set of community volunteers. 4 | 5 | To make a report, please email the private security@knative.team list with the security details and the details expected for all Knative bug reports. 6 | 7 | See [Knative Security and Disclosure Information](https://knative.dev/docs/reference/security/) for more details. 8 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/object_singleline.golden: -------------------------------------------------------------------------------- 1 | variable "foo" {} 2 | variable "bar" {} 3 | variable "baz" {} 4 | 5 | variable "qux" {} 6 | 7 | variable "foo" { 8 | foo = "bar" 9 | } 10 | 11 | variable "foo" {} 12 | 13 | # lead comment 14 | variable "bar" {} 15 | 16 | variable "foo" { 17 | default = "bar" 18 | } 19 | 20 | variable "bar" {} 21 | 22 | # Purposeful newline check below: 23 | 24 | variable "foo" {} 25 | 26 | variable "purposeful-newline" {} 27 | -------------------------------------------------------------------------------- /pkg/k8s/serviceaccount.go: -------------------------------------------------------------------------------- 1 | package k8s 2 | 3 | import ( 4 | "context" 5 | 6 | metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 7 | ) 8 | 9 | func GetServiceAccount(ctx context.Context, referencedServiceAccount, namespace string) error { 10 | k8sClient, err := NewKubernetesClientset() 11 | if err != nil { 12 | return err 13 | } 14 | _, err = k8sClient.CoreV1().ServiceAccounts(namespace).Get(ctx, referencedServiceAccount, metav1.GetOptions{}) 15 | if err != nil { 16 | return err 17 | } 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /pkg/knative/describer_int_test.go: -------------------------------------------------------------------------------- 1 | //go:build integration 2 | // +build integration 3 | 4 | package knative_test 5 | 6 | import ( 7 | "testing" 8 | 9 | describertesting "knative.dev/func/pkg/describer/testing" 10 | "knative.dev/func/pkg/knative" 11 | ) 12 | 13 | func TestInt_Describe(t *testing.T) { 14 | describertesting.TestInt_Describe(t, 15 | knative.NewDescriber(true), 16 | knative.NewDeployer(knative.WithDeployerVerbose(true)), 17 | knative.NewRemover(true), 18 | knative.KnativeDeployerName) 19 | } 20 | -------------------------------------------------------------------------------- /docs/reference/func_config_ci.md: -------------------------------------------------------------------------------- 1 | ## func config ci 2 | 3 | Generate a Github Workflow for function deployment 4 | 5 | ``` 6 | func config ci 7 | ``` 8 | 9 | ### Options 10 | 11 | ``` 12 | -h, --help help for ci 13 | -p, --path string Path to the function. Default is current directory ($FUNC_PATH) 14 | --workflow-name string Use a custom workflow name (default "Func Deploy") 15 | ``` 16 | 17 | ### SEE ALSO 18 | 19 | * [func config](func_config.md) - Configure a function 20 | 21 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/hooks/pre-merge-commit.sample: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed. 4 | # Called by "git merge" with no arguments. The hook should 5 | # exit with non-zero status after issuing an appropriate message to 6 | # stderr if it wants to stop the merge commit. 7 | # 8 | # To enable this hook, rename this file to "pre-merge-commit". 9 | 10 | . git-sh-setup 11 | test -x "$GIT_DIR/hooks/pre-commit" && 12 | exec "$GIT_DIR/hooks/pre-commit" 13 | : 14 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository.git/hooks/pre-merge-commit.sample: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed. 4 | # Called by "git merge" with no arguments. The hook should 5 | # exit with non-zero status after issuing an appropriate message to 6 | # stderr if it wants to stop the merge commit. 7 | # 8 | # To enable this hook, rename this file to "pre-merge-commit". 9 | 10 | . git-sh-setup 11 | test -x "$GIT_DIR/hooks/pre-commit" && 12 | exec "$GIT_DIR/hooks/pre-commit" 13 | : 14 | -------------------------------------------------------------------------------- /pkg/knative/lister_int_test.go: -------------------------------------------------------------------------------- 1 | //go:build integration 2 | // +build integration 3 | 4 | package knative_test 5 | 6 | import ( 7 | "testing" 8 | 9 | "knative.dev/func/pkg/knative" 10 | listertesting "knative.dev/func/pkg/lister/testing" 11 | ) 12 | 13 | func TestInt_List(t *testing.T) { 14 | listertesting.TestInt_List(t, 15 | knative.NewLister(true), 16 | knative.NewDeployer(knative.WithDeployerVerbose(true)), 17 | knative.NewDescriber(true), 18 | knative.NewRemover(true), 19 | knative.KnativeDeployerName) 20 | } 21 | -------------------------------------------------------------------------------- /pkg/knative/remover_int_test.go: -------------------------------------------------------------------------------- 1 | //go:build integration 2 | // +build integration 3 | 4 | package knative_test 5 | 6 | import ( 7 | "testing" 8 | 9 | "knative.dev/func/pkg/knative" 10 | removertesting "knative.dev/func/pkg/remover/testing" 11 | ) 12 | 13 | func TestInt_Remove(t *testing.T) { 14 | removertesting.TestInt_Remove(t, 15 | knative.NewRemover(true), 16 | knative.NewDeployer(knative.WithDeployerVerbose(true)), 17 | knative.NewDescriber(true), 18 | knative.NewLister(true), 19 | knative.KnativeDeployerName) 20 | } 21 | -------------------------------------------------------------------------------- /pkg/oci/errors.go: -------------------------------------------------------------------------------- 1 | package oci 2 | 3 | import "fmt" 4 | 5 | // BuildErr indicates a general build error occurred. 6 | type BuildErr struct { 7 | Err error 8 | } 9 | 10 | func (e BuildErr) Error() string { 11 | return fmt.Sprintf("error performing host build. %v", e.Err) 12 | } 13 | 14 | type ErrBuildInProgress struct { 15 | Dir string 16 | } 17 | 18 | func (e ErrBuildInProgress) Error() string { 19 | return fmt.Sprintf("a build for this function is associated with an active PID appears to be already in progress %v", e.Dir) 20 | } 21 | -------------------------------------------------------------------------------- /.github/workflows/knative-go-test.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2022 The Knative Authors. 2 | # SPDX-License-Identifier: Apache-2.0 3 | 4 | # This file is automagically synced here from github.com/knative-extensions/knobots 5 | 6 | name: Test 7 | 8 | on: 9 | push: 10 | branches: [ 'main', 'release-*' ] 11 | 12 | pull_request: 13 | branches: [ 'main', 'release-*' ] 14 | 15 | jobs: 16 | test: 17 | uses: knative/actions/.github/workflows/reusable-go-test.yaml@main 18 | secrets: 19 | CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} 20 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/hooks/pre-applypatch.sample: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, rename this file to "pre-applypatch". 10 | 11 | . git-sh-setup 12 | precommit="$(git rev-parse --git-path hooks/pre-commit)" 13 | test -x "$precommit" && exec "$precommit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/logs/HEAD: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 ef1e6c8ed28e25dec915e8cd7479dacf671665ed Lance Ball 1632511912 -0400 clone: from file://./home/lanceball/src/github.com/knative/func/testdata/repository-a.git 2 | ef1e6c8ed28e25dec915e8cd7479dacf671665ed 883ff23f61018546cac0c302c5c75e3c65ed832d Lance Ball 1632511941 -0400 commit: add manifest.yaml 3 | 883ff23f61018546cac0c302c5c75e3c65ed832d d5c0914f5e90ce1ccc3ee90e44ab610f466c774f drekar 1633438956 +0900 push 4 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository.git/hooks/pre-applypatch.sample: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | # 3 | # An example hook script to verify what is about to be committed 4 | # by applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. 8 | # 9 | # To enable this hook, rename this file to "pre-applypatch". 10 | 11 | . git-sh-setup 12 | precommit="$(git rev-parse --git-path hooks/pre-commit)" 13 | test -x "$precommit" && exec "$precommit" ${1+"$@"} 14 | : 15 | -------------------------------------------------------------------------------- /pkg/mock/pusher.go: -------------------------------------------------------------------------------- 1 | package mock 2 | 3 | import ( 4 | "context" 5 | 6 | fn "knative.dev/func/pkg/functions" 7 | ) 8 | 9 | type Pusher struct { 10 | PushInvoked bool 11 | PushFn func(context.Context, fn.Function) (string, error) 12 | } 13 | 14 | func NewPusher() *Pusher { 15 | return &Pusher{ 16 | PushFn: func(context.Context, fn.Function) (string, error) { return "", nil }, 17 | } 18 | } 19 | 20 | func (i *Pusher) Push(ctx context.Context, f fn.Function) (string, error) { 21 | i.PushInvoked = true 22 | return i.PushFn(ctx, f) 23 | } 24 | -------------------------------------------------------------------------------- /Dockerfile.utils: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | 3 | ARG TARGETARCH 4 | ARG FUNC_UTIL_BINARY=func-util-$TARGETARCH 5 | 6 | ENV PATH=/ 7 | 8 | COPY $FUNC_UTIL_BINARY /func-util 9 | 10 | ADD func-util-symlinks.tgz / 11 | 12 | LABEL \ 13 | org.opencontainers.image.description="Knative Func Utils Image" \ 14 | org.opencontainers.image.source="https://github.com/knative/func" \ 15 | org.opencontainers.image.vendor="https://github.com/knative/func" \ 16 | org.opencontainers.image.url="https://github.com/knative/func/pkgs/container/func-utils" 17 | 18 | USER 0:0 19 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository-a.git/logs/refs/heads/main: -------------------------------------------------------------------------------- 1 | 0000000000000000000000000000000000000000 ef1e6c8ed28e25dec915e8cd7479dacf671665ed Lance Ball 1632511912 -0400 clone: from file://./home/lanceball/src/github.com/knative/func/testdata/repository-a.git 2 | ef1e6c8ed28e25dec915e8cd7479dacf671665ed 883ff23f61018546cac0c302c5c75e3c65ed832d Lance Ball 1632511941 -0400 commit: add manifest.yaml 3 | 883ff23f61018546cac0c302c5c75e3c65ed832d d5c0914f5e90ce1ccc3ee90e44ab610f466c774f drekar 1633438956 +0900 push 4 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/paketo-buildpacks/libpak/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2020-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 2 | 3 | This project is licensed to you under the Apache License, Version 2.0 (the "License"). 4 | You may not use this project except in compliance with the License. 5 | 6 | This project may include a number of subcomponents with separate copyright notices 7 | and license terms. Your use of these subcomponents is subject to the terms and 8 | conditions of the subcomponent's license, as noted in the LICENSE file. 9 | -------------------------------------------------------------------------------- /templates/python/http/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "function" 3 | description = "" 4 | version = "0.1.0" 5 | requires-python = ">=3.9" 6 | readme = "README.md" 7 | license = "MIT" 8 | dependencies = [ 9 | "httpx", 10 | "pytest", 11 | "pytest-asyncio" 12 | ] 13 | authors = [ 14 | { name="Your Name", email="you@example.com"}, 15 | ] 16 | 17 | [build-system] 18 | requires = ["hatchling"] 19 | build-backend = "hatchling.build" 20 | 21 | [tool.pytest.ini_options] 22 | asyncio_mode = "strict" 23 | asyncio_default_fixture_loop_scope = "function" 24 | 25 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/go-retryablehttp/.github/workflows/actionlint.yml: -------------------------------------------------------------------------------- 1 | name: actionlint 2 | 3 | on: 4 | push: 5 | paths: 6 | - .github/** 7 | 8 | permissions: 9 | contents: read 10 | 11 | jobs: 12 | actionlint: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0 16 | - name: "Check GitHub workflow files" 17 | uses: docker://docker.mirror.hashicorp.services/rhysd/actionlint:latest 18 | with: 19 | args: -color -------------------------------------------------------------------------------- /pkg/mock/lister.go: -------------------------------------------------------------------------------- 1 | package mock 2 | 3 | import ( 4 | "context" 5 | 6 | fn "knative.dev/func/pkg/functions" 7 | ) 8 | 9 | type Lister struct { 10 | ListInvoked bool 11 | ListFn func(context.Context, string) ([]fn.ListItem, error) 12 | } 13 | 14 | func NewLister() *Lister { 15 | return &Lister{ 16 | ListFn: func(context.Context, string) ([]fn.ListItem, error) { return []fn.ListItem{}, nil }, 17 | } 18 | } 19 | 20 | func (l *Lister) List(ctx context.Context, ns string) ([]fn.ListItem, error) { 21 | l.ListInvoked = true 22 | return l.ListFn(ctx, ns) 23 | } 24 | -------------------------------------------------------------------------------- /templates/typescript/http/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "plugins": [ 5 | "@typescript-eslint", 6 | "prettier" ], 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:@typescript-eslint/eslint-recommended", 10 | "plugin:@typescript-eslint/recommended", 11 | "prettier" ], 12 | "rules": { 13 | "no-console": 1, 14 | "prettier/prettier": [ 15 | "error", { "endOfLine": "auto" } 16 | ], 17 | "quotes": ["error", "single", { "allowTemplateLiterals": true }] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /e2e/testdata/templates/python/http/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "function" 3 | description = "" 4 | version = "0.1.0" 5 | requires-python = ">=3.9" 6 | readme = "README.md" 7 | license = "MIT" 8 | dependencies = [ 9 | "httpx", 10 | "pytest", 11 | "pytest-asyncio" 12 | ] 13 | authors = [ 14 | { name="Your Name", email="you@example.com"}, 15 | ] 16 | 17 | [build-system] 18 | requires = ["hatchling"] 19 | build-backend = "hatchling.build" 20 | 21 | [tool.pytest.ini_options] 22 | asyncio_mode = "strict" 23 | asyncio_default_fixture_loop_scope = "function" 24 | 25 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repositories/customLanguagePackRepo/manifest.yaml: -------------------------------------------------------------------------------- 1 | schema_version: 0.0.1 # The version for manifest.yaml schema 2 | 3 | name: customLanguagePackRepo 4 | version: 0.0.1 5 | 6 | # Templates are located within the ./templates directory in this repo 7 | templates: templates 8 | 9 | # Repo-wide setting for the readiness health endpoint 10 | healthEndpoints: 11 | readiness: /repoReadiness 12 | 13 | # Repo-wide setting for buildpacks 14 | buildpacks: 15 | - repoBuildpack 16 | 17 | buildEnvs: 18 | - name: "TEST_REPO_VARIABLE" 19 | value: "test-repo" 20 | -------------------------------------------------------------------------------- /templates/quarkus/http/src/main/java/functions/Function.java: -------------------------------------------------------------------------------- 1 | package functions; 2 | 3 | import io.quarkus.funqy.Funq; 4 | 5 | /** 6 | * Your Function class 7 | */ 8 | public class Function { 9 | 10 | /** 11 | * Use the Quarkus Funqy extension for our function. This function simply echoes its input 12 | * @param input a Java bean 13 | * @return a Java bean 14 | */ 15 | @Funq 16 | public Output function(Input input) { 17 | 18 | // Add business logic here 19 | 20 | return new Output(input.getMessage()); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /templates/springboot/http/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /templates/typescript/cloudevents/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "parser": "@typescript-eslint/parser", 4 | "plugins": [ 5 | "@typescript-eslint", 6 | "prettier" ], 7 | "extends": [ 8 | "eslint:recommended", 9 | "plugin:@typescript-eslint/eslint-recommended", 10 | "plugin:@typescript-eslint/recommended", 11 | "prettier" ], 12 | "rules": { 13 | "no-console": 1, 14 | "prettier/prettier": [ 15 | "error", { "endOfLine": "auto" } 16 | ], 17 | "quotes": ["error", "single", { "allowTemplateLiterals": true }] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl.go: -------------------------------------------------------------------------------- 1 | // Package hcl decodes HCL into usable Go structures. 2 | // 3 | // hcl input can come in either pure HCL format or JSON format. 4 | // It can be parsed into an AST, and then decoded into a structure, 5 | // or it can be decoded directly from a string into a structure. 6 | // 7 | // If you choose to parse HCL into a raw AST, the benefit is that you 8 | // can write custom visitor implementations to implement custom 9 | // semantic checks. By default, HCL does not perform any semantic 10 | // checks. 11 | package hcl 12 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/go-multierror/sort.go: -------------------------------------------------------------------------------- 1 | package multierror 2 | 3 | // Len implements sort.Interface function for length 4 | func (err Error) Len() int { 5 | return len(err.Errors) 6 | } 7 | 8 | // Swap implements sort.Interface function for swapping elements 9 | func (err Error) Swap(i, j int) { 10 | err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] 11 | } 12 | 13 | // Less implements sort.Interface function for determining order 14 | func (err Error) Less(i, j int) bool { 15 | return err.Errors[i].Error() < err.Errors[j].Error() 16 | } 17 | -------------------------------------------------------------------------------- /templates/springboot/cloudevents/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /pkg/functions/testdata/cluster.yaml: -------------------------------------------------------------------------------- 1 | # Cluster config for the KinD cluster created for use in CI. 2 | kind: Cluster 3 | apiVersion: kind.x-k8s.io/v1alpha4 4 | nodes: 5 | - role: control-plane 6 | - role: worker 7 | extraPortMappings: 8 | - containerPort: 30080 9 | hostPort: 80 10 | listenAddress: "127.0.0.1" 11 | - containerPort: 30443 12 | hostPort: 443 13 | listenAddress: "127.0.0.1" 14 | containerdConfigPatches: 15 | - |- 16 | [plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:50000"] 17 | endpoint = ["http://kind-registry:50000"] 18 | -------------------------------------------------------------------------------- /pkg/pipelines/metadata.go: -------------------------------------------------------------------------------- 1 | package pipelines 2 | 3 | // PacMetadata holds data needed for Pipelines as Code generation, 4 | // these data are transient and confidential (credentials) 5 | // so we most liketly don't want to store them in function config. 6 | type PacMetadata struct { 7 | RegistryUsername string 8 | RegistryPassword string 9 | RegistryServer string 10 | 11 | GitProvider string 12 | 13 | PersonalAccessToken string 14 | WebhookSecret string 15 | 16 | ConfigureLocalResources bool 17 | ConfigureClusterResources bool 18 | ConfigureRemoteResources bool 19 | } 20 | -------------------------------------------------------------------------------- /pkg/filesystem/testdata/repo.git/hooks/applypatch-msg.sample: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, rename this file to "applypatch-msg". 11 | 12 | . git-sh-setup 13 | commitmsg="$(git rev-parse --git-path hooks/commit-msg)" 14 | test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /templates/python/cloudevents/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "function" 3 | description = "" 4 | version = "0.1.0" 5 | requires-python = ">=3.9" 6 | readme = "README.md" 7 | license = "MIT" 8 | dependencies = [ 9 | "httpx", 10 | "cloudevents", 11 | "pytest", 12 | "pytest-asyncio" 13 | ] 14 | authors = [ 15 | { name="Your Name", email="you@example.com"}, 16 | ] 17 | 18 | [build-system] 19 | requires = ["hatchling"] 20 | build-backend = "hatchling.build" 21 | 22 | [tool.pytest.ini_options] 23 | asyncio_mode = "strict" 24 | asyncio_default_fixture_loop_scope = "function" 25 | 26 | 27 | -------------------------------------------------------------------------------- /docs/reference/func_completion.md: -------------------------------------------------------------------------------- 1 | ## func completion 2 | 3 | Output functions shell completion code 4 | 5 | ### Synopsis 6 | 7 | To load completion run 8 | 9 | For zsh: 10 | source <(func completion zsh) 11 | 12 | If you would like to use alias: 13 | alias f=func 14 | compdef _func f 15 | 16 | For bash: 17 | source <(func completion bash) 18 | 19 | 20 | 21 | ``` 22 | func completion 23 | ``` 24 | 25 | ### Options 26 | 27 | ``` 28 | -h, --help help for completion 29 | ``` 30 | 31 | ### SEE ALSO 32 | 33 | * [func](func.md) - func manages Knative Functions 34 | 35 | -------------------------------------------------------------------------------- /hack/component-versions.json: -------------------------------------------------------------------------------- 1 | { 2 | "Contour": { 3 | "version": "v1.20.0", 4 | "owner": "knative-extensions", 5 | "repo": "net-contour" 6 | }, 7 | "Eventing": { 8 | "version": "v1.20.0", 9 | "owner": "knative", 10 | "repo": "eventing" 11 | }, 12 | "KindNode": { 13 | "version": "v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027" 14 | }, 15 | "Pac": { 16 | "version": "v0.35.2" 17 | }, 18 | "Serving": { 19 | "version": "v1.20.0", 20 | "owner": "knative", 21 | "repo": "serving" 22 | }, 23 | "Tekton": { 24 | "version": "v1.1.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /pkg/functions/templates_embedded.go: -------------------------------------------------------------------------------- 1 | package functions 2 | 3 | import ( 4 | "archive/zip" 5 | "bytes" 6 | 7 | "knative.dev/func/generate" 8 | "knative.dev/func/pkg/filesystem" 9 | ) 10 | 11 | //go:generate go run ../../generate/templates/main.go 12 | 13 | func newEmbeddedTemplatesFS() filesystem.Filesystem { 14 | archive, err := zip.NewReader(bytes.NewReader(generate.TemplatesZip), int64(len(generate.TemplatesZip))) 15 | if err != nil { 16 | panic(err) 17 | } 18 | return filesystem.NewZipFS(archive) 19 | } 20 | 21 | var EmbeddedTemplatesFS filesystem.Filesystem = newEmbeddedTemplatesFS() 22 | -------------------------------------------------------------------------------- /pkg/functions/testdata/repository.git/hooks/applypatch-msg.sample: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | # 3 | # An example hook script to check the commit log message taken by 4 | # applypatch from an e-mail message. 5 | # 6 | # The hook should exit with non-zero status after issuing an 7 | # appropriate message if it wants to stop the commit. The hook is 8 | # allowed to edit the commit message file. 9 | # 10 | # To enable this hook, rename this file to "applypatch-msg". 11 | 12 | . git-sh-setup 13 | commitmsg="$(git rev-parse --git-path hooks/commit-msg)" 14 | test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} 15 | : 16 | -------------------------------------------------------------------------------- /pkg/functions/testdata/migrations/v0.23.0/func.yaml: -------------------------------------------------------------------------------- 1 | version: 0.0.0 2 | name: testfunc 3 | namespace: "" 4 | runtime: go 5 | registry: "" 6 | image: "" 7 | imageDigest: "" 8 | build: local 9 | git: {} 10 | builder: "" 11 | builders: {} 12 | buildpacks: 13 | - paketo-buildpacks/go-dist 14 | - ghcr.io/boson-project/go-function-buildpack:tip 15 | volumes: [] 16 | buildEnvs: [] 17 | envs: [] 18 | annotations: {} 19 | options: {} 20 | labels: [] 21 | healthEndpoints: 22 | liveness: /health/liveness 23 | readiness: /health/readiness 24 | created: 2022-05-25T22:44:47.36886+09:00 25 | invocation: 26 | format: http 27 | -------------------------------------------------------------------------------- /third_party/VENDOR-LICENSE/github.com/hashicorp/hcl/hcl/printer/testdata/list.input: -------------------------------------------------------------------------------- 1 | foo = ["fatih", "arslan" ] 2 | 3 | foo = [ "bar", "qaz", ] 4 | 5 | foo = [ "zeynep", 6 | "arslan", ] 7 | 8 | foo = ["fatih", "zeynep", 9 | "arslan", ] 10 | 11 | foo = [ 12 | "vim-go", 13 | "golang", "hcl"] 14 | 15 | foo = [] 16 | 17 | foo = [1, 2,3, 4] 18 | 19 | foo = [ 20 | "kenya", "ethiopia", 21 | "columbia"] 22 | 23 | foo = [ 24 | <