bitbucket.org/Aishee/synsec@v0.0.0-20210414005726-236fc01a153d/pkg/database/ent/runtime.go (about) 1 // Code generated by entc, DO NOT EDIT. 2 3 package ent 4 5 import ( 6 "time" 7 8 "bitbucket.org/Aishee/synsec/pkg/database/ent/alert" 9 "bitbucket.org/Aishee/synsec/pkg/database/ent/bouncer" 10 "bitbucket.org/Aishee/synsec/pkg/database/ent/decision" 11 "bitbucket.org/Aishee/synsec/pkg/database/ent/event" 12 "bitbucket.org/Aishee/synsec/pkg/database/ent/machine" 13 "bitbucket.org/Aishee/synsec/pkg/database/ent/meta" 14 "bitbucket.org/Aishee/synsec/pkg/database/ent/schema" 15 ) 16 17 // The init function reads all schema descriptors with runtime code 18 // (default values, validators, hooks and policies) and stitches it 19 // to their package variables. 20 func init() { 21 alertFields := schema.Alert{}.Fields() 22 _ = alertFields 23 // alertDescCreatedAt is the schema descriptor for created_at field. 24 alertDescCreatedAt := alertFields[0].Descriptor() 25 // alert.DefaultCreatedAt holds the default value on creation for the created_at field. 26 alert.DefaultCreatedAt = alertDescCreatedAt.Default.(func() time.Time) 27 // alertDescUpdatedAt is the schema descriptor for updated_at field. 28 alertDescUpdatedAt := alertFields[1].Descriptor() 29 // alert.DefaultUpdatedAt holds the default value on creation for the updated_at field. 30 alert.DefaultUpdatedAt = alertDescUpdatedAt.Default.(func() time.Time) 31 // alertDescBucketId is the schema descriptor for bucketId field. 32 alertDescBucketId := alertFields[3].Descriptor() 33 // alert.DefaultBucketId holds the default value on creation for the bucketId field. 34 alert.DefaultBucketId = alertDescBucketId.Default.(string) 35 // alertDescMessage is the schema descriptor for message field. 36 alertDescMessage := alertFields[4].Descriptor() 37 // alert.DefaultMessage holds the default value on creation for the message field. 38 alert.DefaultMessage = alertDescMessage.Default.(string) 39 // alertDescEventsCount is the schema descriptor for eventsCount field. 40 alertDescEventsCount := alertFields[5].Descriptor() 41 // alert.DefaultEventsCount holds the default value on creation for the eventsCount field. 42 alert.DefaultEventsCount = alertDescEventsCount.Default.(int32) 43 // alertDescStartedAt is the schema descriptor for startedAt field. 44 alertDescStartedAt := alertFields[6].Descriptor() 45 // alert.DefaultStartedAt holds the default value on creation for the startedAt field. 46 alert.DefaultStartedAt = alertDescStartedAt.Default.(func() time.Time) 47 // alertDescStoppedAt is the schema descriptor for stoppedAt field. 48 alertDescStoppedAt := alertFields[7].Descriptor() 49 // alert.DefaultStoppedAt holds the default value on creation for the stoppedAt field. 50 alert.DefaultStoppedAt = alertDescStoppedAt.Default.(func() time.Time) 51 // alertDescSimulated is the schema descriptor for simulated field. 52 alertDescSimulated := alertFields[21].Descriptor() 53 // alert.DefaultSimulated holds the default value on creation for the simulated field. 54 alert.DefaultSimulated = alertDescSimulated.Default.(bool) 55 bouncerFields := schema.Bouncer{}.Fields() 56 _ = bouncerFields 57 // bouncerDescCreatedAt is the schema descriptor for created_at field. 58 bouncerDescCreatedAt := bouncerFields[0].Descriptor() 59 // bouncer.DefaultCreatedAt holds the default value on creation for the created_at field. 60 bouncer.DefaultCreatedAt = bouncerDescCreatedAt.Default.(func() time.Time) 61 // bouncerDescUpdatedAt is the schema descriptor for updated_at field. 62 bouncerDescUpdatedAt := bouncerFields[1].Descriptor() 63 // bouncer.DefaultUpdatedAt holds the default value on creation for the updated_at field. 64 bouncer.DefaultUpdatedAt = bouncerDescUpdatedAt.Default.(func() time.Time) 65 // bouncerDescIPAddress is the schema descriptor for ip_address field. 66 bouncerDescIPAddress := bouncerFields[5].Descriptor() 67 // bouncer.DefaultIPAddress holds the default value on creation for the ip_address field. 68 bouncer.DefaultIPAddress = bouncerDescIPAddress.Default.(string) 69 // bouncerDescUntil is the schema descriptor for until field. 70 bouncerDescUntil := bouncerFields[8].Descriptor() 71 // bouncer.DefaultUntil holds the default value on creation for the until field. 72 bouncer.DefaultUntil = bouncerDescUntil.Default.(func() time.Time) 73 // bouncerDescLastPull is the schema descriptor for last_pull field. 74 bouncerDescLastPull := bouncerFields[9].Descriptor() 75 // bouncer.DefaultLastPull holds the default value on creation for the last_pull field. 76 bouncer.DefaultLastPull = bouncerDescLastPull.Default.(func() time.Time) 77 decisionFields := schema.Decision{}.Fields() 78 _ = decisionFields 79 // decisionDescCreatedAt is the schema descriptor for created_at field. 80 decisionDescCreatedAt := decisionFields[0].Descriptor() 81 // decision.DefaultCreatedAt holds the default value on creation for the created_at field. 82 decision.DefaultCreatedAt = decisionDescCreatedAt.Default.(func() time.Time) 83 // decisionDescUpdatedAt is the schema descriptor for updated_at field. 84 decisionDescUpdatedAt := decisionFields[1].Descriptor() 85 // decision.DefaultUpdatedAt holds the default value on creation for the updated_at field. 86 decision.DefaultUpdatedAt = decisionDescUpdatedAt.Default.(func() time.Time) 87 // decisionDescSimulated is the schema descriptor for simulated field. 88 decisionDescSimulated := decisionFields[13].Descriptor() 89 // decision.DefaultSimulated holds the default value on creation for the simulated field. 90 decision.DefaultSimulated = decisionDescSimulated.Default.(bool) 91 eventFields := schema.Event{}.Fields() 92 _ = eventFields 93 // eventDescCreatedAt is the schema descriptor for created_at field. 94 eventDescCreatedAt := eventFields[0].Descriptor() 95 // event.DefaultCreatedAt holds the default value on creation for the created_at field. 96 event.DefaultCreatedAt = eventDescCreatedAt.Default.(func() time.Time) 97 // eventDescUpdatedAt is the schema descriptor for updated_at field. 98 eventDescUpdatedAt := eventFields[1].Descriptor() 99 // event.DefaultUpdatedAt holds the default value on creation for the updated_at field. 100 event.DefaultUpdatedAt = eventDescUpdatedAt.Default.(func() time.Time) 101 // eventDescSerialized is the schema descriptor for serialized field. 102 eventDescSerialized := eventFields[3].Descriptor() 103 // event.SerializedValidator is a validator for the "serialized" field. It is called by the builders before save. 104 event.SerializedValidator = eventDescSerialized.Validators[0].(func(string) error) 105 machineFields := schema.Machine{}.Fields() 106 _ = machineFields 107 // machineDescCreatedAt is the schema descriptor for created_at field. 108 machineDescCreatedAt := machineFields[0].Descriptor() 109 // machine.DefaultCreatedAt holds the default value on creation for the created_at field. 110 machine.DefaultCreatedAt = machineDescCreatedAt.Default.(func() time.Time) 111 // machineDescUpdatedAt is the schema descriptor for updated_at field. 112 machineDescUpdatedAt := machineFields[1].Descriptor() 113 // machine.DefaultUpdatedAt holds the default value on creation for the updated_at field. 114 machine.DefaultUpdatedAt = machineDescUpdatedAt.Default.(func() time.Time) 115 // machineDescScenarios is the schema descriptor for scenarios field. 116 machineDescScenarios := machineFields[5].Descriptor() 117 // machine.ScenariosValidator is a validator for the "scenarios" field. It is called by the builders before save. 118 machine.ScenariosValidator = machineDescScenarios.Validators[0].(func(string) error) 119 // machineDescIsValidated is the schema descriptor for isValidated field. 120 machineDescIsValidated := machineFields[7].Descriptor() 121 // machine.DefaultIsValidated holds the default value on creation for the isValidated field. 122 machine.DefaultIsValidated = machineDescIsValidated.Default.(bool) 123 metaFields := schema.Meta{}.Fields() 124 _ = metaFields 125 // metaDescCreatedAt is the schema descriptor for created_at field. 126 metaDescCreatedAt := metaFields[0].Descriptor() 127 // meta.DefaultCreatedAt holds the default value on creation for the created_at field. 128 meta.DefaultCreatedAt = metaDescCreatedAt.Default.(func() time.Time) 129 // metaDescUpdatedAt is the schema descriptor for updated_at field. 130 metaDescUpdatedAt := metaFields[1].Descriptor() 131 // meta.DefaultUpdatedAt holds the default value on creation for the updated_at field. 132 meta.DefaultUpdatedAt = metaDescUpdatedAt.Default.(func() time.Time) 133 // metaDescValue is the schema descriptor for value field. 134 metaDescValue := metaFields[3].Descriptor() 135 // meta.ValueValidator is a validator for the "value" field. It is called by the builders before save. 136 meta.ValueValidator = metaDescValue.Validators[0].(func(string) error) 137 }