generator_fake.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.
  11. */
  12. package v1alpha1
  13. import (
  14. metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
  15. )
  16. // FakeSpec contains the static data.
  17. type FakeSpec struct {
  18. // Data defines the static data returned
  19. // by this generator.
  20. Data map[string]string `json:"data,omitempty"`
  21. }
  22. // Fake generator is used for testing. It lets you define
  23. // a static set of credentials that is always returned.
  24. // +kubebuilder:object:root=true
  25. // +kubebuilder:storageversion
  26. // +kubebuilder:subresource:status
  27. // +kubebuilder:resource:scope=Namespaced,categories={fake},shortName=fake
  28. type Fake struct {
  29. metav1.TypeMeta `json:",inline"`
  30. metav1.ObjectMeta `json:"metadata,omitempty"`
  31. Spec FakeSpec `json:"spec,omitempty"`
  32. }
  33. // +kubebuilder:object:root=true
  34. // FakeList contains a list of ExternalSecret resources.
  35. type FakeList struct {
  36. metav1.TypeMeta `json:",inline"`
  37. metav1.ListMeta `json:"metadata,omitempty"`
  38. Items []Fake `json:"items"`
  39. }