MCPcopy
hub / github.com/grafana/grafana / On

Method On

apps/alerting/rules/pkg/app/validation/builder.go:37–40  ·  view source on GitHub ↗
(actions []resource.AdmissionAction, fn ValidateFunc[T])

Source from the content-addressed store, hash-verified

35}
36
37func (b *Builder[T]) On(actions []resource.AdmissionAction, fn ValidateFunc[T]) *Builder[T] {
38 b.entries = append(b.entries, validatorConfig[T]{actions: actions, fn: fn})
39 return b
40}
41
42func (b *Builder[T]) OnWrite(fn ValidateFunc[T]) *Builder[T] {
43 return b.On([]resource.AdmissionAction{resource.AdmissionActionCreate, resource.AdmissionActionUpdate}, fn)

Callers 15

OnWriteMethod · 0.95
OnDeleteMethod · 0.95
WithOpenAPIValidationMethod · 0.95
BuildMethod · 0.80
MutateMethod · 0.80
TypeMethod · 0.80
ValidateMethod · 0.80
ListRepositoriesMethod · 0.80
TestMethod · 0.80
TokenCreationTimeMethod · 0.80

Calls

no outgoing calls

Tested by 15

TestTester_Test_CasesFunction · 0.64
TestTester_TestFunction · 0.64
TestNewFactoryFunction · 0.64
TestFactory_TypesFunction · 0.64
TestFactory_BuildFunction · 0.64
TestFactory_MutateFunction · 0.64
TestFactory_ValidateFunction · 0.64
TestGitHubRepositoryTestFunction · 0.64