Documentation ¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type Alert
- type AlertClient
- func (c *AlertClient) Create() *AlertCreate
- func (c *AlertClient) CreateBulk(builders ...*AlertCreate) *AlertCreateBulk
- func (c *AlertClient) Delete() *AlertDelete
- func (c *AlertClient) DeleteOne(a *Alert) *AlertDeleteOne
- func (c *AlertClient) DeleteOneID(id int) *AlertDeleteOne
- func (c *AlertClient) Get(ctx context.Context, id int) (*Alert, error)
- func (c *AlertClient) GetX(ctx context.Context, id int) *Alert
- func (c *AlertClient) Hooks() []Hook
- func (c *AlertClient) Query() *AlertQuery
- func (c *AlertClient) QueryDecisions(a *Alert) *DecisionQuery
- func (c *AlertClient) QueryEvents(a *Alert) *EventQuery
- func (c *AlertClient) QueryMetas(a *Alert) *MetaQuery
- func (c *AlertClient) QueryOwner(a *Alert) *MachineQuery
- func (c *AlertClient) Update() *AlertUpdate
- func (c *AlertClient) UpdateOne(a *Alert) *AlertUpdateOne
- func (c *AlertClient) UpdateOneID(id int) *AlertUpdateOne
- func (c *AlertClient) Use(hooks ...Hook)
- type AlertCreate
- func (ac *AlertCreate) AddDecisionIDs(ids ...int) *AlertCreate
- func (ac *AlertCreate) AddDecisions(d ...*Decision) *AlertCreate
- func (ac *AlertCreate) AddEventIDs(ids ...int) *AlertCreate
- func (ac *AlertCreate) AddEvents(e ...*Event) *AlertCreate
- func (ac *AlertCreate) AddMetaIDs(ids ...int) *AlertCreate
- func (ac *AlertCreate) AddMetas(m ...*Meta) *AlertCreate
- func (ac *AlertCreate) Exec(ctx context.Context) error
- func (ac *AlertCreate) ExecX(ctx context.Context)
- func (ac *AlertCreate) Mutation() *AlertMutation
- func (ac *AlertCreate) Save(ctx context.Context) (*Alert, error)
- func (ac *AlertCreate) SaveX(ctx context.Context) *Alert
- func (ac *AlertCreate) SetBucketId(s string) *AlertCreate
- func (ac *AlertCreate) SetCapacity(i int32) *AlertCreate
- func (ac *AlertCreate) SetCreatedAt(t time.Time) *AlertCreate
- func (ac *AlertCreate) SetEventsCount(i int32) *AlertCreate
- func (ac *AlertCreate) SetLeakSpeed(s string) *AlertCreate
- func (ac *AlertCreate) SetMessage(s string) *AlertCreate
- func (ac *AlertCreate) SetNillableBucketId(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableCapacity(i *int32) *AlertCreate
- func (ac *AlertCreate) SetNillableCreatedAt(t *time.Time) *AlertCreate
- func (ac *AlertCreate) SetNillableEventsCount(i *int32) *AlertCreate
- func (ac *AlertCreate) SetNillableLeakSpeed(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableMessage(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableOwnerID(id *int) *AlertCreate
- func (ac *AlertCreate) SetNillableScenarioHash(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableScenarioVersion(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableSimulated(b *bool) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceAsName(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceAsNumber(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceCountry(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceIp(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceLatitude(f *float32) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceLongitude(f *float32) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceRange(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceScope(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableSourceValue(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableStartedAt(t *time.Time) *AlertCreate
- func (ac *AlertCreate) SetNillableStoppedAt(t *time.Time) *AlertCreate
- func (ac *AlertCreate) SetNillableUUID(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableUpdatedAt(t *time.Time) *AlertCreate
- func (ac *AlertCreate) SetOwner(m *Machine) *AlertCreate
- func (ac *AlertCreate) SetOwnerID(id int) *AlertCreate
- func (ac *AlertCreate) SetScenario(s string) *AlertCreate
- func (ac *AlertCreate) SetScenarioHash(s string) *AlertCreate
- func (ac *AlertCreate) SetScenarioVersion(s string) *AlertCreate
- func (ac *AlertCreate) SetSimulated(b bool) *AlertCreate
- func (ac *AlertCreate) SetSourceAsName(s string) *AlertCreate
- func (ac *AlertCreate) SetSourceAsNumber(s string) *AlertCreate
- func (ac *AlertCreate) SetSourceCountry(s string) *AlertCreate
- func (ac *AlertCreate) SetSourceIp(s string) *AlertCreate
- func (ac *AlertCreate) SetSourceLatitude(f float32) *AlertCreate
- func (ac *AlertCreate) SetSourceLongitude(f float32) *AlertCreate
- func (ac *AlertCreate) SetSourceRange(s string) *AlertCreate
- func (ac *AlertCreate) SetSourceScope(s string) *AlertCreate
- func (ac *AlertCreate) SetSourceValue(s string) *AlertCreate
- func (ac *AlertCreate) SetStartedAt(t time.Time) *AlertCreate
- func (ac *AlertCreate) SetStoppedAt(t time.Time) *AlertCreate
- func (ac *AlertCreate) SetUUID(s string) *AlertCreate
- func (ac *AlertCreate) SetUpdatedAt(t time.Time) *AlertCreate
- type AlertCreateBulk
- type AlertDelete
- type AlertDeleteOne
- type AlertEdges
- type AlertGroupBy
- func (agb *AlertGroupBy) Aggregate(fns ...AggregateFunc) *AlertGroupBy
- func (s *AlertGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlertGroupBy) BoolX(ctx context.Context) bool
- func (s *AlertGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AlertGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AlertGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlertGroupBy) Float64X(ctx context.Context) float64
- func (s *AlertGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlertGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AlertGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AlertGroupBy) IntX(ctx context.Context) int
- func (s *AlertGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AlertGroupBy) IntsX(ctx context.Context) []int
- func (agb *AlertGroupBy) Scan(ctx context.Context, v any) error
- func (s *AlertGroupBy) ScanX(ctx context.Context, v any)
- func (s *AlertGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AlertGroupBy) StringX(ctx context.Context) string
- func (s *AlertGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AlertGroupBy) StringsX(ctx context.Context) []string
- type AlertMutation
- func (m *AlertMutation) AddCapacity(i int32)
- func (m *AlertMutation) AddDecisionIDs(ids ...int)
- func (m *AlertMutation) AddEventIDs(ids ...int)
- func (m *AlertMutation) AddEventsCount(i int32)
- func (m *AlertMutation) AddField(name string, value ent.Value) error
- func (m *AlertMutation) AddMetaIDs(ids ...int)
- func (m *AlertMutation) AddSourceLatitude(f float32)
- func (m *AlertMutation) AddSourceLongitude(f float32)
- func (m *AlertMutation) AddedCapacity() (r int32, exists bool)
- func (m *AlertMutation) AddedEdges() []string
- func (m *AlertMutation) AddedEventsCount() (r int32, exists bool)
- func (m *AlertMutation) AddedField(name string) (ent.Value, bool)
- func (m *AlertMutation) AddedFields() []string
- func (m *AlertMutation) AddedIDs(name string) []ent.Value
- func (m *AlertMutation) AddedSourceLatitude() (r float32, exists bool)
- func (m *AlertMutation) AddedSourceLongitude() (r float32, exists bool)
- func (m *AlertMutation) BucketId() (r string, exists bool)
- func (m *AlertMutation) BucketIdCleared() bool
- func (m *AlertMutation) Capacity() (r int32, exists bool)
- func (m *AlertMutation) CapacityCleared() bool
- func (m *AlertMutation) ClearBucketId()
- func (m *AlertMutation) ClearCapacity()
- func (m *AlertMutation) ClearCreatedAt()
- func (m *AlertMutation) ClearDecisions()
- func (m *AlertMutation) ClearEdge(name string) error
- func (m *AlertMutation) ClearEvents()
- func (m *AlertMutation) ClearEventsCount()
- func (m *AlertMutation) ClearField(name string) error
- func (m *AlertMutation) ClearLeakSpeed()
- func (m *AlertMutation) ClearMessage()
- func (m *AlertMutation) ClearMetas()
- func (m *AlertMutation) ClearOwner()
- func (m *AlertMutation) ClearScenarioHash()
- func (m *AlertMutation) ClearScenarioVersion()
- func (m *AlertMutation) ClearSourceAsName()
- func (m *AlertMutation) ClearSourceAsNumber()
- func (m *AlertMutation) ClearSourceCountry()
- func (m *AlertMutation) ClearSourceIp()
- func (m *AlertMutation) ClearSourceLatitude()
- func (m *AlertMutation) ClearSourceLongitude()
- func (m *AlertMutation) ClearSourceRange()
- func (m *AlertMutation) ClearSourceScope()
- func (m *AlertMutation) ClearSourceValue()
- func (m *AlertMutation) ClearStartedAt()
- func (m *AlertMutation) ClearStoppedAt()
- func (m *AlertMutation) ClearUUID()
- func (m *AlertMutation) ClearUpdatedAt()
- func (m *AlertMutation) ClearedEdges() []string
- func (m *AlertMutation) ClearedFields() []string
- func (m AlertMutation) Client() *Client
- func (m *AlertMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AlertMutation) CreatedAtCleared() bool
- func (m *AlertMutation) DecisionsCleared() bool
- func (m *AlertMutation) DecisionsIDs() (ids []int)
- func (m *AlertMutation) EdgeCleared(name string) bool
- func (m *AlertMutation) EventsCleared() bool
- func (m *AlertMutation) EventsCount() (r int32, exists bool)
- func (m *AlertMutation) EventsCountCleared() bool
- func (m *AlertMutation) EventsIDs() (ids []int)
- func (m *AlertMutation) Field(name string) (ent.Value, bool)
- func (m *AlertMutation) FieldCleared(name string) bool
- func (m *AlertMutation) Fields() []string
- func (m *AlertMutation) ID() (id int, exists bool)
- func (m *AlertMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AlertMutation) LeakSpeed() (r string, exists bool)
- func (m *AlertMutation) LeakSpeedCleared() bool
- func (m *AlertMutation) Message() (r string, exists bool)
- func (m *AlertMutation) MessageCleared() bool
- func (m *AlertMutation) MetasCleared() bool
- func (m *AlertMutation) MetasIDs() (ids []int)
- func (m *AlertMutation) OldBucketId(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldCapacity(ctx context.Context) (v int32, err error)
- func (m *AlertMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *AlertMutation) OldEventsCount(ctx context.Context) (v int32, err error)
- func (m *AlertMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AlertMutation) OldLeakSpeed(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldMessage(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldScenario(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldScenarioHash(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldScenarioVersion(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldSimulated(ctx context.Context) (v bool, err error)
- func (m *AlertMutation) OldSourceAsName(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldSourceAsNumber(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldSourceCountry(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldSourceIp(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldSourceLatitude(ctx context.Context) (v float32, err error)
- func (m *AlertMutation) OldSourceLongitude(ctx context.Context) (v float32, err error)
- func (m *AlertMutation) OldSourceRange(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldSourceScope(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldSourceValue(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldStartedAt(ctx context.Context) (v time.Time, err error)
- func (m *AlertMutation) OldStoppedAt(ctx context.Context) (v time.Time, err error)
- func (m *AlertMutation) OldUUID(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *AlertMutation) Op() Op
- func (m *AlertMutation) OwnerCleared() bool
- func (m *AlertMutation) OwnerID() (id int, exists bool)
- func (m *AlertMutation) OwnerIDs() (ids []int)
- func (m *AlertMutation) RemoveDecisionIDs(ids ...int)
- func (m *AlertMutation) RemoveEventIDs(ids ...int)
- func (m *AlertMutation) RemoveMetaIDs(ids ...int)
- func (m *AlertMutation) RemovedDecisionsIDs() (ids []int)
- func (m *AlertMutation) RemovedEdges() []string
- func (m *AlertMutation) RemovedEventsIDs() (ids []int)
- func (m *AlertMutation) RemovedIDs(name string) []ent.Value
- func (m *AlertMutation) RemovedMetasIDs() (ids []int)
- func (m *AlertMutation) ResetBucketId()
- func (m *AlertMutation) ResetCapacity()
- func (m *AlertMutation) ResetCreatedAt()
- func (m *AlertMutation) ResetDecisions()
- func (m *AlertMutation) ResetEdge(name string) error
- func (m *AlertMutation) ResetEvents()
- func (m *AlertMutation) ResetEventsCount()
- func (m *AlertMutation) ResetField(name string) error
- func (m *AlertMutation) ResetLeakSpeed()
- func (m *AlertMutation) ResetMessage()
- func (m *AlertMutation) ResetMetas()
- func (m *AlertMutation) ResetOwner()
- func (m *AlertMutation) ResetScenario()
- func (m *AlertMutation) ResetScenarioHash()
- func (m *AlertMutation) ResetScenarioVersion()
- func (m *AlertMutation) ResetSimulated()
- func (m *AlertMutation) ResetSourceAsName()
- func (m *AlertMutation) ResetSourceAsNumber()
- func (m *AlertMutation) ResetSourceCountry()
- func (m *AlertMutation) ResetSourceIp()
- func (m *AlertMutation) ResetSourceLatitude()
- func (m *AlertMutation) ResetSourceLongitude()
- func (m *AlertMutation) ResetSourceRange()
- func (m *AlertMutation) ResetSourceScope()
- func (m *AlertMutation) ResetSourceValue()
- func (m *AlertMutation) ResetStartedAt()
- func (m *AlertMutation) ResetStoppedAt()
- func (m *AlertMutation) ResetUUID()
- func (m *AlertMutation) ResetUpdatedAt()
- func (m *AlertMutation) Scenario() (r string, exists bool)
- func (m *AlertMutation) ScenarioHash() (r string, exists bool)
- func (m *AlertMutation) ScenarioHashCleared() bool
- func (m *AlertMutation) ScenarioVersion() (r string, exists bool)
- func (m *AlertMutation) ScenarioVersionCleared() bool
- func (m *AlertMutation) SetBucketId(s string)
- func (m *AlertMutation) SetCapacity(i int32)
- func (m *AlertMutation) SetCreatedAt(t time.Time)
- func (m *AlertMutation) SetEventsCount(i int32)
- func (m *AlertMutation) SetField(name string, value ent.Value) error
- func (m *AlertMutation) SetLeakSpeed(s string)
- func (m *AlertMutation) SetMessage(s string)
- func (m *AlertMutation) SetOwnerID(id int)
- func (m *AlertMutation) SetScenario(s string)
- func (m *AlertMutation) SetScenarioHash(s string)
- func (m *AlertMutation) SetScenarioVersion(s string)
- func (m *AlertMutation) SetSimulated(b bool)
- func (m *AlertMutation) SetSourceAsName(s string)
- func (m *AlertMutation) SetSourceAsNumber(s string)
- func (m *AlertMutation) SetSourceCountry(s string)
- func (m *AlertMutation) SetSourceIp(s string)
- func (m *AlertMutation) SetSourceLatitude(f float32)
- func (m *AlertMutation) SetSourceLongitude(f float32)
- func (m *AlertMutation) SetSourceRange(s string)
- func (m *AlertMutation) SetSourceScope(s string)
- func (m *AlertMutation) SetSourceValue(s string)
- func (m *AlertMutation) SetStartedAt(t time.Time)
- func (m *AlertMutation) SetStoppedAt(t time.Time)
- func (m *AlertMutation) SetUUID(s string)
- func (m *AlertMutation) SetUpdatedAt(t time.Time)
- func (m *AlertMutation) Simulated() (r bool, exists bool)
- func (m *AlertMutation) SourceAsName() (r string, exists bool)
- func (m *AlertMutation) SourceAsNameCleared() bool
- func (m *AlertMutation) SourceAsNumber() (r string, exists bool)
- func (m *AlertMutation) SourceAsNumberCleared() bool
- func (m *AlertMutation) SourceCountry() (r string, exists bool)
- func (m *AlertMutation) SourceCountryCleared() bool
- func (m *AlertMutation) SourceIp() (r string, exists bool)
- func (m *AlertMutation) SourceIpCleared() bool
- func (m *AlertMutation) SourceLatitude() (r float32, exists bool)
- func (m *AlertMutation) SourceLatitudeCleared() bool
- func (m *AlertMutation) SourceLongitude() (r float32, exists bool)
- func (m *AlertMutation) SourceLongitudeCleared() bool
- func (m *AlertMutation) SourceRange() (r string, exists bool)
- func (m *AlertMutation) SourceRangeCleared() bool
- func (m *AlertMutation) SourceScope() (r string, exists bool)
- func (m *AlertMutation) SourceScopeCleared() bool
- func (m *AlertMutation) SourceValue() (r string, exists bool)
- func (m *AlertMutation) SourceValueCleared() bool
- func (m *AlertMutation) StartedAt() (r time.Time, exists bool)
- func (m *AlertMutation) StartedAtCleared() bool
- func (m *AlertMutation) StoppedAt() (r time.Time, exists bool)
- func (m *AlertMutation) StoppedAtCleared() bool
- func (m AlertMutation) Tx() (*Tx, error)
- func (m *AlertMutation) Type() string
- func (m *AlertMutation) UUID() (r string, exists bool)
- func (m *AlertMutation) UUIDCleared() bool
- func (m *AlertMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AlertMutation) UpdatedAtCleared() bool
- func (m *AlertMutation) Where(ps ...predicate.Alert)
- type AlertQuery
- func (aq *AlertQuery) All(ctx context.Context) ([]*Alert, error)
- func (aq *AlertQuery) AllX(ctx context.Context) []*Alert
- func (aq *AlertQuery) Clone() *AlertQuery
- func (aq *AlertQuery) Count(ctx context.Context) (int, error)
- func (aq *AlertQuery) CountX(ctx context.Context) int
- func (aq *AlertQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AlertQuery) ExistX(ctx context.Context) bool
- func (aq *AlertQuery) First(ctx context.Context) (*Alert, error)
- func (aq *AlertQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AlertQuery) FirstIDX(ctx context.Context) int
- func (aq *AlertQuery) FirstX(ctx context.Context) *Alert
- func (aq *AlertQuery) GroupBy(field string, fields ...string) *AlertGroupBy
- func (aq *AlertQuery) IDs(ctx context.Context) ([]int, error)
- func (aq *AlertQuery) IDsX(ctx context.Context) []int
- func (aq *AlertQuery) Limit(limit int) *AlertQuery
- func (aq *AlertQuery) Offset(offset int) *AlertQuery
- func (aq *AlertQuery) Only(ctx context.Context) (*Alert, error)
- func (aq *AlertQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AlertQuery) OnlyIDX(ctx context.Context) int
- func (aq *AlertQuery) OnlyX(ctx context.Context) *Alert
- func (aq *AlertQuery) Order(o ...OrderFunc) *AlertQuery
- func (aq *AlertQuery) QueryDecisions() *DecisionQuery
- func (aq *AlertQuery) QueryEvents() *EventQuery
- func (aq *AlertQuery) QueryMetas() *MetaQuery
- func (aq *AlertQuery) QueryOwner() *MachineQuery
- func (aq *AlertQuery) Select(fields ...string) *AlertSelect
- func (aq *AlertQuery) Unique(unique bool) *AlertQuery
- func (aq *AlertQuery) Where(ps ...predicate.Alert) *AlertQuery
- func (aq *AlertQuery) WithDecisions(opts ...func(*DecisionQuery)) *AlertQuery
- func (aq *AlertQuery) WithEvents(opts ...func(*EventQuery)) *AlertQuery
- func (aq *AlertQuery) WithMetas(opts ...func(*MetaQuery)) *AlertQuery
- func (aq *AlertQuery) WithOwner(opts ...func(*MachineQuery)) *AlertQuery
- type AlertSelect
- func (s *AlertSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlertSelect) BoolX(ctx context.Context) bool
- func (s *AlertSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AlertSelect) BoolsX(ctx context.Context) []bool
- func (s *AlertSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlertSelect) Float64X(ctx context.Context) float64
- func (s *AlertSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlertSelect) Float64sX(ctx context.Context) []float64
- func (s *AlertSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AlertSelect) IntX(ctx context.Context) int
- func (s *AlertSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AlertSelect) IntsX(ctx context.Context) []int
- func (as *AlertSelect) Scan(ctx context.Context, v any) error
- func (s *AlertSelect) ScanX(ctx context.Context, v any)
- func (s *AlertSelect) String(ctx context.Context) (_ string, err error)
- func (s *AlertSelect) StringX(ctx context.Context) string
- func (s *AlertSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AlertSelect) StringsX(ctx context.Context) []string
- type AlertUpdate
- func (au *AlertUpdate) AddCapacity(i int32) *AlertUpdate
- func (au *AlertUpdate) AddDecisionIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) AddDecisions(d ...*Decision) *AlertUpdate
- func (au *AlertUpdate) AddEventIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) AddEvents(e ...*Event) *AlertUpdate
- func (au *AlertUpdate) AddEventsCount(i int32) *AlertUpdate
- func (au *AlertUpdate) AddMetaIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) AddMetas(m ...*Meta) *AlertUpdate
- func (au *AlertUpdate) AddSourceLatitude(f float32) *AlertUpdate
- func (au *AlertUpdate) AddSourceLongitude(f float32) *AlertUpdate
- func (au *AlertUpdate) ClearBucketId() *AlertUpdate
- func (au *AlertUpdate) ClearCapacity() *AlertUpdate
- func (au *AlertUpdate) ClearCreatedAt() *AlertUpdate
- func (au *AlertUpdate) ClearDecisions() *AlertUpdate
- func (au *AlertUpdate) ClearEvents() *AlertUpdate
- func (au *AlertUpdate) ClearEventsCount() *AlertUpdate
- func (au *AlertUpdate) ClearLeakSpeed() *AlertUpdate
- func (au *AlertUpdate) ClearMessage() *AlertUpdate
- func (au *AlertUpdate) ClearMetas() *AlertUpdate
- func (au *AlertUpdate) ClearOwner() *AlertUpdate
- func (au *AlertUpdate) ClearScenarioHash() *AlertUpdate
- func (au *AlertUpdate) ClearScenarioVersion() *AlertUpdate
- func (au *AlertUpdate) ClearSourceAsName() *AlertUpdate
- func (au *AlertUpdate) ClearSourceAsNumber() *AlertUpdate
- func (au *AlertUpdate) ClearSourceCountry() *AlertUpdate
- func (au *AlertUpdate) ClearSourceIp() *AlertUpdate
- func (au *AlertUpdate) ClearSourceLatitude() *AlertUpdate
- func (au *AlertUpdate) ClearSourceLongitude() *AlertUpdate
- func (au *AlertUpdate) ClearSourceRange() *AlertUpdate
- func (au *AlertUpdate) ClearSourceScope() *AlertUpdate
- func (au *AlertUpdate) ClearSourceValue() *AlertUpdate
- func (au *AlertUpdate) ClearStartedAt() *AlertUpdate
- func (au *AlertUpdate) ClearStoppedAt() *AlertUpdate
- func (au *AlertUpdate) ClearUUID() *AlertUpdate
- func (au *AlertUpdate) ClearUpdatedAt() *AlertUpdate
- func (au *AlertUpdate) Exec(ctx context.Context) error
- func (au *AlertUpdate) ExecX(ctx context.Context)
- func (au *AlertUpdate) Mutation() *AlertMutation
- func (au *AlertUpdate) RemoveDecisionIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) RemoveDecisions(d ...*Decision) *AlertUpdate
- func (au *AlertUpdate) RemoveEventIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) RemoveEvents(e ...*Event) *AlertUpdate
- func (au *AlertUpdate) RemoveMetaIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) RemoveMetas(m ...*Meta) *AlertUpdate
- func (au *AlertUpdate) Save(ctx context.Context) (int, error)
- func (au *AlertUpdate) SaveX(ctx context.Context) int
- func (au *AlertUpdate) SetBucketId(s string) *AlertUpdate
- func (au *AlertUpdate) SetCapacity(i int32) *AlertUpdate
- func (au *AlertUpdate) SetCreatedAt(t time.Time) *AlertUpdate
- func (au *AlertUpdate) SetEventsCount(i int32) *AlertUpdate
- func (au *AlertUpdate) SetLeakSpeed(s string) *AlertUpdate
- func (au *AlertUpdate) SetMessage(s string) *AlertUpdate
- func (au *AlertUpdate) SetNillableBucketId(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableCapacity(i *int32) *AlertUpdate
- func (au *AlertUpdate) SetNillableEventsCount(i *int32) *AlertUpdate
- func (au *AlertUpdate) SetNillableLeakSpeed(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableMessage(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableOwnerID(id *int) *AlertUpdate
- func (au *AlertUpdate) SetNillableScenarioHash(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableScenarioVersion(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableSimulated(b *bool) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceAsName(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceAsNumber(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceCountry(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceIp(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceLatitude(f *float32) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceLongitude(f *float32) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceRange(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceScope(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableSourceValue(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableStartedAt(t *time.Time) *AlertUpdate
- func (au *AlertUpdate) SetNillableStoppedAt(t *time.Time) *AlertUpdate
- func (au *AlertUpdate) SetNillableUUID(s *string) *AlertUpdate
- func (au *AlertUpdate) SetOwner(m *Machine) *AlertUpdate
- func (au *AlertUpdate) SetOwnerID(id int) *AlertUpdate
- func (au *AlertUpdate) SetScenario(s string) *AlertUpdate
- func (au *AlertUpdate) SetScenarioHash(s string) *AlertUpdate
- func (au *AlertUpdate) SetScenarioVersion(s string) *AlertUpdate
- func (au *AlertUpdate) SetSimulated(b bool) *AlertUpdate
- func (au *AlertUpdate) SetSourceAsName(s string) *AlertUpdate
- func (au *AlertUpdate) SetSourceAsNumber(s string) *AlertUpdate
- func (au *AlertUpdate) SetSourceCountry(s string) *AlertUpdate
- func (au *AlertUpdate) SetSourceIp(s string) *AlertUpdate
- func (au *AlertUpdate) SetSourceLatitude(f float32) *AlertUpdate
- func (au *AlertUpdate) SetSourceLongitude(f float32) *AlertUpdate
- func (au *AlertUpdate) SetSourceRange(s string) *AlertUpdate
- func (au *AlertUpdate) SetSourceScope(s string) *AlertUpdate
- func (au *AlertUpdate) SetSourceValue(s string) *AlertUpdate
- func (au *AlertUpdate) SetStartedAt(t time.Time) *AlertUpdate
- func (au *AlertUpdate) SetStoppedAt(t time.Time) *AlertUpdate
- func (au *AlertUpdate) SetUUID(s string) *AlertUpdate
- func (au *AlertUpdate) SetUpdatedAt(t time.Time) *AlertUpdate
- func (au *AlertUpdate) Where(ps ...predicate.Alert) *AlertUpdate
- type AlertUpdateOne
- func (auo *AlertUpdateOne) AddCapacity(i int32) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddDecisionIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddDecisions(d ...*Decision) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddEventIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddEvents(e ...*Event) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddEventsCount(i int32) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddMetaIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddMetas(m ...*Meta) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddSourceLatitude(f float32) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddSourceLongitude(f float32) *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearBucketId() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearCapacity() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearCreatedAt() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearDecisions() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearEvents() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearEventsCount() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearLeakSpeed() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearMessage() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearMetas() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearOwner() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearScenarioHash() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearScenarioVersion() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceAsName() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceAsNumber() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceCountry() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceIp() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceLatitude() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceLongitude() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceRange() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceScope() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearSourceValue() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearStartedAt() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearStoppedAt() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearUUID() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearUpdatedAt() *AlertUpdateOne
- func (auo *AlertUpdateOne) Exec(ctx context.Context) error
- func (auo *AlertUpdateOne) ExecX(ctx context.Context)
- func (auo *AlertUpdateOne) Mutation() *AlertMutation
- func (auo *AlertUpdateOne) RemoveDecisionIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveDecisions(d ...*Decision) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveEventIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveEvents(e ...*Event) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveMetaIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveMetas(m ...*Meta) *AlertUpdateOne
- func (auo *AlertUpdateOne) Save(ctx context.Context) (*Alert, error)
- func (auo *AlertUpdateOne) SaveX(ctx context.Context) *Alert
- func (auo *AlertUpdateOne) Select(field string, fields ...string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetBucketId(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetCapacity(i int32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetCreatedAt(t time.Time) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetEventsCount(i int32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetLeakSpeed(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetMessage(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableBucketId(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableCapacity(i *int32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableEventsCount(i *int32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableLeakSpeed(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableMessage(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableOwnerID(id *int) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableScenarioHash(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableScenarioVersion(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSimulated(b *bool) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceAsName(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceAsNumber(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceCountry(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceIp(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceLatitude(f *float32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceLongitude(f *float32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceRange(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceScope(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableSourceValue(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableStartedAt(t *time.Time) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableStoppedAt(t *time.Time) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableUUID(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetOwner(m *Machine) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetOwnerID(id int) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetScenario(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetScenarioHash(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetScenarioVersion(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSimulated(b bool) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceAsName(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceAsNumber(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceCountry(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceIp(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceLatitude(f float32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceLongitude(f float32) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceRange(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceScope(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetSourceValue(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetStartedAt(t time.Time) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetStoppedAt(t time.Time) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetUUID(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetUpdatedAt(t time.Time) *AlertUpdateOne
- type Alerts
- type Bouncer
- type BouncerClient
- func (c *BouncerClient) Create() *BouncerCreate
- func (c *BouncerClient) CreateBulk(builders ...*BouncerCreate) *BouncerCreateBulk
- func (c *BouncerClient) Delete() *BouncerDelete
- func (c *BouncerClient) DeleteOne(b *Bouncer) *BouncerDeleteOne
- func (c *BouncerClient) DeleteOneID(id int) *BouncerDeleteOne
- func (c *BouncerClient) Get(ctx context.Context, id int) (*Bouncer, error)
- func (c *BouncerClient) GetX(ctx context.Context, id int) *Bouncer
- func (c *BouncerClient) Hooks() []Hook
- func (c *BouncerClient) Query() *BouncerQuery
- func (c *BouncerClient) Update() *BouncerUpdate
- func (c *BouncerClient) UpdateOne(b *Bouncer) *BouncerUpdateOne
- func (c *BouncerClient) UpdateOneID(id int) *BouncerUpdateOne
- func (c *BouncerClient) Use(hooks ...Hook)
- type BouncerCreate
- func (bc *BouncerCreate) Exec(ctx context.Context) error
- func (bc *BouncerCreate) ExecX(ctx context.Context)
- func (bc *BouncerCreate) Mutation() *BouncerMutation
- func (bc *BouncerCreate) Save(ctx context.Context) (*Bouncer, error)
- func (bc *BouncerCreate) SaveX(ctx context.Context) *Bouncer
- func (bc *BouncerCreate) SetAPIKey(s string) *BouncerCreate
- func (bc *BouncerCreate) SetAuthType(s string) *BouncerCreate
- func (bc *BouncerCreate) SetCreatedAt(t time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetIPAddress(s string) *BouncerCreate
- func (bc *BouncerCreate) SetLastPull(t time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetName(s string) *BouncerCreate
- func (bc *BouncerCreate) SetNillableAuthType(s *string) *BouncerCreate
- func (bc *BouncerCreate) SetNillableCreatedAt(t *time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetNillableIPAddress(s *string) *BouncerCreate
- func (bc *BouncerCreate) SetNillableLastPull(t *time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetNillableType(s *string) *BouncerCreate
- func (bc *BouncerCreate) SetNillableUntil(t *time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetNillableUpdatedAt(t *time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetNillableVersion(s *string) *BouncerCreate
- func (bc *BouncerCreate) SetRevoked(b bool) *BouncerCreate
- func (bc *BouncerCreate) SetType(s string) *BouncerCreate
- func (bc *BouncerCreate) SetUntil(t time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetUpdatedAt(t time.Time) *BouncerCreate
- func (bc *BouncerCreate) SetVersion(s string) *BouncerCreate
- type BouncerCreateBulk
- type BouncerDelete
- type BouncerDeleteOne
- type BouncerGroupBy
- func (bgb *BouncerGroupBy) Aggregate(fns ...AggregateFunc) *BouncerGroupBy
- func (s *BouncerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BouncerGroupBy) BoolX(ctx context.Context) bool
- func (s *BouncerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BouncerGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BouncerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BouncerGroupBy) Float64X(ctx context.Context) float64
- func (s *BouncerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BouncerGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BouncerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BouncerGroupBy) IntX(ctx context.Context) int
- func (s *BouncerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BouncerGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BouncerGroupBy) Scan(ctx context.Context, v any) error
- func (s *BouncerGroupBy) ScanX(ctx context.Context, v any)
- func (s *BouncerGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BouncerGroupBy) StringX(ctx context.Context) string
- func (s *BouncerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BouncerGroupBy) StringsX(ctx context.Context) []string
- type BouncerMutation
- func (m *BouncerMutation) APIKey() (r string, exists bool)
- func (m *BouncerMutation) AddField(name string, value ent.Value) error
- func (m *BouncerMutation) AddedEdges() []string
- func (m *BouncerMutation) AddedField(name string) (ent.Value, bool)
- func (m *BouncerMutation) AddedFields() []string
- func (m *BouncerMutation) AddedIDs(name string) []ent.Value
- func (m *BouncerMutation) AuthType() (r string, exists bool)
- func (m *BouncerMutation) ClearCreatedAt()
- func (m *BouncerMutation) ClearEdge(name string) error
- func (m *BouncerMutation) ClearField(name string) error
- func (m *BouncerMutation) ClearIPAddress()
- func (m *BouncerMutation) ClearType()
- func (m *BouncerMutation) ClearUntil()
- func (m *BouncerMutation) ClearUpdatedAt()
- func (m *BouncerMutation) ClearVersion()
- func (m *BouncerMutation) ClearedEdges() []string
- func (m *BouncerMutation) ClearedFields() []string
- func (m BouncerMutation) Client() *Client
- func (m *BouncerMutation) CreatedAt() (r time.Time, exists bool)
- func (m *BouncerMutation) CreatedAtCleared() bool
- func (m *BouncerMutation) EdgeCleared(name string) bool
- func (m *BouncerMutation) Field(name string) (ent.Value, bool)
- func (m *BouncerMutation) FieldCleared(name string) bool
- func (m *BouncerMutation) Fields() []string
- func (m *BouncerMutation) GetType() (r string, exists bool)
- func (m *BouncerMutation) ID() (id int, exists bool)
- func (m *BouncerMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BouncerMutation) IPAddress() (r string, exists bool)
- func (m *BouncerMutation) IPAddressCleared() bool
- func (m *BouncerMutation) LastPull() (r time.Time, exists bool)
- func (m *BouncerMutation) Name() (r string, exists bool)
- func (m *BouncerMutation) OldAPIKey(ctx context.Context) (v string, err error)
- func (m *BouncerMutation) OldAuthType(ctx context.Context) (v string, err error)
- func (m *BouncerMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *BouncerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BouncerMutation) OldIPAddress(ctx context.Context) (v string, err error)
- func (m *BouncerMutation) OldLastPull(ctx context.Context) (v time.Time, err error)
- func (m *BouncerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *BouncerMutation) OldRevoked(ctx context.Context) (v bool, err error)
- func (m *BouncerMutation) OldType(ctx context.Context) (v string, err error)
- func (m *BouncerMutation) OldUntil(ctx context.Context) (v time.Time, err error)
- func (m *BouncerMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *BouncerMutation) OldVersion(ctx context.Context) (v string, err error)
- func (m *BouncerMutation) Op() Op
- func (m *BouncerMutation) RemovedEdges() []string
- func (m *BouncerMutation) RemovedIDs(name string) []ent.Value
- func (m *BouncerMutation) ResetAPIKey()
- func (m *BouncerMutation) ResetAuthType()
- func (m *BouncerMutation) ResetCreatedAt()
- func (m *BouncerMutation) ResetEdge(name string) error
- func (m *BouncerMutation) ResetField(name string) error
- func (m *BouncerMutation) ResetIPAddress()
- func (m *BouncerMutation) ResetLastPull()
- func (m *BouncerMutation) ResetName()
- func (m *BouncerMutation) ResetRevoked()
- func (m *BouncerMutation) ResetType()
- func (m *BouncerMutation) ResetUntil()
- func (m *BouncerMutation) ResetUpdatedAt()
- func (m *BouncerMutation) ResetVersion()
- func (m *BouncerMutation) Revoked() (r bool, exists bool)
- func (m *BouncerMutation) SetAPIKey(s string)
- func (m *BouncerMutation) SetAuthType(s string)
- func (m *BouncerMutation) SetCreatedAt(t time.Time)
- func (m *BouncerMutation) SetField(name string, value ent.Value) error
- func (m *BouncerMutation) SetIPAddress(s string)
- func (m *BouncerMutation) SetLastPull(t time.Time)
- func (m *BouncerMutation) SetName(s string)
- func (m *BouncerMutation) SetRevoked(b bool)
- func (m *BouncerMutation) SetType(s string)
- func (m *BouncerMutation) SetUntil(t time.Time)
- func (m *BouncerMutation) SetUpdatedAt(t time.Time)
- func (m *BouncerMutation) SetVersion(s string)
- func (m BouncerMutation) Tx() (*Tx, error)
- func (m *BouncerMutation) Type() string
- func (m *BouncerMutation) TypeCleared() bool
- func (m *BouncerMutation) Until() (r time.Time, exists bool)
- func (m *BouncerMutation) UntilCleared() bool
- func (m *BouncerMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *BouncerMutation) UpdatedAtCleared() bool
- func (m *BouncerMutation) Version() (r string, exists bool)
- func (m *BouncerMutation) VersionCleared() bool
- func (m *BouncerMutation) Where(ps ...predicate.Bouncer)
- type BouncerQuery
- func (bq *BouncerQuery) All(ctx context.Context) ([]*Bouncer, error)
- func (bq *BouncerQuery) AllX(ctx context.Context) []*Bouncer
- func (bq *BouncerQuery) Clone() *BouncerQuery
- func (bq *BouncerQuery) Count(ctx context.Context) (int, error)
- func (bq *BouncerQuery) CountX(ctx context.Context) int
- func (bq *BouncerQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BouncerQuery) ExistX(ctx context.Context) bool
- func (bq *BouncerQuery) First(ctx context.Context) (*Bouncer, error)
- func (bq *BouncerQuery) FirstID(ctx context.Context) (id int, err error)
- func (bq *BouncerQuery) FirstIDX(ctx context.Context) int
- func (bq *BouncerQuery) FirstX(ctx context.Context) *Bouncer
- func (bq *BouncerQuery) GroupBy(field string, fields ...string) *BouncerGroupBy
- func (bq *BouncerQuery) IDs(ctx context.Context) ([]int, error)
- func (bq *BouncerQuery) IDsX(ctx context.Context) []int
- func (bq *BouncerQuery) Limit(limit int) *BouncerQuery
- func (bq *BouncerQuery) Offset(offset int) *BouncerQuery
- func (bq *BouncerQuery) Only(ctx context.Context) (*Bouncer, error)
- func (bq *BouncerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (bq *BouncerQuery) OnlyIDX(ctx context.Context) int
- func (bq *BouncerQuery) OnlyX(ctx context.Context) *Bouncer
- func (bq *BouncerQuery) Order(o ...OrderFunc) *BouncerQuery
- func (bq *BouncerQuery) Select(fields ...string) *BouncerSelect
- func (bq *BouncerQuery) Unique(unique bool) *BouncerQuery
- func (bq *BouncerQuery) Where(ps ...predicate.Bouncer) *BouncerQuery
- type BouncerSelect
- func (s *BouncerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BouncerSelect) BoolX(ctx context.Context) bool
- func (s *BouncerSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BouncerSelect) BoolsX(ctx context.Context) []bool
- func (s *BouncerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BouncerSelect) Float64X(ctx context.Context) float64
- func (s *BouncerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BouncerSelect) Float64sX(ctx context.Context) []float64
- func (s *BouncerSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BouncerSelect) IntX(ctx context.Context) int
- func (s *BouncerSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BouncerSelect) IntsX(ctx context.Context) []int
- func (bs *BouncerSelect) Scan(ctx context.Context, v any) error
- func (s *BouncerSelect) ScanX(ctx context.Context, v any)
- func (s *BouncerSelect) String(ctx context.Context) (_ string, err error)
- func (s *BouncerSelect) StringX(ctx context.Context) string
- func (s *BouncerSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BouncerSelect) StringsX(ctx context.Context) []string
- type BouncerUpdate
- func (bu *BouncerUpdate) ClearCreatedAt() *BouncerUpdate
- func (bu *BouncerUpdate) ClearIPAddress() *BouncerUpdate
- func (bu *BouncerUpdate) ClearType() *BouncerUpdate
- func (bu *BouncerUpdate) ClearUntil() *BouncerUpdate
- func (bu *BouncerUpdate) ClearUpdatedAt() *BouncerUpdate
- func (bu *BouncerUpdate) ClearVersion() *BouncerUpdate
- func (bu *BouncerUpdate) Exec(ctx context.Context) error
- func (bu *BouncerUpdate) ExecX(ctx context.Context)
- func (bu *BouncerUpdate) Mutation() *BouncerMutation
- func (bu *BouncerUpdate) Save(ctx context.Context) (int, error)
- func (bu *BouncerUpdate) SaveX(ctx context.Context) int
- func (bu *BouncerUpdate) SetAPIKey(s string) *BouncerUpdate
- func (bu *BouncerUpdate) SetAuthType(s string) *BouncerUpdate
- func (bu *BouncerUpdate) SetCreatedAt(t time.Time) *BouncerUpdate
- func (bu *BouncerUpdate) SetIPAddress(s string) *BouncerUpdate
- func (bu *BouncerUpdate) SetLastPull(t time.Time) *BouncerUpdate
- func (bu *BouncerUpdate) SetName(s string) *BouncerUpdate
- func (bu *BouncerUpdate) SetNillableAuthType(s *string) *BouncerUpdate
- func (bu *BouncerUpdate) SetNillableIPAddress(s *string) *BouncerUpdate
- func (bu *BouncerUpdate) SetNillableLastPull(t *time.Time) *BouncerUpdate
- func (bu *BouncerUpdate) SetNillableType(s *string) *BouncerUpdate
- func (bu *BouncerUpdate) SetNillableUntil(t *time.Time) *BouncerUpdate
- func (bu *BouncerUpdate) SetNillableVersion(s *string) *BouncerUpdate
- func (bu *BouncerUpdate) SetRevoked(b bool) *BouncerUpdate
- func (bu *BouncerUpdate) SetType(s string) *BouncerUpdate
- func (bu *BouncerUpdate) SetUntil(t time.Time) *BouncerUpdate
- func (bu *BouncerUpdate) SetUpdatedAt(t time.Time) *BouncerUpdate
- func (bu *BouncerUpdate) SetVersion(s string) *BouncerUpdate
- func (bu *BouncerUpdate) Where(ps ...predicate.Bouncer) *BouncerUpdate
- type BouncerUpdateOne
- func (buo *BouncerUpdateOne) ClearCreatedAt() *BouncerUpdateOne
- func (buo *BouncerUpdateOne) ClearIPAddress() *BouncerUpdateOne
- func (buo *BouncerUpdateOne) ClearType() *BouncerUpdateOne
- func (buo *BouncerUpdateOne) ClearUntil() *BouncerUpdateOne
- func (buo *BouncerUpdateOne) ClearUpdatedAt() *BouncerUpdateOne
- func (buo *BouncerUpdateOne) ClearVersion() *BouncerUpdateOne
- func (buo *BouncerUpdateOne) Exec(ctx context.Context) error
- func (buo *BouncerUpdateOne) ExecX(ctx context.Context)
- func (buo *BouncerUpdateOne) Mutation() *BouncerMutation
- func (buo *BouncerUpdateOne) Save(ctx context.Context) (*Bouncer, error)
- func (buo *BouncerUpdateOne) SaveX(ctx context.Context) *Bouncer
- func (buo *BouncerUpdateOne) Select(field string, fields ...string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetAPIKey(s string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetAuthType(s string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetCreatedAt(t time.Time) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetIPAddress(s string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetLastPull(t time.Time) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetName(s string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetNillableAuthType(s *string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetNillableIPAddress(s *string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetNillableLastPull(t *time.Time) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetNillableType(s *string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetNillableUntil(t *time.Time) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetNillableVersion(s *string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetRevoked(b bool) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetType(s string) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetUntil(t time.Time) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetUpdatedAt(t time.Time) *BouncerUpdateOne
- func (buo *BouncerUpdateOne) SetVersion(s string) *BouncerUpdateOne
- type Bouncers
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConfigItem
- type ConfigItemClient
- func (c *ConfigItemClient) Create() *ConfigItemCreate
- func (c *ConfigItemClient) CreateBulk(builders ...*ConfigItemCreate) *ConfigItemCreateBulk
- func (c *ConfigItemClient) Delete() *ConfigItemDelete
- func (c *ConfigItemClient) DeleteOne(ci *ConfigItem) *ConfigItemDeleteOne
- func (c *ConfigItemClient) DeleteOneID(id int) *ConfigItemDeleteOne
- func (c *ConfigItemClient) Get(ctx context.Context, id int) (*ConfigItem, error)
- func (c *ConfigItemClient) GetX(ctx context.Context, id int) *ConfigItem
- func (c *ConfigItemClient) Hooks() []Hook
- func (c *ConfigItemClient) Query() *ConfigItemQuery
- func (c *ConfigItemClient) Update() *ConfigItemUpdate
- func (c *ConfigItemClient) UpdateOne(ci *ConfigItem) *ConfigItemUpdateOne
- func (c *ConfigItemClient) UpdateOneID(id int) *ConfigItemUpdateOne
- func (c *ConfigItemClient) Use(hooks ...Hook)
- type ConfigItemCreate
- func (cic *ConfigItemCreate) Exec(ctx context.Context) error
- func (cic *ConfigItemCreate) ExecX(ctx context.Context)
- func (cic *ConfigItemCreate) Mutation() *ConfigItemMutation
- func (cic *ConfigItemCreate) Save(ctx context.Context) (*ConfigItem, error)
- func (cic *ConfigItemCreate) SaveX(ctx context.Context) *ConfigItem
- func (cic *ConfigItemCreate) SetCreatedAt(t time.Time) *ConfigItemCreate
- func (cic *ConfigItemCreate) SetName(s string) *ConfigItemCreate
- func (cic *ConfigItemCreate) SetNillableCreatedAt(t *time.Time) *ConfigItemCreate
- func (cic *ConfigItemCreate) SetNillableUpdatedAt(t *time.Time) *ConfigItemCreate
- func (cic *ConfigItemCreate) SetUpdatedAt(t time.Time) *ConfigItemCreate
- func (cic *ConfigItemCreate) SetValue(s string) *ConfigItemCreate
- type ConfigItemCreateBulk
- type ConfigItemDelete
- type ConfigItemDeleteOne
- type ConfigItemGroupBy
- func (cigb *ConfigItemGroupBy) Aggregate(fns ...AggregateFunc) *ConfigItemGroupBy
- func (cigb *ConfigItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (cigb *ConfigItemGroupBy) BoolX(ctx context.Context) bool
- func (cigb *ConfigItemGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (cigb *ConfigItemGroupBy) BoolsX(ctx context.Context) []bool
- func (cigb *ConfigItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (cigb *ConfigItemGroupBy) Float64X(ctx context.Context) float64
- func (cigb *ConfigItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (cigb *ConfigItemGroupBy) Float64sX(ctx context.Context) []float64
- func (cigb *ConfigItemGroupBy) Int(ctx context.Context) (_ int, err error)
- func (cigb *ConfigItemGroupBy) IntX(ctx context.Context) int
- func (cigb *ConfigItemGroupBy) Ints(ctx context.Context) ([]int, error)
- func (cigb *ConfigItemGroupBy) IntsX(ctx context.Context) []int
- func (cigb *ConfigItemGroupBy) Scan(ctx context.Context, v interface{}) error
- func (cigb *ConfigItemGroupBy) ScanX(ctx context.Context, v interface{})
- func (cigb *ConfigItemGroupBy) String(ctx context.Context) (_ string, err error)
- func (cigb *ConfigItemGroupBy) StringX(ctx context.Context) string
- func (cigb *ConfigItemGroupBy) Strings(ctx context.Context) ([]string, error)
- func (cigb *ConfigItemGroupBy) StringsX(ctx context.Context) []string
- type ConfigItemMutation
- func (m *ConfigItemMutation) AddField(name string, value ent.Value) error
- func (m *ConfigItemMutation) AddedEdges() []string
- func (m *ConfigItemMutation) AddedField(name string) (ent.Value, bool)
- func (m *ConfigItemMutation) AddedFields() []string
- func (m *ConfigItemMutation) AddedIDs(name string) []ent.Value
- func (m *ConfigItemMutation) ClearCreatedAt()
- func (m *ConfigItemMutation) ClearEdge(name string) error
- func (m *ConfigItemMutation) ClearField(name string) error
- func (m *ConfigItemMutation) ClearUpdatedAt()
- func (m *ConfigItemMutation) ClearedEdges() []string
- func (m *ConfigItemMutation) ClearedFields() []string
- func (m ConfigItemMutation) Client() *Client
- func (m *ConfigItemMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ConfigItemMutation) CreatedAtCleared() bool
- func (m *ConfigItemMutation) EdgeCleared(name string) bool
- func (m *ConfigItemMutation) Field(name string) (ent.Value, bool)
- func (m *ConfigItemMutation) FieldCleared(name string) bool
- func (m *ConfigItemMutation) Fields() []string
- func (m *ConfigItemMutation) ID() (id int, exists bool)
- func (m *ConfigItemMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ConfigItemMutation) Name() (r string, exists bool)
- func (m *ConfigItemMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ConfigItemMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ConfigItemMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ConfigItemMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *ConfigItemMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *ConfigItemMutation) Op() Op
- func (m *ConfigItemMutation) RemovedEdges() []string
- func (m *ConfigItemMutation) RemovedIDs(name string) []ent.Value
- func (m *ConfigItemMutation) ResetCreatedAt()
- func (m *ConfigItemMutation) ResetEdge(name string) error
- func (m *ConfigItemMutation) ResetField(name string) error
- func (m *ConfigItemMutation) ResetName()
- func (m *ConfigItemMutation) ResetUpdatedAt()
- func (m *ConfigItemMutation) ResetValue()
- func (m *ConfigItemMutation) SetCreatedAt(t time.Time)
- func (m *ConfigItemMutation) SetField(name string, value ent.Value) error
- func (m *ConfigItemMutation) SetName(s string)
- func (m *ConfigItemMutation) SetUpdatedAt(t time.Time)
- func (m *ConfigItemMutation) SetValue(s string)
- func (m ConfigItemMutation) Tx() (*Tx, error)
- func (m *ConfigItemMutation) Type() string
- func (m *ConfigItemMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ConfigItemMutation) UpdatedAtCleared() bool
- func (m *ConfigItemMutation) Value() (r string, exists bool)
- func (m *ConfigItemMutation) Where(ps ...predicate.ConfigItem)
- type ConfigItemQuery
- func (ciq *ConfigItemQuery) All(ctx context.Context) ([]*ConfigItem, error)
- func (ciq *ConfigItemQuery) AllX(ctx context.Context) []*ConfigItem
- func (ciq *ConfigItemQuery) Clone() *ConfigItemQuery
- func (ciq *ConfigItemQuery) Count(ctx context.Context) (int, error)
- func (ciq *ConfigItemQuery) CountX(ctx context.Context) int
- func (ciq *ConfigItemQuery) Exist(ctx context.Context) (bool, error)
- func (ciq *ConfigItemQuery) ExistX(ctx context.Context) bool
- func (ciq *ConfigItemQuery) First(ctx context.Context) (*ConfigItem, error)
- func (ciq *ConfigItemQuery) FirstID(ctx context.Context) (id int, err error)
- func (ciq *ConfigItemQuery) FirstIDX(ctx context.Context) int
- func (ciq *ConfigItemQuery) FirstX(ctx context.Context) *ConfigItem
- func (ciq *ConfigItemQuery) GroupBy(field string, fields ...string) *ConfigItemGroupBy
- func (ciq *ConfigItemQuery) IDs(ctx context.Context) ([]int, error)
- func (ciq *ConfigItemQuery) IDsX(ctx context.Context) []int
- func (ciq *ConfigItemQuery) Limit(limit int) *ConfigItemQuery
- func (ciq *ConfigItemQuery) Offset(offset int) *ConfigItemQuery
- func (ciq *ConfigItemQuery) Only(ctx context.Context) (*ConfigItem, error)
- func (ciq *ConfigItemQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ciq *ConfigItemQuery) OnlyIDX(ctx context.Context) int
- func (ciq *ConfigItemQuery) OnlyX(ctx context.Context) *ConfigItem
- func (ciq *ConfigItemQuery) Order(o ...OrderFunc) *ConfigItemQuery
- func (ciq *ConfigItemQuery) Select(fields ...string) *ConfigItemSelect
- func (ciq *ConfigItemQuery) Unique(unique bool) *ConfigItemQuery
- func (ciq *ConfigItemQuery) Where(ps ...predicate.ConfigItem) *ConfigItemQuery
- type ConfigItemSelect
- func (cis *ConfigItemSelect) Bool(ctx context.Context) (_ bool, err error)
- func (cis *ConfigItemSelect) BoolX(ctx context.Context) bool
- func (cis *ConfigItemSelect) Bools(ctx context.Context) ([]bool, error)
- func (cis *ConfigItemSelect) BoolsX(ctx context.Context) []bool
- func (cis *ConfigItemSelect) Float64(ctx context.Context) (_ float64, err error)
- func (cis *ConfigItemSelect) Float64X(ctx context.Context) float64
- func (cis *ConfigItemSelect) Float64s(ctx context.Context) ([]float64, error)
- func (cis *ConfigItemSelect) Float64sX(ctx context.Context) []float64
- func (cis *ConfigItemSelect) Int(ctx context.Context) (_ int, err error)
- func (cis *ConfigItemSelect) IntX(ctx context.Context) int
- func (cis *ConfigItemSelect) Ints(ctx context.Context) ([]int, error)
- func (cis *ConfigItemSelect) IntsX(ctx context.Context) []int
- func (cis *ConfigItemSelect) Scan(ctx context.Context, v interface{}) error
- func (cis *ConfigItemSelect) ScanX(ctx context.Context, v interface{})
- func (cis *ConfigItemSelect) String(ctx context.Context) (_ string, err error)
- func (cis *ConfigItemSelect) StringX(ctx context.Context) string
- func (cis *ConfigItemSelect) Strings(ctx context.Context) ([]string, error)
- func (cis *ConfigItemSelect) StringsX(ctx context.Context) []string
- type ConfigItemUpdate
- func (ciu *ConfigItemUpdate) ClearCreatedAt() *ConfigItemUpdate
- func (ciu *ConfigItemUpdate) ClearUpdatedAt() *ConfigItemUpdate
- func (ciu *ConfigItemUpdate) Exec(ctx context.Context) error
- func (ciu *ConfigItemUpdate) ExecX(ctx context.Context)
- func (ciu *ConfigItemUpdate) Mutation() *ConfigItemMutation
- func (ciu *ConfigItemUpdate) Save(ctx context.Context) (int, error)
- func (ciu *ConfigItemUpdate) SaveX(ctx context.Context) int
- func (ciu *ConfigItemUpdate) SetCreatedAt(t time.Time) *ConfigItemUpdate
- func (ciu *ConfigItemUpdate) SetName(s string) *ConfigItemUpdate
- func (ciu *ConfigItemUpdate) SetUpdatedAt(t time.Time) *ConfigItemUpdate
- func (ciu *ConfigItemUpdate) SetValue(s string) *ConfigItemUpdate
- func (ciu *ConfigItemUpdate) Where(ps ...predicate.ConfigItem) *ConfigItemUpdate
- type ConfigItemUpdateOne
- func (ciuo *ConfigItemUpdateOne) ClearCreatedAt() *ConfigItemUpdateOne
- func (ciuo *ConfigItemUpdateOne) ClearUpdatedAt() *ConfigItemUpdateOne
- func (ciuo *ConfigItemUpdateOne) Exec(ctx context.Context) error
- func (ciuo *ConfigItemUpdateOne) ExecX(ctx context.Context)
- func (ciuo *ConfigItemUpdateOne) Mutation() *ConfigItemMutation
- func (ciuo *ConfigItemUpdateOne) Save(ctx context.Context) (*ConfigItem, error)
- func (ciuo *ConfigItemUpdateOne) SaveX(ctx context.Context) *ConfigItem
- func (ciuo *ConfigItemUpdateOne) Select(field string, fields ...string) *ConfigItemUpdateOne
- func (ciuo *ConfigItemUpdateOne) SetCreatedAt(t time.Time) *ConfigItemUpdateOne
- func (ciuo *ConfigItemUpdateOne) SetName(s string) *ConfigItemUpdateOne
- func (ciuo *ConfigItemUpdateOne) SetUpdatedAt(t time.Time) *ConfigItemUpdateOne
- func (ciuo *ConfigItemUpdateOne) SetValue(s string) *ConfigItemUpdateOne
- type ConfigItems
- type ConstraintError
- type Decision
- type DecisionClient
- func (c *DecisionClient) Create() *DecisionCreate
- func (c *DecisionClient) CreateBulk(builders ...*DecisionCreate) *DecisionCreateBulk
- func (c *DecisionClient) Delete() *DecisionDelete
- func (c *DecisionClient) DeleteOne(d *Decision) *DecisionDeleteOne
- func (c *DecisionClient) DeleteOneID(id int) *DecisionDeleteOne
- func (c *DecisionClient) Get(ctx context.Context, id int) (*Decision, error)
- func (c *DecisionClient) GetX(ctx context.Context, id int) *Decision
- func (c *DecisionClient) Hooks() []Hook
- func (c *DecisionClient) Query() *DecisionQuery
- func (c *DecisionClient) QueryOwner(d *Decision) *AlertQuery
- func (c *DecisionClient) Update() *DecisionUpdate
- func (c *DecisionClient) UpdateOne(d *Decision) *DecisionUpdateOne
- func (c *DecisionClient) UpdateOneID(id int) *DecisionUpdateOne
- func (c *DecisionClient) Use(hooks ...Hook)
- type DecisionCreate
- func (dc *DecisionCreate) Exec(ctx context.Context) error
- func (dc *DecisionCreate) ExecX(ctx context.Context)
- func (dc *DecisionCreate) Mutation() *DecisionMutation
- func (dc *DecisionCreate) Save(ctx context.Context) (*Decision, error)
- func (dc *DecisionCreate) SaveX(ctx context.Context) *Decision
- func (dc *DecisionCreate) SetCreatedAt(t time.Time) *DecisionCreate
- func (dc *DecisionCreate) SetEndIP(i int64) *DecisionCreate
- func (dc *DecisionCreate) SetEndSuffix(i int64) *DecisionCreate
- func (dc *DecisionCreate) SetIPSize(i int64) *DecisionCreate
- func (dc *DecisionCreate) SetNillableCreatedAt(t *time.Time) *DecisionCreate
- func (dc *DecisionCreate) SetNillableEndIP(i *int64) *DecisionCreate
- func (dc *DecisionCreate) SetNillableEndSuffix(i *int64) *DecisionCreate
- func (dc *DecisionCreate) SetNillableIPSize(i *int64) *DecisionCreate
- func (dc *DecisionCreate) SetNillableOwnerID(id *int) *DecisionCreate
- func (dc *DecisionCreate) SetNillableSimulated(b *bool) *DecisionCreate
- func (dc *DecisionCreate) SetNillableStartIP(i *int64) *DecisionCreate
- func (dc *DecisionCreate) SetNillableStartSuffix(i *int64) *DecisionCreate
- func (dc *DecisionCreate) SetNillableUUID(s *string) *DecisionCreate
- func (dc *DecisionCreate) SetNillableUntil(t *time.Time) *DecisionCreate
- func (dc *DecisionCreate) SetNillableUpdatedAt(t *time.Time) *DecisionCreate
- func (dc *DecisionCreate) SetOrigin(s string) *DecisionCreate
- func (dc *DecisionCreate) SetOwner(a *Alert) *DecisionCreate
- func (dc *DecisionCreate) SetOwnerID(id int) *DecisionCreate
- func (dc *DecisionCreate) SetScenario(s string) *DecisionCreate
- func (dc *DecisionCreate) SetScope(s string) *DecisionCreate
- func (dc *DecisionCreate) SetSimulated(b bool) *DecisionCreate
- func (dc *DecisionCreate) SetStartIP(i int64) *DecisionCreate
- func (dc *DecisionCreate) SetStartSuffix(i int64) *DecisionCreate
- func (dc *DecisionCreate) SetType(s string) *DecisionCreate
- func (dc *DecisionCreate) SetUUID(s string) *DecisionCreate
- func (dc *DecisionCreate) SetUntil(t time.Time) *DecisionCreate
- func (dc *DecisionCreate) SetUpdatedAt(t time.Time) *DecisionCreate
- func (dc *DecisionCreate) SetValue(s string) *DecisionCreate
- type DecisionCreateBulk
- type DecisionDelete
- type DecisionDeleteOne
- type DecisionEdges
- type DecisionGroupBy
- func (dgb *DecisionGroupBy) Aggregate(fns ...AggregateFunc) *DecisionGroupBy
- func (s *DecisionGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DecisionGroupBy) BoolX(ctx context.Context) bool
- func (s *DecisionGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DecisionGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DecisionGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DecisionGroupBy) Float64X(ctx context.Context) float64
- func (s *DecisionGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DecisionGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DecisionGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DecisionGroupBy) IntX(ctx context.Context) int
- func (s *DecisionGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DecisionGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DecisionGroupBy) Scan(ctx context.Context, v any) error
- func (s *DecisionGroupBy) ScanX(ctx context.Context, v any)
- func (s *DecisionGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DecisionGroupBy) StringX(ctx context.Context) string
- func (s *DecisionGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DecisionGroupBy) StringsX(ctx context.Context) []string
- type DecisionMutation
- func (m *DecisionMutation) AddEndIP(i int64)
- func (m *DecisionMutation) AddEndSuffix(i int64)
- func (m *DecisionMutation) AddField(name string, value ent.Value) error
- func (m *DecisionMutation) AddIPSize(i int64)
- func (m *DecisionMutation) AddStartIP(i int64)
- func (m *DecisionMutation) AddStartSuffix(i int64)
- func (m *DecisionMutation) AddedEdges() []string
- func (m *DecisionMutation) AddedEndIP() (r int64, exists bool)
- func (m *DecisionMutation) AddedEndSuffix() (r int64, exists bool)
- func (m *DecisionMutation) AddedField(name string) (ent.Value, bool)
- func (m *DecisionMutation) AddedFields() []string
- func (m *DecisionMutation) AddedIDs(name string) []ent.Value
- func (m *DecisionMutation) AddedIPSize() (r int64, exists bool)
- func (m *DecisionMutation) AddedStartIP() (r int64, exists bool)
- func (m *DecisionMutation) AddedStartSuffix() (r int64, exists bool)
- func (m *DecisionMutation) ClearCreatedAt()
- func (m *DecisionMutation) ClearEdge(name string) error
- func (m *DecisionMutation) ClearEndIP()
- func (m *DecisionMutation) ClearEndSuffix()
- func (m *DecisionMutation) ClearField(name string) error
- func (m *DecisionMutation) ClearIPSize()
- func (m *DecisionMutation) ClearOwner()
- func (m *DecisionMutation) ClearStartIP()
- func (m *DecisionMutation) ClearStartSuffix()
- func (m *DecisionMutation) ClearUUID()
- func (m *DecisionMutation) ClearUntil()
- func (m *DecisionMutation) ClearUpdatedAt()
- func (m *DecisionMutation) ClearedEdges() []string
- func (m *DecisionMutation) ClearedFields() []string
- func (m DecisionMutation) Client() *Client
- func (m *DecisionMutation) CreatedAt() (r time.Time, exists bool)
- func (m *DecisionMutation) CreatedAtCleared() bool
- func (m *DecisionMutation) EdgeCleared(name string) bool
- func (m *DecisionMutation) EndIP() (r int64, exists bool)
- func (m *DecisionMutation) EndIPCleared() bool
- func (m *DecisionMutation) EndSuffix() (r int64, exists bool)
- func (m *DecisionMutation) EndSuffixCleared() bool
- func (m *DecisionMutation) Field(name string) (ent.Value, bool)
- func (m *DecisionMutation) FieldCleared(name string) bool
- func (m *DecisionMutation) Fields() []string
- func (m *DecisionMutation) GetType() (r string, exists bool)
- func (m *DecisionMutation) ID() (id int, exists bool)
- func (m *DecisionMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DecisionMutation) IPSize() (r int64, exists bool)
- func (m *DecisionMutation) IPSizeCleared() bool
- func (m *DecisionMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DecisionMutation) OldEndIP(ctx context.Context) (v int64, err error)
- func (m *DecisionMutation) OldEndSuffix(ctx context.Context) (v int64, err error)
- func (m *DecisionMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DecisionMutation) OldIPSize(ctx context.Context) (v int64, err error)
- func (m *DecisionMutation) OldOrigin(ctx context.Context) (v string, err error)
- func (m *DecisionMutation) OldScenario(ctx context.Context) (v string, err error)
- func (m *DecisionMutation) OldScope(ctx context.Context) (v string, err error)
- func (m *DecisionMutation) OldSimulated(ctx context.Context) (v bool, err error)
- func (m *DecisionMutation) OldStartIP(ctx context.Context) (v int64, err error)
- func (m *DecisionMutation) OldStartSuffix(ctx context.Context) (v int64, err error)
- func (m *DecisionMutation) OldType(ctx context.Context) (v string, err error)
- func (m *DecisionMutation) OldUUID(ctx context.Context) (v string, err error)
- func (m *DecisionMutation) OldUntil(ctx context.Context) (v *time.Time, err error)
- func (m *DecisionMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *DecisionMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *DecisionMutation) Op() Op
- func (m *DecisionMutation) Origin() (r string, exists bool)
- func (m *DecisionMutation) OwnerCleared() bool
- func (m *DecisionMutation) OwnerID() (id int, exists bool)
- func (m *DecisionMutation) OwnerIDs() (ids []int)
- func (m *DecisionMutation) RemovedEdges() []string
- func (m *DecisionMutation) RemovedIDs(name string) []ent.Value
- func (m *DecisionMutation) ResetCreatedAt()
- func (m *DecisionMutation) ResetEdge(name string) error
- func (m *DecisionMutation) ResetEndIP()
- func (m *DecisionMutation) ResetEndSuffix()
- func (m *DecisionMutation) ResetField(name string) error
- func (m *DecisionMutation) ResetIPSize()
- func (m *DecisionMutation) ResetOrigin()
- func (m *DecisionMutation) ResetOwner()
- func (m *DecisionMutation) ResetScenario()
- func (m *DecisionMutation) ResetScope()
- func (m *DecisionMutation) ResetSimulated()
- func (m *DecisionMutation) ResetStartIP()
- func (m *DecisionMutation) ResetStartSuffix()
- func (m *DecisionMutation) ResetType()
- func (m *DecisionMutation) ResetUUID()
- func (m *DecisionMutation) ResetUntil()
- func (m *DecisionMutation) ResetUpdatedAt()
- func (m *DecisionMutation) ResetValue()
- func (m *DecisionMutation) Scenario() (r string, exists bool)
- func (m *DecisionMutation) Scope() (r string, exists bool)
- func (m *DecisionMutation) SetCreatedAt(t time.Time)
- func (m *DecisionMutation) SetEndIP(i int64)
- func (m *DecisionMutation) SetEndSuffix(i int64)
- func (m *DecisionMutation) SetField(name string, value ent.Value) error
- func (m *DecisionMutation) SetIPSize(i int64)
- func (m *DecisionMutation) SetOrigin(s string)
- func (m *DecisionMutation) SetOwnerID(id int)
- func (m *DecisionMutation) SetScenario(s string)
- func (m *DecisionMutation) SetScope(s string)
- func (m *DecisionMutation) SetSimulated(b bool)
- func (m *DecisionMutation) SetStartIP(i int64)
- func (m *DecisionMutation) SetStartSuffix(i int64)
- func (m *DecisionMutation) SetType(s string)
- func (m *DecisionMutation) SetUUID(s string)
- func (m *DecisionMutation) SetUntil(t time.Time)
- func (m *DecisionMutation) SetUpdatedAt(t time.Time)
- func (m *DecisionMutation) SetValue(s string)
- func (m *DecisionMutation) Simulated() (r bool, exists bool)
- func (m *DecisionMutation) StartIP() (r int64, exists bool)
- func (m *DecisionMutation) StartIPCleared() bool
- func (m *DecisionMutation) StartSuffix() (r int64, exists bool)
- func (m *DecisionMutation) StartSuffixCleared() bool
- func (m DecisionMutation) Tx() (*Tx, error)
- func (m *DecisionMutation) Type() string
- func (m *DecisionMutation) UUID() (r string, exists bool)
- func (m *DecisionMutation) UUIDCleared() bool
- func (m *DecisionMutation) Until() (r time.Time, exists bool)
- func (m *DecisionMutation) UntilCleared() bool
- func (m *DecisionMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *DecisionMutation) UpdatedAtCleared() bool
- func (m *DecisionMutation) Value() (r string, exists bool)
- func (m *DecisionMutation) Where(ps ...predicate.Decision)
- type DecisionQuery
- func (dq *DecisionQuery) All(ctx context.Context) ([]*Decision, error)
- func (dq *DecisionQuery) AllX(ctx context.Context) []*Decision
- func (dq *DecisionQuery) Clone() *DecisionQuery
- func (dq *DecisionQuery) Count(ctx context.Context) (int, error)
- func (dq *DecisionQuery) CountX(ctx context.Context) int
- func (dq *DecisionQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DecisionQuery) ExistX(ctx context.Context) bool
- func (dq *DecisionQuery) First(ctx context.Context) (*Decision, error)
- func (dq *DecisionQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DecisionQuery) FirstIDX(ctx context.Context) int
- func (dq *DecisionQuery) FirstX(ctx context.Context) *Decision
- func (dq *DecisionQuery) GroupBy(field string, fields ...string) *DecisionGroupBy
- func (dq *DecisionQuery) IDs(ctx context.Context) ([]int, error)
- func (dq *DecisionQuery) IDsX(ctx context.Context) []int
- func (dq *DecisionQuery) Limit(limit int) *DecisionQuery
- func (dq *DecisionQuery) Offset(offset int) *DecisionQuery
- func (dq *DecisionQuery) Only(ctx context.Context) (*Decision, error)
- func (dq *DecisionQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DecisionQuery) OnlyIDX(ctx context.Context) int
- func (dq *DecisionQuery) OnlyX(ctx context.Context) *Decision
- func (dq *DecisionQuery) Order(o ...OrderFunc) *DecisionQuery
- func (dq *DecisionQuery) QueryOwner() *AlertQuery
- func (dq *DecisionQuery) Select(fields ...string) *DecisionSelect
- func (dq *DecisionQuery) Unique(unique bool) *DecisionQuery
- func (dq *DecisionQuery) Where(ps ...predicate.Decision) *DecisionQuery
- func (dq *DecisionQuery) WithOwner(opts ...func(*AlertQuery)) *DecisionQuery
- type DecisionSelect
- func (s *DecisionSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DecisionSelect) BoolX(ctx context.Context) bool
- func (s *DecisionSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DecisionSelect) BoolsX(ctx context.Context) []bool
- func (s *DecisionSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DecisionSelect) Float64X(ctx context.Context) float64
- func (s *DecisionSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DecisionSelect) Float64sX(ctx context.Context) []float64
- func (s *DecisionSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DecisionSelect) IntX(ctx context.Context) int
- func (s *DecisionSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DecisionSelect) IntsX(ctx context.Context) []int
- func (ds *DecisionSelect) Scan(ctx context.Context, v any) error
- func (s *DecisionSelect) ScanX(ctx context.Context, v any)
- func (s *DecisionSelect) String(ctx context.Context) (_ string, err error)
- func (s *DecisionSelect) StringX(ctx context.Context) string
- func (s *DecisionSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DecisionSelect) StringsX(ctx context.Context) []string
- type DecisionUpdate
- func (du *DecisionUpdate) AddEndIP(i int64) *DecisionUpdate
- func (du *DecisionUpdate) AddEndSuffix(i int64) *DecisionUpdate
- func (du *DecisionUpdate) AddIPSize(i int64) *DecisionUpdate
- func (du *DecisionUpdate) AddStartIP(i int64) *DecisionUpdate
- func (du *DecisionUpdate) AddStartSuffix(i int64) *DecisionUpdate
- func (du *DecisionUpdate) ClearCreatedAt() *DecisionUpdate
- func (du *DecisionUpdate) ClearEndIP() *DecisionUpdate
- func (du *DecisionUpdate) ClearEndSuffix() *DecisionUpdate
- func (du *DecisionUpdate) ClearIPSize() *DecisionUpdate
- func (du *DecisionUpdate) ClearOwner() *DecisionUpdate
- func (du *DecisionUpdate) ClearStartIP() *DecisionUpdate
- func (du *DecisionUpdate) ClearStartSuffix() *DecisionUpdate
- func (du *DecisionUpdate) ClearUUID() *DecisionUpdate
- func (du *DecisionUpdate) ClearUntil() *DecisionUpdate
- func (du *DecisionUpdate) ClearUpdatedAt() *DecisionUpdate
- func (du *DecisionUpdate) Exec(ctx context.Context) error
- func (du *DecisionUpdate) ExecX(ctx context.Context)
- func (du *DecisionUpdate) Mutation() *DecisionMutation
- func (du *DecisionUpdate) Save(ctx context.Context) (int, error)
- func (du *DecisionUpdate) SaveX(ctx context.Context) int
- func (du *DecisionUpdate) SetCreatedAt(t time.Time) *DecisionUpdate
- func (du *DecisionUpdate) SetEndIP(i int64) *DecisionUpdate
- func (du *DecisionUpdate) SetEndSuffix(i int64) *DecisionUpdate
- func (du *DecisionUpdate) SetIPSize(i int64) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableEndIP(i *int64) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableEndSuffix(i *int64) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableIPSize(i *int64) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableOwnerID(id *int) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableSimulated(b *bool) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableStartIP(i *int64) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableStartSuffix(i *int64) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableUUID(s *string) *DecisionUpdate
- func (du *DecisionUpdate) SetNillableUntil(t *time.Time) *DecisionUpdate
- func (du *DecisionUpdate) SetOrigin(s string) *DecisionUpdate
- func (du *DecisionUpdate) SetOwner(a *Alert) *DecisionUpdate
- func (du *DecisionUpdate) SetOwnerID(id int) *DecisionUpdate
- func (du *DecisionUpdate) SetScenario(s string) *DecisionUpdate
- func (du *DecisionUpdate) SetScope(s string) *DecisionUpdate
- func (du *DecisionUpdate) SetSimulated(b bool) *DecisionUpdate
- func (du *DecisionUpdate) SetStartIP(i int64) *DecisionUpdate
- func (du *DecisionUpdate) SetStartSuffix(i int64) *DecisionUpdate
- func (du *DecisionUpdate) SetType(s string) *DecisionUpdate
- func (du *DecisionUpdate) SetUUID(s string) *DecisionUpdate
- func (du *DecisionUpdate) SetUntil(t time.Time) *DecisionUpdate
- func (du *DecisionUpdate) SetUpdatedAt(t time.Time) *DecisionUpdate
- func (du *DecisionUpdate) SetValue(s string) *DecisionUpdate
- func (du *DecisionUpdate) Where(ps ...predicate.Decision) *DecisionUpdate
- type DecisionUpdateOne
- func (duo *DecisionUpdateOne) AddEndIP(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) AddEndSuffix(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) AddIPSize(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) AddStartIP(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) AddStartSuffix(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearCreatedAt() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearEndIP() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearEndSuffix() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearIPSize() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearOwner() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearStartIP() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearStartSuffix() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearUUID() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearUntil() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) ClearUpdatedAt() *DecisionUpdateOne
- func (duo *DecisionUpdateOne) Exec(ctx context.Context) error
- func (duo *DecisionUpdateOne) ExecX(ctx context.Context)
- func (duo *DecisionUpdateOne) Mutation() *DecisionMutation
- func (duo *DecisionUpdateOne) Save(ctx context.Context) (*Decision, error)
- func (duo *DecisionUpdateOne) SaveX(ctx context.Context) *Decision
- func (duo *DecisionUpdateOne) Select(field string, fields ...string) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetCreatedAt(t time.Time) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetEndIP(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetEndSuffix(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetIPSize(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableEndIP(i *int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableEndSuffix(i *int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableIPSize(i *int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableOwnerID(id *int) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableSimulated(b *bool) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableStartIP(i *int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableStartSuffix(i *int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableUUID(s *string) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetNillableUntil(t *time.Time) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetOrigin(s string) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetOwner(a *Alert) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetOwnerID(id int) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetScenario(s string) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetScope(s string) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetSimulated(b bool) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetStartIP(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetStartSuffix(i int64) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetType(s string) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetUUID(s string) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetUntil(t time.Time) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetUpdatedAt(t time.Time) *DecisionUpdateOne
- func (duo *DecisionUpdateOne) SetValue(s string) *DecisionUpdateOne
- type Decisions
- type Event
- type EventClient
- func (c *EventClient) Create() *EventCreate
- func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
- func (c *EventClient) Delete() *EventDelete
- func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
- func (c *EventClient) DeleteOneID(id int) *EventDeleteOne
- func (c *EventClient) Get(ctx context.Context, id int) (*Event, error)
- func (c *EventClient) GetX(ctx context.Context, id int) *Event
- func (c *EventClient) Hooks() []Hook
- func (c *EventClient) Query() *EventQuery
- func (c *EventClient) QueryOwner(e *Event) *AlertQuery
- func (c *EventClient) Update() *EventUpdate
- func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
- func (c *EventClient) UpdateOneID(id int) *EventUpdateOne
- func (c *EventClient) Use(hooks ...Hook)
- type EventCreate
- func (ec *EventCreate) Exec(ctx context.Context) error
- func (ec *EventCreate) ExecX(ctx context.Context)
- func (ec *EventCreate) Mutation() *EventMutation
- func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
- func (ec *EventCreate) SaveX(ctx context.Context) *Event
- func (ec *EventCreate) SetCreatedAt(t time.Time) *EventCreate
- func (ec *EventCreate) SetNillableCreatedAt(t *time.Time) *EventCreate
- func (ec *EventCreate) SetNillableOwnerID(id *int) *EventCreate
- func (ec *EventCreate) SetNillableUpdatedAt(t *time.Time) *EventCreate
- func (ec *EventCreate) SetOwner(a *Alert) *EventCreate
- func (ec *EventCreate) SetOwnerID(id int) *EventCreate
- func (ec *EventCreate) SetSerialized(s string) *EventCreate
- func (ec *EventCreate) SetTime(t time.Time) *EventCreate
- func (ec *EventCreate) SetUpdatedAt(t time.Time) *EventCreate
- type EventCreateBulk
- type EventDelete
- type EventDeleteOne
- type EventEdges
- type EventGroupBy
- func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
- func (s *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EventGroupBy) BoolX(ctx context.Context) bool
- func (s *EventGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EventGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EventGroupBy) Float64X(ctx context.Context) float64
- func (s *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EventGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EventGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EventGroupBy) IntX(ctx context.Context) int
- func (s *EventGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EventGroupBy) IntsX(ctx context.Context) []int
- func (egb *EventGroupBy) Scan(ctx context.Context, v any) error
- func (s *EventGroupBy) ScanX(ctx context.Context, v any)
- func (s *EventGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EventGroupBy) StringX(ctx context.Context) string
- func (s *EventGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EventGroupBy) StringsX(ctx context.Context) []string
- type EventMutation
- func (m *EventMutation) AddField(name string, value ent.Value) error
- func (m *EventMutation) AddedEdges() []string
- func (m *EventMutation) AddedField(name string) (ent.Value, bool)
- func (m *EventMutation) AddedFields() []string
- func (m *EventMutation) AddedIDs(name string) []ent.Value
- func (m *EventMutation) ClearCreatedAt()
- func (m *EventMutation) ClearEdge(name string) error
- func (m *EventMutation) ClearField(name string) error
- func (m *EventMutation) ClearOwner()
- func (m *EventMutation) ClearUpdatedAt()
- func (m *EventMutation) ClearedEdges() []string
- func (m *EventMutation) ClearedFields() []string
- func (m EventMutation) Client() *Client
- func (m *EventMutation) CreatedAt() (r time.Time, exists bool)
- func (m *EventMutation) CreatedAtCleared() bool
- func (m *EventMutation) EdgeCleared(name string) bool
- func (m *EventMutation) Field(name string) (ent.Value, bool)
- func (m *EventMutation) FieldCleared(name string) bool
- func (m *EventMutation) Fields() []string
- func (m *EventMutation) ID() (id int, exists bool)
- func (m *EventMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EventMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *EventMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EventMutation) OldSerialized(ctx context.Context) (v string, err error)
- func (m *EventMutation) OldTime(ctx context.Context) (v time.Time, err error)
- func (m *EventMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *EventMutation) Op() Op
- func (m *EventMutation) OwnerCleared() bool
- func (m *EventMutation) OwnerID() (id int, exists bool)
- func (m *EventMutation) OwnerIDs() (ids []int)
- func (m *EventMutation) RemovedEdges() []string
- func (m *EventMutation) RemovedIDs(name string) []ent.Value
- func (m *EventMutation) ResetCreatedAt()
- func (m *EventMutation) ResetEdge(name string) error
- func (m *EventMutation) ResetField(name string) error
- func (m *EventMutation) ResetOwner()
- func (m *EventMutation) ResetSerialized()
- func (m *EventMutation) ResetTime()
- func (m *EventMutation) ResetUpdatedAt()
- func (m *EventMutation) Serialized() (r string, exists bool)
- func (m *EventMutation) SetCreatedAt(t time.Time)
- func (m *EventMutation) SetField(name string, value ent.Value) error
- func (m *EventMutation) SetOwnerID(id int)
- func (m *EventMutation) SetSerialized(s string)
- func (m *EventMutation) SetTime(t time.Time)
- func (m *EventMutation) SetUpdatedAt(t time.Time)
- func (m *EventMutation) Time() (r time.Time, exists bool)
- func (m EventMutation) Tx() (*Tx, error)
- func (m *EventMutation) Type() string
- func (m *EventMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *EventMutation) UpdatedAtCleared() bool
- func (m *EventMutation) Where(ps ...predicate.Event)
- type EventQuery
- func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
- func (eq *EventQuery) AllX(ctx context.Context) []*Event
- func (eq *EventQuery) Clone() *EventQuery
- func (eq *EventQuery) Count(ctx context.Context) (int, error)
- func (eq *EventQuery) CountX(ctx context.Context) int
- func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EventQuery) ExistX(ctx context.Context) bool
- func (eq *EventQuery) First(ctx context.Context) (*Event, error)
- func (eq *EventQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *EventQuery) FirstIDX(ctx context.Context) int
- func (eq *EventQuery) FirstX(ctx context.Context) *Event
- func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
- func (eq *EventQuery) IDs(ctx context.Context) ([]int, error)
- func (eq *EventQuery) IDsX(ctx context.Context) []int
- func (eq *EventQuery) Limit(limit int) *EventQuery
- func (eq *EventQuery) Offset(offset int) *EventQuery
- func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
- func (eq *EventQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *EventQuery) OnlyIDX(ctx context.Context) int
- func (eq *EventQuery) OnlyX(ctx context.Context) *Event
- func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery
- func (eq *EventQuery) QueryOwner() *AlertQuery
- func (eq *EventQuery) Select(fields ...string) *EventSelect
- func (eq *EventQuery) Unique(unique bool) *EventQuery
- func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
- func (eq *EventQuery) WithOwner(opts ...func(*AlertQuery)) *EventQuery
- type EventSelect
- func (s *EventSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EventSelect) BoolX(ctx context.Context) bool
- func (s *EventSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EventSelect) BoolsX(ctx context.Context) []bool
- func (s *EventSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EventSelect) Float64X(ctx context.Context) float64
- func (s *EventSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EventSelect) Float64sX(ctx context.Context) []float64
- func (s *EventSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EventSelect) IntX(ctx context.Context) int
- func (s *EventSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EventSelect) IntsX(ctx context.Context) []int
- func (es *EventSelect) Scan(ctx context.Context, v any) error
- func (s *EventSelect) ScanX(ctx context.Context, v any)
- func (s *EventSelect) String(ctx context.Context) (_ string, err error)
- func (s *EventSelect) StringX(ctx context.Context) string
- func (s *EventSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EventSelect) StringsX(ctx context.Context) []string
- type EventUpdate
- func (eu *EventUpdate) ClearCreatedAt() *EventUpdate
- func (eu *EventUpdate) ClearOwner() *EventUpdate
- func (eu *EventUpdate) ClearUpdatedAt() *EventUpdate
- func (eu *EventUpdate) Exec(ctx context.Context) error
- func (eu *EventUpdate) ExecX(ctx context.Context)
- func (eu *EventUpdate) Mutation() *EventMutation
- func (eu *EventUpdate) Save(ctx context.Context) (int, error)
- func (eu *EventUpdate) SaveX(ctx context.Context) int
- func (eu *EventUpdate) SetCreatedAt(t time.Time) *EventUpdate
- func (eu *EventUpdate) SetNillableOwnerID(id *int) *EventUpdate
- func (eu *EventUpdate) SetOwner(a *Alert) *EventUpdate
- func (eu *EventUpdate) SetOwnerID(id int) *EventUpdate
- func (eu *EventUpdate) SetSerialized(s string) *EventUpdate
- func (eu *EventUpdate) SetTime(t time.Time) *EventUpdate
- func (eu *EventUpdate) SetUpdatedAt(t time.Time) *EventUpdate
- func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
- type EventUpdateOne
- func (euo *EventUpdateOne) ClearCreatedAt() *EventUpdateOne
- func (euo *EventUpdateOne) ClearOwner() *EventUpdateOne
- func (euo *EventUpdateOne) ClearUpdatedAt() *EventUpdateOne
- func (euo *EventUpdateOne) Exec(ctx context.Context) error
- func (euo *EventUpdateOne) ExecX(ctx context.Context)
- func (euo *EventUpdateOne) Mutation() *EventMutation
- func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
- func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
- func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
- func (euo *EventUpdateOne) SetCreatedAt(t time.Time) *EventUpdateOne
- func (euo *EventUpdateOne) SetNillableOwnerID(id *int) *EventUpdateOne
- func (euo *EventUpdateOne) SetOwner(a *Alert) *EventUpdateOne
- func (euo *EventUpdateOne) SetOwnerID(id int) *EventUpdateOne
- func (euo *EventUpdateOne) SetSerialized(s string) *EventUpdateOne
- func (euo *EventUpdateOne) SetTime(t time.Time) *EventUpdateOne
- func (euo *EventUpdateOne) SetUpdatedAt(t time.Time) *EventUpdateOne
- type Events
- type Hook
- type Machine
- type MachineClient
- func (c *MachineClient) Create() *MachineCreate
- func (c *MachineClient) CreateBulk(builders ...*MachineCreate) *MachineCreateBulk
- func (c *MachineClient) Delete() *MachineDelete
- func (c *MachineClient) DeleteOne(m *Machine) *MachineDeleteOne
- func (c *MachineClient) DeleteOneID(id int) *MachineDeleteOne
- func (c *MachineClient) Get(ctx context.Context, id int) (*Machine, error)
- func (c *MachineClient) GetX(ctx context.Context, id int) *Machine
- func (c *MachineClient) Hooks() []Hook
- func (c *MachineClient) Query() *MachineQuery
- func (c *MachineClient) QueryAlerts(m *Machine) *AlertQuery
- func (c *MachineClient) Update() *MachineUpdate
- func (c *MachineClient) UpdateOne(m *Machine) *MachineUpdateOne
- func (c *MachineClient) UpdateOneID(id int) *MachineUpdateOne
- func (c *MachineClient) Use(hooks ...Hook)
- type MachineCreate
- func (mc *MachineCreate) AddAlertIDs(ids ...int) *MachineCreate
- func (mc *MachineCreate) AddAlerts(a ...*Alert) *MachineCreate
- func (mc *MachineCreate) Exec(ctx context.Context) error
- func (mc *MachineCreate) ExecX(ctx context.Context)
- func (mc *MachineCreate) Mutation() *MachineMutation
- func (mc *MachineCreate) Save(ctx context.Context) (*Machine, error)
- func (mc *MachineCreate) SaveX(ctx context.Context) *Machine
- func (mc *MachineCreate) SetAuthType(s string) *MachineCreate
- func (mc *MachineCreate) SetCreatedAt(t time.Time) *MachineCreate
- func (mc *MachineCreate) SetIpAddress(s string) *MachineCreate
- func (mc *MachineCreate) SetIsValidated(b bool) *MachineCreate
- func (mc *MachineCreate) SetLastHeartbeat(t time.Time) *MachineCreate
- func (mc *MachineCreate) SetLastPush(t time.Time) *MachineCreate
- func (mc *MachineCreate) SetMachineId(s string) *MachineCreate
- func (mc *MachineCreate) SetNillableAuthType(s *string) *MachineCreate
- func (mc *MachineCreate) SetNillableCreatedAt(t *time.Time) *MachineCreate
- func (mc *MachineCreate) SetNillableIsValidated(b *bool) *MachineCreate
- func (mc *MachineCreate) SetNillableLastHeartbeat(t *time.Time) *MachineCreate
- func (mc *MachineCreate) SetNillableLastPush(t *time.Time) *MachineCreate
- func (mc *MachineCreate) SetNillableScenarios(s *string) *MachineCreate
- func (mc *MachineCreate) SetNillableStatus(s *string) *MachineCreate
- func (mc *MachineCreate) SetNillableUpdatedAt(t *time.Time) *MachineCreate
- func (mc *MachineCreate) SetNillableVersion(s *string) *MachineCreate
- func (mc *MachineCreate) SetPassword(s string) *MachineCreate
- func (mc *MachineCreate) SetScenarios(s string) *MachineCreate
- func (mc *MachineCreate) SetStatus(s string) *MachineCreate
- func (mc *MachineCreate) SetUpdatedAt(t time.Time) *MachineCreate
- func (mc *MachineCreate) SetVersion(s string) *MachineCreate
- type MachineCreateBulk
- type MachineDelete
- type MachineDeleteOne
- type MachineEdges
- type MachineGroupBy
- func (mgb *MachineGroupBy) Aggregate(fns ...AggregateFunc) *MachineGroupBy
- func (s *MachineGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MachineGroupBy) BoolX(ctx context.Context) bool
- func (s *MachineGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MachineGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MachineGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MachineGroupBy) Float64X(ctx context.Context) float64
- func (s *MachineGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MachineGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MachineGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MachineGroupBy) IntX(ctx context.Context) int
- func (s *MachineGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MachineGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MachineGroupBy) Scan(ctx context.Context, v any) error
- func (s *MachineGroupBy) ScanX(ctx context.Context, v any)
- func (s *MachineGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MachineGroupBy) StringX(ctx context.Context) string
- func (s *MachineGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MachineGroupBy) StringsX(ctx context.Context) []string
- type MachineMutation
- func (m *MachineMutation) AddAlertIDs(ids ...int)
- func (m *MachineMutation) AddField(name string, value ent.Value) error
- func (m *MachineMutation) AddedEdges() []string
- func (m *MachineMutation) AddedField(name string) (ent.Value, bool)
- func (m *MachineMutation) AddedFields() []string
- func (m *MachineMutation) AddedIDs(name string) []ent.Value
- func (m *MachineMutation) AlertsCleared() bool
- func (m *MachineMutation) AlertsIDs() (ids []int)
- func (m *MachineMutation) AuthType() (r string, exists bool)
- func (m *MachineMutation) ClearAlerts()
- func (m *MachineMutation) ClearCreatedAt()
- func (m *MachineMutation) ClearEdge(name string) error
- func (m *MachineMutation) ClearField(name string) error
- func (m *MachineMutation) ClearLastHeartbeat()
- func (m *MachineMutation) ClearLastPush()
- func (m *MachineMutation) ClearScenarios()
- func (m *MachineMutation) ClearStatus()
- func (m *MachineMutation) ClearUpdatedAt()
- func (m *MachineMutation) ClearVersion()
- func (m *MachineMutation) ClearedEdges() []string
- func (m *MachineMutation) ClearedFields() []string
- func (m MachineMutation) Client() *Client
- func (m *MachineMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MachineMutation) CreatedAtCleared() bool
- func (m *MachineMutation) EdgeCleared(name string) bool
- func (m *MachineMutation) Field(name string) (ent.Value, bool)
- func (m *MachineMutation) FieldCleared(name string) bool
- func (m *MachineMutation) Fields() []string
- func (m *MachineMutation) ID() (id int, exists bool)
- func (m *MachineMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MachineMutation) IpAddress() (r string, exists bool)
- func (m *MachineMutation) IsValidated() (r bool, exists bool)
- func (m *MachineMutation) LastHeartbeat() (r time.Time, exists bool)
- func (m *MachineMutation) LastHeartbeatCleared() bool
- func (m *MachineMutation) LastPush() (r time.Time, exists bool)
- func (m *MachineMutation) LastPushCleared() bool
- func (m *MachineMutation) MachineId() (r string, exists bool)
- func (m *MachineMutation) OldAuthType(ctx context.Context) (v string, err error)
- func (m *MachineMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MachineMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MachineMutation) OldIpAddress(ctx context.Context) (v string, err error)
- func (m *MachineMutation) OldIsValidated(ctx context.Context) (v bool, err error)
- func (m *MachineMutation) OldLastHeartbeat(ctx context.Context) (v *time.Time, err error)
- func (m *MachineMutation) OldLastPush(ctx context.Context) (v *time.Time, err error)
- func (m *MachineMutation) OldMachineId(ctx context.Context) (v string, err error)
- func (m *MachineMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *MachineMutation) OldScenarios(ctx context.Context) (v string, err error)
- func (m *MachineMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *MachineMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MachineMutation) OldVersion(ctx context.Context) (v string, err error)
- func (m *MachineMutation) Op() Op
- func (m *MachineMutation) Password() (r string, exists bool)
- func (m *MachineMutation) RemoveAlertIDs(ids ...int)
- func (m *MachineMutation) RemovedAlertsIDs() (ids []int)
- func (m *MachineMutation) RemovedEdges() []string
- func (m *MachineMutation) RemovedIDs(name string) []ent.Value
- func (m *MachineMutation) ResetAlerts()
- func (m *MachineMutation) ResetAuthType()
- func (m *MachineMutation) ResetCreatedAt()
- func (m *MachineMutation) ResetEdge(name string) error
- func (m *MachineMutation) ResetField(name string) error
- func (m *MachineMutation) ResetIpAddress()
- func (m *MachineMutation) ResetIsValidated()
- func (m *MachineMutation) ResetLastHeartbeat()
- func (m *MachineMutation) ResetLastPush()
- func (m *MachineMutation) ResetMachineId()
- func (m *MachineMutation) ResetPassword()
- func (m *MachineMutation) ResetScenarios()
- func (m *MachineMutation) ResetStatus()
- func (m *MachineMutation) ResetUpdatedAt()
- func (m *MachineMutation) ResetVersion()
- func (m *MachineMutation) Scenarios() (r string, exists bool)
- func (m *MachineMutation) ScenariosCleared() bool
- func (m *MachineMutation) SetAuthType(s string)
- func (m *MachineMutation) SetCreatedAt(t time.Time)
- func (m *MachineMutation) SetField(name string, value ent.Value) error
- func (m *MachineMutation) SetIpAddress(s string)
- func (m *MachineMutation) SetIsValidated(b bool)
- func (m *MachineMutation) SetLastHeartbeat(t time.Time)
- func (m *MachineMutation) SetLastPush(t time.Time)
- func (m *MachineMutation) SetMachineId(s string)
- func (m *MachineMutation) SetPassword(s string)
- func (m *MachineMutation) SetScenarios(s string)
- func (m *MachineMutation) SetStatus(s string)
- func (m *MachineMutation) SetUpdatedAt(t time.Time)
- func (m *MachineMutation) SetVersion(s string)
- func (m *MachineMutation) Status() (r string, exists bool)
- func (m *MachineMutation) StatusCleared() bool
- func (m MachineMutation) Tx() (*Tx, error)
- func (m *MachineMutation) Type() string
- func (m *MachineMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MachineMutation) UpdatedAtCleared() bool
- func (m *MachineMutation) Version() (r string, exists bool)
- func (m *MachineMutation) VersionCleared() bool
- func (m *MachineMutation) Where(ps ...predicate.Machine)
- type MachineQuery
- func (mq *MachineQuery) All(ctx context.Context) ([]*Machine, error)
- func (mq *MachineQuery) AllX(ctx context.Context) []*Machine
- func (mq *MachineQuery) Clone() *MachineQuery
- func (mq *MachineQuery) Count(ctx context.Context) (int, error)
- func (mq *MachineQuery) CountX(ctx context.Context) int
- func (mq *MachineQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MachineQuery) ExistX(ctx context.Context) bool
- func (mq *MachineQuery) First(ctx context.Context) (*Machine, error)
- func (mq *MachineQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MachineQuery) FirstIDX(ctx context.Context) int
- func (mq *MachineQuery) FirstX(ctx context.Context) *Machine
- func (mq *MachineQuery) GroupBy(field string, fields ...string) *MachineGroupBy
- func (mq *MachineQuery) IDs(ctx context.Context) ([]int, error)
- func (mq *MachineQuery) IDsX(ctx context.Context) []int
- func (mq *MachineQuery) Limit(limit int) *MachineQuery
- func (mq *MachineQuery) Offset(offset int) *MachineQuery
- func (mq *MachineQuery) Only(ctx context.Context) (*Machine, error)
- func (mq *MachineQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MachineQuery) OnlyIDX(ctx context.Context) int
- func (mq *MachineQuery) OnlyX(ctx context.Context) *Machine
- func (mq *MachineQuery) Order(o ...OrderFunc) *MachineQuery
- func (mq *MachineQuery) QueryAlerts() *AlertQuery
- func (mq *MachineQuery) Select(fields ...string) *MachineSelect
- func (mq *MachineQuery) Unique(unique bool) *MachineQuery
- func (mq *MachineQuery) Where(ps ...predicate.Machine) *MachineQuery
- func (mq *MachineQuery) WithAlerts(opts ...func(*AlertQuery)) *MachineQuery
- type MachineSelect
- func (s *MachineSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MachineSelect) BoolX(ctx context.Context) bool
- func (s *MachineSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MachineSelect) BoolsX(ctx context.Context) []bool
- func (s *MachineSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MachineSelect) Float64X(ctx context.Context) float64
- func (s *MachineSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MachineSelect) Float64sX(ctx context.Context) []float64
- func (s *MachineSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MachineSelect) IntX(ctx context.Context) int
- func (s *MachineSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MachineSelect) IntsX(ctx context.Context) []int
- func (ms *MachineSelect) Scan(ctx context.Context, v any) error
- func (s *MachineSelect) ScanX(ctx context.Context, v any)
- func (s *MachineSelect) String(ctx context.Context) (_ string, err error)
- func (s *MachineSelect) StringX(ctx context.Context) string
- func (s *MachineSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MachineSelect) StringsX(ctx context.Context) []string
- type MachineUpdate
- func (mu *MachineUpdate) AddAlertIDs(ids ...int) *MachineUpdate
- func (mu *MachineUpdate) AddAlerts(a ...*Alert) *MachineUpdate
- func (mu *MachineUpdate) ClearAlerts() *MachineUpdate
- func (mu *MachineUpdate) ClearCreatedAt() *MachineUpdate
- func (mu *MachineUpdate) ClearLastHeartbeat() *MachineUpdate
- func (mu *MachineUpdate) ClearLastPush() *MachineUpdate
- func (mu *MachineUpdate) ClearScenarios() *MachineUpdate
- func (mu *MachineUpdate) ClearStatus() *MachineUpdate
- func (mu *MachineUpdate) ClearUpdatedAt() *MachineUpdate
- func (mu *MachineUpdate) ClearVersion() *MachineUpdate
- func (mu *MachineUpdate) Exec(ctx context.Context) error
- func (mu *MachineUpdate) ExecX(ctx context.Context)
- func (mu *MachineUpdate) Mutation() *MachineMutation
- func (mu *MachineUpdate) RemoveAlertIDs(ids ...int) *MachineUpdate
- func (mu *MachineUpdate) RemoveAlerts(a ...*Alert) *MachineUpdate
- func (mu *MachineUpdate) Save(ctx context.Context) (int, error)
- func (mu *MachineUpdate) SaveX(ctx context.Context) int
- func (mu *MachineUpdate) SetAuthType(s string) *MachineUpdate
- func (mu *MachineUpdate) SetCreatedAt(t time.Time) *MachineUpdate
- func (mu *MachineUpdate) SetIpAddress(s string) *MachineUpdate
- func (mu *MachineUpdate) SetIsValidated(b bool) *MachineUpdate
- func (mu *MachineUpdate) SetLastHeartbeat(t time.Time) *MachineUpdate
- func (mu *MachineUpdate) SetLastPush(t time.Time) *MachineUpdate
- func (mu *MachineUpdate) SetMachineId(s string) *MachineUpdate
- func (mu *MachineUpdate) SetNillableAuthType(s *string) *MachineUpdate
- func (mu *MachineUpdate) SetNillableIsValidated(b *bool) *MachineUpdate
- func (mu *MachineUpdate) SetNillableScenarios(s *string) *MachineUpdate
- func (mu *MachineUpdate) SetNillableStatus(s *string) *MachineUpdate
- func (mu *MachineUpdate) SetNillableVersion(s *string) *MachineUpdate
- func (mu *MachineUpdate) SetPassword(s string) *MachineUpdate
- func (mu *MachineUpdate) SetScenarios(s string) *MachineUpdate
- func (mu *MachineUpdate) SetStatus(s string) *MachineUpdate
- func (mu *MachineUpdate) SetUpdatedAt(t time.Time) *MachineUpdate
- func (mu *MachineUpdate) SetVersion(s string) *MachineUpdate
- func (mu *MachineUpdate) Where(ps ...predicate.Machine) *MachineUpdate
- type MachineUpdateOne
- func (muo *MachineUpdateOne) AddAlertIDs(ids ...int) *MachineUpdateOne
- func (muo *MachineUpdateOne) AddAlerts(a ...*Alert) *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearAlerts() *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearCreatedAt() *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearLastHeartbeat() *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearLastPush() *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearScenarios() *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearStatus() *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearUpdatedAt() *MachineUpdateOne
- func (muo *MachineUpdateOne) ClearVersion() *MachineUpdateOne
- func (muo *MachineUpdateOne) Exec(ctx context.Context) error
- func (muo *MachineUpdateOne) ExecX(ctx context.Context)
- func (muo *MachineUpdateOne) Mutation() *MachineMutation
- func (muo *MachineUpdateOne) RemoveAlertIDs(ids ...int) *MachineUpdateOne
- func (muo *MachineUpdateOne) RemoveAlerts(a ...*Alert) *MachineUpdateOne
- func (muo *MachineUpdateOne) Save(ctx context.Context) (*Machine, error)
- func (muo *MachineUpdateOne) SaveX(ctx context.Context) *Machine
- func (muo *MachineUpdateOne) Select(field string, fields ...string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetAuthType(s string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetCreatedAt(t time.Time) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetIpAddress(s string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetIsValidated(b bool) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetLastHeartbeat(t time.Time) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetLastPush(t time.Time) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetMachineId(s string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetNillableAuthType(s *string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetNillableIsValidated(b *bool) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetNillableScenarios(s *string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetNillableStatus(s *string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetNillableVersion(s *string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetPassword(s string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetScenarios(s string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetStatus(s string) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetUpdatedAt(t time.Time) *MachineUpdateOne
- func (muo *MachineUpdateOne) SetVersion(s string) *MachineUpdateOne
- type Machines
- type Meta
- type MetaClient
- func (c *MetaClient) Create() *MetaCreate
- func (c *MetaClient) CreateBulk(builders ...*MetaCreate) *MetaCreateBulk
- func (c *MetaClient) Delete() *MetaDelete
- func (c *MetaClient) DeleteOne(m *Meta) *MetaDeleteOne
- func (c *MetaClient) DeleteOneID(id int) *MetaDeleteOne
- func (c *MetaClient) Get(ctx context.Context, id int) (*Meta, error)
- func (c *MetaClient) GetX(ctx context.Context, id int) *Meta
- func (c *MetaClient) Hooks() []Hook
- func (c *MetaClient) Query() *MetaQuery
- func (c *MetaClient) QueryOwner(m *Meta) *AlertQuery
- func (c *MetaClient) Update() *MetaUpdate
- func (c *MetaClient) UpdateOne(m *Meta) *MetaUpdateOne
- func (c *MetaClient) UpdateOneID(id int) *MetaUpdateOne
- func (c *MetaClient) Use(hooks ...Hook)
- type MetaCreate
- func (mc *MetaCreate) Exec(ctx context.Context) error
- func (mc *MetaCreate) ExecX(ctx context.Context)
- func (mc *MetaCreate) Mutation() *MetaMutation
- func (mc *MetaCreate) Save(ctx context.Context) (*Meta, error)
- func (mc *MetaCreate) SaveX(ctx context.Context) *Meta
- func (mc *MetaCreate) SetCreatedAt(t time.Time) *MetaCreate
- func (mc *MetaCreate) SetKey(s string) *MetaCreate
- func (mc *MetaCreate) SetNillableCreatedAt(t *time.Time) *MetaCreate
- func (mc *MetaCreate) SetNillableOwnerID(id *int) *MetaCreate
- func (mc *MetaCreate) SetNillableUpdatedAt(t *time.Time) *MetaCreate
- func (mc *MetaCreate) SetOwner(a *Alert) *MetaCreate
- func (mc *MetaCreate) SetOwnerID(id int) *MetaCreate
- func (mc *MetaCreate) SetUpdatedAt(t time.Time) *MetaCreate
- func (mc *MetaCreate) SetValue(s string) *MetaCreate
- type MetaCreateBulk
- type MetaDelete
- type MetaDeleteOne
- type MetaEdges
- type MetaGroupBy
- func (mgb *MetaGroupBy) Aggregate(fns ...AggregateFunc) *MetaGroupBy
- func (s *MetaGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetaGroupBy) BoolX(ctx context.Context) bool
- func (s *MetaGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MetaGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MetaGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetaGroupBy) Float64X(ctx context.Context) float64
- func (s *MetaGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetaGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MetaGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MetaGroupBy) IntX(ctx context.Context) int
- func (s *MetaGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MetaGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MetaGroupBy) Scan(ctx context.Context, v any) error
- func (s *MetaGroupBy) ScanX(ctx context.Context, v any)
- func (s *MetaGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MetaGroupBy) StringX(ctx context.Context) string
- func (s *MetaGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MetaGroupBy) StringsX(ctx context.Context) []string
- type MetaMutation
- func (m *MetaMutation) AddField(name string, value ent.Value) error
- func (m *MetaMutation) AddedEdges() []string
- func (m *MetaMutation) AddedField(name string) (ent.Value, bool)
- func (m *MetaMutation) AddedFields() []string
- func (m *MetaMutation) AddedIDs(name string) []ent.Value
- func (m *MetaMutation) ClearCreatedAt()
- func (m *MetaMutation) ClearEdge(name string) error
- func (m *MetaMutation) ClearField(name string) error
- func (m *MetaMutation) ClearOwner()
- func (m *MetaMutation) ClearUpdatedAt()
- func (m *MetaMutation) ClearedEdges() []string
- func (m *MetaMutation) ClearedFields() []string
- func (m MetaMutation) Client() *Client
- func (m *MetaMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MetaMutation) CreatedAtCleared() bool
- func (m *MetaMutation) EdgeCleared(name string) bool
- func (m *MetaMutation) Field(name string) (ent.Value, bool)
- func (m *MetaMutation) FieldCleared(name string) bool
- func (m *MetaMutation) Fields() []string
- func (m *MetaMutation) ID() (id int, exists bool)
- func (m *MetaMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MetaMutation) Key() (r string, exists bool)
- func (m *MetaMutation) OldCreatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MetaMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MetaMutation) OldKey(ctx context.Context) (v string, err error)
- func (m *MetaMutation) OldUpdatedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MetaMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *MetaMutation) Op() Op
- func (m *MetaMutation) OwnerCleared() bool
- func (m *MetaMutation) OwnerID() (id int, exists bool)
- func (m *MetaMutation) OwnerIDs() (ids []int)
- func (m *MetaMutation) RemovedEdges() []string
- func (m *MetaMutation) RemovedIDs(name string) []ent.Value
- func (m *MetaMutation) ResetCreatedAt()
- func (m *MetaMutation) ResetEdge(name string) error
- func (m *MetaMutation) ResetField(name string) error
- func (m *MetaMutation) ResetKey()
- func (m *MetaMutation) ResetOwner()
- func (m *MetaMutation) ResetUpdatedAt()
- func (m *MetaMutation) ResetValue()
- func (m *MetaMutation) SetCreatedAt(t time.Time)
- func (m *MetaMutation) SetField(name string, value ent.Value) error
- func (m *MetaMutation) SetKey(s string)
- func (m *MetaMutation) SetOwnerID(id int)
- func (m *MetaMutation) SetUpdatedAt(t time.Time)
- func (m *MetaMutation) SetValue(s string)
- func (m MetaMutation) Tx() (*Tx, error)
- func (m *MetaMutation) Type() string
- func (m *MetaMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MetaMutation) UpdatedAtCleared() bool
- func (m *MetaMutation) Value() (r string, exists bool)
- func (m *MetaMutation) Where(ps ...predicate.Meta)
- type MetaQuery
- func (mq *MetaQuery) All(ctx context.Context) ([]*Meta, error)
- func (mq *MetaQuery) AllX(ctx context.Context) []*Meta
- func (mq *MetaQuery) Clone() *MetaQuery
- func (mq *MetaQuery) Count(ctx context.Context) (int, error)
- func (mq *MetaQuery) CountX(ctx context.Context) int
- func (mq *MetaQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MetaQuery) ExistX(ctx context.Context) bool
- func (mq *MetaQuery) First(ctx context.Context) (*Meta, error)
- func (mq *MetaQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MetaQuery) FirstIDX(ctx context.Context) int
- func (mq *MetaQuery) FirstX(ctx context.Context) *Meta
- func (mq *MetaQuery) GroupBy(field string, fields ...string) *MetaGroupBy
- func (mq *MetaQuery) IDs(ctx context.Context) ([]int, error)
- func (mq *MetaQuery) IDsX(ctx context.Context) []int
- func (mq *MetaQuery) Limit(limit int) *MetaQuery
- func (mq *MetaQuery) Offset(offset int) *MetaQuery
- func (mq *MetaQuery) Only(ctx context.Context) (*Meta, error)
- func (mq *MetaQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MetaQuery) OnlyIDX(ctx context.Context) int
- func (mq *MetaQuery) OnlyX(ctx context.Context) *Meta
- func (mq *MetaQuery) Order(o ...OrderFunc) *MetaQuery
- func (mq *MetaQuery) QueryOwner() *AlertQuery
- func (mq *MetaQuery) Select(fields ...string) *MetaSelect
- func (mq *MetaQuery) Unique(unique bool) *MetaQuery
- func (mq *MetaQuery) Where(ps ...predicate.Meta) *MetaQuery
- func (mq *MetaQuery) WithOwner(opts ...func(*AlertQuery)) *MetaQuery
- type MetaSelect
- func (s *MetaSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MetaSelect) BoolX(ctx context.Context) bool
- func (s *MetaSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MetaSelect) BoolsX(ctx context.Context) []bool
- func (s *MetaSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MetaSelect) Float64X(ctx context.Context) float64
- func (s *MetaSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MetaSelect) Float64sX(ctx context.Context) []float64
- func (s *MetaSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MetaSelect) IntX(ctx context.Context) int
- func (s *MetaSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MetaSelect) IntsX(ctx context.Context) []int
- func (ms *MetaSelect) Scan(ctx context.Context, v any) error
- func (s *MetaSelect) ScanX(ctx context.Context, v any)
- func (s *MetaSelect) String(ctx context.Context) (_ string, err error)
- func (s *MetaSelect) StringX(ctx context.Context) string
- func (s *MetaSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MetaSelect) StringsX(ctx context.Context) []string
- type MetaSlice
- type MetaUpdate
- func (mu *MetaUpdate) ClearCreatedAt() *MetaUpdate
- func (mu *MetaUpdate) ClearOwner() *MetaUpdate
- func (mu *MetaUpdate) ClearUpdatedAt() *MetaUpdate
- func (mu *MetaUpdate) Exec(ctx context.Context) error
- func (mu *MetaUpdate) ExecX(ctx context.Context)
- func (mu *MetaUpdate) Mutation() *MetaMutation
- func (mu *MetaUpdate) Save(ctx context.Context) (int, error)
- func (mu *MetaUpdate) SaveX(ctx context.Context) int
- func (mu *MetaUpdate) SetCreatedAt(t time.Time) *MetaUpdate
- func (mu *MetaUpdate) SetKey(s string) *MetaUpdate
- func (mu *MetaUpdate) SetNillableOwnerID(id *int) *MetaUpdate
- func (mu *MetaUpdate) SetOwner(a *Alert) *MetaUpdate
- func (mu *MetaUpdate) SetOwnerID(id int) *MetaUpdate
- func (mu *MetaUpdate) SetUpdatedAt(t time.Time) *MetaUpdate
- func (mu *MetaUpdate) SetValue(s string) *MetaUpdate
- func (mu *MetaUpdate) Where(ps ...predicate.Meta) *MetaUpdate
- type MetaUpdateOne
- func (muo *MetaUpdateOne) ClearCreatedAt() *MetaUpdateOne
- func (muo *MetaUpdateOne) ClearOwner() *MetaUpdateOne
- func (muo *MetaUpdateOne) ClearUpdatedAt() *MetaUpdateOne
- func (muo *MetaUpdateOne) Exec(ctx context.Context) error
- func (muo *MetaUpdateOne) ExecX(ctx context.Context)
- func (muo *MetaUpdateOne) Mutation() *MetaMutation
- func (muo *MetaUpdateOne) Save(ctx context.Context) (*Meta, error)
- func (muo *MetaUpdateOne) SaveX(ctx context.Context) *Meta
- func (muo *MetaUpdateOne) Select(field string, fields ...string) *MetaUpdateOne
- func (muo *MetaUpdateOne) SetCreatedAt(t time.Time) *MetaUpdateOne
- func (muo *MetaUpdateOne) SetKey(s string) *MetaUpdateOne
- func (muo *MetaUpdateOne) SetNillableOwnerID(id *int) *MetaUpdateOne
- func (muo *MetaUpdateOne) SetOwner(a *Alert) *MetaUpdateOne
- func (muo *MetaUpdateOne) SetOwnerID(id int) *MetaUpdateOne
- func (muo *MetaUpdateOne) SetUpdatedAt(t time.Time) *MetaUpdateOne
- func (muo *MetaUpdateOne) SetValue(s string) *MetaUpdateOne
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tx
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeAlert = "Alert" TypeBouncer = "Bouncer" TypeConfigItem = "ConfigItem" TypeDecision = "Decision" TypeEvent = "Event" TypeMachine = "Machine" TypeMeta = "Meta" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Alert ¶
type Alert struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Scenario holds the value of the "scenario" field. Scenario string `json:"scenario,omitempty"` // BucketId holds the value of the "bucketId" field. BucketId string `json:"bucketId,omitempty"` // Message holds the value of the "message" field. Message string `json:"message,omitempty"` // EventsCount holds the value of the "eventsCount" field. EventsCount int32 `json:"eventsCount,omitempty"` // StartedAt holds the value of the "startedAt" field. StartedAt time.Time `json:"startedAt,omitempty"` // StoppedAt holds the value of the "stoppedAt" field. StoppedAt time.Time `json:"stoppedAt,omitempty"` // SourceIp holds the value of the "sourceIp" field. SourceIp string `json:"sourceIp,omitempty"` // SourceRange holds the value of the "sourceRange" field. SourceRange string `json:"sourceRange,omitempty"` // SourceAsNumber holds the value of the "sourceAsNumber" field. SourceAsNumber string `json:"sourceAsNumber,omitempty"` // SourceAsName holds the value of the "sourceAsName" field. SourceAsName string `json:"sourceAsName,omitempty"` // SourceCountry holds the value of the "sourceCountry" field. SourceCountry string `json:"sourceCountry,omitempty"` // SourceLatitude holds the value of the "sourceLatitude" field. SourceLatitude float32 `json:"sourceLatitude,omitempty"` // SourceLongitude holds the value of the "sourceLongitude" field. SourceLongitude float32 `json:"sourceLongitude,omitempty"` // SourceScope holds the value of the "sourceScope" field. SourceScope string `json:"sourceScope,omitempty"` // SourceValue holds the value of the "sourceValue" field. SourceValue string `json:"sourceValue,omitempty"` // Capacity holds the value of the "capacity" field. Capacity int32 `json:"capacity,omitempty"` // LeakSpeed holds the value of the "leakSpeed" field. LeakSpeed string `json:"leakSpeed,omitempty"` // ScenarioVersion holds the value of the "scenarioVersion" field. ScenarioVersion string `json:"scenarioVersion,omitempty"` // ScenarioHash holds the value of the "scenarioHash" field. ScenarioHash string `json:"scenarioHash,omitempty"` // Simulated holds the value of the "simulated" field. Simulated bool `json:"simulated,omitempty"` // UUID holds the value of the "uuid" field. UUID string `json:"uuid,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AlertQuery when eager-loading is set. Edges AlertEdges `json:"edges"` // contains filtered or unexported fields }
Alert is the model entity for the Alert schema.
func (*Alert) QueryDecisions ¶
func (a *Alert) QueryDecisions() *DecisionQuery
QueryDecisions queries the "decisions" edge of the Alert entity.
func (*Alert) QueryEvents ¶
func (a *Alert) QueryEvents() *EventQuery
QueryEvents queries the "events" edge of the Alert entity.
func (*Alert) QueryMetas ¶
QueryMetas queries the "metas" edge of the Alert entity.
func (*Alert) QueryOwner ¶
func (a *Alert) QueryOwner() *MachineQuery
QueryOwner queries the "owner" edge of the Alert entity.
func (*Alert) Unwrap ¶
Unwrap unwraps the Alert entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Alert) Update ¶
func (a *Alert) Update() *AlertUpdateOne
Update returns a builder for updating this Alert. Note that you need to call Alert.Unwrap() before calling this method if this Alert was returned from a transaction, and the transaction was committed or rolled back.
type AlertClient ¶
type AlertClient struct {
// contains filtered or unexported fields
}
AlertClient is a client for the Alert schema.
func NewAlertClient ¶
func NewAlertClient(c config) *AlertClient
NewAlertClient returns a client for the Alert from the given config.
func (*AlertClient) Create ¶
func (c *AlertClient) Create() *AlertCreate
Create returns a builder for creating a Alert entity.
func (*AlertClient) CreateBulk ¶
func (c *AlertClient) CreateBulk(builders ...*AlertCreate) *AlertCreateBulk
CreateBulk returns a builder for creating a bulk of Alert entities.
func (*AlertClient) Delete ¶
func (c *AlertClient) Delete() *AlertDelete
Delete returns a delete builder for Alert.
func (*AlertClient) DeleteOne ¶
func (c *AlertClient) DeleteOne(a *Alert) *AlertDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AlertClient) DeleteOneID ¶
func (c *AlertClient) DeleteOneID(id int) *AlertDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*AlertClient) GetX ¶
func (c *AlertClient) GetX(ctx context.Context, id int) *Alert
GetX is like Get, but panics if an error occurs.
func (*AlertClient) Query ¶
func (c *AlertClient) Query() *AlertQuery
Query returns a query builder for Alert.
func (*AlertClient) QueryDecisions ¶
func (c *AlertClient) QueryDecisions(a *Alert) *DecisionQuery
QueryDecisions queries the decisions edge of a Alert.
func (*AlertClient) QueryEvents ¶
func (c *AlertClient) QueryEvents(a *Alert) *EventQuery
QueryEvents queries the events edge of a Alert.
func (*AlertClient) QueryMetas ¶
func (c *AlertClient) QueryMetas(a *Alert) *MetaQuery
QueryMetas queries the metas edge of a Alert.
func (*AlertClient) QueryOwner ¶
func (c *AlertClient) QueryOwner(a *Alert) *MachineQuery
QueryOwner queries the owner edge of a Alert.
func (*AlertClient) Update ¶
func (c *AlertClient) Update() *AlertUpdate
Update returns an update builder for Alert.
func (*AlertClient) UpdateOne ¶
func (c *AlertClient) UpdateOne(a *Alert) *AlertUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AlertClient) UpdateOneID ¶
func (c *AlertClient) UpdateOneID(id int) *AlertUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AlertClient) Use ¶
func (c *AlertClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `alert.Hooks(f(g(h())))`.
type AlertCreate ¶
type AlertCreate struct {
// contains filtered or unexported fields
}
AlertCreate is the builder for creating a Alert entity.
func (*AlertCreate) AddDecisionIDs ¶
func (ac *AlertCreate) AddDecisionIDs(ids ...int) *AlertCreate
AddDecisionIDs adds the "decisions" edge to the Decision entity by IDs.
func (*AlertCreate) AddDecisions ¶
func (ac *AlertCreate) AddDecisions(d ...*Decision) *AlertCreate
AddDecisions adds the "decisions" edges to the Decision entity.
func (*AlertCreate) AddEventIDs ¶
func (ac *AlertCreate) AddEventIDs(ids ...int) *AlertCreate
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*AlertCreate) AddEvents ¶
func (ac *AlertCreate) AddEvents(e ...*Event) *AlertCreate
AddEvents adds the "events" edges to the Event entity.
func (*AlertCreate) AddMetaIDs ¶
func (ac *AlertCreate) AddMetaIDs(ids ...int) *AlertCreate
AddMetaIDs adds the "metas" edge to the Meta entity by IDs.
func (*AlertCreate) AddMetas ¶
func (ac *AlertCreate) AddMetas(m ...*Meta) *AlertCreate
AddMetas adds the "metas" edges to the Meta entity.
func (*AlertCreate) Exec ¶ added in v1.2.1
func (ac *AlertCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertCreate) ExecX ¶ added in v1.2.1
func (ac *AlertCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertCreate) Mutation ¶
func (ac *AlertCreate) Mutation() *AlertMutation
Mutation returns the AlertMutation object of the builder.
func (*AlertCreate) Save ¶
func (ac *AlertCreate) Save(ctx context.Context) (*Alert, error)
Save creates the Alert in the database.
func (*AlertCreate) SaveX ¶
func (ac *AlertCreate) SaveX(ctx context.Context) *Alert
SaveX calls Save and panics if Save returns an error.
func (*AlertCreate) SetBucketId ¶
func (ac *AlertCreate) SetBucketId(s string) *AlertCreate
SetBucketId sets the "bucketId" field.
func (*AlertCreate) SetCapacity ¶
func (ac *AlertCreate) SetCapacity(i int32) *AlertCreate
SetCapacity sets the "capacity" field.
func (*AlertCreate) SetCreatedAt ¶
func (ac *AlertCreate) SetCreatedAt(t time.Time) *AlertCreate
SetCreatedAt sets the "created_at" field.
func (*AlertCreate) SetEventsCount ¶
func (ac *AlertCreate) SetEventsCount(i int32) *AlertCreate
SetEventsCount sets the "eventsCount" field.
func (*AlertCreate) SetLeakSpeed ¶
func (ac *AlertCreate) SetLeakSpeed(s string) *AlertCreate
SetLeakSpeed sets the "leakSpeed" field.
func (*AlertCreate) SetMessage ¶
func (ac *AlertCreate) SetMessage(s string) *AlertCreate
SetMessage sets the "message" field.
func (*AlertCreate) SetNillableBucketId ¶
func (ac *AlertCreate) SetNillableBucketId(s *string) *AlertCreate
SetNillableBucketId sets the "bucketId" field if the given value is not nil.
func (*AlertCreate) SetNillableCapacity ¶
func (ac *AlertCreate) SetNillableCapacity(i *int32) *AlertCreate
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*AlertCreate) SetNillableCreatedAt ¶
func (ac *AlertCreate) SetNillableCreatedAt(t *time.Time) *AlertCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AlertCreate) SetNillableEventsCount ¶
func (ac *AlertCreate) SetNillableEventsCount(i *int32) *AlertCreate
SetNillableEventsCount sets the "eventsCount" field if the given value is not nil.
func (*AlertCreate) SetNillableLeakSpeed ¶
func (ac *AlertCreate) SetNillableLeakSpeed(s *string) *AlertCreate
SetNillableLeakSpeed sets the "leakSpeed" field if the given value is not nil.
func (*AlertCreate) SetNillableMessage ¶
func (ac *AlertCreate) SetNillableMessage(s *string) *AlertCreate
SetNillableMessage sets the "message" field if the given value is not nil.
func (*AlertCreate) SetNillableOwnerID ¶
func (ac *AlertCreate) SetNillableOwnerID(id *int) *AlertCreate
SetNillableOwnerID sets the "owner" edge to the Machine entity by ID if the given value is not nil.
func (*AlertCreate) SetNillableScenarioHash ¶
func (ac *AlertCreate) SetNillableScenarioHash(s *string) *AlertCreate
SetNillableScenarioHash sets the "scenarioHash" field if the given value is not nil.
func (*AlertCreate) SetNillableScenarioVersion ¶
func (ac *AlertCreate) SetNillableScenarioVersion(s *string) *AlertCreate
SetNillableScenarioVersion sets the "scenarioVersion" field if the given value is not nil.
func (*AlertCreate) SetNillableSimulated ¶
func (ac *AlertCreate) SetNillableSimulated(b *bool) *AlertCreate
SetNillableSimulated sets the "simulated" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceAsName ¶
func (ac *AlertCreate) SetNillableSourceAsName(s *string) *AlertCreate
SetNillableSourceAsName sets the "sourceAsName" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceAsNumber ¶
func (ac *AlertCreate) SetNillableSourceAsNumber(s *string) *AlertCreate
SetNillableSourceAsNumber sets the "sourceAsNumber" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceCountry ¶
func (ac *AlertCreate) SetNillableSourceCountry(s *string) *AlertCreate
SetNillableSourceCountry sets the "sourceCountry" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceIp ¶
func (ac *AlertCreate) SetNillableSourceIp(s *string) *AlertCreate
SetNillableSourceIp sets the "sourceIp" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceLatitude ¶
func (ac *AlertCreate) SetNillableSourceLatitude(f *float32) *AlertCreate
SetNillableSourceLatitude sets the "sourceLatitude" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceLongitude ¶
func (ac *AlertCreate) SetNillableSourceLongitude(f *float32) *AlertCreate
SetNillableSourceLongitude sets the "sourceLongitude" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceRange ¶
func (ac *AlertCreate) SetNillableSourceRange(s *string) *AlertCreate
SetNillableSourceRange sets the "sourceRange" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceScope ¶
func (ac *AlertCreate) SetNillableSourceScope(s *string) *AlertCreate
SetNillableSourceScope sets the "sourceScope" field if the given value is not nil.
func (*AlertCreate) SetNillableSourceValue ¶
func (ac *AlertCreate) SetNillableSourceValue(s *string) *AlertCreate
SetNillableSourceValue sets the "sourceValue" field if the given value is not nil.
func (*AlertCreate) SetNillableStartedAt ¶
func (ac *AlertCreate) SetNillableStartedAt(t *time.Time) *AlertCreate
SetNillableStartedAt sets the "startedAt" field if the given value is not nil.
func (*AlertCreate) SetNillableStoppedAt ¶
func (ac *AlertCreate) SetNillableStoppedAt(t *time.Time) *AlertCreate
SetNillableStoppedAt sets the "stoppedAt" field if the given value is not nil.
func (*AlertCreate) SetNillableUUID ¶ added in v1.5.0
func (ac *AlertCreate) SetNillableUUID(s *string) *AlertCreate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*AlertCreate) SetNillableUpdatedAt ¶
func (ac *AlertCreate) SetNillableUpdatedAt(t *time.Time) *AlertCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AlertCreate) SetOwner ¶
func (ac *AlertCreate) SetOwner(m *Machine) *AlertCreate
SetOwner sets the "owner" edge to the Machine entity.
func (*AlertCreate) SetOwnerID ¶
func (ac *AlertCreate) SetOwnerID(id int) *AlertCreate
SetOwnerID sets the "owner" edge to the Machine entity by ID.
func (*AlertCreate) SetScenario ¶
func (ac *AlertCreate) SetScenario(s string) *AlertCreate
SetScenario sets the "scenario" field.
func (*AlertCreate) SetScenarioHash ¶
func (ac *AlertCreate) SetScenarioHash(s string) *AlertCreate
SetScenarioHash sets the "scenarioHash" field.
func (*AlertCreate) SetScenarioVersion ¶
func (ac *AlertCreate) SetScenarioVersion(s string) *AlertCreate
SetScenarioVersion sets the "scenarioVersion" field.
func (*AlertCreate) SetSimulated ¶
func (ac *AlertCreate) SetSimulated(b bool) *AlertCreate
SetSimulated sets the "simulated" field.
func (*AlertCreate) SetSourceAsName ¶
func (ac *AlertCreate) SetSourceAsName(s string) *AlertCreate
SetSourceAsName sets the "sourceAsName" field.
func (*AlertCreate) SetSourceAsNumber ¶
func (ac *AlertCreate) SetSourceAsNumber(s string) *AlertCreate
SetSourceAsNumber sets the "sourceAsNumber" field.
func (*AlertCreate) SetSourceCountry ¶
func (ac *AlertCreate) SetSourceCountry(s string) *AlertCreate
SetSourceCountry sets the "sourceCountry" field.
func (*AlertCreate) SetSourceIp ¶
func (ac *AlertCreate) SetSourceIp(s string) *AlertCreate
SetSourceIp sets the "sourceIp" field.
func (*AlertCreate) SetSourceLatitude ¶
func (ac *AlertCreate) SetSourceLatitude(f float32) *AlertCreate
SetSourceLatitude sets the "sourceLatitude" field.
func (*AlertCreate) SetSourceLongitude ¶
func (ac *AlertCreate) SetSourceLongitude(f float32) *AlertCreate
SetSourceLongitude sets the "sourceLongitude" field.
func (*AlertCreate) SetSourceRange ¶
func (ac *AlertCreate) SetSourceRange(s string) *AlertCreate
SetSourceRange sets the "sourceRange" field.
func (*AlertCreate) SetSourceScope ¶
func (ac *AlertCreate) SetSourceScope(s string) *AlertCreate
SetSourceScope sets the "sourceScope" field.
func (*AlertCreate) SetSourceValue ¶
func (ac *AlertCreate) SetSourceValue(s string) *AlertCreate
SetSourceValue sets the "sourceValue" field.
func (*AlertCreate) SetStartedAt ¶
func (ac *AlertCreate) SetStartedAt(t time.Time) *AlertCreate
SetStartedAt sets the "startedAt" field.
func (*AlertCreate) SetStoppedAt ¶
func (ac *AlertCreate) SetStoppedAt(t time.Time) *AlertCreate
SetStoppedAt sets the "stoppedAt" field.
func (*AlertCreate) SetUUID ¶ added in v1.5.0
func (ac *AlertCreate) SetUUID(s string) *AlertCreate
SetUUID sets the "uuid" field.
func (*AlertCreate) SetUpdatedAt ¶
func (ac *AlertCreate) SetUpdatedAt(t time.Time) *AlertCreate
SetUpdatedAt sets the "updated_at" field.
type AlertCreateBulk ¶
type AlertCreateBulk struct {
// contains filtered or unexported fields
}
AlertCreateBulk is the builder for creating many Alert entities in bulk.
func (*AlertCreateBulk) Exec ¶ added in v1.2.1
func (acb *AlertCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertCreateBulk) ExecX ¶ added in v1.2.1
func (acb *AlertCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AlertDelete ¶
type AlertDelete struct {
// contains filtered or unexported fields
}
AlertDelete is the builder for deleting a Alert entity.
func (*AlertDelete) Exec ¶
func (ad *AlertDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AlertDelete) ExecX ¶
func (ad *AlertDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AlertDelete) Where ¶
func (ad *AlertDelete) Where(ps ...predicate.Alert) *AlertDelete
Where appends a list predicates to the AlertDelete builder.
type AlertDeleteOne ¶
type AlertDeleteOne struct {
// contains filtered or unexported fields
}
AlertDeleteOne is the builder for deleting a single Alert entity.
func (*AlertDeleteOne) Exec ¶
func (ado *AlertDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AlertDeleteOne) ExecX ¶
func (ado *AlertDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AlertEdges ¶
type AlertEdges struct { // Owner holds the value of the owner edge. Owner *Machine `json:"owner,omitempty"` // Decisions holds the value of the decisions edge. Decisions []*Decision `json:"decisions,omitempty"` // Events holds the value of the events edge. Events []*Event `json:"events,omitempty"` // Metas holds the value of the metas edge. Metas []*Meta `json:"metas,omitempty"` // contains filtered or unexported fields }
AlertEdges holds the relations/edges for other nodes in the graph.
func (AlertEdges) DecisionsOrErr ¶
func (e AlertEdges) DecisionsOrErr() ([]*Decision, error)
DecisionsOrErr returns the Decisions value or an error if the edge was not loaded in eager-loading.
func (AlertEdges) EventsOrErr ¶
func (e AlertEdges) EventsOrErr() ([]*Event, error)
EventsOrErr returns the Events value or an error if the edge was not loaded in eager-loading.
func (AlertEdges) MetasOrErr ¶
func (e AlertEdges) MetasOrErr() ([]*Meta, error)
MetasOrErr returns the Metas value or an error if the edge was not loaded in eager-loading.
func (AlertEdges) OwnerOrErr ¶
func (e AlertEdges) OwnerOrErr() (*Machine, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type AlertGroupBy ¶
type AlertGroupBy struct {
// contains filtered or unexported fields
}
AlertGroupBy is the group-by builder for Alert entities.
func (*AlertGroupBy) Aggregate ¶
func (agb *AlertGroupBy) Aggregate(fns ...AggregateFunc) *AlertGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AlertGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlertGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlertGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlertGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlertGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlertGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlertGroupBy) Scan ¶
func (agb *AlertGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*AlertGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlertMutation ¶
type AlertMutation struct {
// contains filtered or unexported fields
}
AlertMutation represents an operation that mutates the Alert nodes in the graph.
func (*AlertMutation) AddCapacity ¶
func (m *AlertMutation) AddCapacity(i int32)
AddCapacity adds i to the "capacity" field.
func (*AlertMutation) AddDecisionIDs ¶
func (m *AlertMutation) AddDecisionIDs(ids ...int)
AddDecisionIDs adds the "decisions" edge to the Decision entity by ids.
func (*AlertMutation) AddEventIDs ¶
func (m *AlertMutation) AddEventIDs(ids ...int)
AddEventIDs adds the "events" edge to the Event entity by ids.
func (*AlertMutation) AddEventsCount ¶
func (m *AlertMutation) AddEventsCount(i int32)
AddEventsCount adds i to the "eventsCount" field.
func (*AlertMutation) AddField ¶
func (m *AlertMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AlertMutation) AddMetaIDs ¶
func (m *AlertMutation) AddMetaIDs(ids ...int)
AddMetaIDs adds the "metas" edge to the Meta entity by ids.
func (*AlertMutation) AddSourceLatitude ¶
func (m *AlertMutation) AddSourceLatitude(f float32)
AddSourceLatitude adds f to the "sourceLatitude" field.
func (*AlertMutation) AddSourceLongitude ¶
func (m *AlertMutation) AddSourceLongitude(f float32)
AddSourceLongitude adds f to the "sourceLongitude" field.
func (*AlertMutation) AddedCapacity ¶
func (m *AlertMutation) AddedCapacity() (r int32, exists bool)
AddedCapacity returns the value that was added to the "capacity" field in this mutation.
func (*AlertMutation) AddedEdges ¶
func (m *AlertMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AlertMutation) AddedEventsCount ¶
func (m *AlertMutation) AddedEventsCount() (r int32, exists bool)
AddedEventsCount returns the value that was added to the "eventsCount" field in this mutation.
func (*AlertMutation) AddedField ¶
func (m *AlertMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on 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.
func (*AlertMutation) AddedFields ¶
func (m *AlertMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AlertMutation) AddedIDs ¶
func (m *AlertMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AlertMutation) AddedSourceLatitude ¶
func (m *AlertMutation) AddedSourceLatitude() (r float32, exists bool)
AddedSourceLatitude returns the value that was added to the "sourceLatitude" field in this mutation.
func (*AlertMutation) AddedSourceLongitude ¶
func (m *AlertMutation) AddedSourceLongitude() (r float32, exists bool)
AddedSourceLongitude returns the value that was added to the "sourceLongitude" field in this mutation.
func (*AlertMutation) BucketId ¶
func (m *AlertMutation) BucketId() (r string, exists bool)
BucketId returns the value of the "bucketId" field in the mutation.
func (*AlertMutation) BucketIdCleared ¶
func (m *AlertMutation) BucketIdCleared() bool
BucketIdCleared returns if the "bucketId" field was cleared in this mutation.
func (*AlertMutation) Capacity ¶
func (m *AlertMutation) Capacity() (r int32, exists bool)
Capacity returns the value of the "capacity" field in the mutation.
func (*AlertMutation) CapacityCleared ¶
func (m *AlertMutation) CapacityCleared() bool
CapacityCleared returns if the "capacity" field was cleared in this mutation.
func (*AlertMutation) ClearBucketId ¶
func (m *AlertMutation) ClearBucketId()
ClearBucketId clears the value of the "bucketId" field.
func (*AlertMutation) ClearCapacity ¶
func (m *AlertMutation) ClearCapacity()
ClearCapacity clears the value of the "capacity" field.
func (*AlertMutation) ClearCreatedAt ¶ added in v1.3.0
func (m *AlertMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*AlertMutation) ClearDecisions ¶
func (m *AlertMutation) ClearDecisions()
ClearDecisions clears the "decisions" edge to the Decision entity.
func (*AlertMutation) ClearEdge ¶
func (m *AlertMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*AlertMutation) ClearEvents ¶
func (m *AlertMutation) ClearEvents()
ClearEvents clears the "events" edge to the Event entity.
func (*AlertMutation) ClearEventsCount ¶
func (m *AlertMutation) ClearEventsCount()
ClearEventsCount clears the value of the "eventsCount" field.
func (*AlertMutation) ClearField ¶
func (m *AlertMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*AlertMutation) ClearLeakSpeed ¶
func (m *AlertMutation) ClearLeakSpeed()
ClearLeakSpeed clears the value of the "leakSpeed" field.
func (*AlertMutation) ClearMessage ¶
func (m *AlertMutation) ClearMessage()
ClearMessage clears the value of the "message" field.
func (*AlertMutation) ClearMetas ¶
func (m *AlertMutation) ClearMetas()
ClearMetas clears the "metas" edge to the Meta entity.
func (*AlertMutation) ClearOwner ¶
func (m *AlertMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Machine entity.
func (*AlertMutation) ClearScenarioHash ¶
func (m *AlertMutation) ClearScenarioHash()
ClearScenarioHash clears the value of the "scenarioHash" field.
func (*AlertMutation) ClearScenarioVersion ¶
func (m *AlertMutation) ClearScenarioVersion()
ClearScenarioVersion clears the value of the "scenarioVersion" field.
func (*AlertMutation) ClearSourceAsName ¶
func (m *AlertMutation) ClearSourceAsName()
ClearSourceAsName clears the value of the "sourceAsName" field.
func (*AlertMutation) ClearSourceAsNumber ¶
func (m *AlertMutation) ClearSourceAsNumber()
ClearSourceAsNumber clears the value of the "sourceAsNumber" field.
func (*AlertMutation) ClearSourceCountry ¶
func (m *AlertMutation) ClearSourceCountry()
ClearSourceCountry clears the value of the "sourceCountry" field.
func (*AlertMutation) ClearSourceIp ¶
func (m *AlertMutation) ClearSourceIp()
ClearSourceIp clears the value of the "sourceIp" field.
func (*AlertMutation) ClearSourceLatitude ¶
func (m *AlertMutation) ClearSourceLatitude()
ClearSourceLatitude clears the value of the "sourceLatitude" field.
func (*AlertMutation) ClearSourceLongitude ¶
func (m *AlertMutation) ClearSourceLongitude()
ClearSourceLongitude clears the value of the "sourceLongitude" field.
func (*AlertMutation) ClearSourceRange ¶
func (m *AlertMutation) ClearSourceRange()
ClearSourceRange clears the value of the "sourceRange" field.
func (*AlertMutation) ClearSourceScope ¶
func (m *AlertMutation) ClearSourceScope()
ClearSourceScope clears the value of the "sourceScope" field.
func (*AlertMutation) ClearSourceValue ¶
func (m *AlertMutation) ClearSourceValue()
ClearSourceValue clears the value of the "sourceValue" field.
func (*AlertMutation) ClearStartedAt ¶
func (m *AlertMutation) ClearStartedAt()
ClearStartedAt clears the value of the "startedAt" field.
func (*AlertMutation) ClearStoppedAt ¶
func (m *AlertMutation) ClearStoppedAt()
ClearStoppedAt clears the value of the "stoppedAt" field.
func (*AlertMutation) ClearUUID ¶ added in v1.5.0
func (m *AlertMutation) ClearUUID()
ClearUUID clears the value of the "uuid" field.
func (*AlertMutation) ClearUpdatedAt ¶ added in v1.3.0
func (m *AlertMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*AlertMutation) ClearedEdges ¶
func (m *AlertMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AlertMutation) ClearedFields ¶
func (m *AlertMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AlertMutation) Client ¶
func (m AlertMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*AlertMutation) CreatedAt ¶
func (m *AlertMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AlertMutation) CreatedAtCleared ¶ added in v1.3.0
func (m *AlertMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*AlertMutation) DecisionsCleared ¶
func (m *AlertMutation) DecisionsCleared() bool
DecisionsCleared reports if the "decisions" edge to the Decision entity was cleared.
func (*AlertMutation) DecisionsIDs ¶
func (m *AlertMutation) DecisionsIDs() (ids []int)
DecisionsIDs returns the "decisions" edge IDs in the mutation.
func (*AlertMutation) EdgeCleared ¶
func (m *AlertMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AlertMutation) EventsCleared ¶
func (m *AlertMutation) EventsCleared() bool
EventsCleared reports if the "events" edge to the Event entity was cleared.
func (*AlertMutation) EventsCount ¶
func (m *AlertMutation) EventsCount() (r int32, exists bool)
EventsCount returns the value of the "eventsCount" field in the mutation.
func (*AlertMutation) EventsCountCleared ¶
func (m *AlertMutation) EventsCountCleared() bool
EventsCountCleared returns if the "eventsCount" field was cleared in this mutation.
func (*AlertMutation) EventsIDs ¶
func (m *AlertMutation) EventsIDs() (ids []int)
EventsIDs returns the "events" edge IDs in the mutation.
func (*AlertMutation) Field ¶
func (m *AlertMutation) Field(name string) (ent.Value, bool)
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.
func (*AlertMutation) FieldCleared ¶
func (m *AlertMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AlertMutation) Fields ¶
func (m *AlertMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*AlertMutation) ID ¶
func (m *AlertMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AlertMutation) IDs ¶ added in v1.3.1
func (m *AlertMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AlertMutation) LeakSpeed ¶
func (m *AlertMutation) LeakSpeed() (r string, exists bool)
LeakSpeed returns the value of the "leakSpeed" field in the mutation.
func (*AlertMutation) LeakSpeedCleared ¶
func (m *AlertMutation) LeakSpeedCleared() bool
LeakSpeedCleared returns if the "leakSpeed" field was cleared in this mutation.
func (*AlertMutation) Message ¶
func (m *AlertMutation) Message() (r string, exists bool)
Message returns the value of the "message" field in the mutation.
func (*AlertMutation) MessageCleared ¶
func (m *AlertMutation) MessageCleared() bool
MessageCleared returns if the "message" field was cleared in this mutation.
func (*AlertMutation) MetasCleared ¶
func (m *AlertMutation) MetasCleared() bool
MetasCleared reports if the "metas" edge to the Meta entity was cleared.
func (*AlertMutation) MetasIDs ¶
func (m *AlertMutation) MetasIDs() (ids []int)
MetasIDs returns the "metas" edge IDs in the mutation.
func (*AlertMutation) OldBucketId ¶
func (m *AlertMutation) OldBucketId(ctx context.Context) (v string, err error)
OldBucketId returns the old "bucketId" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldCapacity ¶
func (m *AlertMutation) OldCapacity(ctx context.Context) (v int32, err error)
OldCapacity returns the old "capacity" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldEventsCount ¶
func (m *AlertMutation) OldEventsCount(ctx context.Context) (v int32, err error)
OldEventsCount returns the old "eventsCount" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*AlertMutation) OldLeakSpeed ¶
func (m *AlertMutation) OldLeakSpeed(ctx context.Context) (v string, err error)
OldLeakSpeed returns the old "leakSpeed" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldMessage ¶
func (m *AlertMutation) OldMessage(ctx context.Context) (v string, err error)
OldMessage returns the old "message" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldScenario ¶
func (m *AlertMutation) OldScenario(ctx context.Context) (v string, err error)
OldScenario returns the old "scenario" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldScenarioHash ¶
func (m *AlertMutation) OldScenarioHash(ctx context.Context) (v string, err error)
OldScenarioHash returns the old "scenarioHash" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldScenarioVersion ¶
func (m *AlertMutation) OldScenarioVersion(ctx context.Context) (v string, err error)
OldScenarioVersion returns the old "scenarioVersion" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSimulated ¶
func (m *AlertMutation) OldSimulated(ctx context.Context) (v bool, err error)
OldSimulated returns the old "simulated" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceAsName ¶
func (m *AlertMutation) OldSourceAsName(ctx context.Context) (v string, err error)
OldSourceAsName returns the old "sourceAsName" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceAsNumber ¶
func (m *AlertMutation) OldSourceAsNumber(ctx context.Context) (v string, err error)
OldSourceAsNumber returns the old "sourceAsNumber" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceCountry ¶
func (m *AlertMutation) OldSourceCountry(ctx context.Context) (v string, err error)
OldSourceCountry returns the old "sourceCountry" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceIp ¶
func (m *AlertMutation) OldSourceIp(ctx context.Context) (v string, err error)
OldSourceIp returns the old "sourceIp" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceLatitude ¶
func (m *AlertMutation) OldSourceLatitude(ctx context.Context) (v float32, err error)
OldSourceLatitude returns the old "sourceLatitude" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceLongitude ¶
func (m *AlertMutation) OldSourceLongitude(ctx context.Context) (v float32, err error)
OldSourceLongitude returns the old "sourceLongitude" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceRange ¶
func (m *AlertMutation) OldSourceRange(ctx context.Context) (v string, err error)
OldSourceRange returns the old "sourceRange" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceScope ¶
func (m *AlertMutation) OldSourceScope(ctx context.Context) (v string, err error)
OldSourceScope returns the old "sourceScope" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldSourceValue ¶
func (m *AlertMutation) OldSourceValue(ctx context.Context) (v string, err error)
OldSourceValue returns the old "sourceValue" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldStartedAt ¶
OldStartedAt returns the old "startedAt" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldStoppedAt ¶
OldStoppedAt returns the old "stoppedAt" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldUUID ¶ added in v1.5.0
func (m *AlertMutation) OldUUID(ctx context.Context) (v string, err error)
OldUUID returns the old "uuid" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Alert entity. If the Alert object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*AlertMutation) OwnerCleared ¶
func (m *AlertMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Machine entity was cleared.
func (*AlertMutation) OwnerID ¶
func (m *AlertMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*AlertMutation) OwnerIDs ¶
func (m *AlertMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*AlertMutation) RemoveDecisionIDs ¶
func (m *AlertMutation) RemoveDecisionIDs(ids ...int)
RemoveDecisionIDs removes the "decisions" edge to the Decision entity by IDs.
func (*AlertMutation) RemoveEventIDs ¶
func (m *AlertMutation) RemoveEventIDs(ids ...int)
RemoveEventIDs removes the "events" edge to the Event entity by IDs.
func (*AlertMutation) RemoveMetaIDs ¶
func (m *AlertMutation) RemoveMetaIDs(ids ...int)
RemoveMetaIDs removes the "metas" edge to the Meta entity by IDs.
func (*AlertMutation) RemovedDecisionsIDs ¶
func (m *AlertMutation) RemovedDecisionsIDs() (ids []int)
RemovedDecisions returns the removed IDs of the "decisions" edge to the Decision entity.
func (*AlertMutation) RemovedEdges ¶
func (m *AlertMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AlertMutation) RemovedEventsIDs ¶
func (m *AlertMutation) RemovedEventsIDs() (ids []int)
RemovedEvents returns the removed IDs of the "events" edge to the Event entity.
func (*AlertMutation) RemovedIDs ¶
func (m *AlertMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*AlertMutation) RemovedMetasIDs ¶
func (m *AlertMutation) RemovedMetasIDs() (ids []int)
RemovedMetas returns the removed IDs of the "metas" edge to the Meta entity.
func (*AlertMutation) ResetBucketId ¶
func (m *AlertMutation) ResetBucketId()
ResetBucketId resets all changes to the "bucketId" field.
func (*AlertMutation) ResetCapacity ¶
func (m *AlertMutation) ResetCapacity()
ResetCapacity resets all changes to the "capacity" field.
func (*AlertMutation) ResetCreatedAt ¶
func (m *AlertMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AlertMutation) ResetDecisions ¶
func (m *AlertMutation) ResetDecisions()
ResetDecisions resets all changes to the "decisions" edge.
func (*AlertMutation) ResetEdge ¶
func (m *AlertMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*AlertMutation) ResetEvents ¶
func (m *AlertMutation) ResetEvents()
ResetEvents resets all changes to the "events" edge.
func (*AlertMutation) ResetEventsCount ¶
func (m *AlertMutation) ResetEventsCount()
ResetEventsCount resets all changes to the "eventsCount" field.
func (*AlertMutation) ResetField ¶
func (m *AlertMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*AlertMutation) ResetLeakSpeed ¶
func (m *AlertMutation) ResetLeakSpeed()
ResetLeakSpeed resets all changes to the "leakSpeed" field.
func (*AlertMutation) ResetMessage ¶
func (m *AlertMutation) ResetMessage()
ResetMessage resets all changes to the "message" field.
func (*AlertMutation) ResetMetas ¶
func (m *AlertMutation) ResetMetas()
ResetMetas resets all changes to the "metas" edge.
func (*AlertMutation) ResetOwner ¶
func (m *AlertMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*AlertMutation) ResetScenario ¶
func (m *AlertMutation) ResetScenario()
ResetScenario resets all changes to the "scenario" field.
func (*AlertMutation) ResetScenarioHash ¶
func (m *AlertMutation) ResetScenarioHash()
ResetScenarioHash resets all changes to the "scenarioHash" field.
func (*AlertMutation) ResetScenarioVersion ¶
func (m *AlertMutation) ResetScenarioVersion()
ResetScenarioVersion resets all changes to the "scenarioVersion" field.
func (*AlertMutation) ResetSimulated ¶
func (m *AlertMutation) ResetSimulated()
ResetSimulated resets all changes to the "simulated" field.
func (*AlertMutation) ResetSourceAsName ¶
func (m *AlertMutation) ResetSourceAsName()
ResetSourceAsName resets all changes to the "sourceAsName" field.
func (*AlertMutation) ResetSourceAsNumber ¶
func (m *AlertMutation) ResetSourceAsNumber()
ResetSourceAsNumber resets all changes to the "sourceAsNumber" field.
func (*AlertMutation) ResetSourceCountry ¶
func (m *AlertMutation) ResetSourceCountry()
ResetSourceCountry resets all changes to the "sourceCountry" field.
func (*AlertMutation) ResetSourceIp ¶
func (m *AlertMutation) ResetSourceIp()
ResetSourceIp resets all changes to the "sourceIp" field.
func (*AlertMutation) ResetSourceLatitude ¶
func (m *AlertMutation) ResetSourceLatitude()
ResetSourceLatitude resets all changes to the "sourceLatitude" field.
func (*AlertMutation) ResetSourceLongitude ¶
func (m *AlertMutation) ResetSourceLongitude()
ResetSourceLongitude resets all changes to the "sourceLongitude" field.
func (*AlertMutation) ResetSourceRange ¶
func (m *AlertMutation) ResetSourceRange()
ResetSourceRange resets all changes to the "sourceRange" field.
func (*AlertMutation) ResetSourceScope ¶
func (m *AlertMutation) ResetSourceScope()
ResetSourceScope resets all changes to the "sourceScope" field.
func (*AlertMutation) ResetSourceValue ¶
func (m *AlertMutation) ResetSourceValue()
ResetSourceValue resets all changes to the "sourceValue" field.
func (*AlertMutation) ResetStartedAt ¶
func (m *AlertMutation) ResetStartedAt()
ResetStartedAt resets all changes to the "startedAt" field.
func (*AlertMutation) ResetStoppedAt ¶
func (m *AlertMutation) ResetStoppedAt()
ResetStoppedAt resets all changes to the "stoppedAt" field.
func (*AlertMutation) ResetUUID ¶ added in v1.5.0
func (m *AlertMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*AlertMutation) ResetUpdatedAt ¶
func (m *AlertMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AlertMutation) Scenario ¶
func (m *AlertMutation) Scenario() (r string, exists bool)
Scenario returns the value of the "scenario" field in the mutation.
func (*AlertMutation) ScenarioHash ¶
func (m *AlertMutation) ScenarioHash() (r string, exists bool)
ScenarioHash returns the value of the "scenarioHash" field in the mutation.
func (*AlertMutation) ScenarioHashCleared ¶
func (m *AlertMutation) ScenarioHashCleared() bool
ScenarioHashCleared returns if the "scenarioHash" field was cleared in this mutation.
func (*AlertMutation) ScenarioVersion ¶
func (m *AlertMutation) ScenarioVersion() (r string, exists bool)
ScenarioVersion returns the value of the "scenarioVersion" field in the mutation.
func (*AlertMutation) ScenarioVersionCleared ¶
func (m *AlertMutation) ScenarioVersionCleared() bool
ScenarioVersionCleared returns if the "scenarioVersion" field was cleared in this mutation.
func (*AlertMutation) SetBucketId ¶
func (m *AlertMutation) SetBucketId(s string)
SetBucketId sets the "bucketId" field.
func (*AlertMutation) SetCapacity ¶
func (m *AlertMutation) SetCapacity(i int32)
SetCapacity sets the "capacity" field.
func (*AlertMutation) SetCreatedAt ¶
func (m *AlertMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AlertMutation) SetEventsCount ¶
func (m *AlertMutation) SetEventsCount(i int32)
SetEventsCount sets the "eventsCount" field.
func (*AlertMutation) SetField ¶
func (m *AlertMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*AlertMutation) SetLeakSpeed ¶
func (m *AlertMutation) SetLeakSpeed(s string)
SetLeakSpeed sets the "leakSpeed" field.
func (*AlertMutation) SetMessage ¶
func (m *AlertMutation) SetMessage(s string)
SetMessage sets the "message" field.
func (*AlertMutation) SetOwnerID ¶
func (m *AlertMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the Machine entity by id.
func (*AlertMutation) SetScenario ¶
func (m *AlertMutation) SetScenario(s string)
SetScenario sets the "scenario" field.
func (*AlertMutation) SetScenarioHash ¶
func (m *AlertMutation) SetScenarioHash(s string)
SetScenarioHash sets the "scenarioHash" field.
func (*AlertMutation) SetScenarioVersion ¶
func (m *AlertMutation) SetScenarioVersion(s string)
SetScenarioVersion sets the "scenarioVersion" field.
func (*AlertMutation) SetSimulated ¶
func (m *AlertMutation) SetSimulated(b bool)
SetSimulated sets the "simulated" field.
func (*AlertMutation) SetSourceAsName ¶
func (m *AlertMutation) SetSourceAsName(s string)
SetSourceAsName sets the "sourceAsName" field.
func (*AlertMutation) SetSourceAsNumber ¶
func (m *AlertMutation) SetSourceAsNumber(s string)
SetSourceAsNumber sets the "sourceAsNumber" field.
func (*AlertMutation) SetSourceCountry ¶
func (m *AlertMutation) SetSourceCountry(s string)
SetSourceCountry sets the "sourceCountry" field.
func (*AlertMutation) SetSourceIp ¶
func (m *AlertMutation) SetSourceIp(s string)
SetSourceIp sets the "sourceIp" field.
func (*AlertMutation) SetSourceLatitude ¶
func (m *AlertMutation) SetSourceLatitude(f float32)
SetSourceLatitude sets the "sourceLatitude" field.
func (*AlertMutation) SetSourceLongitude ¶
func (m *AlertMutation) SetSourceLongitude(f float32)
SetSourceLongitude sets the "sourceLongitude" field.
func (*AlertMutation) SetSourceRange ¶
func (m *AlertMutation) SetSourceRange(s string)
SetSourceRange sets the "sourceRange" field.
func (*AlertMutation) SetSourceScope ¶
func (m *AlertMutation) SetSourceScope(s string)
SetSourceScope sets the "sourceScope" field.
func (*AlertMutation) SetSourceValue ¶
func (m *AlertMutation) SetSourceValue(s string)
SetSourceValue sets the "sourceValue" field.
func (*AlertMutation) SetStartedAt ¶
func (m *AlertMutation) SetStartedAt(t time.Time)
SetStartedAt sets the "startedAt" field.
func (*AlertMutation) SetStoppedAt ¶
func (m *AlertMutation) SetStoppedAt(t time.Time)
SetStoppedAt sets the "stoppedAt" field.
func (*AlertMutation) SetUUID ¶ added in v1.5.0
func (m *AlertMutation) SetUUID(s string)
SetUUID sets the "uuid" field.
func (*AlertMutation) SetUpdatedAt ¶
func (m *AlertMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*AlertMutation) Simulated ¶
func (m *AlertMutation) Simulated() (r bool, exists bool)
Simulated returns the value of the "simulated" field in the mutation.
func (*AlertMutation) SourceAsName ¶
func (m *AlertMutation) SourceAsName() (r string, exists bool)
SourceAsName returns the value of the "sourceAsName" field in the mutation.
func (*AlertMutation) SourceAsNameCleared ¶
func (m *AlertMutation) SourceAsNameCleared() bool
SourceAsNameCleared returns if the "sourceAsName" field was cleared in this mutation.
func (*AlertMutation) SourceAsNumber ¶
func (m *AlertMutation) SourceAsNumber() (r string, exists bool)
SourceAsNumber returns the value of the "sourceAsNumber" field in the mutation.
func (*AlertMutation) SourceAsNumberCleared ¶
func (m *AlertMutation) SourceAsNumberCleared() bool
SourceAsNumberCleared returns if the "sourceAsNumber" field was cleared in this mutation.
func (*AlertMutation) SourceCountry ¶
func (m *AlertMutation) SourceCountry() (r string, exists bool)
SourceCountry returns the value of the "sourceCountry" field in the mutation.
func (*AlertMutation) SourceCountryCleared ¶
func (m *AlertMutation) SourceCountryCleared() bool
SourceCountryCleared returns if the "sourceCountry" field was cleared in this mutation.
func (*AlertMutation) SourceIp ¶
func (m *AlertMutation) SourceIp() (r string, exists bool)
SourceIp returns the value of the "sourceIp" field in the mutation.
func (*AlertMutation) SourceIpCleared ¶
func (m *AlertMutation) SourceIpCleared() bool
SourceIpCleared returns if the "sourceIp" field was cleared in this mutation.
func (*AlertMutation) SourceLatitude ¶
func (m *AlertMutation) SourceLatitude() (r float32, exists bool)
SourceLatitude returns the value of the "sourceLatitude" field in the mutation.
func (*AlertMutation) SourceLatitudeCleared ¶
func (m *AlertMutation) SourceLatitudeCleared() bool
SourceLatitudeCleared returns if the "sourceLatitude" field was cleared in this mutation.
func (*AlertMutation) SourceLongitude ¶
func (m *AlertMutation) SourceLongitude() (r float32, exists bool)
SourceLongitude returns the value of the "sourceLongitude" field in the mutation.
func (*AlertMutation) SourceLongitudeCleared ¶
func (m *AlertMutation) SourceLongitudeCleared() bool
SourceLongitudeCleared returns if the "sourceLongitude" field was cleared in this mutation.
func (*AlertMutation) SourceRange ¶
func (m *AlertMutation) SourceRange() (r string, exists bool)
SourceRange returns the value of the "sourceRange" field in the mutation.
func (*AlertMutation) SourceRangeCleared ¶
func (m *AlertMutation) SourceRangeCleared() bool
SourceRangeCleared returns if the "sourceRange" field was cleared in this mutation.
func (*AlertMutation) SourceScope ¶
func (m *AlertMutation) SourceScope() (r string, exists bool)
SourceScope returns the value of the "sourceScope" field in the mutation.
func (*AlertMutation) SourceScopeCleared ¶
func (m *AlertMutation) SourceScopeCleared() bool
SourceScopeCleared returns if the "sourceScope" field was cleared in this mutation.
func (*AlertMutation) SourceValue ¶
func (m *AlertMutation) SourceValue() (r string, exists bool)
SourceValue returns the value of the "sourceValue" field in the mutation.
func (*AlertMutation) SourceValueCleared ¶
func (m *AlertMutation) SourceValueCleared() bool
SourceValueCleared returns if the "sourceValue" field was cleared in this mutation.
func (*AlertMutation) StartedAt ¶
func (m *AlertMutation) StartedAt() (r time.Time, exists bool)
StartedAt returns the value of the "startedAt" field in the mutation.
func (*AlertMutation) StartedAtCleared ¶
func (m *AlertMutation) StartedAtCleared() bool
StartedAtCleared returns if the "startedAt" field was cleared in this mutation.
func (*AlertMutation) StoppedAt ¶
func (m *AlertMutation) StoppedAt() (r time.Time, exists bool)
StoppedAt returns the value of the "stoppedAt" field in the mutation.
func (*AlertMutation) StoppedAtCleared ¶
func (m *AlertMutation) StoppedAtCleared() bool
StoppedAtCleared returns if the "stoppedAt" field was cleared in this mutation.
func (AlertMutation) Tx ¶
func (m AlertMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AlertMutation) Type ¶
func (m *AlertMutation) Type() string
Type returns the node type of this mutation (Alert).
func (*AlertMutation) UUID ¶ added in v1.5.0
func (m *AlertMutation) UUID() (r string, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*AlertMutation) UUIDCleared ¶ added in v1.5.0
func (m *AlertMutation) UUIDCleared() bool
UUIDCleared returns if the "uuid" field was cleared in this mutation.
func (*AlertMutation) UpdatedAt ¶
func (m *AlertMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AlertMutation) UpdatedAtCleared ¶ added in v1.3.0
func (m *AlertMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*AlertMutation) Where ¶ added in v1.2.1
func (m *AlertMutation) Where(ps ...predicate.Alert)
Where appends a list predicates to the AlertMutation builder.
type AlertQuery ¶
type AlertQuery struct {
// contains filtered or unexported fields
}
AlertQuery is the builder for querying Alert entities.
func (*AlertQuery) All ¶
func (aq *AlertQuery) All(ctx context.Context) ([]*Alert, error)
All executes the query and returns a list of Alerts.
func (*AlertQuery) AllX ¶
func (aq *AlertQuery) AllX(ctx context.Context) []*Alert
AllX is like All, but panics if an error occurs.
func (*AlertQuery) Clone ¶
func (aq *AlertQuery) Clone() *AlertQuery
Clone returns a duplicate of the AlertQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AlertQuery) Count ¶
func (aq *AlertQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AlertQuery) CountX ¶
func (aq *AlertQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AlertQuery) Exist ¶
func (aq *AlertQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AlertQuery) ExistX ¶
func (aq *AlertQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AlertQuery) First ¶
func (aq *AlertQuery) First(ctx context.Context) (*Alert, error)
First returns the first Alert entity from the query. Returns a *NotFoundError when no Alert was found.
func (*AlertQuery) FirstID ¶
func (aq *AlertQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Alert ID from the query. Returns a *NotFoundError when no Alert ID was found.
func (*AlertQuery) FirstIDX ¶ added in v1.0.3
func (aq *AlertQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AlertQuery) FirstX ¶
func (aq *AlertQuery) FirstX(ctx context.Context) *Alert
FirstX is like First, but panics if an error occurs.
func (*AlertQuery) GroupBy ¶
func (aq *AlertQuery) GroupBy(field string, fields ...string) *AlertGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Alert.Query(). GroupBy(alert.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AlertQuery) IDs ¶
func (aq *AlertQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Alert IDs.
func (*AlertQuery) IDsX ¶
func (aq *AlertQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AlertQuery) Limit ¶
func (aq *AlertQuery) Limit(limit int) *AlertQuery
Limit adds a limit step to the query.
func (*AlertQuery) Offset ¶
func (aq *AlertQuery) Offset(offset int) *AlertQuery
Offset adds an offset step to the query.
func (*AlertQuery) Only ¶
func (aq *AlertQuery) Only(ctx context.Context) (*Alert, error)
Only returns a single Alert entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Alert entity is found. Returns a *NotFoundError when no Alert entities are found.
func (*AlertQuery) OnlyID ¶
func (aq *AlertQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Alert ID in the query. Returns a *NotSingularError when more than one Alert ID is found. Returns a *NotFoundError when no entities are found.
func (*AlertQuery) OnlyIDX ¶
func (aq *AlertQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AlertQuery) OnlyX ¶
func (aq *AlertQuery) OnlyX(ctx context.Context) *Alert
OnlyX is like Only, but panics if an error occurs.
func (*AlertQuery) Order ¶
func (aq *AlertQuery) Order(o ...OrderFunc) *AlertQuery
Order adds an order step to the query.
func (*AlertQuery) QueryDecisions ¶
func (aq *AlertQuery) QueryDecisions() *DecisionQuery
QueryDecisions chains the current query on the "decisions" edge.
func (*AlertQuery) QueryEvents ¶
func (aq *AlertQuery) QueryEvents() *EventQuery
QueryEvents chains the current query on the "events" edge.
func (*AlertQuery) QueryMetas ¶
func (aq *AlertQuery) QueryMetas() *MetaQuery
QueryMetas chains the current query on the "metas" edge.
func (*AlertQuery) QueryOwner ¶
func (aq *AlertQuery) QueryOwner() *MachineQuery
QueryOwner chains the current query on the "owner" edge.
func (*AlertQuery) Select ¶
func (aq *AlertQuery) Select(fields ...string) *AlertSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Alert.Query(). Select(alert.FieldCreatedAt). Scan(ctx, &v)
func (*AlertQuery) Unique ¶ added in v1.2.1
func (aq *AlertQuery) Unique(unique bool) *AlertQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*AlertQuery) Where ¶
func (aq *AlertQuery) Where(ps ...predicate.Alert) *AlertQuery
Where adds a new predicate for the AlertQuery builder.
func (*AlertQuery) WithDecisions ¶
func (aq *AlertQuery) WithDecisions(opts ...func(*DecisionQuery)) *AlertQuery
WithDecisions tells the query-builder to eager-load the nodes that are connected to the "decisions" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithEvents ¶
func (aq *AlertQuery) WithEvents(opts ...func(*EventQuery)) *AlertQuery
WithEvents tells the query-builder to eager-load the nodes that are connected to the "events" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithMetas ¶
func (aq *AlertQuery) WithMetas(opts ...func(*MetaQuery)) *AlertQuery
WithMetas tells the query-builder to eager-load the nodes that are connected to the "metas" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithOwner ¶
func (aq *AlertQuery) WithOwner(opts ...func(*MachineQuery)) *AlertQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type AlertSelect ¶
type AlertSelect struct { *AlertQuery // contains filtered or unexported fields }
AlertSelect is the builder for selecting fields of Alert entities.
func (*AlertSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlertSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlertSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlertSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlertSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlertSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlertSelect) Scan ¶
func (as *AlertSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AlertSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlertUpdate ¶
type AlertUpdate struct {
// contains filtered or unexported fields
}
AlertUpdate is the builder for updating Alert entities.
func (*AlertUpdate) AddCapacity ¶
func (au *AlertUpdate) AddCapacity(i int32) *AlertUpdate
AddCapacity adds i to the "capacity" field.
func (*AlertUpdate) AddDecisionIDs ¶
func (au *AlertUpdate) AddDecisionIDs(ids ...int) *AlertUpdate
AddDecisionIDs adds the "decisions" edge to the Decision entity by IDs.
func (*AlertUpdate) AddDecisions ¶
func (au *AlertUpdate) AddDecisions(d ...*Decision) *AlertUpdate
AddDecisions adds the "decisions" edges to the Decision entity.
func (*AlertUpdate) AddEventIDs ¶
func (au *AlertUpdate) AddEventIDs(ids ...int) *AlertUpdate
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*AlertUpdate) AddEvents ¶
func (au *AlertUpdate) AddEvents(e ...*Event) *AlertUpdate
AddEvents adds the "events" edges to the Event entity.
func (*AlertUpdate) AddEventsCount ¶
func (au *AlertUpdate) AddEventsCount(i int32) *AlertUpdate
AddEventsCount adds i to the "eventsCount" field.
func (*AlertUpdate) AddMetaIDs ¶
func (au *AlertUpdate) AddMetaIDs(ids ...int) *AlertUpdate
AddMetaIDs adds the "metas" edge to the Meta entity by IDs.
func (*AlertUpdate) AddMetas ¶
func (au *AlertUpdate) AddMetas(m ...*Meta) *AlertUpdate
AddMetas adds the "metas" edges to the Meta entity.
func (*AlertUpdate) AddSourceLatitude ¶
func (au *AlertUpdate) AddSourceLatitude(f float32) *AlertUpdate
AddSourceLatitude adds f to the "sourceLatitude" field.
func (*AlertUpdate) AddSourceLongitude ¶
func (au *AlertUpdate) AddSourceLongitude(f float32) *AlertUpdate
AddSourceLongitude adds f to the "sourceLongitude" field.
func (*AlertUpdate) ClearBucketId ¶
func (au *AlertUpdate) ClearBucketId() *AlertUpdate
ClearBucketId clears the value of the "bucketId" field.
func (*AlertUpdate) ClearCapacity ¶
func (au *AlertUpdate) ClearCapacity() *AlertUpdate
ClearCapacity clears the value of the "capacity" field.
func (*AlertUpdate) ClearCreatedAt ¶ added in v1.3.0
func (au *AlertUpdate) ClearCreatedAt() *AlertUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*AlertUpdate) ClearDecisions ¶
func (au *AlertUpdate) ClearDecisions() *AlertUpdate
ClearDecisions clears all "decisions" edges to the Decision entity.
func (*AlertUpdate) ClearEvents ¶
func (au *AlertUpdate) ClearEvents() *AlertUpdate
ClearEvents clears all "events" edges to the Event entity.
func (*AlertUpdate) ClearEventsCount ¶
func (au *AlertUpdate) ClearEventsCount() *AlertUpdate
ClearEventsCount clears the value of the "eventsCount" field.
func (*AlertUpdate) ClearLeakSpeed ¶
func (au *AlertUpdate) ClearLeakSpeed() *AlertUpdate
ClearLeakSpeed clears the value of the "leakSpeed" field.
func (*AlertUpdate) ClearMessage ¶
func (au *AlertUpdate) ClearMessage() *AlertUpdate
ClearMessage clears the value of the "message" field.
func (*AlertUpdate) ClearMetas ¶
func (au *AlertUpdate) ClearMetas() *AlertUpdate
ClearMetas clears all "metas" edges to the Meta entity.
func (*AlertUpdate) ClearOwner ¶
func (au *AlertUpdate) ClearOwner() *AlertUpdate
ClearOwner clears the "owner" edge to the Machine entity.
func (*AlertUpdate) ClearScenarioHash ¶
func (au *AlertUpdate) ClearScenarioHash() *AlertUpdate
ClearScenarioHash clears the value of the "scenarioHash" field.
func (*AlertUpdate) ClearScenarioVersion ¶
func (au *AlertUpdate) ClearScenarioVersion() *AlertUpdate
ClearScenarioVersion clears the value of the "scenarioVersion" field.
func (*AlertUpdate) ClearSourceAsName ¶
func (au *AlertUpdate) ClearSourceAsName() *AlertUpdate
ClearSourceAsName clears the value of the "sourceAsName" field.
func (*AlertUpdate) ClearSourceAsNumber ¶
func (au *AlertUpdate) ClearSourceAsNumber() *AlertUpdate
ClearSourceAsNumber clears the value of the "sourceAsNumber" field.
func (*AlertUpdate) ClearSourceCountry ¶
func (au *AlertUpdate) ClearSourceCountry() *AlertUpdate
ClearSourceCountry clears the value of the "sourceCountry" field.
func (*AlertUpdate) ClearSourceIp ¶
func (au *AlertUpdate) ClearSourceIp() *AlertUpdate
ClearSourceIp clears the value of the "sourceIp" field.
func (*AlertUpdate) ClearSourceLatitude ¶
func (au *AlertUpdate) ClearSourceLatitude() *AlertUpdate
ClearSourceLatitude clears the value of the "sourceLatitude" field.
func (*AlertUpdate) ClearSourceLongitude ¶
func (au *AlertUpdate) ClearSourceLongitude() *AlertUpdate
ClearSourceLongitude clears the value of the "sourceLongitude" field.
func (*AlertUpdate) ClearSourceRange ¶
func (au *AlertUpdate) ClearSourceRange() *AlertUpdate
ClearSourceRange clears the value of the "sourceRange" field.
func (*AlertUpdate) ClearSourceScope ¶
func (au *AlertUpdate) ClearSourceScope() *AlertUpdate
ClearSourceScope clears the value of the "sourceScope" field.
func (*AlertUpdate) ClearSourceValue ¶
func (au *AlertUpdate) ClearSourceValue() *AlertUpdate
ClearSourceValue clears the value of the "sourceValue" field.
func (*AlertUpdate) ClearStartedAt ¶
func (au *AlertUpdate) ClearStartedAt() *AlertUpdate
ClearStartedAt clears the value of the "startedAt" field.
func (*AlertUpdate) ClearStoppedAt ¶
func (au *AlertUpdate) ClearStoppedAt() *AlertUpdate
ClearStoppedAt clears the value of the "stoppedAt" field.
func (*AlertUpdate) ClearUUID ¶ added in v1.5.0
func (au *AlertUpdate) ClearUUID() *AlertUpdate
ClearUUID clears the value of the "uuid" field.
func (*AlertUpdate) ClearUpdatedAt ¶ added in v1.3.0
func (au *AlertUpdate) ClearUpdatedAt() *AlertUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*AlertUpdate) Exec ¶
func (au *AlertUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertUpdate) ExecX ¶
func (au *AlertUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertUpdate) Mutation ¶
func (au *AlertUpdate) Mutation() *AlertMutation
Mutation returns the AlertMutation object of the builder.
func (*AlertUpdate) RemoveDecisionIDs ¶
func (au *AlertUpdate) RemoveDecisionIDs(ids ...int) *AlertUpdate
RemoveDecisionIDs removes the "decisions" edge to Decision entities by IDs.
func (*AlertUpdate) RemoveDecisions ¶
func (au *AlertUpdate) RemoveDecisions(d ...*Decision) *AlertUpdate
RemoveDecisions removes "decisions" edges to Decision entities.
func (*AlertUpdate) RemoveEventIDs ¶
func (au *AlertUpdate) RemoveEventIDs(ids ...int) *AlertUpdate
RemoveEventIDs removes the "events" edge to Event entities by IDs.
func (*AlertUpdate) RemoveEvents ¶
func (au *AlertUpdate) RemoveEvents(e ...*Event) *AlertUpdate
RemoveEvents removes "events" edges to Event entities.
func (*AlertUpdate) RemoveMetaIDs ¶
func (au *AlertUpdate) RemoveMetaIDs(ids ...int) *AlertUpdate
RemoveMetaIDs removes the "metas" edge to Meta entities by IDs.
func (*AlertUpdate) RemoveMetas ¶
func (au *AlertUpdate) RemoveMetas(m ...*Meta) *AlertUpdate
RemoveMetas removes "metas" edges to Meta entities.
func (*AlertUpdate) Save ¶
func (au *AlertUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AlertUpdate) SaveX ¶
func (au *AlertUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AlertUpdate) SetBucketId ¶
func (au *AlertUpdate) SetBucketId(s string) *AlertUpdate
SetBucketId sets the "bucketId" field.
func (*AlertUpdate) SetCapacity ¶
func (au *AlertUpdate) SetCapacity(i int32) *AlertUpdate
SetCapacity sets the "capacity" field.
func (*AlertUpdate) SetCreatedAt ¶
func (au *AlertUpdate) SetCreatedAt(t time.Time) *AlertUpdate
SetCreatedAt sets the "created_at" field.
func (*AlertUpdate) SetEventsCount ¶
func (au *AlertUpdate) SetEventsCount(i int32) *AlertUpdate
SetEventsCount sets the "eventsCount" field.
func (*AlertUpdate) SetLeakSpeed ¶
func (au *AlertUpdate) SetLeakSpeed(s string) *AlertUpdate
SetLeakSpeed sets the "leakSpeed" field.
func (*AlertUpdate) SetMessage ¶
func (au *AlertUpdate) SetMessage(s string) *AlertUpdate
SetMessage sets the "message" field.
func (*AlertUpdate) SetNillableBucketId ¶
func (au *AlertUpdate) SetNillableBucketId(s *string) *AlertUpdate
SetNillableBucketId sets the "bucketId" field if the given value is not nil.
func (*AlertUpdate) SetNillableCapacity ¶
func (au *AlertUpdate) SetNillableCapacity(i *int32) *AlertUpdate
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*AlertUpdate) SetNillableEventsCount ¶
func (au *AlertUpdate) SetNillableEventsCount(i *int32) *AlertUpdate
SetNillableEventsCount sets the "eventsCount" field if the given value is not nil.
func (*AlertUpdate) SetNillableLeakSpeed ¶
func (au *AlertUpdate) SetNillableLeakSpeed(s *string) *AlertUpdate
SetNillableLeakSpeed sets the "leakSpeed" field if the given value is not nil.
func (*AlertUpdate) SetNillableMessage ¶
func (au *AlertUpdate) SetNillableMessage(s *string) *AlertUpdate
SetNillableMessage sets the "message" field if the given value is not nil.
func (*AlertUpdate) SetNillableOwnerID ¶
func (au *AlertUpdate) SetNillableOwnerID(id *int) *AlertUpdate
SetNillableOwnerID sets the "owner" edge to the Machine entity by ID if the given value is not nil.
func (*AlertUpdate) SetNillableScenarioHash ¶
func (au *AlertUpdate) SetNillableScenarioHash(s *string) *AlertUpdate
SetNillableScenarioHash sets the "scenarioHash" field if the given value is not nil.
func (*AlertUpdate) SetNillableScenarioVersion ¶
func (au *AlertUpdate) SetNillableScenarioVersion(s *string) *AlertUpdate
SetNillableScenarioVersion sets the "scenarioVersion" field if the given value is not nil.
func (*AlertUpdate) SetNillableSimulated ¶
func (au *AlertUpdate) SetNillableSimulated(b *bool) *AlertUpdate
SetNillableSimulated sets the "simulated" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceAsName ¶
func (au *AlertUpdate) SetNillableSourceAsName(s *string) *AlertUpdate
SetNillableSourceAsName sets the "sourceAsName" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceAsNumber ¶
func (au *AlertUpdate) SetNillableSourceAsNumber(s *string) *AlertUpdate
SetNillableSourceAsNumber sets the "sourceAsNumber" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceCountry ¶
func (au *AlertUpdate) SetNillableSourceCountry(s *string) *AlertUpdate
SetNillableSourceCountry sets the "sourceCountry" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceIp ¶
func (au *AlertUpdate) SetNillableSourceIp(s *string) *AlertUpdate
SetNillableSourceIp sets the "sourceIp" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceLatitude ¶
func (au *AlertUpdate) SetNillableSourceLatitude(f *float32) *AlertUpdate
SetNillableSourceLatitude sets the "sourceLatitude" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceLongitude ¶
func (au *AlertUpdate) SetNillableSourceLongitude(f *float32) *AlertUpdate
SetNillableSourceLongitude sets the "sourceLongitude" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceRange ¶
func (au *AlertUpdate) SetNillableSourceRange(s *string) *AlertUpdate
SetNillableSourceRange sets the "sourceRange" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceScope ¶
func (au *AlertUpdate) SetNillableSourceScope(s *string) *AlertUpdate
SetNillableSourceScope sets the "sourceScope" field if the given value is not nil.
func (*AlertUpdate) SetNillableSourceValue ¶
func (au *AlertUpdate) SetNillableSourceValue(s *string) *AlertUpdate
SetNillableSourceValue sets the "sourceValue" field if the given value is not nil.
func (*AlertUpdate) SetNillableStartedAt ¶
func (au *AlertUpdate) SetNillableStartedAt(t *time.Time) *AlertUpdate
SetNillableStartedAt sets the "startedAt" field if the given value is not nil.
func (*AlertUpdate) SetNillableStoppedAt ¶
func (au *AlertUpdate) SetNillableStoppedAt(t *time.Time) *AlertUpdate
SetNillableStoppedAt sets the "stoppedAt" field if the given value is not nil.
func (*AlertUpdate) SetNillableUUID ¶ added in v1.5.0
func (au *AlertUpdate) SetNillableUUID(s *string) *AlertUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*AlertUpdate) SetOwner ¶
func (au *AlertUpdate) SetOwner(m *Machine) *AlertUpdate
SetOwner sets the "owner" edge to the Machine entity.
func (*AlertUpdate) SetOwnerID ¶
func (au *AlertUpdate) SetOwnerID(id int) *AlertUpdate
SetOwnerID sets the "owner" edge to the Machine entity by ID.
func (*AlertUpdate) SetScenario ¶
func (au *AlertUpdate) SetScenario(s string) *AlertUpdate
SetScenario sets the "scenario" field.
func (*AlertUpdate) SetScenarioHash ¶
func (au *AlertUpdate) SetScenarioHash(s string) *AlertUpdate
SetScenarioHash sets the "scenarioHash" field.
func (*AlertUpdate) SetScenarioVersion ¶
func (au *AlertUpdate) SetScenarioVersion(s string) *AlertUpdate
SetScenarioVersion sets the "scenarioVersion" field.
func (*AlertUpdate) SetSimulated ¶
func (au *AlertUpdate) SetSimulated(b bool) *AlertUpdate
SetSimulated sets the "simulated" field.
func (*AlertUpdate) SetSourceAsName ¶
func (au *AlertUpdate) SetSourceAsName(s string) *AlertUpdate
SetSourceAsName sets the "sourceAsName" field.
func (*AlertUpdate) SetSourceAsNumber ¶
func (au *AlertUpdate) SetSourceAsNumber(s string) *AlertUpdate
SetSourceAsNumber sets the "sourceAsNumber" field.
func (*AlertUpdate) SetSourceCountry ¶
func (au *AlertUpdate) SetSourceCountry(s string) *AlertUpdate
SetSourceCountry sets the "sourceCountry" field.
func (*AlertUpdate) SetSourceIp ¶
func (au *AlertUpdate) SetSourceIp(s string) *AlertUpdate
SetSourceIp sets the "sourceIp" field.
func (*AlertUpdate) SetSourceLatitude ¶
func (au *AlertUpdate) SetSourceLatitude(f float32) *AlertUpdate
SetSourceLatitude sets the "sourceLatitude" field.
func (*AlertUpdate) SetSourceLongitude ¶
func (au *AlertUpdate) SetSourceLongitude(f float32) *AlertUpdate
SetSourceLongitude sets the "sourceLongitude" field.
func (*AlertUpdate) SetSourceRange ¶
func (au *AlertUpdate) SetSourceRange(s string) *AlertUpdate
SetSourceRange sets the "sourceRange" field.
func (*AlertUpdate) SetSourceScope ¶
func (au *AlertUpdate) SetSourceScope(s string) *AlertUpdate
SetSourceScope sets the "sourceScope" field.
func (*AlertUpdate) SetSourceValue ¶
func (au *AlertUpdate) SetSourceValue(s string) *AlertUpdate
SetSourceValue sets the "sourceValue" field.
func (*AlertUpdate) SetStartedAt ¶
func (au *AlertUpdate) SetStartedAt(t time.Time) *AlertUpdate
SetStartedAt sets the "startedAt" field.
func (*AlertUpdate) SetStoppedAt ¶
func (au *AlertUpdate) SetStoppedAt(t time.Time) *AlertUpdate
SetStoppedAt sets the "stoppedAt" field.
func (*AlertUpdate) SetUUID ¶ added in v1.5.0
func (au *AlertUpdate) SetUUID(s string) *AlertUpdate
SetUUID sets the "uuid" field.
func (*AlertUpdate) SetUpdatedAt ¶
func (au *AlertUpdate) SetUpdatedAt(t time.Time) *AlertUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AlertUpdate) Where ¶
func (au *AlertUpdate) Where(ps ...predicate.Alert) *AlertUpdate
Where appends a list predicates to the AlertUpdate builder.
type AlertUpdateOne ¶
type AlertUpdateOne struct {
// contains filtered or unexported fields
}
AlertUpdateOne is the builder for updating a single Alert entity.
func (*AlertUpdateOne) AddCapacity ¶
func (auo *AlertUpdateOne) AddCapacity(i int32) *AlertUpdateOne
AddCapacity adds i to the "capacity" field.
func (*AlertUpdateOne) AddDecisionIDs ¶
func (auo *AlertUpdateOne) AddDecisionIDs(ids ...int) *AlertUpdateOne
AddDecisionIDs adds the "decisions" edge to the Decision entity by IDs.
func (*AlertUpdateOne) AddDecisions ¶
func (auo *AlertUpdateOne) AddDecisions(d ...*Decision) *AlertUpdateOne
AddDecisions adds the "decisions" edges to the Decision entity.
func (*AlertUpdateOne) AddEventIDs ¶
func (auo *AlertUpdateOne) AddEventIDs(ids ...int) *AlertUpdateOne
AddEventIDs adds the "events" edge to the Event entity by IDs.
func (*AlertUpdateOne) AddEvents ¶
func (auo *AlertUpdateOne) AddEvents(e ...*Event) *AlertUpdateOne
AddEvents adds the "events" edges to the Event entity.
func (*AlertUpdateOne) AddEventsCount ¶
func (auo *AlertUpdateOne) AddEventsCount(i int32) *AlertUpdateOne
AddEventsCount adds i to the "eventsCount" field.
func (*AlertUpdateOne) AddMetaIDs ¶
func (auo *AlertUpdateOne) AddMetaIDs(ids ...int) *AlertUpdateOne
AddMetaIDs adds the "metas" edge to the Meta entity by IDs.
func (*AlertUpdateOne) AddMetas ¶
func (auo *AlertUpdateOne) AddMetas(m ...*Meta) *AlertUpdateOne
AddMetas adds the "metas" edges to the Meta entity.
func (*AlertUpdateOne) AddSourceLatitude ¶
func (auo *AlertUpdateOne) AddSourceLatitude(f float32) *AlertUpdateOne
AddSourceLatitude adds f to the "sourceLatitude" field.
func (*AlertUpdateOne) AddSourceLongitude ¶
func (auo *AlertUpdateOne) AddSourceLongitude(f float32) *AlertUpdateOne
AddSourceLongitude adds f to the "sourceLongitude" field.
func (*AlertUpdateOne) ClearBucketId ¶
func (auo *AlertUpdateOne) ClearBucketId() *AlertUpdateOne
ClearBucketId clears the value of the "bucketId" field.
func (*AlertUpdateOne) ClearCapacity ¶
func (auo *AlertUpdateOne) ClearCapacity() *AlertUpdateOne
ClearCapacity clears the value of the "capacity" field.
func (*AlertUpdateOne) ClearCreatedAt ¶ added in v1.3.0
func (auo *AlertUpdateOne) ClearCreatedAt() *AlertUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*AlertUpdateOne) ClearDecisions ¶
func (auo *AlertUpdateOne) ClearDecisions() *AlertUpdateOne
ClearDecisions clears all "decisions" edges to the Decision entity.
func (*AlertUpdateOne) ClearEvents ¶
func (auo *AlertUpdateOne) ClearEvents() *AlertUpdateOne
ClearEvents clears all "events" edges to the Event entity.
func (*AlertUpdateOne) ClearEventsCount ¶
func (auo *AlertUpdateOne) ClearEventsCount() *AlertUpdateOne
ClearEventsCount clears the value of the "eventsCount" field.
func (*AlertUpdateOne) ClearLeakSpeed ¶
func (auo *AlertUpdateOne) ClearLeakSpeed() *AlertUpdateOne
ClearLeakSpeed clears the value of the "leakSpeed" field.
func (*AlertUpdateOne) ClearMessage ¶
func (auo *AlertUpdateOne) ClearMessage() *AlertUpdateOne
ClearMessage clears the value of the "message" field.
func (*AlertUpdateOne) ClearMetas ¶
func (auo *AlertUpdateOne) ClearMetas() *AlertUpdateOne
ClearMetas clears all "metas" edges to the Meta entity.
func (*AlertUpdateOne) ClearOwner ¶
func (auo *AlertUpdateOne) ClearOwner() *AlertUpdateOne
ClearOwner clears the "owner" edge to the Machine entity.
func (*AlertUpdateOne) ClearScenarioHash ¶
func (auo *AlertUpdateOne) ClearScenarioHash() *AlertUpdateOne
ClearScenarioHash clears the value of the "scenarioHash" field.
func (*AlertUpdateOne) ClearScenarioVersion ¶
func (auo *AlertUpdateOne) ClearScenarioVersion() *AlertUpdateOne
ClearScenarioVersion clears the value of the "scenarioVersion" field.
func (*AlertUpdateOne) ClearSourceAsName ¶
func (auo *AlertUpdateOne) ClearSourceAsName() *AlertUpdateOne
ClearSourceAsName clears the value of the "sourceAsName" field.
func (*AlertUpdateOne) ClearSourceAsNumber ¶
func (auo *AlertUpdateOne) ClearSourceAsNumber() *AlertUpdateOne
ClearSourceAsNumber clears the value of the "sourceAsNumber" field.
func (*AlertUpdateOne) ClearSourceCountry ¶
func (auo *AlertUpdateOne) ClearSourceCountry() *AlertUpdateOne
ClearSourceCountry clears the value of the "sourceCountry" field.
func (*AlertUpdateOne) ClearSourceIp ¶
func (auo *AlertUpdateOne) ClearSourceIp() *AlertUpdateOne
ClearSourceIp clears the value of the "sourceIp" field.
func (*AlertUpdateOne) ClearSourceLatitude ¶
func (auo *AlertUpdateOne) ClearSourceLatitude() *AlertUpdateOne
ClearSourceLatitude clears the value of the "sourceLatitude" field.
func (*AlertUpdateOne) ClearSourceLongitude ¶
func (auo *AlertUpdateOne) ClearSourceLongitude() *AlertUpdateOne
ClearSourceLongitude clears the value of the "sourceLongitude" field.
func (*AlertUpdateOne) ClearSourceRange ¶
func (auo *AlertUpdateOne) ClearSourceRange() *AlertUpdateOne
ClearSourceRange clears the value of the "sourceRange" field.
func (*AlertUpdateOne) ClearSourceScope ¶
func (auo *AlertUpdateOne) ClearSourceScope() *AlertUpdateOne
ClearSourceScope clears the value of the "sourceScope" field.
func (*AlertUpdateOne) ClearSourceValue ¶
func (auo *AlertUpdateOne) ClearSourceValue() *AlertUpdateOne
ClearSourceValue clears the value of the "sourceValue" field.
func (*AlertUpdateOne) ClearStartedAt ¶
func (auo *AlertUpdateOne) ClearStartedAt() *AlertUpdateOne
ClearStartedAt clears the value of the "startedAt" field.
func (*AlertUpdateOne) ClearStoppedAt ¶
func (auo *AlertUpdateOne) ClearStoppedAt() *AlertUpdateOne
ClearStoppedAt clears the value of the "stoppedAt" field.
func (*AlertUpdateOne) ClearUUID ¶ added in v1.5.0
func (auo *AlertUpdateOne) ClearUUID() *AlertUpdateOne
ClearUUID clears the value of the "uuid" field.
func (*AlertUpdateOne) ClearUpdatedAt ¶ added in v1.3.0
func (auo *AlertUpdateOne) ClearUpdatedAt() *AlertUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*AlertUpdateOne) Exec ¶
func (auo *AlertUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AlertUpdateOne) ExecX ¶
func (auo *AlertUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertUpdateOne) Mutation ¶
func (auo *AlertUpdateOne) Mutation() *AlertMutation
Mutation returns the AlertMutation object of the builder.
func (*AlertUpdateOne) RemoveDecisionIDs ¶
func (auo *AlertUpdateOne) RemoveDecisionIDs(ids ...int) *AlertUpdateOne
RemoveDecisionIDs removes the "decisions" edge to Decision entities by IDs.
func (*AlertUpdateOne) RemoveDecisions ¶
func (auo *AlertUpdateOne) RemoveDecisions(d ...*Decision) *AlertUpdateOne
RemoveDecisions removes "decisions" edges to Decision entities.
func (*AlertUpdateOne) RemoveEventIDs ¶
func (auo *AlertUpdateOne) RemoveEventIDs(ids ...int) *AlertUpdateOne
RemoveEventIDs removes the "events" edge to Event entities by IDs.
func (*AlertUpdateOne) RemoveEvents ¶
func (auo *AlertUpdateOne) RemoveEvents(e ...*Event) *AlertUpdateOne
RemoveEvents removes "events" edges to Event entities.
func (*AlertUpdateOne) RemoveMetaIDs ¶
func (auo *AlertUpdateOne) RemoveMetaIDs(ids ...int) *AlertUpdateOne
RemoveMetaIDs removes the "metas" edge to Meta entities by IDs.
func (*AlertUpdateOne) RemoveMetas ¶
func (auo *AlertUpdateOne) RemoveMetas(m ...*Meta) *AlertUpdateOne
RemoveMetas removes "metas" edges to Meta entities.
func (*AlertUpdateOne) Save ¶
func (auo *AlertUpdateOne) Save(ctx context.Context) (*Alert, error)
Save executes the query and returns the updated Alert entity.
func (*AlertUpdateOne) SaveX ¶
func (auo *AlertUpdateOne) SaveX(ctx context.Context) *Alert
SaveX is like Save, but panics if an error occurs.
func (*AlertUpdateOne) Select ¶ added in v1.2.1
func (auo *AlertUpdateOne) Select(field string, fields ...string) *AlertUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AlertUpdateOne) SetBucketId ¶
func (auo *AlertUpdateOne) SetBucketId(s string) *AlertUpdateOne
SetBucketId sets the "bucketId" field.
func (*AlertUpdateOne) SetCapacity ¶
func (auo *AlertUpdateOne) SetCapacity(i int32) *AlertUpdateOne
SetCapacity sets the "capacity" field.
func (*AlertUpdateOne) SetCreatedAt ¶
func (auo *AlertUpdateOne) SetCreatedAt(t time.Time) *AlertUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AlertUpdateOne) SetEventsCount ¶
func (auo *AlertUpdateOne) SetEventsCount(i int32) *AlertUpdateOne
SetEventsCount sets the "eventsCount" field.
func (*AlertUpdateOne) SetLeakSpeed ¶
func (auo *AlertUpdateOne) SetLeakSpeed(s string) *AlertUpdateOne
SetLeakSpeed sets the "leakSpeed" field.
func (*AlertUpdateOne) SetMessage ¶
func (auo *AlertUpdateOne) SetMessage(s string) *AlertUpdateOne
SetMessage sets the "message" field.
func (*AlertUpdateOne) SetNillableBucketId ¶
func (auo *AlertUpdateOne) SetNillableBucketId(s *string) *AlertUpdateOne
SetNillableBucketId sets the "bucketId" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableCapacity ¶
func (auo *AlertUpdateOne) SetNillableCapacity(i *int32) *AlertUpdateOne
SetNillableCapacity sets the "capacity" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableEventsCount ¶
func (auo *AlertUpdateOne) SetNillableEventsCount(i *int32) *AlertUpdateOne
SetNillableEventsCount sets the "eventsCount" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableLeakSpeed ¶
func (auo *AlertUpdateOne) SetNillableLeakSpeed(s *string) *AlertUpdateOne
SetNillableLeakSpeed sets the "leakSpeed" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableMessage ¶
func (auo *AlertUpdateOne) SetNillableMessage(s *string) *AlertUpdateOne
SetNillableMessage sets the "message" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableOwnerID ¶
func (auo *AlertUpdateOne) SetNillableOwnerID(id *int) *AlertUpdateOne
SetNillableOwnerID sets the "owner" edge to the Machine entity by ID if the given value is not nil.
func (*AlertUpdateOne) SetNillableScenarioHash ¶
func (auo *AlertUpdateOne) SetNillableScenarioHash(s *string) *AlertUpdateOne
SetNillableScenarioHash sets the "scenarioHash" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableScenarioVersion ¶
func (auo *AlertUpdateOne) SetNillableScenarioVersion(s *string) *AlertUpdateOne
SetNillableScenarioVersion sets the "scenarioVersion" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSimulated ¶
func (auo *AlertUpdateOne) SetNillableSimulated(b *bool) *AlertUpdateOne
SetNillableSimulated sets the "simulated" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceAsName ¶
func (auo *AlertUpdateOne) SetNillableSourceAsName(s *string) *AlertUpdateOne
SetNillableSourceAsName sets the "sourceAsName" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceAsNumber ¶
func (auo *AlertUpdateOne) SetNillableSourceAsNumber(s *string) *AlertUpdateOne
SetNillableSourceAsNumber sets the "sourceAsNumber" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceCountry ¶
func (auo *AlertUpdateOne) SetNillableSourceCountry(s *string) *AlertUpdateOne
SetNillableSourceCountry sets the "sourceCountry" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceIp ¶
func (auo *AlertUpdateOne) SetNillableSourceIp(s *string) *AlertUpdateOne
SetNillableSourceIp sets the "sourceIp" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceLatitude ¶
func (auo *AlertUpdateOne) SetNillableSourceLatitude(f *float32) *AlertUpdateOne
SetNillableSourceLatitude sets the "sourceLatitude" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceLongitude ¶
func (auo *AlertUpdateOne) SetNillableSourceLongitude(f *float32) *AlertUpdateOne
SetNillableSourceLongitude sets the "sourceLongitude" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceRange ¶
func (auo *AlertUpdateOne) SetNillableSourceRange(s *string) *AlertUpdateOne
SetNillableSourceRange sets the "sourceRange" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceScope ¶
func (auo *AlertUpdateOne) SetNillableSourceScope(s *string) *AlertUpdateOne
SetNillableSourceScope sets the "sourceScope" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableSourceValue ¶
func (auo *AlertUpdateOne) SetNillableSourceValue(s *string) *AlertUpdateOne
SetNillableSourceValue sets the "sourceValue" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableStartedAt ¶
func (auo *AlertUpdateOne) SetNillableStartedAt(t *time.Time) *AlertUpdateOne
SetNillableStartedAt sets the "startedAt" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableStoppedAt ¶
func (auo *AlertUpdateOne) SetNillableStoppedAt(t *time.Time) *AlertUpdateOne
SetNillableStoppedAt sets the "stoppedAt" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableUUID ¶ added in v1.5.0
func (auo *AlertUpdateOne) SetNillableUUID(s *string) *AlertUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*AlertUpdateOne) SetOwner ¶
func (auo *AlertUpdateOne) SetOwner(m *Machine) *AlertUpdateOne
SetOwner sets the "owner" edge to the Machine entity.
func (*AlertUpdateOne) SetOwnerID ¶
func (auo *AlertUpdateOne) SetOwnerID(id int) *AlertUpdateOne
SetOwnerID sets the "owner" edge to the Machine entity by ID.
func (*AlertUpdateOne) SetScenario ¶
func (auo *AlertUpdateOne) SetScenario(s string) *AlertUpdateOne
SetScenario sets the "scenario" field.
func (*AlertUpdateOne) SetScenarioHash ¶
func (auo *AlertUpdateOne) SetScenarioHash(s string) *AlertUpdateOne
SetScenarioHash sets the "scenarioHash" field.
func (*AlertUpdateOne) SetScenarioVersion ¶
func (auo *AlertUpdateOne) SetScenarioVersion(s string) *AlertUpdateOne
SetScenarioVersion sets the "scenarioVersion" field.
func (*AlertUpdateOne) SetSimulated ¶
func (auo *AlertUpdateOne) SetSimulated(b bool) *AlertUpdateOne
SetSimulated sets the "simulated" field.
func (*AlertUpdateOne) SetSourceAsName ¶
func (auo *AlertUpdateOne) SetSourceAsName(s string) *AlertUpdateOne
SetSourceAsName sets the "sourceAsName" field.
func (*AlertUpdateOne) SetSourceAsNumber ¶
func (auo *AlertUpdateOne) SetSourceAsNumber(s string) *AlertUpdateOne
SetSourceAsNumber sets the "sourceAsNumber" field.
func (*AlertUpdateOne) SetSourceCountry ¶
func (auo *AlertUpdateOne) SetSourceCountry(s string) *AlertUpdateOne
SetSourceCountry sets the "sourceCountry" field.
func (*AlertUpdateOne) SetSourceIp ¶
func (auo *AlertUpdateOne) SetSourceIp(s string) *AlertUpdateOne
SetSourceIp sets the "sourceIp" field.
func (*AlertUpdateOne) SetSourceLatitude ¶
func (auo *AlertUpdateOne) SetSourceLatitude(f float32) *AlertUpdateOne
SetSourceLatitude sets the "sourceLatitude" field.
func (*AlertUpdateOne) SetSourceLongitude ¶
func (auo *AlertUpdateOne) SetSourceLongitude(f float32) *AlertUpdateOne
SetSourceLongitude sets the "sourceLongitude" field.
func (*AlertUpdateOne) SetSourceRange ¶
func (auo *AlertUpdateOne) SetSourceRange(s string) *AlertUpdateOne
SetSourceRange sets the "sourceRange" field.
func (*AlertUpdateOne) SetSourceScope ¶
func (auo *AlertUpdateOne) SetSourceScope(s string) *AlertUpdateOne
SetSourceScope sets the "sourceScope" field.
func (*AlertUpdateOne) SetSourceValue ¶
func (auo *AlertUpdateOne) SetSourceValue(s string) *AlertUpdateOne
SetSourceValue sets the "sourceValue" field.
func (*AlertUpdateOne) SetStartedAt ¶
func (auo *AlertUpdateOne) SetStartedAt(t time.Time) *AlertUpdateOne
SetStartedAt sets the "startedAt" field.
func (*AlertUpdateOne) SetStoppedAt ¶
func (auo *AlertUpdateOne) SetStoppedAt(t time.Time) *AlertUpdateOne
SetStoppedAt sets the "stoppedAt" field.
func (*AlertUpdateOne) SetUUID ¶ added in v1.5.0
func (auo *AlertUpdateOne) SetUUID(s string) *AlertUpdateOne
SetUUID sets the "uuid" field.
func (*AlertUpdateOne) SetUpdatedAt ¶
func (auo *AlertUpdateOne) SetUpdatedAt(t time.Time) *AlertUpdateOne
SetUpdatedAt sets the "updated_at" field.
type Bouncer ¶
type Bouncer struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at"` // Name holds the value of the "name" field. Name string `json:"name"` // APIKey holds the value of the "api_key" field. APIKey string `json:"api_key"` // Revoked holds the value of the "revoked" field. Revoked bool `json:"revoked"` // IPAddress holds the value of the "ip_address" field. IPAddress string `json:"ip_address"` // Type holds the value of the "type" field. Type string `json:"type"` // Version holds the value of the "version" field. Version string `json:"version"` // Until holds the value of the "until" field. Until time.Time `json:"until"` // LastPull holds the value of the "last_pull" field. LastPull time.Time `json:"last_pull"` // AuthType holds the value of the "auth_type" field. AuthType string `json:"auth_type"` // contains filtered or unexported fields }
Bouncer is the model entity for the Bouncer schema.
func (*Bouncer) Unwrap ¶
Unwrap unwraps the Bouncer entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Bouncer) Update ¶
func (b *Bouncer) Update() *BouncerUpdateOne
Update returns a builder for updating this Bouncer. Note that you need to call Bouncer.Unwrap() before calling this method if this Bouncer was returned from a transaction, and the transaction was committed or rolled back.
type BouncerClient ¶
type BouncerClient struct {
// contains filtered or unexported fields
}
BouncerClient is a client for the Bouncer schema.
func NewBouncerClient ¶
func NewBouncerClient(c config) *BouncerClient
NewBouncerClient returns a client for the Bouncer from the given config.
func (*BouncerClient) Create ¶
func (c *BouncerClient) Create() *BouncerCreate
Create returns a builder for creating a Bouncer entity.
func (*BouncerClient) CreateBulk ¶
func (c *BouncerClient) CreateBulk(builders ...*BouncerCreate) *BouncerCreateBulk
CreateBulk returns a builder for creating a bulk of Bouncer entities.
func (*BouncerClient) Delete ¶
func (c *BouncerClient) Delete() *BouncerDelete
Delete returns a delete builder for Bouncer.
func (*BouncerClient) DeleteOne ¶
func (c *BouncerClient) DeleteOne(b *Bouncer) *BouncerDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BouncerClient) DeleteOneID ¶
func (c *BouncerClient) DeleteOneID(id int) *BouncerDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*BouncerClient) GetX ¶
func (c *BouncerClient) GetX(ctx context.Context, id int) *Bouncer
GetX is like Get, but panics if an error occurs.
func (*BouncerClient) Hooks ¶
func (c *BouncerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*BouncerClient) Query ¶
func (c *BouncerClient) Query() *BouncerQuery
Query returns a query builder for Bouncer.
func (*BouncerClient) Update ¶
func (c *BouncerClient) Update() *BouncerUpdate
Update returns an update builder for Bouncer.
func (*BouncerClient) UpdateOne ¶
func (c *BouncerClient) UpdateOne(b *Bouncer) *BouncerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BouncerClient) UpdateOneID ¶
func (c *BouncerClient) UpdateOneID(id int) *BouncerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BouncerClient) Use ¶
func (c *BouncerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `bouncer.Hooks(f(g(h())))`.
type BouncerCreate ¶
type BouncerCreate struct {
// contains filtered or unexported fields
}
BouncerCreate is the builder for creating a Bouncer entity.
func (*BouncerCreate) Exec ¶ added in v1.2.1
func (bc *BouncerCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BouncerCreate) ExecX ¶ added in v1.2.1
func (bc *BouncerCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BouncerCreate) Mutation ¶
func (bc *BouncerCreate) Mutation() *BouncerMutation
Mutation returns the BouncerMutation object of the builder.
func (*BouncerCreate) Save ¶
func (bc *BouncerCreate) Save(ctx context.Context) (*Bouncer, error)
Save creates the Bouncer in the database.
func (*BouncerCreate) SaveX ¶
func (bc *BouncerCreate) SaveX(ctx context.Context) *Bouncer
SaveX calls Save and panics if Save returns an error.
func (*BouncerCreate) SetAPIKey ¶
func (bc *BouncerCreate) SetAPIKey(s string) *BouncerCreate
SetAPIKey sets the "api_key" field.
func (*BouncerCreate) SetAuthType ¶ added in v1.4.0
func (bc *BouncerCreate) SetAuthType(s string) *BouncerCreate
SetAuthType sets the "auth_type" field.
func (*BouncerCreate) SetCreatedAt ¶
func (bc *BouncerCreate) SetCreatedAt(t time.Time) *BouncerCreate
SetCreatedAt sets the "created_at" field.
func (*BouncerCreate) SetIPAddress ¶
func (bc *BouncerCreate) SetIPAddress(s string) *BouncerCreate
SetIPAddress sets the "ip_address" field.
func (*BouncerCreate) SetLastPull ¶
func (bc *BouncerCreate) SetLastPull(t time.Time) *BouncerCreate
SetLastPull sets the "last_pull" field.
func (*BouncerCreate) SetName ¶
func (bc *BouncerCreate) SetName(s string) *BouncerCreate
SetName sets the "name" field.
func (*BouncerCreate) SetNillableAuthType ¶ added in v1.4.0
func (bc *BouncerCreate) SetNillableAuthType(s *string) *BouncerCreate
SetNillableAuthType sets the "auth_type" field if the given value is not nil.
func (*BouncerCreate) SetNillableCreatedAt ¶
func (bc *BouncerCreate) SetNillableCreatedAt(t *time.Time) *BouncerCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BouncerCreate) SetNillableIPAddress ¶
func (bc *BouncerCreate) SetNillableIPAddress(s *string) *BouncerCreate
SetNillableIPAddress sets the "ip_address" field if the given value is not nil.
func (*BouncerCreate) SetNillableLastPull ¶
func (bc *BouncerCreate) SetNillableLastPull(t *time.Time) *BouncerCreate
SetNillableLastPull sets the "last_pull" field if the given value is not nil.
func (*BouncerCreate) SetNillableType ¶
func (bc *BouncerCreate) SetNillableType(s *string) *BouncerCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*BouncerCreate) SetNillableUntil ¶
func (bc *BouncerCreate) SetNillableUntil(t *time.Time) *BouncerCreate
SetNillableUntil sets the "until" field if the given value is not nil.
func (*BouncerCreate) SetNillableUpdatedAt ¶
func (bc *BouncerCreate) SetNillableUpdatedAt(t *time.Time) *BouncerCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*BouncerCreate) SetNillableVersion ¶
func (bc *BouncerCreate) SetNillableVersion(s *string) *BouncerCreate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*BouncerCreate) SetRevoked ¶
func (bc *BouncerCreate) SetRevoked(b bool) *BouncerCreate
SetRevoked sets the "revoked" field.
func (*BouncerCreate) SetType ¶
func (bc *BouncerCreate) SetType(s string) *BouncerCreate
SetType sets the "type" field.
func (*BouncerCreate) SetUntil ¶
func (bc *BouncerCreate) SetUntil(t time.Time) *BouncerCreate
SetUntil sets the "until" field.
func (*BouncerCreate) SetUpdatedAt ¶
func (bc *BouncerCreate) SetUpdatedAt(t time.Time) *BouncerCreate
SetUpdatedAt sets the "updated_at" field.
func (*BouncerCreate) SetVersion ¶
func (bc *BouncerCreate) SetVersion(s string) *BouncerCreate
SetVersion sets the "version" field.
type BouncerCreateBulk ¶
type BouncerCreateBulk struct {
// contains filtered or unexported fields
}
BouncerCreateBulk is the builder for creating many Bouncer entities in bulk.
func (*BouncerCreateBulk) Exec ¶ added in v1.2.1
func (bcb *BouncerCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BouncerCreateBulk) ExecX ¶ added in v1.2.1
func (bcb *BouncerCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BouncerDelete ¶
type BouncerDelete struct {
// contains filtered or unexported fields
}
BouncerDelete is the builder for deleting a Bouncer entity.
func (*BouncerDelete) Exec ¶
func (bd *BouncerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BouncerDelete) ExecX ¶
func (bd *BouncerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BouncerDelete) Where ¶
func (bd *BouncerDelete) Where(ps ...predicate.Bouncer) *BouncerDelete
Where appends a list predicates to the BouncerDelete builder.
type BouncerDeleteOne ¶
type BouncerDeleteOne struct {
// contains filtered or unexported fields
}
BouncerDeleteOne is the builder for deleting a single Bouncer entity.
func (*BouncerDeleteOne) Exec ¶
func (bdo *BouncerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BouncerDeleteOne) ExecX ¶
func (bdo *BouncerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type BouncerGroupBy ¶
type BouncerGroupBy struct {
// contains filtered or unexported fields
}
BouncerGroupBy is the group-by builder for Bouncer entities.
func (*BouncerGroupBy) Aggregate ¶
func (bgb *BouncerGroupBy) Aggregate(fns ...AggregateFunc) *BouncerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BouncerGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BouncerGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BouncerGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BouncerGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BouncerGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BouncerGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BouncerGroupBy) Scan ¶
func (bgb *BouncerGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*BouncerGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BouncerMutation ¶
type BouncerMutation struct {
// contains filtered or unexported fields
}
BouncerMutation represents an operation that mutates the Bouncer nodes in the graph.
func (*BouncerMutation) APIKey ¶
func (m *BouncerMutation) APIKey() (r string, exists bool)
APIKey returns the value of the "api_key" field in the mutation.
func (*BouncerMutation) AddField ¶
func (m *BouncerMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*BouncerMutation) AddedEdges ¶
func (m *BouncerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BouncerMutation) AddedField ¶
func (m *BouncerMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on 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.
func (*BouncerMutation) AddedFields ¶
func (m *BouncerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BouncerMutation) AddedIDs ¶
func (m *BouncerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BouncerMutation) AuthType ¶ added in v1.4.0
func (m *BouncerMutation) AuthType() (r string, exists bool)
AuthType returns the value of the "auth_type" field in the mutation.
func (*BouncerMutation) ClearCreatedAt ¶ added in v1.3.0
func (m *BouncerMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*BouncerMutation) ClearEdge ¶
func (m *BouncerMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*BouncerMutation) ClearField ¶
func (m *BouncerMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*BouncerMutation) ClearIPAddress ¶
func (m *BouncerMutation) ClearIPAddress()
ClearIPAddress clears the value of the "ip_address" field.
func (*BouncerMutation) ClearType ¶
func (m *BouncerMutation) ClearType()
ClearType clears the value of the "type" field.
func (*BouncerMutation) ClearUntil ¶
func (m *BouncerMutation) ClearUntil()
ClearUntil clears the value of the "until" field.
func (*BouncerMutation) ClearUpdatedAt ¶ added in v1.3.0
func (m *BouncerMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*BouncerMutation) ClearVersion ¶
func (m *BouncerMutation) ClearVersion()
ClearVersion clears the value of the "version" field.
func (*BouncerMutation) ClearedEdges ¶
func (m *BouncerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BouncerMutation) ClearedFields ¶
func (m *BouncerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BouncerMutation) Client ¶
func (m BouncerMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*BouncerMutation) CreatedAt ¶
func (m *BouncerMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*BouncerMutation) CreatedAtCleared ¶ added in v1.3.0
func (m *BouncerMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*BouncerMutation) EdgeCleared ¶
func (m *BouncerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BouncerMutation) Field ¶
func (m *BouncerMutation) Field(name string) (ent.Value, bool)
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.
func (*BouncerMutation) FieldCleared ¶
func (m *BouncerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BouncerMutation) Fields ¶
func (m *BouncerMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*BouncerMutation) GetType ¶
func (m *BouncerMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*BouncerMutation) ID ¶
func (m *BouncerMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*BouncerMutation) IDs ¶ added in v1.3.1
func (m *BouncerMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*BouncerMutation) IPAddress ¶
func (m *BouncerMutation) IPAddress() (r string, exists bool)
IPAddress returns the value of the "ip_address" field in the mutation.
func (*BouncerMutation) IPAddressCleared ¶
func (m *BouncerMutation) IPAddressCleared() bool
IPAddressCleared returns if the "ip_address" field was cleared in this mutation.
func (*BouncerMutation) LastPull ¶
func (m *BouncerMutation) LastPull() (r time.Time, exists bool)
LastPull returns the value of the "last_pull" field in the mutation.
func (*BouncerMutation) Name ¶
func (m *BouncerMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*BouncerMutation) OldAPIKey ¶
func (m *BouncerMutation) OldAPIKey(ctx context.Context) (v string, err error)
OldAPIKey returns the old "api_key" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldAuthType ¶ added in v1.4.0
func (m *BouncerMutation) OldAuthType(ctx context.Context) (v string, err error)
OldAuthType returns the old "auth_type" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*BouncerMutation) OldIPAddress ¶
func (m *BouncerMutation) OldIPAddress(ctx context.Context) (v string, err error)
OldIPAddress returns the old "ip_address" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldLastPull ¶
OldLastPull returns the old "last_pull" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldName ¶
func (m *BouncerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldRevoked ¶
func (m *BouncerMutation) OldRevoked(ctx context.Context) (v bool, err error)
OldRevoked returns the old "revoked" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldType ¶
func (m *BouncerMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldUntil ¶
OldUntil returns the old "until" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) OldVersion ¶
func (m *BouncerMutation) OldVersion(ctx context.Context) (v string, err error)
OldVersion returns the old "version" field's value of the Bouncer entity. If the Bouncer object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*BouncerMutation) RemovedEdges ¶
func (m *BouncerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BouncerMutation) RemovedIDs ¶
func (m *BouncerMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*BouncerMutation) ResetAPIKey ¶
func (m *BouncerMutation) ResetAPIKey()
ResetAPIKey resets all changes to the "api_key" field.
func (*BouncerMutation) ResetAuthType ¶ added in v1.4.0
func (m *BouncerMutation) ResetAuthType()
ResetAuthType resets all changes to the "auth_type" field.
func (*BouncerMutation) ResetCreatedAt ¶
func (m *BouncerMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*BouncerMutation) ResetEdge ¶
func (m *BouncerMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*BouncerMutation) ResetField ¶
func (m *BouncerMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*BouncerMutation) ResetIPAddress ¶
func (m *BouncerMutation) ResetIPAddress()
ResetIPAddress resets all changes to the "ip_address" field.
func (*BouncerMutation) ResetLastPull ¶
func (m *BouncerMutation) ResetLastPull()
ResetLastPull resets all changes to the "last_pull" field.
func (*BouncerMutation) ResetName ¶
func (m *BouncerMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*BouncerMutation) ResetRevoked ¶
func (m *BouncerMutation) ResetRevoked()
ResetRevoked resets all changes to the "revoked" field.
func (*BouncerMutation) ResetType ¶
func (m *BouncerMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*BouncerMutation) ResetUntil ¶
func (m *BouncerMutation) ResetUntil()
ResetUntil resets all changes to the "until" field.
func (*BouncerMutation) ResetUpdatedAt ¶
func (m *BouncerMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*BouncerMutation) ResetVersion ¶
func (m *BouncerMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*BouncerMutation) Revoked ¶
func (m *BouncerMutation) Revoked() (r bool, exists bool)
Revoked returns the value of the "revoked" field in the mutation.
func (*BouncerMutation) SetAPIKey ¶
func (m *BouncerMutation) SetAPIKey(s string)
SetAPIKey sets the "api_key" field.
func (*BouncerMutation) SetAuthType ¶ added in v1.4.0
func (m *BouncerMutation) SetAuthType(s string)
SetAuthType sets the "auth_type" field.
func (*BouncerMutation) SetCreatedAt ¶
func (m *BouncerMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*BouncerMutation) SetField ¶
func (m *BouncerMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*BouncerMutation) SetIPAddress ¶
func (m *BouncerMutation) SetIPAddress(s string)
SetIPAddress sets the "ip_address" field.
func (*BouncerMutation) SetLastPull ¶
func (m *BouncerMutation) SetLastPull(t time.Time)
SetLastPull sets the "last_pull" field.
func (*BouncerMutation) SetName ¶
func (m *BouncerMutation) SetName(s string)
SetName sets the "name" field.
func (*BouncerMutation) SetRevoked ¶
func (m *BouncerMutation) SetRevoked(b bool)
SetRevoked sets the "revoked" field.
func (*BouncerMutation) SetType ¶
func (m *BouncerMutation) SetType(s string)
SetType sets the "type" field.
func (*BouncerMutation) SetUntil ¶
func (m *BouncerMutation) SetUntil(t time.Time)
SetUntil sets the "until" field.
func (*BouncerMutation) SetUpdatedAt ¶
func (m *BouncerMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*BouncerMutation) SetVersion ¶
func (m *BouncerMutation) SetVersion(s string)
SetVersion sets the "version" field.
func (BouncerMutation) Tx ¶
func (m BouncerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BouncerMutation) Type ¶
func (m *BouncerMutation) Type() string
Type returns the node type of this mutation (Bouncer).
func (*BouncerMutation) TypeCleared ¶
func (m *BouncerMutation) TypeCleared() bool
TypeCleared returns if the "type" field was cleared in this mutation.
func (*BouncerMutation) Until ¶
func (m *BouncerMutation) Until() (r time.Time, exists bool)
Until returns the value of the "until" field in the mutation.
func (*BouncerMutation) UntilCleared ¶
func (m *BouncerMutation) UntilCleared() bool
UntilCleared returns if the "until" field was cleared in this mutation.
func (*BouncerMutation) UpdatedAt ¶
func (m *BouncerMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*BouncerMutation) UpdatedAtCleared ¶ added in v1.3.0
func (m *BouncerMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*BouncerMutation) Version ¶
func (m *BouncerMutation) Version() (r string, exists bool)
Version returns the value of the "version" field in the mutation.
func (*BouncerMutation) VersionCleared ¶
func (m *BouncerMutation) VersionCleared() bool
VersionCleared returns if the "version" field was cleared in this mutation.
func (*BouncerMutation) Where ¶ added in v1.2.1
func (m *BouncerMutation) Where(ps ...predicate.Bouncer)
Where appends a list predicates to the BouncerMutation builder.
type BouncerQuery ¶
type BouncerQuery struct {
// contains filtered or unexported fields
}
BouncerQuery is the builder for querying Bouncer entities.
func (*BouncerQuery) All ¶
func (bq *BouncerQuery) All(ctx context.Context) ([]*Bouncer, error)
All executes the query and returns a list of Bouncers.
func (*BouncerQuery) AllX ¶
func (bq *BouncerQuery) AllX(ctx context.Context) []*Bouncer
AllX is like All, but panics if an error occurs.
func (*BouncerQuery) Clone ¶
func (bq *BouncerQuery) Clone() *BouncerQuery
Clone returns a duplicate of the BouncerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BouncerQuery) Count ¶
func (bq *BouncerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BouncerQuery) CountX ¶
func (bq *BouncerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BouncerQuery) Exist ¶
func (bq *BouncerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BouncerQuery) ExistX ¶
func (bq *BouncerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BouncerQuery) First ¶
func (bq *BouncerQuery) First(ctx context.Context) (*Bouncer, error)
First returns the first Bouncer entity from the query. Returns a *NotFoundError when no Bouncer was found.
func (*BouncerQuery) FirstID ¶
func (bq *BouncerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Bouncer ID from the query. Returns a *NotFoundError when no Bouncer ID was found.
func (*BouncerQuery) FirstIDX ¶ added in v1.0.3
func (bq *BouncerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*BouncerQuery) FirstX ¶
func (bq *BouncerQuery) FirstX(ctx context.Context) *Bouncer
FirstX is like First, but panics if an error occurs.
func (*BouncerQuery) GroupBy ¶
func (bq *BouncerQuery) GroupBy(field string, fields ...string) *BouncerGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at"` Count int `json:"count,omitempty"` } client.Bouncer.Query(). GroupBy(bouncer.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BouncerQuery) IDs ¶
func (bq *BouncerQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Bouncer IDs.
func (*BouncerQuery) IDsX ¶
func (bq *BouncerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*BouncerQuery) Limit ¶
func (bq *BouncerQuery) Limit(limit int) *BouncerQuery
Limit adds a limit step to the query.
func (*BouncerQuery) Offset ¶
func (bq *BouncerQuery) Offset(offset int) *BouncerQuery
Offset adds an offset step to the query.
func (*BouncerQuery) Only ¶
func (bq *BouncerQuery) Only(ctx context.Context) (*Bouncer, error)
Only returns a single Bouncer entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Bouncer entity is found. Returns a *NotFoundError when no Bouncer entities are found.
func (*BouncerQuery) OnlyID ¶
func (bq *BouncerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Bouncer ID in the query. Returns a *NotSingularError when more than one Bouncer ID is found. Returns a *NotFoundError when no entities are found.
func (*BouncerQuery) OnlyIDX ¶
func (bq *BouncerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BouncerQuery) OnlyX ¶
func (bq *BouncerQuery) OnlyX(ctx context.Context) *Bouncer
OnlyX is like Only, but panics if an error occurs.
func (*BouncerQuery) Order ¶
func (bq *BouncerQuery) Order(o ...OrderFunc) *BouncerQuery
Order adds an order step to the query.
func (*BouncerQuery) Select ¶
func (bq *BouncerQuery) Select(fields ...string) *BouncerSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at"` } client.Bouncer.Query(). Select(bouncer.FieldCreatedAt). Scan(ctx, &v)
func (*BouncerQuery) Unique ¶ added in v1.2.1
func (bq *BouncerQuery) Unique(unique bool) *BouncerQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*BouncerQuery) Where ¶
func (bq *BouncerQuery) Where(ps ...predicate.Bouncer) *BouncerQuery
Where adds a new predicate for the BouncerQuery builder.
type BouncerSelect ¶
type BouncerSelect struct { *BouncerQuery // contains filtered or unexported fields }
BouncerSelect is the builder for selecting fields of Bouncer entities.
func (*BouncerSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BouncerSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BouncerSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BouncerSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BouncerSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BouncerSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BouncerSelect) Scan ¶
func (bs *BouncerSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BouncerSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BouncerUpdate ¶
type BouncerUpdate struct {
// contains filtered or unexported fields
}
BouncerUpdate is the builder for updating Bouncer entities.
func (*BouncerUpdate) ClearCreatedAt ¶ added in v1.3.0
func (bu *BouncerUpdate) ClearCreatedAt() *BouncerUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*BouncerUpdate) ClearIPAddress ¶
func (bu *BouncerUpdate) ClearIPAddress() *BouncerUpdate
ClearIPAddress clears the value of the "ip_address" field.
func (*BouncerUpdate) ClearType ¶
func (bu *BouncerUpdate) ClearType() *BouncerUpdate
ClearType clears the value of the "type" field.
func (*BouncerUpdate) ClearUntil ¶
func (bu *BouncerUpdate) ClearUntil() *BouncerUpdate
ClearUntil clears the value of the "until" field.
func (*BouncerUpdate) ClearUpdatedAt ¶ added in v1.3.0
func (bu *BouncerUpdate) ClearUpdatedAt() *BouncerUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*BouncerUpdate) ClearVersion ¶
func (bu *BouncerUpdate) ClearVersion() *BouncerUpdate
ClearVersion clears the value of the "version" field.
func (*BouncerUpdate) Exec ¶
func (bu *BouncerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BouncerUpdate) ExecX ¶
func (bu *BouncerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BouncerUpdate) Mutation ¶
func (bu *BouncerUpdate) Mutation() *BouncerMutation
Mutation returns the BouncerMutation object of the builder.
func (*BouncerUpdate) Save ¶
func (bu *BouncerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BouncerUpdate) SaveX ¶
func (bu *BouncerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BouncerUpdate) SetAPIKey ¶
func (bu *BouncerUpdate) SetAPIKey(s string) *BouncerUpdate
SetAPIKey sets the "api_key" field.
func (*BouncerUpdate) SetAuthType ¶ added in v1.4.0
func (bu *BouncerUpdate) SetAuthType(s string) *BouncerUpdate
SetAuthType sets the "auth_type" field.
func (*BouncerUpdate) SetCreatedAt ¶
func (bu *BouncerUpdate) SetCreatedAt(t time.Time) *BouncerUpdate
SetCreatedAt sets the "created_at" field.
func (*BouncerUpdate) SetIPAddress ¶
func (bu *BouncerUpdate) SetIPAddress(s string) *BouncerUpdate
SetIPAddress sets the "ip_address" field.
func (*BouncerUpdate) SetLastPull ¶
func (bu *BouncerUpdate) SetLastPull(t time.Time) *BouncerUpdate
SetLastPull sets the "last_pull" field.
func (*BouncerUpdate) SetName ¶
func (bu *BouncerUpdate) SetName(s string) *BouncerUpdate
SetName sets the "name" field.
func (*BouncerUpdate) SetNillableAuthType ¶ added in v1.4.0
func (bu *BouncerUpdate) SetNillableAuthType(s *string) *BouncerUpdate
SetNillableAuthType sets the "auth_type" field if the given value is not nil.
func (*BouncerUpdate) SetNillableIPAddress ¶
func (bu *BouncerUpdate) SetNillableIPAddress(s *string) *BouncerUpdate
SetNillableIPAddress sets the "ip_address" field if the given value is not nil.
func (*BouncerUpdate) SetNillableLastPull ¶
func (bu *BouncerUpdate) SetNillableLastPull(t *time.Time) *BouncerUpdate
SetNillableLastPull sets the "last_pull" field if the given value is not nil.
func (*BouncerUpdate) SetNillableType ¶
func (bu *BouncerUpdate) SetNillableType(s *string) *BouncerUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*BouncerUpdate) SetNillableUntil ¶
func (bu *BouncerUpdate) SetNillableUntil(t *time.Time) *BouncerUpdate
SetNillableUntil sets the "until" field if the given value is not nil.
func (*BouncerUpdate) SetNillableVersion ¶
func (bu *BouncerUpdate) SetNillableVersion(s *string) *BouncerUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*BouncerUpdate) SetRevoked ¶
func (bu *BouncerUpdate) SetRevoked(b bool) *BouncerUpdate
SetRevoked sets the "revoked" field.
func (*BouncerUpdate) SetType ¶
func (bu *BouncerUpdate) SetType(s string) *BouncerUpdate
SetType sets the "type" field.
func (*BouncerUpdate) SetUntil ¶
func (bu *BouncerUpdate) SetUntil(t time.Time) *BouncerUpdate
SetUntil sets the "until" field.
func (*BouncerUpdate) SetUpdatedAt ¶
func (bu *BouncerUpdate) SetUpdatedAt(t time.Time) *BouncerUpdate
SetUpdatedAt sets the "updated_at" field.
func (*BouncerUpdate) SetVersion ¶
func (bu *BouncerUpdate) SetVersion(s string) *BouncerUpdate
SetVersion sets the "version" field.
func (*BouncerUpdate) Where ¶
func (bu *BouncerUpdate) Where(ps ...predicate.Bouncer) *BouncerUpdate
Where appends a list predicates to the BouncerUpdate builder.
type BouncerUpdateOne ¶
type BouncerUpdateOne struct {
// contains filtered or unexported fields
}
BouncerUpdateOne is the builder for updating a single Bouncer entity.
func (*BouncerUpdateOne) ClearCreatedAt ¶ added in v1.3.0
func (buo *BouncerUpdateOne) ClearCreatedAt() *BouncerUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*BouncerUpdateOne) ClearIPAddress ¶
func (buo *BouncerUpdateOne) ClearIPAddress() *BouncerUpdateOne
ClearIPAddress clears the value of the "ip_address" field.
func (*BouncerUpdateOne) ClearType ¶
func (buo *BouncerUpdateOne) ClearType() *BouncerUpdateOne
ClearType clears the value of the "type" field.
func (*BouncerUpdateOne) ClearUntil ¶
func (buo *BouncerUpdateOne) ClearUntil() *BouncerUpdateOne
ClearUntil clears the value of the "until" field.
func (*BouncerUpdateOne) ClearUpdatedAt ¶ added in v1.3.0
func (buo *BouncerUpdateOne) ClearUpdatedAt() *BouncerUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*BouncerUpdateOne) ClearVersion ¶
func (buo *BouncerUpdateOne) ClearVersion() *BouncerUpdateOne
ClearVersion clears the value of the "version" field.
func (*BouncerUpdateOne) Exec ¶
func (buo *BouncerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BouncerUpdateOne) ExecX ¶
func (buo *BouncerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BouncerUpdateOne) Mutation ¶
func (buo *BouncerUpdateOne) Mutation() *BouncerMutation
Mutation returns the BouncerMutation object of the builder.
func (*BouncerUpdateOne) Save ¶
func (buo *BouncerUpdateOne) Save(ctx context.Context) (*Bouncer, error)
Save executes the query and returns the updated Bouncer entity.
func (*BouncerUpdateOne) SaveX ¶
func (buo *BouncerUpdateOne) SaveX(ctx context.Context) *Bouncer
SaveX is like Save, but panics if an error occurs.
func (*BouncerUpdateOne) Select ¶ added in v1.2.1
func (buo *BouncerUpdateOne) Select(field string, fields ...string) *BouncerUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BouncerUpdateOne) SetAPIKey ¶
func (buo *BouncerUpdateOne) SetAPIKey(s string) *BouncerUpdateOne
SetAPIKey sets the "api_key" field.
func (*BouncerUpdateOne) SetAuthType ¶ added in v1.4.0
func (buo *BouncerUpdateOne) SetAuthType(s string) *BouncerUpdateOne
SetAuthType sets the "auth_type" field.
func (*BouncerUpdateOne) SetCreatedAt ¶
func (buo *BouncerUpdateOne) SetCreatedAt(t time.Time) *BouncerUpdateOne
SetCreatedAt sets the "created_at" field.
func (*BouncerUpdateOne) SetIPAddress ¶
func (buo *BouncerUpdateOne) SetIPAddress(s string) *BouncerUpdateOne
SetIPAddress sets the "ip_address" field.
func (*BouncerUpdateOne) SetLastPull ¶
func (buo *BouncerUpdateOne) SetLastPull(t time.Time) *BouncerUpdateOne
SetLastPull sets the "last_pull" field.
func (*BouncerUpdateOne) SetName ¶
func (buo *BouncerUpdateOne) SetName(s string) *BouncerUpdateOne
SetName sets the "name" field.
func (*BouncerUpdateOne) SetNillableAuthType ¶ added in v1.4.0
func (buo *BouncerUpdateOne) SetNillableAuthType(s *string) *BouncerUpdateOne
SetNillableAuthType sets the "auth_type" field if the given value is not nil.
func (*BouncerUpdateOne) SetNillableIPAddress ¶
func (buo *BouncerUpdateOne) SetNillableIPAddress(s *string) *BouncerUpdateOne
SetNillableIPAddress sets the "ip_address" field if the given value is not nil.
func (*BouncerUpdateOne) SetNillableLastPull ¶
func (buo *BouncerUpdateOne) SetNillableLastPull(t *time.Time) *BouncerUpdateOne
SetNillableLastPull sets the "last_pull" field if the given value is not nil.
func (*BouncerUpdateOne) SetNillableType ¶
func (buo *BouncerUpdateOne) SetNillableType(s *string) *BouncerUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*BouncerUpdateOne) SetNillableUntil ¶
func (buo *BouncerUpdateOne) SetNillableUntil(t *time.Time) *BouncerUpdateOne
SetNillableUntil sets the "until" field if the given value is not nil.
func (*BouncerUpdateOne) SetNillableVersion ¶
func (buo *BouncerUpdateOne) SetNillableVersion(s *string) *BouncerUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*BouncerUpdateOne) SetRevoked ¶
func (buo *BouncerUpdateOne) SetRevoked(b bool) *BouncerUpdateOne
SetRevoked sets the "revoked" field.
func (*BouncerUpdateOne) SetType ¶
func (buo *BouncerUpdateOne) SetType(s string) *BouncerUpdateOne
SetType sets the "type" field.
func (*BouncerUpdateOne) SetUntil ¶
func (buo *BouncerUpdateOne) SetUntil(t time.Time) *BouncerUpdateOne
SetUntil sets the "until" field.
func (*BouncerUpdateOne) SetUpdatedAt ¶
func (buo *BouncerUpdateOne) SetUpdatedAt(t time.Time) *BouncerUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*BouncerUpdateOne) SetVersion ¶
func (buo *BouncerUpdateOne) SetVersion(s string) *BouncerUpdateOne
SetVersion sets the "version" field.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Alert is the client for interacting with the Alert builders. Alert *AlertClient // Bouncer is the client for interacting with the Bouncer builders. Bouncer *BouncerClient // ConfigItem is the client for interacting with the ConfigItem builders. ConfigItem *ConfigItemClient // Decision is the client for interacting with the Decision builders. Decision *DecisionClient // Event is the client for interacting with the Event builders. Event *EventClient // Machine is the client for interacting with the Machine builders. Machine *MachineClient // Meta is the client for interacting with the Meta builders. Meta *MetaClient // contains filtered or unexported fields }
Client is the client that holds all ent builders.
func FromContext ¶
FromContext returns a Client stored inside a context, or nil if there isn't one.
func Open ¶
Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.
func (*Client) Debug ¶
Debug returns a new debug-client. It's used to get verbose logging on specific operations.
client.Debug(). Alert. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConfigItem ¶ added in v1.5.0
type ConfigItem struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at"` // Name holds the value of the "name" field. Name string `json:"name"` // Value holds the value of the "value" field. Value string `json:"value"` // contains filtered or unexported fields }
ConfigItem is the model entity for the ConfigItem schema.
func (*ConfigItem) String ¶ added in v1.5.0
func (ci *ConfigItem) String() string
String implements the fmt.Stringer.
func (*ConfigItem) Unwrap ¶ added in v1.5.0
func (ci *ConfigItem) Unwrap() *ConfigItem
Unwrap unwraps the ConfigItem entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*ConfigItem) Update ¶ added in v1.5.0
func (ci *ConfigItem) Update() *ConfigItemUpdateOne
Update returns a builder for updating this ConfigItem. Note that you need to call ConfigItem.Unwrap() before calling this method if this ConfigItem was returned from a transaction, and the transaction was committed or rolled back.
type ConfigItemClient ¶ added in v1.5.0
type ConfigItemClient struct {
// contains filtered or unexported fields
}
ConfigItemClient is a client for the ConfigItem schema.
func NewConfigItemClient ¶ added in v1.5.0
func NewConfigItemClient(c config) *ConfigItemClient
NewConfigItemClient returns a client for the ConfigItem from the given config.
func (*ConfigItemClient) Create ¶ added in v1.5.0
func (c *ConfigItemClient) Create() *ConfigItemCreate
Create returns a create builder for ConfigItem.
func (*ConfigItemClient) CreateBulk ¶ added in v1.5.0
func (c *ConfigItemClient) CreateBulk(builders ...*ConfigItemCreate) *ConfigItemCreateBulk
CreateBulk returns a builder for creating a bulk of ConfigItem entities.
func (*ConfigItemClient) Delete ¶ added in v1.5.0
func (c *ConfigItemClient) Delete() *ConfigItemDelete
Delete returns a delete builder for ConfigItem.
func (*ConfigItemClient) DeleteOne ¶ added in v1.5.0
func (c *ConfigItemClient) DeleteOne(ci *ConfigItem) *ConfigItemDeleteOne
DeleteOne returns a delete builder for the given entity.
func (*ConfigItemClient) DeleteOneID ¶ added in v1.5.0
func (c *ConfigItemClient) DeleteOneID(id int) *ConfigItemDeleteOne
DeleteOneID returns a delete builder for the given id.
func (*ConfigItemClient) Get ¶ added in v1.5.0
func (c *ConfigItemClient) Get(ctx context.Context, id int) (*ConfigItem, error)
Get returns a ConfigItem entity by its id.
func (*ConfigItemClient) GetX ¶ added in v1.5.0
func (c *ConfigItemClient) GetX(ctx context.Context, id int) *ConfigItem
GetX is like Get, but panics if an error occurs.
func (*ConfigItemClient) Hooks ¶ added in v1.5.0
func (c *ConfigItemClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ConfigItemClient) Query ¶ added in v1.5.0
func (c *ConfigItemClient) Query() *ConfigItemQuery
Query returns a query builder for ConfigItem.
func (*ConfigItemClient) Update ¶ added in v1.5.0
func (c *ConfigItemClient) Update() *ConfigItemUpdate
Update returns an update builder for ConfigItem.
func (*ConfigItemClient) UpdateOne ¶ added in v1.5.0
func (c *ConfigItemClient) UpdateOne(ci *ConfigItem) *ConfigItemUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ConfigItemClient) UpdateOneID ¶ added in v1.5.0
func (c *ConfigItemClient) UpdateOneID(id int) *ConfigItemUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ConfigItemClient) Use ¶ added in v1.5.0
func (c *ConfigItemClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `configitem.Hooks(f(g(h())))`.
type ConfigItemCreate ¶ added in v1.5.0
type ConfigItemCreate struct {
// contains filtered or unexported fields
}
ConfigItemCreate is the builder for creating a ConfigItem entity.
func (*ConfigItemCreate) Exec ¶ added in v1.5.0
func (cic *ConfigItemCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConfigItemCreate) ExecX ¶ added in v1.5.0
func (cic *ConfigItemCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigItemCreate) Mutation ¶ added in v1.5.0
func (cic *ConfigItemCreate) Mutation() *ConfigItemMutation
Mutation returns the ConfigItemMutation object of the builder.
func (*ConfigItemCreate) Save ¶ added in v1.5.0
func (cic *ConfigItemCreate) Save(ctx context.Context) (*ConfigItem, error)
Save creates the ConfigItem in the database.
func (*ConfigItemCreate) SaveX ¶ added in v1.5.0
func (cic *ConfigItemCreate) SaveX(ctx context.Context) *ConfigItem
SaveX calls Save and panics if Save returns an error.
func (*ConfigItemCreate) SetCreatedAt ¶ added in v1.5.0
func (cic *ConfigItemCreate) SetCreatedAt(t time.Time) *ConfigItemCreate
SetCreatedAt sets the "created_at" field.
func (*ConfigItemCreate) SetName ¶ added in v1.5.0
func (cic *ConfigItemCreate) SetName(s string) *ConfigItemCreate
SetName sets the "name" field.
func (*ConfigItemCreate) SetNillableCreatedAt ¶ added in v1.5.0
func (cic *ConfigItemCreate) SetNillableCreatedAt(t *time.Time) *ConfigItemCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ConfigItemCreate) SetNillableUpdatedAt ¶ added in v1.5.0
func (cic *ConfigItemCreate) SetNillableUpdatedAt(t *time.Time) *ConfigItemCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ConfigItemCreate) SetUpdatedAt ¶ added in v1.5.0
func (cic *ConfigItemCreate) SetUpdatedAt(t time.Time) *ConfigItemCreate
SetUpdatedAt sets the "updated_at" field.
func (*ConfigItemCreate) SetValue ¶ added in v1.5.0
func (cic *ConfigItemCreate) SetValue(s string) *ConfigItemCreate
SetValue sets the "value" field.
type ConfigItemCreateBulk ¶ added in v1.5.0
type ConfigItemCreateBulk struct {
// contains filtered or unexported fields
}
ConfigItemCreateBulk is the builder for creating many ConfigItem entities in bulk.
func (*ConfigItemCreateBulk) Exec ¶ added in v1.5.0
func (cicb *ConfigItemCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ConfigItemCreateBulk) ExecX ¶ added in v1.5.0
func (cicb *ConfigItemCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigItemCreateBulk) Save ¶ added in v1.5.0
func (cicb *ConfigItemCreateBulk) Save(ctx context.Context) ([]*ConfigItem, error)
Save creates the ConfigItem entities in the database.
func (*ConfigItemCreateBulk) SaveX ¶ added in v1.5.0
func (cicb *ConfigItemCreateBulk) SaveX(ctx context.Context) []*ConfigItem
SaveX is like Save, but panics if an error occurs.
type ConfigItemDelete ¶ added in v1.5.0
type ConfigItemDelete struct {
// contains filtered or unexported fields
}
ConfigItemDelete is the builder for deleting a ConfigItem entity.
func (*ConfigItemDelete) Exec ¶ added in v1.5.0
func (cid *ConfigItemDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ConfigItemDelete) ExecX ¶ added in v1.5.0
func (cid *ConfigItemDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ConfigItemDelete) Where ¶ added in v1.5.0
func (cid *ConfigItemDelete) Where(ps ...predicate.ConfigItem) *ConfigItemDelete
Where appends a list predicates to the ConfigItemDelete builder.
type ConfigItemDeleteOne ¶ added in v1.5.0
type ConfigItemDeleteOne struct {
// contains filtered or unexported fields
}
ConfigItemDeleteOne is the builder for deleting a single ConfigItem entity.
func (*ConfigItemDeleteOne) Exec ¶ added in v1.5.0
func (cido *ConfigItemDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ConfigItemDeleteOne) ExecX ¶ added in v1.5.0
func (cido *ConfigItemDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ConfigItemGroupBy ¶ added in v1.5.0
type ConfigItemGroupBy struct {
// contains filtered or unexported fields
}
ConfigItemGroupBy is the group-by builder for ConfigItem entities.
func (*ConfigItemGroupBy) Aggregate ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Aggregate(fns ...AggregateFunc) *ConfigItemGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ConfigItemGroupBy) Bool ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ConfigItemGroupBy) BoolX ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ConfigItemGroupBy) Bools ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.
func (*ConfigItemGroupBy) BoolsX ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ConfigItemGroupBy) Float64 ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ConfigItemGroupBy) Float64X ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ConfigItemGroupBy) Float64s ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.
func (*ConfigItemGroupBy) Float64sX ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ConfigItemGroupBy) Int ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ConfigItemGroupBy) IntX ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ConfigItemGroupBy) Ints ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.
func (*ConfigItemGroupBy) IntsX ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ConfigItemGroupBy) Scan ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) Scan(ctx context.Context, v interface{}) error
Scan applies the group-by query and scans the result into the given value.
func (*ConfigItemGroupBy) ScanX ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ConfigItemGroupBy) String ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) String(ctx context.Context) (_ string, err error)
String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.
func (*ConfigItemGroupBy) StringX ¶ added in v1.5.0
func (cigb *ConfigItemGroupBy) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ConfigItemMutation ¶ added in v1.5.0
type ConfigItemMutation struct {
// contains filtered or unexported fields
}
ConfigItemMutation represents an operation that mutates the ConfigItem nodes in the graph.
func (*ConfigItemMutation) AddField ¶ added in v1.5.0
func (m *ConfigItemMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ConfigItemMutation) AddedEdges ¶ added in v1.5.0
func (m *ConfigItemMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ConfigItemMutation) AddedField ¶ added in v1.5.0
func (m *ConfigItemMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on 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.
func (*ConfigItemMutation) AddedFields ¶ added in v1.5.0
func (m *ConfigItemMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ConfigItemMutation) AddedIDs ¶ added in v1.5.0
func (m *ConfigItemMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ConfigItemMutation) ClearCreatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*ConfigItemMutation) ClearEdge ¶ added in v1.5.0
func (m *ConfigItemMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*ConfigItemMutation) ClearField ¶ added in v1.5.0
func (m *ConfigItemMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*ConfigItemMutation) ClearUpdatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ConfigItemMutation) ClearedEdges ¶ added in v1.5.0
func (m *ConfigItemMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ConfigItemMutation) ClearedFields ¶ added in v1.5.0
func (m *ConfigItemMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ConfigItemMutation) Client ¶ added in v1.5.0
func (m ConfigItemMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*ConfigItemMutation) CreatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ConfigItemMutation) CreatedAtCleared ¶ added in v1.5.0
func (m *ConfigItemMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*ConfigItemMutation) EdgeCleared ¶ added in v1.5.0
func (m *ConfigItemMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ConfigItemMutation) Field ¶ added in v1.5.0
func (m *ConfigItemMutation) Field(name string) (ent.Value, bool)
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.
func (*ConfigItemMutation) FieldCleared ¶ added in v1.5.0
func (m *ConfigItemMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ConfigItemMutation) Fields ¶ added in v1.5.0
func (m *ConfigItemMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*ConfigItemMutation) ID ¶ added in v1.5.0
func (m *ConfigItemMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ConfigItemMutation) IDs ¶ added in v1.5.0
func (m *ConfigItemMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ConfigItemMutation) Name ¶ added in v1.5.0
func (m *ConfigItemMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ConfigItemMutation) OldCreatedAt ¶ added in v1.5.0
OldCreatedAt returns the old "created_at" field's value of the ConfigItem entity. If the ConfigItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ConfigItemMutation) OldField ¶ added in v1.5.0
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*ConfigItemMutation) OldName ¶ added in v1.5.0
func (m *ConfigItemMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ConfigItem entity. If the ConfigItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ConfigItemMutation) OldUpdatedAt ¶ added in v1.5.0
OldUpdatedAt returns the old "updated_at" field's value of the ConfigItem entity. If the ConfigItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ConfigItemMutation) OldValue ¶ added in v1.5.0
func (m *ConfigItemMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the ConfigItem entity. If the ConfigItem object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ConfigItemMutation) Op ¶ added in v1.5.0
func (m *ConfigItemMutation) Op() Op
Op returns the operation name.
func (*ConfigItemMutation) RemovedEdges ¶ added in v1.5.0
func (m *ConfigItemMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ConfigItemMutation) RemovedIDs ¶ added in v1.5.0
func (m *ConfigItemMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*ConfigItemMutation) ResetCreatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ConfigItemMutation) ResetEdge ¶ added in v1.5.0
func (m *ConfigItemMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*ConfigItemMutation) ResetField ¶ added in v1.5.0
func (m *ConfigItemMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*ConfigItemMutation) ResetName ¶ added in v1.5.0
func (m *ConfigItemMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ConfigItemMutation) ResetUpdatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ConfigItemMutation) ResetValue ¶ added in v1.5.0
func (m *ConfigItemMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*ConfigItemMutation) SetCreatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ConfigItemMutation) SetField ¶ added in v1.5.0
func (m *ConfigItemMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*ConfigItemMutation) SetName ¶ added in v1.5.0
func (m *ConfigItemMutation) SetName(s string)
SetName sets the "name" field.
func (*ConfigItemMutation) SetUpdatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ConfigItemMutation) SetValue ¶ added in v1.5.0
func (m *ConfigItemMutation) SetValue(s string)
SetValue sets the "value" field.
func (ConfigItemMutation) Tx ¶ added in v1.5.0
func (m ConfigItemMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ConfigItemMutation) Type ¶ added in v1.5.0
func (m *ConfigItemMutation) Type() string
Type returns the node type of this mutation (ConfigItem).
func (*ConfigItemMutation) UpdatedAt ¶ added in v1.5.0
func (m *ConfigItemMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ConfigItemMutation) UpdatedAtCleared ¶ added in v1.5.0
func (m *ConfigItemMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*ConfigItemMutation) Value ¶ added in v1.5.0
func (m *ConfigItemMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*ConfigItemMutation) Where ¶ added in v1.5.0
func (m *ConfigItemMutation) Where(ps ...predicate.ConfigItem)
Where appends a list predicates to the ConfigItemMutation builder.
type ConfigItemQuery ¶ added in v1.5.0
type ConfigItemQuery struct {
// contains filtered or unexported fields
}
ConfigItemQuery is the builder for querying ConfigItem entities.
func (*ConfigItemQuery) All ¶ added in v1.5.0
func (ciq *ConfigItemQuery) All(ctx context.Context) ([]*ConfigItem, error)
All executes the query and returns a list of ConfigItems.
func (*ConfigItemQuery) AllX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) AllX(ctx context.Context) []*ConfigItem
AllX is like All, but panics if an error occurs.
func (*ConfigItemQuery) Clone ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Clone() *ConfigItemQuery
Clone returns a duplicate of the ConfigItemQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ConfigItemQuery) Count ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ConfigItemQuery) CountX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ConfigItemQuery) Exist ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ConfigItemQuery) ExistX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ConfigItemQuery) First ¶ added in v1.5.0
func (ciq *ConfigItemQuery) First(ctx context.Context) (*ConfigItem, error)
First returns the first ConfigItem entity from the query. Returns a *NotFoundError when no ConfigItem was found.
func (*ConfigItemQuery) FirstID ¶ added in v1.5.0
func (ciq *ConfigItemQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ConfigItem ID from the query. Returns a *NotFoundError when no ConfigItem ID was found.
func (*ConfigItemQuery) FirstIDX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ConfigItemQuery) FirstX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) FirstX(ctx context.Context) *ConfigItem
FirstX is like First, but panics if an error occurs.
func (*ConfigItemQuery) GroupBy ¶ added in v1.5.0
func (ciq *ConfigItemQuery) GroupBy(field string, fields ...string) *ConfigItemGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at"` Count int `json:"count,omitempty"` } client.ConfigItem.Query(). GroupBy(configitem.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ConfigItemQuery) IDs ¶ added in v1.5.0
func (ciq *ConfigItemQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of ConfigItem IDs.
func (*ConfigItemQuery) IDsX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ConfigItemQuery) Limit ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Limit(limit int) *ConfigItemQuery
Limit adds a limit step to the query.
func (*ConfigItemQuery) Offset ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Offset(offset int) *ConfigItemQuery
Offset adds an offset step to the query.
func (*ConfigItemQuery) Only ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Only(ctx context.Context) (*ConfigItem, error)
Only returns a single ConfigItem entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ConfigItem entity is found. Returns a *NotFoundError when no ConfigItem entities are found.
func (*ConfigItemQuery) OnlyID ¶ added in v1.5.0
func (ciq *ConfigItemQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ConfigItem ID in the query. Returns a *NotSingularError when more than one ConfigItem ID is found. Returns a *NotFoundError when no entities are found.
func (*ConfigItemQuery) OnlyIDX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ConfigItemQuery) OnlyX ¶ added in v1.5.0
func (ciq *ConfigItemQuery) OnlyX(ctx context.Context) *ConfigItem
OnlyX is like Only, but panics if an error occurs.
func (*ConfigItemQuery) Order ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Order(o ...OrderFunc) *ConfigItemQuery
Order adds an order step to the query.
func (*ConfigItemQuery) Select ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Select(fields ...string) *ConfigItemSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at"` } client.ConfigItem.Query(). Select(configitem.FieldCreatedAt). Scan(ctx, &v)
func (*ConfigItemQuery) Unique ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Unique(unique bool) *ConfigItemQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*ConfigItemQuery) Where ¶ added in v1.5.0
func (ciq *ConfigItemQuery) Where(ps ...predicate.ConfigItem) *ConfigItemQuery
Where adds a new predicate for the ConfigItemQuery builder.
type ConfigItemSelect ¶ added in v1.5.0
type ConfigItemSelect struct { *ConfigItemQuery // contains filtered or unexported fields }
ConfigItemSelect is the builder for selecting fields of ConfigItem entities.
func (*ConfigItemSelect) Bool ¶ added in v1.5.0
func (cis *ConfigItemSelect) Bool(ctx context.Context) (_ bool, err error)
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ConfigItemSelect) BoolX ¶ added in v1.5.0
func (cis *ConfigItemSelect) BoolX(ctx context.Context) bool
BoolX is like Bool, but panics if an error occurs.
func (*ConfigItemSelect) Bools ¶ added in v1.5.0
func (cis *ConfigItemSelect) Bools(ctx context.Context) ([]bool, error)
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ConfigItemSelect) BoolsX ¶ added in v1.5.0
func (cis *ConfigItemSelect) BoolsX(ctx context.Context) []bool
BoolsX is like Bools, but panics if an error occurs.
func (*ConfigItemSelect) Float64 ¶ added in v1.5.0
func (cis *ConfigItemSelect) Float64(ctx context.Context) (_ float64, err error)
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ConfigItemSelect) Float64X ¶ added in v1.5.0
func (cis *ConfigItemSelect) Float64X(ctx context.Context) float64
Float64X is like Float64, but panics if an error occurs.
func (*ConfigItemSelect) Float64s ¶ added in v1.5.0
func (cis *ConfigItemSelect) Float64s(ctx context.Context) ([]float64, error)
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ConfigItemSelect) Float64sX ¶ added in v1.5.0
func (cis *ConfigItemSelect) Float64sX(ctx context.Context) []float64
Float64sX is like Float64s, but panics if an error occurs.
func (*ConfigItemSelect) Int ¶ added in v1.5.0
func (cis *ConfigItemSelect) Int(ctx context.Context) (_ int, err error)
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ConfigItemSelect) IntX ¶ added in v1.5.0
func (cis *ConfigItemSelect) IntX(ctx context.Context) int
IntX is like Int, but panics if an error occurs.
func (*ConfigItemSelect) Ints ¶ added in v1.5.0
func (cis *ConfigItemSelect) Ints(ctx context.Context) ([]int, error)
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ConfigItemSelect) IntsX ¶ added in v1.5.0
func (cis *ConfigItemSelect) IntsX(ctx context.Context) []int
IntsX is like Ints, but panics if an error occurs.
func (*ConfigItemSelect) Scan ¶ added in v1.5.0
func (cis *ConfigItemSelect) Scan(ctx context.Context, v interface{}) error
Scan applies the selector query and scans the result into the given value.
func (*ConfigItemSelect) ScanX ¶ added in v1.5.0
func (cis *ConfigItemSelect) ScanX(ctx context.Context, v interface{})
ScanX is like Scan, but panics if an error occurs.
func (*ConfigItemSelect) String ¶ added in v1.5.0
func (cis *ConfigItemSelect) String(ctx context.Context) (_ string, err error)
String returns a single string from a selector. It is only allowed when selecting one field.
func (*ConfigItemSelect) StringX ¶ added in v1.5.0
func (cis *ConfigItemSelect) StringX(ctx context.Context) string
StringX is like String, but panics if an error occurs.
type ConfigItemUpdate ¶ added in v1.5.0
type ConfigItemUpdate struct {
// contains filtered or unexported fields
}
ConfigItemUpdate is the builder for updating ConfigItem entities.
func (*ConfigItemUpdate) ClearCreatedAt ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) ClearCreatedAt() *ConfigItemUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*ConfigItemUpdate) ClearUpdatedAt ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) ClearUpdatedAt() *ConfigItemUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ConfigItemUpdate) Exec ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ConfigItemUpdate) ExecX ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigItemUpdate) Mutation ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) Mutation() *ConfigItemMutation
Mutation returns the ConfigItemMutation object of the builder.
func (*ConfigItemUpdate) Save ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ConfigItemUpdate) SaveX ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ConfigItemUpdate) SetCreatedAt ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) SetCreatedAt(t time.Time) *ConfigItemUpdate
SetCreatedAt sets the "created_at" field.
func (*ConfigItemUpdate) SetName ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) SetName(s string) *ConfigItemUpdate
SetName sets the "name" field.
func (*ConfigItemUpdate) SetUpdatedAt ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) SetUpdatedAt(t time.Time) *ConfigItemUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ConfigItemUpdate) SetValue ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) SetValue(s string) *ConfigItemUpdate
SetValue sets the "value" field.
func (*ConfigItemUpdate) Where ¶ added in v1.5.0
func (ciu *ConfigItemUpdate) Where(ps ...predicate.ConfigItem) *ConfigItemUpdate
Where appends a list predicates to the ConfigItemUpdate builder.
type ConfigItemUpdateOne ¶ added in v1.5.0
type ConfigItemUpdateOne struct {
// contains filtered or unexported fields
}
ConfigItemUpdateOne is the builder for updating a single ConfigItem entity.
func (*ConfigItemUpdateOne) ClearCreatedAt ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) ClearCreatedAt() *ConfigItemUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*ConfigItemUpdateOne) ClearUpdatedAt ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) ClearUpdatedAt() *ConfigItemUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*ConfigItemUpdateOne) Exec ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ConfigItemUpdateOne) ExecX ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ConfigItemUpdateOne) Mutation ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) Mutation() *ConfigItemMutation
Mutation returns the ConfigItemMutation object of the builder.
func (*ConfigItemUpdateOne) Save ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) Save(ctx context.Context) (*ConfigItem, error)
Save executes the query and returns the updated ConfigItem entity.
func (*ConfigItemUpdateOne) SaveX ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) SaveX(ctx context.Context) *ConfigItem
SaveX is like Save, but panics if an error occurs.
func (*ConfigItemUpdateOne) Select ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) Select(field string, fields ...string) *ConfigItemUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ConfigItemUpdateOne) SetCreatedAt ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) SetCreatedAt(t time.Time) *ConfigItemUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ConfigItemUpdateOne) SetName ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) SetName(s string) *ConfigItemUpdateOne
SetName sets the "name" field.
func (*ConfigItemUpdateOne) SetUpdatedAt ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) SetUpdatedAt(t time.Time) *ConfigItemUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ConfigItemUpdateOne) SetValue ¶ added in v1.5.0
func (ciuo *ConfigItemUpdateOne) SetValue(s string) *ConfigItemUpdateOne
SetValue sets the "value" field.
type ConfigItems ¶ added in v1.5.0
type ConfigItems []*ConfigItem
ConfigItems is a parsable slice of ConfigItem.
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Decision ¶
type Decision struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Until holds the value of the "until" field. Until *time.Time `json:"until,omitempty"` // Scenario holds the value of the "scenario" field. Scenario string `json:"scenario,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // StartIP holds the value of the "start_ip" field. StartIP int64 `json:"start_ip,omitempty"` // EndIP holds the value of the "end_ip" field. EndIP int64 `json:"end_ip,omitempty"` // StartSuffix holds the value of the "start_suffix" field. StartSuffix int64 `json:"start_suffix,omitempty"` // EndSuffix holds the value of the "end_suffix" field. EndSuffix int64 `json:"end_suffix,omitempty"` // IPSize holds the value of the "ip_size" field. IPSize int64 `json:"ip_size,omitempty"` // Scope holds the value of the "scope" field. Scope string `json:"scope,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // Origin holds the value of the "origin" field. Origin string `json:"origin,omitempty"` // Simulated holds the value of the "simulated" field. Simulated bool `json:"simulated,omitempty"` // UUID holds the value of the "uuid" field. UUID string `json:"uuid,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DecisionQuery when eager-loading is set. Edges DecisionEdges `json:"edges"` // contains filtered or unexported fields }
Decision is the model entity for the Decision schema.
func (*Decision) QueryOwner ¶
func (d *Decision) QueryOwner() *AlertQuery
QueryOwner queries the "owner" edge of the Decision entity.
func (*Decision) Unwrap ¶
Unwrap unwraps the Decision entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Decision) Update ¶
func (d *Decision) Update() *DecisionUpdateOne
Update returns a builder for updating this Decision. Note that you need to call Decision.Unwrap() before calling this method if this Decision was returned from a transaction, and the transaction was committed or rolled back.
type DecisionClient ¶
type DecisionClient struct {
// contains filtered or unexported fields
}
DecisionClient is a client for the Decision schema.
func NewDecisionClient ¶
func NewDecisionClient(c config) *DecisionClient
NewDecisionClient returns a client for the Decision from the given config.
func (*DecisionClient) Create ¶
func (c *DecisionClient) Create() *DecisionCreate
Create returns a builder for creating a Decision entity.
func (*DecisionClient) CreateBulk ¶
func (c *DecisionClient) CreateBulk(builders ...*DecisionCreate) *DecisionCreateBulk
CreateBulk returns a builder for creating a bulk of Decision entities.
func (*DecisionClient) Delete ¶
func (c *DecisionClient) Delete() *DecisionDelete
Delete returns a delete builder for Decision.
func (*DecisionClient) DeleteOne ¶
func (c *DecisionClient) DeleteOne(d *Decision) *DecisionDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DecisionClient) DeleteOneID ¶
func (c *DecisionClient) DeleteOneID(id int) *DecisionDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*DecisionClient) GetX ¶
func (c *DecisionClient) GetX(ctx context.Context, id int) *Decision
GetX is like Get, but panics if an error occurs.
func (*DecisionClient) Hooks ¶
func (c *DecisionClient) Hooks() []Hook
Hooks returns the client hooks.
func (*DecisionClient) Query ¶
func (c *DecisionClient) Query() *DecisionQuery
Query returns a query builder for Decision.
func (*DecisionClient) QueryOwner ¶
func (c *DecisionClient) QueryOwner(d *Decision) *AlertQuery
QueryOwner queries the owner edge of a Decision.
func (*DecisionClient) Update ¶
func (c *DecisionClient) Update() *DecisionUpdate
Update returns an update builder for Decision.
func (*DecisionClient) UpdateOne ¶
func (c *DecisionClient) UpdateOne(d *Decision) *DecisionUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DecisionClient) UpdateOneID ¶
func (c *DecisionClient) UpdateOneID(id int) *DecisionUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DecisionClient) Use ¶
func (c *DecisionClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `decision.Hooks(f(g(h())))`.
type DecisionCreate ¶
type DecisionCreate struct {
// contains filtered or unexported fields
}
DecisionCreate is the builder for creating a Decision entity.
func (*DecisionCreate) Exec ¶ added in v1.2.1
func (dc *DecisionCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DecisionCreate) ExecX ¶ added in v1.2.1
func (dc *DecisionCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DecisionCreate) Mutation ¶
func (dc *DecisionCreate) Mutation() *DecisionMutation
Mutation returns the DecisionMutation object of the builder.
func (*DecisionCreate) Save ¶
func (dc *DecisionCreate) Save(ctx context.Context) (*Decision, error)
Save creates the Decision in the database.
func (*DecisionCreate) SaveX ¶
func (dc *DecisionCreate) SaveX(ctx context.Context) *Decision
SaveX calls Save and panics if Save returns an error.
func (*DecisionCreate) SetCreatedAt ¶
func (dc *DecisionCreate) SetCreatedAt(t time.Time) *DecisionCreate
SetCreatedAt sets the "created_at" field.
func (*DecisionCreate) SetEndIP ¶
func (dc *DecisionCreate) SetEndIP(i int64) *DecisionCreate
SetEndIP sets the "end_ip" field.
func (*DecisionCreate) SetEndSuffix ¶ added in v1.0.3
func (dc *DecisionCreate) SetEndSuffix(i int64) *DecisionCreate
SetEndSuffix sets the "end_suffix" field.
func (*DecisionCreate) SetIPSize ¶ added in v1.0.3
func (dc *DecisionCreate) SetIPSize(i int64) *DecisionCreate
SetIPSize sets the "ip_size" field.
func (*DecisionCreate) SetNillableCreatedAt ¶
func (dc *DecisionCreate) SetNillableCreatedAt(t *time.Time) *DecisionCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*DecisionCreate) SetNillableEndIP ¶
func (dc *DecisionCreate) SetNillableEndIP(i *int64) *DecisionCreate
SetNillableEndIP sets the "end_ip" field if the given value is not nil.
func (*DecisionCreate) SetNillableEndSuffix ¶ added in v1.0.3
func (dc *DecisionCreate) SetNillableEndSuffix(i *int64) *DecisionCreate
SetNillableEndSuffix sets the "end_suffix" field if the given value is not nil.
func (*DecisionCreate) SetNillableIPSize ¶ added in v1.0.3
func (dc *DecisionCreate) SetNillableIPSize(i *int64) *DecisionCreate
SetNillableIPSize sets the "ip_size" field if the given value is not nil.
func (*DecisionCreate) SetNillableOwnerID ¶
func (dc *DecisionCreate) SetNillableOwnerID(id *int) *DecisionCreate
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*DecisionCreate) SetNillableSimulated ¶
func (dc *DecisionCreate) SetNillableSimulated(b *bool) *DecisionCreate
SetNillableSimulated sets the "simulated" field if the given value is not nil.
func (*DecisionCreate) SetNillableStartIP ¶
func (dc *DecisionCreate) SetNillableStartIP(i *int64) *DecisionCreate
SetNillableStartIP sets the "start_ip" field if the given value is not nil.
func (*DecisionCreate) SetNillableStartSuffix ¶ added in v1.0.3
func (dc *DecisionCreate) SetNillableStartSuffix(i *int64) *DecisionCreate
SetNillableStartSuffix sets the "start_suffix" field if the given value is not nil.
func (*DecisionCreate) SetNillableUUID ¶ added in v1.5.0
func (dc *DecisionCreate) SetNillableUUID(s *string) *DecisionCreate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DecisionCreate) SetNillableUntil ¶ added in v1.3.4
func (dc *DecisionCreate) SetNillableUntil(t *time.Time) *DecisionCreate
SetNillableUntil sets the "until" field if the given value is not nil.
func (*DecisionCreate) SetNillableUpdatedAt ¶
func (dc *DecisionCreate) SetNillableUpdatedAt(t *time.Time) *DecisionCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*DecisionCreate) SetOrigin ¶
func (dc *DecisionCreate) SetOrigin(s string) *DecisionCreate
SetOrigin sets the "origin" field.
func (*DecisionCreate) SetOwner ¶
func (dc *DecisionCreate) SetOwner(a *Alert) *DecisionCreate
SetOwner sets the "owner" edge to the Alert entity.
func (*DecisionCreate) SetOwnerID ¶
func (dc *DecisionCreate) SetOwnerID(id int) *DecisionCreate
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*DecisionCreate) SetScenario ¶
func (dc *DecisionCreate) SetScenario(s string) *DecisionCreate
SetScenario sets the "scenario" field.
func (*DecisionCreate) SetScope ¶
func (dc *DecisionCreate) SetScope(s string) *DecisionCreate
SetScope sets the "scope" field.
func (*DecisionCreate) SetSimulated ¶
func (dc *DecisionCreate) SetSimulated(b bool) *DecisionCreate
SetSimulated sets the "simulated" field.
func (*DecisionCreate) SetStartIP ¶
func (dc *DecisionCreate) SetStartIP(i int64) *DecisionCreate
SetStartIP sets the "start_ip" field.
func (*DecisionCreate) SetStartSuffix ¶ added in v1.0.3
func (dc *DecisionCreate) SetStartSuffix(i int64) *DecisionCreate
SetStartSuffix sets the "start_suffix" field.
func (*DecisionCreate) SetType ¶
func (dc *DecisionCreate) SetType(s string) *DecisionCreate
SetType sets the "type" field.
func (*DecisionCreate) SetUUID ¶ added in v1.5.0
func (dc *DecisionCreate) SetUUID(s string) *DecisionCreate
SetUUID sets the "uuid" field.
func (*DecisionCreate) SetUntil ¶
func (dc *DecisionCreate) SetUntil(t time.Time) *DecisionCreate
SetUntil sets the "until" field.
func (*DecisionCreate) SetUpdatedAt ¶
func (dc *DecisionCreate) SetUpdatedAt(t time.Time) *DecisionCreate
SetUpdatedAt sets the "updated_at" field.
func (*DecisionCreate) SetValue ¶
func (dc *DecisionCreate) SetValue(s string) *DecisionCreate
SetValue sets the "value" field.
type DecisionCreateBulk ¶
type DecisionCreateBulk struct {
// contains filtered or unexported fields
}
DecisionCreateBulk is the builder for creating many Decision entities in bulk.
func (*DecisionCreateBulk) Exec ¶ added in v1.2.1
func (dcb *DecisionCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DecisionCreateBulk) ExecX ¶ added in v1.2.1
func (dcb *DecisionCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DecisionDelete ¶
type DecisionDelete struct {
// contains filtered or unexported fields
}
DecisionDelete is the builder for deleting a Decision entity.
func (*DecisionDelete) Exec ¶
func (dd *DecisionDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DecisionDelete) ExecX ¶
func (dd *DecisionDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DecisionDelete) Where ¶
func (dd *DecisionDelete) Where(ps ...predicate.Decision) *DecisionDelete
Where appends a list predicates to the DecisionDelete builder.
type DecisionDeleteOne ¶
type DecisionDeleteOne struct {
// contains filtered or unexported fields
}
DecisionDeleteOne is the builder for deleting a single Decision entity.
func (*DecisionDeleteOne) Exec ¶
func (ddo *DecisionDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DecisionDeleteOne) ExecX ¶
func (ddo *DecisionDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DecisionEdges ¶
type DecisionEdges struct { // Owner holds the value of the owner edge. Owner *Alert `json:"owner,omitempty"` // contains filtered or unexported fields }
DecisionEdges holds the relations/edges for other nodes in the graph.
func (DecisionEdges) OwnerOrErr ¶
func (e DecisionEdges) OwnerOrErr() (*Alert, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DecisionGroupBy ¶
type DecisionGroupBy struct {
// contains filtered or unexported fields
}
DecisionGroupBy is the group-by builder for Decision entities.
func (*DecisionGroupBy) Aggregate ¶
func (dgb *DecisionGroupBy) Aggregate(fns ...AggregateFunc) *DecisionGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DecisionGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DecisionGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DecisionGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DecisionGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DecisionGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DecisionGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DecisionGroupBy) Scan ¶
func (dgb *DecisionGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*DecisionGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DecisionMutation ¶
type DecisionMutation struct {
// contains filtered or unexported fields
}
DecisionMutation represents an operation that mutates the Decision nodes in the graph.
func (*DecisionMutation) AddEndIP ¶
func (m *DecisionMutation) AddEndIP(i int64)
AddEndIP adds i to the "end_ip" field.
func (*DecisionMutation) AddEndSuffix ¶ added in v1.0.3
func (m *DecisionMutation) AddEndSuffix(i int64)
AddEndSuffix adds i to the "end_suffix" field.
func (*DecisionMutation) AddField ¶
func (m *DecisionMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*DecisionMutation) AddIPSize ¶ added in v1.0.3
func (m *DecisionMutation) AddIPSize(i int64)
AddIPSize adds i to the "ip_size" field.
func (*DecisionMutation) AddStartIP ¶
func (m *DecisionMutation) AddStartIP(i int64)
AddStartIP adds i to the "start_ip" field.
func (*DecisionMutation) AddStartSuffix ¶ added in v1.0.3
func (m *DecisionMutation) AddStartSuffix(i int64)
AddStartSuffix adds i to the "start_suffix" field.
func (*DecisionMutation) AddedEdges ¶
func (m *DecisionMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DecisionMutation) AddedEndIP ¶
func (m *DecisionMutation) AddedEndIP() (r int64, exists bool)
AddedEndIP returns the value that was added to the "end_ip" field in this mutation.
func (*DecisionMutation) AddedEndSuffix ¶ added in v1.0.3
func (m *DecisionMutation) AddedEndSuffix() (r int64, exists bool)
AddedEndSuffix returns the value that was added to the "end_suffix" field in this mutation.
func (*DecisionMutation) AddedField ¶
func (m *DecisionMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on 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.
func (*DecisionMutation) AddedFields ¶
func (m *DecisionMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DecisionMutation) AddedIDs ¶
func (m *DecisionMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DecisionMutation) AddedIPSize ¶ added in v1.0.3
func (m *DecisionMutation) AddedIPSize() (r int64, exists bool)
AddedIPSize returns the value that was added to the "ip_size" field in this mutation.
func (*DecisionMutation) AddedStartIP ¶
func (m *DecisionMutation) AddedStartIP() (r int64, exists bool)
AddedStartIP returns the value that was added to the "start_ip" field in this mutation.
func (*DecisionMutation) AddedStartSuffix ¶ added in v1.0.3
func (m *DecisionMutation) AddedStartSuffix() (r int64, exists bool)
AddedStartSuffix returns the value that was added to the "start_suffix" field in this mutation.
func (*DecisionMutation) ClearCreatedAt ¶ added in v1.3.0
func (m *DecisionMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*DecisionMutation) ClearEdge ¶
func (m *DecisionMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*DecisionMutation) ClearEndIP ¶
func (m *DecisionMutation) ClearEndIP()
ClearEndIP clears the value of the "end_ip" field.
func (*DecisionMutation) ClearEndSuffix ¶ added in v1.0.3
func (m *DecisionMutation) ClearEndSuffix()
ClearEndSuffix clears the value of the "end_suffix" field.
func (*DecisionMutation) ClearField ¶
func (m *DecisionMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*DecisionMutation) ClearIPSize ¶ added in v1.0.3
func (m *DecisionMutation) ClearIPSize()
ClearIPSize clears the value of the "ip_size" field.
func (*DecisionMutation) ClearOwner ¶
func (m *DecisionMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Alert entity.
func (*DecisionMutation) ClearStartIP ¶
func (m *DecisionMutation) ClearStartIP()
ClearStartIP clears the value of the "start_ip" field.
func (*DecisionMutation) ClearStartSuffix ¶ added in v1.0.3
func (m *DecisionMutation) ClearStartSuffix()
ClearStartSuffix clears the value of the "start_suffix" field.
func (*DecisionMutation) ClearUUID ¶ added in v1.5.0
func (m *DecisionMutation) ClearUUID()
ClearUUID clears the value of the "uuid" field.
func (*DecisionMutation) ClearUntil ¶ added in v1.3.4
func (m *DecisionMutation) ClearUntil()
ClearUntil clears the value of the "until" field.
func (*DecisionMutation) ClearUpdatedAt ¶ added in v1.3.0
func (m *DecisionMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DecisionMutation) ClearedEdges ¶
func (m *DecisionMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DecisionMutation) ClearedFields ¶
func (m *DecisionMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DecisionMutation) Client ¶
func (m DecisionMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*DecisionMutation) CreatedAt ¶
func (m *DecisionMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*DecisionMutation) CreatedAtCleared ¶ added in v1.3.0
func (m *DecisionMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*DecisionMutation) EdgeCleared ¶
func (m *DecisionMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DecisionMutation) EndIP ¶
func (m *DecisionMutation) EndIP() (r int64, exists bool)
EndIP returns the value of the "end_ip" field in the mutation.
func (*DecisionMutation) EndIPCleared ¶
func (m *DecisionMutation) EndIPCleared() bool
EndIPCleared returns if the "end_ip" field was cleared in this mutation.
func (*DecisionMutation) EndSuffix ¶ added in v1.0.3
func (m *DecisionMutation) EndSuffix() (r int64, exists bool)
EndSuffix returns the value of the "end_suffix" field in the mutation.
func (*DecisionMutation) EndSuffixCleared ¶ added in v1.0.3
func (m *DecisionMutation) EndSuffixCleared() bool
EndSuffixCleared returns if the "end_suffix" field was cleared in this mutation.
func (*DecisionMutation) Field ¶
func (m *DecisionMutation) Field(name string) (ent.Value, bool)
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.
func (*DecisionMutation) FieldCleared ¶
func (m *DecisionMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DecisionMutation) Fields ¶
func (m *DecisionMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*DecisionMutation) GetType ¶
func (m *DecisionMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*DecisionMutation) ID ¶
func (m *DecisionMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*DecisionMutation) IDs ¶ added in v1.3.1
func (m *DecisionMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*DecisionMutation) IPSize ¶ added in v1.0.3
func (m *DecisionMutation) IPSize() (r int64, exists bool)
IPSize returns the value of the "ip_size" field in the mutation.
func (*DecisionMutation) IPSizeCleared ¶ added in v1.0.3
func (m *DecisionMutation) IPSizeCleared() bool
IPSizeCleared returns if the "ip_size" field was cleared in this mutation.
func (*DecisionMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldEndIP ¶
func (m *DecisionMutation) OldEndIP(ctx context.Context) (v int64, err error)
OldEndIP returns the old "end_ip" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldEndSuffix ¶ added in v1.0.3
func (m *DecisionMutation) OldEndSuffix(ctx context.Context) (v int64, err error)
OldEndSuffix returns the old "end_suffix" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*DecisionMutation) OldIPSize ¶ added in v1.0.3
func (m *DecisionMutation) OldIPSize(ctx context.Context) (v int64, err error)
OldIPSize returns the old "ip_size" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldOrigin ¶
func (m *DecisionMutation) OldOrigin(ctx context.Context) (v string, err error)
OldOrigin returns the old "origin" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldScenario ¶
func (m *DecisionMutation) OldScenario(ctx context.Context) (v string, err error)
OldScenario returns the old "scenario" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldScope ¶
func (m *DecisionMutation) OldScope(ctx context.Context) (v string, err error)
OldScope returns the old "scope" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldSimulated ¶
func (m *DecisionMutation) OldSimulated(ctx context.Context) (v bool, err error)
OldSimulated returns the old "simulated" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldStartIP ¶
func (m *DecisionMutation) OldStartIP(ctx context.Context) (v int64, err error)
OldStartIP returns the old "start_ip" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldStartSuffix ¶ added in v1.0.3
func (m *DecisionMutation) OldStartSuffix(ctx context.Context) (v int64, err error)
OldStartSuffix returns the old "start_suffix" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldType ¶
func (m *DecisionMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldUUID ¶ added in v1.5.0
func (m *DecisionMutation) OldUUID(ctx context.Context) (v string, err error)
OldUUID returns the old "uuid" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldUntil ¶
OldUntil returns the old "until" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) OldValue ¶
func (m *DecisionMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Decision entity. If the Decision object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DecisionMutation) Origin ¶
func (m *DecisionMutation) Origin() (r string, exists bool)
Origin returns the value of the "origin" field in the mutation.
func (*DecisionMutation) OwnerCleared ¶
func (m *DecisionMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Alert entity was cleared.
func (*DecisionMutation) OwnerID ¶
func (m *DecisionMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*DecisionMutation) OwnerIDs ¶
func (m *DecisionMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*DecisionMutation) RemovedEdges ¶
func (m *DecisionMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DecisionMutation) RemovedIDs ¶
func (m *DecisionMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*DecisionMutation) ResetCreatedAt ¶
func (m *DecisionMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*DecisionMutation) ResetEdge ¶
func (m *DecisionMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*DecisionMutation) ResetEndIP ¶
func (m *DecisionMutation) ResetEndIP()
ResetEndIP resets all changes to the "end_ip" field.
func (*DecisionMutation) ResetEndSuffix ¶ added in v1.0.3
func (m *DecisionMutation) ResetEndSuffix()
ResetEndSuffix resets all changes to the "end_suffix" field.
func (*DecisionMutation) ResetField ¶
func (m *DecisionMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*DecisionMutation) ResetIPSize ¶ added in v1.0.3
func (m *DecisionMutation) ResetIPSize()
ResetIPSize resets all changes to the "ip_size" field.
func (*DecisionMutation) ResetOrigin ¶
func (m *DecisionMutation) ResetOrigin()
ResetOrigin resets all changes to the "origin" field.
func (*DecisionMutation) ResetOwner ¶
func (m *DecisionMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*DecisionMutation) ResetScenario ¶
func (m *DecisionMutation) ResetScenario()
ResetScenario resets all changes to the "scenario" field.
func (*DecisionMutation) ResetScope ¶
func (m *DecisionMutation) ResetScope()
ResetScope resets all changes to the "scope" field.
func (*DecisionMutation) ResetSimulated ¶
func (m *DecisionMutation) ResetSimulated()
ResetSimulated resets all changes to the "simulated" field.
func (*DecisionMutation) ResetStartIP ¶
func (m *DecisionMutation) ResetStartIP()
ResetStartIP resets all changes to the "start_ip" field.
func (*DecisionMutation) ResetStartSuffix ¶ added in v1.0.3
func (m *DecisionMutation) ResetStartSuffix()
ResetStartSuffix resets all changes to the "start_suffix" field.
func (*DecisionMutation) ResetType ¶
func (m *DecisionMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*DecisionMutation) ResetUUID ¶ added in v1.5.0
func (m *DecisionMutation) ResetUUID()
ResetUUID resets all changes to the "uuid" field.
func (*DecisionMutation) ResetUntil ¶
func (m *DecisionMutation) ResetUntil()
ResetUntil resets all changes to the "until" field.
func (*DecisionMutation) ResetUpdatedAt ¶
func (m *DecisionMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*DecisionMutation) ResetValue ¶
func (m *DecisionMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*DecisionMutation) Scenario ¶
func (m *DecisionMutation) Scenario() (r string, exists bool)
Scenario returns the value of the "scenario" field in the mutation.
func (*DecisionMutation) Scope ¶
func (m *DecisionMutation) Scope() (r string, exists bool)
Scope returns the value of the "scope" field in the mutation.
func (*DecisionMutation) SetCreatedAt ¶
func (m *DecisionMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*DecisionMutation) SetEndIP ¶
func (m *DecisionMutation) SetEndIP(i int64)
SetEndIP sets the "end_ip" field.
func (*DecisionMutation) SetEndSuffix ¶ added in v1.0.3
func (m *DecisionMutation) SetEndSuffix(i int64)
SetEndSuffix sets the "end_suffix" field.
func (*DecisionMutation) SetField ¶
func (m *DecisionMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*DecisionMutation) SetIPSize ¶ added in v1.0.3
func (m *DecisionMutation) SetIPSize(i int64)
SetIPSize sets the "ip_size" field.
func (*DecisionMutation) SetOrigin ¶
func (m *DecisionMutation) SetOrigin(s string)
SetOrigin sets the "origin" field.
func (*DecisionMutation) SetOwnerID ¶
func (m *DecisionMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the Alert entity by id.
func (*DecisionMutation) SetScenario ¶
func (m *DecisionMutation) SetScenario(s string)
SetScenario sets the "scenario" field.
func (*DecisionMutation) SetScope ¶
func (m *DecisionMutation) SetScope(s string)
SetScope sets the "scope" field.
func (*DecisionMutation) SetSimulated ¶
func (m *DecisionMutation) SetSimulated(b bool)
SetSimulated sets the "simulated" field.
func (*DecisionMutation) SetStartIP ¶
func (m *DecisionMutation) SetStartIP(i int64)
SetStartIP sets the "start_ip" field.
func (*DecisionMutation) SetStartSuffix ¶ added in v1.0.3
func (m *DecisionMutation) SetStartSuffix(i int64)
SetStartSuffix sets the "start_suffix" field.
func (*DecisionMutation) SetType ¶
func (m *DecisionMutation) SetType(s string)
SetType sets the "type" field.
func (*DecisionMutation) SetUUID ¶ added in v1.5.0
func (m *DecisionMutation) SetUUID(s string)
SetUUID sets the "uuid" field.
func (*DecisionMutation) SetUntil ¶
func (m *DecisionMutation) SetUntil(t time.Time)
SetUntil sets the "until" field.
func (*DecisionMutation) SetUpdatedAt ¶
func (m *DecisionMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*DecisionMutation) SetValue ¶
func (m *DecisionMutation) SetValue(s string)
SetValue sets the "value" field.
func (*DecisionMutation) Simulated ¶
func (m *DecisionMutation) Simulated() (r bool, exists bool)
Simulated returns the value of the "simulated" field in the mutation.
func (*DecisionMutation) StartIP ¶
func (m *DecisionMutation) StartIP() (r int64, exists bool)
StartIP returns the value of the "start_ip" field in the mutation.
func (*DecisionMutation) StartIPCleared ¶
func (m *DecisionMutation) StartIPCleared() bool
StartIPCleared returns if the "start_ip" field was cleared in this mutation.
func (*DecisionMutation) StartSuffix ¶ added in v1.0.3
func (m *DecisionMutation) StartSuffix() (r int64, exists bool)
StartSuffix returns the value of the "start_suffix" field in the mutation.
func (*DecisionMutation) StartSuffixCleared ¶ added in v1.0.3
func (m *DecisionMutation) StartSuffixCleared() bool
StartSuffixCleared returns if the "start_suffix" field was cleared in this mutation.
func (DecisionMutation) Tx ¶
func (m DecisionMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DecisionMutation) Type ¶
func (m *DecisionMutation) Type() string
Type returns the node type of this mutation (Decision).
func (*DecisionMutation) UUID ¶ added in v1.5.0
func (m *DecisionMutation) UUID() (r string, exists bool)
UUID returns the value of the "uuid" field in the mutation.
func (*DecisionMutation) UUIDCleared ¶ added in v1.5.0
func (m *DecisionMutation) UUIDCleared() bool
UUIDCleared returns if the "uuid" field was cleared in this mutation.
func (*DecisionMutation) Until ¶
func (m *DecisionMutation) Until() (r time.Time, exists bool)
Until returns the value of the "until" field in the mutation.
func (*DecisionMutation) UntilCleared ¶ added in v1.3.4
func (m *DecisionMutation) UntilCleared() bool
UntilCleared returns if the "until" field was cleared in this mutation.
func (*DecisionMutation) UpdatedAt ¶
func (m *DecisionMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*DecisionMutation) UpdatedAtCleared ¶ added in v1.3.0
func (m *DecisionMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*DecisionMutation) Value ¶
func (m *DecisionMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*DecisionMutation) Where ¶ added in v1.2.1
func (m *DecisionMutation) Where(ps ...predicate.Decision)
Where appends a list predicates to the DecisionMutation builder.
type DecisionQuery ¶
type DecisionQuery struct {
// contains filtered or unexported fields
}
DecisionQuery is the builder for querying Decision entities.
func (*DecisionQuery) All ¶
func (dq *DecisionQuery) All(ctx context.Context) ([]*Decision, error)
All executes the query and returns a list of Decisions.
func (*DecisionQuery) AllX ¶
func (dq *DecisionQuery) AllX(ctx context.Context) []*Decision
AllX is like All, but panics if an error occurs.
func (*DecisionQuery) Clone ¶
func (dq *DecisionQuery) Clone() *DecisionQuery
Clone returns a duplicate of the DecisionQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DecisionQuery) Count ¶
func (dq *DecisionQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DecisionQuery) CountX ¶
func (dq *DecisionQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DecisionQuery) Exist ¶
func (dq *DecisionQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DecisionQuery) ExistX ¶
func (dq *DecisionQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DecisionQuery) First ¶
func (dq *DecisionQuery) First(ctx context.Context) (*Decision, error)
First returns the first Decision entity from the query. Returns a *NotFoundError when no Decision was found.
func (*DecisionQuery) FirstID ¶
func (dq *DecisionQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Decision ID from the query. Returns a *NotFoundError when no Decision ID was found.
func (*DecisionQuery) FirstIDX ¶ added in v1.0.3
func (dq *DecisionQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DecisionQuery) FirstX ¶
func (dq *DecisionQuery) FirstX(ctx context.Context) *Decision
FirstX is like First, but panics if an error occurs.
func (*DecisionQuery) GroupBy ¶
func (dq *DecisionQuery) GroupBy(field string, fields ...string) *DecisionGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Decision.Query(). GroupBy(decision.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DecisionQuery) IDs ¶
func (dq *DecisionQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Decision IDs.
func (*DecisionQuery) IDsX ¶
func (dq *DecisionQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DecisionQuery) Limit ¶
func (dq *DecisionQuery) Limit(limit int) *DecisionQuery
Limit adds a limit step to the query.
func (*DecisionQuery) Offset ¶
func (dq *DecisionQuery) Offset(offset int) *DecisionQuery
Offset adds an offset step to the query.
func (*DecisionQuery) Only ¶
func (dq *DecisionQuery) Only(ctx context.Context) (*Decision, error)
Only returns a single Decision entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Decision entity is found. Returns a *NotFoundError when no Decision entities are found.
func (*DecisionQuery) OnlyID ¶
func (dq *DecisionQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Decision ID in the query. Returns a *NotSingularError when more than one Decision ID is found. Returns a *NotFoundError when no entities are found.
func (*DecisionQuery) OnlyIDX ¶
func (dq *DecisionQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DecisionQuery) OnlyX ¶
func (dq *DecisionQuery) OnlyX(ctx context.Context) *Decision
OnlyX is like Only, but panics if an error occurs.
func (*DecisionQuery) Order ¶
func (dq *DecisionQuery) Order(o ...OrderFunc) *DecisionQuery
Order adds an order step to the query.
func (*DecisionQuery) QueryOwner ¶
func (dq *DecisionQuery) QueryOwner() *AlertQuery
QueryOwner chains the current query on the "owner" edge.
func (*DecisionQuery) Select ¶
func (dq *DecisionQuery) Select(fields ...string) *DecisionSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Decision.Query(). Select(decision.FieldCreatedAt). Scan(ctx, &v)
func (*DecisionQuery) Unique ¶ added in v1.2.1
func (dq *DecisionQuery) Unique(unique bool) *DecisionQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*DecisionQuery) Where ¶
func (dq *DecisionQuery) Where(ps ...predicate.Decision) *DecisionQuery
Where adds a new predicate for the DecisionQuery builder.
func (*DecisionQuery) WithOwner ¶
func (dq *DecisionQuery) WithOwner(opts ...func(*AlertQuery)) *DecisionQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type DecisionSelect ¶
type DecisionSelect struct { *DecisionQuery // contains filtered or unexported fields }
DecisionSelect is the builder for selecting fields of Decision entities.
func (*DecisionSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DecisionSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DecisionSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DecisionSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DecisionSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DecisionSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DecisionSelect) Scan ¶
func (ds *DecisionSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DecisionSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DecisionUpdate ¶
type DecisionUpdate struct {
// contains filtered or unexported fields
}
DecisionUpdate is the builder for updating Decision entities.
func (*DecisionUpdate) AddEndIP ¶
func (du *DecisionUpdate) AddEndIP(i int64) *DecisionUpdate
AddEndIP adds i to the "end_ip" field.
func (*DecisionUpdate) AddEndSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) AddEndSuffix(i int64) *DecisionUpdate
AddEndSuffix adds i to the "end_suffix" field.
func (*DecisionUpdate) AddIPSize ¶ added in v1.0.3
func (du *DecisionUpdate) AddIPSize(i int64) *DecisionUpdate
AddIPSize adds i to the "ip_size" field.
func (*DecisionUpdate) AddStartIP ¶
func (du *DecisionUpdate) AddStartIP(i int64) *DecisionUpdate
AddStartIP adds i to the "start_ip" field.
func (*DecisionUpdate) AddStartSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) AddStartSuffix(i int64) *DecisionUpdate
AddStartSuffix adds i to the "start_suffix" field.
func (*DecisionUpdate) ClearCreatedAt ¶ added in v1.3.0
func (du *DecisionUpdate) ClearCreatedAt() *DecisionUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*DecisionUpdate) ClearEndIP ¶
func (du *DecisionUpdate) ClearEndIP() *DecisionUpdate
ClearEndIP clears the value of the "end_ip" field.
func (*DecisionUpdate) ClearEndSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) ClearEndSuffix() *DecisionUpdate
ClearEndSuffix clears the value of the "end_suffix" field.
func (*DecisionUpdate) ClearIPSize ¶ added in v1.0.3
func (du *DecisionUpdate) ClearIPSize() *DecisionUpdate
ClearIPSize clears the value of the "ip_size" field.
func (*DecisionUpdate) ClearOwner ¶
func (du *DecisionUpdate) ClearOwner() *DecisionUpdate
ClearOwner clears the "owner" edge to the Alert entity.
func (*DecisionUpdate) ClearStartIP ¶
func (du *DecisionUpdate) ClearStartIP() *DecisionUpdate
ClearStartIP clears the value of the "start_ip" field.
func (*DecisionUpdate) ClearStartSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) ClearStartSuffix() *DecisionUpdate
ClearStartSuffix clears the value of the "start_suffix" field.
func (*DecisionUpdate) ClearUUID ¶ added in v1.5.0
func (du *DecisionUpdate) ClearUUID() *DecisionUpdate
ClearUUID clears the value of the "uuid" field.
func (*DecisionUpdate) ClearUntil ¶ added in v1.3.4
func (du *DecisionUpdate) ClearUntil() *DecisionUpdate
ClearUntil clears the value of the "until" field.
func (*DecisionUpdate) ClearUpdatedAt ¶ added in v1.3.0
func (du *DecisionUpdate) ClearUpdatedAt() *DecisionUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DecisionUpdate) Exec ¶
func (du *DecisionUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DecisionUpdate) ExecX ¶
func (du *DecisionUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DecisionUpdate) Mutation ¶
func (du *DecisionUpdate) Mutation() *DecisionMutation
Mutation returns the DecisionMutation object of the builder.
func (*DecisionUpdate) Save ¶
func (du *DecisionUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DecisionUpdate) SaveX ¶
func (du *DecisionUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DecisionUpdate) SetCreatedAt ¶
func (du *DecisionUpdate) SetCreatedAt(t time.Time) *DecisionUpdate
SetCreatedAt sets the "created_at" field.
func (*DecisionUpdate) SetEndIP ¶
func (du *DecisionUpdate) SetEndIP(i int64) *DecisionUpdate
SetEndIP sets the "end_ip" field.
func (*DecisionUpdate) SetEndSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) SetEndSuffix(i int64) *DecisionUpdate
SetEndSuffix sets the "end_suffix" field.
func (*DecisionUpdate) SetIPSize ¶ added in v1.0.3
func (du *DecisionUpdate) SetIPSize(i int64) *DecisionUpdate
SetIPSize sets the "ip_size" field.
func (*DecisionUpdate) SetNillableEndIP ¶
func (du *DecisionUpdate) SetNillableEndIP(i *int64) *DecisionUpdate
SetNillableEndIP sets the "end_ip" field if the given value is not nil.
func (*DecisionUpdate) SetNillableEndSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) SetNillableEndSuffix(i *int64) *DecisionUpdate
SetNillableEndSuffix sets the "end_suffix" field if the given value is not nil.
func (*DecisionUpdate) SetNillableIPSize ¶ added in v1.0.3
func (du *DecisionUpdate) SetNillableIPSize(i *int64) *DecisionUpdate
SetNillableIPSize sets the "ip_size" field if the given value is not nil.
func (*DecisionUpdate) SetNillableOwnerID ¶
func (du *DecisionUpdate) SetNillableOwnerID(id *int) *DecisionUpdate
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*DecisionUpdate) SetNillableSimulated ¶
func (du *DecisionUpdate) SetNillableSimulated(b *bool) *DecisionUpdate
SetNillableSimulated sets the "simulated" field if the given value is not nil.
func (*DecisionUpdate) SetNillableStartIP ¶
func (du *DecisionUpdate) SetNillableStartIP(i *int64) *DecisionUpdate
SetNillableStartIP sets the "start_ip" field if the given value is not nil.
func (*DecisionUpdate) SetNillableStartSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) SetNillableStartSuffix(i *int64) *DecisionUpdate
SetNillableStartSuffix sets the "start_suffix" field if the given value is not nil.
func (*DecisionUpdate) SetNillableUUID ¶ added in v1.5.0
func (du *DecisionUpdate) SetNillableUUID(s *string) *DecisionUpdate
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DecisionUpdate) SetNillableUntil ¶ added in v1.3.4
func (du *DecisionUpdate) SetNillableUntil(t *time.Time) *DecisionUpdate
SetNillableUntil sets the "until" field if the given value is not nil.
func (*DecisionUpdate) SetOrigin ¶
func (du *DecisionUpdate) SetOrigin(s string) *DecisionUpdate
SetOrigin sets the "origin" field.
func (*DecisionUpdate) SetOwner ¶
func (du *DecisionUpdate) SetOwner(a *Alert) *DecisionUpdate
SetOwner sets the "owner" edge to the Alert entity.
func (*DecisionUpdate) SetOwnerID ¶
func (du *DecisionUpdate) SetOwnerID(id int) *DecisionUpdate
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*DecisionUpdate) SetScenario ¶
func (du *DecisionUpdate) SetScenario(s string) *DecisionUpdate
SetScenario sets the "scenario" field.
func (*DecisionUpdate) SetScope ¶
func (du *DecisionUpdate) SetScope(s string) *DecisionUpdate
SetScope sets the "scope" field.
func (*DecisionUpdate) SetSimulated ¶
func (du *DecisionUpdate) SetSimulated(b bool) *DecisionUpdate
SetSimulated sets the "simulated" field.
func (*DecisionUpdate) SetStartIP ¶
func (du *DecisionUpdate) SetStartIP(i int64) *DecisionUpdate
SetStartIP sets the "start_ip" field.
func (*DecisionUpdate) SetStartSuffix ¶ added in v1.0.3
func (du *DecisionUpdate) SetStartSuffix(i int64) *DecisionUpdate
SetStartSuffix sets the "start_suffix" field.
func (*DecisionUpdate) SetType ¶
func (du *DecisionUpdate) SetType(s string) *DecisionUpdate
SetType sets the "type" field.
func (*DecisionUpdate) SetUUID ¶ added in v1.5.0
func (du *DecisionUpdate) SetUUID(s string) *DecisionUpdate
SetUUID sets the "uuid" field.
func (*DecisionUpdate) SetUntil ¶
func (du *DecisionUpdate) SetUntil(t time.Time) *DecisionUpdate
SetUntil sets the "until" field.
func (*DecisionUpdate) SetUpdatedAt ¶
func (du *DecisionUpdate) SetUpdatedAt(t time.Time) *DecisionUpdate
SetUpdatedAt sets the "updated_at" field.
func (*DecisionUpdate) SetValue ¶
func (du *DecisionUpdate) SetValue(s string) *DecisionUpdate
SetValue sets the "value" field.
func (*DecisionUpdate) Where ¶
func (du *DecisionUpdate) Where(ps ...predicate.Decision) *DecisionUpdate
Where appends a list predicates to the DecisionUpdate builder.
type DecisionUpdateOne ¶
type DecisionUpdateOne struct {
// contains filtered or unexported fields
}
DecisionUpdateOne is the builder for updating a single Decision entity.
func (*DecisionUpdateOne) AddEndIP ¶
func (duo *DecisionUpdateOne) AddEndIP(i int64) *DecisionUpdateOne
AddEndIP adds i to the "end_ip" field.
func (*DecisionUpdateOne) AddEndSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) AddEndSuffix(i int64) *DecisionUpdateOne
AddEndSuffix adds i to the "end_suffix" field.
func (*DecisionUpdateOne) AddIPSize ¶ added in v1.0.3
func (duo *DecisionUpdateOne) AddIPSize(i int64) *DecisionUpdateOne
AddIPSize adds i to the "ip_size" field.
func (*DecisionUpdateOne) AddStartIP ¶
func (duo *DecisionUpdateOne) AddStartIP(i int64) *DecisionUpdateOne
AddStartIP adds i to the "start_ip" field.
func (*DecisionUpdateOne) AddStartSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) AddStartSuffix(i int64) *DecisionUpdateOne
AddStartSuffix adds i to the "start_suffix" field.
func (*DecisionUpdateOne) ClearCreatedAt ¶ added in v1.3.0
func (duo *DecisionUpdateOne) ClearCreatedAt() *DecisionUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*DecisionUpdateOne) ClearEndIP ¶
func (duo *DecisionUpdateOne) ClearEndIP() *DecisionUpdateOne
ClearEndIP clears the value of the "end_ip" field.
func (*DecisionUpdateOne) ClearEndSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) ClearEndSuffix() *DecisionUpdateOne
ClearEndSuffix clears the value of the "end_suffix" field.
func (*DecisionUpdateOne) ClearIPSize ¶ added in v1.0.3
func (duo *DecisionUpdateOne) ClearIPSize() *DecisionUpdateOne
ClearIPSize clears the value of the "ip_size" field.
func (*DecisionUpdateOne) ClearOwner ¶
func (duo *DecisionUpdateOne) ClearOwner() *DecisionUpdateOne
ClearOwner clears the "owner" edge to the Alert entity.
func (*DecisionUpdateOne) ClearStartIP ¶
func (duo *DecisionUpdateOne) ClearStartIP() *DecisionUpdateOne
ClearStartIP clears the value of the "start_ip" field.
func (*DecisionUpdateOne) ClearStartSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) ClearStartSuffix() *DecisionUpdateOne
ClearStartSuffix clears the value of the "start_suffix" field.
func (*DecisionUpdateOne) ClearUUID ¶ added in v1.5.0
func (duo *DecisionUpdateOne) ClearUUID() *DecisionUpdateOne
ClearUUID clears the value of the "uuid" field.
func (*DecisionUpdateOne) ClearUntil ¶ added in v1.3.4
func (duo *DecisionUpdateOne) ClearUntil() *DecisionUpdateOne
ClearUntil clears the value of the "until" field.
func (*DecisionUpdateOne) ClearUpdatedAt ¶ added in v1.3.0
func (duo *DecisionUpdateOne) ClearUpdatedAt() *DecisionUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*DecisionUpdateOne) Exec ¶
func (duo *DecisionUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DecisionUpdateOne) ExecX ¶
func (duo *DecisionUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DecisionUpdateOne) Mutation ¶
func (duo *DecisionUpdateOne) Mutation() *DecisionMutation
Mutation returns the DecisionMutation object of the builder.
func (*DecisionUpdateOne) Save ¶
func (duo *DecisionUpdateOne) Save(ctx context.Context) (*Decision, error)
Save executes the query and returns the updated Decision entity.
func (*DecisionUpdateOne) SaveX ¶
func (duo *DecisionUpdateOne) SaveX(ctx context.Context) *Decision
SaveX is like Save, but panics if an error occurs.
func (*DecisionUpdateOne) Select ¶ added in v1.2.1
func (duo *DecisionUpdateOne) Select(field string, fields ...string) *DecisionUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DecisionUpdateOne) SetCreatedAt ¶
func (duo *DecisionUpdateOne) SetCreatedAt(t time.Time) *DecisionUpdateOne
SetCreatedAt sets the "created_at" field.
func (*DecisionUpdateOne) SetEndIP ¶
func (duo *DecisionUpdateOne) SetEndIP(i int64) *DecisionUpdateOne
SetEndIP sets the "end_ip" field.
func (*DecisionUpdateOne) SetEndSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) SetEndSuffix(i int64) *DecisionUpdateOne
SetEndSuffix sets the "end_suffix" field.
func (*DecisionUpdateOne) SetIPSize ¶ added in v1.0.3
func (duo *DecisionUpdateOne) SetIPSize(i int64) *DecisionUpdateOne
SetIPSize sets the "ip_size" field.
func (*DecisionUpdateOne) SetNillableEndIP ¶
func (duo *DecisionUpdateOne) SetNillableEndIP(i *int64) *DecisionUpdateOne
SetNillableEndIP sets the "end_ip" field if the given value is not nil.
func (*DecisionUpdateOne) SetNillableEndSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) SetNillableEndSuffix(i *int64) *DecisionUpdateOne
SetNillableEndSuffix sets the "end_suffix" field if the given value is not nil.
func (*DecisionUpdateOne) SetNillableIPSize ¶ added in v1.0.3
func (duo *DecisionUpdateOne) SetNillableIPSize(i *int64) *DecisionUpdateOne
SetNillableIPSize sets the "ip_size" field if the given value is not nil.
func (*DecisionUpdateOne) SetNillableOwnerID ¶
func (duo *DecisionUpdateOne) SetNillableOwnerID(id *int) *DecisionUpdateOne
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*DecisionUpdateOne) SetNillableSimulated ¶
func (duo *DecisionUpdateOne) SetNillableSimulated(b *bool) *DecisionUpdateOne
SetNillableSimulated sets the "simulated" field if the given value is not nil.
func (*DecisionUpdateOne) SetNillableStartIP ¶
func (duo *DecisionUpdateOne) SetNillableStartIP(i *int64) *DecisionUpdateOne
SetNillableStartIP sets the "start_ip" field if the given value is not nil.
func (*DecisionUpdateOne) SetNillableStartSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) SetNillableStartSuffix(i *int64) *DecisionUpdateOne
SetNillableStartSuffix sets the "start_suffix" field if the given value is not nil.
func (*DecisionUpdateOne) SetNillableUUID ¶ added in v1.5.0
func (duo *DecisionUpdateOne) SetNillableUUID(s *string) *DecisionUpdateOne
SetNillableUUID sets the "uuid" field if the given value is not nil.
func (*DecisionUpdateOne) SetNillableUntil ¶ added in v1.3.4
func (duo *DecisionUpdateOne) SetNillableUntil(t *time.Time) *DecisionUpdateOne
SetNillableUntil sets the "until" field if the given value is not nil.
func (*DecisionUpdateOne) SetOrigin ¶
func (duo *DecisionUpdateOne) SetOrigin(s string) *DecisionUpdateOne
SetOrigin sets the "origin" field.
func (*DecisionUpdateOne) SetOwner ¶
func (duo *DecisionUpdateOne) SetOwner(a *Alert) *DecisionUpdateOne
SetOwner sets the "owner" edge to the Alert entity.
func (*DecisionUpdateOne) SetOwnerID ¶
func (duo *DecisionUpdateOne) SetOwnerID(id int) *DecisionUpdateOne
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*DecisionUpdateOne) SetScenario ¶
func (duo *DecisionUpdateOne) SetScenario(s string) *DecisionUpdateOne
SetScenario sets the "scenario" field.
func (*DecisionUpdateOne) SetScope ¶
func (duo *DecisionUpdateOne) SetScope(s string) *DecisionUpdateOne
SetScope sets the "scope" field.
func (*DecisionUpdateOne) SetSimulated ¶
func (duo *DecisionUpdateOne) SetSimulated(b bool) *DecisionUpdateOne
SetSimulated sets the "simulated" field.
func (*DecisionUpdateOne) SetStartIP ¶
func (duo *DecisionUpdateOne) SetStartIP(i int64) *DecisionUpdateOne
SetStartIP sets the "start_ip" field.
func (*DecisionUpdateOne) SetStartSuffix ¶ added in v1.0.3
func (duo *DecisionUpdateOne) SetStartSuffix(i int64) *DecisionUpdateOne
SetStartSuffix sets the "start_suffix" field.
func (*DecisionUpdateOne) SetType ¶
func (duo *DecisionUpdateOne) SetType(s string) *DecisionUpdateOne
SetType sets the "type" field.
func (*DecisionUpdateOne) SetUUID ¶ added in v1.5.0
func (duo *DecisionUpdateOne) SetUUID(s string) *DecisionUpdateOne
SetUUID sets the "uuid" field.
func (*DecisionUpdateOne) SetUntil ¶
func (duo *DecisionUpdateOne) SetUntil(t time.Time) *DecisionUpdateOne
SetUntil sets the "until" field.
func (*DecisionUpdateOne) SetUpdatedAt ¶
func (duo *DecisionUpdateOne) SetUpdatedAt(t time.Time) *DecisionUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*DecisionUpdateOne) SetValue ¶
func (duo *DecisionUpdateOne) SetValue(s string) *DecisionUpdateOne
SetValue sets the "value" field.
type Event ¶
type Event struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Time holds the value of the "time" field. Time time.Time `json:"time,omitempty"` // Serialized holds the value of the "serialized" field. Serialized string `json:"serialized,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the EventQuery when eager-loading is set. Edges EventEdges `json:"edges"` // contains filtered or unexported fields }
Event is the model entity for the Event schema.
func (*Event) QueryOwner ¶
func (e *Event) QueryOwner() *AlertQuery
QueryOwner queries the "owner" edge of the Event entity.
func (*Event) Unwrap ¶
Unwrap unwraps the Event entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Event) Update ¶
func (e *Event) Update() *EventUpdateOne
Update returns a builder for updating this Event. Note that you need to call Event.Unwrap() before calling this method if this Event was returned from a transaction, and the transaction was committed or rolled back.
type EventClient ¶
type EventClient struct {
// contains filtered or unexported fields
}
EventClient is a client for the Event schema.
func NewEventClient ¶
func NewEventClient(c config) *EventClient
NewEventClient returns a client for the Event from the given config.
func (*EventClient) Create ¶
func (c *EventClient) Create() *EventCreate
Create returns a builder for creating a Event entity.
func (*EventClient) CreateBulk ¶
func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk
CreateBulk returns a builder for creating a bulk of Event entities.
func (*EventClient) Delete ¶
func (c *EventClient) Delete() *EventDelete
Delete returns a delete builder for Event.
func (*EventClient) DeleteOne ¶
func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EventClient) DeleteOneID ¶
func (c *EventClient) DeleteOneID(id int) *EventDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*EventClient) GetX ¶
func (c *EventClient) GetX(ctx context.Context, id int) *Event
GetX is like Get, but panics if an error occurs.
func (*EventClient) Query ¶
func (c *EventClient) Query() *EventQuery
Query returns a query builder for Event.
func (*EventClient) QueryOwner ¶
func (c *EventClient) QueryOwner(e *Event) *AlertQuery
QueryOwner queries the owner edge of a Event.
func (*EventClient) Update ¶
func (c *EventClient) Update() *EventUpdate
Update returns an update builder for Event.
func (*EventClient) UpdateOne ¶
func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EventClient) UpdateOneID ¶
func (c *EventClient) UpdateOneID(id int) *EventUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EventClient) Use ¶
func (c *EventClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `event.Hooks(f(g(h())))`.
type EventCreate ¶
type EventCreate struct {
// contains filtered or unexported fields
}
EventCreate is the builder for creating a Event entity.
func (*EventCreate) Exec ¶ added in v1.2.1
func (ec *EventCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreate) ExecX ¶ added in v1.2.1
func (ec *EventCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventCreate) Mutation ¶
func (ec *EventCreate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventCreate) Save ¶
func (ec *EventCreate) Save(ctx context.Context) (*Event, error)
Save creates the Event in the database.
func (*EventCreate) SaveX ¶
func (ec *EventCreate) SaveX(ctx context.Context) *Event
SaveX calls Save and panics if Save returns an error.
func (*EventCreate) SetCreatedAt ¶
func (ec *EventCreate) SetCreatedAt(t time.Time) *EventCreate
SetCreatedAt sets the "created_at" field.
func (*EventCreate) SetNillableCreatedAt ¶
func (ec *EventCreate) SetNillableCreatedAt(t *time.Time) *EventCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*EventCreate) SetNillableOwnerID ¶
func (ec *EventCreate) SetNillableOwnerID(id *int) *EventCreate
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*EventCreate) SetNillableUpdatedAt ¶
func (ec *EventCreate) SetNillableUpdatedAt(t *time.Time) *EventCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*EventCreate) SetOwner ¶
func (ec *EventCreate) SetOwner(a *Alert) *EventCreate
SetOwner sets the "owner" edge to the Alert entity.
func (*EventCreate) SetOwnerID ¶
func (ec *EventCreate) SetOwnerID(id int) *EventCreate
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*EventCreate) SetSerialized ¶
func (ec *EventCreate) SetSerialized(s string) *EventCreate
SetSerialized sets the "serialized" field.
func (*EventCreate) SetTime ¶
func (ec *EventCreate) SetTime(t time.Time) *EventCreate
SetTime sets the "time" field.
func (*EventCreate) SetUpdatedAt ¶
func (ec *EventCreate) SetUpdatedAt(t time.Time) *EventCreate
SetUpdatedAt sets the "updated_at" field.
type EventCreateBulk ¶
type EventCreateBulk struct {
// contains filtered or unexported fields
}
EventCreateBulk is the builder for creating many Event entities in bulk.
func (*EventCreateBulk) Exec ¶ added in v1.2.1
func (ecb *EventCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EventCreateBulk) ExecX ¶ added in v1.2.1
func (ecb *EventCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EventDelete ¶
type EventDelete struct {
// contains filtered or unexported fields
}
EventDelete is the builder for deleting a Event entity.
func (*EventDelete) Exec ¶
func (ed *EventDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EventDelete) ExecX ¶
func (ed *EventDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EventDelete) Where ¶
func (ed *EventDelete) Where(ps ...predicate.Event) *EventDelete
Where appends a list predicates to the EventDelete builder.
type EventDeleteOne ¶
type EventDeleteOne struct {
// contains filtered or unexported fields
}
EventDeleteOne is the builder for deleting a single Event entity.
func (*EventDeleteOne) Exec ¶
func (edo *EventDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EventDeleteOne) ExecX ¶
func (edo *EventDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EventEdges ¶
type EventEdges struct { // Owner holds the value of the owner edge. Owner *Alert `json:"owner,omitempty"` // contains filtered or unexported fields }
EventEdges holds the relations/edges for other nodes in the graph.
func (EventEdges) OwnerOrErr ¶
func (e EventEdges) OwnerOrErr() (*Alert, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type EventGroupBy ¶
type EventGroupBy struct {
// contains filtered or unexported fields
}
EventGroupBy is the group-by builder for Event entities.
func (*EventGroupBy) Aggregate ¶
func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EventGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventGroupBy) Scan ¶
func (egb *EventGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*EventGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EventMutation ¶
type EventMutation struct {
// contains filtered or unexported fields
}
EventMutation represents an operation that mutates the Event nodes in the graph.
func (*EventMutation) AddField ¶
func (m *EventMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*EventMutation) AddedEdges ¶
func (m *EventMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EventMutation) AddedField ¶
func (m *EventMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on 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.
func (*EventMutation) AddedFields ¶
func (m *EventMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EventMutation) AddedIDs ¶
func (m *EventMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EventMutation) ClearCreatedAt ¶ added in v1.3.0
func (m *EventMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*EventMutation) ClearEdge ¶
func (m *EventMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*EventMutation) ClearField ¶
func (m *EventMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*EventMutation) ClearOwner ¶
func (m *EventMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Alert entity.
func (*EventMutation) ClearUpdatedAt ¶ added in v1.3.0
func (m *EventMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*EventMutation) ClearedEdges ¶
func (m *EventMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EventMutation) ClearedFields ¶
func (m *EventMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EventMutation) Client ¶
func (m EventMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*EventMutation) CreatedAt ¶
func (m *EventMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*EventMutation) CreatedAtCleared ¶ added in v1.3.0
func (m *EventMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*EventMutation) EdgeCleared ¶
func (m *EventMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EventMutation) Field ¶
func (m *EventMutation) Field(name string) (ent.Value, bool)
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.
func (*EventMutation) FieldCleared ¶
func (m *EventMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EventMutation) Fields ¶
func (m *EventMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*EventMutation) ID ¶
func (m *EventMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*EventMutation) IDs ¶ added in v1.3.1
func (m *EventMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*EventMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*EventMutation) OldSerialized ¶
func (m *EventMutation) OldSerialized(ctx context.Context) (v string, err error)
OldSerialized returns the old "serialized" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) OldTime ¶
OldTime returns the old "time" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*EventMutation) OwnerCleared ¶
func (m *EventMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Alert entity was cleared.
func (*EventMutation) OwnerID ¶
func (m *EventMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*EventMutation) OwnerIDs ¶
func (m *EventMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*EventMutation) RemovedEdges ¶
func (m *EventMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EventMutation) RemovedIDs ¶
func (m *EventMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*EventMutation) ResetCreatedAt ¶
func (m *EventMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*EventMutation) ResetEdge ¶
func (m *EventMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*EventMutation) ResetField ¶
func (m *EventMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*EventMutation) ResetOwner ¶
func (m *EventMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*EventMutation) ResetSerialized ¶
func (m *EventMutation) ResetSerialized()
ResetSerialized resets all changes to the "serialized" field.
func (*EventMutation) ResetTime ¶
func (m *EventMutation) ResetTime()
ResetTime resets all changes to the "time" field.
func (*EventMutation) ResetUpdatedAt ¶
func (m *EventMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*EventMutation) Serialized ¶
func (m *EventMutation) Serialized() (r string, exists bool)
Serialized returns the value of the "serialized" field in the mutation.
func (*EventMutation) SetCreatedAt ¶
func (m *EventMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*EventMutation) SetField ¶
func (m *EventMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*EventMutation) SetOwnerID ¶
func (m *EventMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the Alert entity by id.
func (*EventMutation) SetSerialized ¶
func (m *EventMutation) SetSerialized(s string)
SetSerialized sets the "serialized" field.
func (*EventMutation) SetTime ¶
func (m *EventMutation) SetTime(t time.Time)
SetTime sets the "time" field.
func (*EventMutation) SetUpdatedAt ¶
func (m *EventMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*EventMutation) Time ¶
func (m *EventMutation) Time() (r time.Time, exists bool)
Time returns the value of the "time" field in the mutation.
func (EventMutation) Tx ¶
func (m EventMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EventMutation) Type ¶
func (m *EventMutation) Type() string
Type returns the node type of this mutation (Event).
func (*EventMutation) UpdatedAt ¶
func (m *EventMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*EventMutation) UpdatedAtCleared ¶ added in v1.3.0
func (m *EventMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*EventMutation) Where ¶ added in v1.2.1
func (m *EventMutation) Where(ps ...predicate.Event)
Where appends a list predicates to the EventMutation builder.
type EventQuery ¶
type EventQuery struct {
// contains filtered or unexported fields
}
EventQuery is the builder for querying Event entities.
func (*EventQuery) All ¶
func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)
All executes the query and returns a list of Events.
func (*EventQuery) AllX ¶
func (eq *EventQuery) AllX(ctx context.Context) []*Event
AllX is like All, but panics if an error occurs.
func (*EventQuery) Clone ¶
func (eq *EventQuery) Clone() *EventQuery
Clone returns a duplicate of the EventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EventQuery) Count ¶
func (eq *EventQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EventQuery) CountX ¶
func (eq *EventQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EventQuery) Exist ¶
func (eq *EventQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EventQuery) ExistX ¶
func (eq *EventQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EventQuery) First ¶
func (eq *EventQuery) First(ctx context.Context) (*Event, error)
First returns the first Event entity from the query. Returns a *NotFoundError when no Event was found.
func (*EventQuery) FirstID ¶
func (eq *EventQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Event ID from the query. Returns a *NotFoundError when no Event ID was found.
func (*EventQuery) FirstIDX ¶ added in v1.0.3
func (eq *EventQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EventQuery) FirstX ¶
func (eq *EventQuery) FirstX(ctx context.Context) *Event
FirstX is like First, but panics if an error occurs.
func (*EventQuery) GroupBy ¶
func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Event.Query(). GroupBy(event.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EventQuery) IDs ¶
func (eq *EventQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Event IDs.
func (*EventQuery) IDsX ¶
func (eq *EventQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EventQuery) Limit ¶
func (eq *EventQuery) Limit(limit int) *EventQuery
Limit adds a limit step to the query.
func (*EventQuery) Offset ¶
func (eq *EventQuery) Offset(offset int) *EventQuery
Offset adds an offset step to the query.
func (*EventQuery) Only ¶
func (eq *EventQuery) Only(ctx context.Context) (*Event, error)
Only returns a single Event entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Event entity is found. Returns a *NotFoundError when no Event entities are found.
func (*EventQuery) OnlyID ¶
func (eq *EventQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Event ID in the query. Returns a *NotSingularError when more than one Event ID is found. Returns a *NotFoundError when no entities are found.
func (*EventQuery) OnlyIDX ¶
func (eq *EventQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EventQuery) OnlyX ¶
func (eq *EventQuery) OnlyX(ctx context.Context) *Event
OnlyX is like Only, but panics if an error occurs.
func (*EventQuery) Order ¶
func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery
Order adds an order step to the query.
func (*EventQuery) QueryOwner ¶
func (eq *EventQuery) QueryOwner() *AlertQuery
QueryOwner chains the current query on the "owner" edge.
func (*EventQuery) Select ¶
func (eq *EventQuery) Select(fields ...string) *EventSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Event.Query(). Select(event.FieldCreatedAt). Scan(ctx, &v)
func (*EventQuery) Unique ¶ added in v1.2.1
func (eq *EventQuery) Unique(unique bool) *EventQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*EventQuery) Where ¶
func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery
Where adds a new predicate for the EventQuery builder.
func (*EventQuery) WithOwner ¶
func (eq *EventQuery) WithOwner(opts ...func(*AlertQuery)) *EventQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type EventSelect ¶
type EventSelect struct { *EventQuery // contains filtered or unexported fields }
EventSelect is the builder for selecting fields of Event entities.
func (*EventSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EventSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EventSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EventSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EventSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EventSelect) Scan ¶
func (es *EventSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EventSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EventUpdate ¶
type EventUpdate struct {
// contains filtered or unexported fields
}
EventUpdate is the builder for updating Event entities.
func (*EventUpdate) ClearCreatedAt ¶ added in v1.3.0
func (eu *EventUpdate) ClearCreatedAt() *EventUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*EventUpdate) ClearOwner ¶
func (eu *EventUpdate) ClearOwner() *EventUpdate
ClearOwner clears the "owner" edge to the Alert entity.
func (*EventUpdate) ClearUpdatedAt ¶ added in v1.3.0
func (eu *EventUpdate) ClearUpdatedAt() *EventUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*EventUpdate) Exec ¶
func (eu *EventUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EventUpdate) ExecX ¶
func (eu *EventUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdate) Mutation ¶
func (eu *EventUpdate) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdate) Save ¶
func (eu *EventUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EventUpdate) SaveX ¶
func (eu *EventUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EventUpdate) SetCreatedAt ¶
func (eu *EventUpdate) SetCreatedAt(t time.Time) *EventUpdate
SetCreatedAt sets the "created_at" field.
func (*EventUpdate) SetNillableOwnerID ¶
func (eu *EventUpdate) SetNillableOwnerID(id *int) *EventUpdate
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*EventUpdate) SetOwner ¶
func (eu *EventUpdate) SetOwner(a *Alert) *EventUpdate
SetOwner sets the "owner" edge to the Alert entity.
func (*EventUpdate) SetOwnerID ¶
func (eu *EventUpdate) SetOwnerID(id int) *EventUpdate
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*EventUpdate) SetSerialized ¶
func (eu *EventUpdate) SetSerialized(s string) *EventUpdate
SetSerialized sets the "serialized" field.
func (*EventUpdate) SetTime ¶
func (eu *EventUpdate) SetTime(t time.Time) *EventUpdate
SetTime sets the "time" field.
func (*EventUpdate) SetUpdatedAt ¶
func (eu *EventUpdate) SetUpdatedAt(t time.Time) *EventUpdate
SetUpdatedAt sets the "updated_at" field.
func (*EventUpdate) Where ¶
func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate
Where appends a list predicates to the EventUpdate builder.
type EventUpdateOne ¶
type EventUpdateOne struct {
// contains filtered or unexported fields
}
EventUpdateOne is the builder for updating a single Event entity.
func (*EventUpdateOne) ClearCreatedAt ¶ added in v1.3.0
func (euo *EventUpdateOne) ClearCreatedAt() *EventUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*EventUpdateOne) ClearOwner ¶
func (euo *EventUpdateOne) ClearOwner() *EventUpdateOne
ClearOwner clears the "owner" edge to the Alert entity.
func (*EventUpdateOne) ClearUpdatedAt ¶ added in v1.3.0
func (euo *EventUpdateOne) ClearUpdatedAt() *EventUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*EventUpdateOne) Exec ¶
func (euo *EventUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EventUpdateOne) ExecX ¶
func (euo *EventUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EventUpdateOne) Mutation ¶
func (euo *EventUpdateOne) Mutation() *EventMutation
Mutation returns the EventMutation object of the builder.
func (*EventUpdateOne) Save ¶
func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)
Save executes the query and returns the updated Event entity.
func (*EventUpdateOne) SaveX ¶
func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event
SaveX is like Save, but panics if an error occurs.
func (*EventUpdateOne) Select ¶ added in v1.2.1
func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EventUpdateOne) SetCreatedAt ¶
func (euo *EventUpdateOne) SetCreatedAt(t time.Time) *EventUpdateOne
SetCreatedAt sets the "created_at" field.
func (*EventUpdateOne) SetNillableOwnerID ¶
func (euo *EventUpdateOne) SetNillableOwnerID(id *int) *EventUpdateOne
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*EventUpdateOne) SetOwner ¶
func (euo *EventUpdateOne) SetOwner(a *Alert) *EventUpdateOne
SetOwner sets the "owner" edge to the Alert entity.
func (*EventUpdateOne) SetOwnerID ¶
func (euo *EventUpdateOne) SetOwnerID(id int) *EventUpdateOne
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*EventUpdateOne) SetSerialized ¶
func (euo *EventUpdateOne) SetSerialized(s string) *EventUpdateOne
SetSerialized sets the "serialized" field.
func (*EventUpdateOne) SetTime ¶
func (euo *EventUpdateOne) SetTime(t time.Time) *EventUpdateOne
SetTime sets the "time" field.
func (*EventUpdateOne) SetUpdatedAt ¶
func (euo *EventUpdateOne) SetUpdatedAt(t time.Time) *EventUpdateOne
SetUpdatedAt sets the "updated_at" field.
type Machine ¶
type Machine struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // LastPush holds the value of the "last_push" field. LastPush *time.Time `json:"last_push,omitempty"` // LastHeartbeat holds the value of the "last_heartbeat" field. LastHeartbeat *time.Time `json:"last_heartbeat,omitempty"` // MachineId holds the value of the "machineId" field. MachineId string `json:"machineId,omitempty"` // Password holds the value of the "password" field. Password string `json:"-"` // IpAddress holds the value of the "ipAddress" field. IpAddress string `json:"ipAddress,omitempty"` // Scenarios holds the value of the "scenarios" field. Scenarios string `json:"scenarios,omitempty"` // Version holds the value of the "version" field. Version string `json:"version,omitempty"` // IsValidated holds the value of the "isValidated" field. IsValidated bool `json:"isValidated,omitempty"` // Status holds the value of the "status" field. Status string `json:"status,omitempty"` // AuthType holds the value of the "auth_type" field. AuthType string `json:"auth_type"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MachineQuery when eager-loading is set. Edges MachineEdges `json:"edges"` // contains filtered or unexported fields }
Machine is the model entity for the Machine schema.
func (*Machine) QueryAlerts ¶
func (m *Machine) QueryAlerts() *AlertQuery
QueryAlerts queries the "alerts" edge of the Machine entity.
func (*Machine) Unwrap ¶
Unwrap unwraps the Machine entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Machine) Update ¶
func (m *Machine) Update() *MachineUpdateOne
Update returns a builder for updating this Machine. Note that you need to call Machine.Unwrap() before calling this method if this Machine was returned from a transaction, and the transaction was committed or rolled back.
type MachineClient ¶
type MachineClient struct {
// contains filtered or unexported fields
}
MachineClient is a client for the Machine schema.
func NewMachineClient ¶
func NewMachineClient(c config) *MachineClient
NewMachineClient returns a client for the Machine from the given config.
func (*MachineClient) Create ¶
func (c *MachineClient) Create() *MachineCreate
Create returns a builder for creating a Machine entity.
func (*MachineClient) CreateBulk ¶
func (c *MachineClient) CreateBulk(builders ...*MachineCreate) *MachineCreateBulk
CreateBulk returns a builder for creating a bulk of Machine entities.
func (*MachineClient) Delete ¶
func (c *MachineClient) Delete() *MachineDelete
Delete returns a delete builder for Machine.
func (*MachineClient) DeleteOne ¶
func (c *MachineClient) DeleteOne(m *Machine) *MachineDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MachineClient) DeleteOneID ¶
func (c *MachineClient) DeleteOneID(id int) *MachineDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*MachineClient) GetX ¶
func (c *MachineClient) GetX(ctx context.Context, id int) *Machine
GetX is like Get, but panics if an error occurs.
func (*MachineClient) Hooks ¶
func (c *MachineClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MachineClient) Query ¶
func (c *MachineClient) Query() *MachineQuery
Query returns a query builder for Machine.
func (*MachineClient) QueryAlerts ¶
func (c *MachineClient) QueryAlerts(m *Machine) *AlertQuery
QueryAlerts queries the alerts edge of a Machine.
func (*MachineClient) Update ¶
func (c *MachineClient) Update() *MachineUpdate
Update returns an update builder for Machine.
func (*MachineClient) UpdateOne ¶
func (c *MachineClient) UpdateOne(m *Machine) *MachineUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MachineClient) UpdateOneID ¶
func (c *MachineClient) UpdateOneID(id int) *MachineUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MachineClient) Use ¶
func (c *MachineClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `machine.Hooks(f(g(h())))`.
type MachineCreate ¶
type MachineCreate struct {
// contains filtered or unexported fields
}
MachineCreate is the builder for creating a Machine entity.
func (*MachineCreate) AddAlertIDs ¶
func (mc *MachineCreate) AddAlertIDs(ids ...int) *MachineCreate
AddAlertIDs adds the "alerts" edge to the Alert entity by IDs.
func (*MachineCreate) AddAlerts ¶
func (mc *MachineCreate) AddAlerts(a ...*Alert) *MachineCreate
AddAlerts adds the "alerts" edges to the Alert entity.
func (*MachineCreate) Exec ¶ added in v1.2.1
func (mc *MachineCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MachineCreate) ExecX ¶ added in v1.2.1
func (mc *MachineCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MachineCreate) Mutation ¶
func (mc *MachineCreate) Mutation() *MachineMutation
Mutation returns the MachineMutation object of the builder.
func (*MachineCreate) Save ¶
func (mc *MachineCreate) Save(ctx context.Context) (*Machine, error)
Save creates the Machine in the database.
func (*MachineCreate) SaveX ¶
func (mc *MachineCreate) SaveX(ctx context.Context) *Machine
SaveX calls Save and panics if Save returns an error.
func (*MachineCreate) SetAuthType ¶ added in v1.4.0
func (mc *MachineCreate) SetAuthType(s string) *MachineCreate
SetAuthType sets the "auth_type" field.
func (*MachineCreate) SetCreatedAt ¶
func (mc *MachineCreate) SetCreatedAt(t time.Time) *MachineCreate
SetCreatedAt sets the "created_at" field.
func (*MachineCreate) SetIpAddress ¶
func (mc *MachineCreate) SetIpAddress(s string) *MachineCreate
SetIpAddress sets the "ipAddress" field.
func (*MachineCreate) SetIsValidated ¶
func (mc *MachineCreate) SetIsValidated(b bool) *MachineCreate
SetIsValidated sets the "isValidated" field.
func (*MachineCreate) SetLastHeartbeat ¶ added in v1.4.0
func (mc *MachineCreate) SetLastHeartbeat(t time.Time) *MachineCreate
SetLastHeartbeat sets the "last_heartbeat" field.
func (*MachineCreate) SetLastPush ¶ added in v1.3.0
func (mc *MachineCreate) SetLastPush(t time.Time) *MachineCreate
SetLastPush sets the "last_push" field.
func (*MachineCreate) SetMachineId ¶
func (mc *MachineCreate) SetMachineId(s string) *MachineCreate
SetMachineId sets the "machineId" field.
func (*MachineCreate) SetNillableAuthType ¶ added in v1.4.0
func (mc *MachineCreate) SetNillableAuthType(s *string) *MachineCreate
SetNillableAuthType sets the "auth_type" field if the given value is not nil.
func (*MachineCreate) SetNillableCreatedAt ¶
func (mc *MachineCreate) SetNillableCreatedAt(t *time.Time) *MachineCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MachineCreate) SetNillableIsValidated ¶
func (mc *MachineCreate) SetNillableIsValidated(b *bool) *MachineCreate
SetNillableIsValidated sets the "isValidated" field if the given value is not nil.
func (*MachineCreate) SetNillableLastHeartbeat ¶ added in v1.4.0
func (mc *MachineCreate) SetNillableLastHeartbeat(t *time.Time) *MachineCreate
SetNillableLastHeartbeat sets the "last_heartbeat" field if the given value is not nil.
func (*MachineCreate) SetNillableLastPush ¶ added in v1.3.0
func (mc *MachineCreate) SetNillableLastPush(t *time.Time) *MachineCreate
SetNillableLastPush sets the "last_push" field if the given value is not nil.
func (*MachineCreate) SetNillableScenarios ¶
func (mc *MachineCreate) SetNillableScenarios(s *string) *MachineCreate
SetNillableScenarios sets the "scenarios" field if the given value is not nil.
func (*MachineCreate) SetNillableStatus ¶
func (mc *MachineCreate) SetNillableStatus(s *string) *MachineCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MachineCreate) SetNillableUpdatedAt ¶
func (mc *MachineCreate) SetNillableUpdatedAt(t *time.Time) *MachineCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MachineCreate) SetNillableVersion ¶
func (mc *MachineCreate) SetNillableVersion(s *string) *MachineCreate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*MachineCreate) SetPassword ¶
func (mc *MachineCreate) SetPassword(s string) *MachineCreate
SetPassword sets the "password" field.
func (*MachineCreate) SetScenarios ¶
func (mc *MachineCreate) SetScenarios(s string) *MachineCreate
SetScenarios sets the "scenarios" field.
func (*MachineCreate) SetStatus ¶
func (mc *MachineCreate) SetStatus(s string) *MachineCreate
SetStatus sets the "status" field.
func (*MachineCreate) SetUpdatedAt ¶
func (mc *MachineCreate) SetUpdatedAt(t time.Time) *MachineCreate
SetUpdatedAt sets the "updated_at" field.
func (*MachineCreate) SetVersion ¶
func (mc *MachineCreate) SetVersion(s string) *MachineCreate
SetVersion sets the "version" field.
type MachineCreateBulk ¶
type MachineCreateBulk struct {
// contains filtered or unexported fields
}
MachineCreateBulk is the builder for creating many Machine entities in bulk.
func (*MachineCreateBulk) Exec ¶ added in v1.2.1
func (mcb *MachineCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MachineCreateBulk) ExecX ¶ added in v1.2.1
func (mcb *MachineCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MachineDelete ¶
type MachineDelete struct {
// contains filtered or unexported fields
}
MachineDelete is the builder for deleting a Machine entity.
func (*MachineDelete) Exec ¶
func (md *MachineDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MachineDelete) ExecX ¶
func (md *MachineDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MachineDelete) Where ¶
func (md *MachineDelete) Where(ps ...predicate.Machine) *MachineDelete
Where appends a list predicates to the MachineDelete builder.
type MachineDeleteOne ¶
type MachineDeleteOne struct {
// contains filtered or unexported fields
}
MachineDeleteOne is the builder for deleting a single Machine entity.
func (*MachineDeleteOne) Exec ¶
func (mdo *MachineDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MachineDeleteOne) ExecX ¶
func (mdo *MachineDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MachineEdges ¶
type MachineEdges struct { // Alerts holds the value of the alerts edge. Alerts []*Alert `json:"alerts,omitempty"` // contains filtered or unexported fields }
MachineEdges holds the relations/edges for other nodes in the graph.
func (MachineEdges) AlertsOrErr ¶
func (e MachineEdges) AlertsOrErr() ([]*Alert, error)
AlertsOrErr returns the Alerts value or an error if the edge was not loaded in eager-loading.
type MachineGroupBy ¶
type MachineGroupBy struct {
// contains filtered or unexported fields
}
MachineGroupBy is the group-by builder for Machine entities.
func (*MachineGroupBy) Aggregate ¶
func (mgb *MachineGroupBy) Aggregate(fns ...AggregateFunc) *MachineGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MachineGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MachineGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MachineGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MachineGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MachineGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MachineGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MachineGroupBy) Scan ¶
func (mgb *MachineGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*MachineGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MachineMutation ¶
type MachineMutation struct {
// contains filtered or unexported fields
}
MachineMutation represents an operation that mutates the Machine nodes in the graph.
func (*MachineMutation) AddAlertIDs ¶
func (m *MachineMutation) AddAlertIDs(ids ...int)
AddAlertIDs adds the "alerts" edge to the Alert entity by ids.
func (*MachineMutation) AddField ¶
func (m *MachineMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MachineMutation) AddedEdges ¶
func (m *MachineMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MachineMutation) AddedField ¶
func (m *MachineMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on 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.
func (*MachineMutation) AddedFields ¶
func (m *MachineMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MachineMutation) AddedIDs ¶
func (m *MachineMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MachineMutation) AlertsCleared ¶
func (m *MachineMutation) AlertsCleared() bool
AlertsCleared reports if the "alerts" edge to the Alert entity was cleared.
func (*MachineMutation) AlertsIDs ¶
func (m *MachineMutation) AlertsIDs() (ids []int)
AlertsIDs returns the "alerts" edge IDs in the mutation.
func (*MachineMutation) AuthType ¶ added in v1.4.0
func (m *MachineMutation) AuthType() (r string, exists bool)
AuthType returns the value of the "auth_type" field in the mutation.
func (*MachineMutation) ClearAlerts ¶
func (m *MachineMutation) ClearAlerts()
ClearAlerts clears the "alerts" edge to the Alert entity.
func (*MachineMutation) ClearCreatedAt ¶ added in v1.3.0
func (m *MachineMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*MachineMutation) ClearEdge ¶
func (m *MachineMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*MachineMutation) ClearField ¶
func (m *MachineMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*MachineMutation) ClearLastHeartbeat ¶ added in v1.4.0
func (m *MachineMutation) ClearLastHeartbeat()
ClearLastHeartbeat clears the value of the "last_heartbeat" field.
func (*MachineMutation) ClearLastPush ¶ added in v1.3.0
func (m *MachineMutation) ClearLastPush()
ClearLastPush clears the value of the "last_push" field.
func (*MachineMutation) ClearScenarios ¶
func (m *MachineMutation) ClearScenarios()
ClearScenarios clears the value of the "scenarios" field.
func (*MachineMutation) ClearStatus ¶
func (m *MachineMutation) ClearStatus()
ClearStatus clears the value of the "status" field.
func (*MachineMutation) ClearUpdatedAt ¶ added in v1.3.0
func (m *MachineMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MachineMutation) ClearVersion ¶
func (m *MachineMutation) ClearVersion()
ClearVersion clears the value of the "version" field.
func (*MachineMutation) ClearedEdges ¶
func (m *MachineMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MachineMutation) ClearedFields ¶
func (m *MachineMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MachineMutation) Client ¶
func (m MachineMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*MachineMutation) CreatedAt ¶
func (m *MachineMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MachineMutation) CreatedAtCleared ¶ added in v1.3.0
func (m *MachineMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*MachineMutation) EdgeCleared ¶
func (m *MachineMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MachineMutation) Field ¶
func (m *MachineMutation) Field(name string) (ent.Value, bool)
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.
func (*MachineMutation) FieldCleared ¶
func (m *MachineMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MachineMutation) Fields ¶
func (m *MachineMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*MachineMutation) ID ¶
func (m *MachineMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MachineMutation) IDs ¶ added in v1.3.1
func (m *MachineMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MachineMutation) IpAddress ¶
func (m *MachineMutation) IpAddress() (r string, exists bool)
IpAddress returns the value of the "ipAddress" field in the mutation.
func (*MachineMutation) IsValidated ¶
func (m *MachineMutation) IsValidated() (r bool, exists bool)
IsValidated returns the value of the "isValidated" field in the mutation.
func (*MachineMutation) LastHeartbeat ¶ added in v1.4.0
func (m *MachineMutation) LastHeartbeat() (r time.Time, exists bool)
LastHeartbeat returns the value of the "last_heartbeat" field in the mutation.
func (*MachineMutation) LastHeartbeatCleared ¶ added in v1.4.0
func (m *MachineMutation) LastHeartbeatCleared() bool
LastHeartbeatCleared returns if the "last_heartbeat" field was cleared in this mutation.
func (*MachineMutation) LastPush ¶ added in v1.3.0
func (m *MachineMutation) LastPush() (r time.Time, exists bool)
LastPush returns the value of the "last_push" field in the mutation.
func (*MachineMutation) LastPushCleared ¶ added in v1.3.0
func (m *MachineMutation) LastPushCleared() bool
LastPushCleared returns if the "last_push" field was cleared in this mutation.
func (*MachineMutation) MachineId ¶
func (m *MachineMutation) MachineId() (r string, exists bool)
MachineId returns the value of the "machineId" field in the mutation.
func (*MachineMutation) OldAuthType ¶ added in v1.4.0
func (m *MachineMutation) OldAuthType(ctx context.Context) (v string, err error)
OldAuthType returns the old "auth_type" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*MachineMutation) OldIpAddress ¶
func (m *MachineMutation) OldIpAddress(ctx context.Context) (v string, err error)
OldIpAddress returns the old "ipAddress" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldIsValidated ¶
func (m *MachineMutation) OldIsValidated(ctx context.Context) (v bool, err error)
OldIsValidated returns the old "isValidated" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldLastHeartbeat ¶ added in v1.4.0
OldLastHeartbeat returns the old "last_heartbeat" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldLastPush ¶ added in v1.3.0
OldLastPush returns the old "last_push" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldMachineId ¶
func (m *MachineMutation) OldMachineId(ctx context.Context) (v string, err error)
OldMachineId returns the old "machineId" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldPassword ¶
func (m *MachineMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldScenarios ¶
func (m *MachineMutation) OldScenarios(ctx context.Context) (v string, err error)
OldScenarios returns the old "scenarios" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldStatus ¶
func (m *MachineMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) OldVersion ¶
func (m *MachineMutation) OldVersion(ctx context.Context) (v string, err error)
OldVersion returns the old "version" field's value of the Machine entity. If the Machine object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MachineMutation) Password ¶
func (m *MachineMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*MachineMutation) RemoveAlertIDs ¶
func (m *MachineMutation) RemoveAlertIDs(ids ...int)
RemoveAlertIDs removes the "alerts" edge to the Alert entity by IDs.
func (*MachineMutation) RemovedAlertsIDs ¶
func (m *MachineMutation) RemovedAlertsIDs() (ids []int)
RemovedAlerts returns the removed IDs of the "alerts" edge to the Alert entity.
func (*MachineMutation) RemovedEdges ¶
func (m *MachineMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MachineMutation) RemovedIDs ¶
func (m *MachineMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*MachineMutation) ResetAlerts ¶
func (m *MachineMutation) ResetAlerts()
ResetAlerts resets all changes to the "alerts" edge.
func (*MachineMutation) ResetAuthType ¶ added in v1.4.0
func (m *MachineMutation) ResetAuthType()
ResetAuthType resets all changes to the "auth_type" field.
func (*MachineMutation) ResetCreatedAt ¶
func (m *MachineMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MachineMutation) ResetEdge ¶
func (m *MachineMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*MachineMutation) ResetField ¶
func (m *MachineMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*MachineMutation) ResetIpAddress ¶
func (m *MachineMutation) ResetIpAddress()
ResetIpAddress resets all changes to the "ipAddress" field.
func (*MachineMutation) ResetIsValidated ¶
func (m *MachineMutation) ResetIsValidated()
ResetIsValidated resets all changes to the "isValidated" field.
func (*MachineMutation) ResetLastHeartbeat ¶ added in v1.4.0
func (m *MachineMutation) ResetLastHeartbeat()
ResetLastHeartbeat resets all changes to the "last_heartbeat" field.
func (*MachineMutation) ResetLastPush ¶ added in v1.3.0
func (m *MachineMutation) ResetLastPush()
ResetLastPush resets all changes to the "last_push" field.
func (*MachineMutation) ResetMachineId ¶
func (m *MachineMutation) ResetMachineId()
ResetMachineId resets all changes to the "machineId" field.
func (*MachineMutation) ResetPassword ¶
func (m *MachineMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*MachineMutation) ResetScenarios ¶
func (m *MachineMutation) ResetScenarios()
ResetScenarios resets all changes to the "scenarios" field.
func (*MachineMutation) ResetStatus ¶
func (m *MachineMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*MachineMutation) ResetUpdatedAt ¶
func (m *MachineMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MachineMutation) ResetVersion ¶
func (m *MachineMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*MachineMutation) Scenarios ¶
func (m *MachineMutation) Scenarios() (r string, exists bool)
Scenarios returns the value of the "scenarios" field in the mutation.
func (*MachineMutation) ScenariosCleared ¶
func (m *MachineMutation) ScenariosCleared() bool
ScenariosCleared returns if the "scenarios" field was cleared in this mutation.
func (*MachineMutation) SetAuthType ¶ added in v1.4.0
func (m *MachineMutation) SetAuthType(s string)
SetAuthType sets the "auth_type" field.
func (*MachineMutation) SetCreatedAt ¶
func (m *MachineMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MachineMutation) SetField ¶
func (m *MachineMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MachineMutation) SetIpAddress ¶
func (m *MachineMutation) SetIpAddress(s string)
SetIpAddress sets the "ipAddress" field.
func (*MachineMutation) SetIsValidated ¶
func (m *MachineMutation) SetIsValidated(b bool)
SetIsValidated sets the "isValidated" field.
func (*MachineMutation) SetLastHeartbeat ¶ added in v1.4.0
func (m *MachineMutation) SetLastHeartbeat(t time.Time)
SetLastHeartbeat sets the "last_heartbeat" field.
func (*MachineMutation) SetLastPush ¶ added in v1.3.0
func (m *MachineMutation) SetLastPush(t time.Time)
SetLastPush sets the "last_push" field.
func (*MachineMutation) SetMachineId ¶
func (m *MachineMutation) SetMachineId(s string)
SetMachineId sets the "machineId" field.
func (*MachineMutation) SetPassword ¶
func (m *MachineMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*MachineMutation) SetScenarios ¶
func (m *MachineMutation) SetScenarios(s string)
SetScenarios sets the "scenarios" field.
func (*MachineMutation) SetStatus ¶
func (m *MachineMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*MachineMutation) SetUpdatedAt ¶
func (m *MachineMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MachineMutation) SetVersion ¶
func (m *MachineMutation) SetVersion(s string)
SetVersion sets the "version" field.
func (*MachineMutation) Status ¶
func (m *MachineMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (*MachineMutation) StatusCleared ¶
func (m *MachineMutation) StatusCleared() bool
StatusCleared returns if the "status" field was cleared in this mutation.
func (MachineMutation) Tx ¶
func (m MachineMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MachineMutation) Type ¶
func (m *MachineMutation) Type() string
Type returns the node type of this mutation (Machine).
func (*MachineMutation) UpdatedAt ¶
func (m *MachineMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MachineMutation) UpdatedAtCleared ¶ added in v1.3.0
func (m *MachineMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*MachineMutation) Version ¶
func (m *MachineMutation) Version() (r string, exists bool)
Version returns the value of the "version" field in the mutation.
func (*MachineMutation) VersionCleared ¶
func (m *MachineMutation) VersionCleared() bool
VersionCleared returns if the "version" field was cleared in this mutation.
func (*MachineMutation) Where ¶ added in v1.2.1
func (m *MachineMutation) Where(ps ...predicate.Machine)
Where appends a list predicates to the MachineMutation builder.
type MachineQuery ¶
type MachineQuery struct {
// contains filtered or unexported fields
}
MachineQuery is the builder for querying Machine entities.
func (*MachineQuery) All ¶
func (mq *MachineQuery) All(ctx context.Context) ([]*Machine, error)
All executes the query and returns a list of Machines.
func (*MachineQuery) AllX ¶
func (mq *MachineQuery) AllX(ctx context.Context) []*Machine
AllX is like All, but panics if an error occurs.
func (*MachineQuery) Clone ¶
func (mq *MachineQuery) Clone() *MachineQuery
Clone returns a duplicate of the MachineQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MachineQuery) Count ¶
func (mq *MachineQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MachineQuery) CountX ¶
func (mq *MachineQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MachineQuery) Exist ¶
func (mq *MachineQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MachineQuery) ExistX ¶
func (mq *MachineQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MachineQuery) First ¶
func (mq *MachineQuery) First(ctx context.Context) (*Machine, error)
First returns the first Machine entity from the query. Returns a *NotFoundError when no Machine was found.
func (*MachineQuery) FirstID ¶
func (mq *MachineQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Machine ID from the query. Returns a *NotFoundError when no Machine ID was found.
func (*MachineQuery) FirstIDX ¶ added in v1.0.3
func (mq *MachineQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MachineQuery) FirstX ¶
func (mq *MachineQuery) FirstX(ctx context.Context) *Machine
FirstX is like First, but panics if an error occurs.
func (*MachineQuery) GroupBy ¶
func (mq *MachineQuery) GroupBy(field string, fields ...string) *MachineGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Machine.Query(). GroupBy(machine.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MachineQuery) IDs ¶
func (mq *MachineQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Machine IDs.
func (*MachineQuery) IDsX ¶
func (mq *MachineQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MachineQuery) Limit ¶
func (mq *MachineQuery) Limit(limit int) *MachineQuery
Limit adds a limit step to the query.
func (*MachineQuery) Offset ¶
func (mq *MachineQuery) Offset(offset int) *MachineQuery
Offset adds an offset step to the query.
func (*MachineQuery) Only ¶
func (mq *MachineQuery) Only(ctx context.Context) (*Machine, error)
Only returns a single Machine entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Machine entity is found. Returns a *NotFoundError when no Machine entities are found.
func (*MachineQuery) OnlyID ¶
func (mq *MachineQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Machine ID in the query. Returns a *NotSingularError when more than one Machine ID is found. Returns a *NotFoundError when no entities are found.
func (*MachineQuery) OnlyIDX ¶
func (mq *MachineQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MachineQuery) OnlyX ¶
func (mq *MachineQuery) OnlyX(ctx context.Context) *Machine
OnlyX is like Only, but panics if an error occurs.
func (*MachineQuery) Order ¶
func (mq *MachineQuery) Order(o ...OrderFunc) *MachineQuery
Order adds an order step to the query.
func (*MachineQuery) QueryAlerts ¶
func (mq *MachineQuery) QueryAlerts() *AlertQuery
QueryAlerts chains the current query on the "alerts" edge.
func (*MachineQuery) Select ¶
func (mq *MachineQuery) Select(fields ...string) *MachineSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Machine.Query(). Select(machine.FieldCreatedAt). Scan(ctx, &v)
func (*MachineQuery) Unique ¶ added in v1.2.1
func (mq *MachineQuery) Unique(unique bool) *MachineQuery
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MachineQuery) Where ¶
func (mq *MachineQuery) Where(ps ...predicate.Machine) *MachineQuery
Where adds a new predicate for the MachineQuery builder.
func (*MachineQuery) WithAlerts ¶
func (mq *MachineQuery) WithAlerts(opts ...func(*AlertQuery)) *MachineQuery
WithAlerts tells the query-builder to eager-load the nodes that are connected to the "alerts" edge. The optional arguments are used to configure the query builder of the edge.
type MachineSelect ¶
type MachineSelect struct { *MachineQuery // contains filtered or unexported fields }
MachineSelect is the builder for selecting fields of Machine entities.
func (*MachineSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MachineSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MachineSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MachineSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MachineSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MachineSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MachineSelect) Scan ¶
func (ms *MachineSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MachineSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MachineUpdate ¶
type MachineUpdate struct {
// contains filtered or unexported fields
}
MachineUpdate is the builder for updating Machine entities.
func (*MachineUpdate) AddAlertIDs ¶
func (mu *MachineUpdate) AddAlertIDs(ids ...int) *MachineUpdate
AddAlertIDs adds the "alerts" edge to the Alert entity by IDs.
func (*MachineUpdate) AddAlerts ¶
func (mu *MachineUpdate) AddAlerts(a ...*Alert) *MachineUpdate
AddAlerts adds the "alerts" edges to the Alert entity.
func (*MachineUpdate) ClearAlerts ¶
func (mu *MachineUpdate) ClearAlerts() *MachineUpdate
ClearAlerts clears all "alerts" edges to the Alert entity.
func (*MachineUpdate) ClearCreatedAt ¶ added in v1.3.0
func (mu *MachineUpdate) ClearCreatedAt() *MachineUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*MachineUpdate) ClearLastHeartbeat ¶ added in v1.4.0
func (mu *MachineUpdate) ClearLastHeartbeat() *MachineUpdate
ClearLastHeartbeat clears the value of the "last_heartbeat" field.
func (*MachineUpdate) ClearLastPush ¶ added in v1.3.0
func (mu *MachineUpdate) ClearLastPush() *MachineUpdate
ClearLastPush clears the value of the "last_push" field.
func (*MachineUpdate) ClearScenarios ¶
func (mu *MachineUpdate) ClearScenarios() *MachineUpdate
ClearScenarios clears the value of the "scenarios" field.
func (*MachineUpdate) ClearStatus ¶
func (mu *MachineUpdate) ClearStatus() *MachineUpdate
ClearStatus clears the value of the "status" field.
func (*MachineUpdate) ClearUpdatedAt ¶ added in v1.3.0
func (mu *MachineUpdate) ClearUpdatedAt() *MachineUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MachineUpdate) ClearVersion ¶
func (mu *MachineUpdate) ClearVersion() *MachineUpdate
ClearVersion clears the value of the "version" field.
func (*MachineUpdate) Exec ¶
func (mu *MachineUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MachineUpdate) ExecX ¶
func (mu *MachineUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MachineUpdate) Mutation ¶
func (mu *MachineUpdate) Mutation() *MachineMutation
Mutation returns the MachineMutation object of the builder.
func (*MachineUpdate) RemoveAlertIDs ¶
func (mu *MachineUpdate) RemoveAlertIDs(ids ...int) *MachineUpdate
RemoveAlertIDs removes the "alerts" edge to Alert entities by IDs.
func (*MachineUpdate) RemoveAlerts ¶
func (mu *MachineUpdate) RemoveAlerts(a ...*Alert) *MachineUpdate
RemoveAlerts removes "alerts" edges to Alert entities.
func (*MachineUpdate) Save ¶
func (mu *MachineUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MachineUpdate) SaveX ¶
func (mu *MachineUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MachineUpdate) SetAuthType ¶ added in v1.4.0
func (mu *MachineUpdate) SetAuthType(s string) *MachineUpdate
SetAuthType sets the "auth_type" field.
func (*MachineUpdate) SetCreatedAt ¶
func (mu *MachineUpdate) SetCreatedAt(t time.Time) *MachineUpdate
SetCreatedAt sets the "created_at" field.
func (*MachineUpdate) SetIpAddress ¶
func (mu *MachineUpdate) SetIpAddress(s string) *MachineUpdate
SetIpAddress sets the "ipAddress" field.
func (*MachineUpdate) SetIsValidated ¶
func (mu *MachineUpdate) SetIsValidated(b bool) *MachineUpdate
SetIsValidated sets the "isValidated" field.
func (*MachineUpdate) SetLastHeartbeat ¶ added in v1.4.0
func (mu *MachineUpdate) SetLastHeartbeat(t time.Time) *MachineUpdate
SetLastHeartbeat sets the "last_heartbeat" field.
func (*MachineUpdate) SetLastPush ¶ added in v1.3.0
func (mu *MachineUpdate) SetLastPush(t time.Time) *MachineUpdate
SetLastPush sets the "last_push" field.
func (*MachineUpdate) SetMachineId ¶
func (mu *MachineUpdate) SetMachineId(s string) *MachineUpdate
SetMachineId sets the "machineId" field.
func (*MachineUpdate) SetNillableAuthType ¶ added in v1.4.0
func (mu *MachineUpdate) SetNillableAuthType(s *string) *MachineUpdate
SetNillableAuthType sets the "auth_type" field if the given value is not nil.
func (*MachineUpdate) SetNillableIsValidated ¶
func (mu *MachineUpdate) SetNillableIsValidated(b *bool) *MachineUpdate
SetNillableIsValidated sets the "isValidated" field if the given value is not nil.
func (*MachineUpdate) SetNillableScenarios ¶
func (mu *MachineUpdate) SetNillableScenarios(s *string) *MachineUpdate
SetNillableScenarios sets the "scenarios" field if the given value is not nil.
func (*MachineUpdate) SetNillableStatus ¶
func (mu *MachineUpdate) SetNillableStatus(s *string) *MachineUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MachineUpdate) SetNillableVersion ¶
func (mu *MachineUpdate) SetNillableVersion(s *string) *MachineUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*MachineUpdate) SetPassword ¶
func (mu *MachineUpdate) SetPassword(s string) *MachineUpdate
SetPassword sets the "password" field.
func (*MachineUpdate) SetScenarios ¶
func (mu *MachineUpdate) SetScenarios(s string) *MachineUpdate
SetScenarios sets the "scenarios" field.
func (*MachineUpdate) SetStatus ¶
func (mu *MachineUpdate) SetStatus(s string) *MachineUpdate
SetStatus sets the "status" field.
func (*MachineUpdate) SetUpdatedAt ¶
func (mu *MachineUpdate) SetUpdatedAt(t time.Time) *MachineUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MachineUpdate) SetVersion ¶
func (mu *MachineUpdate) SetVersion(s string) *MachineUpdate
SetVersion sets the "version" field.
func (*MachineUpdate) Where ¶
func (mu *MachineUpdate) Where(ps ...predicate.Machine) *MachineUpdate
Where appends a list predicates to the MachineUpdate builder.
type MachineUpdateOne ¶
type MachineUpdateOne struct {
// contains filtered or unexported fields
}
MachineUpdateOne is the builder for updating a single Machine entity.
func (*MachineUpdateOne) AddAlertIDs ¶
func (muo *MachineUpdateOne) AddAlertIDs(ids ...int) *MachineUpdateOne
AddAlertIDs adds the "alerts" edge to the Alert entity by IDs.
func (*MachineUpdateOne) AddAlerts ¶
func (muo *MachineUpdateOne) AddAlerts(a ...*Alert) *MachineUpdateOne
AddAlerts adds the "alerts" edges to the Alert entity.
func (*MachineUpdateOne) ClearAlerts ¶
func (muo *MachineUpdateOne) ClearAlerts() *MachineUpdateOne
ClearAlerts clears all "alerts" edges to the Alert entity.
func (*MachineUpdateOne) ClearCreatedAt ¶ added in v1.3.0
func (muo *MachineUpdateOne) ClearCreatedAt() *MachineUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*MachineUpdateOne) ClearLastHeartbeat ¶ added in v1.4.0
func (muo *MachineUpdateOne) ClearLastHeartbeat() *MachineUpdateOne
ClearLastHeartbeat clears the value of the "last_heartbeat" field.
func (*MachineUpdateOne) ClearLastPush ¶ added in v1.3.0
func (muo *MachineUpdateOne) ClearLastPush() *MachineUpdateOne
ClearLastPush clears the value of the "last_push" field.
func (*MachineUpdateOne) ClearScenarios ¶
func (muo *MachineUpdateOne) ClearScenarios() *MachineUpdateOne
ClearScenarios clears the value of the "scenarios" field.
func (*MachineUpdateOne) ClearStatus ¶
func (muo *MachineUpdateOne) ClearStatus() *MachineUpdateOne
ClearStatus clears the value of the "status" field.
func (*MachineUpdateOne) ClearUpdatedAt ¶ added in v1.3.0
func (muo *MachineUpdateOne) ClearUpdatedAt() *MachineUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MachineUpdateOne) ClearVersion ¶
func (muo *MachineUpdateOne) ClearVersion() *MachineUpdateOne
ClearVersion clears the value of the "version" field.
func (*MachineUpdateOne) Exec ¶
func (muo *MachineUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MachineUpdateOne) ExecX ¶
func (muo *MachineUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MachineUpdateOne) Mutation ¶
func (muo *MachineUpdateOne) Mutation() *MachineMutation
Mutation returns the MachineMutation object of the builder.
func (*MachineUpdateOne) RemoveAlertIDs ¶
func (muo *MachineUpdateOne) RemoveAlertIDs(ids ...int) *MachineUpdateOne
RemoveAlertIDs removes the "alerts" edge to Alert entities by IDs.
func (*MachineUpdateOne) RemoveAlerts ¶
func (muo *MachineUpdateOne) RemoveAlerts(a ...*Alert) *MachineUpdateOne
RemoveAlerts removes "alerts" edges to Alert entities.
func (*MachineUpdateOne) Save ¶
func (muo *MachineUpdateOne) Save(ctx context.Context) (*Machine, error)
Save executes the query and returns the updated Machine entity.
func (*MachineUpdateOne) SaveX ¶
func (muo *MachineUpdateOne) SaveX(ctx context.Context) *Machine
SaveX is like Save, but panics if an error occurs.
func (*MachineUpdateOne) Select ¶ added in v1.2.1
func (muo *MachineUpdateOne) Select(field string, fields ...string) *MachineUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MachineUpdateOne) SetAuthType ¶ added in v1.4.0
func (muo *MachineUpdateOne) SetAuthType(s string) *MachineUpdateOne
SetAuthType sets the "auth_type" field.
func (*MachineUpdateOne) SetCreatedAt ¶
func (muo *MachineUpdateOne) SetCreatedAt(t time.Time) *MachineUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MachineUpdateOne) SetIpAddress ¶
func (muo *MachineUpdateOne) SetIpAddress(s string) *MachineUpdateOne
SetIpAddress sets the "ipAddress" field.
func (*MachineUpdateOne) SetIsValidated ¶
func (muo *MachineUpdateOne) SetIsValidated(b bool) *MachineUpdateOne
SetIsValidated sets the "isValidated" field.
func (*MachineUpdateOne) SetLastHeartbeat ¶ added in v1.4.0
func (muo *MachineUpdateOne) SetLastHeartbeat(t time.Time) *MachineUpdateOne
SetLastHeartbeat sets the "last_heartbeat" field.
func (*MachineUpdateOne) SetLastPush ¶ added in v1.3.0
func (muo *MachineUpdateOne) SetLastPush(t time.Time) *MachineUpdateOne
SetLastPush sets the "last_push" field.
func (*MachineUpdateOne) SetMachineId ¶
func (muo *MachineUpdateOne) SetMachineId(s string) *MachineUpdateOne
SetMachineId sets the "machineId" field.
func (*MachineUpdateOne) SetNillableAuthType ¶ added in v1.4.0
func (muo *MachineUpdateOne) SetNillableAuthType(s *string) *MachineUpdateOne
SetNillableAuthType sets the "auth_type" field if the given value is not nil.
func (*MachineUpdateOne) SetNillableIsValidated ¶
func (muo *MachineUpdateOne) SetNillableIsValidated(b *bool) *MachineUpdateOne
SetNillableIsValidated sets the "isValidated" field if the given value is not nil.
func (*MachineUpdateOne) SetNillableScenarios ¶
func (muo *MachineUpdateOne) SetNillableScenarios(s *string) *MachineUpdateOne
SetNillableScenarios sets the "scenarios" field if the given value is not nil.
func (*MachineUpdateOne) SetNillableStatus ¶
func (muo *MachineUpdateOne) SetNillableStatus(s *string) *MachineUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*MachineUpdateOne) SetNillableVersion ¶
func (muo *MachineUpdateOne) SetNillableVersion(s *string) *MachineUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*MachineUpdateOne) SetPassword ¶
func (muo *MachineUpdateOne) SetPassword(s string) *MachineUpdateOne
SetPassword sets the "password" field.
func (*MachineUpdateOne) SetScenarios ¶
func (muo *MachineUpdateOne) SetScenarios(s string) *MachineUpdateOne
SetScenarios sets the "scenarios" field.
func (*MachineUpdateOne) SetStatus ¶
func (muo *MachineUpdateOne) SetStatus(s string) *MachineUpdateOne
SetStatus sets the "status" field.
func (*MachineUpdateOne) SetUpdatedAt ¶
func (muo *MachineUpdateOne) SetUpdatedAt(t time.Time) *MachineUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MachineUpdateOne) SetVersion ¶
func (muo *MachineUpdateOne) SetVersion(s string) *MachineUpdateOne
SetVersion sets the "version" field.
type Meta ¶
type Meta struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt *time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt *time.Time `json:"updated_at,omitempty"` // Key holds the value of the "key" field. Key string `json:"key,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MetaQuery when eager-loading is set. Edges MetaEdges `json:"edges"` // contains filtered or unexported fields }
Meta is the model entity for the Meta schema.
func (*Meta) QueryOwner ¶
func (m *Meta) QueryOwner() *AlertQuery
QueryOwner queries the "owner" edge of the Meta entity.
func (*Meta) Unwrap ¶
Unwrap unwraps the Meta entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*Meta) Update ¶
func (m *Meta) Update() *MetaUpdateOne
Update returns a builder for updating this Meta. Note that you need to call Meta.Unwrap() before calling this method if this Meta was returned from a transaction, and the transaction was committed or rolled back.
type MetaClient ¶
type MetaClient struct {
// contains filtered or unexported fields
}
MetaClient is a client for the Meta schema.
func NewMetaClient ¶
func NewMetaClient(c config) *MetaClient
NewMetaClient returns a client for the Meta from the given config.
func (*MetaClient) Create ¶
func (c *MetaClient) Create() *MetaCreate
Create returns a builder for creating a Meta entity.
func (*MetaClient) CreateBulk ¶
func (c *MetaClient) CreateBulk(builders ...*MetaCreate) *MetaCreateBulk
CreateBulk returns a builder for creating a bulk of Meta entities.
func (*MetaClient) Delete ¶
func (c *MetaClient) Delete() *MetaDelete
Delete returns a delete builder for Meta.
func (*MetaClient) DeleteOne ¶
func (c *MetaClient) DeleteOne(m *Meta) *MetaDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MetaClient) DeleteOneID ¶
func (c *MetaClient) DeleteOneID(id int) *MetaDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*MetaClient) GetX ¶
func (c *MetaClient) GetX(ctx context.Context, id int) *Meta
GetX is like Get, but panics if an error occurs.
func (*MetaClient) Query ¶
func (c *MetaClient) Query() *MetaQuery
Query returns a query builder for Meta.
func (*MetaClient) QueryOwner ¶
func (c *MetaClient) QueryOwner(m *Meta) *AlertQuery
QueryOwner queries the owner edge of a Meta.
func (*MetaClient) Update ¶
func (c *MetaClient) Update() *MetaUpdate
Update returns an update builder for Meta.
func (*MetaClient) UpdateOne ¶
func (c *MetaClient) UpdateOne(m *Meta) *MetaUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MetaClient) UpdateOneID ¶
func (c *MetaClient) UpdateOneID(id int) *MetaUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MetaClient) Use ¶
func (c *MetaClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `meta.Hooks(f(g(h())))`.
type MetaCreate ¶
type MetaCreate struct {
// contains filtered or unexported fields
}
MetaCreate is the builder for creating a Meta entity.
func (*MetaCreate) Exec ¶ added in v1.2.1
func (mc *MetaCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetaCreate) ExecX ¶ added in v1.2.1
func (mc *MetaCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetaCreate) Mutation ¶
func (mc *MetaCreate) Mutation() *MetaMutation
Mutation returns the MetaMutation object of the builder.
func (*MetaCreate) Save ¶
func (mc *MetaCreate) Save(ctx context.Context) (*Meta, error)
Save creates the Meta in the database.
func (*MetaCreate) SaveX ¶
func (mc *MetaCreate) SaveX(ctx context.Context) *Meta
SaveX calls Save and panics if Save returns an error.
func (*MetaCreate) SetCreatedAt ¶
func (mc *MetaCreate) SetCreatedAt(t time.Time) *MetaCreate
SetCreatedAt sets the "created_at" field.
func (*MetaCreate) SetKey ¶
func (mc *MetaCreate) SetKey(s string) *MetaCreate
SetKey sets the "key" field.
func (*MetaCreate) SetNillableCreatedAt ¶
func (mc *MetaCreate) SetNillableCreatedAt(t *time.Time) *MetaCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MetaCreate) SetNillableOwnerID ¶
func (mc *MetaCreate) SetNillableOwnerID(id *int) *MetaCreate
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*MetaCreate) SetNillableUpdatedAt ¶
func (mc *MetaCreate) SetNillableUpdatedAt(t *time.Time) *MetaCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MetaCreate) SetOwner ¶
func (mc *MetaCreate) SetOwner(a *Alert) *MetaCreate
SetOwner sets the "owner" edge to the Alert entity.
func (*MetaCreate) SetOwnerID ¶
func (mc *MetaCreate) SetOwnerID(id int) *MetaCreate
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*MetaCreate) SetUpdatedAt ¶
func (mc *MetaCreate) SetUpdatedAt(t time.Time) *MetaCreate
SetUpdatedAt sets the "updated_at" field.
func (*MetaCreate) SetValue ¶
func (mc *MetaCreate) SetValue(s string) *MetaCreate
SetValue sets the "value" field.
type MetaCreateBulk ¶
type MetaCreateBulk struct {
// contains filtered or unexported fields
}
MetaCreateBulk is the builder for creating many Meta entities in bulk.
func (*MetaCreateBulk) Exec ¶ added in v1.2.1
func (mcb *MetaCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MetaCreateBulk) ExecX ¶ added in v1.2.1
func (mcb *MetaCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MetaDelete ¶
type MetaDelete struct {
// contains filtered or unexported fields
}
MetaDelete is the builder for deleting a Meta entity.
func (*MetaDelete) Exec ¶
func (md *MetaDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MetaDelete) ExecX ¶
func (md *MetaDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MetaDelete) Where ¶
func (md *MetaDelete) Where(ps ...predicate.Meta) *MetaDelete
Where appends a list predicates to the MetaDelete builder.
type MetaDeleteOne ¶
type MetaDeleteOne struct {
// contains filtered or unexported fields
}
MetaDeleteOne is the builder for deleting a single Meta entity.
func (*MetaDeleteOne) Exec ¶
func (mdo *MetaDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MetaDeleteOne) ExecX ¶
func (mdo *MetaDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MetaEdges ¶
type MetaEdges struct { // Owner holds the value of the owner edge. Owner *Alert `json:"owner,omitempty"` // contains filtered or unexported fields }
MetaEdges holds the relations/edges for other nodes in the graph.
func (MetaEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type MetaGroupBy ¶
type MetaGroupBy struct {
// contains filtered or unexported fields
}
MetaGroupBy is the group-by builder for Meta entities.
func (*MetaGroupBy) Aggregate ¶
func (mgb *MetaGroupBy) Aggregate(fns ...AggregateFunc) *MetaGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MetaGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetaGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MetaGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetaGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetaGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetaGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MetaGroupBy) Scan ¶
func (mgb *MetaGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*MetaGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetaMutation ¶
type MetaMutation struct {
// contains filtered or unexported fields
}
MetaMutation represents an operation that mutates the Meta nodes in the graph.
func (*MetaMutation) AddField ¶
func (m *MetaMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MetaMutation) AddedEdges ¶
func (m *MetaMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MetaMutation) AddedField ¶
func (m *MetaMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on 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.
func (*MetaMutation) AddedFields ¶
func (m *MetaMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MetaMutation) AddedIDs ¶
func (m *MetaMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MetaMutation) ClearCreatedAt ¶ added in v1.3.0
func (m *MetaMutation) ClearCreatedAt()
ClearCreatedAt clears the value of the "created_at" field.
func (*MetaMutation) ClearEdge ¶
func (m *MetaMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*MetaMutation) ClearField ¶
func (m *MetaMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*MetaMutation) ClearOwner ¶
func (m *MetaMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Alert entity.
func (*MetaMutation) ClearUpdatedAt ¶ added in v1.3.0
func (m *MetaMutation) ClearUpdatedAt()
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MetaMutation) ClearedEdges ¶
func (m *MetaMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MetaMutation) ClearedFields ¶
func (m *MetaMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MetaMutation) Client ¶
func (m MetaMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*MetaMutation) CreatedAt ¶
func (m *MetaMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MetaMutation) CreatedAtCleared ¶ added in v1.3.0
func (m *MetaMutation) CreatedAtCleared() bool
CreatedAtCleared returns if the "created_at" field was cleared in this mutation.
func (*MetaMutation) EdgeCleared ¶
func (m *MetaMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MetaMutation) Field ¶
func (m *MetaMutation) Field(name string) (ent.Value, bool)
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.
func (*MetaMutation) FieldCleared ¶
func (m *MetaMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MetaMutation) Fields ¶
func (m *MetaMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*MetaMutation) ID ¶
func (m *MetaMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*MetaMutation) IDs ¶ added in v1.3.1
func (m *MetaMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*MetaMutation) Key ¶
func (m *MetaMutation) Key() (r string, exists bool)
Key returns the value of the "key" field in the mutation.
func (*MetaMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Meta entity. If the Meta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MetaMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*MetaMutation) OldKey ¶
func (m *MetaMutation) OldKey(ctx context.Context) (v string, err error)
OldKey returns the old "key" field's value of the Meta entity. If the Meta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MetaMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Meta entity. If the Meta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MetaMutation) OldValue ¶
func (m *MetaMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Meta entity. If the Meta object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*MetaMutation) OwnerCleared ¶
func (m *MetaMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Alert entity was cleared.
func (*MetaMutation) OwnerID ¶
func (m *MetaMutation) OwnerID() (id int, exists bool)
OwnerID returns the "owner" edge ID in the mutation.
func (*MetaMutation) OwnerIDs ¶
func (m *MetaMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.
func (*MetaMutation) RemovedEdges ¶
func (m *MetaMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MetaMutation) RemovedIDs ¶
func (m *MetaMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*MetaMutation) ResetCreatedAt ¶
func (m *MetaMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MetaMutation) ResetEdge ¶
func (m *MetaMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*MetaMutation) ResetField ¶
func (m *MetaMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*MetaMutation) ResetKey ¶
func (m *MetaMutation) ResetKey()
ResetKey resets all changes to the "key" field.
func (*MetaMutation) ResetOwner ¶
func (m *MetaMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*MetaMutation) ResetUpdatedAt ¶
func (m *MetaMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MetaMutation) ResetValue ¶
func (m *MetaMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*MetaMutation) SetCreatedAt ¶
func (m *MetaMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MetaMutation) SetField ¶
func (m *MetaMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*MetaMutation) SetOwnerID ¶
func (m *MetaMutation) SetOwnerID(id int)
SetOwnerID sets the "owner" edge to the Alert entity by id.
func (*MetaMutation) SetUpdatedAt ¶
func (m *MetaMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MetaMutation) SetValue ¶
func (m *MetaMutation) SetValue(s string)
SetValue sets the "value" field.
func (MetaMutation) Tx ¶
func (m MetaMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MetaMutation) Type ¶
func (m *MetaMutation) Type() string
Type returns the node type of this mutation (Meta).
func (*MetaMutation) UpdatedAt ¶
func (m *MetaMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MetaMutation) UpdatedAtCleared ¶ added in v1.3.0
func (m *MetaMutation) UpdatedAtCleared() bool
UpdatedAtCleared returns if the "updated_at" field was cleared in this mutation.
func (*MetaMutation) Value ¶
func (m *MetaMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*MetaMutation) Where ¶ added in v1.2.1
func (m *MetaMutation) Where(ps ...predicate.Meta)
Where appends a list predicates to the MetaMutation builder.
type MetaQuery ¶
type MetaQuery struct {
// contains filtered or unexported fields
}
MetaQuery is the builder for querying Meta entities.
func (*MetaQuery) Clone ¶
Clone returns a duplicate of the MetaQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MetaQuery) First ¶
First returns the first Meta entity from the query. Returns a *NotFoundError when no Meta was found.
func (*MetaQuery) FirstID ¶
FirstID returns the first Meta ID from the query. Returns a *NotFoundError when no Meta ID was found.
func (*MetaQuery) FirstIDX ¶ added in v1.0.3
FirstIDX is like FirstID, but panics if an error occurs.
func (*MetaQuery) GroupBy ¶
func (mq *MetaQuery) GroupBy(field string, fields ...string) *MetaGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.Meta.Query(). GroupBy(meta.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MetaQuery) Only ¶
Only returns a single Meta entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Meta entity is found. Returns a *NotFoundError when no Meta entities are found.
func (*MetaQuery) OnlyID ¶
OnlyID is like Only, but returns the only Meta ID in the query. Returns a *NotSingularError when more than one Meta ID is found. Returns a *NotFoundError when no entities are found.
func (*MetaQuery) QueryOwner ¶
func (mq *MetaQuery) QueryOwner() *AlertQuery
QueryOwner chains the current query on the "owner" edge.
func (*MetaQuery) Select ¶
func (mq *MetaQuery) Select(fields ...string) *MetaSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.Meta.Query(). Select(meta.FieldCreatedAt). Scan(ctx, &v)
func (*MetaQuery) Unique ¶ added in v1.2.1
Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.
func (*MetaQuery) WithOwner ¶
func (mq *MetaQuery) WithOwner(opts ...func(*AlertQuery)) *MetaQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type MetaSelect ¶
type MetaSelect struct { *MetaQuery // contains filtered or unexported fields }
MetaSelect is the builder for selecting fields of Meta entities.
func (*MetaSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MetaSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MetaSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MetaSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MetaSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MetaSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MetaSelect) Scan ¶
func (ms *MetaSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MetaSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MetaUpdate ¶
type MetaUpdate struct {
// contains filtered or unexported fields
}
MetaUpdate is the builder for updating Meta entities.
func (*MetaUpdate) ClearCreatedAt ¶ added in v1.3.0
func (mu *MetaUpdate) ClearCreatedAt() *MetaUpdate
ClearCreatedAt clears the value of the "created_at" field.
func (*MetaUpdate) ClearOwner ¶
func (mu *MetaUpdate) ClearOwner() *MetaUpdate
ClearOwner clears the "owner" edge to the Alert entity.
func (*MetaUpdate) ClearUpdatedAt ¶ added in v1.3.0
func (mu *MetaUpdate) ClearUpdatedAt() *MetaUpdate
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MetaUpdate) Exec ¶
func (mu *MetaUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MetaUpdate) ExecX ¶
func (mu *MetaUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetaUpdate) Mutation ¶
func (mu *MetaUpdate) Mutation() *MetaMutation
Mutation returns the MetaMutation object of the builder.
func (*MetaUpdate) Save ¶
func (mu *MetaUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MetaUpdate) SaveX ¶
func (mu *MetaUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MetaUpdate) SetCreatedAt ¶
func (mu *MetaUpdate) SetCreatedAt(t time.Time) *MetaUpdate
SetCreatedAt sets the "created_at" field.
func (*MetaUpdate) SetKey ¶
func (mu *MetaUpdate) SetKey(s string) *MetaUpdate
SetKey sets the "key" field.
func (*MetaUpdate) SetNillableOwnerID ¶
func (mu *MetaUpdate) SetNillableOwnerID(id *int) *MetaUpdate
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*MetaUpdate) SetOwner ¶
func (mu *MetaUpdate) SetOwner(a *Alert) *MetaUpdate
SetOwner sets the "owner" edge to the Alert entity.
func (*MetaUpdate) SetOwnerID ¶
func (mu *MetaUpdate) SetOwnerID(id int) *MetaUpdate
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*MetaUpdate) SetUpdatedAt ¶
func (mu *MetaUpdate) SetUpdatedAt(t time.Time) *MetaUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MetaUpdate) SetValue ¶
func (mu *MetaUpdate) SetValue(s string) *MetaUpdate
SetValue sets the "value" field.
func (*MetaUpdate) Where ¶
func (mu *MetaUpdate) Where(ps ...predicate.Meta) *MetaUpdate
Where appends a list predicates to the MetaUpdate builder.
type MetaUpdateOne ¶
type MetaUpdateOne struct {
// contains filtered or unexported fields
}
MetaUpdateOne is the builder for updating a single Meta entity.
func (*MetaUpdateOne) ClearCreatedAt ¶ added in v1.3.0
func (muo *MetaUpdateOne) ClearCreatedAt() *MetaUpdateOne
ClearCreatedAt clears the value of the "created_at" field.
func (*MetaUpdateOne) ClearOwner ¶
func (muo *MetaUpdateOne) ClearOwner() *MetaUpdateOne
ClearOwner clears the "owner" edge to the Alert entity.
func (*MetaUpdateOne) ClearUpdatedAt ¶ added in v1.3.0
func (muo *MetaUpdateOne) ClearUpdatedAt() *MetaUpdateOne
ClearUpdatedAt clears the value of the "updated_at" field.
func (*MetaUpdateOne) Exec ¶
func (muo *MetaUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MetaUpdateOne) ExecX ¶
func (muo *MetaUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MetaUpdateOne) Mutation ¶
func (muo *MetaUpdateOne) Mutation() *MetaMutation
Mutation returns the MetaMutation object of the builder.
func (*MetaUpdateOne) Save ¶
func (muo *MetaUpdateOne) Save(ctx context.Context) (*Meta, error)
Save executes the query and returns the updated Meta entity.
func (*MetaUpdateOne) SaveX ¶
func (muo *MetaUpdateOne) SaveX(ctx context.Context) *Meta
SaveX is like Save, but panics if an error occurs.
func (*MetaUpdateOne) Select ¶ added in v1.2.1
func (muo *MetaUpdateOne) Select(field string, fields ...string) *MetaUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MetaUpdateOne) SetCreatedAt ¶
func (muo *MetaUpdateOne) SetCreatedAt(t time.Time) *MetaUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MetaUpdateOne) SetKey ¶
func (muo *MetaUpdateOne) SetKey(s string) *MetaUpdateOne
SetKey sets the "key" field.
func (*MetaUpdateOne) SetNillableOwnerID ¶
func (muo *MetaUpdateOne) SetNillableOwnerID(id *int) *MetaUpdateOne
SetNillableOwnerID sets the "owner" edge to the Alert entity by ID if the given value is not nil.
func (*MetaUpdateOne) SetOwner ¶
func (muo *MetaUpdateOne) SetOwner(a *Alert) *MetaUpdateOne
SetOwner sets the "owner" edge to the Alert entity.
func (*MetaUpdateOne) SetOwnerID ¶
func (muo *MetaUpdateOne) SetOwnerID(id int) *MetaUpdateOne
SetOwnerID sets the "owner" edge to the Alert entity by ID.
func (*MetaUpdateOne) SetUpdatedAt ¶
func (muo *MetaUpdateOne) SetUpdatedAt(t time.Time) *MetaUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MetaUpdateOne) SetValue ¶
func (muo *MetaUpdateOne) SetValue(s string) *MetaUpdateOne
SetValue sets the "value" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Tx ¶
type Tx struct { // Alert is the client for interacting with the Alert builders. Alert *AlertClient // Bouncer is the client for interacting with the Bouncer builders. Bouncer *BouncerClient // ConfigItem is the client for interacting with the ConfigItem builders. ConfigItem *ConfigItemClient // Decision is the client for interacting with the Decision builders. Decision *DecisionClient // Event is the client for interacting with the Event builders. Event *EventClient // Machine is the client for interacting with the Machine builders. Machine *MachineClient // Meta is the client for interacting with the Meta builders. Meta *MetaClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- alert.go
- alert_create.go
- alert_delete.go
- alert_query.go
- alert_update.go
- bouncer.go
- bouncer_create.go
- bouncer_delete.go
- bouncer_query.go
- bouncer_update.go
- client.go
- config.go
- configitem.go
- configitem_create.go
- configitem_delete.go
- configitem_query.go
- configitem_update.go
- context.go
- decision.go
- decision_create.go
- decision_delete.go
- decision_query.go
- decision_update.go
- ent.go
- event.go
- event_create.go
- event_delete.go
- event_query.go
- event_update.go
- generate.go
- machine.go
- machine_create.go
- machine_delete.go
- machine_query.go
- machine_update.go
- meta.go
- meta_create.go
- meta_delete.go
- meta_query.go
- meta_update.go
- mutation.go
- runtime.go
- tx.go