generator_uuid.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // UUIDSpec controls the behavior of the uuid generator.
  17. type UUIDSpec struct{}
  18. // Password generates a random password based on the
  19. // configuration parameters in spec.
  20. // You can specify the length, characterset and other attributes.
  21. // +kubebuilder:object:root=true
  22. // +kubebuilder:storageversion
  23. // +kubebuilder:subresource:status
  24. // +kubebuilder:resource:scope=Namespaced,categories={password},shortName=uuids
  25. type UUID struct {
  26. metav1.TypeMeta `json:",inline"`
  27. metav1.ObjectMeta `json:"metadata,omitempty"`
  28. Spec UUIDSpec `json:"spec,omitempty"`
  29. }
  30. // +kubebuilder:object:root=true
  31. // UUIDList contains a list of ExternalSecret resources.
  32. type UUIDList struct {
  33. metav1.TypeMeta `json:",inline"`
  34. metav1.ListMeta `json:"metadata,omitempty"`
  35. Items []Password `json:"items"`
  36. }