MCPcopy Create free account
hub / github.com/crowdsecurity/crowdsec / Save

Method Save

pkg/database/ent/allowlist_create.go:115–118  ·  view source on GitHub ↗

Save creates the AllowList in the database.

(ctx context.Context)

Source from the content-addressed store, hash-verified

113
114// Save creates the AllowList in the database.
115func (_c *AllowListCreate) Save(ctx context.Context) (*AllowList, error) {
116 _c.defaults()
117 return withHooks(ctx, _c.sqlSave, _c.mutation, _c.hooks)
118}
119
120// SaveX calls Save and panics if Save returns an error.
121func (_c *AllowListCreate) SaveX(ctx context.Context) *AllowList {

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