MCPcopy Index your code
hub / github.com/crowdsecurity/crowdsec / Field

Method Field

pkg/database/ent/mutation.go:8137–8151  ·  view source on GitHub ↗

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

(name string)

Source from the content-addressed store, hash-verified

8135// return value indicates that this field was not set, or was not defined in the
8136// schema.
8137func (m *EventMutation) Field(name string) (ent.Value, bool) {
8138 switch name {
8139 case event.FieldCreatedAt:
8140 return m.CreatedAt()
8141 case event.FieldUpdatedAt:
8142 return m.UpdatedAt()
8143 case event.FieldTime:
8144 return m.Time()
8145 case event.FieldSerialized:
8146 return m.Serialized()
8147 case event.FieldAlertEvents:
8148 return m.AlertEvents()
8149 }
8150 return nil, false
8151}
8152
8153// OldField returns the old value of the field from the database. An error is
8154// returned if the mutation operation is not UpdateOne, or the query to the

Callers

nothing calls this directly

Calls 5

CreatedAtMethod · 0.95
UpdatedAtMethod · 0.95
TimeMethod · 0.95
SerializedMethod · 0.95
AlertEventsMethod · 0.95

Tested by

no test coverage detected