Files
Roberto Jiménez Sánchez 04e152f326 Provisioning: webhook last event timestamp (#103180)
* Record webhook pinged event

* Add TODO for webhook creation updated

* Hack to wire client

* Revert accidental change in controller

* Wire the client

* Use factory method

* Remove omit empty

* Regenerate client

* Fix compilation

* Every 30 seconds if not pinged

* Move lines around

* Use different approach

* Added as part of the controller

* Exponential backoff for waiting for ping

* More stuff

* Revert changes in controller

* Add separate webhook section in overview

* Change order of translations

* Update ping within 1 minute

* Last event update

* Extract translation

* Display last event in frontend

* Refactor the logic around update

* Fix the type to marshal
2025-04-02 10:09:58 +02:00

75 lines
3.4 KiB
Go

// SPDX-License-Identifier: AGPL-3.0-only
// Code generated by applyconfiguration-gen. DO NOT EDIT.
package v0alpha1
// WebhookStatusApplyConfiguration represents a declarative configuration of the WebhookStatus type for use
// with apply.
type WebhookStatusApplyConfiguration struct {
ID *int64 `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
Secret *string `json:"secret,omitempty"`
EncryptedSecret []byte `json:"encryptedSecret,omitempty"`
SubscribedEvents []string `json:"subscribedEvents,omitempty"`
LastEvent *int64 `json:"lastEvent,omitempty"`
}
// WebhookStatusApplyConfiguration constructs a declarative configuration of the WebhookStatus type for use with
// apply.
func WebhookStatus() *WebhookStatusApplyConfiguration {
return &WebhookStatusApplyConfiguration{}
}
// WithID sets the ID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ID field is set to the value of the last call.
func (b *WebhookStatusApplyConfiguration) WithID(value int64) *WebhookStatusApplyConfiguration {
b.ID = &value
return b
}
// WithURL sets the URL field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the URL field is set to the value of the last call.
func (b *WebhookStatusApplyConfiguration) WithURL(value string) *WebhookStatusApplyConfiguration {
b.URL = &value
return b
}
// WithSecret sets the Secret field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the Secret field is set to the value of the last call.
func (b *WebhookStatusApplyConfiguration) WithSecret(value string) *WebhookStatusApplyConfiguration {
b.Secret = &value
return b
}
// WithEncryptedSecret adds the given value to the EncryptedSecret field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the EncryptedSecret field.
func (b *WebhookStatusApplyConfiguration) WithEncryptedSecret(values ...byte) *WebhookStatusApplyConfiguration {
for i := range values {
b.EncryptedSecret = append(b.EncryptedSecret, values[i])
}
return b
}
// WithSubscribedEvents adds the given value to the SubscribedEvents field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the SubscribedEvents field.
func (b *WebhookStatusApplyConfiguration) WithSubscribedEvents(values ...string) *WebhookStatusApplyConfiguration {
for i := range values {
b.SubscribedEvents = append(b.SubscribedEvents, values[i])
}
return b
}
// WithLastEvent sets the LastEvent field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the LastEvent field is set to the value of the last call.
func (b *WebhookStatusApplyConfiguration) WithLastEvent(value int64) *WebhookStatusApplyConfiguration {
b.LastEvent = &value
return b
}