Skip to content
This repository has been archived by the owner on Jun 19, 2022. It is now read-only.

Commit

Permalink
Merge pull request #6 from n3wscott/injection
Browse files Browse the repository at this point in the history
Adding Generated Injection Clients
  • Loading branch information
n3wscott authored Jun 6, 2019
2 parents d9fb03c + e300426 commit fb20628
Show file tree
Hide file tree
Showing 163 changed files with 13,135 additions and 7 deletions.
12 changes: 9 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ required = [
"k8s.io/code-generator/cmd/client-gen",
"k8s.io/code-generator/cmd/lister-gen",
"k8s.io/code-generator/cmd/informer-gen",
"github.com/knative/pkg/codegen/cmd/injection-gen",
"github.com/knative/test-infra/scripts",
"github.com/knative/test-infra/tools/dep-collector",
]
Expand All @@ -18,8 +19,8 @@ required = [

[[override]]
name = "github.com/knative/pkg"
# HEAD as of 2019-05-31
revision = "17ec1ed50dad75d031eb87430874e1d1d534b77a"
# HEAD as of 2919-06-06
revision = "c6f03fa600afb9d05c24dbf14ba8b3f41838f28c"

[[override]]
name = "go.uber.org/zap"
Expand Down Expand Up @@ -74,3 +75,7 @@ required = [
name = "github.com/knative/test-infra"
non-go = false

[[prune.project]]
name = "github.com/knative/pkg"
unused-packages = false
non-go = false
8 changes: 8 additions & 0 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ source $(dirname $0)/../vendor/github.com/knative/test-infra/scripts/library.sh

CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../../../k8s.io/code-generator)}

KNATIVE_CODEGEN_PKG=${KNATIVE_CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/github.com/knative/pkg 2>/dev/null || echo ../pkg)}

# generate the code with:
# --output-base because this script should also be able to run inside the vendor dir of
# k8s.io/kubernetes. The output-base is needed for the generators to output into the vendor dir
Expand All @@ -31,6 +33,12 @@ ${CODEGEN_PKG}/generate-groups.sh "deepcopy,client,informer,lister" \
"events:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt

# Knative Injection
${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh "injection" \
github.com/GoogleCloudPlatform/cloud-run-events/pkg/client github.com/GoogleCloudPlatform/cloud-run-events/pkg/apis \
"events:v1alpha1" \
--go-header-file ${REPO_ROOT_DIR}/hack/boilerplate/boilerplate.go.txt

# Because the kubernetes code generators force pacakges to lowercase, the update-deps script will be confused for
# imports of github.com/googlecloudplatform/... We will update that to use the correct casing in the generated code.
# The following will find all files (not directories, specified by -type f) under ${REPO_ROOT_DIR}/pkg/client, and
Expand Down
49 changes: 49 additions & 0 deletions pkg/client/injection/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions pkg/client/injection/client/fake/fake.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions pkg/client/injection/informers/events/factory/eventsfactory.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions pkg/client/injection/informers/events/factory/fake/fake.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions vendor/github.com/knative/pkg/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fb20628

Please sign in to comment.