MCPcopy
hub / github.com/crowdsecurity/crowdsec / Save

Method Save

pkg/database/ent/alert_create.go:441–444  ·  view source on GitHub ↗

Save creates the Alert in the database.

(ctx context.Context)

Source from the content-addressed store, hash-verified

439
440// Save creates the Alert in the database.
441func (_c *AlertCreate) Save(ctx context.Context) (*Alert, error) {
442 _c.defaults()
443 return withHooks(ctx, _c.sqlSave, _c.mutation, _c.hooks)
444}
445
446// SaveX calls Save and panics if Save returns an error.
447func (_c *AlertCreate) SaveX(ctx context.Context) *Alert {

Callers 3

SaveXMethod · 0.95
ExecMethod · 0.95
IDMethod · 0.45

Calls 2

defaultsMethod · 0.95
withHooksFunction · 0.85

Tested by

no test coverage detected