Documentation
¶
Index ¶
- Constants
- func GenerateAPIKey() (string, error)
- func NewReconciler(client client.Client, options ...utils.ReconcilerOption[*v1alpha1.APIKey]) *utils.Reconciler[*v1alpha1.APIKey]
- func WithDefaultReconcilers() utils.ReconcilerOption[*v1alpha1.APIKey]
- func WithDeleteReconciler() utils.ReconcilerOption[*v1alpha1.APIKey]
- func WithStatusReconciler() utils.ReconcilerOption[*v1alpha1.APIKey]
- type DeleteReconciler
- type StatusReconciler
Constants ¶
View Source
const APIKeyLength = 32 // 256-bit key
View Source
const (
DefaultExpirationSeconds = int64(12 * 60 * 60) // default is 12 hours
)
Variables ¶
This section is empty.
Functions ¶
func GenerateAPIKey ¶
GenerateAPIKey generates a cryptographically secure random API key.
func NewReconciler ¶
func NewReconciler(client client.Client, options ...utils.ReconcilerOption[*v1alpha1.APIKey]) *utils.Reconciler[*v1alpha1.APIKey]
func WithDefaultReconcilers ¶
func WithDefaultReconcilers() utils.ReconcilerOption[*v1alpha1.APIKey]
WithDefaultReconcilers returns a reconciler option which enables the default sub-reconcilers.
func WithDeleteReconciler ¶
func WithDeleteReconciler() utils.ReconcilerOption[*v1alpha1.APIKey]
func WithStatusReconciler ¶
func WithStatusReconciler() utils.ReconcilerOption[*v1alpha1.APIKey]
Types ¶
type DeleteReconciler ¶
type DeleteReconciler struct {
utils.DefaultSubReconciler
}
DeleteReconciler is responsible for deleting the APIKey when it is expired.
func NewDeleteReconciler ¶
func NewDeleteReconciler(client client.Client) *DeleteReconciler
NewDeleteReconciler creates a new sub-reconciler instance. The reconciler is initialized with the given client.
type StatusReconciler ¶
type StatusReconciler struct {
utils.DefaultSubReconciler
}
StatusReconciler is responsible for reconciling the status of the APIKey resource.
func NewStatusReconciler ¶
func NewStatusReconciler(client client.Client) *StatusReconciler
NewStatusReconciler creates a new sub-reconciler instance. The reconciler is initialized with the given client.
Click to show internal directories.
Click to hide internal directories.