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
This commit is contained in:
@@ -12,6 +12,7 @@ type WebhookStatusApplyConfiguration struct {
|
||||
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
|
||||
@@ -63,3 +64,11 @@ func (b *WebhookStatusApplyConfiguration) WithSubscribedEvents(values ...string)
|
||||
}
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user