Commit Graph

13 Commits

Author SHA1 Message Date
Tom Lebreux f3b392ada2
Move to wrangler v3 (#427) 2024-05-02 10:06:30 -04:00
Alejandro Ruiz f5d32fe214
Allow GeneratingHandlers to skip Apply if resource version didn't change (#341)
* Allow GeneratingHandlers to skip Apply if resource version didn't change

* Run go generate

* Add call count to FakeApply

* Add test for UniqueApplyForResourceVersion

* Simplify error handling

Co-authored-by: Kevin Joiner <10265309+KevinJoiner@users.noreply.github.com>

* Make generated code more readable

Co-authored-by: Kevin Joiner <10265309+KevinJoiner@users.noreply.github.com>

* Rename constant

* Rename seenResourceVersion to storeResourceVersion

* go generate

* Add comments to code generator

* Run go generate

* Upgrade golangci-lint GitHub action, since it always fails now

---------

Co-authored-by: Kevin Joiner <10265309+KevinJoiner@users.noreply.github.com>
2023-12-22 13:57:51 -05:00
Ricardo Weir d4a7d13cee Update module to v2 and update paths 2023-09-01 17:51:39 -07:00
Kevin Joiner 294dad04db Reduce generated clients/controllers.
The Generated Client, Controller, and Cache interfaces are now entirely
implemented by the generic Interfaces. These changes greatly reduce the
amount of generated code needed and allows users to use the mocks
directly with controllers without having to wrap them as an embedded
object.
2023-06-29 16:24:29 -04:00
Kevin Joiner 8110ecfc32 Update fakes to create valid mock controllers.
Generates the fakes package so that the mocks completely implement the
Controllers, Clients and Cache interfaces.
2023-06-29 16:24:29 -04:00
Kevin Joiner fc1fea5cad Add fake package for creating generic mocks for controllers, Clients, and Caches.
To support easy mocking generic interfaces were added for controllers and caches.
And generated code now uses these interfaces instead of the generic structure.
This commit also adds code comments to the generated interfaces, and a README for the fake package.
2023-03-03 12:25:50 -05:00
Kevin Joiner 8a99fb5ad2 Refactor generated controllers and caches to call the generic functions.
Moved Controler and Cache implmentations from template strings in ype_go.go
to generic/controller.go and generic/cache.go. The generation
of type specific interface was left so that dependent packages do not
experince any breaking changes.
2023-03-03 12:15:32 -05:00
Ricardo Weir 6366d1aa3d Add function to copy factory and add user agent
Used lasso's configure user agent functionality to provide function
in factory template for making a copy of factory then configuring
it to use specified user agent.
2022-12-28 18:12:15 -07:00
Ryan Sanna fe63f42849 go generate 2021-07-02 13:58:56 -07:00
Darren Shepherd ed90e8bd79 Update generated code 2021-02-19 09:15:13 -07:00
Darren Shepherd 9ef03bdae0 Update generated code 2020-10-19 07:40:04 -07:00
Darren Shepherd 7c87e5d796 Update generated code 2020-08-11 10:34:51 -07:00
Darren Shepherd 59a4c66c39 Add generated code for core k8s packages. 2020-07-14 13:04:54 -07:00