mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
* expose ngalert API to public * add delete action to time-intervals * introduce time-interval model generated by app-platform-sdk from CUE model the fields of the model are chosen to be compatible with the current model * implement api server * add feature flag alertingApiServer ---- Test Infra * update helper to support creating custom users with enterprise permissions * add generator for Interval model
40 lines
1.7 KiB
Go
40 lines
1.7 KiB
Go
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
|
|
package v0alpha1
|
|
|
|
// TimeIntervalSpecApplyConfiguration represents an declarative configuration of the TimeIntervalSpec type for use
|
|
// with apply.
|
|
type TimeIntervalSpecApplyConfiguration struct {
|
|
Name *string `json:"name,omitempty"`
|
|
TimeIntervals []IntervalApplyConfiguration `json:"time_intervals,omitempty"`
|
|
}
|
|
|
|
// TimeIntervalSpecApplyConfiguration constructs an declarative configuration of the TimeIntervalSpec type for use with
|
|
// apply.
|
|
func TimeIntervalSpec() *TimeIntervalSpecApplyConfiguration {
|
|
return &TimeIntervalSpecApplyConfiguration{}
|
|
}
|
|
|
|
// WithName sets the Name 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 Name field is set to the value of the last call.
|
|
func (b *TimeIntervalSpecApplyConfiguration) WithName(value string) *TimeIntervalSpecApplyConfiguration {
|
|
b.Name = &value
|
|
return b
|
|
}
|
|
|
|
// WithTimeIntervals adds the given value to the TimeIntervals 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 TimeIntervals field.
|
|
func (b *TimeIntervalSpecApplyConfiguration) WithTimeIntervals(values ...*IntervalApplyConfiguration) *TimeIntervalSpecApplyConfiguration {
|
|
for i := range values {
|
|
if values[i] == nil {
|
|
panic("nil value passed to WithTimeIntervals")
|
|
}
|
|
b.TimeIntervals = append(b.TimeIntervals, *values[i])
|
|
}
|
|
return b
|
|
}
|