package
1.6.8
Repository: https://github.com/crowdsecurity/crowdsec.git
Documentation: pkg.go.dev

# Packages

# Functions

As is a pseudo aggregation function for renaming another other functions with custom names.
Asc applies the given fields in ASC order.
Count applies the "count" aggregation function on each group.
Debug enables debug logging on the ent.Driver.
Desc applies the given fields in DESC order.
Driver configures the client driver.
FromContext returns a Client stored inside a context, or nil if there isn't one.
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
IsNotFound returns a boolean indicating whether the error is a not found error.
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
IsNotSingular returns a boolean indicating whether the error is a not singular error.
IsValidationError returns a boolean indicating whether the error is a validation error.
Log sets the logging function for debug mode.
MaskNotFound masks not found error.
Max applies the "max" aggregation function on the given field of each group.
Mean applies the "mean" aggregation function on the given field of each group.
Min applies the "min" aggregation function on the given field of each group.
NewAlertClient returns a client for the Alert from the given config.
NewAllowListClient returns a client for the AllowList from the given config.
NewAllowListItemClient returns a client for the AllowListItem from the given config.
NewBouncerClient returns a client for the Bouncer from the given config.
NewClient creates a new client configured with the given options.
NewConfigItemClient returns a client for the ConfigItem from the given config.
NewContext returns a new context with the given Client attached.
NewDecisionClient returns a client for the Decision from the given config.
NewEventClient returns a client for the Event from the given config.
NewLockClient returns a client for the Lock from the given config.
NewMachineClient returns a client for the Machine from the given config.
NewMetaClient returns a client for the Meta from the given config.
NewMetricClient returns a client for the Metric from the given config.
NewTxContext returns a new context with the given Tx attached.
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it.
Sum applies the "sum" aggregation function on the given field of each group.
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

# Constants

# Variables

ErrTxStarted is returned when trying to start a new transaction from a transactional client.

# Structs

Alert is the model entity for the Alert schema.
AlertClient is a client for the Alert schema.
AlertCreate is the builder for creating a Alert entity.
AlertCreateBulk is the builder for creating many Alert entities in bulk.
AlertDelete is the builder for deleting a Alert entity.
AlertDeleteOne is the builder for deleting a single Alert entity.
AlertEdges holds the relations/edges for other nodes in the graph.
AlertGroupBy is the group-by builder for Alert entities.
AlertMutation represents an operation that mutates the Alert nodes in the graph.
AlertQuery is the builder for querying Alert entities.
AlertSelect is the builder for selecting fields of Alert entities.
AlertUpdate is the builder for updating Alert entities.
AlertUpdateOne is the builder for updating a single Alert entity.
AllowList is the model entity for the AllowList schema.
AllowListClient is a client for the AllowList schema.
AllowListCreate is the builder for creating a AllowList entity.
AllowListCreateBulk is the builder for creating many AllowList entities in bulk.
AllowListDelete is the builder for deleting a AllowList entity.
AllowListDeleteOne is the builder for deleting a single AllowList entity.
AllowListEdges holds the relations/edges for other nodes in the graph.
AllowListGroupBy is the group-by builder for AllowList entities.
AllowListItem is the model entity for the AllowListItem schema.
AllowListItemClient is a client for the AllowListItem schema.
AllowListItemCreate is the builder for creating a AllowListItem entity.
AllowListItemCreateBulk is the builder for creating many AllowListItem entities in bulk.
AllowListItemDelete is the builder for deleting a AllowListItem entity.
AllowListItemDeleteOne is the builder for deleting a single AllowListItem entity.
AllowListItemEdges holds the relations/edges for other nodes in the graph.
AllowListItemGroupBy is the group-by builder for AllowListItem entities.
AllowListItemMutation represents an operation that mutates the AllowListItem nodes in the graph.
AllowListItemQuery is the builder for querying AllowListItem entities.
AllowListItemSelect is the builder for selecting fields of AllowListItem entities.
AllowListItemUpdate is the builder for updating AllowListItem entities.
AllowListItemUpdateOne is the builder for updating a single AllowListItem entity.
AllowListMutation represents an operation that mutates the AllowList nodes in the graph.
AllowListQuery is the builder for querying AllowList entities.
AllowListSelect is the builder for selecting fields of AllowList entities.
AllowListUpdate is the builder for updating AllowList entities.
AllowListUpdateOne is the builder for updating a single AllowList entity.
Bouncer is the model entity for the Bouncer schema.
BouncerClient is a client for the Bouncer schema.
BouncerCreate is the builder for creating a Bouncer entity.
BouncerCreateBulk is the builder for creating many Bouncer entities in bulk.
BouncerDelete is the builder for deleting a Bouncer entity.
BouncerDeleteOne is the builder for deleting a single Bouncer entity.
BouncerGroupBy is the group-by builder for Bouncer entities.
BouncerMutation represents an operation that mutates the Bouncer nodes in the graph.
BouncerQuery is the builder for querying Bouncer entities.
BouncerSelect is the builder for selecting fields of Bouncer entities.
BouncerUpdate is the builder for updating Bouncer entities.
BouncerUpdateOne is the builder for updating a single Bouncer entity.
Client is the client that holds all ent builders.
ConfigItem is the model entity for the ConfigItem schema.
ConfigItemClient is a client for the ConfigItem schema.
ConfigItemCreate is the builder for creating a ConfigItem entity.
ConfigItemCreateBulk is the builder for creating many ConfigItem entities in bulk.
ConfigItemDelete is the builder for deleting a ConfigItem entity.
ConfigItemDeleteOne is the builder for deleting a single ConfigItem entity.
ConfigItemGroupBy is the group-by builder for ConfigItem entities.
ConfigItemMutation represents an operation that mutates the ConfigItem nodes in the graph.
ConfigItemQuery is the builder for querying ConfigItem entities.
ConfigItemSelect is the builder for selecting fields of ConfigItem entities.
ConfigItemUpdate is the builder for updating ConfigItem entities.
ConfigItemUpdateOne is the builder for updating a single ConfigItem entity.
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed.
Decision is the model entity for the Decision schema.
DecisionClient is a client for the Decision schema.
DecisionCreate is the builder for creating a Decision entity.
DecisionCreateBulk is the builder for creating many Decision entities in bulk.
DecisionDelete is the builder for deleting a Decision entity.
DecisionDeleteOne is the builder for deleting a single Decision entity.
DecisionEdges holds the relations/edges for other nodes in the graph.
DecisionGroupBy is the group-by builder for Decision entities.
DecisionMutation represents an operation that mutates the Decision nodes in the graph.
DecisionQuery is the builder for querying Decision entities.
DecisionSelect is the builder for selecting fields of Decision entities.
DecisionUpdate is the builder for updating Decision entities.
DecisionUpdateOne is the builder for updating a single Decision entity.
Event is the model entity for the Event schema.
EventClient is a client for the Event schema.
EventCreate is the builder for creating a Event entity.
EventCreateBulk is the builder for creating many Event entities in bulk.
EventDelete is the builder for deleting a Event entity.
EventDeleteOne is the builder for deleting a single Event entity.
EventEdges holds the relations/edges for other nodes in the graph.
EventGroupBy is the group-by builder for Event entities.
EventMutation represents an operation that mutates the Event nodes in the graph.
EventQuery is the builder for querying Event entities.
EventSelect is the builder for selecting fields of Event entities.
EventUpdate is the builder for updating Event entities.
EventUpdateOne is the builder for updating a single Event entity.
Lock is the model entity for the Lock schema.
LockClient is a client for the Lock schema.
LockCreate is the builder for creating a Lock entity.
LockCreateBulk is the builder for creating many Lock entities in bulk.
LockDelete is the builder for deleting a Lock entity.
LockDeleteOne is the builder for deleting a single Lock entity.
LockGroupBy is the group-by builder for Lock entities.
LockMutation represents an operation that mutates the Lock nodes in the graph.
LockQuery is the builder for querying Lock entities.
LockSelect is the builder for selecting fields of Lock entities.
LockUpdate is the builder for updating Lock entities.
LockUpdateOne is the builder for updating a single Lock entity.
Machine is the model entity for the Machine schema.
MachineClient is a client for the Machine schema.
MachineCreate is the builder for creating a Machine entity.
MachineCreateBulk is the builder for creating many Machine entities in bulk.
MachineDelete is the builder for deleting a Machine entity.
MachineDeleteOne is the builder for deleting a single Machine entity.
MachineEdges holds the relations/edges for other nodes in the graph.
MachineGroupBy is the group-by builder for Machine entities.
MachineMutation represents an operation that mutates the Machine nodes in the graph.
MachineQuery is the builder for querying Machine entities.
MachineSelect is the builder for selecting fields of Machine entities.
MachineUpdate is the builder for updating Machine entities.
MachineUpdateOne is the builder for updating a single Machine entity.
Meta is the model entity for the Meta schema.
MetaClient is a client for the Meta schema.
MetaCreate is the builder for creating a Meta entity.
MetaCreateBulk is the builder for creating many Meta entities in bulk.
MetaDelete is the builder for deleting a Meta entity.
MetaDeleteOne is the builder for deleting a single Meta entity.
MetaEdges holds the relations/edges for other nodes in the graph.
MetaGroupBy is the group-by builder for Meta entities.
MetaMutation represents an operation that mutates the Meta nodes in the graph.
MetaQuery is the builder for querying Meta entities.
MetaSelect is the builder for selecting fields of Meta entities.
MetaUpdate is the builder for updating Meta entities.
MetaUpdateOne is the builder for updating a single Meta entity.
Metric is the model entity for the Metric schema.
MetricClient is a client for the Metric schema.
MetricCreate is the builder for creating a Metric entity.
MetricCreateBulk is the builder for creating many Metric entities in bulk.
MetricDelete is the builder for deleting a Metric entity.
MetricDeleteOne is the builder for deleting a single Metric entity.
MetricGroupBy is the group-by builder for Metric entities.
MetricMutation represents an operation that mutates the Metric nodes in the graph.
MetricQuery is the builder for querying Metric entities.
MetricSelect is the builder for selecting fields of Metric entities.
MetricUpdate is the builder for updating Metric entities.
MetricUpdateOne is the builder for updating a single Metric entity.
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
NotLoadedError returns when trying to get a node that was not loaded by the query.
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
Tx is a transactional client that is created by calling Client.Tx().
ValidationError returns when validating a field or edge fails.

# Interfaces

# Type aliases

AggregateFunc applies an aggregation step on the group-by traversal/selector.
Alerts is a parsable slice of Alert.
AllowListItems is a parsable slice of AllowListItem.
AllowLists is a parsable slice of AllowList.
Bouncers is a parsable slice of Bouncer.
ConfigItems is a parsable slice of ConfigItem.
Decisions is a parsable slice of Decision.
Events is a parsable slice of Event.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
Locks is a parsable slice of Lock.
Machines is a parsable slice of Machine.
MetaSlice is a parsable slice of Meta.
Metrics is a parsable slice of Metric.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
OrderFunc applies an ordering on the sql selector.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.
ent aliases to avoid import conflicts in user's code.