-
Notifications
You must be signed in to change notification settings - Fork 41
/
runtime.go
34 lines (31 loc) · 1013 Bytes
/
runtime.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Code generated by entc, DO NOT EDIT.
package ent
import (
"github.com/vorteil/direktiv/pkg/functions/ent/schema"
"github.com/vorteil/direktiv/pkg/functions/ent/services"
)
// The init function reads all schema descriptors with runtime code
// (default values, validators, hooks and policies) and stitches it
// to their package variables.
func init() {
servicesFields := schema.Services{}.Fields()
_ = servicesFields
// servicesDescName is the schema descriptor for name field.
servicesDescName := servicesFields[0].Descriptor()
// services.NameValidator is a validator for the "name" field. It is called by the builders before save.
services.NameValidator = func() func(string) error {
validators := servicesDescName.Validators
fns := [...]func(string) error{
validators[0].(func(string) error),
validators[1].(func(string) error),
}
return func(name string) error {
for _, fn := range fns {
if err := fn(name); err != nil {
return err
}
}
return nil
}
}()
}