Documentation ¶
Index ¶
- Constants
- Variables
- 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
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Alert
- func (a *Alert) Counters(ctx context.Context) ([]*Counter, error)
- func (a *Alert) Failures(ctx context.Context) ([]*Failure, error)
- func (a *Alert) Files(ctx context.Context) ([]*File, error)
- func (a Alert) Level() status.Level
- func (a *Alert) NamedCounters(name string) ([]*Counter, error)
- func (a *Alert) NamedFailures(name string) ([]*Failure, error)
- func (a *Alert) NamedFiles(name string) ([]*File, error)
- func (a *Alert) NamedStati(name string) ([]*Status, error)
- func (a *Alert) Node(ctx context.Context) (node *Node, err error)
- func (a *Alert) QueryCounters() *CounterQuery
- func (a *Alert) QueryFailures() *FailureQuery
- func (a *Alert) QueryFiles() *FileQuery
- func (a *Alert) QueryStati() *StatusQuery
- func (a *Alert) Stati(ctx context.Context) ([]*Status, error)
- func (a *Alert) String() string
- func (a *Alert) ToEdge(order *AlertOrder) *AlertEdge
- func (a *Alert) Unwrap() *Alert
- func (a *Alert) Update() *AlertUpdateOne
- 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) QueryCounters(a *Alert) *CounterQuery
- func (c *AlertClient) QueryFailures(a *Alert) *FailureQuery
- func (c *AlertClient) QueryFiles(a *Alert) *FileQuery
- func (c *AlertClient) QueryStati(a *Alert) *StatusQuery
- 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 AlertConnection
- type AlertCreate
- func (ac *AlertCreate) AddCounterIDs(ids ...int) *AlertCreate
- func (ac *AlertCreate) AddCounters(c ...*Counter) *AlertCreate
- func (ac *AlertCreate) AddFailureIDs(ids ...int) *AlertCreate
- func (ac *AlertCreate) AddFailures(f ...*Failure) *AlertCreate
- func (ac *AlertCreate) AddFileIDs(ids ...int) *AlertCreate
- func (ac *AlertCreate) AddFiles(f ...*File) *AlertCreate
- func (ac *AlertCreate) AddStati(s ...*Status) *AlertCreate
- func (ac *AlertCreate) AddStatiIDs(ids ...int) *AlertCreate
- func (ac *AlertCreate) Exec(ctx context.Context) error
- func (ac *AlertCreate) ExecX(ctx context.Context)
- func (ac *AlertCreate) Mutation() *AlertMutation
- func (ac *AlertCreate) OnConflict(opts ...sql.ConflictOption) *AlertUpsertOne
- func (ac *AlertCreate) OnConflictColumns(columns ...string) *AlertUpsertOne
- func (ac *AlertCreate) Save(ctx context.Context) (*Alert, error)
- func (ac *AlertCreate) SaveX(ctx context.Context) *Alert
- func (ac *AlertCreate) SetError(s string) *AlertCreate
- func (ac *AlertCreate) SetIncidentID(u uuid.UUID) *AlertCreate
- func (ac *AlertCreate) SetIntLevel(i int) *AlertCreate
- func (ac *AlertCreate) SetName(s string) *AlertCreate
- func (ac *AlertCreate) SetNillableError(s *string) *AlertCreate
- func (ac *AlertCreate) SetNillableIncidentID(u *uuid.UUID) *AlertCreate
- func (ac *AlertCreate) SetProbeHost(s string) *AlertCreate
- func (ac *AlertCreate) SetProbeOS(s string) *AlertCreate
- func (ac *AlertCreate) SetRegion(s string) *AlertCreate
- func (ac *AlertCreate) SetTime(t time.Time) *AlertCreate
- func (ac *AlertCreate) SetUUID(u uuid.UUID) *AlertCreate
- func (ac *AlertCreate) SetUsername(s string) *AlertCreate
- type AlertCreateBulk
- func (acb *AlertCreateBulk) Exec(ctx context.Context) error
- func (acb *AlertCreateBulk) ExecX(ctx context.Context)
- func (acb *AlertCreateBulk) OnConflict(opts ...sql.ConflictOption) *AlertUpsertBulk
- func (acb *AlertCreateBulk) OnConflictColumns(columns ...string) *AlertUpsertBulk
- func (acb *AlertCreateBulk) Save(ctx context.Context) ([]*Alert, error)
- func (acb *AlertCreateBulk) SaveX(ctx context.Context) []*Alert
- type AlertDelete
- type AlertDeleteOne
- type AlertEdge
- 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) AddCounterIDs(ids ...int)
- func (m *AlertMutation) AddFailureIDs(ids ...int)
- func (m *AlertMutation) AddField(name string, value ent.Value) error
- func (m *AlertMutation) AddFileIDs(ids ...int)
- func (m *AlertMutation) AddIntLevel(i int)
- func (m *AlertMutation) AddStatiIDs(ids ...int)
- func (m *AlertMutation) AddedEdges() []string
- 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) AddedIntLevel() (r int, exists bool)
- func (m *AlertMutation) ClearCounters()
- func (m *AlertMutation) ClearEdge(name string) error
- func (m *AlertMutation) ClearError()
- func (m *AlertMutation) ClearFailures()
- func (m *AlertMutation) ClearField(name string) error
- func (m *AlertMutation) ClearFiles()
- func (m *AlertMutation) ClearIncidentID()
- func (m *AlertMutation) ClearStati()
- func (m *AlertMutation) ClearedEdges() []string
- func (m *AlertMutation) ClearedFields() []string
- func (m AlertMutation) Client() *Client
- func (m *AlertMutation) CountersCleared() bool
- func (m *AlertMutation) CountersIDs() (ids []int)
- func (m *AlertMutation) EdgeCleared(name string) bool
- func (m *AlertMutation) Error() (r string, exists bool)
- func (m *AlertMutation) ErrorCleared() bool
- func (m *AlertMutation) FailuresCleared() bool
- func (m *AlertMutation) FailuresIDs() (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) FilesCleared() bool
- func (m *AlertMutation) FilesIDs() (ids []int)
- func (m *AlertMutation) ID() (id int, exists bool)
- func (m *AlertMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AlertMutation) IncidentID() (r uuid.UUID, exists bool)
- func (m *AlertMutation) IncidentIDCleared() bool
- func (m *AlertMutation) IntLevel() (r int, exists bool)
- func (m *AlertMutation) Name() (r string, exists bool)
- func (m *AlertMutation) OldError(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AlertMutation) OldIncidentID(ctx context.Context) (v uuid.UUID, err error)
- func (m *AlertMutation) OldIntLevel(ctx context.Context) (v int, err error)
- func (m *AlertMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldProbeHost(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldProbeOS(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldRegion(ctx context.Context) (v string, err error)
- func (m *AlertMutation) OldTime(ctx context.Context) (v time.Time, err error)
- func (m *AlertMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *AlertMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *AlertMutation) Op() Op
- func (m *AlertMutation) ProbeHost() (r string, exists bool)
- func (m *AlertMutation) ProbeOS() (r string, exists bool)
- func (m *AlertMutation) Region() (r string, exists bool)
- func (m *AlertMutation) RemoveCounterIDs(ids ...int)
- func (m *AlertMutation) RemoveFailureIDs(ids ...int)
- func (m *AlertMutation) RemoveFileIDs(ids ...int)
- func (m *AlertMutation) RemoveStatiIDs(ids ...int)
- func (m *AlertMutation) RemovedCountersIDs() (ids []int)
- func (m *AlertMutation) RemovedEdges() []string
- func (m *AlertMutation) RemovedFailuresIDs() (ids []int)
- func (m *AlertMutation) RemovedFilesIDs() (ids []int)
- func (m *AlertMutation) RemovedIDs(name string) []ent.Value
- func (m *AlertMutation) RemovedStatiIDs() (ids []int)
- func (m *AlertMutation) ResetCounters()
- func (m *AlertMutation) ResetEdge(name string) error
- func (m *AlertMutation) ResetError()
- func (m *AlertMutation) ResetFailures()
- func (m *AlertMutation) ResetField(name string) error
- func (m *AlertMutation) ResetFiles()
- func (m *AlertMutation) ResetIncidentID()
- func (m *AlertMutation) ResetIntLevel()
- func (m *AlertMutation) ResetName()
- func (m *AlertMutation) ResetProbeHost()
- func (m *AlertMutation) ResetProbeOS()
- func (m *AlertMutation) ResetRegion()
- func (m *AlertMutation) ResetStati()
- func (m *AlertMutation) ResetTime()
- func (m *AlertMutation) ResetUUID()
- func (m *AlertMutation) ResetUsername()
- func (m *AlertMutation) SetError(s string)
- func (m *AlertMutation) SetField(name string, value ent.Value) error
- func (m *AlertMutation) SetIncidentID(u uuid.UUID)
- func (m *AlertMutation) SetIntLevel(i int)
- func (m *AlertMutation) SetName(s string)
- func (m *AlertMutation) SetProbeHost(s string)
- func (m *AlertMutation) SetProbeOS(s string)
- func (m *AlertMutation) SetRegion(s string)
- func (m *AlertMutation) SetTime(t time.Time)
- func (m *AlertMutation) SetUUID(u uuid.UUID)
- func (m *AlertMutation) SetUsername(s string)
- func (m *AlertMutation) StatiCleared() bool
- func (m *AlertMutation) StatiIDs() (ids []int)
- func (m *AlertMutation) Time() (r time.Time, exists bool)
- func (m AlertMutation) Tx() (*Tx, error)
- func (m *AlertMutation) Type() string
- func (m *AlertMutation) UUID() (r uuid.UUID, exists bool)
- func (m *AlertMutation) Username() (r string, exists bool)
- func (m *AlertMutation) Where(ps ...predicate.Alert)
- type AlertOrder
- type AlertOrderField
- type AlertPaginateOption
- 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 (a *AlertQuery) CollectFields(ctx context.Context, satisfies ...string) (*AlertQuery, error)
- 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 (a *AlertQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*AlertConnection, error)
- func (aq *AlertQuery) QueryCounters() *CounterQuery
- func (aq *AlertQuery) QueryFailures() *FailureQuery
- func (aq *AlertQuery) QueryFiles() *FileQuery
- func (aq *AlertQuery) QueryStati() *StatusQuery
- 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) WithCounters(opts ...func(*CounterQuery)) *AlertQuery
- func (aq *AlertQuery) WithFailures(opts ...func(*FailureQuery)) *AlertQuery
- func (aq *AlertQuery) WithFiles(opts ...func(*FileQuery)) *AlertQuery
- func (aq *AlertQuery) WithNamedCounters(name string, opts ...func(*CounterQuery)) *AlertQuery
- func (aq *AlertQuery) WithNamedFailures(name string, opts ...func(*FailureQuery)) *AlertQuery
- func (aq *AlertQuery) WithNamedFiles(name string, opts ...func(*FileQuery)) *AlertQuery
- func (aq *AlertQuery) WithNamedStati(name string, opts ...func(*StatusQuery)) *AlertQuery
- func (aq *AlertQuery) WithStati(opts ...func(*StatusQuery)) *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) AddCounterIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) AddCounters(c ...*Counter) *AlertUpdate
- func (au *AlertUpdate) AddFailureIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) AddFailures(f ...*Failure) *AlertUpdate
- func (au *AlertUpdate) AddFileIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) AddFiles(f ...*File) *AlertUpdate
- func (au *AlertUpdate) AddIntLevel(i int) *AlertUpdate
- func (au *AlertUpdate) AddStati(s ...*Status) *AlertUpdate
- func (au *AlertUpdate) AddStatiIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) ClearCounters() *AlertUpdate
- func (au *AlertUpdate) ClearError() *AlertUpdate
- func (au *AlertUpdate) ClearFailures() *AlertUpdate
- func (au *AlertUpdate) ClearFiles() *AlertUpdate
- func (au *AlertUpdate) ClearIncidentID() *AlertUpdate
- func (au *AlertUpdate) ClearStati() *AlertUpdate
- func (au *AlertUpdate) Exec(ctx context.Context) error
- func (au *AlertUpdate) ExecX(ctx context.Context)
- func (au *AlertUpdate) Mutation() *AlertMutation
- func (au *AlertUpdate) RemoveCounterIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) RemoveCounters(c ...*Counter) *AlertUpdate
- func (au *AlertUpdate) RemoveFailureIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) RemoveFailures(f ...*Failure) *AlertUpdate
- func (au *AlertUpdate) RemoveFileIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) RemoveFiles(f ...*File) *AlertUpdate
- func (au *AlertUpdate) RemoveStati(s ...*Status) *AlertUpdate
- func (au *AlertUpdate) RemoveStatiIDs(ids ...int) *AlertUpdate
- func (au *AlertUpdate) Save(ctx context.Context) (int, error)
- func (au *AlertUpdate) SaveX(ctx context.Context) int
- func (au *AlertUpdate) SetError(s string) *AlertUpdate
- func (au *AlertUpdate) SetIncidentID(u uuid.UUID) *AlertUpdate
- func (au *AlertUpdate) SetIntLevel(i int) *AlertUpdate
- func (au *AlertUpdate) SetName(s string) *AlertUpdate
- func (au *AlertUpdate) SetNillableError(s *string) *AlertUpdate
- func (au *AlertUpdate) SetNillableIncidentID(u *uuid.UUID) *AlertUpdate
- func (au *AlertUpdate) SetProbeHost(s string) *AlertUpdate
- func (au *AlertUpdate) SetProbeOS(s string) *AlertUpdate
- func (au *AlertUpdate) SetRegion(s string) *AlertUpdate
- func (au *AlertUpdate) SetTime(t time.Time) *AlertUpdate
- func (au *AlertUpdate) SetUUID(u uuid.UUID) *AlertUpdate
- func (au *AlertUpdate) SetUsername(s string) *AlertUpdate
- func (au *AlertUpdate) Where(ps ...predicate.Alert) *AlertUpdate
- type AlertUpdateOne
- func (auo *AlertUpdateOne) AddCounterIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddCounters(c ...*Counter) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddFailureIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddFailures(f ...*Failure) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddFileIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddFiles(f ...*File) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddIntLevel(i int) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddStati(s ...*Status) *AlertUpdateOne
- func (auo *AlertUpdateOne) AddStatiIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearCounters() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearError() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearFailures() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearFiles() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearIncidentID() *AlertUpdateOne
- func (auo *AlertUpdateOne) ClearStati() *AlertUpdateOne
- func (auo *AlertUpdateOne) Exec(ctx context.Context) error
- func (auo *AlertUpdateOne) ExecX(ctx context.Context)
- func (auo *AlertUpdateOne) Mutation() *AlertMutation
- func (auo *AlertUpdateOne) RemoveCounterIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveCounters(c ...*Counter) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveFailureIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveFailures(f ...*Failure) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveFileIDs(ids ...int) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveFiles(f ...*File) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveStati(s ...*Status) *AlertUpdateOne
- func (auo *AlertUpdateOne) RemoveStatiIDs(ids ...int) *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) SetError(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetIncidentID(u uuid.UUID) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetIntLevel(i int) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetName(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableError(s *string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetNillableIncidentID(u *uuid.UUID) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetProbeHost(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetProbeOS(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetRegion(s string) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetTime(t time.Time) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetUUID(u uuid.UUID) *AlertUpdateOne
- func (auo *AlertUpdateOne) SetUsername(s string) *AlertUpdateOne
- type AlertUpsert
- func (u *AlertUpsert) AddIntLevel(v int) *AlertUpsert
- func (u *AlertUpsert) ClearError() *AlertUpsert
- func (u *AlertUpsert) ClearIncidentID() *AlertUpsert
- func (u *AlertUpsert) SetError(v string) *AlertUpsert
- func (u *AlertUpsert) SetIncidentID(v uuid.UUID) *AlertUpsert
- func (u *AlertUpsert) SetIntLevel(v int) *AlertUpsert
- func (u *AlertUpsert) SetName(v string) *AlertUpsert
- func (u *AlertUpsert) SetProbeHost(v string) *AlertUpsert
- func (u *AlertUpsert) SetProbeOS(v string) *AlertUpsert
- func (u *AlertUpsert) SetRegion(v string) *AlertUpsert
- func (u *AlertUpsert) SetTime(v time.Time) *AlertUpsert
- func (u *AlertUpsert) SetUUID(v uuid.UUID) *AlertUpsert
- func (u *AlertUpsert) SetUsername(v string) *AlertUpsert
- func (u *AlertUpsert) UpdateError() *AlertUpsert
- func (u *AlertUpsert) UpdateIncidentID() *AlertUpsert
- func (u *AlertUpsert) UpdateIntLevel() *AlertUpsert
- func (u *AlertUpsert) UpdateName() *AlertUpsert
- func (u *AlertUpsert) UpdateProbeHost() *AlertUpsert
- func (u *AlertUpsert) UpdateProbeOS() *AlertUpsert
- func (u *AlertUpsert) UpdateRegion() *AlertUpsert
- func (u *AlertUpsert) UpdateTime() *AlertUpsert
- func (u *AlertUpsert) UpdateUUID() *AlertUpsert
- func (u *AlertUpsert) UpdateUsername() *AlertUpsert
- type AlertUpsertBulk
- func (u *AlertUpsertBulk) AddIntLevel(v int) *AlertUpsertBulk
- func (u *AlertUpsertBulk) ClearError() *AlertUpsertBulk
- func (u *AlertUpsertBulk) ClearIncidentID() *AlertUpsertBulk
- func (u *AlertUpsertBulk) DoNothing() *AlertUpsertBulk
- func (u *AlertUpsertBulk) Exec(ctx context.Context) error
- func (u *AlertUpsertBulk) ExecX(ctx context.Context)
- func (u *AlertUpsertBulk) Ignore() *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetError(v string) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetIncidentID(v uuid.UUID) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetIntLevel(v int) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetName(v string) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetProbeHost(v string) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetProbeOS(v string) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetRegion(v string) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetTime(v time.Time) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetUUID(v uuid.UUID) *AlertUpsertBulk
- func (u *AlertUpsertBulk) SetUsername(v string) *AlertUpsertBulk
- func (u *AlertUpsertBulk) Update(set func(*AlertUpsert)) *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateError() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateIncidentID() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateIntLevel() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateName() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateNewValues() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateProbeHost() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateProbeOS() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateRegion() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateTime() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateUUID() *AlertUpsertBulk
- func (u *AlertUpsertBulk) UpdateUsername() *AlertUpsertBulk
- type AlertUpsertOne
- func (u *AlertUpsertOne) AddIntLevel(v int) *AlertUpsertOne
- func (u *AlertUpsertOne) ClearError() *AlertUpsertOne
- func (u *AlertUpsertOne) ClearIncidentID() *AlertUpsertOne
- func (u *AlertUpsertOne) DoNothing() *AlertUpsertOne
- func (u *AlertUpsertOne) Exec(ctx context.Context) error
- func (u *AlertUpsertOne) ExecX(ctx context.Context)
- func (u *AlertUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *AlertUpsertOne) IDX(ctx context.Context) int
- func (u *AlertUpsertOne) Ignore() *AlertUpsertOne
- func (u *AlertUpsertOne) SetError(v string) *AlertUpsertOne
- func (u *AlertUpsertOne) SetIncidentID(v uuid.UUID) *AlertUpsertOne
- func (u *AlertUpsertOne) SetIntLevel(v int) *AlertUpsertOne
- func (u *AlertUpsertOne) SetName(v string) *AlertUpsertOne
- func (u *AlertUpsertOne) SetProbeHost(v string) *AlertUpsertOne
- func (u *AlertUpsertOne) SetProbeOS(v string) *AlertUpsertOne
- func (u *AlertUpsertOne) SetRegion(v string) *AlertUpsertOne
- func (u *AlertUpsertOne) SetTime(v time.Time) *AlertUpsertOne
- func (u *AlertUpsertOne) SetUUID(v uuid.UUID) *AlertUpsertOne
- func (u *AlertUpsertOne) SetUsername(v string) *AlertUpsertOne
- func (u *AlertUpsertOne) Update(set func(*AlertUpsert)) *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateError() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateIncidentID() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateIntLevel() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateName() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateNewValues() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateProbeHost() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateProbeOS() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateRegion() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateTime() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateUUID() *AlertUpsertOne
- func (u *AlertUpsertOne) UpdateUsername() *AlertUpsertOne
- type Alerts
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Node(ctx context.Context, id int) (*Node, error)
- func (c *Client) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Counter
- type CounterClient
- func (c *CounterClient) Create() *CounterCreate
- func (c *CounterClient) CreateBulk(builders ...*CounterCreate) *CounterCreateBulk
- func (c *CounterClient) Delete() *CounterDelete
- func (c *CounterClient) DeleteOne(co *Counter) *CounterDeleteOne
- func (c *CounterClient) DeleteOneID(id int) *CounterDeleteOne
- func (c *CounterClient) Get(ctx context.Context, id int) (*Counter, error)
- func (c *CounterClient) GetX(ctx context.Context, id int) *Counter
- func (c *CounterClient) Hooks() []Hook
- func (c *CounterClient) Query() *CounterQuery
- func (c *CounterClient) Update() *CounterUpdate
- func (c *CounterClient) UpdateOne(co *Counter) *CounterUpdateOne
- func (c *CounterClient) UpdateOneID(id int) *CounterUpdateOne
- func (c *CounterClient) Use(hooks ...Hook)
- type CounterConnection
- type CounterCreate
- func (cc *CounterCreate) Exec(ctx context.Context) error
- func (cc *CounterCreate) ExecX(ctx context.Context)
- func (cc *CounterCreate) Mutation() *CounterMutation
- func (cc *CounterCreate) OnConflict(opts ...sql.ConflictOption) *CounterUpsertOne
- func (cc *CounterCreate) OnConflictColumns(columns ...string) *CounterUpsertOne
- func (cc *CounterCreate) Save(ctx context.Context) (*Counter, error)
- func (cc *CounterCreate) SaveX(ctx context.Context) *Counter
- func (cc *CounterCreate) SetName(s string) *CounterCreate
- func (cc *CounterCreate) SetValue(f float64) *CounterCreate
- type CounterCreateBulk
- func (ccb *CounterCreateBulk) Exec(ctx context.Context) error
- func (ccb *CounterCreateBulk) ExecX(ctx context.Context)
- func (ccb *CounterCreateBulk) OnConflict(opts ...sql.ConflictOption) *CounterUpsertBulk
- func (ccb *CounterCreateBulk) OnConflictColumns(columns ...string) *CounterUpsertBulk
- func (ccb *CounterCreateBulk) Save(ctx context.Context) ([]*Counter, error)
- func (ccb *CounterCreateBulk) SaveX(ctx context.Context) []*Counter
- type CounterDelete
- type CounterDeleteOne
- type CounterEdge
- type CounterGroupBy
- func (cgb *CounterGroupBy) Aggregate(fns ...AggregateFunc) *CounterGroupBy
- func (s *CounterGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *CounterGroupBy) BoolX(ctx context.Context) bool
- func (s *CounterGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *CounterGroupBy) BoolsX(ctx context.Context) []bool
- func (s *CounterGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *CounterGroupBy) Float64X(ctx context.Context) float64
- func (s *CounterGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *CounterGroupBy) Float64sX(ctx context.Context) []float64
- func (s *CounterGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *CounterGroupBy) IntX(ctx context.Context) int
- func (s *CounterGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *CounterGroupBy) IntsX(ctx context.Context) []int
- func (cgb *CounterGroupBy) Scan(ctx context.Context, v any) error
- func (s *CounterGroupBy) ScanX(ctx context.Context, v any)
- func (s *CounterGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *CounterGroupBy) StringX(ctx context.Context) string
- func (s *CounterGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *CounterGroupBy) StringsX(ctx context.Context) []string
- type CounterMutation
- func (m *CounterMutation) AddField(name string, value ent.Value) error
- func (m *CounterMutation) AddValue(f float64)
- func (m *CounterMutation) AddedEdges() []string
- func (m *CounterMutation) AddedField(name string) (ent.Value, bool)
- func (m *CounterMutation) AddedFields() []string
- func (m *CounterMutation) AddedIDs(name string) []ent.Value
- func (m *CounterMutation) AddedValue() (r float64, exists bool)
- func (m *CounterMutation) ClearEdge(name string) error
- func (m *CounterMutation) ClearField(name string) error
- func (m *CounterMutation) ClearedEdges() []string
- func (m *CounterMutation) ClearedFields() []string
- func (m CounterMutation) Client() *Client
- func (m *CounterMutation) EdgeCleared(name string) bool
- func (m *CounterMutation) Field(name string) (ent.Value, bool)
- func (m *CounterMutation) FieldCleared(name string) bool
- func (m *CounterMutation) Fields() []string
- func (m *CounterMutation) ID() (id int, exists bool)
- func (m *CounterMutation) IDs(ctx context.Context) ([]int, error)
- func (m *CounterMutation) Name() (r string, exists bool)
- func (m *CounterMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *CounterMutation) OldName(ctx context.Context) (v string, err error)
- func (m *CounterMutation) OldValue(ctx context.Context) (v float64, err error)
- func (m *CounterMutation) Op() Op
- func (m *CounterMutation) RemovedEdges() []string
- func (m *CounterMutation) RemovedIDs(name string) []ent.Value
- func (m *CounterMutation) ResetEdge(name string) error
- func (m *CounterMutation) ResetField(name string) error
- func (m *CounterMutation) ResetName()
- func (m *CounterMutation) ResetValue()
- func (m *CounterMutation) SetField(name string, value ent.Value) error
- func (m *CounterMutation) SetName(s string)
- func (m *CounterMutation) SetValue(f float64)
- func (m CounterMutation) Tx() (*Tx, error)
- func (m *CounterMutation) Type() string
- func (m *CounterMutation) Value() (r float64, exists bool)
- func (m *CounterMutation) Where(ps ...predicate.Counter)
- type CounterOrder
- type CounterOrderField
- type CounterPaginateOption
- type CounterQuery
- func (cq *CounterQuery) All(ctx context.Context) ([]*Counter, error)
- func (cq *CounterQuery) AllX(ctx context.Context) []*Counter
- func (cq *CounterQuery) Clone() *CounterQuery
- func (c *CounterQuery) CollectFields(ctx context.Context, satisfies ...string) (*CounterQuery, error)
- func (cq *CounterQuery) Count(ctx context.Context) (int, error)
- func (cq *CounterQuery) CountX(ctx context.Context) int
- func (cq *CounterQuery) Exist(ctx context.Context) (bool, error)
- func (cq *CounterQuery) ExistX(ctx context.Context) bool
- func (cq *CounterQuery) First(ctx context.Context) (*Counter, error)
- func (cq *CounterQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *CounterQuery) FirstIDX(ctx context.Context) int
- func (cq *CounterQuery) FirstX(ctx context.Context) *Counter
- func (cq *CounterQuery) GroupBy(field string, fields ...string) *CounterGroupBy
- func (cq *CounterQuery) IDs(ctx context.Context) ([]int, error)
- func (cq *CounterQuery) IDsX(ctx context.Context) []int
- func (cq *CounterQuery) Limit(limit int) *CounterQuery
- func (cq *CounterQuery) Offset(offset int) *CounterQuery
- func (cq *CounterQuery) Only(ctx context.Context) (*Counter, error)
- func (cq *CounterQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *CounterQuery) OnlyIDX(ctx context.Context) int
- func (cq *CounterQuery) OnlyX(ctx context.Context) *Counter
- func (cq *CounterQuery) Order(o ...OrderFunc) *CounterQuery
- func (c *CounterQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*CounterConnection, error)
- func (cq *CounterQuery) Select(fields ...string) *CounterSelect
- func (cq *CounterQuery) Unique(unique bool) *CounterQuery
- func (cq *CounterQuery) Where(ps ...predicate.Counter) *CounterQuery
- type CounterSelect
- func (s *CounterSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *CounterSelect) BoolX(ctx context.Context) bool
- func (s *CounterSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *CounterSelect) BoolsX(ctx context.Context) []bool
- func (s *CounterSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *CounterSelect) Float64X(ctx context.Context) float64
- func (s *CounterSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *CounterSelect) Float64sX(ctx context.Context) []float64
- func (s *CounterSelect) Int(ctx context.Context) (_ int, err error)
- func (s *CounterSelect) IntX(ctx context.Context) int
- func (s *CounterSelect) Ints(ctx context.Context) ([]int, error)
- func (s *CounterSelect) IntsX(ctx context.Context) []int
- func (cs *CounterSelect) Scan(ctx context.Context, v any) error
- func (s *CounterSelect) ScanX(ctx context.Context, v any)
- func (s *CounterSelect) String(ctx context.Context) (_ string, err error)
- func (s *CounterSelect) StringX(ctx context.Context) string
- func (s *CounterSelect) Strings(ctx context.Context) ([]string, error)
- func (s *CounterSelect) StringsX(ctx context.Context) []string
- type CounterUpdate
- func (cu *CounterUpdate) AddValue(f float64) *CounterUpdate
- func (cu *CounterUpdate) Exec(ctx context.Context) error
- func (cu *CounterUpdate) ExecX(ctx context.Context)
- func (cu *CounterUpdate) Mutation() *CounterMutation
- func (cu *CounterUpdate) Save(ctx context.Context) (int, error)
- func (cu *CounterUpdate) SaveX(ctx context.Context) int
- func (cu *CounterUpdate) SetName(s string) *CounterUpdate
- func (cu *CounterUpdate) SetValue(f float64) *CounterUpdate
- func (cu *CounterUpdate) Where(ps ...predicate.Counter) *CounterUpdate
- type CounterUpdateOne
- func (cuo *CounterUpdateOne) AddValue(f float64) *CounterUpdateOne
- func (cuo *CounterUpdateOne) Exec(ctx context.Context) error
- func (cuo *CounterUpdateOne) ExecX(ctx context.Context)
- func (cuo *CounterUpdateOne) Mutation() *CounterMutation
- func (cuo *CounterUpdateOne) Save(ctx context.Context) (*Counter, error)
- func (cuo *CounterUpdateOne) SaveX(ctx context.Context) *Counter
- func (cuo *CounterUpdateOne) Select(field string, fields ...string) *CounterUpdateOne
- func (cuo *CounterUpdateOne) SetName(s string) *CounterUpdateOne
- func (cuo *CounterUpdateOne) SetValue(f float64) *CounterUpdateOne
- type CounterUpsert
- type CounterUpsertBulk
- func (u *CounterUpsertBulk) AddValue(v float64) *CounterUpsertBulk
- func (u *CounterUpsertBulk) DoNothing() *CounterUpsertBulk
- func (u *CounterUpsertBulk) Exec(ctx context.Context) error
- func (u *CounterUpsertBulk) ExecX(ctx context.Context)
- func (u *CounterUpsertBulk) Ignore() *CounterUpsertBulk
- func (u *CounterUpsertBulk) SetName(v string) *CounterUpsertBulk
- func (u *CounterUpsertBulk) SetValue(v float64) *CounterUpsertBulk
- func (u *CounterUpsertBulk) Update(set func(*CounterUpsert)) *CounterUpsertBulk
- func (u *CounterUpsertBulk) UpdateName() *CounterUpsertBulk
- func (u *CounterUpsertBulk) UpdateNewValues() *CounterUpsertBulk
- func (u *CounterUpsertBulk) UpdateValue() *CounterUpsertBulk
- type CounterUpsertOne
- func (u *CounterUpsertOne) AddValue(v float64) *CounterUpsertOne
- func (u *CounterUpsertOne) DoNothing() *CounterUpsertOne
- func (u *CounterUpsertOne) Exec(ctx context.Context) error
- func (u *CounterUpsertOne) ExecX(ctx context.Context)
- func (u *CounterUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *CounterUpsertOne) IDX(ctx context.Context) int
- func (u *CounterUpsertOne) Ignore() *CounterUpsertOne
- func (u *CounterUpsertOne) SetName(v string) *CounterUpsertOne
- func (u *CounterUpsertOne) SetValue(v float64) *CounterUpsertOne
- func (u *CounterUpsertOne) Update(set func(*CounterUpsert)) *CounterUpsertOne
- func (u *CounterUpsertOne) UpdateName() *CounterUpsertOne
- func (u *CounterUpsertOne) UpdateNewValues() *CounterUpsertOne
- func (u *CounterUpsertOne) UpdateValue() *CounterUpsertOne
- type Counters
- type Cursor
- type Edge
- type Failure
- type FailureClient
- func (c *FailureClient) Create() *FailureCreate
- func (c *FailureClient) CreateBulk(builders ...*FailureCreate) *FailureCreateBulk
- func (c *FailureClient) Delete() *FailureDelete
- func (c *FailureClient) DeleteOne(f *Failure) *FailureDeleteOne
- func (c *FailureClient) DeleteOneID(id int) *FailureDeleteOne
- func (c *FailureClient) Get(ctx context.Context, id int) (*Failure, error)
- func (c *FailureClient) GetX(ctx context.Context, id int) *Failure
- func (c *FailureClient) Hooks() []Hook
- func (c *FailureClient) Query() *FailureQuery
- func (c *FailureClient) Update() *FailureUpdate
- func (c *FailureClient) UpdateOne(f *Failure) *FailureUpdateOne
- func (c *FailureClient) UpdateOneID(id int) *FailureUpdateOne
- func (c *FailureClient) Use(hooks ...Hook)
- type FailureConnection
- type FailureCreate
- func (fc *FailureCreate) Exec(ctx context.Context) error
- func (fc *FailureCreate) ExecX(ctx context.Context)
- func (fc *FailureCreate) Mutation() *FailureMutation
- func (fc *FailureCreate) OnConflict(opts ...sql.ConflictOption) *FailureUpsertOne
- func (fc *FailureCreate) OnConflictColumns(columns ...string) *FailureUpsertOne
- func (fc *FailureCreate) Save(ctx context.Context) (*Failure, error)
- func (fc *FailureCreate) SaveX(ctx context.Context) *Failure
- func (fc *FailureCreate) SetError(s string) *FailureCreate
- func (fc *FailureCreate) SetIdx(i int) *FailureCreate
- type FailureCreateBulk
- func (fcb *FailureCreateBulk) Exec(ctx context.Context) error
- func (fcb *FailureCreateBulk) ExecX(ctx context.Context)
- func (fcb *FailureCreateBulk) OnConflict(opts ...sql.ConflictOption) *FailureUpsertBulk
- func (fcb *FailureCreateBulk) OnConflictColumns(columns ...string) *FailureUpsertBulk
- func (fcb *FailureCreateBulk) Save(ctx context.Context) ([]*Failure, error)
- func (fcb *FailureCreateBulk) SaveX(ctx context.Context) []*Failure
- type FailureDelete
- type FailureDeleteOne
- type FailureEdge
- type FailureGroupBy
- func (fgb *FailureGroupBy) Aggregate(fns ...AggregateFunc) *FailureGroupBy
- func (s *FailureGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FailureGroupBy) BoolX(ctx context.Context) bool
- func (s *FailureGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FailureGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FailureGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FailureGroupBy) Float64X(ctx context.Context) float64
- func (s *FailureGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FailureGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FailureGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FailureGroupBy) IntX(ctx context.Context) int
- func (s *FailureGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FailureGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FailureGroupBy) Scan(ctx context.Context, v any) error
- func (s *FailureGroupBy) ScanX(ctx context.Context, v any)
- func (s *FailureGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FailureGroupBy) StringX(ctx context.Context) string
- func (s *FailureGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FailureGroupBy) StringsX(ctx context.Context) []string
- type FailureMutation
- func (m *FailureMutation) AddField(name string, value ent.Value) error
- func (m *FailureMutation) AddIdx(i int)
- func (m *FailureMutation) AddedEdges() []string
- func (m *FailureMutation) AddedField(name string) (ent.Value, bool)
- func (m *FailureMutation) AddedFields() []string
- func (m *FailureMutation) AddedIDs(name string) []ent.Value
- func (m *FailureMutation) AddedIdx() (r int, exists bool)
- func (m *FailureMutation) ClearEdge(name string) error
- func (m *FailureMutation) ClearField(name string) error
- func (m *FailureMutation) ClearedEdges() []string
- func (m *FailureMutation) ClearedFields() []string
- func (m FailureMutation) Client() *Client
- func (m *FailureMutation) EdgeCleared(name string) bool
- func (m *FailureMutation) Error() (r string, exists bool)
- func (m *FailureMutation) Field(name string) (ent.Value, bool)
- func (m *FailureMutation) FieldCleared(name string) bool
- func (m *FailureMutation) Fields() []string
- func (m *FailureMutation) ID() (id int, exists bool)
- func (m *FailureMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FailureMutation) Idx() (r int, exists bool)
- func (m *FailureMutation) OldError(ctx context.Context) (v string, err error)
- func (m *FailureMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FailureMutation) OldIdx(ctx context.Context) (v int, err error)
- func (m *FailureMutation) Op() Op
- func (m *FailureMutation) RemovedEdges() []string
- func (m *FailureMutation) RemovedIDs(name string) []ent.Value
- func (m *FailureMutation) ResetEdge(name string) error
- func (m *FailureMutation) ResetError()
- func (m *FailureMutation) ResetField(name string) error
- func (m *FailureMutation) ResetIdx()
- func (m *FailureMutation) SetError(s string)
- func (m *FailureMutation) SetField(name string, value ent.Value) error
- func (m *FailureMutation) SetIdx(i int)
- func (m FailureMutation) Tx() (*Tx, error)
- func (m *FailureMutation) Type() string
- func (m *FailureMutation) Where(ps ...predicate.Failure)
- type FailureOrder
- type FailureOrderField
- type FailurePaginateOption
- type FailureQuery
- func (fq *FailureQuery) All(ctx context.Context) ([]*Failure, error)
- func (fq *FailureQuery) AllX(ctx context.Context) []*Failure
- func (fq *FailureQuery) Clone() *FailureQuery
- func (f *FailureQuery) CollectFields(ctx context.Context, satisfies ...string) (*FailureQuery, error)
- func (fq *FailureQuery) Count(ctx context.Context) (int, error)
- func (fq *FailureQuery) CountX(ctx context.Context) int
- func (fq *FailureQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FailureQuery) ExistX(ctx context.Context) bool
- func (fq *FailureQuery) First(ctx context.Context) (*Failure, error)
- func (fq *FailureQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *FailureQuery) FirstIDX(ctx context.Context) int
- func (fq *FailureQuery) FirstX(ctx context.Context) *Failure
- func (fq *FailureQuery) GroupBy(field string, fields ...string) *FailureGroupBy
- func (fq *FailureQuery) IDs(ctx context.Context) ([]int, error)
- func (fq *FailureQuery) IDsX(ctx context.Context) []int
- func (fq *FailureQuery) Limit(limit int) *FailureQuery
- func (fq *FailureQuery) Offset(offset int) *FailureQuery
- func (fq *FailureQuery) Only(ctx context.Context) (*Failure, error)
- func (fq *FailureQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *FailureQuery) OnlyIDX(ctx context.Context) int
- func (fq *FailureQuery) OnlyX(ctx context.Context) *Failure
- func (fq *FailureQuery) Order(o ...OrderFunc) *FailureQuery
- func (f *FailureQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*FailureConnection, error)
- func (fq *FailureQuery) Select(fields ...string) *FailureSelect
- func (fq *FailureQuery) Unique(unique bool) *FailureQuery
- func (fq *FailureQuery) Where(ps ...predicate.Failure) *FailureQuery
- type FailureSelect
- func (s *FailureSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FailureSelect) BoolX(ctx context.Context) bool
- func (s *FailureSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FailureSelect) BoolsX(ctx context.Context) []bool
- func (s *FailureSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FailureSelect) Float64X(ctx context.Context) float64
- func (s *FailureSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FailureSelect) Float64sX(ctx context.Context) []float64
- func (s *FailureSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FailureSelect) IntX(ctx context.Context) int
- func (s *FailureSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FailureSelect) IntsX(ctx context.Context) []int
- func (fs *FailureSelect) Scan(ctx context.Context, v any) error
- func (s *FailureSelect) ScanX(ctx context.Context, v any)
- func (s *FailureSelect) String(ctx context.Context) (_ string, err error)
- func (s *FailureSelect) StringX(ctx context.Context) string
- func (s *FailureSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FailureSelect) StringsX(ctx context.Context) []string
- type FailureUpdate
- func (fu *FailureUpdate) AddIdx(i int) *FailureUpdate
- func (fu *FailureUpdate) Exec(ctx context.Context) error
- func (fu *FailureUpdate) ExecX(ctx context.Context)
- func (fu *FailureUpdate) Mutation() *FailureMutation
- func (fu *FailureUpdate) Save(ctx context.Context) (int, error)
- func (fu *FailureUpdate) SaveX(ctx context.Context) int
- func (fu *FailureUpdate) SetError(s string) *FailureUpdate
- func (fu *FailureUpdate) SetIdx(i int) *FailureUpdate
- func (fu *FailureUpdate) Where(ps ...predicate.Failure) *FailureUpdate
- type FailureUpdateOne
- func (fuo *FailureUpdateOne) AddIdx(i int) *FailureUpdateOne
- func (fuo *FailureUpdateOne) Exec(ctx context.Context) error
- func (fuo *FailureUpdateOne) ExecX(ctx context.Context)
- func (fuo *FailureUpdateOne) Mutation() *FailureMutation
- func (fuo *FailureUpdateOne) Save(ctx context.Context) (*Failure, error)
- func (fuo *FailureUpdateOne) SaveX(ctx context.Context) *Failure
- func (fuo *FailureUpdateOne) Select(field string, fields ...string) *FailureUpdateOne
- func (fuo *FailureUpdateOne) SetError(s string) *FailureUpdateOne
- func (fuo *FailureUpdateOne) SetIdx(i int) *FailureUpdateOne
- type FailureUpsert
- type FailureUpsertBulk
- func (u *FailureUpsertBulk) AddIdx(v int) *FailureUpsertBulk
- func (u *FailureUpsertBulk) DoNothing() *FailureUpsertBulk
- func (u *FailureUpsertBulk) Exec(ctx context.Context) error
- func (u *FailureUpsertBulk) ExecX(ctx context.Context)
- func (u *FailureUpsertBulk) Ignore() *FailureUpsertBulk
- func (u *FailureUpsertBulk) SetError(v string) *FailureUpsertBulk
- func (u *FailureUpsertBulk) SetIdx(v int) *FailureUpsertBulk
- func (u *FailureUpsertBulk) Update(set func(*FailureUpsert)) *FailureUpsertBulk
- func (u *FailureUpsertBulk) UpdateError() *FailureUpsertBulk
- func (u *FailureUpsertBulk) UpdateIdx() *FailureUpsertBulk
- func (u *FailureUpsertBulk) UpdateNewValues() *FailureUpsertBulk
- type FailureUpsertOne
- func (u *FailureUpsertOne) AddIdx(v int) *FailureUpsertOne
- func (u *FailureUpsertOne) DoNothing() *FailureUpsertOne
- func (u *FailureUpsertOne) Exec(ctx context.Context) error
- func (u *FailureUpsertOne) ExecX(ctx context.Context)
- func (u *FailureUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *FailureUpsertOne) IDX(ctx context.Context) int
- func (u *FailureUpsertOne) Ignore() *FailureUpsertOne
- func (u *FailureUpsertOne) SetError(v string) *FailureUpsertOne
- func (u *FailureUpsertOne) SetIdx(v int) *FailureUpsertOne
- func (u *FailureUpsertOne) Update(set func(*FailureUpsert)) *FailureUpsertOne
- func (u *FailureUpsertOne) UpdateError() *FailureUpsertOne
- func (u *FailureUpsertOne) UpdateIdx() *FailureUpsertOne
- func (u *FailureUpsertOne) UpdateNewValues() *FailureUpsertOne
- type Failures
- type Field
- type File
- type FileClient
- func (c *FileClient) Create() *FileCreate
- func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
- func (c *FileClient) Delete() *FileDelete
- func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
- func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
- func (c *FileClient) Get(ctx context.Context, id int) (*File, error)
- func (c *FileClient) GetX(ctx context.Context, id int) *File
- func (c *FileClient) Hooks() []Hook
- func (c *FileClient) Query() *FileQuery
- func (c *FileClient) Update() *FileUpdate
- func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
- func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
- func (c *FileClient) Use(hooks ...Hook)
- type FileConnection
- type FileCreate
- func (fc *FileCreate) Exec(ctx context.Context) error
- func (fc *FileCreate) ExecX(ctx context.Context)
- func (fc *FileCreate) Mutation() *FileMutation
- func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
- func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
- func (fc *FileCreate) Save(ctx context.Context) (*File, error)
- func (fc *FileCreate) SaveX(ctx context.Context) *File
- func (fc *FileCreate) SetExt(s string) *FileCreate
- func (fc *FileCreate) SetName(s string) *FileCreate
- func (fc *FileCreate) SetPayload(b []byte) *FileCreate
- func (fc *FileCreate) SetSize(i int) *FileCreate
- func (fc *FileCreate) SetType(s string) *FileCreate
- func (fc *FileCreate) SetUUID(u uuid.UUID) *FileCreate
- type FileCreateBulk
- func (fcb *FileCreateBulk) Exec(ctx context.Context) error
- func (fcb *FileCreateBulk) ExecX(ctx context.Context)
- func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
- func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
- func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)
- func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File
- type FileDelete
- type FileDeleteOne
- type FileEdge
- type FileGroupBy
- func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
- func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileGroupBy) BoolX(ctx context.Context) bool
- func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileGroupBy) Float64X(ctx context.Context) float64
- func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FileGroupBy) IntX(ctx context.Context) int
- func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FileGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
- func (s *FileGroupBy) ScanX(ctx context.Context, v any)
- func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FileGroupBy) StringX(ctx context.Context) string
- func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FileGroupBy) StringsX(ctx context.Context) []string
- type FileMutation
- func (m *FileMutation) AddField(name string, value ent.Value) error
- func (m *FileMutation) AddSize(i int)
- func (m *FileMutation) AddedEdges() []string
- func (m *FileMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileMutation) AddedFields() []string
- func (m *FileMutation) AddedIDs(name string) []ent.Value
- func (m *FileMutation) AddedSize() (r int, exists bool)
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) EdgeCleared(name string) bool
- func (m *FileMutation) Ext() (r string, exists bool)
- func (m *FileMutation) Field(name string) (ent.Value, bool)
- func (m *FileMutation) FieldCleared(name string) bool
- func (m *FileMutation) Fields() []string
- func (m *FileMutation) GetType() (r string, exists bool)
- func (m *FileMutation) ID() (id int, exists bool)
- func (m *FileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FileMutation) Name() (r string, exists bool)
- func (m *FileMutation) OldExt(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldPayload(ctx context.Context) (v []byte, err error)
- func (m *FileMutation) OldSize(ctx context.Context) (v int, err error)
- func (m *FileMutation) OldType(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) Payload() (r []byte, exists bool)
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetExt()
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) ResetName()
- func (m *FileMutation) ResetPayload()
- func (m *FileMutation) ResetSize()
- func (m *FileMutation) ResetType()
- func (m *FileMutation) ResetUUID()
- func (m *FileMutation) SetExt(s string)
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetName(s string)
- func (m *FileMutation) SetPayload(b []byte)
- func (m *FileMutation) SetSize(i int)
- func (m *FileMutation) SetType(s string)
- func (m *FileMutation) SetUUID(u uuid.UUID)
- func (m *FileMutation) Size() (r int, exists bool)
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) UUID() (r uuid.UUID, exists bool)
- func (m *FileMutation) Where(ps ...predicate.File)
- type FileOrder
- type FileOrderField
- type FilePaginateOption
- type FileQuery
- func (fq *FileQuery) All(ctx context.Context) ([]*File, error)
- func (fq *FileQuery) AllX(ctx context.Context) []*File
- func (fq *FileQuery) Clone() *FileQuery
- func (f *FileQuery) CollectFields(ctx context.Context, satisfies ...string) (*FileQuery, error)
- func (fq *FileQuery) Count(ctx context.Context) (int, error)
- func (fq *FileQuery) CountX(ctx context.Context) int
- func (fq *FileQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FileQuery) ExistX(ctx context.Context) bool
- func (fq *FileQuery) First(ctx context.Context) (*File, error)
- func (fq *FileQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) FirstIDX(ctx context.Context) int
- func (fq *FileQuery) FirstX(ctx context.Context) *File
- func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
- func (fq *FileQuery) IDs(ctx context.Context) ([]int, error)
- func (fq *FileQuery) IDsX(ctx context.Context) []int
- func (fq *FileQuery) Limit(limit int) *FileQuery
- func (fq *FileQuery) Offset(offset int) *FileQuery
- func (fq *FileQuery) Only(ctx context.Context) (*File, error)
- func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) OnlyIDX(ctx context.Context) int
- func (fq *FileQuery) OnlyX(ctx context.Context) *File
- func (fq *FileQuery) Order(o ...OrderFunc) *FileQuery
- func (f *FileQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*FileConnection, error)
- func (fq *FileQuery) Select(fields ...string) *FileSelect
- func (fq *FileQuery) Unique(unique bool) *FileQuery
- func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery
- type FileSelect
- func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileSelect) BoolX(ctx context.Context) bool
- func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FileSelect) BoolsX(ctx context.Context) []bool
- func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileSelect) Float64X(ctx context.Context) float64
- func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileSelect) Float64sX(ctx context.Context) []float64
- func (s *FileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FileSelect) IntX(ctx context.Context) int
- func (s *FileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FileSelect) IntsX(ctx context.Context) []int
- func (fs *FileSelect) Scan(ctx context.Context, v any) error
- func (s *FileSelect) ScanX(ctx context.Context, v any)
- func (s *FileSelect) String(ctx context.Context) (_ string, err error)
- func (s *FileSelect) StringX(ctx context.Context) string
- func (s *FileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FileSelect) StringsX(ctx context.Context) []string
- type FileUpdate
- func (fu *FileUpdate) AddSize(i int) *FileUpdate
- func (fu *FileUpdate) Exec(ctx context.Context) error
- func (fu *FileUpdate) ExecX(ctx context.Context)
- func (fu *FileUpdate) Mutation() *FileMutation
- func (fu *FileUpdate) Save(ctx context.Context) (int, error)
- func (fu *FileUpdate) SaveX(ctx context.Context) int
- func (fu *FileUpdate) SetExt(s string) *FileUpdate
- func (fu *FileUpdate) SetName(s string) *FileUpdate
- func (fu *FileUpdate) SetPayload(b []byte) *FileUpdate
- func (fu *FileUpdate) SetSize(i int) *FileUpdate
- func (fu *FileUpdate) SetType(s string) *FileUpdate
- func (fu *FileUpdate) SetUUID(u uuid.UUID) *FileUpdate
- func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) Exec(ctx context.Context) error
- func (fuo *FileUpdateOne) ExecX(ctx context.Context)
- func (fuo *FileUpdateOne) Mutation() *FileMutation
- func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
- func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
- func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetExt(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetPayload(b []byte) *FileUpdateOne
- func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetType(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetUUID(u uuid.UUID) *FileUpdateOne
- type FileUpsert
- func (u *FileUpsert) AddSize(v int) *FileUpsert
- func (u *FileUpsert) SetExt(v string) *FileUpsert
- func (u *FileUpsert) SetName(v string) *FileUpsert
- func (u *FileUpsert) SetPayload(v []byte) *FileUpsert
- func (u *FileUpsert) SetSize(v int) *FileUpsert
- func (u *FileUpsert) SetType(v string) *FileUpsert
- func (u *FileUpsert) SetUUID(v uuid.UUID) *FileUpsert
- func (u *FileUpsert) UpdateExt() *FileUpsert
- func (u *FileUpsert) UpdateName() *FileUpsert
- func (u *FileUpsert) UpdatePayload() *FileUpsert
- func (u *FileUpsert) UpdateSize() *FileUpsert
- func (u *FileUpsert) UpdateType() *FileUpsert
- func (u *FileUpsert) UpdateUUID() *FileUpsert
- type FileUpsertBulk
- func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
- func (u *FileUpsertBulk) Exec(ctx context.Context) error
- func (u *FileUpsertBulk) ExecX(ctx context.Context)
- func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
- func (u *FileUpsertBulk) SetExt(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetPayload(v []byte) *FileUpsertBulk
- func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) SetType(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetUUID(v uuid.UUID) *FileUpsertBulk
- func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateExt() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdatePayload() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateType() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateUUID() *FileUpsertBulk
- type FileUpsertOne
- func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne
- func (u *FileUpsertOne) DoNothing() *FileUpsertOne
- func (u *FileUpsertOne) Exec(ctx context.Context) error
- func (u *FileUpsertOne) ExecX(ctx context.Context)
- func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *FileUpsertOne) IDX(ctx context.Context) int
- func (u *FileUpsertOne) Ignore() *FileUpsertOne
- func (u *FileUpsertOne) SetExt(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetPayload(v []byte) *FileUpsertOne
- func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne
- func (u *FileUpsertOne) SetType(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetUUID(v uuid.UUID) *FileUpsertOne
- func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
- func (u *FileUpsertOne) UpdateExt() *FileUpsertOne
- func (u *FileUpsertOne) UpdateName() *FileUpsertOne
- func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
- func (u *FileUpsertOne) UpdatePayload() *FileUpsertOne
- func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
- func (u *FileUpsertOne) UpdateType() *FileUpsertOne
- func (u *FileUpsertOne) UpdateUUID() *FileUpsertOne
- type Files
- type Hook
- type Incident
- func (i *Incident) Counters(ctx context.Context) ([]*Counter, error)
- func (i *Incident) Failures(ctx context.Context) ([]*Failure, error)
- func (i *Incident) Files(ctx context.Context) ([]*File, error)
- func (i Incident) Level() status.Level
- func (i *Incident) NamedCounters(name string) ([]*Counter, error)
- func (i *Incident) NamedFailures(name string) ([]*Failure, error)
- func (i *Incident) NamedFiles(name string) ([]*File, error)
- func (i *Incident) NamedStati(name string) ([]*Status, error)
- func (i *Incident) Node(ctx context.Context) (node *Node, err error)
- func (i *Incident) QueryCounters() *CounterQuery
- func (i *Incident) QueryFailures() *FailureQuery
- func (i *Incident) QueryFiles() *FileQuery
- func (i *Incident) QueryStati() *StatusQuery
- func (i *Incident) Stati(ctx context.Context) ([]*Status, error)
- func (i *Incident) String() string
- func (i *Incident) ToEdge(order *IncidentOrder) *IncidentEdge
- func (i *Incident) Unwrap() *Incident
- func (i *Incident) Update() *IncidentUpdateOne
- type IncidentClient
- func (c *IncidentClient) Create() *IncidentCreate
- func (c *IncidentClient) CreateBulk(builders ...*IncidentCreate) *IncidentCreateBulk
- func (c *IncidentClient) Delete() *IncidentDelete
- func (c *IncidentClient) DeleteOne(i *Incident) *IncidentDeleteOne
- func (c *IncidentClient) DeleteOneID(id int) *IncidentDeleteOne
- func (c *IncidentClient) Get(ctx context.Context, id int) (*Incident, error)
- func (c *IncidentClient) GetX(ctx context.Context, id int) *Incident
- func (c *IncidentClient) Hooks() []Hook
- func (c *IncidentClient) Query() *IncidentQuery
- func (c *IncidentClient) QueryCounters(i *Incident) *CounterQuery
- func (c *IncidentClient) QueryFailures(i *Incident) *FailureQuery
- func (c *IncidentClient) QueryFiles(i *Incident) *FileQuery
- func (c *IncidentClient) QueryStati(i *Incident) *StatusQuery
- func (c *IncidentClient) Update() *IncidentUpdate
- func (c *IncidentClient) UpdateOne(i *Incident) *IncidentUpdateOne
- func (c *IncidentClient) UpdateOneID(id int) *IncidentUpdateOne
- func (c *IncidentClient) Use(hooks ...Hook)
- type IncidentConnection
- type IncidentCreate
- func (ic *IncidentCreate) AddCounterIDs(ids ...int) *IncidentCreate
- func (ic *IncidentCreate) AddCounters(c ...*Counter) *IncidentCreate
- func (ic *IncidentCreate) AddFailureIDs(ids ...int) *IncidentCreate
- func (ic *IncidentCreate) AddFailures(f ...*Failure) *IncidentCreate
- func (ic *IncidentCreate) AddFileIDs(ids ...int) *IncidentCreate
- func (ic *IncidentCreate) AddFiles(f ...*File) *IncidentCreate
- func (ic *IncidentCreate) AddStati(s ...*Status) *IncidentCreate
- func (ic *IncidentCreate) AddStatiIDs(ids ...int) *IncidentCreate
- func (ic *IncidentCreate) Exec(ctx context.Context) error
- func (ic *IncidentCreate) ExecX(ctx context.Context)
- func (ic *IncidentCreate) Mutation() *IncidentMutation
- func (ic *IncidentCreate) OnConflict(opts ...sql.ConflictOption) *IncidentUpsertOne
- func (ic *IncidentCreate) OnConflictColumns(columns ...string) *IncidentUpsertOne
- func (ic *IncidentCreate) Save(ctx context.Context) (*Incident, error)
- func (ic *IncidentCreate) SaveX(ctx context.Context) *Incident
- func (ic *IncidentCreate) SetEnd(t time.Time) *IncidentCreate
- func (ic *IncidentCreate) SetError(s string) *IncidentCreate
- func (ic *IncidentCreate) SetIncidentID(u uuid.UUID) *IncidentCreate
- func (ic *IncidentCreate) SetIntLevel(i int) *IncidentCreate
- func (ic *IncidentCreate) SetName(s string) *IncidentCreate
- func (ic *IncidentCreate) SetNillableEnd(t *time.Time) *IncidentCreate
- func (ic *IncidentCreate) SetNillableError(s *string) *IncidentCreate
- func (ic *IncidentCreate) SetNillableIncidentID(u *uuid.UUID) *IncidentCreate
- func (ic *IncidentCreate) SetProbeHost(s string) *IncidentCreate
- func (ic *IncidentCreate) SetProbeOS(s string) *IncidentCreate
- func (ic *IncidentCreate) SetRegion(s string) *IncidentCreate
- func (ic *IncidentCreate) SetStart(t time.Time) *IncidentCreate
- func (ic *IncidentCreate) SetState(b []byte) *IncidentCreate
- func (ic *IncidentCreate) SetTime(t time.Time) *IncidentCreate
- func (ic *IncidentCreate) SetUUID(u uuid.UUID) *IncidentCreate
- func (ic *IncidentCreate) SetUsername(s string) *IncidentCreate
- type IncidentCreateBulk
- func (icb *IncidentCreateBulk) Exec(ctx context.Context) error
- func (icb *IncidentCreateBulk) ExecX(ctx context.Context)
- func (icb *IncidentCreateBulk) OnConflict(opts ...sql.ConflictOption) *IncidentUpsertBulk
- func (icb *IncidentCreateBulk) OnConflictColumns(columns ...string) *IncidentUpsertBulk
- func (icb *IncidentCreateBulk) Save(ctx context.Context) ([]*Incident, error)
- func (icb *IncidentCreateBulk) SaveX(ctx context.Context) []*Incident
- type IncidentDelete
- type IncidentDeleteOne
- type IncidentEdge
- type IncidentEdges
- type IncidentGroupBy
- func (igb *IncidentGroupBy) Aggregate(fns ...AggregateFunc) *IncidentGroupBy
- func (s *IncidentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *IncidentGroupBy) BoolX(ctx context.Context) bool
- func (s *IncidentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *IncidentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *IncidentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *IncidentGroupBy) Float64X(ctx context.Context) float64
- func (s *IncidentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *IncidentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *IncidentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *IncidentGroupBy) IntX(ctx context.Context) int
- func (s *IncidentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *IncidentGroupBy) IntsX(ctx context.Context) []int
- func (igb *IncidentGroupBy) Scan(ctx context.Context, v any) error
- func (s *IncidentGroupBy) ScanX(ctx context.Context, v any)
- func (s *IncidentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *IncidentGroupBy) StringX(ctx context.Context) string
- func (s *IncidentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *IncidentGroupBy) StringsX(ctx context.Context) []string
- type IncidentMutation
- func (m *IncidentMutation) AddCounterIDs(ids ...int)
- func (m *IncidentMutation) AddFailureIDs(ids ...int)
- func (m *IncidentMutation) AddField(name string, value ent.Value) error
- func (m *IncidentMutation) AddFileIDs(ids ...int)
- func (m *IncidentMutation) AddIntLevel(i int)
- func (m *IncidentMutation) AddStatiIDs(ids ...int)
- func (m *IncidentMutation) AddedEdges() []string
- func (m *IncidentMutation) AddedField(name string) (ent.Value, bool)
- func (m *IncidentMutation) AddedFields() []string
- func (m *IncidentMutation) AddedIDs(name string) []ent.Value
- func (m *IncidentMutation) AddedIntLevel() (r int, exists bool)
- func (m *IncidentMutation) ClearCounters()
- func (m *IncidentMutation) ClearEdge(name string) error
- func (m *IncidentMutation) ClearEnd()
- func (m *IncidentMutation) ClearError()
- func (m *IncidentMutation) ClearFailures()
- func (m *IncidentMutation) ClearField(name string) error
- func (m *IncidentMutation) ClearFiles()
- func (m *IncidentMutation) ClearIncidentID()
- func (m *IncidentMutation) ClearStati()
- func (m *IncidentMutation) ClearedEdges() []string
- func (m *IncidentMutation) ClearedFields() []string
- func (m IncidentMutation) Client() *Client
- func (m *IncidentMutation) CountersCleared() bool
- func (m *IncidentMutation) CountersIDs() (ids []int)
- func (m *IncidentMutation) EdgeCleared(name string) bool
- func (m *IncidentMutation) End() (r time.Time, exists bool)
- func (m *IncidentMutation) EndCleared() bool
- func (m *IncidentMutation) Error() (r string, exists bool)
- func (m *IncidentMutation) ErrorCleared() bool
- func (m *IncidentMutation) FailuresCleared() bool
- func (m *IncidentMutation) FailuresIDs() (ids []int)
- func (m *IncidentMutation) Field(name string) (ent.Value, bool)
- func (m *IncidentMutation) FieldCleared(name string) bool
- func (m *IncidentMutation) Fields() []string
- func (m *IncidentMutation) FilesCleared() bool
- func (m *IncidentMutation) FilesIDs() (ids []int)
- func (m *IncidentMutation) ID() (id int, exists bool)
- func (m *IncidentMutation) IDs(ctx context.Context) ([]int, error)
- func (m *IncidentMutation) IncidentID() (r uuid.UUID, exists bool)
- func (m *IncidentMutation) IncidentIDCleared() bool
- func (m *IncidentMutation) IntLevel() (r int, exists bool)
- func (m *IncidentMutation) Name() (r string, exists bool)
- func (m *IncidentMutation) OldEnd(ctx context.Context) (v time.Time, err error)
- func (m *IncidentMutation) OldError(ctx context.Context) (v string, err error)
- func (m *IncidentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *IncidentMutation) OldIncidentID(ctx context.Context) (v uuid.UUID, err error)
- func (m *IncidentMutation) OldIntLevel(ctx context.Context) (v int, err error)
- func (m *IncidentMutation) OldName(ctx context.Context) (v string, err error)
- func (m *IncidentMutation) OldProbeHost(ctx context.Context) (v string, err error)
- func (m *IncidentMutation) OldProbeOS(ctx context.Context) (v string, err error)
- func (m *IncidentMutation) OldRegion(ctx context.Context) (v string, err error)
- func (m *IncidentMutation) OldStart(ctx context.Context) (v time.Time, err error)
- func (m *IncidentMutation) OldState(ctx context.Context) (v []byte, err error)
- func (m *IncidentMutation) OldTime(ctx context.Context) (v time.Time, err error)
- func (m *IncidentMutation) OldUUID(ctx context.Context) (v uuid.UUID, err error)
- func (m *IncidentMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *IncidentMutation) Op() Op
- func (m *IncidentMutation) ProbeHost() (r string, exists bool)
- func (m *IncidentMutation) ProbeOS() (r string, exists bool)
- func (m *IncidentMutation) Region() (r string, exists bool)
- func (m *IncidentMutation) RemoveCounterIDs(ids ...int)
- func (m *IncidentMutation) RemoveFailureIDs(ids ...int)
- func (m *IncidentMutation) RemoveFileIDs(ids ...int)
- func (m *IncidentMutation) RemoveStatiIDs(ids ...int)
- func (m *IncidentMutation) RemovedCountersIDs() (ids []int)
- func (m *IncidentMutation) RemovedEdges() []string
- func (m *IncidentMutation) RemovedFailuresIDs() (ids []int)
- func (m *IncidentMutation) RemovedFilesIDs() (ids []int)
- func (m *IncidentMutation) RemovedIDs(name string) []ent.Value
- func (m *IncidentMutation) RemovedStatiIDs() (ids []int)
- func (m *IncidentMutation) ResetCounters()
- func (m *IncidentMutation) ResetEdge(name string) error
- func (m *IncidentMutation) ResetEnd()
- func (m *IncidentMutation) ResetError()
- func (m *IncidentMutation) ResetFailures()
- func (m *IncidentMutation) ResetField(name string) error
- func (m *IncidentMutation) ResetFiles()
- func (m *IncidentMutation) ResetIncidentID()
- func (m *IncidentMutation) ResetIntLevel()
- func (m *IncidentMutation) ResetName()
- func (m *IncidentMutation) ResetProbeHost()
- func (m *IncidentMutation) ResetProbeOS()
- func (m *IncidentMutation) ResetRegion()
- func (m *IncidentMutation) ResetStart()
- func (m *IncidentMutation) ResetState()
- func (m *IncidentMutation) ResetStati()
- func (m *IncidentMutation) ResetTime()
- func (m *IncidentMutation) ResetUUID()
- func (m *IncidentMutation) ResetUsername()
- func (m *IncidentMutation) SetEnd(t time.Time)
- func (m *IncidentMutation) SetError(s string)
- func (m *IncidentMutation) SetField(name string, value ent.Value) error
- func (m *IncidentMutation) SetIncidentID(u uuid.UUID)
- func (m *IncidentMutation) SetIntLevel(i int)
- func (m *IncidentMutation) SetName(s string)
- func (m *IncidentMutation) SetProbeHost(s string)
- func (m *IncidentMutation) SetProbeOS(s string)
- func (m *IncidentMutation) SetRegion(s string)
- func (m *IncidentMutation) SetStart(t time.Time)
- func (m *IncidentMutation) SetState(b []byte)
- func (m *IncidentMutation) SetTime(t time.Time)
- func (m *IncidentMutation) SetUUID(u uuid.UUID)
- func (m *IncidentMutation) SetUsername(s string)
- func (m *IncidentMutation) Start() (r time.Time, exists bool)
- func (m *IncidentMutation) State() (r []byte, exists bool)
- func (m *IncidentMutation) StatiCleared() bool
- func (m *IncidentMutation) StatiIDs() (ids []int)
- func (m *IncidentMutation) Time() (r time.Time, exists bool)
- func (m IncidentMutation) Tx() (*Tx, error)
- func (m *IncidentMutation) Type() string
- func (m *IncidentMutation) UUID() (r uuid.UUID, exists bool)
- func (m *IncidentMutation) Username() (r string, exists bool)
- func (m *IncidentMutation) Where(ps ...predicate.Incident)
- type IncidentOrder
- type IncidentOrderField
- type IncidentPaginateOption
- type IncidentQuery
- func (iq *IncidentQuery) All(ctx context.Context) ([]*Incident, error)
- func (iq *IncidentQuery) AllX(ctx context.Context) []*Incident
- func (iq *IncidentQuery) Clone() *IncidentQuery
- func (i *IncidentQuery) CollectFields(ctx context.Context, satisfies ...string) (*IncidentQuery, error)
- func (iq *IncidentQuery) Count(ctx context.Context) (int, error)
- func (iq *IncidentQuery) CountX(ctx context.Context) int
- func (iq *IncidentQuery) Exist(ctx context.Context) (bool, error)
- func (iq *IncidentQuery) ExistX(ctx context.Context) bool
- func (iq *IncidentQuery) First(ctx context.Context) (*Incident, error)
- func (iq *IncidentQuery) FirstID(ctx context.Context) (id int, err error)
- func (iq *IncidentQuery) FirstIDX(ctx context.Context) int
- func (iq *IncidentQuery) FirstX(ctx context.Context) *Incident
- func (iq *IncidentQuery) GroupBy(field string, fields ...string) *IncidentGroupBy
- func (iq *IncidentQuery) IDs(ctx context.Context) ([]int, error)
- func (iq *IncidentQuery) IDsX(ctx context.Context) []int
- func (iq *IncidentQuery) Limit(limit int) *IncidentQuery
- func (iq *IncidentQuery) Offset(offset int) *IncidentQuery
- func (iq *IncidentQuery) Only(ctx context.Context) (*Incident, error)
- func (iq *IncidentQuery) OnlyID(ctx context.Context) (id int, err error)
- func (iq *IncidentQuery) OnlyIDX(ctx context.Context) int
- func (iq *IncidentQuery) OnlyX(ctx context.Context) *Incident
- func (iq *IncidentQuery) Order(o ...OrderFunc) *IncidentQuery
- func (i *IncidentQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*IncidentConnection, error)
- func (iq *IncidentQuery) QueryCounters() *CounterQuery
- func (iq *IncidentQuery) QueryFailures() *FailureQuery
- func (iq *IncidentQuery) QueryFiles() *FileQuery
- func (iq *IncidentQuery) QueryStati() *StatusQuery
- func (iq *IncidentQuery) Select(fields ...string) *IncidentSelect
- func (iq *IncidentQuery) Unique(unique bool) *IncidentQuery
- func (iq *IncidentQuery) Where(ps ...predicate.Incident) *IncidentQuery
- func (iq *IncidentQuery) WithCounters(opts ...func(*CounterQuery)) *IncidentQuery
- func (iq *IncidentQuery) WithFailures(opts ...func(*FailureQuery)) *IncidentQuery
- func (iq *IncidentQuery) WithFiles(opts ...func(*FileQuery)) *IncidentQuery
- func (iq *IncidentQuery) WithNamedCounters(name string, opts ...func(*CounterQuery)) *IncidentQuery
- func (iq *IncidentQuery) WithNamedFailures(name string, opts ...func(*FailureQuery)) *IncidentQuery
- func (iq *IncidentQuery) WithNamedFiles(name string, opts ...func(*FileQuery)) *IncidentQuery
- func (iq *IncidentQuery) WithNamedStati(name string, opts ...func(*StatusQuery)) *IncidentQuery
- func (iq *IncidentQuery) WithStati(opts ...func(*StatusQuery)) *IncidentQuery
- type IncidentSelect
- func (s *IncidentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *IncidentSelect) BoolX(ctx context.Context) bool
- func (s *IncidentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *IncidentSelect) BoolsX(ctx context.Context) []bool
- func (s *IncidentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *IncidentSelect) Float64X(ctx context.Context) float64
- func (s *IncidentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *IncidentSelect) Float64sX(ctx context.Context) []float64
- func (s *IncidentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *IncidentSelect) IntX(ctx context.Context) int
- func (s *IncidentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *IncidentSelect) IntsX(ctx context.Context) []int
- func (is *IncidentSelect) Scan(ctx context.Context, v any) error
- func (s *IncidentSelect) ScanX(ctx context.Context, v any)
- func (s *IncidentSelect) String(ctx context.Context) (_ string, err error)
- func (s *IncidentSelect) StringX(ctx context.Context) string
- func (s *IncidentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *IncidentSelect) StringsX(ctx context.Context) []string
- type IncidentUpdate
- func (iu *IncidentUpdate) AddCounterIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) AddCounters(c ...*Counter) *IncidentUpdate
- func (iu *IncidentUpdate) AddFailureIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) AddFailures(f ...*Failure) *IncidentUpdate
- func (iu *IncidentUpdate) AddFileIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) AddFiles(f ...*File) *IncidentUpdate
- func (iu *IncidentUpdate) AddIntLevel(i int) *IncidentUpdate
- func (iu *IncidentUpdate) AddStati(s ...*Status) *IncidentUpdate
- func (iu *IncidentUpdate) AddStatiIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) ClearCounters() *IncidentUpdate
- func (iu *IncidentUpdate) ClearEnd() *IncidentUpdate
- func (iu *IncidentUpdate) ClearError() *IncidentUpdate
- func (iu *IncidentUpdate) ClearFailures() *IncidentUpdate
- func (iu *IncidentUpdate) ClearFiles() *IncidentUpdate
- func (iu *IncidentUpdate) ClearIncidentID() *IncidentUpdate
- func (iu *IncidentUpdate) ClearStati() *IncidentUpdate
- func (iu *IncidentUpdate) Exec(ctx context.Context) error
- func (iu *IncidentUpdate) ExecX(ctx context.Context)
- func (iu *IncidentUpdate) Mutation() *IncidentMutation
- func (iu *IncidentUpdate) RemoveCounterIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) RemoveCounters(c ...*Counter) *IncidentUpdate
- func (iu *IncidentUpdate) RemoveFailureIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) RemoveFailures(f ...*Failure) *IncidentUpdate
- func (iu *IncidentUpdate) RemoveFileIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) RemoveFiles(f ...*File) *IncidentUpdate
- func (iu *IncidentUpdate) RemoveStati(s ...*Status) *IncidentUpdate
- func (iu *IncidentUpdate) RemoveStatiIDs(ids ...int) *IncidentUpdate
- func (iu *IncidentUpdate) Save(ctx context.Context) (int, error)
- func (iu *IncidentUpdate) SaveX(ctx context.Context) int
- func (iu *IncidentUpdate) SetEnd(t time.Time) *IncidentUpdate
- func (iu *IncidentUpdate) SetError(s string) *IncidentUpdate
- func (iu *IncidentUpdate) SetIncidentID(u uuid.UUID) *IncidentUpdate
- func (iu *IncidentUpdate) SetIntLevel(i int) *IncidentUpdate
- func (iu *IncidentUpdate) SetName(s string) *IncidentUpdate
- func (iu *IncidentUpdate) SetNillableEnd(t *time.Time) *IncidentUpdate
- func (iu *IncidentUpdate) SetNillableError(s *string) *IncidentUpdate
- func (iu *IncidentUpdate) SetNillableIncidentID(u *uuid.UUID) *IncidentUpdate
- func (iu *IncidentUpdate) SetProbeHost(s string) *IncidentUpdate
- func (iu *IncidentUpdate) SetProbeOS(s string) *IncidentUpdate
- func (iu *IncidentUpdate) SetRegion(s string) *IncidentUpdate
- func (iu *IncidentUpdate) SetStart(t time.Time) *IncidentUpdate
- func (iu *IncidentUpdate) SetState(b []byte) *IncidentUpdate
- func (iu *IncidentUpdate) SetTime(t time.Time) *IncidentUpdate
- func (iu *IncidentUpdate) SetUUID(u uuid.UUID) *IncidentUpdate
- func (iu *IncidentUpdate) SetUsername(s string) *IncidentUpdate
- func (iu *IncidentUpdate) Where(ps ...predicate.Incident) *IncidentUpdate
- type IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddCounterIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddCounters(c ...*Counter) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddFailureIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddFailures(f ...*Failure) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddFileIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddFiles(f ...*File) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddIntLevel(i int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddStati(s ...*Status) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) AddStatiIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) ClearCounters() *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) ClearEnd() *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) ClearError() *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) ClearFailures() *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) ClearFiles() *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) ClearIncidentID() *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) ClearStati() *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) Exec(ctx context.Context) error
- func (iuo *IncidentUpdateOne) ExecX(ctx context.Context)
- func (iuo *IncidentUpdateOne) Mutation() *IncidentMutation
- func (iuo *IncidentUpdateOne) RemoveCounterIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) RemoveCounters(c ...*Counter) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) RemoveFailureIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) RemoveFailures(f ...*Failure) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) RemoveFileIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) RemoveFiles(f ...*File) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) RemoveStati(s ...*Status) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) RemoveStatiIDs(ids ...int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) Save(ctx context.Context) (*Incident, error)
- func (iuo *IncidentUpdateOne) SaveX(ctx context.Context) *Incident
- func (iuo *IncidentUpdateOne) Select(field string, fields ...string) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetEnd(t time.Time) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetError(s string) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetIncidentID(u uuid.UUID) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetIntLevel(i int) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetName(s string) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetNillableEnd(t *time.Time) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetNillableError(s *string) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetNillableIncidentID(u *uuid.UUID) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetProbeHost(s string) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetProbeOS(s string) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetRegion(s string) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetStart(t time.Time) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetState(b []byte) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetTime(t time.Time) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetUUID(u uuid.UUID) *IncidentUpdateOne
- func (iuo *IncidentUpdateOne) SetUsername(s string) *IncidentUpdateOne
- type IncidentUpsert
- func (u *IncidentUpsert) AddIntLevel(v int) *IncidentUpsert
- func (u *IncidentUpsert) ClearEnd() *IncidentUpsert
- func (u *IncidentUpsert) ClearError() *IncidentUpsert
- func (u *IncidentUpsert) ClearIncidentID() *IncidentUpsert
- func (u *IncidentUpsert) SetEnd(v time.Time) *IncidentUpsert
- func (u *IncidentUpsert) SetError(v string) *IncidentUpsert
- func (u *IncidentUpsert) SetIncidentID(v uuid.UUID) *IncidentUpsert
- func (u *IncidentUpsert) SetIntLevel(v int) *IncidentUpsert
- func (u *IncidentUpsert) SetName(v string) *IncidentUpsert
- func (u *IncidentUpsert) SetProbeHost(v string) *IncidentUpsert
- func (u *IncidentUpsert) SetProbeOS(v string) *IncidentUpsert
- func (u *IncidentUpsert) SetRegion(v string) *IncidentUpsert
- func (u *IncidentUpsert) SetStart(v time.Time) *IncidentUpsert
- func (u *IncidentUpsert) SetState(v []byte) *IncidentUpsert
- func (u *IncidentUpsert) SetTime(v time.Time) *IncidentUpsert
- func (u *IncidentUpsert) SetUUID(v uuid.UUID) *IncidentUpsert
- func (u *IncidentUpsert) SetUsername(v string) *IncidentUpsert
- func (u *IncidentUpsert) UpdateEnd() *IncidentUpsert
- func (u *IncidentUpsert) UpdateError() *IncidentUpsert
- func (u *IncidentUpsert) UpdateIncidentID() *IncidentUpsert
- func (u *IncidentUpsert) UpdateIntLevel() *IncidentUpsert
- func (u *IncidentUpsert) UpdateName() *IncidentUpsert
- func (u *IncidentUpsert) UpdateProbeHost() *IncidentUpsert
- func (u *IncidentUpsert) UpdateProbeOS() *IncidentUpsert
- func (u *IncidentUpsert) UpdateRegion() *IncidentUpsert
- func (u *IncidentUpsert) UpdateStart() *IncidentUpsert
- func (u *IncidentUpsert) UpdateState() *IncidentUpsert
- func (u *IncidentUpsert) UpdateTime() *IncidentUpsert
- func (u *IncidentUpsert) UpdateUUID() *IncidentUpsert
- func (u *IncidentUpsert) UpdateUsername() *IncidentUpsert
- type IncidentUpsertBulk
- func (u *IncidentUpsertBulk) AddIntLevel(v int) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) ClearEnd() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) ClearError() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) ClearIncidentID() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) DoNothing() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) Exec(ctx context.Context) error
- func (u *IncidentUpsertBulk) ExecX(ctx context.Context)
- func (u *IncidentUpsertBulk) Ignore() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetEnd(v time.Time) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetError(v string) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetIncidentID(v uuid.UUID) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetIntLevel(v int) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetName(v string) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetProbeHost(v string) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetProbeOS(v string) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetRegion(v string) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetStart(v time.Time) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetState(v []byte) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetTime(v time.Time) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetUUID(v uuid.UUID) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) SetUsername(v string) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) Update(set func(*IncidentUpsert)) *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateEnd() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateError() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateIncidentID() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateIntLevel() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateName() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateNewValues() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateProbeHost() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateProbeOS() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateRegion() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateStart() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateState() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateTime() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateUUID() *IncidentUpsertBulk
- func (u *IncidentUpsertBulk) UpdateUsername() *IncidentUpsertBulk
- type IncidentUpsertOne
- func (u *IncidentUpsertOne) AddIntLevel(v int) *IncidentUpsertOne
- func (u *IncidentUpsertOne) ClearEnd() *IncidentUpsertOne
- func (u *IncidentUpsertOne) ClearError() *IncidentUpsertOne
- func (u *IncidentUpsertOne) ClearIncidentID() *IncidentUpsertOne
- func (u *IncidentUpsertOne) DoNothing() *IncidentUpsertOne
- func (u *IncidentUpsertOne) Exec(ctx context.Context) error
- func (u *IncidentUpsertOne) ExecX(ctx context.Context)
- func (u *IncidentUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *IncidentUpsertOne) IDX(ctx context.Context) int
- func (u *IncidentUpsertOne) Ignore() *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetEnd(v time.Time) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetError(v string) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetIncidentID(v uuid.UUID) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetIntLevel(v int) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetName(v string) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetProbeHost(v string) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetProbeOS(v string) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetRegion(v string) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetStart(v time.Time) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetState(v []byte) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetTime(v time.Time) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetUUID(v uuid.UUID) *IncidentUpsertOne
- func (u *IncidentUpsertOne) SetUsername(v string) *IncidentUpsertOne
- func (u *IncidentUpsertOne) Update(set func(*IncidentUpsert)) *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateEnd() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateError() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateIncidentID() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateIntLevel() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateName() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateNewValues() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateProbeHost() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateProbeOS() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateRegion() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateStart() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateState() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateTime() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateUUID() *IncidentUpsertOne
- func (u *IncidentUpsertOne) UpdateUsername() *IncidentUpsertOne
- type Incidents
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Status
- type StatusClient
- func (c *StatusClient) Create() *StatusCreate
- func (c *StatusClient) CreateBulk(builders ...*StatusCreate) *StatusCreateBulk
- func (c *StatusClient) Delete() *StatusDelete
- func (c *StatusClient) DeleteOne(s *Status) *StatusDeleteOne
- func (c *StatusClient) DeleteOneID(id int) *StatusDeleteOne
- func (c *StatusClient) Get(ctx context.Context, id int) (*Status, error)
- func (c *StatusClient) GetX(ctx context.Context, id int) *Status
- func (c *StatusClient) Hooks() []Hook
- func (c *StatusClient) Query() *StatusQuery
- func (c *StatusClient) Update() *StatusUpdate
- func (c *StatusClient) UpdateOne(s *Status) *StatusUpdateOne
- func (c *StatusClient) UpdateOneID(id int) *StatusUpdateOne
- func (c *StatusClient) Use(hooks ...Hook)
- type StatusConnection
- type StatusCreate
- func (sc *StatusCreate) Exec(ctx context.Context) error
- func (sc *StatusCreate) ExecX(ctx context.Context)
- func (sc *StatusCreate) Mutation() *StatusMutation
- func (sc *StatusCreate) OnConflict(opts ...sql.ConflictOption) *StatusUpsertOne
- func (sc *StatusCreate) OnConflictColumns(columns ...string) *StatusUpsertOne
- func (sc *StatusCreate) Save(ctx context.Context) (*Status, error)
- func (sc *StatusCreate) SaveX(ctx context.Context) *Status
- func (sc *StatusCreate) SetName(s string) *StatusCreate
- func (sc *StatusCreate) SetValue(s string) *StatusCreate
- type StatusCreateBulk
- func (scb *StatusCreateBulk) Exec(ctx context.Context) error
- func (scb *StatusCreateBulk) ExecX(ctx context.Context)
- func (scb *StatusCreateBulk) OnConflict(opts ...sql.ConflictOption) *StatusUpsertBulk
- func (scb *StatusCreateBulk) OnConflictColumns(columns ...string) *StatusUpsertBulk
- func (scb *StatusCreateBulk) Save(ctx context.Context) ([]*Status, error)
- func (scb *StatusCreateBulk) SaveX(ctx context.Context) []*Status
- type StatusDelete
- type StatusDeleteOne
- type StatusEdge
- type StatusGroupBy
- func (sgb *StatusGroupBy) Aggregate(fns ...AggregateFunc) *StatusGroupBy
- func (s *StatusGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StatusGroupBy) BoolX(ctx context.Context) bool
- func (s *StatusGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StatusGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StatusGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StatusGroupBy) Float64X(ctx context.Context) float64
- func (s *StatusGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StatusGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StatusGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StatusGroupBy) IntX(ctx context.Context) int
- func (s *StatusGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StatusGroupBy) IntsX(ctx context.Context) []int
- func (sgb *StatusGroupBy) Scan(ctx context.Context, v any) error
- func (s *StatusGroupBy) ScanX(ctx context.Context, v any)
- func (s *StatusGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StatusGroupBy) StringX(ctx context.Context) string
- func (s *StatusGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StatusGroupBy) StringsX(ctx context.Context) []string
- type StatusMutation
- func (m *StatusMutation) AddField(name string, value ent.Value) error
- func (m *StatusMutation) AddedEdges() []string
- func (m *StatusMutation) AddedField(name string) (ent.Value, bool)
- func (m *StatusMutation) AddedFields() []string
- func (m *StatusMutation) AddedIDs(name string) []ent.Value
- func (m *StatusMutation) ClearEdge(name string) error
- func (m *StatusMutation) ClearField(name string) error
- func (m *StatusMutation) ClearedEdges() []string
- func (m *StatusMutation) ClearedFields() []string
- func (m StatusMutation) Client() *Client
- func (m *StatusMutation) EdgeCleared(name string) bool
- func (m *StatusMutation) Field(name string) (ent.Value, bool)
- func (m *StatusMutation) FieldCleared(name string) bool
- func (m *StatusMutation) Fields() []string
- func (m *StatusMutation) ID() (id int, exists bool)
- func (m *StatusMutation) IDs(ctx context.Context) ([]int, error)
- func (m *StatusMutation) Name() (r string, exists bool)
- func (m *StatusMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StatusMutation) OldName(ctx context.Context) (v string, err error)
- func (m *StatusMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *StatusMutation) Op() Op
- func (m *StatusMutation) RemovedEdges() []string
- func (m *StatusMutation) RemovedIDs(name string) []ent.Value
- func (m *StatusMutation) ResetEdge(name string) error
- func (m *StatusMutation) ResetField(name string) error
- func (m *StatusMutation) ResetName()
- func (m *StatusMutation) ResetValue()
- func (m *StatusMutation) SetField(name string, value ent.Value) error
- func (m *StatusMutation) SetName(s string)
- func (m *StatusMutation) SetValue(s string)
- func (m StatusMutation) Tx() (*Tx, error)
- func (m *StatusMutation) Type() string
- func (m *StatusMutation) Value() (r string, exists bool)
- func (m *StatusMutation) Where(ps ...predicate.Status)
- type StatusOrder
- type StatusOrderField
- type StatusPaginateOption
- type StatusQuery
- func (sq *StatusQuery) All(ctx context.Context) ([]*Status, error)
- func (sq *StatusQuery) AllX(ctx context.Context) []*Status
- func (sq *StatusQuery) Clone() *StatusQuery
- func (s *StatusQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusQuery, error)
- func (sq *StatusQuery) Count(ctx context.Context) (int, error)
- func (sq *StatusQuery) CountX(ctx context.Context) int
- func (sq *StatusQuery) Exist(ctx context.Context) (bool, error)
- func (sq *StatusQuery) ExistX(ctx context.Context) bool
- func (sq *StatusQuery) First(ctx context.Context) (*Status, error)
- func (sq *StatusQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *StatusQuery) FirstIDX(ctx context.Context) int
- func (sq *StatusQuery) FirstX(ctx context.Context) *Status
- func (sq *StatusQuery) GroupBy(field string, fields ...string) *StatusGroupBy
- func (sq *StatusQuery) IDs(ctx context.Context) ([]int, error)
- func (sq *StatusQuery) IDsX(ctx context.Context) []int
- func (sq *StatusQuery) Limit(limit int) *StatusQuery
- func (sq *StatusQuery) Offset(offset int) *StatusQuery
- func (sq *StatusQuery) Only(ctx context.Context) (*Status, error)
- func (sq *StatusQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *StatusQuery) OnlyIDX(ctx context.Context) int
- func (sq *StatusQuery) OnlyX(ctx context.Context) *Status
- func (sq *StatusQuery) Order(o ...OrderFunc) *StatusQuery
- func (s *StatusQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*StatusConnection, error)
- func (sq *StatusQuery) Select(fields ...string) *StatusSelect
- func (sq *StatusQuery) Unique(unique bool) *StatusQuery
- func (sq *StatusQuery) Where(ps ...predicate.Status) *StatusQuery
- type StatusSelect
- func (s *StatusSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StatusSelect) BoolX(ctx context.Context) bool
- func (s *StatusSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StatusSelect) BoolsX(ctx context.Context) []bool
- func (s *StatusSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StatusSelect) Float64X(ctx context.Context) float64
- func (s *StatusSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StatusSelect) Float64sX(ctx context.Context) []float64
- func (s *StatusSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StatusSelect) IntX(ctx context.Context) int
- func (s *StatusSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StatusSelect) IntsX(ctx context.Context) []int
- func (ss *StatusSelect) Scan(ctx context.Context, v any) error
- func (s *StatusSelect) ScanX(ctx context.Context, v any)
- func (s *StatusSelect) String(ctx context.Context) (_ string, err error)
- func (s *StatusSelect) StringX(ctx context.Context) string
- func (s *StatusSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StatusSelect) StringsX(ctx context.Context) []string
- type StatusSlice
- type StatusUpdate
- func (su *StatusUpdate) Exec(ctx context.Context) error
- func (su *StatusUpdate) ExecX(ctx context.Context)
- func (su *StatusUpdate) Mutation() *StatusMutation
- func (su *StatusUpdate) Save(ctx context.Context) (int, error)
- func (su *StatusUpdate) SaveX(ctx context.Context) int
- func (su *StatusUpdate) SetName(s string) *StatusUpdate
- func (su *StatusUpdate) SetValue(s string) *StatusUpdate
- func (su *StatusUpdate) Where(ps ...predicate.Status) *StatusUpdate
- type StatusUpdateOne
- func (suo *StatusUpdateOne) Exec(ctx context.Context) error
- func (suo *StatusUpdateOne) ExecX(ctx context.Context)
- func (suo *StatusUpdateOne) Mutation() *StatusMutation
- func (suo *StatusUpdateOne) Save(ctx context.Context) (*Status, error)
- func (suo *StatusUpdateOne) SaveX(ctx context.Context) *Status
- func (suo *StatusUpdateOne) Select(field string, fields ...string) *StatusUpdateOne
- func (suo *StatusUpdateOne) SetName(s string) *StatusUpdateOne
- func (suo *StatusUpdateOne) SetValue(s string) *StatusUpdateOne
- type StatusUpsert
- type StatusUpsertBulk
- func (u *StatusUpsertBulk) DoNothing() *StatusUpsertBulk
- func (u *StatusUpsertBulk) Exec(ctx context.Context) error
- func (u *StatusUpsertBulk) ExecX(ctx context.Context)
- func (u *StatusUpsertBulk) Ignore() *StatusUpsertBulk
- func (u *StatusUpsertBulk) SetName(v string) *StatusUpsertBulk
- func (u *StatusUpsertBulk) SetValue(v string) *StatusUpsertBulk
- func (u *StatusUpsertBulk) Update(set func(*StatusUpsert)) *StatusUpsertBulk
- func (u *StatusUpsertBulk) UpdateName() *StatusUpsertBulk
- func (u *StatusUpsertBulk) UpdateNewValues() *StatusUpsertBulk
- func (u *StatusUpsertBulk) UpdateValue() *StatusUpsertBulk
- type StatusUpsertOne
- func (u *StatusUpsertOne) DoNothing() *StatusUpsertOne
- func (u *StatusUpsertOne) Exec(ctx context.Context) error
- func (u *StatusUpsertOne) ExecX(ctx context.Context)
- func (u *StatusUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *StatusUpsertOne) IDX(ctx context.Context) int
- func (u *StatusUpsertOne) Ignore() *StatusUpsertOne
- func (u *StatusUpsertOne) SetName(v string) *StatusUpsertOne
- func (u *StatusUpsertOne) SetValue(v string) *StatusUpsertOne
- func (u *StatusUpsertOne) Update(set func(*StatusUpsert)) *StatusUpsertOne
- func (u *StatusUpsertOne) UpdateName() *StatusUpsertOne
- func (u *StatusUpsertOne) UpdateNewValues() *StatusUpsertOne
- func (u *StatusUpsertOne) UpdateValue() *StatusUpsertOne
- 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" TypeCounter = "Counter" TypeFailure = "Failure" TypeFile = "File" TypeIncident = "Incident" TypeStatus = "Status" )
Variables ¶
var DefaultAlertOrder = &AlertOrder{ Direction: OrderDirectionAsc, Field: &AlertOrderField{ field: alert.FieldID, toCursor: func(a *Alert) Cursor { return Cursor{ID: a.ID} }, }, }
DefaultAlertOrder is the default ordering of Alert.
var DefaultCounterOrder = &CounterOrder{ Direction: OrderDirectionAsc, Field: &CounterOrderField{ field: counter.FieldID, toCursor: func(c *Counter) Cursor { return Cursor{ID: c.ID} }, }, }
DefaultCounterOrder is the default ordering of Counter.
var DefaultFailureOrder = &FailureOrder{ Direction: OrderDirectionAsc, Field: &FailureOrderField{ field: failure.FieldID, toCursor: func(f *Failure) Cursor { return Cursor{ID: f.ID} }, }, }
DefaultFailureOrder is the default ordering of Failure.
var DefaultFileOrder = &FileOrder{ Direction: OrderDirectionAsc, Field: &FileOrderField{ field: file.FieldID, toCursor: func(f *File) Cursor { return Cursor{ID: f.ID} }, }, }
DefaultFileOrder is the default ordering of File.
var DefaultIncidentOrder = &IncidentOrder{ Direction: OrderDirectionAsc, Field: &IncidentOrderField{ field: incident.FieldID, toCursor: func(i *Incident) Cursor { return Cursor{ID: i.ID} }, }, }
DefaultIncidentOrder is the default ordering of Incident.
var DefaultStatusOrder = &StatusOrder{ Direction: OrderDirectionAsc, Field: &StatusOrderField{ field: status.FieldID, toCursor: func(s *Status) Cursor { return Cursor{ID: s.ID} }, }, }
DefaultStatusOrder is the default ordering of Status.
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.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx 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"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // IncidentID holds the value of the "IncidentID" field. IncidentID uuid.UUID `json:"IncidentID,omitempty"` // Name holds the value of the "Name" field. Name string `json:"Name,omitempty"` // Time holds the value of the "Time" field. Time time.Time `json:"Time,omitempty"` // IntLevel holds the value of the "IntLevel" field. IntLevel int `json:"IntLevel,omitempty"` // Username holds the value of the "Username" field. Username string `json:"Username,omitempty"` // Region holds the value of the "Region" field. Region string `json:"Region,omitempty"` // ProbeOS holds the value of the "ProbeOS" field. ProbeOS string `json:"ProbeOS,omitempty"` // ProbeHost holds the value of the "ProbeHost" field. ProbeHost string `json:"ProbeHost,omitempty"` // Error holds the value of the "Error" field. Error string `json:"Error,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) NamedCounters ¶
NamedCounters returns the Counters named value or an error if the edge was not loaded in eager-loading with this name.
func (*Alert) NamedFailures ¶
NamedFailures returns the Failures named value or an error if the edge was not loaded in eager-loading with this name.
func (*Alert) NamedFiles ¶
NamedFiles returns the Files named value or an error if the edge was not loaded in eager-loading with this name.
func (*Alert) NamedStati ¶
NamedStati returns the Stati named value or an error if the edge was not loaded in eager-loading with this name.
func (*Alert) QueryCounters ¶
func (a *Alert) QueryCounters() *CounterQuery
QueryCounters queries the "Counters" edge of the Alert entity.
func (*Alert) QueryFailures ¶
func (a *Alert) QueryFailures() *FailureQuery
QueryFailures queries the "Failures" edge of the Alert entity.
func (*Alert) QueryFiles ¶
QueryFiles queries the "Files" edge of the Alert entity.
func (*Alert) QueryStati ¶
func (a *Alert) QueryStati() *StatusQuery
QueryStati queries the "Stati" edge of the Alert entity.
func (*Alert) ToEdge ¶
func (a *Alert) ToEdge(order *AlertOrder) *AlertEdge
ToEdge converts Alert into AlertEdge.
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) QueryCounters ¶
func (c *AlertClient) QueryCounters(a *Alert) *CounterQuery
QueryCounters queries the Counters edge of a Alert.
func (*AlertClient) QueryFailures ¶
func (c *AlertClient) QueryFailures(a *Alert) *FailureQuery
QueryFailures queries the Failures edge of a Alert.
func (*AlertClient) QueryFiles ¶
func (c *AlertClient) QueryFiles(a *Alert) *FileQuery
QueryFiles queries the Files edge of a Alert.
func (*AlertClient) QueryStati ¶
func (c *AlertClient) QueryStati(a *Alert) *StatusQuery
QueryStati queries the Stati 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 AlertConnection ¶
type AlertConnection struct { Edges []*AlertEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
AlertConnection is the connection containing edges to Alert.
type AlertCreate ¶
type AlertCreate struct {
// contains filtered or unexported fields
}
AlertCreate is the builder for creating a Alert entity.
func (*AlertCreate) AddCounterIDs ¶
func (ac *AlertCreate) AddCounterIDs(ids ...int) *AlertCreate
AddCounterIDs adds the "Counters" edge to the Counter entity by IDs.
func (*AlertCreate) AddCounters ¶
func (ac *AlertCreate) AddCounters(c ...*Counter) *AlertCreate
AddCounters adds the "Counters" edges to the Counter entity.
func (*AlertCreate) AddFailureIDs ¶
func (ac *AlertCreate) AddFailureIDs(ids ...int) *AlertCreate
AddFailureIDs adds the "Failures" edge to the Failure entity by IDs.
func (*AlertCreate) AddFailures ¶
func (ac *AlertCreate) AddFailures(f ...*Failure) *AlertCreate
AddFailures adds the "Failures" edges to the Failure entity.
func (*AlertCreate) AddFileIDs ¶
func (ac *AlertCreate) AddFileIDs(ids ...int) *AlertCreate
AddFileIDs adds the "Files" edge to the File entity by IDs.
func (*AlertCreate) AddFiles ¶
func (ac *AlertCreate) AddFiles(f ...*File) *AlertCreate
AddFiles adds the "Files" edges to the File entity.
func (*AlertCreate) AddStati ¶
func (ac *AlertCreate) AddStati(s ...*Status) *AlertCreate
AddStati adds the "Stati" edges to the Status entity.
func (*AlertCreate) AddStatiIDs ¶
func (ac *AlertCreate) AddStatiIDs(ids ...int) *AlertCreate
AddStatiIDs adds the "Stati" edge to the Status entity by IDs.
func (*AlertCreate) Exec ¶
func (ac *AlertCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertCreate) ExecX ¶
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) OnConflict ¶
func (ac *AlertCreate) OnConflict(opts ...sql.ConflictOption) *AlertUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Alert.Create(). SetUUID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AlertUpsert) { SetUUID(v+v). }). Exec(ctx)
func (*AlertCreate) OnConflictColumns ¶
func (ac *AlertCreate) OnConflictColumns(columns ...string) *AlertUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Alert.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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) SetError ¶
func (ac *AlertCreate) SetError(s string) *AlertCreate
SetError sets the "Error" field.
func (*AlertCreate) SetIncidentID ¶
func (ac *AlertCreate) SetIncidentID(u uuid.UUID) *AlertCreate
SetIncidentID sets the "IncidentID" field.
func (*AlertCreate) SetIntLevel ¶
func (ac *AlertCreate) SetIntLevel(i int) *AlertCreate
SetIntLevel sets the "IntLevel" field.
func (*AlertCreate) SetName ¶
func (ac *AlertCreate) SetName(s string) *AlertCreate
SetName sets the "Name" field.
func (*AlertCreate) SetNillableError ¶
func (ac *AlertCreate) SetNillableError(s *string) *AlertCreate
SetNillableError sets the "Error" field if the given value is not nil.
func (*AlertCreate) SetNillableIncidentID ¶
func (ac *AlertCreate) SetNillableIncidentID(u *uuid.UUID) *AlertCreate
SetNillableIncidentID sets the "IncidentID" field if the given value is not nil.
func (*AlertCreate) SetProbeHost ¶
func (ac *AlertCreate) SetProbeHost(s string) *AlertCreate
SetProbeHost sets the "ProbeHost" field.
func (*AlertCreate) SetProbeOS ¶
func (ac *AlertCreate) SetProbeOS(s string) *AlertCreate
SetProbeOS sets the "ProbeOS" field.
func (*AlertCreate) SetRegion ¶
func (ac *AlertCreate) SetRegion(s string) *AlertCreate
SetRegion sets the "Region" field.
func (*AlertCreate) SetTime ¶
func (ac *AlertCreate) SetTime(t time.Time) *AlertCreate
SetTime sets the "Time" field.
func (*AlertCreate) SetUUID ¶
func (ac *AlertCreate) SetUUID(u uuid.UUID) *AlertCreate
SetUUID sets the "UUID" field.
func (*AlertCreate) SetUsername ¶
func (ac *AlertCreate) SetUsername(s string) *AlertCreate
SetUsername sets the "Username" 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 ¶
func (acb *AlertCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertCreateBulk) ExecX ¶
func (acb *AlertCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertCreateBulk) OnConflict ¶
func (acb *AlertCreateBulk) OnConflict(opts ...sql.ConflictOption) *AlertUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Alert.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.AlertUpsert) { SetUUID(v+v). }). Exec(ctx)
func (*AlertCreateBulk) OnConflictColumns ¶
func (acb *AlertCreateBulk) OnConflictColumns(columns ...string) *AlertUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Alert.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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 { // Counters holds the value of the Counters edge. Counters []*Counter `json:"Counters,omitempty"` // Stati holds the value of the Stati edge. Stati []*Status `json:"Stati,omitempty"` // Failures holds the value of the Failures edge. Failures []*Failure `json:"Failures,omitempty"` // Files holds the value of the Files edge. Files []*File `json:"Files,omitempty"` // contains filtered or unexported fields }
AlertEdges holds the relations/edges for other nodes in the graph.
func (AlertEdges) CountersOrErr ¶
func (e AlertEdges) CountersOrErr() ([]*Counter, error)
CountersOrErr returns the Counters value or an error if the edge was not loaded in eager-loading.
func (AlertEdges) FailuresOrErr ¶
func (e AlertEdges) FailuresOrErr() ([]*Failure, error)
FailuresOrErr returns the Failures value or an error if the edge was not loaded in eager-loading.
func (AlertEdges) FilesOrErr ¶
func (e AlertEdges) FilesOrErr() ([]*File, error)
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
func (AlertEdges) StatiOrErr ¶
func (e AlertEdges) StatiOrErr() ([]*Status, error)
StatiOrErr returns the Stati value or an error if the edge was not loaded in eager-loading.
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) AddCounterIDs ¶
func (m *AlertMutation) AddCounterIDs(ids ...int)
AddCounterIDs adds the "Counters" edge to the Counter entity by ids.
func (*AlertMutation) AddFailureIDs ¶
func (m *AlertMutation) AddFailureIDs(ids ...int)
AddFailureIDs adds the "Failures" edge to the Failure entity by ids.
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) AddFileIDs ¶
func (m *AlertMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "Files" edge to the File entity by ids.
func (*AlertMutation) AddIntLevel ¶
func (m *AlertMutation) AddIntLevel(i int)
AddIntLevel adds i to the "IntLevel" field.
func (*AlertMutation) AddStatiIDs ¶
func (m *AlertMutation) AddStatiIDs(ids ...int)
AddStatiIDs adds the "Stati" edge to the Status entity by ids.
func (*AlertMutation) AddedEdges ¶
func (m *AlertMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added 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) AddedIntLevel ¶
func (m *AlertMutation) AddedIntLevel() (r int, exists bool)
AddedIntLevel returns the value that was added to the "IntLevel" field in this mutation.
func (*AlertMutation) ClearCounters ¶
func (m *AlertMutation) ClearCounters()
ClearCounters clears the "Counters" edge to the Counter 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) ClearError ¶
func (m *AlertMutation) ClearError()
ClearError clears the value of the "Error" field.
func (*AlertMutation) ClearFailures ¶
func (m *AlertMutation) ClearFailures()
ClearFailures clears the "Failures" edge to the Failure entity.
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) ClearFiles ¶
func (m *AlertMutation) ClearFiles()
ClearFiles clears the "Files" edge to the File entity.
func (*AlertMutation) ClearIncidentID ¶
func (m *AlertMutation) ClearIncidentID()
ClearIncidentID clears the value of the "IncidentID" field.
func (*AlertMutation) ClearStati ¶
func (m *AlertMutation) ClearStati()
ClearStati clears the "Stati" edge to the Status entity.
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) CountersCleared ¶
func (m *AlertMutation) CountersCleared() bool
CountersCleared reports if the "Counters" edge to the Counter entity was cleared.
func (*AlertMutation) CountersIDs ¶
func (m *AlertMutation) CountersIDs() (ids []int)
CountersIDs returns the "Counters" 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) Error ¶
func (m *AlertMutation) Error() (r string, exists bool)
Error returns the value of the "Error" field in the mutation.
func (*AlertMutation) ErrorCleared ¶
func (m *AlertMutation) ErrorCleared() bool
ErrorCleared returns if the "Error" field was cleared in this mutation.
func (*AlertMutation) FailuresCleared ¶
func (m *AlertMutation) FailuresCleared() bool
FailuresCleared reports if the "Failures" edge to the Failure entity was cleared.
func (*AlertMutation) FailuresIDs ¶
func (m *AlertMutation) FailuresIDs() (ids []int)
FailuresIDs returns the "Failures" 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) FilesCleared ¶
func (m *AlertMutation) FilesCleared() bool
FilesCleared reports if the "Files" edge to the File entity was cleared.
func (*AlertMutation) FilesIDs ¶
func (m *AlertMutation) FilesIDs() (ids []int)
FilesIDs returns the "Files" edge IDs in the mutation.
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 ¶
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) IncidentID ¶
func (m *AlertMutation) IncidentID() (r uuid.UUID, exists bool)
IncidentID returns the value of the "IncidentID" field in the mutation.
func (*AlertMutation) IncidentIDCleared ¶
func (m *AlertMutation) IncidentIDCleared() bool
IncidentIDCleared returns if the "IncidentID" field was cleared in this mutation.
func (*AlertMutation) IntLevel ¶
func (m *AlertMutation) IntLevel() (r int, exists bool)
IntLevel returns the value of the "IntLevel" field in the mutation.
func (*AlertMutation) Name ¶
func (m *AlertMutation) Name() (r string, exists bool)
Name returns the value of the "Name" field in the mutation.
func (*AlertMutation) OldError ¶
func (m *AlertMutation) OldError(ctx context.Context) (v string, err error)
OldError returns the old "Error" 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) OldIncidentID ¶
OldIncidentID returns the old "IncidentID" 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) OldIntLevel ¶
func (m *AlertMutation) OldIntLevel(ctx context.Context) (v int, err error)
OldIntLevel returns the old "IntLevel" 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) OldName ¶
func (m *AlertMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "Name" 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) OldProbeHost ¶
func (m *AlertMutation) OldProbeHost(ctx context.Context) (v string, err error)
OldProbeHost returns the old "ProbeHost" 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) OldProbeOS ¶
func (m *AlertMutation) OldProbeOS(ctx context.Context) (v string, err error)
OldProbeOS returns the old "ProbeOS" 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) OldRegion ¶
func (m *AlertMutation) OldRegion(ctx context.Context) (v string, err error)
OldRegion returns the old "Region" 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) OldTime ¶
OldTime returns the old "Time" 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 ¶
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) OldUsername ¶
func (m *AlertMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "Username" 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) ProbeHost ¶
func (m *AlertMutation) ProbeHost() (r string, exists bool)
ProbeHost returns the value of the "ProbeHost" field in the mutation.
func (*AlertMutation) ProbeOS ¶
func (m *AlertMutation) ProbeOS() (r string, exists bool)
ProbeOS returns the value of the "ProbeOS" field in the mutation.
func (*AlertMutation) Region ¶
func (m *AlertMutation) Region() (r string, exists bool)
Region returns the value of the "Region" field in the mutation.
func (*AlertMutation) RemoveCounterIDs ¶
func (m *AlertMutation) RemoveCounterIDs(ids ...int)
RemoveCounterIDs removes the "Counters" edge to the Counter entity by IDs.
func (*AlertMutation) RemoveFailureIDs ¶
func (m *AlertMutation) RemoveFailureIDs(ids ...int)
RemoveFailureIDs removes the "Failures" edge to the Failure entity by IDs.
func (*AlertMutation) RemoveFileIDs ¶
func (m *AlertMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "Files" edge to the File entity by IDs.
func (*AlertMutation) RemoveStatiIDs ¶
func (m *AlertMutation) RemoveStatiIDs(ids ...int)
RemoveStatiIDs removes the "Stati" edge to the Status entity by IDs.
func (*AlertMutation) RemovedCountersIDs ¶
func (m *AlertMutation) RemovedCountersIDs() (ids []int)
RemovedCounters returns the removed IDs of the "Counters" edge to the Counter entity.
func (*AlertMutation) RemovedEdges ¶
func (m *AlertMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AlertMutation) RemovedFailuresIDs ¶
func (m *AlertMutation) RemovedFailuresIDs() (ids []int)
RemovedFailures returns the removed IDs of the "Failures" edge to the Failure entity.
func (*AlertMutation) RemovedFilesIDs ¶
func (m *AlertMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "Files" edge to the File 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) RemovedStatiIDs ¶
func (m *AlertMutation) RemovedStatiIDs() (ids []int)
RemovedStati returns the removed IDs of the "Stati" edge to the Status entity.
func (*AlertMutation) ResetCounters ¶
func (m *AlertMutation) ResetCounters()
ResetCounters resets all changes to the "Counters" 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) ResetError ¶
func (m *AlertMutation) ResetError()
ResetError resets all changes to the "Error" field.
func (*AlertMutation) ResetFailures ¶
func (m *AlertMutation) ResetFailures()
ResetFailures resets all changes to the "Failures" edge.
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) ResetFiles ¶
func (m *AlertMutation) ResetFiles()
ResetFiles resets all changes to the "Files" edge.
func (*AlertMutation) ResetIncidentID ¶
func (m *AlertMutation) ResetIncidentID()
ResetIncidentID resets all changes to the "IncidentID" field.
func (*AlertMutation) ResetIntLevel ¶
func (m *AlertMutation) ResetIntLevel()
ResetIntLevel resets all changes to the "IntLevel" field.
func (*AlertMutation) ResetName ¶
func (m *AlertMutation) ResetName()
ResetName resets all changes to the "Name" field.
func (*AlertMutation) ResetProbeHost ¶
func (m *AlertMutation) ResetProbeHost()
ResetProbeHost resets all changes to the "ProbeHost" field.
func (*AlertMutation) ResetProbeOS ¶
func (m *AlertMutation) ResetProbeOS()
ResetProbeOS resets all changes to the "ProbeOS" field.
func (*AlertMutation) ResetRegion ¶
func (m *AlertMutation) ResetRegion()
ResetRegion resets all changes to the "Region" field.
func (*AlertMutation) ResetStati ¶
func (m *AlertMutation) ResetStati()
ResetStati resets all changes to the "Stati" edge.
func (*AlertMutation) ResetTime ¶
func (m *AlertMutation) ResetTime()
ResetTime resets all changes to the "Time" field.
func (*AlertMutation) ResetUUID ¶
func (m *AlertMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*AlertMutation) ResetUsername ¶
func (m *AlertMutation) ResetUsername()
ResetUsername resets all changes to the "Username" field.
func (*AlertMutation) SetError ¶
func (m *AlertMutation) SetError(s string)
SetError sets the "Error" 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) SetIncidentID ¶
func (m *AlertMutation) SetIncidentID(u uuid.UUID)
SetIncidentID sets the "IncidentID" field.
func (*AlertMutation) SetIntLevel ¶
func (m *AlertMutation) SetIntLevel(i int)
SetIntLevel sets the "IntLevel" field.
func (*AlertMutation) SetName ¶
func (m *AlertMutation) SetName(s string)
SetName sets the "Name" field.
func (*AlertMutation) SetProbeHost ¶
func (m *AlertMutation) SetProbeHost(s string)
SetProbeHost sets the "ProbeHost" field.
func (*AlertMutation) SetProbeOS ¶
func (m *AlertMutation) SetProbeOS(s string)
SetProbeOS sets the "ProbeOS" field.
func (*AlertMutation) SetRegion ¶
func (m *AlertMutation) SetRegion(s string)
SetRegion sets the "Region" field.
func (*AlertMutation) SetTime ¶
func (m *AlertMutation) SetTime(t time.Time)
SetTime sets the "Time" field.
func (*AlertMutation) SetUUID ¶
func (m *AlertMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
func (*AlertMutation) SetUsername ¶
func (m *AlertMutation) SetUsername(s string)
SetUsername sets the "Username" field.
func (*AlertMutation) StatiCleared ¶
func (m *AlertMutation) StatiCleared() bool
StatiCleared reports if the "Stati" edge to the Status entity was cleared.
func (*AlertMutation) StatiIDs ¶
func (m *AlertMutation) StatiIDs() (ids []int)
StatiIDs returns the "Stati" edge IDs in the mutation.
func (*AlertMutation) Time ¶
func (m *AlertMutation) Time() (r time.Time, exists bool)
Time returns the value of the "Time" field in the 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 ¶
func (m *AlertMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
func (*AlertMutation) Username ¶
func (m *AlertMutation) Username() (r string, exists bool)
Username returns the value of the "Username" field in the mutation.
func (*AlertMutation) Where ¶
func (m *AlertMutation) Where(ps ...predicate.Alert)
Where appends a list predicates to the AlertMutation builder.
type AlertOrder ¶
type AlertOrder struct { Direction OrderDirection `json:"direction"` Field *AlertOrderField `json:"field"` }
AlertOrder defines the ordering of Alert.
type AlertOrderField ¶
type AlertOrderField struct {
// contains filtered or unexported fields
}
AlertOrderField defines the ordering field of Alert.
type AlertPaginateOption ¶
type AlertPaginateOption func(*alertPager) error
AlertPaginateOption enables pagination customization.
func WithAlertFilter ¶
func WithAlertFilter(filter func(*AlertQuery) (*AlertQuery, error)) AlertPaginateOption
WithAlertFilter configures pagination filter.
func WithAlertOrder ¶
func WithAlertOrder(order *AlertOrder) AlertPaginateOption
WithAlertOrder configures pagination ordering.
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) CollectFields ¶
func (a *AlertQuery) CollectFields(ctx context.Context, satisfies ...string) (*AlertQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
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 ¶
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.Alert.Query(). GroupBy(alert.FieldUUID). 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) Paginate ¶
func (a *AlertQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...AlertPaginateOption, ) (*AlertConnection, error)
Paginate executes the query and returns a relay based cursor connection to Alert.
func (*AlertQuery) QueryCounters ¶
func (aq *AlertQuery) QueryCounters() *CounterQuery
QueryCounters chains the current query on the "Counters" edge.
func (*AlertQuery) QueryFailures ¶
func (aq *AlertQuery) QueryFailures() *FailureQuery
QueryFailures chains the current query on the "Failures" edge.
func (*AlertQuery) QueryFiles ¶
func (aq *AlertQuery) QueryFiles() *FileQuery
QueryFiles chains the current query on the "Files" edge.
func (*AlertQuery) QueryStati ¶
func (aq *AlertQuery) QueryStati() *StatusQuery
QueryStati chains the current query on the "Stati" 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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.Alert.Query(). Select(alert.FieldUUID). Scan(ctx, &v)
func (*AlertQuery) Unique ¶
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) WithCounters ¶
func (aq *AlertQuery) WithCounters(opts ...func(*CounterQuery)) *AlertQuery
WithCounters tells the query-builder to eager-load the nodes that are connected to the "Counters" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithFailures ¶
func (aq *AlertQuery) WithFailures(opts ...func(*FailureQuery)) *AlertQuery
WithFailures tells the query-builder to eager-load the nodes that are connected to the "Failures" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithFiles ¶
func (aq *AlertQuery) WithFiles(opts ...func(*FileQuery)) *AlertQuery
WithFiles tells the query-builder to eager-load the nodes that are connected to the "Files" edge. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithNamedCounters ¶
func (aq *AlertQuery) WithNamedCounters(name string, opts ...func(*CounterQuery)) *AlertQuery
WithNamedCounters tells the query-builder to eager-load the nodes that are connected to the "Counters" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithNamedFailures ¶
func (aq *AlertQuery) WithNamedFailures(name string, opts ...func(*FailureQuery)) *AlertQuery
WithNamedFailures tells the query-builder to eager-load the nodes that are connected to the "Failures" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithNamedFiles ¶
func (aq *AlertQuery) WithNamedFiles(name string, opts ...func(*FileQuery)) *AlertQuery
WithNamedFiles tells the query-builder to eager-load the nodes that are connected to the "Files" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithNamedStati ¶
func (aq *AlertQuery) WithNamedStati(name string, opts ...func(*StatusQuery)) *AlertQuery
WithNamedStati tells the query-builder to eager-load the nodes that are connected to the "Stati" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*AlertQuery) WithStati ¶
func (aq *AlertQuery) WithStati(opts ...func(*StatusQuery)) *AlertQuery
WithStati tells the query-builder to eager-load the nodes that are connected to the "Stati" 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) AddCounterIDs ¶
func (au *AlertUpdate) AddCounterIDs(ids ...int) *AlertUpdate
AddCounterIDs adds the "Counters" edge to the Counter entity by IDs.
func (*AlertUpdate) AddCounters ¶
func (au *AlertUpdate) AddCounters(c ...*Counter) *AlertUpdate
AddCounters adds the "Counters" edges to the Counter entity.
func (*AlertUpdate) AddFailureIDs ¶
func (au *AlertUpdate) AddFailureIDs(ids ...int) *AlertUpdate
AddFailureIDs adds the "Failures" edge to the Failure entity by IDs.
func (*AlertUpdate) AddFailures ¶
func (au *AlertUpdate) AddFailures(f ...*Failure) *AlertUpdate
AddFailures adds the "Failures" edges to the Failure entity.
func (*AlertUpdate) AddFileIDs ¶
func (au *AlertUpdate) AddFileIDs(ids ...int) *AlertUpdate
AddFileIDs adds the "Files" edge to the File entity by IDs.
func (*AlertUpdate) AddFiles ¶
func (au *AlertUpdate) AddFiles(f ...*File) *AlertUpdate
AddFiles adds the "Files" edges to the File entity.
func (*AlertUpdate) AddIntLevel ¶
func (au *AlertUpdate) AddIntLevel(i int) *AlertUpdate
AddIntLevel adds i to the "IntLevel" field.
func (*AlertUpdate) AddStati ¶
func (au *AlertUpdate) AddStati(s ...*Status) *AlertUpdate
AddStati adds the "Stati" edges to the Status entity.
func (*AlertUpdate) AddStatiIDs ¶
func (au *AlertUpdate) AddStatiIDs(ids ...int) *AlertUpdate
AddStatiIDs adds the "Stati" edge to the Status entity by IDs.
func (*AlertUpdate) ClearCounters ¶
func (au *AlertUpdate) ClearCounters() *AlertUpdate
ClearCounters clears all "Counters" edges to the Counter entity.
func (*AlertUpdate) ClearError ¶
func (au *AlertUpdate) ClearError() *AlertUpdate
ClearError clears the value of the "Error" field.
func (*AlertUpdate) ClearFailures ¶
func (au *AlertUpdate) ClearFailures() *AlertUpdate
ClearFailures clears all "Failures" edges to the Failure entity.
func (*AlertUpdate) ClearFiles ¶
func (au *AlertUpdate) ClearFiles() *AlertUpdate
ClearFiles clears all "Files" edges to the File entity.
func (*AlertUpdate) ClearIncidentID ¶
func (au *AlertUpdate) ClearIncidentID() *AlertUpdate
ClearIncidentID clears the value of the "IncidentID" field.
func (*AlertUpdate) ClearStati ¶
func (au *AlertUpdate) ClearStati() *AlertUpdate
ClearStati clears all "Stati" edges to the Status entity.
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) RemoveCounterIDs ¶
func (au *AlertUpdate) RemoveCounterIDs(ids ...int) *AlertUpdate
RemoveCounterIDs removes the "Counters" edge to Counter entities by IDs.
func (*AlertUpdate) RemoveCounters ¶
func (au *AlertUpdate) RemoveCounters(c ...*Counter) *AlertUpdate
RemoveCounters removes "Counters" edges to Counter entities.
func (*AlertUpdate) RemoveFailureIDs ¶
func (au *AlertUpdate) RemoveFailureIDs(ids ...int) *AlertUpdate
RemoveFailureIDs removes the "Failures" edge to Failure entities by IDs.
func (*AlertUpdate) RemoveFailures ¶
func (au *AlertUpdate) RemoveFailures(f ...*Failure) *AlertUpdate
RemoveFailures removes "Failures" edges to Failure entities.
func (*AlertUpdate) RemoveFileIDs ¶
func (au *AlertUpdate) RemoveFileIDs(ids ...int) *AlertUpdate
RemoveFileIDs removes the "Files" edge to File entities by IDs.
func (*AlertUpdate) RemoveFiles ¶
func (au *AlertUpdate) RemoveFiles(f ...*File) *AlertUpdate
RemoveFiles removes "Files" edges to File entities.
func (*AlertUpdate) RemoveStati ¶
func (au *AlertUpdate) RemoveStati(s ...*Status) *AlertUpdate
RemoveStati removes "Stati" edges to Status entities.
func (*AlertUpdate) RemoveStatiIDs ¶
func (au *AlertUpdate) RemoveStatiIDs(ids ...int) *AlertUpdate
RemoveStatiIDs removes the "Stati" edge to Status entities by IDs.
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) SetError ¶
func (au *AlertUpdate) SetError(s string) *AlertUpdate
SetError sets the "Error" field.
func (*AlertUpdate) SetIncidentID ¶
func (au *AlertUpdate) SetIncidentID(u uuid.UUID) *AlertUpdate
SetIncidentID sets the "IncidentID" field.
func (*AlertUpdate) SetIntLevel ¶
func (au *AlertUpdate) SetIntLevel(i int) *AlertUpdate
SetIntLevel sets the "IntLevel" field.
func (*AlertUpdate) SetName ¶
func (au *AlertUpdate) SetName(s string) *AlertUpdate
SetName sets the "Name" field.
func (*AlertUpdate) SetNillableError ¶
func (au *AlertUpdate) SetNillableError(s *string) *AlertUpdate
SetNillableError sets the "Error" field if the given value is not nil.
func (*AlertUpdate) SetNillableIncidentID ¶
func (au *AlertUpdate) SetNillableIncidentID(u *uuid.UUID) *AlertUpdate
SetNillableIncidentID sets the "IncidentID" field if the given value is not nil.
func (*AlertUpdate) SetProbeHost ¶
func (au *AlertUpdate) SetProbeHost(s string) *AlertUpdate
SetProbeHost sets the "ProbeHost" field.
func (*AlertUpdate) SetProbeOS ¶
func (au *AlertUpdate) SetProbeOS(s string) *AlertUpdate
SetProbeOS sets the "ProbeOS" field.
func (*AlertUpdate) SetRegion ¶
func (au *AlertUpdate) SetRegion(s string) *AlertUpdate
SetRegion sets the "Region" field.
func (*AlertUpdate) SetTime ¶
func (au *AlertUpdate) SetTime(t time.Time) *AlertUpdate
SetTime sets the "Time" field.
func (*AlertUpdate) SetUUID ¶
func (au *AlertUpdate) SetUUID(u uuid.UUID) *AlertUpdate
SetUUID sets the "UUID" field.
func (*AlertUpdate) SetUsername ¶
func (au *AlertUpdate) SetUsername(s string) *AlertUpdate
SetUsername sets the "Username" 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) AddCounterIDs ¶
func (auo *AlertUpdateOne) AddCounterIDs(ids ...int) *AlertUpdateOne
AddCounterIDs adds the "Counters" edge to the Counter entity by IDs.
func (*AlertUpdateOne) AddCounters ¶
func (auo *AlertUpdateOne) AddCounters(c ...*Counter) *AlertUpdateOne
AddCounters adds the "Counters" edges to the Counter entity.
func (*AlertUpdateOne) AddFailureIDs ¶
func (auo *AlertUpdateOne) AddFailureIDs(ids ...int) *AlertUpdateOne
AddFailureIDs adds the "Failures" edge to the Failure entity by IDs.
func (*AlertUpdateOne) AddFailures ¶
func (auo *AlertUpdateOne) AddFailures(f ...*Failure) *AlertUpdateOne
AddFailures adds the "Failures" edges to the Failure entity.
func (*AlertUpdateOne) AddFileIDs ¶
func (auo *AlertUpdateOne) AddFileIDs(ids ...int) *AlertUpdateOne
AddFileIDs adds the "Files" edge to the File entity by IDs.
func (*AlertUpdateOne) AddFiles ¶
func (auo *AlertUpdateOne) AddFiles(f ...*File) *AlertUpdateOne
AddFiles adds the "Files" edges to the File entity.
func (*AlertUpdateOne) AddIntLevel ¶
func (auo *AlertUpdateOne) AddIntLevel(i int) *AlertUpdateOne
AddIntLevel adds i to the "IntLevel" field.
func (*AlertUpdateOne) AddStati ¶
func (auo *AlertUpdateOne) AddStati(s ...*Status) *AlertUpdateOne
AddStati adds the "Stati" edges to the Status entity.
func (*AlertUpdateOne) AddStatiIDs ¶
func (auo *AlertUpdateOne) AddStatiIDs(ids ...int) *AlertUpdateOne
AddStatiIDs adds the "Stati" edge to the Status entity by IDs.
func (*AlertUpdateOne) ClearCounters ¶
func (auo *AlertUpdateOne) ClearCounters() *AlertUpdateOne
ClearCounters clears all "Counters" edges to the Counter entity.
func (*AlertUpdateOne) ClearError ¶
func (auo *AlertUpdateOne) ClearError() *AlertUpdateOne
ClearError clears the value of the "Error" field.
func (*AlertUpdateOne) ClearFailures ¶
func (auo *AlertUpdateOne) ClearFailures() *AlertUpdateOne
ClearFailures clears all "Failures" edges to the Failure entity.
func (*AlertUpdateOne) ClearFiles ¶
func (auo *AlertUpdateOne) ClearFiles() *AlertUpdateOne
ClearFiles clears all "Files" edges to the File entity.
func (*AlertUpdateOne) ClearIncidentID ¶
func (auo *AlertUpdateOne) ClearIncidentID() *AlertUpdateOne
ClearIncidentID clears the value of the "IncidentID" field.
func (*AlertUpdateOne) ClearStati ¶
func (auo *AlertUpdateOne) ClearStati() *AlertUpdateOne
ClearStati clears all "Stati" edges to the Status entity.
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) RemoveCounterIDs ¶
func (auo *AlertUpdateOne) RemoveCounterIDs(ids ...int) *AlertUpdateOne
RemoveCounterIDs removes the "Counters" edge to Counter entities by IDs.
func (*AlertUpdateOne) RemoveCounters ¶
func (auo *AlertUpdateOne) RemoveCounters(c ...*Counter) *AlertUpdateOne
RemoveCounters removes "Counters" edges to Counter entities.
func (*AlertUpdateOne) RemoveFailureIDs ¶
func (auo *AlertUpdateOne) RemoveFailureIDs(ids ...int) *AlertUpdateOne
RemoveFailureIDs removes the "Failures" edge to Failure entities by IDs.
func (*AlertUpdateOne) RemoveFailures ¶
func (auo *AlertUpdateOne) RemoveFailures(f ...*Failure) *AlertUpdateOne
RemoveFailures removes "Failures" edges to Failure entities.
func (*AlertUpdateOne) RemoveFileIDs ¶
func (auo *AlertUpdateOne) RemoveFileIDs(ids ...int) *AlertUpdateOne
RemoveFileIDs removes the "Files" edge to File entities by IDs.
func (*AlertUpdateOne) RemoveFiles ¶
func (auo *AlertUpdateOne) RemoveFiles(f ...*File) *AlertUpdateOne
RemoveFiles removes "Files" edges to File entities.
func (*AlertUpdateOne) RemoveStati ¶
func (auo *AlertUpdateOne) RemoveStati(s ...*Status) *AlertUpdateOne
RemoveStati removes "Stati" edges to Status entities.
func (*AlertUpdateOne) RemoveStatiIDs ¶
func (auo *AlertUpdateOne) RemoveStatiIDs(ids ...int) *AlertUpdateOne
RemoveStatiIDs removes the "Stati" edge to Status entities by IDs.
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 ¶
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) SetError ¶
func (auo *AlertUpdateOne) SetError(s string) *AlertUpdateOne
SetError sets the "Error" field.
func (*AlertUpdateOne) SetIncidentID ¶
func (auo *AlertUpdateOne) SetIncidentID(u uuid.UUID) *AlertUpdateOne
SetIncidentID sets the "IncidentID" field.
func (*AlertUpdateOne) SetIntLevel ¶
func (auo *AlertUpdateOne) SetIntLevel(i int) *AlertUpdateOne
SetIntLevel sets the "IntLevel" field.
func (*AlertUpdateOne) SetName ¶
func (auo *AlertUpdateOne) SetName(s string) *AlertUpdateOne
SetName sets the "Name" field.
func (*AlertUpdateOne) SetNillableError ¶
func (auo *AlertUpdateOne) SetNillableError(s *string) *AlertUpdateOne
SetNillableError sets the "Error" field if the given value is not nil.
func (*AlertUpdateOne) SetNillableIncidentID ¶
func (auo *AlertUpdateOne) SetNillableIncidentID(u *uuid.UUID) *AlertUpdateOne
SetNillableIncidentID sets the "IncidentID" field if the given value is not nil.
func (*AlertUpdateOne) SetProbeHost ¶
func (auo *AlertUpdateOne) SetProbeHost(s string) *AlertUpdateOne
SetProbeHost sets the "ProbeHost" field.
func (*AlertUpdateOne) SetProbeOS ¶
func (auo *AlertUpdateOne) SetProbeOS(s string) *AlertUpdateOne
SetProbeOS sets the "ProbeOS" field.
func (*AlertUpdateOne) SetRegion ¶
func (auo *AlertUpdateOne) SetRegion(s string) *AlertUpdateOne
SetRegion sets the "Region" field.
func (*AlertUpdateOne) SetTime ¶
func (auo *AlertUpdateOne) SetTime(t time.Time) *AlertUpdateOne
SetTime sets the "Time" field.
func (*AlertUpdateOne) SetUUID ¶
func (auo *AlertUpdateOne) SetUUID(u uuid.UUID) *AlertUpdateOne
SetUUID sets the "UUID" field.
func (*AlertUpdateOne) SetUsername ¶
func (auo *AlertUpdateOne) SetUsername(s string) *AlertUpdateOne
SetUsername sets the "Username" field.
type AlertUpsert ¶
AlertUpsert is the "OnConflict" setter.
func (*AlertUpsert) AddIntLevel ¶
func (u *AlertUpsert) AddIntLevel(v int) *AlertUpsert
AddIntLevel adds v to the "IntLevel" field.
func (*AlertUpsert) ClearError ¶
func (u *AlertUpsert) ClearError() *AlertUpsert
ClearError clears the value of the "Error" field.
func (*AlertUpsert) ClearIncidentID ¶
func (u *AlertUpsert) ClearIncidentID() *AlertUpsert
ClearIncidentID clears the value of the "IncidentID" field.
func (*AlertUpsert) SetError ¶
func (u *AlertUpsert) SetError(v string) *AlertUpsert
SetError sets the "Error" field.
func (*AlertUpsert) SetIncidentID ¶
func (u *AlertUpsert) SetIncidentID(v uuid.UUID) *AlertUpsert
SetIncidentID sets the "IncidentID" field.
func (*AlertUpsert) SetIntLevel ¶
func (u *AlertUpsert) SetIntLevel(v int) *AlertUpsert
SetIntLevel sets the "IntLevel" field.
func (*AlertUpsert) SetName ¶
func (u *AlertUpsert) SetName(v string) *AlertUpsert
SetName sets the "Name" field.
func (*AlertUpsert) SetProbeHost ¶
func (u *AlertUpsert) SetProbeHost(v string) *AlertUpsert
SetProbeHost sets the "ProbeHost" field.
func (*AlertUpsert) SetProbeOS ¶
func (u *AlertUpsert) SetProbeOS(v string) *AlertUpsert
SetProbeOS sets the "ProbeOS" field.
func (*AlertUpsert) SetRegion ¶
func (u *AlertUpsert) SetRegion(v string) *AlertUpsert
SetRegion sets the "Region" field.
func (*AlertUpsert) SetTime ¶
func (u *AlertUpsert) SetTime(v time.Time) *AlertUpsert
SetTime sets the "Time" field.
func (*AlertUpsert) SetUUID ¶
func (u *AlertUpsert) SetUUID(v uuid.UUID) *AlertUpsert
SetUUID sets the "UUID" field.
func (*AlertUpsert) SetUsername ¶
func (u *AlertUpsert) SetUsername(v string) *AlertUpsert
SetUsername sets the "Username" field.
func (*AlertUpsert) UpdateError ¶
func (u *AlertUpsert) UpdateError() *AlertUpsert
UpdateError sets the "Error" field to the value that was provided on create.
func (*AlertUpsert) UpdateIncidentID ¶
func (u *AlertUpsert) UpdateIncidentID() *AlertUpsert
UpdateIncidentID sets the "IncidentID" field to the value that was provided on create.
func (*AlertUpsert) UpdateIntLevel ¶
func (u *AlertUpsert) UpdateIntLevel() *AlertUpsert
UpdateIntLevel sets the "IntLevel" field to the value that was provided on create.
func (*AlertUpsert) UpdateName ¶
func (u *AlertUpsert) UpdateName() *AlertUpsert
UpdateName sets the "Name" field to the value that was provided on create.
func (*AlertUpsert) UpdateProbeHost ¶
func (u *AlertUpsert) UpdateProbeHost() *AlertUpsert
UpdateProbeHost sets the "ProbeHost" field to the value that was provided on create.
func (*AlertUpsert) UpdateProbeOS ¶
func (u *AlertUpsert) UpdateProbeOS() *AlertUpsert
UpdateProbeOS sets the "ProbeOS" field to the value that was provided on create.
func (*AlertUpsert) UpdateRegion ¶
func (u *AlertUpsert) UpdateRegion() *AlertUpsert
UpdateRegion sets the "Region" field to the value that was provided on create.
func (*AlertUpsert) UpdateTime ¶
func (u *AlertUpsert) UpdateTime() *AlertUpsert
UpdateTime sets the "Time" field to the value that was provided on create.
func (*AlertUpsert) UpdateUUID ¶
func (u *AlertUpsert) UpdateUUID() *AlertUpsert
UpdateUUID sets the "UUID" field to the value that was provided on create.
func (*AlertUpsert) UpdateUsername ¶
func (u *AlertUpsert) UpdateUsername() *AlertUpsert
UpdateUsername sets the "Username" field to the value that was provided on create.
type AlertUpsertBulk ¶
type AlertUpsertBulk struct {
// contains filtered or unexported fields
}
AlertUpsertBulk is the builder for "upsert"-ing a bulk of Alert nodes.
func (*AlertUpsertBulk) AddIntLevel ¶
func (u *AlertUpsertBulk) AddIntLevel(v int) *AlertUpsertBulk
AddIntLevel adds v to the "IntLevel" field.
func (*AlertUpsertBulk) ClearError ¶
func (u *AlertUpsertBulk) ClearError() *AlertUpsertBulk
ClearError clears the value of the "Error" field.
func (*AlertUpsertBulk) ClearIncidentID ¶
func (u *AlertUpsertBulk) ClearIncidentID() *AlertUpsertBulk
ClearIncidentID clears the value of the "IncidentID" field.
func (*AlertUpsertBulk) DoNothing ¶
func (u *AlertUpsertBulk) DoNothing() *AlertUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AlertUpsertBulk) Exec ¶
func (u *AlertUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertUpsertBulk) ExecX ¶
func (u *AlertUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertUpsertBulk) Ignore ¶
func (u *AlertUpsertBulk) Ignore() *AlertUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Alert.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AlertUpsertBulk) SetError ¶
func (u *AlertUpsertBulk) SetError(v string) *AlertUpsertBulk
SetError sets the "Error" field.
func (*AlertUpsertBulk) SetIncidentID ¶
func (u *AlertUpsertBulk) SetIncidentID(v uuid.UUID) *AlertUpsertBulk
SetIncidentID sets the "IncidentID" field.
func (*AlertUpsertBulk) SetIntLevel ¶
func (u *AlertUpsertBulk) SetIntLevel(v int) *AlertUpsertBulk
SetIntLevel sets the "IntLevel" field.
func (*AlertUpsertBulk) SetName ¶
func (u *AlertUpsertBulk) SetName(v string) *AlertUpsertBulk
SetName sets the "Name" field.
func (*AlertUpsertBulk) SetProbeHost ¶
func (u *AlertUpsertBulk) SetProbeHost(v string) *AlertUpsertBulk
SetProbeHost sets the "ProbeHost" field.
func (*AlertUpsertBulk) SetProbeOS ¶
func (u *AlertUpsertBulk) SetProbeOS(v string) *AlertUpsertBulk
SetProbeOS sets the "ProbeOS" field.
func (*AlertUpsertBulk) SetRegion ¶
func (u *AlertUpsertBulk) SetRegion(v string) *AlertUpsertBulk
SetRegion sets the "Region" field.
func (*AlertUpsertBulk) SetTime ¶
func (u *AlertUpsertBulk) SetTime(v time.Time) *AlertUpsertBulk
SetTime sets the "Time" field.
func (*AlertUpsertBulk) SetUUID ¶
func (u *AlertUpsertBulk) SetUUID(v uuid.UUID) *AlertUpsertBulk
SetUUID sets the "UUID" field.
func (*AlertUpsertBulk) SetUsername ¶
func (u *AlertUpsertBulk) SetUsername(v string) *AlertUpsertBulk
SetUsername sets the "Username" field.
func (*AlertUpsertBulk) Update ¶
func (u *AlertUpsertBulk) Update(set func(*AlertUpsert)) *AlertUpsertBulk
Update allows overriding fields `UPDATE` values. See the AlertCreateBulk.OnConflict documentation for more info.
func (*AlertUpsertBulk) UpdateError ¶
func (u *AlertUpsertBulk) UpdateError() *AlertUpsertBulk
UpdateError sets the "Error" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateIncidentID ¶
func (u *AlertUpsertBulk) UpdateIncidentID() *AlertUpsertBulk
UpdateIncidentID sets the "IncidentID" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateIntLevel ¶
func (u *AlertUpsertBulk) UpdateIntLevel() *AlertUpsertBulk
UpdateIntLevel sets the "IntLevel" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateName ¶
func (u *AlertUpsertBulk) UpdateName() *AlertUpsertBulk
UpdateName sets the "Name" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateNewValues ¶
func (u *AlertUpsertBulk) UpdateNewValues() *AlertUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Alert.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AlertUpsertBulk) UpdateProbeHost ¶
func (u *AlertUpsertBulk) UpdateProbeHost() *AlertUpsertBulk
UpdateProbeHost sets the "ProbeHost" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateProbeOS ¶
func (u *AlertUpsertBulk) UpdateProbeOS() *AlertUpsertBulk
UpdateProbeOS sets the "ProbeOS" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateRegion ¶
func (u *AlertUpsertBulk) UpdateRegion() *AlertUpsertBulk
UpdateRegion sets the "Region" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateTime ¶
func (u *AlertUpsertBulk) UpdateTime() *AlertUpsertBulk
UpdateTime sets the "Time" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateUUID ¶
func (u *AlertUpsertBulk) UpdateUUID() *AlertUpsertBulk
UpdateUUID sets the "UUID" field to the value that was provided on create.
func (*AlertUpsertBulk) UpdateUsername ¶
func (u *AlertUpsertBulk) UpdateUsername() *AlertUpsertBulk
UpdateUsername sets the "Username" field to the value that was provided on create.
type AlertUpsertOne ¶
type AlertUpsertOne struct {
// contains filtered or unexported fields
}
AlertUpsertOne is the builder for "upsert"-ing
one Alert node.
func (*AlertUpsertOne) AddIntLevel ¶
func (u *AlertUpsertOne) AddIntLevel(v int) *AlertUpsertOne
AddIntLevel adds v to the "IntLevel" field.
func (*AlertUpsertOne) ClearError ¶
func (u *AlertUpsertOne) ClearError() *AlertUpsertOne
ClearError clears the value of the "Error" field.
func (*AlertUpsertOne) ClearIncidentID ¶
func (u *AlertUpsertOne) ClearIncidentID() *AlertUpsertOne
ClearIncidentID clears the value of the "IncidentID" field.
func (*AlertUpsertOne) DoNothing ¶
func (u *AlertUpsertOne) DoNothing() *AlertUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*AlertUpsertOne) Exec ¶
func (u *AlertUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertUpsertOne) ExecX ¶
func (u *AlertUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertUpsertOne) ID ¶
func (u *AlertUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*AlertUpsertOne) IDX ¶
func (u *AlertUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*AlertUpsertOne) Ignore ¶
func (u *AlertUpsertOne) Ignore() *AlertUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Alert.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*AlertUpsertOne) SetError ¶
func (u *AlertUpsertOne) SetError(v string) *AlertUpsertOne
SetError sets the "Error" field.
func (*AlertUpsertOne) SetIncidentID ¶
func (u *AlertUpsertOne) SetIncidentID(v uuid.UUID) *AlertUpsertOne
SetIncidentID sets the "IncidentID" field.
func (*AlertUpsertOne) SetIntLevel ¶
func (u *AlertUpsertOne) SetIntLevel(v int) *AlertUpsertOne
SetIntLevel sets the "IntLevel" field.
func (*AlertUpsertOne) SetName ¶
func (u *AlertUpsertOne) SetName(v string) *AlertUpsertOne
SetName sets the "Name" field.
func (*AlertUpsertOne) SetProbeHost ¶
func (u *AlertUpsertOne) SetProbeHost(v string) *AlertUpsertOne
SetProbeHost sets the "ProbeHost" field.
func (*AlertUpsertOne) SetProbeOS ¶
func (u *AlertUpsertOne) SetProbeOS(v string) *AlertUpsertOne
SetProbeOS sets the "ProbeOS" field.
func (*AlertUpsertOne) SetRegion ¶
func (u *AlertUpsertOne) SetRegion(v string) *AlertUpsertOne
SetRegion sets the "Region" field.
func (*AlertUpsertOne) SetTime ¶
func (u *AlertUpsertOne) SetTime(v time.Time) *AlertUpsertOne
SetTime sets the "Time" field.
func (*AlertUpsertOne) SetUUID ¶
func (u *AlertUpsertOne) SetUUID(v uuid.UUID) *AlertUpsertOne
SetUUID sets the "UUID" field.
func (*AlertUpsertOne) SetUsername ¶
func (u *AlertUpsertOne) SetUsername(v string) *AlertUpsertOne
SetUsername sets the "Username" field.
func (*AlertUpsertOne) Update ¶
func (u *AlertUpsertOne) Update(set func(*AlertUpsert)) *AlertUpsertOne
Update allows overriding fields `UPDATE` values. See the AlertCreate.OnConflict documentation for more info.
func (*AlertUpsertOne) UpdateError ¶
func (u *AlertUpsertOne) UpdateError() *AlertUpsertOne
UpdateError sets the "Error" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateIncidentID ¶
func (u *AlertUpsertOne) UpdateIncidentID() *AlertUpsertOne
UpdateIncidentID sets the "IncidentID" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateIntLevel ¶
func (u *AlertUpsertOne) UpdateIntLevel() *AlertUpsertOne
UpdateIntLevel sets the "IntLevel" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateName ¶
func (u *AlertUpsertOne) UpdateName() *AlertUpsertOne
UpdateName sets the "Name" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateNewValues ¶
func (u *AlertUpsertOne) UpdateNewValues() *AlertUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Alert.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*AlertUpsertOne) UpdateProbeHost ¶
func (u *AlertUpsertOne) UpdateProbeHost() *AlertUpsertOne
UpdateProbeHost sets the "ProbeHost" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateProbeOS ¶
func (u *AlertUpsertOne) UpdateProbeOS() *AlertUpsertOne
UpdateProbeOS sets the "ProbeOS" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateRegion ¶
func (u *AlertUpsertOne) UpdateRegion() *AlertUpsertOne
UpdateRegion sets the "Region" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateTime ¶
func (u *AlertUpsertOne) UpdateTime() *AlertUpsertOne
UpdateTime sets the "Time" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateUUID ¶
func (u *AlertUpsertOne) UpdateUUID() *AlertUpsertOne
UpdateUUID sets the "UUID" field to the value that was provided on create.
func (*AlertUpsertOne) UpdateUsername ¶
func (u *AlertUpsertOne) UpdateUsername() *AlertUpsertOne
UpdateUsername sets the "Username" field to the value that was provided on create.
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 // Counter is the client for interacting with the Counter builders. Counter *CounterClient // Failure is the client for interacting with the Failure builders. Failure *FailureClient // File is the client for interacting with the File builders. File *FileClient // Incident is the client for interacting with the Incident builders. Incident *IncidentClient // Status is the client for interacting with the Status builders. Status *StatusClient // 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)
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
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 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 Counter ¶
type Counter struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "Name" field. Name string `json:"Name,omitempty"` // Value holds the value of the "Value" field. Value float64 `json:"Value,omitempty"` // contains filtered or unexported fields }
Counter is the model entity for the Counter schema.
func (*Counter) ToEdge ¶
func (c *Counter) ToEdge(order *CounterOrder) *CounterEdge
ToEdge converts Counter into CounterEdge.
func (*Counter) Unwrap ¶
Unwrap unwraps the Counter 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 (*Counter) Update ¶
func (c *Counter) Update() *CounterUpdateOne
Update returns a builder for updating this Counter. Note that you need to call Counter.Unwrap() before calling this method if this Counter was returned from a transaction, and the transaction was committed or rolled back.
type CounterClient ¶
type CounterClient struct {
// contains filtered or unexported fields
}
CounterClient is a client for the Counter schema.
func NewCounterClient ¶
func NewCounterClient(c config) *CounterClient
NewCounterClient returns a client for the Counter from the given config.
func (*CounterClient) Create ¶
func (c *CounterClient) Create() *CounterCreate
Create returns a builder for creating a Counter entity.
func (*CounterClient) CreateBulk ¶
func (c *CounterClient) CreateBulk(builders ...*CounterCreate) *CounterCreateBulk
CreateBulk returns a builder for creating a bulk of Counter entities.
func (*CounterClient) Delete ¶
func (c *CounterClient) Delete() *CounterDelete
Delete returns a delete builder for Counter.
func (*CounterClient) DeleteOne ¶
func (c *CounterClient) DeleteOne(co *Counter) *CounterDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*CounterClient) DeleteOneID ¶
func (c *CounterClient) DeleteOneID(id int) *CounterDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*CounterClient) GetX ¶
func (c *CounterClient) GetX(ctx context.Context, id int) *Counter
GetX is like Get, but panics if an error occurs.
func (*CounterClient) Hooks ¶
func (c *CounterClient) Hooks() []Hook
Hooks returns the client hooks.
func (*CounterClient) Query ¶
func (c *CounterClient) Query() *CounterQuery
Query returns a query builder for Counter.
func (*CounterClient) Update ¶
func (c *CounterClient) Update() *CounterUpdate
Update returns an update builder for Counter.
func (*CounterClient) UpdateOne ¶
func (c *CounterClient) UpdateOne(co *Counter) *CounterUpdateOne
UpdateOne returns an update builder for the given entity.
func (*CounterClient) UpdateOneID ¶
func (c *CounterClient) UpdateOneID(id int) *CounterUpdateOne
UpdateOneID returns an update builder for the given id.
func (*CounterClient) Use ¶
func (c *CounterClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `counter.Hooks(f(g(h())))`.
type CounterConnection ¶
type CounterConnection struct { Edges []*CounterEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
CounterConnection is the connection containing edges to Counter.
type CounterCreate ¶
type CounterCreate struct {
// contains filtered or unexported fields
}
CounterCreate is the builder for creating a Counter entity.
func (*CounterCreate) Exec ¶
func (cc *CounterCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*CounterCreate) ExecX ¶
func (cc *CounterCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CounterCreate) Mutation ¶
func (cc *CounterCreate) Mutation() *CounterMutation
Mutation returns the CounterMutation object of the builder.
func (*CounterCreate) OnConflict ¶
func (cc *CounterCreate) OnConflict(opts ...sql.ConflictOption) *CounterUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Counter.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CounterUpsert) { SetName(v+v). }). Exec(ctx)
func (*CounterCreate) OnConflictColumns ¶
func (cc *CounterCreate) OnConflictColumns(columns ...string) *CounterUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Counter.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*CounterCreate) Save ¶
func (cc *CounterCreate) Save(ctx context.Context) (*Counter, error)
Save creates the Counter in the database.
func (*CounterCreate) SaveX ¶
func (cc *CounterCreate) SaveX(ctx context.Context) *Counter
SaveX calls Save and panics if Save returns an error.
func (*CounterCreate) SetName ¶
func (cc *CounterCreate) SetName(s string) *CounterCreate
SetName sets the "Name" field.
func (*CounterCreate) SetValue ¶
func (cc *CounterCreate) SetValue(f float64) *CounterCreate
SetValue sets the "Value" field.
type CounterCreateBulk ¶
type CounterCreateBulk struct {
// contains filtered or unexported fields
}
CounterCreateBulk is the builder for creating many Counter entities in bulk.
func (*CounterCreateBulk) Exec ¶
func (ccb *CounterCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CounterCreateBulk) ExecX ¶
func (ccb *CounterCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CounterCreateBulk) OnConflict ¶
func (ccb *CounterCreateBulk) OnConflict(opts ...sql.ConflictOption) *CounterUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Counter.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.CounterUpsert) { SetName(v+v). }). Exec(ctx)
func (*CounterCreateBulk) OnConflictColumns ¶
func (ccb *CounterCreateBulk) OnConflictColumns(columns ...string) *CounterUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Counter.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type CounterDelete ¶
type CounterDelete struct {
// contains filtered or unexported fields
}
CounterDelete is the builder for deleting a Counter entity.
func (*CounterDelete) Exec ¶
func (cd *CounterDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*CounterDelete) ExecX ¶
func (cd *CounterDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*CounterDelete) Where ¶
func (cd *CounterDelete) Where(ps ...predicate.Counter) *CounterDelete
Where appends a list predicates to the CounterDelete builder.
type CounterDeleteOne ¶
type CounterDeleteOne struct {
// contains filtered or unexported fields
}
CounterDeleteOne is the builder for deleting a single Counter entity.
func (*CounterDeleteOne) Exec ¶
func (cdo *CounterDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*CounterDeleteOne) ExecX ¶
func (cdo *CounterDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type CounterEdge ¶
CounterEdge is the edge representation of Counter.
type CounterGroupBy ¶
type CounterGroupBy struct {
// contains filtered or unexported fields
}
CounterGroupBy is the group-by builder for Counter entities.
func (*CounterGroupBy) Aggregate ¶
func (cgb *CounterGroupBy) Aggregate(fns ...AggregateFunc) *CounterGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*CounterGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CounterGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CounterGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CounterGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CounterGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CounterGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CounterGroupBy) Scan ¶
func (cgb *CounterGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*CounterGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CounterMutation ¶
type CounterMutation struct {
// contains filtered or unexported fields
}
CounterMutation represents an operation that mutates the Counter nodes in the graph.
func (*CounterMutation) AddField ¶
func (m *CounterMutation) 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 (*CounterMutation) AddValue ¶ added in v0.10.7
func (m *CounterMutation) AddValue(f float64)
AddValue adds f to the "Value" field.
func (*CounterMutation) AddedEdges ¶
func (m *CounterMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*CounterMutation) AddedField ¶
func (m *CounterMutation) 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 (*CounterMutation) AddedFields ¶
func (m *CounterMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*CounterMutation) AddedIDs ¶
func (m *CounterMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*CounterMutation) AddedValue ¶ added in v0.10.7
func (m *CounterMutation) AddedValue() (r float64, exists bool)
AddedValue returns the value that was added to the "Value" field in this mutation.
func (*CounterMutation) ClearEdge ¶
func (m *CounterMutation) 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 (*CounterMutation) ClearField ¶
func (m *CounterMutation) 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 (*CounterMutation) ClearedEdges ¶
func (m *CounterMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*CounterMutation) ClearedFields ¶
func (m *CounterMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (CounterMutation) Client ¶
func (m CounterMutation) 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 (*CounterMutation) EdgeCleared ¶
func (m *CounterMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*CounterMutation) Field ¶
func (m *CounterMutation) 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 (*CounterMutation) FieldCleared ¶
func (m *CounterMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*CounterMutation) Fields ¶
func (m *CounterMutation) 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 (*CounterMutation) ID ¶
func (m *CounterMutation) 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 (*CounterMutation) IDs ¶
func (m *CounterMutation) 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 (*CounterMutation) Name ¶
func (m *CounterMutation) Name() (r string, exists bool)
Name returns the value of the "Name" field in the mutation.
func (*CounterMutation) 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 (*CounterMutation) OldName ¶
func (m *CounterMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "Name" field's value of the Counter entity. If the Counter 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 (*CounterMutation) OldValue ¶
func (m *CounterMutation) OldValue(ctx context.Context) (v float64, err error)
OldValue returns the old "Value" field's value of the Counter entity. If the Counter 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 (*CounterMutation) RemovedEdges ¶
func (m *CounterMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*CounterMutation) RemovedIDs ¶
func (m *CounterMutation) 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 (*CounterMutation) ResetEdge ¶
func (m *CounterMutation) 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 (*CounterMutation) ResetField ¶
func (m *CounterMutation) 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 (*CounterMutation) ResetName ¶
func (m *CounterMutation) ResetName()
ResetName resets all changes to the "Name" field.
func (*CounterMutation) ResetValue ¶
func (m *CounterMutation) ResetValue()
ResetValue resets all changes to the "Value" field.
func (*CounterMutation) SetField ¶
func (m *CounterMutation) 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 (*CounterMutation) SetName ¶
func (m *CounterMutation) SetName(s string)
SetName sets the "Name" field.
func (*CounterMutation) SetValue ¶
func (m *CounterMutation) SetValue(f float64)
SetValue sets the "Value" field.
func (CounterMutation) Tx ¶
func (m CounterMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*CounterMutation) Type ¶
func (m *CounterMutation) Type() string
Type returns the node type of this mutation (Counter).
func (*CounterMutation) Value ¶
func (m *CounterMutation) Value() (r float64, exists bool)
Value returns the value of the "Value" field in the mutation.
func (*CounterMutation) Where ¶
func (m *CounterMutation) Where(ps ...predicate.Counter)
Where appends a list predicates to the CounterMutation builder.
type CounterOrder ¶
type CounterOrder struct { Direction OrderDirection `json:"direction"` Field *CounterOrderField `json:"field"` }
CounterOrder defines the ordering of Counter.
type CounterOrderField ¶
type CounterOrderField struct {
// contains filtered or unexported fields
}
CounterOrderField defines the ordering field of Counter.
type CounterPaginateOption ¶
type CounterPaginateOption func(*counterPager) error
CounterPaginateOption enables pagination customization.
func WithCounterFilter ¶
func WithCounterFilter(filter func(*CounterQuery) (*CounterQuery, error)) CounterPaginateOption
WithCounterFilter configures pagination filter.
func WithCounterOrder ¶
func WithCounterOrder(order *CounterOrder) CounterPaginateOption
WithCounterOrder configures pagination ordering.
type CounterQuery ¶
type CounterQuery struct {
// contains filtered or unexported fields
}
CounterQuery is the builder for querying Counter entities.
func (*CounterQuery) All ¶
func (cq *CounterQuery) All(ctx context.Context) ([]*Counter, error)
All executes the query and returns a list of Counters.
func (*CounterQuery) AllX ¶
func (cq *CounterQuery) AllX(ctx context.Context) []*Counter
AllX is like All, but panics if an error occurs.
func (*CounterQuery) Clone ¶
func (cq *CounterQuery) Clone() *CounterQuery
Clone returns a duplicate of the CounterQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*CounterQuery) CollectFields ¶
func (c *CounterQuery) CollectFields(ctx context.Context, satisfies ...string) (*CounterQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*CounterQuery) Count ¶
func (cq *CounterQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*CounterQuery) CountX ¶
func (cq *CounterQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*CounterQuery) Exist ¶
func (cq *CounterQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*CounterQuery) ExistX ¶
func (cq *CounterQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*CounterQuery) First ¶
func (cq *CounterQuery) First(ctx context.Context) (*Counter, error)
First returns the first Counter entity from the query. Returns a *NotFoundError when no Counter was found.
func (*CounterQuery) FirstID ¶
func (cq *CounterQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Counter ID from the query. Returns a *NotFoundError when no Counter ID was found.
func (*CounterQuery) FirstIDX ¶
func (cq *CounterQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*CounterQuery) FirstX ¶
func (cq *CounterQuery) FirstX(ctx context.Context) *Counter
FirstX is like First, but panics if an error occurs.
func (*CounterQuery) GroupBy ¶
func (cq *CounterQuery) GroupBy(field string, fields ...string) *CounterGroupBy
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 { Name string `json:"Name,omitempty"` Count int `json:"count,omitempty"` } client.Counter.Query(). GroupBy(counter.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*CounterQuery) IDs ¶
func (cq *CounterQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Counter IDs.
func (*CounterQuery) IDsX ¶
func (cq *CounterQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*CounterQuery) Limit ¶
func (cq *CounterQuery) Limit(limit int) *CounterQuery
Limit adds a limit step to the query.
func (*CounterQuery) Offset ¶
func (cq *CounterQuery) Offset(offset int) *CounterQuery
Offset adds an offset step to the query.
func (*CounterQuery) Only ¶
func (cq *CounterQuery) Only(ctx context.Context) (*Counter, error)
Only returns a single Counter entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Counter entity is found. Returns a *NotFoundError when no Counter entities are found.
func (*CounterQuery) OnlyID ¶
func (cq *CounterQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Counter ID in the query. Returns a *NotSingularError when more than one Counter ID is found. Returns a *NotFoundError when no entities are found.
func (*CounterQuery) OnlyIDX ¶
func (cq *CounterQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*CounterQuery) OnlyX ¶
func (cq *CounterQuery) OnlyX(ctx context.Context) *Counter
OnlyX is like Only, but panics if an error occurs.
func (*CounterQuery) Order ¶
func (cq *CounterQuery) Order(o ...OrderFunc) *CounterQuery
Order adds an order step to the query.
func (*CounterQuery) Paginate ¶
func (c *CounterQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...CounterPaginateOption, ) (*CounterConnection, error)
Paginate executes the query and returns a relay based cursor connection to Counter.
func (*CounterQuery) Select ¶
func (cq *CounterQuery) Select(fields ...string) *CounterSelect
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 { Name string `json:"Name,omitempty"` } client.Counter.Query(). Select(counter.FieldName). Scan(ctx, &v)
func (*CounterQuery) Unique ¶
func (cq *CounterQuery) Unique(unique bool) *CounterQuery
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 (*CounterQuery) Where ¶
func (cq *CounterQuery) Where(ps ...predicate.Counter) *CounterQuery
Where adds a new predicate for the CounterQuery builder.
type CounterSelect ¶
type CounterSelect struct { *CounterQuery // contains filtered or unexported fields }
CounterSelect is the builder for selecting fields of Counter entities.
func (*CounterSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*CounterSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*CounterSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*CounterSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*CounterSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*CounterSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*CounterSelect) Scan ¶
func (cs *CounterSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*CounterSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type CounterUpdate ¶
type CounterUpdate struct {
// contains filtered or unexported fields
}
CounterUpdate is the builder for updating Counter entities.
func (*CounterUpdate) AddValue ¶ added in v0.10.7
func (cu *CounterUpdate) AddValue(f float64) *CounterUpdate
AddValue adds f to the "Value" field.
func (*CounterUpdate) Exec ¶
func (cu *CounterUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*CounterUpdate) ExecX ¶
func (cu *CounterUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CounterUpdate) Mutation ¶
func (cu *CounterUpdate) Mutation() *CounterMutation
Mutation returns the CounterMutation object of the builder.
func (*CounterUpdate) Save ¶
func (cu *CounterUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*CounterUpdate) SaveX ¶
func (cu *CounterUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*CounterUpdate) SetName ¶
func (cu *CounterUpdate) SetName(s string) *CounterUpdate
SetName sets the "Name" field.
func (*CounterUpdate) SetValue ¶
func (cu *CounterUpdate) SetValue(f float64) *CounterUpdate
SetValue sets the "Value" field.
func (*CounterUpdate) Where ¶
func (cu *CounterUpdate) Where(ps ...predicate.Counter) *CounterUpdate
Where appends a list predicates to the CounterUpdate builder.
type CounterUpdateOne ¶
type CounterUpdateOne struct {
// contains filtered or unexported fields
}
CounterUpdateOne is the builder for updating a single Counter entity.
func (*CounterUpdateOne) AddValue ¶ added in v0.10.7
func (cuo *CounterUpdateOne) AddValue(f float64) *CounterUpdateOne
AddValue adds f to the "Value" field.
func (*CounterUpdateOne) Exec ¶
func (cuo *CounterUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*CounterUpdateOne) ExecX ¶
func (cuo *CounterUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CounterUpdateOne) Mutation ¶
func (cuo *CounterUpdateOne) Mutation() *CounterMutation
Mutation returns the CounterMutation object of the builder.
func (*CounterUpdateOne) Save ¶
func (cuo *CounterUpdateOne) Save(ctx context.Context) (*Counter, error)
Save executes the query and returns the updated Counter entity.
func (*CounterUpdateOne) SaveX ¶
func (cuo *CounterUpdateOne) SaveX(ctx context.Context) *Counter
SaveX is like Save, but panics if an error occurs.
func (*CounterUpdateOne) Select ¶
func (cuo *CounterUpdateOne) Select(field string, fields ...string) *CounterUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*CounterUpdateOne) SetName ¶
func (cuo *CounterUpdateOne) SetName(s string) *CounterUpdateOne
SetName sets the "Name" field.
func (*CounterUpdateOne) SetValue ¶
func (cuo *CounterUpdateOne) SetValue(f float64) *CounterUpdateOne
SetValue sets the "Value" field.
type CounterUpsert ¶
CounterUpsert is the "OnConflict" setter.
func (*CounterUpsert) AddValue ¶ added in v0.10.7
func (u *CounterUpsert) AddValue(v float64) *CounterUpsert
AddValue adds v to the "Value" field.
func (*CounterUpsert) SetName ¶
func (u *CounterUpsert) SetName(v string) *CounterUpsert
SetName sets the "Name" field.
func (*CounterUpsert) SetValue ¶
func (u *CounterUpsert) SetValue(v float64) *CounterUpsert
SetValue sets the "Value" field.
func (*CounterUpsert) UpdateName ¶
func (u *CounterUpsert) UpdateName() *CounterUpsert
UpdateName sets the "Name" field to the value that was provided on create.
func (*CounterUpsert) UpdateValue ¶
func (u *CounterUpsert) UpdateValue() *CounterUpsert
UpdateValue sets the "Value" field to the value that was provided on create.
type CounterUpsertBulk ¶
type CounterUpsertBulk struct {
// contains filtered or unexported fields
}
CounterUpsertBulk is the builder for "upsert"-ing a bulk of Counter nodes.
func (*CounterUpsertBulk) AddValue ¶ added in v0.10.7
func (u *CounterUpsertBulk) AddValue(v float64) *CounterUpsertBulk
AddValue adds v to the "Value" field.
func (*CounterUpsertBulk) DoNothing ¶
func (u *CounterUpsertBulk) DoNothing() *CounterUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CounterUpsertBulk) Exec ¶
func (u *CounterUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*CounterUpsertBulk) ExecX ¶
func (u *CounterUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CounterUpsertBulk) Ignore ¶
func (u *CounterUpsertBulk) Ignore() *CounterUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Counter.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CounterUpsertBulk) SetName ¶
func (u *CounterUpsertBulk) SetName(v string) *CounterUpsertBulk
SetName sets the "Name" field.
func (*CounterUpsertBulk) SetValue ¶
func (u *CounterUpsertBulk) SetValue(v float64) *CounterUpsertBulk
SetValue sets the "Value" field.
func (*CounterUpsertBulk) Update ¶
func (u *CounterUpsertBulk) Update(set func(*CounterUpsert)) *CounterUpsertBulk
Update allows overriding fields `UPDATE` values. See the CounterCreateBulk.OnConflict documentation for more info.
func (*CounterUpsertBulk) UpdateName ¶
func (u *CounterUpsertBulk) UpdateName() *CounterUpsertBulk
UpdateName sets the "Name" field to the value that was provided on create.
func (*CounterUpsertBulk) UpdateNewValues ¶
func (u *CounterUpsertBulk) UpdateNewValues() *CounterUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Counter.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*CounterUpsertBulk) UpdateValue ¶
func (u *CounterUpsertBulk) UpdateValue() *CounterUpsertBulk
UpdateValue sets the "Value" field to the value that was provided on create.
type CounterUpsertOne ¶
type CounterUpsertOne struct {
// contains filtered or unexported fields
}
CounterUpsertOne is the builder for "upsert"-ing
one Counter node.
func (*CounterUpsertOne) AddValue ¶ added in v0.10.7
func (u *CounterUpsertOne) AddValue(v float64) *CounterUpsertOne
AddValue adds v to the "Value" field.
func (*CounterUpsertOne) DoNothing ¶
func (u *CounterUpsertOne) DoNothing() *CounterUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*CounterUpsertOne) Exec ¶
func (u *CounterUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*CounterUpsertOne) ExecX ¶
func (u *CounterUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*CounterUpsertOne) ID ¶
func (u *CounterUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*CounterUpsertOne) IDX ¶
func (u *CounterUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*CounterUpsertOne) Ignore ¶
func (u *CounterUpsertOne) Ignore() *CounterUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Counter.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*CounterUpsertOne) SetName ¶
func (u *CounterUpsertOne) SetName(v string) *CounterUpsertOne
SetName sets the "Name" field.
func (*CounterUpsertOne) SetValue ¶
func (u *CounterUpsertOne) SetValue(v float64) *CounterUpsertOne
SetValue sets the "Value" field.
func (*CounterUpsertOne) Update ¶
func (u *CounterUpsertOne) Update(set func(*CounterUpsert)) *CounterUpsertOne
Update allows overriding fields `UPDATE` values. See the CounterCreate.OnConflict documentation for more info.
func (*CounterUpsertOne) UpdateName ¶
func (u *CounterUpsertOne) UpdateName() *CounterUpsertOne
UpdateName sets the "Name" field to the value that was provided on create.
func (*CounterUpsertOne) UpdateNewValues ¶
func (u *CounterUpsertOne) UpdateNewValues() *CounterUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Counter.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*CounterUpsertOne) UpdateValue ¶
func (u *CounterUpsertOne) UpdateValue() *CounterUpsertOne
UpdateValue sets the "Value" field to the value that was provided on create.
type Cursor ¶
Cursor of an edge type.
func (Cursor) MarshalGQL ¶
MarshalGQL implements graphql.Marshaler interface.
func (*Cursor) UnmarshalGQL ¶
UnmarshalGQL implements graphql.Unmarshaler interface.
type Edge ¶
type Edge struct { Type string `json:"type,omitempty"` // edge type. Name string `json:"name,omitempty"` // edge name. IDs []int `json:"ids,omitempty"` // node ids (where this edge point to). }
Edges between two nodes.
type Failure ¶
type Failure struct { // ID of the ent. ID int `json:"id,omitempty"` // Error holds the value of the "Error" field. Error string `json:"Error,omitempty"` // Idx holds the value of the "Idx" field. Idx int `json:"Idx,omitempty"` // contains filtered or unexported fields }
Failure is the model entity for the Failure schema.
func (*Failure) ToEdge ¶
func (f *Failure) ToEdge(order *FailureOrder) *FailureEdge
ToEdge converts Failure into FailureEdge.
func (*Failure) Unwrap ¶
Unwrap unwraps the Failure 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 (*Failure) Update ¶
func (f *Failure) Update() *FailureUpdateOne
Update returns a builder for updating this Failure. Note that you need to call Failure.Unwrap() before calling this method if this Failure was returned from a transaction, and the transaction was committed or rolled back.
type FailureClient ¶
type FailureClient struct {
// contains filtered or unexported fields
}
FailureClient is a client for the Failure schema.
func NewFailureClient ¶
func NewFailureClient(c config) *FailureClient
NewFailureClient returns a client for the Failure from the given config.
func (*FailureClient) Create ¶
func (c *FailureClient) Create() *FailureCreate
Create returns a builder for creating a Failure entity.
func (*FailureClient) CreateBulk ¶
func (c *FailureClient) CreateBulk(builders ...*FailureCreate) *FailureCreateBulk
CreateBulk returns a builder for creating a bulk of Failure entities.
func (*FailureClient) Delete ¶
func (c *FailureClient) Delete() *FailureDelete
Delete returns a delete builder for Failure.
func (*FailureClient) DeleteOne ¶
func (c *FailureClient) DeleteOne(f *Failure) *FailureDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FailureClient) DeleteOneID ¶
func (c *FailureClient) DeleteOneID(id int) *FailureDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*FailureClient) GetX ¶
func (c *FailureClient) GetX(ctx context.Context, id int) *Failure
GetX is like Get, but panics if an error occurs.
func (*FailureClient) Hooks ¶
func (c *FailureClient) Hooks() []Hook
Hooks returns the client hooks.
func (*FailureClient) Query ¶
func (c *FailureClient) Query() *FailureQuery
Query returns a query builder for Failure.
func (*FailureClient) Update ¶
func (c *FailureClient) Update() *FailureUpdate
Update returns an update builder for Failure.
func (*FailureClient) UpdateOne ¶
func (c *FailureClient) UpdateOne(f *Failure) *FailureUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FailureClient) UpdateOneID ¶
func (c *FailureClient) UpdateOneID(id int) *FailureUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FailureClient) Use ¶
func (c *FailureClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `failure.Hooks(f(g(h())))`.
type FailureConnection ¶
type FailureConnection struct { Edges []*FailureEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
FailureConnection is the connection containing edges to Failure.
type FailureCreate ¶
type FailureCreate struct {
// contains filtered or unexported fields
}
FailureCreate is the builder for creating a Failure entity.
func (*FailureCreate) Exec ¶
func (fc *FailureCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FailureCreate) ExecX ¶
func (fc *FailureCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FailureCreate) Mutation ¶
func (fc *FailureCreate) Mutation() *FailureMutation
Mutation returns the FailureMutation object of the builder.
func (*FailureCreate) OnConflict ¶
func (fc *FailureCreate) OnConflict(opts ...sql.ConflictOption) *FailureUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Failure.Create(). SetError(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FailureUpsert) { SetError(v+v). }). Exec(ctx)
func (*FailureCreate) OnConflictColumns ¶
func (fc *FailureCreate) OnConflictColumns(columns ...string) *FailureUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Failure.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FailureCreate) Save ¶
func (fc *FailureCreate) Save(ctx context.Context) (*Failure, error)
Save creates the Failure in the database.
func (*FailureCreate) SaveX ¶
func (fc *FailureCreate) SaveX(ctx context.Context) *Failure
SaveX calls Save and panics if Save returns an error.
func (*FailureCreate) SetError ¶
func (fc *FailureCreate) SetError(s string) *FailureCreate
SetError sets the "Error" field.
func (*FailureCreate) SetIdx ¶
func (fc *FailureCreate) SetIdx(i int) *FailureCreate
SetIdx sets the "Idx" field.
type FailureCreateBulk ¶
type FailureCreateBulk struct {
// contains filtered or unexported fields
}
FailureCreateBulk is the builder for creating many Failure entities in bulk.
func (*FailureCreateBulk) Exec ¶
func (fcb *FailureCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FailureCreateBulk) ExecX ¶
func (fcb *FailureCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FailureCreateBulk) OnConflict ¶
func (fcb *FailureCreateBulk) OnConflict(opts ...sql.ConflictOption) *FailureUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Failure.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FailureUpsert) { SetError(v+v). }). Exec(ctx)
func (*FailureCreateBulk) OnConflictColumns ¶
func (fcb *FailureCreateBulk) OnConflictColumns(columns ...string) *FailureUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Failure.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type FailureDelete ¶
type FailureDelete struct {
// contains filtered or unexported fields
}
FailureDelete is the builder for deleting a Failure entity.
func (*FailureDelete) Exec ¶
func (fd *FailureDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FailureDelete) ExecX ¶
func (fd *FailureDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FailureDelete) Where ¶
func (fd *FailureDelete) Where(ps ...predicate.Failure) *FailureDelete
Where appends a list predicates to the FailureDelete builder.
type FailureDeleteOne ¶
type FailureDeleteOne struct {
// contains filtered or unexported fields
}
FailureDeleteOne is the builder for deleting a single Failure entity.
func (*FailureDeleteOne) Exec ¶
func (fdo *FailureDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FailureDeleteOne) ExecX ¶
func (fdo *FailureDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FailureEdge ¶
FailureEdge is the edge representation of Failure.
type FailureGroupBy ¶
type FailureGroupBy struct {
// contains filtered or unexported fields
}
FailureGroupBy is the group-by builder for Failure entities.
func (*FailureGroupBy) Aggregate ¶
func (fgb *FailureGroupBy) Aggregate(fns ...AggregateFunc) *FailureGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FailureGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FailureGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FailureGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FailureGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FailureGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FailureGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FailureGroupBy) Scan ¶
func (fgb *FailureGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*FailureGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FailureMutation ¶
type FailureMutation struct {
// contains filtered or unexported fields
}
FailureMutation represents an operation that mutates the Failure nodes in the graph.
func (*FailureMutation) AddField ¶
func (m *FailureMutation) 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 (*FailureMutation) AddIdx ¶
func (m *FailureMutation) AddIdx(i int)
AddIdx adds i to the "Idx" field.
func (*FailureMutation) AddedEdges ¶
func (m *FailureMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FailureMutation) AddedField ¶
func (m *FailureMutation) 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 (*FailureMutation) AddedFields ¶
func (m *FailureMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FailureMutation) AddedIDs ¶
func (m *FailureMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FailureMutation) AddedIdx ¶
func (m *FailureMutation) AddedIdx() (r int, exists bool)
AddedIdx returns the value that was added to the "Idx" field in this mutation.
func (*FailureMutation) ClearEdge ¶
func (m *FailureMutation) 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 (*FailureMutation) ClearField ¶
func (m *FailureMutation) 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 (*FailureMutation) ClearedEdges ¶
func (m *FailureMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FailureMutation) ClearedFields ¶
func (m *FailureMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FailureMutation) Client ¶
func (m FailureMutation) 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 (*FailureMutation) EdgeCleared ¶
func (m *FailureMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FailureMutation) Error ¶
func (m *FailureMutation) Error() (r string, exists bool)
Error returns the value of the "Error" field in the mutation.
func (*FailureMutation) Field ¶
func (m *FailureMutation) 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 (*FailureMutation) FieldCleared ¶
func (m *FailureMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FailureMutation) Fields ¶
func (m *FailureMutation) 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 (*FailureMutation) ID ¶
func (m *FailureMutation) 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 (*FailureMutation) IDs ¶
func (m *FailureMutation) 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 (*FailureMutation) Idx ¶
func (m *FailureMutation) Idx() (r int, exists bool)
Idx returns the value of the "Idx" field in the mutation.
func (*FailureMutation) OldError ¶
func (m *FailureMutation) OldError(ctx context.Context) (v string, err error)
OldError returns the old "Error" field's value of the Failure entity. If the Failure 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 (*FailureMutation) 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 (*FailureMutation) OldIdx ¶
func (m *FailureMutation) OldIdx(ctx context.Context) (v int, err error)
OldIdx returns the old "Idx" field's value of the Failure entity. If the Failure 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 (*FailureMutation) RemovedEdges ¶
func (m *FailureMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FailureMutation) RemovedIDs ¶
func (m *FailureMutation) 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 (*FailureMutation) ResetEdge ¶
func (m *FailureMutation) 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 (*FailureMutation) ResetError ¶
func (m *FailureMutation) ResetError()
ResetError resets all changes to the "Error" field.
func (*FailureMutation) ResetField ¶
func (m *FailureMutation) 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 (*FailureMutation) ResetIdx ¶
func (m *FailureMutation) ResetIdx()
ResetIdx resets all changes to the "Idx" field.
func (*FailureMutation) SetError ¶
func (m *FailureMutation) SetError(s string)
SetError sets the "Error" field.
func (*FailureMutation) SetField ¶
func (m *FailureMutation) 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 (*FailureMutation) SetIdx ¶
func (m *FailureMutation) SetIdx(i int)
SetIdx sets the "Idx" field.
func (FailureMutation) Tx ¶
func (m FailureMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FailureMutation) Type ¶
func (m *FailureMutation) Type() string
Type returns the node type of this mutation (Failure).
func (*FailureMutation) Where ¶
func (m *FailureMutation) Where(ps ...predicate.Failure)
Where appends a list predicates to the FailureMutation builder.
type FailureOrder ¶
type FailureOrder struct { Direction OrderDirection `json:"direction"` Field *FailureOrderField `json:"field"` }
FailureOrder defines the ordering of Failure.
type FailureOrderField ¶
type FailureOrderField struct {
// contains filtered or unexported fields
}
FailureOrderField defines the ordering field of Failure.
type FailurePaginateOption ¶
type FailurePaginateOption func(*failurePager) error
FailurePaginateOption enables pagination customization.
func WithFailureFilter ¶
func WithFailureFilter(filter func(*FailureQuery) (*FailureQuery, error)) FailurePaginateOption
WithFailureFilter configures pagination filter.
func WithFailureOrder ¶
func WithFailureOrder(order *FailureOrder) FailurePaginateOption
WithFailureOrder configures pagination ordering.
type FailureQuery ¶
type FailureQuery struct {
// contains filtered or unexported fields
}
FailureQuery is the builder for querying Failure entities.
func (*FailureQuery) All ¶
func (fq *FailureQuery) All(ctx context.Context) ([]*Failure, error)
All executes the query and returns a list of Failures.
func (*FailureQuery) AllX ¶
func (fq *FailureQuery) AllX(ctx context.Context) []*Failure
AllX is like All, but panics if an error occurs.
func (*FailureQuery) Clone ¶
func (fq *FailureQuery) Clone() *FailureQuery
Clone returns a duplicate of the FailureQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FailureQuery) CollectFields ¶
func (f *FailureQuery) CollectFields(ctx context.Context, satisfies ...string) (*FailureQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*FailureQuery) Count ¶
func (fq *FailureQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*FailureQuery) CountX ¶
func (fq *FailureQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*FailureQuery) Exist ¶
func (fq *FailureQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*FailureQuery) ExistX ¶
func (fq *FailureQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*FailureQuery) First ¶
func (fq *FailureQuery) First(ctx context.Context) (*Failure, error)
First returns the first Failure entity from the query. Returns a *NotFoundError when no Failure was found.
func (*FailureQuery) FirstID ¶
func (fq *FailureQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Failure ID from the query. Returns a *NotFoundError when no Failure ID was found.
func (*FailureQuery) FirstIDX ¶
func (fq *FailureQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*FailureQuery) FirstX ¶
func (fq *FailureQuery) FirstX(ctx context.Context) *Failure
FirstX is like First, but panics if an error occurs.
func (*FailureQuery) GroupBy ¶
func (fq *FailureQuery) GroupBy(field string, fields ...string) *FailureGroupBy
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 { Error string `json:"Error,omitempty"` Count int `json:"count,omitempty"` } client.Failure.Query(). GroupBy(failure.FieldError). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FailureQuery) IDs ¶
func (fq *FailureQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Failure IDs.
func (*FailureQuery) IDsX ¶
func (fq *FailureQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*FailureQuery) Limit ¶
func (fq *FailureQuery) Limit(limit int) *FailureQuery
Limit adds a limit step to the query.
func (*FailureQuery) Offset ¶
func (fq *FailureQuery) Offset(offset int) *FailureQuery
Offset adds an offset step to the query.
func (*FailureQuery) Only ¶
func (fq *FailureQuery) Only(ctx context.Context) (*Failure, error)
Only returns a single Failure entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Failure entity is found. Returns a *NotFoundError when no Failure entities are found.
func (*FailureQuery) OnlyID ¶
func (fq *FailureQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Failure ID in the query. Returns a *NotSingularError when more than one Failure ID is found. Returns a *NotFoundError when no entities are found.
func (*FailureQuery) OnlyIDX ¶
func (fq *FailureQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*FailureQuery) OnlyX ¶
func (fq *FailureQuery) OnlyX(ctx context.Context) *Failure
OnlyX is like Only, but panics if an error occurs.
func (*FailureQuery) Order ¶
func (fq *FailureQuery) Order(o ...OrderFunc) *FailureQuery
Order adds an order step to the query.
func (*FailureQuery) Paginate ¶
func (f *FailureQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...FailurePaginateOption, ) (*FailureConnection, error)
Paginate executes the query and returns a relay based cursor connection to Failure.
func (*FailureQuery) Select ¶
func (fq *FailureQuery) Select(fields ...string) *FailureSelect
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 { Error string `json:"Error,omitempty"` } client.Failure.Query(). Select(failure.FieldError). Scan(ctx, &v)
func (*FailureQuery) Unique ¶
func (fq *FailureQuery) Unique(unique bool) *FailureQuery
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 (*FailureQuery) Where ¶
func (fq *FailureQuery) Where(ps ...predicate.Failure) *FailureQuery
Where adds a new predicate for the FailureQuery builder.
type FailureSelect ¶
type FailureSelect struct { *FailureQuery // contains filtered or unexported fields }
FailureSelect is the builder for selecting fields of Failure entities.
func (*FailureSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FailureSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FailureSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FailureSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FailureSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FailureSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FailureSelect) Scan ¶
func (fs *FailureSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FailureSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FailureUpdate ¶
type FailureUpdate struct {
// contains filtered or unexported fields
}
FailureUpdate is the builder for updating Failure entities.
func (*FailureUpdate) AddIdx ¶
func (fu *FailureUpdate) AddIdx(i int) *FailureUpdate
AddIdx adds i to the "Idx" field.
func (*FailureUpdate) Exec ¶
func (fu *FailureUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FailureUpdate) ExecX ¶
func (fu *FailureUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FailureUpdate) Mutation ¶
func (fu *FailureUpdate) Mutation() *FailureMutation
Mutation returns the FailureMutation object of the builder.
func (*FailureUpdate) Save ¶
func (fu *FailureUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FailureUpdate) SaveX ¶
func (fu *FailureUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FailureUpdate) SetError ¶
func (fu *FailureUpdate) SetError(s string) *FailureUpdate
SetError sets the "Error" field.
func (*FailureUpdate) SetIdx ¶
func (fu *FailureUpdate) SetIdx(i int) *FailureUpdate
SetIdx sets the "Idx" field.
func (*FailureUpdate) Where ¶
func (fu *FailureUpdate) Where(ps ...predicate.Failure) *FailureUpdate
Where appends a list predicates to the FailureUpdate builder.
type FailureUpdateOne ¶
type FailureUpdateOne struct {
// contains filtered or unexported fields
}
FailureUpdateOne is the builder for updating a single Failure entity.
func (*FailureUpdateOne) AddIdx ¶
func (fuo *FailureUpdateOne) AddIdx(i int) *FailureUpdateOne
AddIdx adds i to the "Idx" field.
func (*FailureUpdateOne) Exec ¶
func (fuo *FailureUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FailureUpdateOne) ExecX ¶
func (fuo *FailureUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FailureUpdateOne) Mutation ¶
func (fuo *FailureUpdateOne) Mutation() *FailureMutation
Mutation returns the FailureMutation object of the builder.
func (*FailureUpdateOne) Save ¶
func (fuo *FailureUpdateOne) Save(ctx context.Context) (*Failure, error)
Save executes the query and returns the updated Failure entity.
func (*FailureUpdateOne) SaveX ¶
func (fuo *FailureUpdateOne) SaveX(ctx context.Context) *Failure
SaveX is like Save, but panics if an error occurs.
func (*FailureUpdateOne) Select ¶
func (fuo *FailureUpdateOne) Select(field string, fields ...string) *FailureUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FailureUpdateOne) SetError ¶
func (fuo *FailureUpdateOne) SetError(s string) *FailureUpdateOne
SetError sets the "Error" field.
func (*FailureUpdateOne) SetIdx ¶
func (fuo *FailureUpdateOne) SetIdx(i int) *FailureUpdateOne
SetIdx sets the "Idx" field.
type FailureUpsert ¶
FailureUpsert is the "OnConflict" setter.
func (*FailureUpsert) AddIdx ¶
func (u *FailureUpsert) AddIdx(v int) *FailureUpsert
AddIdx adds v to the "Idx" field.
func (*FailureUpsert) SetError ¶
func (u *FailureUpsert) SetError(v string) *FailureUpsert
SetError sets the "Error" field.
func (*FailureUpsert) SetIdx ¶
func (u *FailureUpsert) SetIdx(v int) *FailureUpsert
SetIdx sets the "Idx" field.
func (*FailureUpsert) UpdateError ¶
func (u *FailureUpsert) UpdateError() *FailureUpsert
UpdateError sets the "Error" field to the value that was provided on create.
func (*FailureUpsert) UpdateIdx ¶
func (u *FailureUpsert) UpdateIdx() *FailureUpsert
UpdateIdx sets the "Idx" field to the value that was provided on create.
type FailureUpsertBulk ¶
type FailureUpsertBulk struct {
// contains filtered or unexported fields
}
FailureUpsertBulk is the builder for "upsert"-ing a bulk of Failure nodes.
func (*FailureUpsertBulk) AddIdx ¶
func (u *FailureUpsertBulk) AddIdx(v int) *FailureUpsertBulk
AddIdx adds v to the "Idx" field.
func (*FailureUpsertBulk) DoNothing ¶
func (u *FailureUpsertBulk) DoNothing() *FailureUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FailureUpsertBulk) Exec ¶
func (u *FailureUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FailureUpsertBulk) ExecX ¶
func (u *FailureUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FailureUpsertBulk) Ignore ¶
func (u *FailureUpsertBulk) Ignore() *FailureUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Failure.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FailureUpsertBulk) SetError ¶
func (u *FailureUpsertBulk) SetError(v string) *FailureUpsertBulk
SetError sets the "Error" field.
func (*FailureUpsertBulk) SetIdx ¶
func (u *FailureUpsertBulk) SetIdx(v int) *FailureUpsertBulk
SetIdx sets the "Idx" field.
func (*FailureUpsertBulk) Update ¶
func (u *FailureUpsertBulk) Update(set func(*FailureUpsert)) *FailureUpsertBulk
Update allows overriding fields `UPDATE` values. See the FailureCreateBulk.OnConflict documentation for more info.
func (*FailureUpsertBulk) UpdateError ¶
func (u *FailureUpsertBulk) UpdateError() *FailureUpsertBulk
UpdateError sets the "Error" field to the value that was provided on create.
func (*FailureUpsertBulk) UpdateIdx ¶
func (u *FailureUpsertBulk) UpdateIdx() *FailureUpsertBulk
UpdateIdx sets the "Idx" field to the value that was provided on create.
func (*FailureUpsertBulk) UpdateNewValues ¶
func (u *FailureUpsertBulk) UpdateNewValues() *FailureUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Failure.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type FailureUpsertOne ¶
type FailureUpsertOne struct {
// contains filtered or unexported fields
}
FailureUpsertOne is the builder for "upsert"-ing
one Failure node.
func (*FailureUpsertOne) AddIdx ¶
func (u *FailureUpsertOne) AddIdx(v int) *FailureUpsertOne
AddIdx adds v to the "Idx" field.
func (*FailureUpsertOne) DoNothing ¶
func (u *FailureUpsertOne) DoNothing() *FailureUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FailureUpsertOne) Exec ¶
func (u *FailureUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FailureUpsertOne) ExecX ¶
func (u *FailureUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FailureUpsertOne) ID ¶
func (u *FailureUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FailureUpsertOne) IDX ¶
func (u *FailureUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FailureUpsertOne) Ignore ¶
func (u *FailureUpsertOne) Ignore() *FailureUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Failure.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FailureUpsertOne) SetError ¶
func (u *FailureUpsertOne) SetError(v string) *FailureUpsertOne
SetError sets the "Error" field.
func (*FailureUpsertOne) SetIdx ¶
func (u *FailureUpsertOne) SetIdx(v int) *FailureUpsertOne
SetIdx sets the "Idx" field.
func (*FailureUpsertOne) Update ¶
func (u *FailureUpsertOne) Update(set func(*FailureUpsert)) *FailureUpsertOne
Update allows overriding fields `UPDATE` values. See the FailureCreate.OnConflict documentation for more info.
func (*FailureUpsertOne) UpdateError ¶
func (u *FailureUpsertOne) UpdateError() *FailureUpsertOne
UpdateError sets the "Error" field to the value that was provided on create.
func (*FailureUpsertOne) UpdateIdx ¶
func (u *FailureUpsertOne) UpdateIdx() *FailureUpsertOne
UpdateIdx sets the "Idx" field to the value that was provided on create.
func (*FailureUpsertOne) UpdateNewValues ¶
func (u *FailureUpsertOne) UpdateNewValues() *FailureUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Failure.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type Field ¶
type Field struct { Type string `json:"type,omitempty"` // field type. Name string `json:"name,omitempty"` // field name (as in struct). Value string `json:"value,omitempty"` // stringified value. }
Field of a node.
type File ¶
type File struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // Name holds the value of the "Name" field. Name string `json:"Name,omitempty"` // Type holds the value of the "Type" field. Type string `json:"Type,omitempty"` // Ext holds the value of the "Ext" field. Ext string `json:"Ext,omitempty"` // Size holds the value of the "Size" field. Size int `json:"Size,omitempty"` // Payload holds the value of the "payload" field. Payload []byte `json:"payload,omitempty"` // contains filtered or unexported fields }
File is the model entity for the File schema.
func (*File) Unwrap ¶
Unwrap unwraps the File 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 (*File) Update ¶
func (f *File) Update() *FileUpdateOne
Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.
type FileClient ¶
type FileClient struct {
// contains filtered or unexported fields
}
FileClient is a client for the File schema.
func NewFileClient ¶
func NewFileClient(c config) *FileClient
NewFileClient returns a client for the File from the given config.
func (*FileClient) Create ¶
func (c *FileClient) Create() *FileCreate
Create returns a builder for creating a File entity.
func (*FileClient) CreateBulk ¶
func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
CreateBulk returns a builder for creating a bulk of File entities.
func (*FileClient) Delete ¶
func (c *FileClient) Delete() *FileDelete
Delete returns a delete builder for File.
func (*FileClient) DeleteOne ¶
func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileClient) DeleteOneID ¶
func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*FileClient) GetX ¶
func (c *FileClient) GetX(ctx context.Context, id int) *File
GetX is like Get, but panics if an error occurs.
func (*FileClient) Query ¶
func (c *FileClient) Query() *FileQuery
Query returns a query builder for File.
func (*FileClient) Update ¶
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶
func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileClient) UpdateOneID ¶
func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileClient) Use ¶
func (c *FileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.
type FileConnection ¶
type FileConnection struct { Edges []*FileEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
FileConnection is the connection containing edges to File.
type FileCreate ¶
type FileCreate struct {
// contains filtered or unexported fields
}
FileCreate is the builder for creating a File entity.
func (*FileCreate) Exec ¶
func (fc *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecX ¶
func (fc *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶
func (fc *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) OnConflict ¶
func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.Create(). SetUUID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FileUpsert) { SetUUID(v+v). }). Exec(ctx)
func (*FileCreate) OnConflictColumns ¶
func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FileCreate) Save ¶
func (fc *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶
func (fc *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetExt ¶
func (fc *FileCreate) SetExt(s string) *FileCreate
SetExt sets the "Ext" field.
func (*FileCreate) SetName ¶
func (fc *FileCreate) SetName(s string) *FileCreate
SetName sets the "Name" field.
func (*FileCreate) SetPayload ¶
func (fc *FileCreate) SetPayload(b []byte) *FileCreate
SetPayload sets the "payload" field.
func (*FileCreate) SetSize ¶
func (fc *FileCreate) SetSize(i int) *FileCreate
SetSize sets the "Size" field.
func (*FileCreate) SetType ¶
func (fc *FileCreate) SetType(s string) *FileCreate
SetType sets the "Type" field.
func (*FileCreate) SetUUID ¶
func (fc *FileCreate) SetUUID(u uuid.UUID) *FileCreate
SetUUID sets the "UUID" field.
type FileCreateBulk ¶
type FileCreateBulk struct {
// contains filtered or unexported fields
}
FileCreateBulk is the builder for creating many File entities in bulk.
func (*FileCreateBulk) Exec ¶
func (fcb *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecX ¶
func (fcb *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreateBulk) OnConflict ¶
func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FileUpsert) { SetUUID(v+v). }). Exec(ctx)
func (*FileCreateBulk) OnConflictColumns ¶
func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type FileDelete ¶
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶
func (fd *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecX ¶
func (fd *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) Where ¶
func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
Where appends a list predicates to the FileDelete builder.
type FileDeleteOne ¶
type FileDeleteOne struct {
// contains filtered or unexported fields
}
FileDeleteOne is the builder for deleting a single File entity.
func (*FileDeleteOne) Exec ¶
func (fdo *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶
func (fdo *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type FileGroupBy ¶
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶
func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Scan ¶
func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*FileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileMutation ¶
type FileMutation struct {
// contains filtered or unexported fields
}
FileMutation represents an operation that mutates the File nodes in the graph.
func (*FileMutation) AddField ¶
func (m *FileMutation) 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 (*FileMutation) AddSize ¶
func (m *FileMutation) AddSize(i int)
AddSize adds i to the "Size" field.
func (*FileMutation) AddedEdges ¶
func (m *FileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileMutation) AddedField ¶
func (m *FileMutation) 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 (*FileMutation) AddedFields ¶
func (m *FileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileMutation) AddedIDs ¶
func (m *FileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FileMutation) AddedSize ¶
func (m *FileMutation) AddedSize() (r int, exists bool)
AddedSize returns the value that was added to the "Size" field in this mutation.
func (*FileMutation) ClearEdge ¶
func (m *FileMutation) 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 (*FileMutation) ClearField ¶
func (m *FileMutation) 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 (*FileMutation) ClearedEdges ¶
func (m *FileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileMutation) ClearedFields ¶
func (m *FileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileMutation) Client ¶
func (m FileMutation) 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 (*FileMutation) EdgeCleared ¶
func (m *FileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FileMutation) Ext ¶
func (m *FileMutation) Ext() (r string, exists bool)
Ext returns the value of the "Ext" field in the mutation.
func (*FileMutation) Field ¶
func (m *FileMutation) 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 (*FileMutation) FieldCleared ¶
func (m *FileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FileMutation) Fields ¶
func (m *FileMutation) 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 (*FileMutation) GetType ¶
func (m *FileMutation) GetType() (r string, exists bool)
GetType returns the value of the "Type" field in the mutation.
func (*FileMutation) ID ¶
func (m *FileMutation) 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 (*FileMutation) IDs ¶
func (m *FileMutation) 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 (*FileMutation) Name ¶
func (m *FileMutation) Name() (r string, exists bool)
Name returns the value of the "Name" field in the mutation.
func (*FileMutation) OldExt ¶
func (m *FileMutation) OldExt(ctx context.Context) (v string, err error)
OldExt returns the old "Ext" field's value of the File entity. If the File 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 (*FileMutation) 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 (*FileMutation) OldName ¶
func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "Name" field's value of the File entity. If the File 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 (*FileMutation) OldPayload ¶
func (m *FileMutation) OldPayload(ctx context.Context) (v []byte, err error)
OldPayload returns the old "payload" field's value of the File entity. If the File 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 (*FileMutation) OldSize ¶
func (m *FileMutation) OldSize(ctx context.Context) (v int, err error)
OldSize returns the old "Size" field's value of the File entity. If the File 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 (*FileMutation) OldType ¶
func (m *FileMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "Type" field's value of the File entity. If the File 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 (*FileMutation) OldUUID ¶
OldUUID returns the old "UUID" field's value of the File entity. If the File 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 (*FileMutation) Payload ¶
func (m *FileMutation) Payload() (r []byte, exists bool)
Payload returns the value of the "payload" field in the mutation.
func (*FileMutation) RemovedEdges ¶
func (m *FileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileMutation) RemovedIDs ¶
func (m *FileMutation) 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 (*FileMutation) ResetEdge ¶
func (m *FileMutation) 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 (*FileMutation) ResetExt ¶
func (m *FileMutation) ResetExt()
ResetExt resets all changes to the "Ext" field.
func (*FileMutation) ResetField ¶
func (m *FileMutation) 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 (*FileMutation) ResetName ¶
func (m *FileMutation) ResetName()
ResetName resets all changes to the "Name" field.
func (*FileMutation) ResetPayload ¶
func (m *FileMutation) ResetPayload()
ResetPayload resets all changes to the "payload" field.
func (*FileMutation) ResetSize ¶
func (m *FileMutation) ResetSize()
ResetSize resets all changes to the "Size" field.
func (*FileMutation) ResetType ¶
func (m *FileMutation) ResetType()
ResetType resets all changes to the "Type" field.
func (*FileMutation) ResetUUID ¶
func (m *FileMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*FileMutation) SetField ¶
func (m *FileMutation) 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 (*FileMutation) SetName ¶
func (m *FileMutation) SetName(s string)
SetName sets the "Name" field.
func (*FileMutation) SetPayload ¶
func (m *FileMutation) SetPayload(b []byte)
SetPayload sets the "payload" field.
func (*FileMutation) SetType ¶
func (m *FileMutation) SetType(s string)
SetType sets the "Type" field.
func (*FileMutation) SetUUID ¶
func (m *FileMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
func (*FileMutation) Size ¶
func (m *FileMutation) Size() (r int, exists bool)
Size returns the value of the "Size" field in the mutation.
func (FileMutation) Tx ¶
func (m FileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FileMutation) Type ¶
func (m *FileMutation) Type() string
Type returns the node type of this mutation (File).
func (*FileMutation) UUID ¶
func (m *FileMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
func (*FileMutation) Where ¶
func (m *FileMutation) Where(ps ...predicate.File)
Where appends a list predicates to the FileMutation builder.
type FileOrder ¶
type FileOrder struct { Direction OrderDirection `json:"direction"` Field *FileOrderField `json:"field"` }
FileOrder defines the ordering of File.
type FileOrderField ¶
type FileOrderField struct {
// contains filtered or unexported fields
}
FileOrderField defines the ordering field of File.
type FilePaginateOption ¶
type FilePaginateOption func(*filePager) error
FilePaginateOption enables pagination customization.
func WithFileFilter ¶
func WithFileFilter(filter func(*FileQuery) (*FileQuery, error)) FilePaginateOption
WithFileFilter configures pagination filter.
func WithFileOrder ¶
func WithFileOrder(order *FileOrder) FilePaginateOption
WithFileOrder configures pagination ordering.
type FileQuery ¶
type FileQuery struct {
// contains filtered or unexported fields
}
FileQuery is the builder for querying File entities.
func (*FileQuery) Clone ¶
Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FileQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*FileQuery) First ¶
First returns the first File entity from the query. Returns a *NotFoundError when no File was found.
func (*FileQuery) FirstID ¶
FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.
func (*FileQuery) GroupBy ¶
func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.File.Query(). GroupBy(file.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FileQuery) Only ¶
Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.
func (*FileQuery) OnlyID ¶
OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.
func (*FileQuery) Paginate ¶
func (f *FileQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...FilePaginateOption, ) (*FileConnection, error)
Paginate executes the query and returns a relay based cursor connection to File.
func (*FileQuery) Select ¶
func (fq *FileQuery) Select(fields ...string) *FileSelect
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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.File.Query(). Select(file.FieldUUID). Scan(ctx, &v)
type FileSelect ¶
type FileSelect struct { *FileQuery // contains filtered or unexported fields }
FileSelect is the builder for selecting fields of File entities.
func (*FileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileSelect) Scan ¶
func (fs *FileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileUpdate ¶
type FileUpdate struct {
// contains filtered or unexported fields
}
FileUpdate is the builder for updating File entities.
func (*FileUpdate) AddSize ¶
func (fu *FileUpdate) AddSize(i int) *FileUpdate
AddSize adds i to the "Size" field.
func (*FileUpdate) Exec ¶
func (fu *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecX ¶
func (fu *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶
func (fu *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) Save ¶
func (fu *FileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FileUpdate) SaveX ¶
func (fu *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) SetExt ¶
func (fu *FileUpdate) SetExt(s string) *FileUpdate
SetExt sets the "Ext" field.
func (*FileUpdate) SetName ¶
func (fu *FileUpdate) SetName(s string) *FileUpdate
SetName sets the "Name" field.
func (*FileUpdate) SetPayload ¶
func (fu *FileUpdate) SetPayload(b []byte) *FileUpdate
SetPayload sets the "payload" field.
func (*FileUpdate) SetSize ¶
func (fu *FileUpdate) SetSize(i int) *FileUpdate
SetSize sets the "Size" field.
func (*FileUpdate) SetType ¶
func (fu *FileUpdate) SetType(s string) *FileUpdate
SetType sets the "Type" field.
func (*FileUpdate) SetUUID ¶
func (fu *FileUpdate) SetUUID(u uuid.UUID) *FileUpdate
SetUUID sets the "UUID" field.
func (*FileUpdate) Where ¶
func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
Where appends a list predicates to the FileUpdate builder.
type FileUpdateOne ¶
type FileUpdateOne struct {
// contains filtered or unexported fields
}
FileUpdateOne is the builder for updating a single File entity.
func (*FileUpdateOne) AddSize ¶
func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne
AddSize adds i to the "Size" field.
func (*FileUpdateOne) Exec ¶
func (fuo *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecX ¶
func (fuo *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶
func (fuo *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) Save ¶
func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶
func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶
func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FileUpdateOne) SetExt ¶
func (fuo *FileUpdateOne) SetExt(s string) *FileUpdateOne
SetExt sets the "Ext" field.
func (*FileUpdateOne) SetName ¶
func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
SetName sets the "Name" field.
func (*FileUpdateOne) SetPayload ¶
func (fuo *FileUpdateOne) SetPayload(b []byte) *FileUpdateOne
SetPayload sets the "payload" field.
func (*FileUpdateOne) SetSize ¶
func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne
SetSize sets the "Size" field.
func (*FileUpdateOne) SetType ¶
func (fuo *FileUpdateOne) SetType(s string) *FileUpdateOne
SetType sets the "Type" field.
func (*FileUpdateOne) SetUUID ¶
func (fuo *FileUpdateOne) SetUUID(u uuid.UUID) *FileUpdateOne
SetUUID sets the "UUID" field.
type FileUpsert ¶
FileUpsert is the "OnConflict" setter.
func (*FileUpsert) AddSize ¶
func (u *FileUpsert) AddSize(v int) *FileUpsert
AddSize adds v to the "Size" field.
func (*FileUpsert) SetExt ¶
func (u *FileUpsert) SetExt(v string) *FileUpsert
SetExt sets the "Ext" field.
func (*FileUpsert) SetName ¶
func (u *FileUpsert) SetName(v string) *FileUpsert
SetName sets the "Name" field.
func (*FileUpsert) SetPayload ¶
func (u *FileUpsert) SetPayload(v []byte) *FileUpsert
SetPayload sets the "payload" field.
func (*FileUpsert) SetSize ¶
func (u *FileUpsert) SetSize(v int) *FileUpsert
SetSize sets the "Size" field.
func (*FileUpsert) SetType ¶
func (u *FileUpsert) SetType(v string) *FileUpsert
SetType sets the "Type" field.
func (*FileUpsert) SetUUID ¶
func (u *FileUpsert) SetUUID(v uuid.UUID) *FileUpsert
SetUUID sets the "UUID" field.
func (*FileUpsert) UpdateExt ¶
func (u *FileUpsert) UpdateExt() *FileUpsert
UpdateExt sets the "Ext" field to the value that was provided on create.
func (*FileUpsert) UpdateName ¶
func (u *FileUpsert) UpdateName() *FileUpsert
UpdateName sets the "Name" field to the value that was provided on create.
func (*FileUpsert) UpdatePayload ¶
func (u *FileUpsert) UpdatePayload() *FileUpsert
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*FileUpsert) UpdateSize ¶
func (u *FileUpsert) UpdateSize() *FileUpsert
UpdateSize sets the "Size" field to the value that was provided on create.
func (*FileUpsert) UpdateType ¶
func (u *FileUpsert) UpdateType() *FileUpsert
UpdateType sets the "Type" field to the value that was provided on create.
func (*FileUpsert) UpdateUUID ¶
func (u *FileUpsert) UpdateUUID() *FileUpsert
UpdateUUID sets the "UUID" field to the value that was provided on create.
type FileUpsertBulk ¶
type FileUpsertBulk struct {
// contains filtered or unexported fields
}
FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.
func (*FileUpsertBulk) AddSize ¶
func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk
AddSize adds v to the "Size" field.
func (*FileUpsertBulk) DoNothing ¶
func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertBulk) Exec ¶
func (u *FileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertBulk) ExecX ¶
func (u *FileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertBulk) Ignore ¶
func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FileUpsertBulk) SetExt ¶
func (u *FileUpsertBulk) SetExt(v string) *FileUpsertBulk
SetExt sets the "Ext" field.
func (*FileUpsertBulk) SetName ¶
func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
SetName sets the "Name" field.
func (*FileUpsertBulk) SetPayload ¶
func (u *FileUpsertBulk) SetPayload(v []byte) *FileUpsertBulk
SetPayload sets the "payload" field.
func (*FileUpsertBulk) SetSize ¶
func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk
SetSize sets the "Size" field.
func (*FileUpsertBulk) SetType ¶
func (u *FileUpsertBulk) SetType(v string) *FileUpsertBulk
SetType sets the "Type" field.
func (*FileUpsertBulk) SetUUID ¶
func (u *FileUpsertBulk) SetUUID(v uuid.UUID) *FileUpsertBulk
SetUUID sets the "UUID" field.
func (*FileUpsertBulk) Update ¶
func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
Update allows overriding fields `UPDATE` values. See the FileCreateBulk.OnConflict documentation for more info.
func (*FileUpsertBulk) UpdateExt ¶
func (u *FileUpsertBulk) UpdateExt() *FileUpsertBulk
UpdateExt sets the "Ext" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateName ¶
func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
UpdateName sets the "Name" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateNewValues ¶
func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FileUpsertBulk) UpdatePayload ¶
func (u *FileUpsertBulk) UpdatePayload() *FileUpsertBulk
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateSize ¶
func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
UpdateSize sets the "Size" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateType ¶
func (u *FileUpsertBulk) UpdateType() *FileUpsertBulk
UpdateType sets the "Type" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateUUID ¶
func (u *FileUpsertBulk) UpdateUUID() *FileUpsertBulk
UpdateUUID sets the "UUID" field to the value that was provided on create.
type FileUpsertOne ¶
type FileUpsertOne struct {
// contains filtered or unexported fields
}
FileUpsertOne is the builder for "upsert"-ing
one File node.
func (*FileUpsertOne) AddSize ¶
func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne
AddSize adds v to the "Size" field.
func (*FileUpsertOne) DoNothing ¶
func (u *FileUpsertOne) DoNothing() *FileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertOne) Exec ¶
func (u *FileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertOne) ExecX ¶
func (u *FileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertOne) ID ¶
func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FileUpsertOne) IDX ¶
func (u *FileUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FileUpsertOne) Ignore ¶
func (u *FileUpsertOne) Ignore() *FileUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FileUpsertOne) SetExt ¶
func (u *FileUpsertOne) SetExt(v string) *FileUpsertOne
SetExt sets the "Ext" field.
func (*FileUpsertOne) SetName ¶
func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
SetName sets the "Name" field.
func (*FileUpsertOne) SetPayload ¶
func (u *FileUpsertOne) SetPayload(v []byte) *FileUpsertOne
SetPayload sets the "payload" field.
func (*FileUpsertOne) SetSize ¶
func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne
SetSize sets the "Size" field.
func (*FileUpsertOne) SetType ¶
func (u *FileUpsertOne) SetType(v string) *FileUpsertOne
SetType sets the "Type" field.
func (*FileUpsertOne) SetUUID ¶
func (u *FileUpsertOne) SetUUID(v uuid.UUID) *FileUpsertOne
SetUUID sets the "UUID" field.
func (*FileUpsertOne) Update ¶
func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
Update allows overriding fields `UPDATE` values. See the FileCreate.OnConflict documentation for more info.
func (*FileUpsertOne) UpdateExt ¶
func (u *FileUpsertOne) UpdateExt() *FileUpsertOne
UpdateExt sets the "Ext" field to the value that was provided on create.
func (*FileUpsertOne) UpdateName ¶
func (u *FileUpsertOne) UpdateName() *FileUpsertOne
UpdateName sets the "Name" field to the value that was provided on create.
func (*FileUpsertOne) UpdateNewValues ¶
func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FileUpsertOne) UpdatePayload ¶
func (u *FileUpsertOne) UpdatePayload() *FileUpsertOne
UpdatePayload sets the "payload" field to the value that was provided on create.
func (*FileUpsertOne) UpdateSize ¶
func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
UpdateSize sets the "Size" field to the value that was provided on create.
func (*FileUpsertOne) UpdateType ¶
func (u *FileUpsertOne) UpdateType() *FileUpsertOne
UpdateType sets the "Type" field to the value that was provided on create.
func (*FileUpsertOne) UpdateUUID ¶
func (u *FileUpsertOne) UpdateUUID() *FileUpsertOne
UpdateUUID sets the "UUID" field to the value that was provided on create.
type Incident ¶
type Incident struct { // ID of the ent. ID int `json:"id,omitempty"` // UUID holds the value of the "UUID" field. UUID uuid.UUID `json:"UUID,omitempty"` // IncidentID holds the value of the "IncidentID" field. IncidentID uuid.UUID `json:"IncidentID,omitempty"` // Name holds the value of the "Name" field. Name string `json:"Name,omitempty"` // Time holds the value of the "Time" field. Time time.Time `json:"Time,omitempty"` // IntLevel holds the value of the "IntLevel" field. IntLevel int `json:"IntLevel,omitempty"` // Username holds the value of the "Username" field. Username string `json:"Username,omitempty"` // Region holds the value of the "Region" field. Region string `json:"Region,omitempty"` // ProbeOS holds the value of the "ProbeOS" field. ProbeOS string `json:"ProbeOS,omitempty"` // ProbeHost holds the value of the "ProbeHost" field. ProbeHost string `json:"ProbeHost,omitempty"` // Error holds the value of the "Error" field. Error string `json:"Error,omitempty"` // Start holds the value of the "Start" field. Start time.Time `json:"Start,omitempty"` // End holds the value of the "End" field. End time.Time `json:"End,omitempty"` // State holds the value of the "State" field. State []byte `json:"State,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the IncidentQuery when eager-loading is set. Edges IncidentEdges `json:"edges"` // contains filtered or unexported fields }
Incident is the model entity for the Incident schema.
func (*Incident) NamedCounters ¶
NamedCounters returns the Counters named value or an error if the edge was not loaded in eager-loading with this name.
func (*Incident) NamedFailures ¶
NamedFailures returns the Failures named value or an error if the edge was not loaded in eager-loading with this name.
func (*Incident) NamedFiles ¶
NamedFiles returns the Files named value or an error if the edge was not loaded in eager-loading with this name.
func (*Incident) NamedStati ¶
NamedStati returns the Stati named value or an error if the edge was not loaded in eager-loading with this name.
func (*Incident) QueryCounters ¶
func (i *Incident) QueryCounters() *CounterQuery
QueryCounters queries the "Counters" edge of the Incident entity.
func (*Incident) QueryFailures ¶
func (i *Incident) QueryFailures() *FailureQuery
QueryFailures queries the "Failures" edge of the Incident entity.
func (*Incident) QueryFiles ¶
QueryFiles queries the "Files" edge of the Incident entity.
func (*Incident) QueryStati ¶
func (i *Incident) QueryStati() *StatusQuery
QueryStati queries the "Stati" edge of the Incident entity.
func (*Incident) ToEdge ¶
func (i *Incident) ToEdge(order *IncidentOrder) *IncidentEdge
ToEdge converts Incident into IncidentEdge.
func (*Incident) Unwrap ¶
Unwrap unwraps the Incident 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 (*Incident) Update ¶
func (i *Incident) Update() *IncidentUpdateOne
Update returns a builder for updating this Incident. Note that you need to call Incident.Unwrap() before calling this method if this Incident was returned from a transaction, and the transaction was committed or rolled back.
type IncidentClient ¶
type IncidentClient struct {
// contains filtered or unexported fields
}
IncidentClient is a client for the Incident schema.
func NewIncidentClient ¶
func NewIncidentClient(c config) *IncidentClient
NewIncidentClient returns a client for the Incident from the given config.
func (*IncidentClient) Create ¶
func (c *IncidentClient) Create() *IncidentCreate
Create returns a builder for creating a Incident entity.
func (*IncidentClient) CreateBulk ¶
func (c *IncidentClient) CreateBulk(builders ...*IncidentCreate) *IncidentCreateBulk
CreateBulk returns a builder for creating a bulk of Incident entities.
func (*IncidentClient) Delete ¶
func (c *IncidentClient) Delete() *IncidentDelete
Delete returns a delete builder for Incident.
func (*IncidentClient) DeleteOne ¶
func (c *IncidentClient) DeleteOne(i *Incident) *IncidentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*IncidentClient) DeleteOneID ¶
func (c *IncidentClient) DeleteOneID(id int) *IncidentDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*IncidentClient) GetX ¶
func (c *IncidentClient) GetX(ctx context.Context, id int) *Incident
GetX is like Get, but panics if an error occurs.
func (*IncidentClient) Hooks ¶
func (c *IncidentClient) Hooks() []Hook
Hooks returns the client hooks.
func (*IncidentClient) Query ¶
func (c *IncidentClient) Query() *IncidentQuery
Query returns a query builder for Incident.
func (*IncidentClient) QueryCounters ¶
func (c *IncidentClient) QueryCounters(i *Incident) *CounterQuery
QueryCounters queries the Counters edge of a Incident.
func (*IncidentClient) QueryFailures ¶
func (c *IncidentClient) QueryFailures(i *Incident) *FailureQuery
QueryFailures queries the Failures edge of a Incident.
func (*IncidentClient) QueryFiles ¶
func (c *IncidentClient) QueryFiles(i *Incident) *FileQuery
QueryFiles queries the Files edge of a Incident.
func (*IncidentClient) QueryStati ¶
func (c *IncidentClient) QueryStati(i *Incident) *StatusQuery
QueryStati queries the Stati edge of a Incident.
func (*IncidentClient) Update ¶
func (c *IncidentClient) Update() *IncidentUpdate
Update returns an update builder for Incident.
func (*IncidentClient) UpdateOne ¶
func (c *IncidentClient) UpdateOne(i *Incident) *IncidentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*IncidentClient) UpdateOneID ¶
func (c *IncidentClient) UpdateOneID(id int) *IncidentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*IncidentClient) Use ¶
func (c *IncidentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `incident.Hooks(f(g(h())))`.
type IncidentConnection ¶
type IncidentConnection struct { Edges []*IncidentEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
IncidentConnection is the connection containing edges to Incident.
type IncidentCreate ¶
type IncidentCreate struct {
// contains filtered or unexported fields
}
IncidentCreate is the builder for creating a Incident entity.
func (*IncidentCreate) AddCounterIDs ¶
func (ic *IncidentCreate) AddCounterIDs(ids ...int) *IncidentCreate
AddCounterIDs adds the "Counters" edge to the Counter entity by IDs.
func (*IncidentCreate) AddCounters ¶
func (ic *IncidentCreate) AddCounters(c ...*Counter) *IncidentCreate
AddCounters adds the "Counters" edges to the Counter entity.
func (*IncidentCreate) AddFailureIDs ¶
func (ic *IncidentCreate) AddFailureIDs(ids ...int) *IncidentCreate
AddFailureIDs adds the "Failures" edge to the Failure entity by IDs.
func (*IncidentCreate) AddFailures ¶
func (ic *IncidentCreate) AddFailures(f ...*Failure) *IncidentCreate
AddFailures adds the "Failures" edges to the Failure entity.
func (*IncidentCreate) AddFileIDs ¶
func (ic *IncidentCreate) AddFileIDs(ids ...int) *IncidentCreate
AddFileIDs adds the "Files" edge to the File entity by IDs.
func (*IncidentCreate) AddFiles ¶
func (ic *IncidentCreate) AddFiles(f ...*File) *IncidentCreate
AddFiles adds the "Files" edges to the File entity.
func (*IncidentCreate) AddStati ¶
func (ic *IncidentCreate) AddStati(s ...*Status) *IncidentCreate
AddStati adds the "Stati" edges to the Status entity.
func (*IncidentCreate) AddStatiIDs ¶
func (ic *IncidentCreate) AddStatiIDs(ids ...int) *IncidentCreate
AddStatiIDs adds the "Stati" edge to the Status entity by IDs.
func (*IncidentCreate) Exec ¶
func (ic *IncidentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*IncidentCreate) ExecX ¶
func (ic *IncidentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IncidentCreate) Mutation ¶
func (ic *IncidentCreate) Mutation() *IncidentMutation
Mutation returns the IncidentMutation object of the builder.
func (*IncidentCreate) OnConflict ¶
func (ic *IncidentCreate) OnConflict(opts ...sql.ConflictOption) *IncidentUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Incident.Create(). SetUUID(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.IncidentUpsert) { SetUUID(v+v). }). Exec(ctx)
func (*IncidentCreate) OnConflictColumns ¶
func (ic *IncidentCreate) OnConflictColumns(columns ...string) *IncidentUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Incident.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*IncidentCreate) Save ¶
func (ic *IncidentCreate) Save(ctx context.Context) (*Incident, error)
Save creates the Incident in the database.
func (*IncidentCreate) SaveX ¶
func (ic *IncidentCreate) SaveX(ctx context.Context) *Incident
SaveX calls Save and panics if Save returns an error.
func (*IncidentCreate) SetEnd ¶
func (ic *IncidentCreate) SetEnd(t time.Time) *IncidentCreate
SetEnd sets the "End" field.
func (*IncidentCreate) SetError ¶
func (ic *IncidentCreate) SetError(s string) *IncidentCreate
SetError sets the "Error" field.
func (*IncidentCreate) SetIncidentID ¶
func (ic *IncidentCreate) SetIncidentID(u uuid.UUID) *IncidentCreate
SetIncidentID sets the "IncidentID" field.
func (*IncidentCreate) SetIntLevel ¶
func (ic *IncidentCreate) SetIntLevel(i int) *IncidentCreate
SetIntLevel sets the "IntLevel" field.
func (*IncidentCreate) SetName ¶
func (ic *IncidentCreate) SetName(s string) *IncidentCreate
SetName sets the "Name" field.
func (*IncidentCreate) SetNillableEnd ¶ added in v0.10.0
func (ic *IncidentCreate) SetNillableEnd(t *time.Time) *IncidentCreate
SetNillableEnd sets the "End" field if the given value is not nil.
func (*IncidentCreate) SetNillableError ¶
func (ic *IncidentCreate) SetNillableError(s *string) *IncidentCreate
SetNillableError sets the "Error" field if the given value is not nil.
func (*IncidentCreate) SetNillableIncidentID ¶
func (ic *IncidentCreate) SetNillableIncidentID(u *uuid.UUID) *IncidentCreate
SetNillableIncidentID sets the "IncidentID" field if the given value is not nil.
func (*IncidentCreate) SetProbeHost ¶
func (ic *IncidentCreate) SetProbeHost(s string) *IncidentCreate
SetProbeHost sets the "ProbeHost" field.
func (*IncidentCreate) SetProbeOS ¶
func (ic *IncidentCreate) SetProbeOS(s string) *IncidentCreate
SetProbeOS sets the "ProbeOS" field.
func (*IncidentCreate) SetRegion ¶
func (ic *IncidentCreate) SetRegion(s string) *IncidentCreate
SetRegion sets the "Region" field.
func (*IncidentCreate) SetStart ¶
func (ic *IncidentCreate) SetStart(t time.Time) *IncidentCreate
SetStart sets the "Start" field.
func (*IncidentCreate) SetState ¶
func (ic *IncidentCreate) SetState(b []byte) *IncidentCreate
SetState sets the "State" field.
func (*IncidentCreate) SetTime ¶
func (ic *IncidentCreate) SetTime(t time.Time) *IncidentCreate
SetTime sets the "Time" field.
func (*IncidentCreate) SetUUID ¶
func (ic *IncidentCreate) SetUUID(u uuid.UUID) *IncidentCreate
SetUUID sets the "UUID" field.
func (*IncidentCreate) SetUsername ¶
func (ic *IncidentCreate) SetUsername(s string) *IncidentCreate
SetUsername sets the "Username" field.
type IncidentCreateBulk ¶
type IncidentCreateBulk struct {
// contains filtered or unexported fields
}
IncidentCreateBulk is the builder for creating many Incident entities in bulk.
func (*IncidentCreateBulk) Exec ¶
func (icb *IncidentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IncidentCreateBulk) ExecX ¶
func (icb *IncidentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IncidentCreateBulk) OnConflict ¶
func (icb *IncidentCreateBulk) OnConflict(opts ...sql.ConflictOption) *IncidentUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Incident.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.IncidentUpsert) { SetUUID(v+v). }). Exec(ctx)
func (*IncidentCreateBulk) OnConflictColumns ¶
func (icb *IncidentCreateBulk) OnConflictColumns(columns ...string) *IncidentUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Incident.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type IncidentDelete ¶
type IncidentDelete struct {
// contains filtered or unexported fields
}
IncidentDelete is the builder for deleting a Incident entity.
func (*IncidentDelete) Exec ¶
func (id *IncidentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*IncidentDelete) ExecX ¶
func (id *IncidentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*IncidentDelete) Where ¶
func (id *IncidentDelete) Where(ps ...predicate.Incident) *IncidentDelete
Where appends a list predicates to the IncidentDelete builder.
type IncidentDeleteOne ¶
type IncidentDeleteOne struct {
// contains filtered or unexported fields
}
IncidentDeleteOne is the builder for deleting a single Incident entity.
func (*IncidentDeleteOne) Exec ¶
func (ido *IncidentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*IncidentDeleteOne) ExecX ¶
func (ido *IncidentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type IncidentEdge ¶
IncidentEdge is the edge representation of Incident.
type IncidentEdges ¶
type IncidentEdges struct { // Counters holds the value of the Counters edge. Counters []*Counter `json:"Counters,omitempty"` // Stati holds the value of the Stati edge. Stati []*Status `json:"Stati,omitempty"` // Failures holds the value of the Failures edge. Failures []*Failure `json:"Failures,omitempty"` // Files holds the value of the Files edge. Files []*File `json:"Files,omitempty"` // contains filtered or unexported fields }
IncidentEdges holds the relations/edges for other nodes in the graph.
func (IncidentEdges) CountersOrErr ¶
func (e IncidentEdges) CountersOrErr() ([]*Counter, error)
CountersOrErr returns the Counters value or an error if the edge was not loaded in eager-loading.
func (IncidentEdges) FailuresOrErr ¶
func (e IncidentEdges) FailuresOrErr() ([]*Failure, error)
FailuresOrErr returns the Failures value or an error if the edge was not loaded in eager-loading.
func (IncidentEdges) FilesOrErr ¶
func (e IncidentEdges) FilesOrErr() ([]*File, error)
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
func (IncidentEdges) StatiOrErr ¶
func (e IncidentEdges) StatiOrErr() ([]*Status, error)
StatiOrErr returns the Stati value or an error if the edge was not loaded in eager-loading.
type IncidentGroupBy ¶
type IncidentGroupBy struct {
// contains filtered or unexported fields
}
IncidentGroupBy is the group-by builder for Incident entities.
func (*IncidentGroupBy) Aggregate ¶
func (igb *IncidentGroupBy) Aggregate(fns ...AggregateFunc) *IncidentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*IncidentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IncidentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IncidentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IncidentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IncidentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IncidentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IncidentGroupBy) Scan ¶
func (igb *IncidentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*IncidentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IncidentMutation ¶
type IncidentMutation struct {
// contains filtered or unexported fields
}
IncidentMutation represents an operation that mutates the Incident nodes in the graph.
func (*IncidentMutation) AddCounterIDs ¶
func (m *IncidentMutation) AddCounterIDs(ids ...int)
AddCounterIDs adds the "Counters" edge to the Counter entity by ids.
func (*IncidentMutation) AddFailureIDs ¶
func (m *IncidentMutation) AddFailureIDs(ids ...int)
AddFailureIDs adds the "Failures" edge to the Failure entity by ids.
func (*IncidentMutation) AddField ¶
func (m *IncidentMutation) 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 (*IncidentMutation) AddFileIDs ¶
func (m *IncidentMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "Files" edge to the File entity by ids.
func (*IncidentMutation) AddIntLevel ¶
func (m *IncidentMutation) AddIntLevel(i int)
AddIntLevel adds i to the "IntLevel" field.
func (*IncidentMutation) AddStatiIDs ¶
func (m *IncidentMutation) AddStatiIDs(ids ...int)
AddStatiIDs adds the "Stati" edge to the Status entity by ids.
func (*IncidentMutation) AddedEdges ¶
func (m *IncidentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*IncidentMutation) AddedField ¶
func (m *IncidentMutation) 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 (*IncidentMutation) AddedFields ¶
func (m *IncidentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*IncidentMutation) AddedIDs ¶
func (m *IncidentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*IncidentMutation) AddedIntLevel ¶
func (m *IncidentMutation) AddedIntLevel() (r int, exists bool)
AddedIntLevel returns the value that was added to the "IntLevel" field in this mutation.
func (*IncidentMutation) ClearCounters ¶
func (m *IncidentMutation) ClearCounters()
ClearCounters clears the "Counters" edge to the Counter entity.
func (*IncidentMutation) ClearEdge ¶
func (m *IncidentMutation) 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 (*IncidentMutation) ClearEnd ¶ added in v0.10.0
func (m *IncidentMutation) ClearEnd()
ClearEnd clears the value of the "End" field.
func (*IncidentMutation) ClearError ¶
func (m *IncidentMutation) ClearError()
ClearError clears the value of the "Error" field.
func (*IncidentMutation) ClearFailures ¶
func (m *IncidentMutation) ClearFailures()
ClearFailures clears the "Failures" edge to the Failure entity.
func (*IncidentMutation) ClearField ¶
func (m *IncidentMutation) 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 (*IncidentMutation) ClearFiles ¶
func (m *IncidentMutation) ClearFiles()
ClearFiles clears the "Files" edge to the File entity.
func (*IncidentMutation) ClearIncidentID ¶
func (m *IncidentMutation) ClearIncidentID()
ClearIncidentID clears the value of the "IncidentID" field.
func (*IncidentMutation) ClearStati ¶
func (m *IncidentMutation) ClearStati()
ClearStati clears the "Stati" edge to the Status entity.
func (*IncidentMutation) ClearedEdges ¶
func (m *IncidentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*IncidentMutation) ClearedFields ¶
func (m *IncidentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (IncidentMutation) Client ¶
func (m IncidentMutation) 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 (*IncidentMutation) CountersCleared ¶
func (m *IncidentMutation) CountersCleared() bool
CountersCleared reports if the "Counters" edge to the Counter entity was cleared.
func (*IncidentMutation) CountersIDs ¶
func (m *IncidentMutation) CountersIDs() (ids []int)
CountersIDs returns the "Counters" edge IDs in the mutation.
func (*IncidentMutation) EdgeCleared ¶
func (m *IncidentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*IncidentMutation) End ¶
func (m *IncidentMutation) End() (r time.Time, exists bool)
End returns the value of the "End" field in the mutation.
func (*IncidentMutation) EndCleared ¶ added in v0.10.0
func (m *IncidentMutation) EndCleared() bool
EndCleared returns if the "End" field was cleared in this mutation.
func (*IncidentMutation) Error ¶
func (m *IncidentMutation) Error() (r string, exists bool)
Error returns the value of the "Error" field in the mutation.
func (*IncidentMutation) ErrorCleared ¶
func (m *IncidentMutation) ErrorCleared() bool
ErrorCleared returns if the "Error" field was cleared in this mutation.
func (*IncidentMutation) FailuresCleared ¶
func (m *IncidentMutation) FailuresCleared() bool
FailuresCleared reports if the "Failures" edge to the Failure entity was cleared.
func (*IncidentMutation) FailuresIDs ¶
func (m *IncidentMutation) FailuresIDs() (ids []int)
FailuresIDs returns the "Failures" edge IDs in the mutation.
func (*IncidentMutation) Field ¶
func (m *IncidentMutation) 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 (*IncidentMutation) FieldCleared ¶
func (m *IncidentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*IncidentMutation) Fields ¶
func (m *IncidentMutation) 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 (*IncidentMutation) FilesCleared ¶
func (m *IncidentMutation) FilesCleared() bool
FilesCleared reports if the "Files" edge to the File entity was cleared.
func (*IncidentMutation) FilesIDs ¶
func (m *IncidentMutation) FilesIDs() (ids []int)
FilesIDs returns the "Files" edge IDs in the mutation.
func (*IncidentMutation) ID ¶
func (m *IncidentMutation) 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 (*IncidentMutation) IDs ¶
func (m *IncidentMutation) 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 (*IncidentMutation) IncidentID ¶
func (m *IncidentMutation) IncidentID() (r uuid.UUID, exists bool)
IncidentID returns the value of the "IncidentID" field in the mutation.
func (*IncidentMutation) IncidentIDCleared ¶
func (m *IncidentMutation) IncidentIDCleared() bool
IncidentIDCleared returns if the "IncidentID" field was cleared in this mutation.
func (*IncidentMutation) IntLevel ¶
func (m *IncidentMutation) IntLevel() (r int, exists bool)
IntLevel returns the value of the "IntLevel" field in the mutation.
func (*IncidentMutation) Name ¶
func (m *IncidentMutation) Name() (r string, exists bool)
Name returns the value of the "Name" field in the mutation.
func (*IncidentMutation) OldEnd ¶
OldEnd returns the old "End" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldError ¶
func (m *IncidentMutation) OldError(ctx context.Context) (v string, err error)
OldError returns the old "Error" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) 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 (*IncidentMutation) OldIncidentID ¶
OldIncidentID returns the old "IncidentID" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldIntLevel ¶
func (m *IncidentMutation) OldIntLevel(ctx context.Context) (v int, err error)
OldIntLevel returns the old "IntLevel" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldName ¶
func (m *IncidentMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "Name" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldProbeHost ¶
func (m *IncidentMutation) OldProbeHost(ctx context.Context) (v string, err error)
OldProbeHost returns the old "ProbeHost" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldProbeOS ¶
func (m *IncidentMutation) OldProbeOS(ctx context.Context) (v string, err error)
OldProbeOS returns the old "ProbeOS" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldRegion ¶
func (m *IncidentMutation) OldRegion(ctx context.Context) (v string, err error)
OldRegion returns the old "Region" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldStart ¶
OldStart returns the old "Start" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldState ¶
func (m *IncidentMutation) OldState(ctx context.Context) (v []byte, err error)
OldState returns the old "State" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldTime ¶
OldTime returns the old "Time" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldUUID ¶
OldUUID returns the old "UUID" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) OldUsername ¶
func (m *IncidentMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "Username" field's value of the Incident entity. If the Incident 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 (*IncidentMutation) ProbeHost ¶
func (m *IncidentMutation) ProbeHost() (r string, exists bool)
ProbeHost returns the value of the "ProbeHost" field in the mutation.
func (*IncidentMutation) ProbeOS ¶
func (m *IncidentMutation) ProbeOS() (r string, exists bool)
ProbeOS returns the value of the "ProbeOS" field in the mutation.
func (*IncidentMutation) Region ¶
func (m *IncidentMutation) Region() (r string, exists bool)
Region returns the value of the "Region" field in the mutation.
func (*IncidentMutation) RemoveCounterIDs ¶
func (m *IncidentMutation) RemoveCounterIDs(ids ...int)
RemoveCounterIDs removes the "Counters" edge to the Counter entity by IDs.
func (*IncidentMutation) RemoveFailureIDs ¶
func (m *IncidentMutation) RemoveFailureIDs(ids ...int)
RemoveFailureIDs removes the "Failures" edge to the Failure entity by IDs.
func (*IncidentMutation) RemoveFileIDs ¶
func (m *IncidentMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "Files" edge to the File entity by IDs.
func (*IncidentMutation) RemoveStatiIDs ¶
func (m *IncidentMutation) RemoveStatiIDs(ids ...int)
RemoveStatiIDs removes the "Stati" edge to the Status entity by IDs.
func (*IncidentMutation) RemovedCountersIDs ¶
func (m *IncidentMutation) RemovedCountersIDs() (ids []int)
RemovedCounters returns the removed IDs of the "Counters" edge to the Counter entity.
func (*IncidentMutation) RemovedEdges ¶
func (m *IncidentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*IncidentMutation) RemovedFailuresIDs ¶
func (m *IncidentMutation) RemovedFailuresIDs() (ids []int)
RemovedFailures returns the removed IDs of the "Failures" edge to the Failure entity.
func (*IncidentMutation) RemovedFilesIDs ¶
func (m *IncidentMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "Files" edge to the File entity.
func (*IncidentMutation) RemovedIDs ¶
func (m *IncidentMutation) 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 (*IncidentMutation) RemovedStatiIDs ¶
func (m *IncidentMutation) RemovedStatiIDs() (ids []int)
RemovedStati returns the removed IDs of the "Stati" edge to the Status entity.
func (*IncidentMutation) ResetCounters ¶
func (m *IncidentMutation) ResetCounters()
ResetCounters resets all changes to the "Counters" edge.
func (*IncidentMutation) ResetEdge ¶
func (m *IncidentMutation) 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 (*IncidentMutation) ResetEnd ¶
func (m *IncidentMutation) ResetEnd()
ResetEnd resets all changes to the "End" field.
func (*IncidentMutation) ResetError ¶
func (m *IncidentMutation) ResetError()
ResetError resets all changes to the "Error" field.
func (*IncidentMutation) ResetFailures ¶
func (m *IncidentMutation) ResetFailures()
ResetFailures resets all changes to the "Failures" edge.
func (*IncidentMutation) ResetField ¶
func (m *IncidentMutation) 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 (*IncidentMutation) ResetFiles ¶
func (m *IncidentMutation) ResetFiles()
ResetFiles resets all changes to the "Files" edge.
func (*IncidentMutation) ResetIncidentID ¶
func (m *IncidentMutation) ResetIncidentID()
ResetIncidentID resets all changes to the "IncidentID" field.
func (*IncidentMutation) ResetIntLevel ¶
func (m *IncidentMutation) ResetIntLevel()
ResetIntLevel resets all changes to the "IntLevel" field.
func (*IncidentMutation) ResetName ¶
func (m *IncidentMutation) ResetName()
ResetName resets all changes to the "Name" field.
func (*IncidentMutation) ResetProbeHost ¶
func (m *IncidentMutation) ResetProbeHost()
ResetProbeHost resets all changes to the "ProbeHost" field.
func (*IncidentMutation) ResetProbeOS ¶
func (m *IncidentMutation) ResetProbeOS()
ResetProbeOS resets all changes to the "ProbeOS" field.
func (*IncidentMutation) ResetRegion ¶
func (m *IncidentMutation) ResetRegion()
ResetRegion resets all changes to the "Region" field.
func (*IncidentMutation) ResetStart ¶
func (m *IncidentMutation) ResetStart()
ResetStart resets all changes to the "Start" field.
func (*IncidentMutation) ResetState ¶
func (m *IncidentMutation) ResetState()
ResetState resets all changes to the "State" field.
func (*IncidentMutation) ResetStati ¶
func (m *IncidentMutation) ResetStati()
ResetStati resets all changes to the "Stati" edge.
func (*IncidentMutation) ResetTime ¶
func (m *IncidentMutation) ResetTime()
ResetTime resets all changes to the "Time" field.
func (*IncidentMutation) ResetUUID ¶
func (m *IncidentMutation) ResetUUID()
ResetUUID resets all changes to the "UUID" field.
func (*IncidentMutation) ResetUsername ¶
func (m *IncidentMutation) ResetUsername()
ResetUsername resets all changes to the "Username" field.
func (*IncidentMutation) SetEnd ¶
func (m *IncidentMutation) SetEnd(t time.Time)
SetEnd sets the "End" field.
func (*IncidentMutation) SetError ¶
func (m *IncidentMutation) SetError(s string)
SetError sets the "Error" field.
func (*IncidentMutation) SetField ¶
func (m *IncidentMutation) 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 (*IncidentMutation) SetIncidentID ¶
func (m *IncidentMutation) SetIncidentID(u uuid.UUID)
SetIncidentID sets the "IncidentID" field.
func (*IncidentMutation) SetIntLevel ¶
func (m *IncidentMutation) SetIntLevel(i int)
SetIntLevel sets the "IntLevel" field.
func (*IncidentMutation) SetName ¶
func (m *IncidentMutation) SetName(s string)
SetName sets the "Name" field.
func (*IncidentMutation) SetProbeHost ¶
func (m *IncidentMutation) SetProbeHost(s string)
SetProbeHost sets the "ProbeHost" field.
func (*IncidentMutation) SetProbeOS ¶
func (m *IncidentMutation) SetProbeOS(s string)
SetProbeOS sets the "ProbeOS" field.
func (*IncidentMutation) SetRegion ¶
func (m *IncidentMutation) SetRegion(s string)
SetRegion sets the "Region" field.
func (*IncidentMutation) SetStart ¶
func (m *IncidentMutation) SetStart(t time.Time)
SetStart sets the "Start" field.
func (*IncidentMutation) SetState ¶
func (m *IncidentMutation) SetState(b []byte)
SetState sets the "State" field.
func (*IncidentMutation) SetTime ¶
func (m *IncidentMutation) SetTime(t time.Time)
SetTime sets the "Time" field.
func (*IncidentMutation) SetUUID ¶
func (m *IncidentMutation) SetUUID(u uuid.UUID)
SetUUID sets the "UUID" field.
func (*IncidentMutation) SetUsername ¶
func (m *IncidentMutation) SetUsername(s string)
SetUsername sets the "Username" field.
func (*IncidentMutation) Start ¶
func (m *IncidentMutation) Start() (r time.Time, exists bool)
Start returns the value of the "Start" field in the mutation.
func (*IncidentMutation) State ¶
func (m *IncidentMutation) State() (r []byte, exists bool)
State returns the value of the "State" field in the mutation.
func (*IncidentMutation) StatiCleared ¶
func (m *IncidentMutation) StatiCleared() bool
StatiCleared reports if the "Stati" edge to the Status entity was cleared.
func (*IncidentMutation) StatiIDs ¶
func (m *IncidentMutation) StatiIDs() (ids []int)
StatiIDs returns the "Stati" edge IDs in the mutation.
func (*IncidentMutation) Time ¶
func (m *IncidentMutation) Time() (r time.Time, exists bool)
Time returns the value of the "Time" field in the mutation.
func (IncidentMutation) Tx ¶
func (m IncidentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*IncidentMutation) Type ¶
func (m *IncidentMutation) Type() string
Type returns the node type of this mutation (Incident).
func (*IncidentMutation) UUID ¶
func (m *IncidentMutation) UUID() (r uuid.UUID, exists bool)
UUID returns the value of the "UUID" field in the mutation.
func (*IncidentMutation) Username ¶
func (m *IncidentMutation) Username() (r string, exists bool)
Username returns the value of the "Username" field in the mutation.
func (*IncidentMutation) Where ¶
func (m *IncidentMutation) Where(ps ...predicate.Incident)
Where appends a list predicates to the IncidentMutation builder.
type IncidentOrder ¶
type IncidentOrder struct { Direction OrderDirection `json:"direction"` Field *IncidentOrderField `json:"field"` }
IncidentOrder defines the ordering of Incident.
type IncidentOrderField ¶
type IncidentOrderField struct {
// contains filtered or unexported fields
}
IncidentOrderField defines the ordering field of Incident.
type IncidentPaginateOption ¶
type IncidentPaginateOption func(*incidentPager) error
IncidentPaginateOption enables pagination customization.
func WithIncidentFilter ¶
func WithIncidentFilter(filter func(*IncidentQuery) (*IncidentQuery, error)) IncidentPaginateOption
WithIncidentFilter configures pagination filter.
func WithIncidentOrder ¶
func WithIncidentOrder(order *IncidentOrder) IncidentPaginateOption
WithIncidentOrder configures pagination ordering.
type IncidentQuery ¶
type IncidentQuery struct {
// contains filtered or unexported fields
}
IncidentQuery is the builder for querying Incident entities.
func (*IncidentQuery) All ¶
func (iq *IncidentQuery) All(ctx context.Context) ([]*Incident, error)
All executes the query and returns a list of Incidents.
func (*IncidentQuery) AllX ¶
func (iq *IncidentQuery) AllX(ctx context.Context) []*Incident
AllX is like All, but panics if an error occurs.
func (*IncidentQuery) Clone ¶
func (iq *IncidentQuery) Clone() *IncidentQuery
Clone returns a duplicate of the IncidentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*IncidentQuery) CollectFields ¶
func (i *IncidentQuery) CollectFields(ctx context.Context, satisfies ...string) (*IncidentQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*IncidentQuery) Count ¶
func (iq *IncidentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*IncidentQuery) CountX ¶
func (iq *IncidentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*IncidentQuery) Exist ¶
func (iq *IncidentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*IncidentQuery) ExistX ¶
func (iq *IncidentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*IncidentQuery) First ¶
func (iq *IncidentQuery) First(ctx context.Context) (*Incident, error)
First returns the first Incident entity from the query. Returns a *NotFoundError when no Incident was found.
func (*IncidentQuery) FirstID ¶
func (iq *IncidentQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Incident ID from the query. Returns a *NotFoundError when no Incident ID was found.
func (*IncidentQuery) FirstIDX ¶
func (iq *IncidentQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*IncidentQuery) FirstX ¶
func (iq *IncidentQuery) FirstX(ctx context.Context) *Incident
FirstX is like First, but panics if an error occurs.
func (*IncidentQuery) GroupBy ¶
func (iq *IncidentQuery) GroupBy(field string, fields ...string) *IncidentGroupBy
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 { UUID uuid.UUID `json:"UUID,omitempty"` Count int `json:"count,omitempty"` } client.Incident.Query(). GroupBy(incident.FieldUUID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*IncidentQuery) IDs ¶
func (iq *IncidentQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Incident IDs.
func (*IncidentQuery) IDsX ¶
func (iq *IncidentQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*IncidentQuery) Limit ¶
func (iq *IncidentQuery) Limit(limit int) *IncidentQuery
Limit adds a limit step to the query.
func (*IncidentQuery) Offset ¶
func (iq *IncidentQuery) Offset(offset int) *IncidentQuery
Offset adds an offset step to the query.
func (*IncidentQuery) Only ¶
func (iq *IncidentQuery) Only(ctx context.Context) (*Incident, error)
Only returns a single Incident entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Incident entity is found. Returns a *NotFoundError when no Incident entities are found.
func (*IncidentQuery) OnlyID ¶
func (iq *IncidentQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Incident ID in the query. Returns a *NotSingularError when more than one Incident ID is found. Returns a *NotFoundError when no entities are found.
func (*IncidentQuery) OnlyIDX ¶
func (iq *IncidentQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*IncidentQuery) OnlyX ¶
func (iq *IncidentQuery) OnlyX(ctx context.Context) *Incident
OnlyX is like Only, but panics if an error occurs.
func (*IncidentQuery) Order ¶
func (iq *IncidentQuery) Order(o ...OrderFunc) *IncidentQuery
Order adds an order step to the query.
func (*IncidentQuery) Paginate ¶
func (i *IncidentQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...IncidentPaginateOption, ) (*IncidentConnection, error)
Paginate executes the query and returns a relay based cursor connection to Incident.
func (*IncidentQuery) QueryCounters ¶
func (iq *IncidentQuery) QueryCounters() *CounterQuery
QueryCounters chains the current query on the "Counters" edge.
func (*IncidentQuery) QueryFailures ¶
func (iq *IncidentQuery) QueryFailures() *FailureQuery
QueryFailures chains the current query on the "Failures" edge.
func (*IncidentQuery) QueryFiles ¶
func (iq *IncidentQuery) QueryFiles() *FileQuery
QueryFiles chains the current query on the "Files" edge.
func (*IncidentQuery) QueryStati ¶
func (iq *IncidentQuery) QueryStati() *StatusQuery
QueryStati chains the current query on the "Stati" edge.
func (*IncidentQuery) Select ¶
func (iq *IncidentQuery) Select(fields ...string) *IncidentSelect
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 { UUID uuid.UUID `json:"UUID,omitempty"` } client.Incident.Query(). Select(incident.FieldUUID). Scan(ctx, &v)
func (*IncidentQuery) Unique ¶
func (iq *IncidentQuery) Unique(unique bool) *IncidentQuery
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 (*IncidentQuery) Where ¶
func (iq *IncidentQuery) Where(ps ...predicate.Incident) *IncidentQuery
Where adds a new predicate for the IncidentQuery builder.
func (*IncidentQuery) WithCounters ¶
func (iq *IncidentQuery) WithCounters(opts ...func(*CounterQuery)) *IncidentQuery
WithCounters tells the query-builder to eager-load the nodes that are connected to the "Counters" edge. The optional arguments are used to configure the query builder of the edge.
func (*IncidentQuery) WithFailures ¶
func (iq *IncidentQuery) WithFailures(opts ...func(*FailureQuery)) *IncidentQuery
WithFailures tells the query-builder to eager-load the nodes that are connected to the "Failures" edge. The optional arguments are used to configure the query builder of the edge.
func (*IncidentQuery) WithFiles ¶
func (iq *IncidentQuery) WithFiles(opts ...func(*FileQuery)) *IncidentQuery
WithFiles tells the query-builder to eager-load the nodes that are connected to the "Files" edge. The optional arguments are used to configure the query builder of the edge.
func (*IncidentQuery) WithNamedCounters ¶
func (iq *IncidentQuery) WithNamedCounters(name string, opts ...func(*CounterQuery)) *IncidentQuery
WithNamedCounters tells the query-builder to eager-load the nodes that are connected to the "Counters" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*IncidentQuery) WithNamedFailures ¶
func (iq *IncidentQuery) WithNamedFailures(name string, opts ...func(*FailureQuery)) *IncidentQuery
WithNamedFailures tells the query-builder to eager-load the nodes that are connected to the "Failures" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*IncidentQuery) WithNamedFiles ¶
func (iq *IncidentQuery) WithNamedFiles(name string, opts ...func(*FileQuery)) *IncidentQuery
WithNamedFiles tells the query-builder to eager-load the nodes that are connected to the "Files" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*IncidentQuery) WithNamedStati ¶
func (iq *IncidentQuery) WithNamedStati(name string, opts ...func(*StatusQuery)) *IncidentQuery
WithNamedStati tells the query-builder to eager-load the nodes that are connected to the "Stati" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*IncidentQuery) WithStati ¶
func (iq *IncidentQuery) WithStati(opts ...func(*StatusQuery)) *IncidentQuery
WithStati tells the query-builder to eager-load the nodes that are connected to the "Stati" edge. The optional arguments are used to configure the query builder of the edge.
type IncidentSelect ¶
type IncidentSelect struct { *IncidentQuery // contains filtered or unexported fields }
IncidentSelect is the builder for selecting fields of Incident entities.
func (*IncidentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*IncidentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*IncidentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*IncidentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*IncidentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*IncidentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*IncidentSelect) Scan ¶
func (is *IncidentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*IncidentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type IncidentUpdate ¶
type IncidentUpdate struct {
// contains filtered or unexported fields
}
IncidentUpdate is the builder for updating Incident entities.
func (*IncidentUpdate) AddCounterIDs ¶
func (iu *IncidentUpdate) AddCounterIDs(ids ...int) *IncidentUpdate
AddCounterIDs adds the "Counters" edge to the Counter entity by IDs.
func (*IncidentUpdate) AddCounters ¶
func (iu *IncidentUpdate) AddCounters(c ...*Counter) *IncidentUpdate
AddCounters adds the "Counters" edges to the Counter entity.
func (*IncidentUpdate) AddFailureIDs ¶
func (iu *IncidentUpdate) AddFailureIDs(ids ...int) *IncidentUpdate
AddFailureIDs adds the "Failures" edge to the Failure entity by IDs.
func (*IncidentUpdate) AddFailures ¶
func (iu *IncidentUpdate) AddFailures(f ...*Failure) *IncidentUpdate
AddFailures adds the "Failures" edges to the Failure entity.
func (*IncidentUpdate) AddFileIDs ¶
func (iu *IncidentUpdate) AddFileIDs(ids ...int) *IncidentUpdate
AddFileIDs adds the "Files" edge to the File entity by IDs.
func (*IncidentUpdate) AddFiles ¶
func (iu *IncidentUpdate) AddFiles(f ...*File) *IncidentUpdate
AddFiles adds the "Files" edges to the File entity.
func (*IncidentUpdate) AddIntLevel ¶
func (iu *IncidentUpdate) AddIntLevel(i int) *IncidentUpdate
AddIntLevel adds i to the "IntLevel" field.
func (*IncidentUpdate) AddStati ¶
func (iu *IncidentUpdate) AddStati(s ...*Status) *IncidentUpdate
AddStati adds the "Stati" edges to the Status entity.
func (*IncidentUpdate) AddStatiIDs ¶
func (iu *IncidentUpdate) AddStatiIDs(ids ...int) *IncidentUpdate
AddStatiIDs adds the "Stati" edge to the Status entity by IDs.
func (*IncidentUpdate) ClearCounters ¶
func (iu *IncidentUpdate) ClearCounters() *IncidentUpdate
ClearCounters clears all "Counters" edges to the Counter entity.
func (*IncidentUpdate) ClearEnd ¶ added in v0.10.0
func (iu *IncidentUpdate) ClearEnd() *IncidentUpdate
ClearEnd clears the value of the "End" field.
func (*IncidentUpdate) ClearError ¶
func (iu *IncidentUpdate) ClearError() *IncidentUpdate
ClearError clears the value of the "Error" field.
func (*IncidentUpdate) ClearFailures ¶
func (iu *IncidentUpdate) ClearFailures() *IncidentUpdate
ClearFailures clears all "Failures" edges to the Failure entity.
func (*IncidentUpdate) ClearFiles ¶
func (iu *IncidentUpdate) ClearFiles() *IncidentUpdate
ClearFiles clears all "Files" edges to the File entity.
func (*IncidentUpdate) ClearIncidentID ¶
func (iu *IncidentUpdate) ClearIncidentID() *IncidentUpdate
ClearIncidentID clears the value of the "IncidentID" field.
func (*IncidentUpdate) ClearStati ¶
func (iu *IncidentUpdate) ClearStati() *IncidentUpdate
ClearStati clears all "Stati" edges to the Status entity.
func (*IncidentUpdate) Exec ¶
func (iu *IncidentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*IncidentUpdate) ExecX ¶
func (iu *IncidentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IncidentUpdate) Mutation ¶
func (iu *IncidentUpdate) Mutation() *IncidentMutation
Mutation returns the IncidentMutation object of the builder.
func (*IncidentUpdate) RemoveCounterIDs ¶
func (iu *IncidentUpdate) RemoveCounterIDs(ids ...int) *IncidentUpdate
RemoveCounterIDs removes the "Counters" edge to Counter entities by IDs.
func (*IncidentUpdate) RemoveCounters ¶
func (iu *IncidentUpdate) RemoveCounters(c ...*Counter) *IncidentUpdate
RemoveCounters removes "Counters" edges to Counter entities.
func (*IncidentUpdate) RemoveFailureIDs ¶
func (iu *IncidentUpdate) RemoveFailureIDs(ids ...int) *IncidentUpdate
RemoveFailureIDs removes the "Failures" edge to Failure entities by IDs.
func (*IncidentUpdate) RemoveFailures ¶
func (iu *IncidentUpdate) RemoveFailures(f ...*Failure) *IncidentUpdate
RemoveFailures removes "Failures" edges to Failure entities.
func (*IncidentUpdate) RemoveFileIDs ¶
func (iu *IncidentUpdate) RemoveFileIDs(ids ...int) *IncidentUpdate
RemoveFileIDs removes the "Files" edge to File entities by IDs.
func (*IncidentUpdate) RemoveFiles ¶
func (iu *IncidentUpdate) RemoveFiles(f ...*File) *IncidentUpdate
RemoveFiles removes "Files" edges to File entities.
func (*IncidentUpdate) RemoveStati ¶
func (iu *IncidentUpdate) RemoveStati(s ...*Status) *IncidentUpdate
RemoveStati removes "Stati" edges to Status entities.
func (*IncidentUpdate) RemoveStatiIDs ¶
func (iu *IncidentUpdate) RemoveStatiIDs(ids ...int) *IncidentUpdate
RemoveStatiIDs removes the "Stati" edge to Status entities by IDs.
func (*IncidentUpdate) Save ¶
func (iu *IncidentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*IncidentUpdate) SaveX ¶
func (iu *IncidentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*IncidentUpdate) SetEnd ¶
func (iu *IncidentUpdate) SetEnd(t time.Time) *IncidentUpdate
SetEnd sets the "End" field.
func (*IncidentUpdate) SetError ¶
func (iu *IncidentUpdate) SetError(s string) *IncidentUpdate
SetError sets the "Error" field.
func (*IncidentUpdate) SetIncidentID ¶
func (iu *IncidentUpdate) SetIncidentID(u uuid.UUID) *IncidentUpdate
SetIncidentID sets the "IncidentID" field.
func (*IncidentUpdate) SetIntLevel ¶
func (iu *IncidentUpdate) SetIntLevel(i int) *IncidentUpdate
SetIntLevel sets the "IntLevel" field.
func (*IncidentUpdate) SetName ¶
func (iu *IncidentUpdate) SetName(s string) *IncidentUpdate
SetName sets the "Name" field.
func (*IncidentUpdate) SetNillableEnd ¶ added in v0.10.0
func (iu *IncidentUpdate) SetNillableEnd(t *time.Time) *IncidentUpdate
SetNillableEnd sets the "End" field if the given value is not nil.
func (*IncidentUpdate) SetNillableError ¶
func (iu *IncidentUpdate) SetNillableError(s *string) *IncidentUpdate
SetNillableError sets the "Error" field if the given value is not nil.
func (*IncidentUpdate) SetNillableIncidentID ¶
func (iu *IncidentUpdate) SetNillableIncidentID(u *uuid.UUID) *IncidentUpdate
SetNillableIncidentID sets the "IncidentID" field if the given value is not nil.
func (*IncidentUpdate) SetProbeHost ¶
func (iu *IncidentUpdate) SetProbeHost(s string) *IncidentUpdate
SetProbeHost sets the "ProbeHost" field.
func (*IncidentUpdate) SetProbeOS ¶
func (iu *IncidentUpdate) SetProbeOS(s string) *IncidentUpdate
SetProbeOS sets the "ProbeOS" field.
func (*IncidentUpdate) SetRegion ¶
func (iu *IncidentUpdate) SetRegion(s string) *IncidentUpdate
SetRegion sets the "Region" field.
func (*IncidentUpdate) SetStart ¶
func (iu *IncidentUpdate) SetStart(t time.Time) *IncidentUpdate
SetStart sets the "Start" field.
func (*IncidentUpdate) SetState ¶
func (iu *IncidentUpdate) SetState(b []byte) *IncidentUpdate
SetState sets the "State" field.
func (*IncidentUpdate) SetTime ¶
func (iu *IncidentUpdate) SetTime(t time.Time) *IncidentUpdate
SetTime sets the "Time" field.
func (*IncidentUpdate) SetUUID ¶
func (iu *IncidentUpdate) SetUUID(u uuid.UUID) *IncidentUpdate
SetUUID sets the "UUID" field.
func (*IncidentUpdate) SetUsername ¶
func (iu *IncidentUpdate) SetUsername(s string) *IncidentUpdate
SetUsername sets the "Username" field.
func (*IncidentUpdate) Where ¶
func (iu *IncidentUpdate) Where(ps ...predicate.Incident) *IncidentUpdate
Where appends a list predicates to the IncidentUpdate builder.
type IncidentUpdateOne ¶
type IncidentUpdateOne struct {
// contains filtered or unexported fields
}
IncidentUpdateOne is the builder for updating a single Incident entity.
func (*IncidentUpdateOne) AddCounterIDs ¶
func (iuo *IncidentUpdateOne) AddCounterIDs(ids ...int) *IncidentUpdateOne
AddCounterIDs adds the "Counters" edge to the Counter entity by IDs.
func (*IncidentUpdateOne) AddCounters ¶
func (iuo *IncidentUpdateOne) AddCounters(c ...*Counter) *IncidentUpdateOne
AddCounters adds the "Counters" edges to the Counter entity.
func (*IncidentUpdateOne) AddFailureIDs ¶
func (iuo *IncidentUpdateOne) AddFailureIDs(ids ...int) *IncidentUpdateOne
AddFailureIDs adds the "Failures" edge to the Failure entity by IDs.
func (*IncidentUpdateOne) AddFailures ¶
func (iuo *IncidentUpdateOne) AddFailures(f ...*Failure) *IncidentUpdateOne
AddFailures adds the "Failures" edges to the Failure entity.
func (*IncidentUpdateOne) AddFileIDs ¶
func (iuo *IncidentUpdateOne) AddFileIDs(ids ...int) *IncidentUpdateOne
AddFileIDs adds the "Files" edge to the File entity by IDs.
func (*IncidentUpdateOne) AddFiles ¶
func (iuo *IncidentUpdateOne) AddFiles(f ...*File) *IncidentUpdateOne
AddFiles adds the "Files" edges to the File entity.
func (*IncidentUpdateOne) AddIntLevel ¶
func (iuo *IncidentUpdateOne) AddIntLevel(i int) *IncidentUpdateOne
AddIntLevel adds i to the "IntLevel" field.
func (*IncidentUpdateOne) AddStati ¶
func (iuo *IncidentUpdateOne) AddStati(s ...*Status) *IncidentUpdateOne
AddStati adds the "Stati" edges to the Status entity.
func (*IncidentUpdateOne) AddStatiIDs ¶
func (iuo *IncidentUpdateOne) AddStatiIDs(ids ...int) *IncidentUpdateOne
AddStatiIDs adds the "Stati" edge to the Status entity by IDs.
func (*IncidentUpdateOne) ClearCounters ¶
func (iuo *IncidentUpdateOne) ClearCounters() *IncidentUpdateOne
ClearCounters clears all "Counters" edges to the Counter entity.
func (*IncidentUpdateOne) ClearEnd ¶ added in v0.10.0
func (iuo *IncidentUpdateOne) ClearEnd() *IncidentUpdateOne
ClearEnd clears the value of the "End" field.
func (*IncidentUpdateOne) ClearError ¶
func (iuo *IncidentUpdateOne) ClearError() *IncidentUpdateOne
ClearError clears the value of the "Error" field.
func (*IncidentUpdateOne) ClearFailures ¶
func (iuo *IncidentUpdateOne) ClearFailures() *IncidentUpdateOne
ClearFailures clears all "Failures" edges to the Failure entity.
func (*IncidentUpdateOne) ClearFiles ¶
func (iuo *IncidentUpdateOne) ClearFiles() *IncidentUpdateOne
ClearFiles clears all "Files" edges to the File entity.
func (*IncidentUpdateOne) ClearIncidentID ¶
func (iuo *IncidentUpdateOne) ClearIncidentID() *IncidentUpdateOne
ClearIncidentID clears the value of the "IncidentID" field.
func (*IncidentUpdateOne) ClearStati ¶
func (iuo *IncidentUpdateOne) ClearStati() *IncidentUpdateOne
ClearStati clears all "Stati" edges to the Status entity.
func (*IncidentUpdateOne) Exec ¶
func (iuo *IncidentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*IncidentUpdateOne) ExecX ¶
func (iuo *IncidentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IncidentUpdateOne) Mutation ¶
func (iuo *IncidentUpdateOne) Mutation() *IncidentMutation
Mutation returns the IncidentMutation object of the builder.
func (*IncidentUpdateOne) RemoveCounterIDs ¶
func (iuo *IncidentUpdateOne) RemoveCounterIDs(ids ...int) *IncidentUpdateOne
RemoveCounterIDs removes the "Counters" edge to Counter entities by IDs.
func (*IncidentUpdateOne) RemoveCounters ¶
func (iuo *IncidentUpdateOne) RemoveCounters(c ...*Counter) *IncidentUpdateOne
RemoveCounters removes "Counters" edges to Counter entities.
func (*IncidentUpdateOne) RemoveFailureIDs ¶
func (iuo *IncidentUpdateOne) RemoveFailureIDs(ids ...int) *IncidentUpdateOne
RemoveFailureIDs removes the "Failures" edge to Failure entities by IDs.
func (*IncidentUpdateOne) RemoveFailures ¶
func (iuo *IncidentUpdateOne) RemoveFailures(f ...*Failure) *IncidentUpdateOne
RemoveFailures removes "Failures" edges to Failure entities.
func (*IncidentUpdateOne) RemoveFileIDs ¶
func (iuo *IncidentUpdateOne) RemoveFileIDs(ids ...int) *IncidentUpdateOne
RemoveFileIDs removes the "Files" edge to File entities by IDs.
func (*IncidentUpdateOne) RemoveFiles ¶
func (iuo *IncidentUpdateOne) RemoveFiles(f ...*File) *IncidentUpdateOne
RemoveFiles removes "Files" edges to File entities.
func (*IncidentUpdateOne) RemoveStati ¶
func (iuo *IncidentUpdateOne) RemoveStati(s ...*Status) *IncidentUpdateOne
RemoveStati removes "Stati" edges to Status entities.
func (*IncidentUpdateOne) RemoveStatiIDs ¶
func (iuo *IncidentUpdateOne) RemoveStatiIDs(ids ...int) *IncidentUpdateOne
RemoveStatiIDs removes the "Stati" edge to Status entities by IDs.
func (*IncidentUpdateOne) Save ¶
func (iuo *IncidentUpdateOne) Save(ctx context.Context) (*Incident, error)
Save executes the query and returns the updated Incident entity.
func (*IncidentUpdateOne) SaveX ¶
func (iuo *IncidentUpdateOne) SaveX(ctx context.Context) *Incident
SaveX is like Save, but panics if an error occurs.
func (*IncidentUpdateOne) Select ¶
func (iuo *IncidentUpdateOne) Select(field string, fields ...string) *IncidentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*IncidentUpdateOne) SetEnd ¶
func (iuo *IncidentUpdateOne) SetEnd(t time.Time) *IncidentUpdateOne
SetEnd sets the "End" field.
func (*IncidentUpdateOne) SetError ¶
func (iuo *IncidentUpdateOne) SetError(s string) *IncidentUpdateOne
SetError sets the "Error" field.
func (*IncidentUpdateOne) SetIncidentID ¶
func (iuo *IncidentUpdateOne) SetIncidentID(u uuid.UUID) *IncidentUpdateOne
SetIncidentID sets the "IncidentID" field.
func (*IncidentUpdateOne) SetIntLevel ¶
func (iuo *IncidentUpdateOne) SetIntLevel(i int) *IncidentUpdateOne
SetIntLevel sets the "IntLevel" field.
func (*IncidentUpdateOne) SetName ¶
func (iuo *IncidentUpdateOne) SetName(s string) *IncidentUpdateOne
SetName sets the "Name" field.
func (*IncidentUpdateOne) SetNillableEnd ¶ added in v0.10.0
func (iuo *IncidentUpdateOne) SetNillableEnd(t *time.Time) *IncidentUpdateOne
SetNillableEnd sets the "End" field if the given value is not nil.
func (*IncidentUpdateOne) SetNillableError ¶
func (iuo *IncidentUpdateOne) SetNillableError(s *string) *IncidentUpdateOne
SetNillableError sets the "Error" field if the given value is not nil.
func (*IncidentUpdateOne) SetNillableIncidentID ¶
func (iuo *IncidentUpdateOne) SetNillableIncidentID(u *uuid.UUID) *IncidentUpdateOne
SetNillableIncidentID sets the "IncidentID" field if the given value is not nil.
func (*IncidentUpdateOne) SetProbeHost ¶
func (iuo *IncidentUpdateOne) SetProbeHost(s string) *IncidentUpdateOne
SetProbeHost sets the "ProbeHost" field.
func (*IncidentUpdateOne) SetProbeOS ¶
func (iuo *IncidentUpdateOne) SetProbeOS(s string) *IncidentUpdateOne
SetProbeOS sets the "ProbeOS" field.
func (*IncidentUpdateOne) SetRegion ¶
func (iuo *IncidentUpdateOne) SetRegion(s string) *IncidentUpdateOne
SetRegion sets the "Region" field.
func (*IncidentUpdateOne) SetStart ¶
func (iuo *IncidentUpdateOne) SetStart(t time.Time) *IncidentUpdateOne
SetStart sets the "Start" field.
func (*IncidentUpdateOne) SetState ¶
func (iuo *IncidentUpdateOne) SetState(b []byte) *IncidentUpdateOne
SetState sets the "State" field.
func (*IncidentUpdateOne) SetTime ¶
func (iuo *IncidentUpdateOne) SetTime(t time.Time) *IncidentUpdateOne
SetTime sets the "Time" field.
func (*IncidentUpdateOne) SetUUID ¶
func (iuo *IncidentUpdateOne) SetUUID(u uuid.UUID) *IncidentUpdateOne
SetUUID sets the "UUID" field.
func (*IncidentUpdateOne) SetUsername ¶
func (iuo *IncidentUpdateOne) SetUsername(s string) *IncidentUpdateOne
SetUsername sets the "Username" field.
type IncidentUpsert ¶
IncidentUpsert is the "OnConflict" setter.
func (*IncidentUpsert) AddIntLevel ¶
func (u *IncidentUpsert) AddIntLevel(v int) *IncidentUpsert
AddIntLevel adds v to the "IntLevel" field.
func (*IncidentUpsert) ClearEnd ¶ added in v0.10.0
func (u *IncidentUpsert) ClearEnd() *IncidentUpsert
ClearEnd clears the value of the "End" field.
func (*IncidentUpsert) ClearError ¶
func (u *IncidentUpsert) ClearError() *IncidentUpsert
ClearError clears the value of the "Error" field.
func (*IncidentUpsert) ClearIncidentID ¶
func (u *IncidentUpsert) ClearIncidentID() *IncidentUpsert
ClearIncidentID clears the value of the "IncidentID" field.
func (*IncidentUpsert) SetEnd ¶
func (u *IncidentUpsert) SetEnd(v time.Time) *IncidentUpsert
SetEnd sets the "End" field.
func (*IncidentUpsert) SetError ¶
func (u *IncidentUpsert) SetError(v string) *IncidentUpsert
SetError sets the "Error" field.
func (*IncidentUpsert) SetIncidentID ¶
func (u *IncidentUpsert) SetIncidentID(v uuid.UUID) *IncidentUpsert
SetIncidentID sets the "IncidentID" field.
func (*IncidentUpsert) SetIntLevel ¶
func (u *IncidentUpsert) SetIntLevel(v int) *IncidentUpsert
SetIntLevel sets the "IntLevel" field.
func (*IncidentUpsert) SetName ¶
func (u *IncidentUpsert) SetName(v string) *IncidentUpsert
SetName sets the "Name" field.
func (*IncidentUpsert) SetProbeHost ¶
func (u *IncidentUpsert) SetProbeHost(v string) *IncidentUpsert
SetProbeHost sets the "ProbeHost" field.
func (*IncidentUpsert) SetProbeOS ¶
func (u *IncidentUpsert) SetProbeOS(v string) *IncidentUpsert
SetProbeOS sets the "ProbeOS" field.
func (*IncidentUpsert) SetRegion ¶
func (u *IncidentUpsert) SetRegion(v string) *IncidentUpsert
SetRegion sets the "Region" field.
func (*IncidentUpsert) SetStart ¶
func (u *IncidentUpsert) SetStart(v time.Time) *IncidentUpsert
SetStart sets the "Start" field.
func (*IncidentUpsert) SetState ¶
func (u *IncidentUpsert) SetState(v []byte) *IncidentUpsert
SetState sets the "State" field.
func (*IncidentUpsert) SetTime ¶
func (u *IncidentUpsert) SetTime(v time.Time) *IncidentUpsert
SetTime sets the "Time" field.
func (*IncidentUpsert) SetUUID ¶
func (u *IncidentUpsert) SetUUID(v uuid.UUID) *IncidentUpsert
SetUUID sets the "UUID" field.
func (*IncidentUpsert) SetUsername ¶
func (u *IncidentUpsert) SetUsername(v string) *IncidentUpsert
SetUsername sets the "Username" field.
func (*IncidentUpsert) UpdateEnd ¶
func (u *IncidentUpsert) UpdateEnd() *IncidentUpsert
UpdateEnd sets the "End" field to the value that was provided on create.
func (*IncidentUpsert) UpdateError ¶
func (u *IncidentUpsert) UpdateError() *IncidentUpsert
UpdateError sets the "Error" field to the value that was provided on create.
func (*IncidentUpsert) UpdateIncidentID ¶
func (u *IncidentUpsert) UpdateIncidentID() *IncidentUpsert
UpdateIncidentID sets the "IncidentID" field to the value that was provided on create.
func (*IncidentUpsert) UpdateIntLevel ¶
func (u *IncidentUpsert) UpdateIntLevel() *IncidentUpsert
UpdateIntLevel sets the "IntLevel" field to the value that was provided on create.
func (*IncidentUpsert) UpdateName ¶
func (u *IncidentUpsert) UpdateName() *IncidentUpsert
UpdateName sets the "Name" field to the value that was provided on create.
func (*IncidentUpsert) UpdateProbeHost ¶
func (u *IncidentUpsert) UpdateProbeHost() *IncidentUpsert
UpdateProbeHost sets the "ProbeHost" field to the value that was provided on create.
func (*IncidentUpsert) UpdateProbeOS ¶
func (u *IncidentUpsert) UpdateProbeOS() *IncidentUpsert
UpdateProbeOS sets the "ProbeOS" field to the value that was provided on create.
func (*IncidentUpsert) UpdateRegion ¶
func (u *IncidentUpsert) UpdateRegion() *IncidentUpsert
UpdateRegion sets the "Region" field to the value that was provided on create.
func (*IncidentUpsert) UpdateStart ¶
func (u *IncidentUpsert) UpdateStart() *IncidentUpsert
UpdateStart sets the "Start" field to the value that was provided on create.
func (*IncidentUpsert) UpdateState ¶
func (u *IncidentUpsert) UpdateState() *IncidentUpsert
UpdateState sets the "State" field to the value that was provided on create.
func (*IncidentUpsert) UpdateTime ¶
func (u *IncidentUpsert) UpdateTime() *IncidentUpsert
UpdateTime sets the "Time" field to the value that was provided on create.
func (*IncidentUpsert) UpdateUUID ¶
func (u *IncidentUpsert) UpdateUUID() *IncidentUpsert
UpdateUUID sets the "UUID" field to the value that was provided on create.
func (*IncidentUpsert) UpdateUsername ¶
func (u *IncidentUpsert) UpdateUsername() *IncidentUpsert
UpdateUsername sets the "Username" field to the value that was provided on create.
type IncidentUpsertBulk ¶
type IncidentUpsertBulk struct {
// contains filtered or unexported fields
}
IncidentUpsertBulk is the builder for "upsert"-ing a bulk of Incident nodes.
func (*IncidentUpsertBulk) AddIntLevel ¶
func (u *IncidentUpsertBulk) AddIntLevel(v int) *IncidentUpsertBulk
AddIntLevel adds v to the "IntLevel" field.
func (*IncidentUpsertBulk) ClearEnd ¶ added in v0.10.0
func (u *IncidentUpsertBulk) ClearEnd() *IncidentUpsertBulk
ClearEnd clears the value of the "End" field.
func (*IncidentUpsertBulk) ClearError ¶
func (u *IncidentUpsertBulk) ClearError() *IncidentUpsertBulk
ClearError clears the value of the "Error" field.
func (*IncidentUpsertBulk) ClearIncidentID ¶
func (u *IncidentUpsertBulk) ClearIncidentID() *IncidentUpsertBulk
ClearIncidentID clears the value of the "IncidentID" field.
func (*IncidentUpsertBulk) DoNothing ¶
func (u *IncidentUpsertBulk) DoNothing() *IncidentUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*IncidentUpsertBulk) Exec ¶
func (u *IncidentUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*IncidentUpsertBulk) ExecX ¶
func (u *IncidentUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IncidentUpsertBulk) Ignore ¶
func (u *IncidentUpsertBulk) Ignore() *IncidentUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Incident.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*IncidentUpsertBulk) SetEnd ¶
func (u *IncidentUpsertBulk) SetEnd(v time.Time) *IncidentUpsertBulk
SetEnd sets the "End" field.
func (*IncidentUpsertBulk) SetError ¶
func (u *IncidentUpsertBulk) SetError(v string) *IncidentUpsertBulk
SetError sets the "Error" field.
func (*IncidentUpsertBulk) SetIncidentID ¶
func (u *IncidentUpsertBulk) SetIncidentID(v uuid.UUID) *IncidentUpsertBulk
SetIncidentID sets the "IncidentID" field.
func (*IncidentUpsertBulk) SetIntLevel ¶
func (u *IncidentUpsertBulk) SetIntLevel(v int) *IncidentUpsertBulk
SetIntLevel sets the "IntLevel" field.
func (*IncidentUpsertBulk) SetName ¶
func (u *IncidentUpsertBulk) SetName(v string) *IncidentUpsertBulk
SetName sets the "Name" field.
func (*IncidentUpsertBulk) SetProbeHost ¶
func (u *IncidentUpsertBulk) SetProbeHost(v string) *IncidentUpsertBulk
SetProbeHost sets the "ProbeHost" field.
func (*IncidentUpsertBulk) SetProbeOS ¶
func (u *IncidentUpsertBulk) SetProbeOS(v string) *IncidentUpsertBulk
SetProbeOS sets the "ProbeOS" field.
func (*IncidentUpsertBulk) SetRegion ¶
func (u *IncidentUpsertBulk) SetRegion(v string) *IncidentUpsertBulk
SetRegion sets the "Region" field.
func (*IncidentUpsertBulk) SetStart ¶
func (u *IncidentUpsertBulk) SetStart(v time.Time) *IncidentUpsertBulk
SetStart sets the "Start" field.
func (*IncidentUpsertBulk) SetState ¶
func (u *IncidentUpsertBulk) SetState(v []byte) *IncidentUpsertBulk
SetState sets the "State" field.
func (*IncidentUpsertBulk) SetTime ¶
func (u *IncidentUpsertBulk) SetTime(v time.Time) *IncidentUpsertBulk
SetTime sets the "Time" field.
func (*IncidentUpsertBulk) SetUUID ¶
func (u *IncidentUpsertBulk) SetUUID(v uuid.UUID) *IncidentUpsertBulk
SetUUID sets the "UUID" field.
func (*IncidentUpsertBulk) SetUsername ¶
func (u *IncidentUpsertBulk) SetUsername(v string) *IncidentUpsertBulk
SetUsername sets the "Username" field.
func (*IncidentUpsertBulk) Update ¶
func (u *IncidentUpsertBulk) Update(set func(*IncidentUpsert)) *IncidentUpsertBulk
Update allows overriding fields `UPDATE` values. See the IncidentCreateBulk.OnConflict documentation for more info.
func (*IncidentUpsertBulk) UpdateEnd ¶
func (u *IncidentUpsertBulk) UpdateEnd() *IncidentUpsertBulk
UpdateEnd sets the "End" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateError ¶
func (u *IncidentUpsertBulk) UpdateError() *IncidentUpsertBulk
UpdateError sets the "Error" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateIncidentID ¶
func (u *IncidentUpsertBulk) UpdateIncidentID() *IncidentUpsertBulk
UpdateIncidentID sets the "IncidentID" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateIntLevel ¶
func (u *IncidentUpsertBulk) UpdateIntLevel() *IncidentUpsertBulk
UpdateIntLevel sets the "IntLevel" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateName ¶
func (u *IncidentUpsertBulk) UpdateName() *IncidentUpsertBulk
UpdateName sets the "Name" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateNewValues ¶
func (u *IncidentUpsertBulk) UpdateNewValues() *IncidentUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Incident.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*IncidentUpsertBulk) UpdateProbeHost ¶
func (u *IncidentUpsertBulk) UpdateProbeHost() *IncidentUpsertBulk
UpdateProbeHost sets the "ProbeHost" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateProbeOS ¶
func (u *IncidentUpsertBulk) UpdateProbeOS() *IncidentUpsertBulk
UpdateProbeOS sets the "ProbeOS" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateRegion ¶
func (u *IncidentUpsertBulk) UpdateRegion() *IncidentUpsertBulk
UpdateRegion sets the "Region" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateStart ¶
func (u *IncidentUpsertBulk) UpdateStart() *IncidentUpsertBulk
UpdateStart sets the "Start" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateState ¶
func (u *IncidentUpsertBulk) UpdateState() *IncidentUpsertBulk
UpdateState sets the "State" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateTime ¶
func (u *IncidentUpsertBulk) UpdateTime() *IncidentUpsertBulk
UpdateTime sets the "Time" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateUUID ¶
func (u *IncidentUpsertBulk) UpdateUUID() *IncidentUpsertBulk
UpdateUUID sets the "UUID" field to the value that was provided on create.
func (*IncidentUpsertBulk) UpdateUsername ¶
func (u *IncidentUpsertBulk) UpdateUsername() *IncidentUpsertBulk
UpdateUsername sets the "Username" field to the value that was provided on create.
type IncidentUpsertOne ¶
type IncidentUpsertOne struct {
// contains filtered or unexported fields
}
IncidentUpsertOne is the builder for "upsert"-ing
one Incident node.
func (*IncidentUpsertOne) AddIntLevel ¶
func (u *IncidentUpsertOne) AddIntLevel(v int) *IncidentUpsertOne
AddIntLevel adds v to the "IntLevel" field.
func (*IncidentUpsertOne) ClearEnd ¶ added in v0.10.0
func (u *IncidentUpsertOne) ClearEnd() *IncidentUpsertOne
ClearEnd clears the value of the "End" field.
func (*IncidentUpsertOne) ClearError ¶
func (u *IncidentUpsertOne) ClearError() *IncidentUpsertOne
ClearError clears the value of the "Error" field.
func (*IncidentUpsertOne) ClearIncidentID ¶
func (u *IncidentUpsertOne) ClearIncidentID() *IncidentUpsertOne
ClearIncidentID clears the value of the "IncidentID" field.
func (*IncidentUpsertOne) DoNothing ¶
func (u *IncidentUpsertOne) DoNothing() *IncidentUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*IncidentUpsertOne) Exec ¶
func (u *IncidentUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*IncidentUpsertOne) ExecX ¶
func (u *IncidentUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*IncidentUpsertOne) ID ¶
func (u *IncidentUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*IncidentUpsertOne) IDX ¶
func (u *IncidentUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*IncidentUpsertOne) Ignore ¶
func (u *IncidentUpsertOne) Ignore() *IncidentUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Incident.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*IncidentUpsertOne) SetEnd ¶
func (u *IncidentUpsertOne) SetEnd(v time.Time) *IncidentUpsertOne
SetEnd sets the "End" field.
func (*IncidentUpsertOne) SetError ¶
func (u *IncidentUpsertOne) SetError(v string) *IncidentUpsertOne
SetError sets the "Error" field.
func (*IncidentUpsertOne) SetIncidentID ¶
func (u *IncidentUpsertOne) SetIncidentID(v uuid.UUID) *IncidentUpsertOne
SetIncidentID sets the "IncidentID" field.
func (*IncidentUpsertOne) SetIntLevel ¶
func (u *IncidentUpsertOne) SetIntLevel(v int) *IncidentUpsertOne
SetIntLevel sets the "IntLevel" field.
func (*IncidentUpsertOne) SetName ¶
func (u *IncidentUpsertOne) SetName(v string) *IncidentUpsertOne
SetName sets the "Name" field.
func (*IncidentUpsertOne) SetProbeHost ¶
func (u *IncidentUpsertOne) SetProbeHost(v string) *IncidentUpsertOne
SetProbeHost sets the "ProbeHost" field.
func (*IncidentUpsertOne) SetProbeOS ¶
func (u *IncidentUpsertOne) SetProbeOS(v string) *IncidentUpsertOne
SetProbeOS sets the "ProbeOS" field.
func (*IncidentUpsertOne) SetRegion ¶
func (u *IncidentUpsertOne) SetRegion(v string) *IncidentUpsertOne
SetRegion sets the "Region" field.
func (*IncidentUpsertOne) SetStart ¶
func (u *IncidentUpsertOne) SetStart(v time.Time) *IncidentUpsertOne
SetStart sets the "Start" field.
func (*IncidentUpsertOne) SetState ¶
func (u *IncidentUpsertOne) SetState(v []byte) *IncidentUpsertOne
SetState sets the "State" field.
func (*IncidentUpsertOne) SetTime ¶
func (u *IncidentUpsertOne) SetTime(v time.Time) *IncidentUpsertOne
SetTime sets the "Time" field.
func (*IncidentUpsertOne) SetUUID ¶
func (u *IncidentUpsertOne) SetUUID(v uuid.UUID) *IncidentUpsertOne
SetUUID sets the "UUID" field.
func (*IncidentUpsertOne) SetUsername ¶
func (u *IncidentUpsertOne) SetUsername(v string) *IncidentUpsertOne
SetUsername sets the "Username" field.
func (*IncidentUpsertOne) Update ¶
func (u *IncidentUpsertOne) Update(set func(*IncidentUpsert)) *IncidentUpsertOne
Update allows overriding fields `UPDATE` values. See the IncidentCreate.OnConflict documentation for more info.
func (*IncidentUpsertOne) UpdateEnd ¶
func (u *IncidentUpsertOne) UpdateEnd() *IncidentUpsertOne
UpdateEnd sets the "End" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateError ¶
func (u *IncidentUpsertOne) UpdateError() *IncidentUpsertOne
UpdateError sets the "Error" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateIncidentID ¶
func (u *IncidentUpsertOne) UpdateIncidentID() *IncidentUpsertOne
UpdateIncidentID sets the "IncidentID" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateIntLevel ¶
func (u *IncidentUpsertOne) UpdateIntLevel() *IncidentUpsertOne
UpdateIntLevel sets the "IntLevel" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateName ¶
func (u *IncidentUpsertOne) UpdateName() *IncidentUpsertOne
UpdateName sets the "Name" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateNewValues ¶
func (u *IncidentUpsertOne) UpdateNewValues() *IncidentUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Incident.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*IncidentUpsertOne) UpdateProbeHost ¶
func (u *IncidentUpsertOne) UpdateProbeHost() *IncidentUpsertOne
UpdateProbeHost sets the "ProbeHost" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateProbeOS ¶
func (u *IncidentUpsertOne) UpdateProbeOS() *IncidentUpsertOne
UpdateProbeOS sets the "ProbeOS" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateRegion ¶
func (u *IncidentUpsertOne) UpdateRegion() *IncidentUpsertOne
UpdateRegion sets the "Region" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateStart ¶
func (u *IncidentUpsertOne) UpdateStart() *IncidentUpsertOne
UpdateStart sets the "Start" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateState ¶
func (u *IncidentUpsertOne) UpdateState() *IncidentUpsertOne
UpdateState sets the "State" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateTime ¶
func (u *IncidentUpsertOne) UpdateTime() *IncidentUpsertOne
UpdateTime sets the "Time" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateUUID ¶
func (u *IncidentUpsertOne) UpdateUUID() *IncidentUpsertOne
UpdateUUID sets the "UUID" field to the value that was provided on create.
func (*IncidentUpsertOne) UpdateUsername ¶
func (u *IncidentUpsertOne) UpdateUsername() *IncidentUpsertOne
UpdateUsername sets the "Username" field to the value that was provided on create.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct { ID int `json:"id,omitempty"` // node id. Type string `json:"type,omitempty"` // node type. Fields []*Field `json:"fields,omitempty"` // node fields. Edges []*Edge `json:"edges,omitempty"` // node edges. }
Node in the graph.
type NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
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 OrderDirection ¶
type OrderDirection string
OrderDirection defines the directions in which to order a list of items.
const ( // OrderDirectionAsc specifies an ascending order. OrderDirectionAsc OrderDirection = "ASC" // OrderDirectionDesc specifies a descending order. OrderDirectionDesc OrderDirection = "DESC" )
func (OrderDirection) MarshalGQL ¶
func (o OrderDirection) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (OrderDirection) String ¶
func (o OrderDirection) String() string
String implements fmt.Stringer interface.
func (*OrderDirection) UnmarshalGQL ¶
func (o *OrderDirection) UnmarshalGQL(val interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
func (OrderDirection) Validate ¶
func (o OrderDirection) Validate() error
Validate the order direction value.
type PageInfo ¶
type PageInfo struct { HasNextPage bool `json:"hasNextPage"` HasPreviousPage bool `json:"hasPreviousPage"` StartCursor *Cursor `json:"startCursor"` EndCursor *Cursor `json:"endCursor"` }
PageInfo of a connection type.
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 Status ¶
type Status struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "Name" field. Name string `json:"Name,omitempty"` // Value holds the value of the "Value" field. Value string `json:"Value,omitempty"` // contains filtered or unexported fields }
Status is the model entity for the Status schema.
func (*Status) ToEdge ¶
func (s *Status) ToEdge(order *StatusOrder) *StatusEdge
ToEdge converts Status into StatusEdge.
func (*Status) Unwrap ¶
Unwrap unwraps the Status 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 (*Status) Update ¶
func (s *Status) Update() *StatusUpdateOne
Update returns a builder for updating this Status. Note that you need to call Status.Unwrap() before calling this method if this Status was returned from a transaction, and the transaction was committed or rolled back.
type StatusClient ¶
type StatusClient struct {
// contains filtered or unexported fields
}
StatusClient is a client for the Status schema.
func NewStatusClient ¶
func NewStatusClient(c config) *StatusClient
NewStatusClient returns a client for the Status from the given config.
func (*StatusClient) Create ¶
func (c *StatusClient) Create() *StatusCreate
Create returns a builder for creating a Status entity.
func (*StatusClient) CreateBulk ¶
func (c *StatusClient) CreateBulk(builders ...*StatusCreate) *StatusCreateBulk
CreateBulk returns a builder for creating a bulk of Status entities.
func (*StatusClient) Delete ¶
func (c *StatusClient) Delete() *StatusDelete
Delete returns a delete builder for Status.
func (*StatusClient) DeleteOne ¶
func (c *StatusClient) DeleteOne(s *Status) *StatusDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StatusClient) DeleteOneID ¶
func (c *StatusClient) DeleteOneID(id int) *StatusDeleteOne
DeleteOne returns a builder for deleting the given entity by its id.
func (*StatusClient) GetX ¶
func (c *StatusClient) GetX(ctx context.Context, id int) *Status
GetX is like Get, but panics if an error occurs.
func (*StatusClient) Query ¶
func (c *StatusClient) Query() *StatusQuery
Query returns a query builder for Status.
func (*StatusClient) Update ¶
func (c *StatusClient) Update() *StatusUpdate
Update returns an update builder for Status.
func (*StatusClient) UpdateOne ¶
func (c *StatusClient) UpdateOne(s *Status) *StatusUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StatusClient) UpdateOneID ¶
func (c *StatusClient) UpdateOneID(id int) *StatusUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StatusClient) Use ¶
func (c *StatusClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `status.Hooks(f(g(h())))`.
type StatusConnection ¶
type StatusConnection struct { Edges []*StatusEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
StatusConnection is the connection containing edges to Status.
type StatusCreate ¶
type StatusCreate struct {
// contains filtered or unexported fields
}
StatusCreate is the builder for creating a Status entity.
func (*StatusCreate) Exec ¶
func (sc *StatusCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusCreate) ExecX ¶
func (sc *StatusCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusCreate) Mutation ¶
func (sc *StatusCreate) Mutation() *StatusMutation
Mutation returns the StatusMutation object of the builder.
func (*StatusCreate) OnConflict ¶
func (sc *StatusCreate) OnConflict(opts ...sql.ConflictOption) *StatusUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Status.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.StatusUpsert) { SetName(v+v). }). Exec(ctx)
func (*StatusCreate) OnConflictColumns ¶
func (sc *StatusCreate) OnConflictColumns(columns ...string) *StatusUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Status.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*StatusCreate) Save ¶
func (sc *StatusCreate) Save(ctx context.Context) (*Status, error)
Save creates the Status in the database.
func (*StatusCreate) SaveX ¶
func (sc *StatusCreate) SaveX(ctx context.Context) *Status
SaveX calls Save and panics if Save returns an error.
func (*StatusCreate) SetName ¶
func (sc *StatusCreate) SetName(s string) *StatusCreate
SetName sets the "Name" field.
func (*StatusCreate) SetValue ¶
func (sc *StatusCreate) SetValue(s string) *StatusCreate
SetValue sets the "Value" field.
type StatusCreateBulk ¶
type StatusCreateBulk struct {
// contains filtered or unexported fields
}
StatusCreateBulk is the builder for creating many Status entities in bulk.
func (*StatusCreateBulk) Exec ¶
func (scb *StatusCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusCreateBulk) ExecX ¶
func (scb *StatusCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusCreateBulk) OnConflict ¶
func (scb *StatusCreateBulk) OnConflict(opts ...sql.ConflictOption) *StatusUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Status.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.StatusUpsert) { SetName(v+v). }). Exec(ctx)
func (*StatusCreateBulk) OnConflictColumns ¶
func (scb *StatusCreateBulk) OnConflictColumns(columns ...string) *StatusUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Status.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type StatusDelete ¶
type StatusDelete struct {
// contains filtered or unexported fields
}
StatusDelete is the builder for deleting a Status entity.
func (*StatusDelete) Exec ¶
func (sd *StatusDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StatusDelete) ExecX ¶
func (sd *StatusDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StatusDelete) Where ¶
func (sd *StatusDelete) Where(ps ...predicate.Status) *StatusDelete
Where appends a list predicates to the StatusDelete builder.
type StatusDeleteOne ¶
type StatusDeleteOne struct {
// contains filtered or unexported fields
}
StatusDeleteOne is the builder for deleting a single Status entity.
func (*StatusDeleteOne) Exec ¶
func (sdo *StatusDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StatusDeleteOne) ExecX ¶
func (sdo *StatusDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type StatusEdge ¶
StatusEdge is the edge representation of Status.
type StatusGroupBy ¶
type StatusGroupBy struct {
// contains filtered or unexported fields
}
StatusGroupBy is the group-by builder for Status entities.
func (*StatusGroupBy) Aggregate ¶
func (sgb *StatusGroupBy) Aggregate(fns ...AggregateFunc) *StatusGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StatusGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StatusGroupBy) Scan ¶
func (sgb *StatusGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*StatusGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StatusMutation ¶
type StatusMutation struct {
// contains filtered or unexported fields
}
StatusMutation represents an operation that mutates the Status nodes in the graph.
func (*StatusMutation) AddField ¶
func (m *StatusMutation) 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 (*StatusMutation) AddedEdges ¶
func (m *StatusMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StatusMutation) AddedField ¶
func (m *StatusMutation) 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 (*StatusMutation) AddedFields ¶
func (m *StatusMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StatusMutation) AddedIDs ¶
func (m *StatusMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StatusMutation) ClearEdge ¶
func (m *StatusMutation) 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 (*StatusMutation) ClearField ¶
func (m *StatusMutation) 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 (*StatusMutation) ClearedEdges ¶
func (m *StatusMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StatusMutation) ClearedFields ¶
func (m *StatusMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StatusMutation) Client ¶
func (m StatusMutation) 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 (*StatusMutation) EdgeCleared ¶
func (m *StatusMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StatusMutation) Field ¶
func (m *StatusMutation) 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 (*StatusMutation) FieldCleared ¶
func (m *StatusMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StatusMutation) Fields ¶
func (m *StatusMutation) 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 (*StatusMutation) ID ¶
func (m *StatusMutation) 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 (*StatusMutation) IDs ¶
func (m *StatusMutation) 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 (*StatusMutation) Name ¶
func (m *StatusMutation) Name() (r string, exists bool)
Name returns the value of the "Name" field in the mutation.
func (*StatusMutation) 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 (*StatusMutation) OldName ¶
func (m *StatusMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "Name" field's value of the Status entity. If the Status 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 (*StatusMutation) OldValue ¶
func (m *StatusMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "Value" field's value of the Status entity. If the Status 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 (*StatusMutation) RemovedEdges ¶
func (m *StatusMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StatusMutation) RemovedIDs ¶
func (m *StatusMutation) 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 (*StatusMutation) ResetEdge ¶
func (m *StatusMutation) 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 (*StatusMutation) ResetField ¶
func (m *StatusMutation) 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 (*StatusMutation) ResetName ¶
func (m *StatusMutation) ResetName()
ResetName resets all changes to the "Name" field.
func (*StatusMutation) ResetValue ¶
func (m *StatusMutation) ResetValue()
ResetValue resets all changes to the "Value" field.
func (*StatusMutation) SetField ¶
func (m *StatusMutation) 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 (*StatusMutation) SetName ¶
func (m *StatusMutation) SetName(s string)
SetName sets the "Name" field.
func (*StatusMutation) SetValue ¶
func (m *StatusMutation) SetValue(s string)
SetValue sets the "Value" field.
func (StatusMutation) Tx ¶
func (m StatusMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StatusMutation) Type ¶
func (m *StatusMutation) Type() string
Type returns the node type of this mutation (Status).
func (*StatusMutation) Value ¶
func (m *StatusMutation) Value() (r string, exists bool)
Value returns the value of the "Value" field in the mutation.
func (*StatusMutation) Where ¶
func (m *StatusMutation) Where(ps ...predicate.Status)
Where appends a list predicates to the StatusMutation builder.
type StatusOrder ¶
type StatusOrder struct { Direction OrderDirection `json:"direction"` Field *StatusOrderField `json:"field"` }
StatusOrder defines the ordering of Status.
type StatusOrderField ¶
type StatusOrderField struct {
// contains filtered or unexported fields
}
StatusOrderField defines the ordering field of Status.
type StatusPaginateOption ¶
type StatusPaginateOption func(*statusPager) error
StatusPaginateOption enables pagination customization.
func WithStatusFilter ¶
func WithStatusFilter(filter func(*StatusQuery) (*StatusQuery, error)) StatusPaginateOption
WithStatusFilter configures pagination filter.
func WithStatusOrder ¶
func WithStatusOrder(order *StatusOrder) StatusPaginateOption
WithStatusOrder configures pagination ordering.
type StatusQuery ¶
type StatusQuery struct {
// contains filtered or unexported fields
}
StatusQuery is the builder for querying Status entities.
func (*StatusQuery) All ¶
func (sq *StatusQuery) All(ctx context.Context) ([]*Status, error)
All executes the query and returns a list of StatusSlice.
func (*StatusQuery) AllX ¶
func (sq *StatusQuery) AllX(ctx context.Context) []*Status
AllX is like All, but panics if an error occurs.
func (*StatusQuery) Clone ¶
func (sq *StatusQuery) Clone() *StatusQuery
Clone returns a duplicate of the StatusQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StatusQuery) CollectFields ¶
func (s *StatusQuery) CollectFields(ctx context.Context, satisfies ...string) (*StatusQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*StatusQuery) Count ¶
func (sq *StatusQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StatusQuery) CountX ¶
func (sq *StatusQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StatusQuery) Exist ¶
func (sq *StatusQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StatusQuery) ExistX ¶
func (sq *StatusQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StatusQuery) First ¶
func (sq *StatusQuery) First(ctx context.Context) (*Status, error)
First returns the first Status entity from the query. Returns a *NotFoundError when no Status was found.
func (*StatusQuery) FirstID ¶
func (sq *StatusQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Status ID from the query. Returns a *NotFoundError when no Status ID was found.
func (*StatusQuery) FirstIDX ¶
func (sq *StatusQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*StatusQuery) FirstX ¶
func (sq *StatusQuery) FirstX(ctx context.Context) *Status
FirstX is like First, but panics if an error occurs.
func (*StatusQuery) GroupBy ¶
func (sq *StatusQuery) GroupBy(field string, fields ...string) *StatusGroupBy
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 { Name string `json:"Name,omitempty"` Count int `json:"count,omitempty"` } client.Status.Query(). GroupBy(status.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*StatusQuery) IDs ¶
func (sq *StatusQuery) IDs(ctx context.Context) ([]int, error)
IDs executes the query and returns a list of Status IDs.
func (*StatusQuery) IDsX ¶
func (sq *StatusQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*StatusQuery) Limit ¶
func (sq *StatusQuery) Limit(limit int) *StatusQuery
Limit adds a limit step to the query.
func (*StatusQuery) Offset ¶
func (sq *StatusQuery) Offset(offset int) *StatusQuery
Offset adds an offset step to the query.
func (*StatusQuery) Only ¶
func (sq *StatusQuery) Only(ctx context.Context) (*Status, error)
Only returns a single Status entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Status entity is found. Returns a *NotFoundError when no Status entities are found.
func (*StatusQuery) OnlyID ¶
func (sq *StatusQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Status ID in the query. Returns a *NotSingularError when more than one Status ID is found. Returns a *NotFoundError when no entities are found.
func (*StatusQuery) OnlyIDX ¶
func (sq *StatusQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StatusQuery) OnlyX ¶
func (sq *StatusQuery) OnlyX(ctx context.Context) *Status
OnlyX is like Only, but panics if an error occurs.
func (*StatusQuery) Order ¶
func (sq *StatusQuery) Order(o ...OrderFunc) *StatusQuery
Order adds an order step to the query.
func (*StatusQuery) Paginate ¶
func (s *StatusQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...StatusPaginateOption, ) (*StatusConnection, error)
Paginate executes the query and returns a relay based cursor connection to Status.
func (*StatusQuery) Select ¶
func (sq *StatusQuery) Select(fields ...string) *StatusSelect
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 { Name string `json:"Name,omitempty"` } client.Status.Query(). Select(status.FieldName). Scan(ctx, &v)
func (*StatusQuery) Unique ¶
func (sq *StatusQuery) Unique(unique bool) *StatusQuery
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 (*StatusQuery) Where ¶
func (sq *StatusQuery) Where(ps ...predicate.Status) *StatusQuery
Where adds a new predicate for the StatusQuery builder.
type StatusSelect ¶
type StatusSelect struct { *StatusQuery // contains filtered or unexported fields }
StatusSelect is the builder for selecting fields of Status entities.
func (*StatusSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StatusSelect) Scan ¶
func (ss *StatusSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StatusSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StatusUpdate ¶
type StatusUpdate struct {
// contains filtered or unexported fields
}
StatusUpdate is the builder for updating Status entities.
func (*StatusUpdate) Exec ¶
func (su *StatusUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusUpdate) ExecX ¶
func (su *StatusUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusUpdate) Mutation ¶
func (su *StatusUpdate) Mutation() *StatusMutation
Mutation returns the StatusMutation object of the builder.
func (*StatusUpdate) Save ¶
func (su *StatusUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StatusUpdate) SaveX ¶
func (su *StatusUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StatusUpdate) SetName ¶
func (su *StatusUpdate) SetName(s string) *StatusUpdate
SetName sets the "Name" field.
func (*StatusUpdate) SetValue ¶
func (su *StatusUpdate) SetValue(s string) *StatusUpdate
SetValue sets the "Value" field.
func (*StatusUpdate) Where ¶
func (su *StatusUpdate) Where(ps ...predicate.Status) *StatusUpdate
Where appends a list predicates to the StatusUpdate builder.
type StatusUpdateOne ¶
type StatusUpdateOne struct {
// contains filtered or unexported fields
}
StatusUpdateOne is the builder for updating a single Status entity.
func (*StatusUpdateOne) Exec ¶
func (suo *StatusUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StatusUpdateOne) ExecX ¶
func (suo *StatusUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusUpdateOne) Mutation ¶
func (suo *StatusUpdateOne) Mutation() *StatusMutation
Mutation returns the StatusMutation object of the builder.
func (*StatusUpdateOne) Save ¶
func (suo *StatusUpdateOne) Save(ctx context.Context) (*Status, error)
Save executes the query and returns the updated Status entity.
func (*StatusUpdateOne) SaveX ¶
func (suo *StatusUpdateOne) SaveX(ctx context.Context) *Status
SaveX is like Save, but panics if an error occurs.
func (*StatusUpdateOne) Select ¶
func (suo *StatusUpdateOne) Select(field string, fields ...string) *StatusUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StatusUpdateOne) SetName ¶
func (suo *StatusUpdateOne) SetName(s string) *StatusUpdateOne
SetName sets the "Name" field.
func (*StatusUpdateOne) SetValue ¶
func (suo *StatusUpdateOne) SetValue(s string) *StatusUpdateOne
SetValue sets the "Value" field.
type StatusUpsert ¶
StatusUpsert is the "OnConflict" setter.
func (*StatusUpsert) SetName ¶
func (u *StatusUpsert) SetName(v string) *StatusUpsert
SetName sets the "Name" field.
func (*StatusUpsert) SetValue ¶
func (u *StatusUpsert) SetValue(v string) *StatusUpsert
SetValue sets the "Value" field.
func (*StatusUpsert) UpdateName ¶
func (u *StatusUpsert) UpdateName() *StatusUpsert
UpdateName sets the "Name" field to the value that was provided on create.
func (*StatusUpsert) UpdateValue ¶
func (u *StatusUpsert) UpdateValue() *StatusUpsert
UpdateValue sets the "Value" field to the value that was provided on create.
type StatusUpsertBulk ¶
type StatusUpsertBulk struct {
// contains filtered or unexported fields
}
StatusUpsertBulk is the builder for "upsert"-ing a bulk of Status nodes.
func (*StatusUpsertBulk) DoNothing ¶
func (u *StatusUpsertBulk) DoNothing() *StatusUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*StatusUpsertBulk) Exec ¶
func (u *StatusUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusUpsertBulk) ExecX ¶
func (u *StatusUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusUpsertBulk) Ignore ¶
func (u *StatusUpsertBulk) Ignore() *StatusUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Status.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*StatusUpsertBulk) SetName ¶
func (u *StatusUpsertBulk) SetName(v string) *StatusUpsertBulk
SetName sets the "Name" field.
func (*StatusUpsertBulk) SetValue ¶
func (u *StatusUpsertBulk) SetValue(v string) *StatusUpsertBulk
SetValue sets the "Value" field.
func (*StatusUpsertBulk) Update ¶
func (u *StatusUpsertBulk) Update(set func(*StatusUpsert)) *StatusUpsertBulk
Update allows overriding fields `UPDATE` values. See the StatusCreateBulk.OnConflict documentation for more info.
func (*StatusUpsertBulk) UpdateName ¶
func (u *StatusUpsertBulk) UpdateName() *StatusUpsertBulk
UpdateName sets the "Name" field to the value that was provided on create.
func (*StatusUpsertBulk) UpdateNewValues ¶
func (u *StatusUpsertBulk) UpdateNewValues() *StatusUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Status.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*StatusUpsertBulk) UpdateValue ¶
func (u *StatusUpsertBulk) UpdateValue() *StatusUpsertBulk
UpdateValue sets the "Value" field to the value that was provided on create.
type StatusUpsertOne ¶
type StatusUpsertOne struct {
// contains filtered or unexported fields
}
StatusUpsertOne is the builder for "upsert"-ing
one Status node.
func (*StatusUpsertOne) DoNothing ¶
func (u *StatusUpsertOne) DoNothing() *StatusUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*StatusUpsertOne) Exec ¶
func (u *StatusUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*StatusUpsertOne) ExecX ¶
func (u *StatusUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StatusUpsertOne) ID ¶
func (u *StatusUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*StatusUpsertOne) IDX ¶
func (u *StatusUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*StatusUpsertOne) Ignore ¶
func (u *StatusUpsertOne) Ignore() *StatusUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Status.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*StatusUpsertOne) SetName ¶
func (u *StatusUpsertOne) SetName(v string) *StatusUpsertOne
SetName sets the "Name" field.
func (*StatusUpsertOne) SetValue ¶
func (u *StatusUpsertOne) SetValue(v string) *StatusUpsertOne
SetValue sets the "Value" field.
func (*StatusUpsertOne) Update ¶
func (u *StatusUpsertOne) Update(set func(*StatusUpsert)) *StatusUpsertOne
Update allows overriding fields `UPDATE` values. See the StatusCreate.OnConflict documentation for more info.
func (*StatusUpsertOne) UpdateName ¶
func (u *StatusUpsertOne) UpdateName() *StatusUpsertOne
UpdateName sets the "Name" field to the value that was provided on create.
func (*StatusUpsertOne) UpdateNewValues ¶
func (u *StatusUpsertOne) UpdateNewValues() *StatusUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Status.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*StatusUpsertOne) UpdateValue ¶
func (u *StatusUpsertOne) UpdateValue() *StatusUpsertOne
UpdateValue sets the "Value" field to the value that was provided on create.
type Tx ¶
type Tx struct { // Alert is the client for interacting with the Alert builders. Alert *AlertClient // Counter is the client for interacting with the Counter builders. Counter *CounterClient // Failure is the client for interacting with the Failure builders. Failure *FailureClient // File is the client for interacting with the File builders. File *FileClient // Incident is the client for interacting with the Incident builders. Incident *IncidentClient // Status is the client for interacting with the Status builders. Status *StatusClient // 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_custom.go
- alert_delete.go
- alert_query.go
- alert_update.go
- client.go
- config.go
- context.go
- counter.go
- counter_create.go
- counter_delete.go
- counter_query.go
- counter_update.go
- ent.go
- failure.go
- failure_create.go
- failure_delete.go
- failure_query.go
- failure_update.go
- file.go
- file_create.go
- file_custom.go
- file_delete.go
- file_query.go
- file_update.go
- gql_collection.go
- gql_edge.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- incident.go
- incident_create.go
- incident_custom.go
- incident_delete.go
- incident_query.go
- incident_update.go
- mutation.go
- runtime.go
- status.go
- status_create.go
- status_delete.go
- status_query.go
- status_update.go
- tx.go