Documentation
¶
Index ¶
- Constants
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type AggregateFunc
- type AlertChannel
- type AlertChannelClient
- func (c *AlertChannelClient) Create() *AlertChannelCreate
- func (c *AlertChannelClient) CreateBulk(builders ...*AlertChannelCreate) *AlertChannelCreateBulk
- func (c *AlertChannelClient) Delete() *AlertChannelDelete
- func (c *AlertChannelClient) DeleteOne(ac *AlertChannel) *AlertChannelDeleteOne
- func (c *AlertChannelClient) DeleteOneID(id string) *AlertChannelDeleteOne
- func (c *AlertChannelClient) Get(ctx context.Context, id string) (*AlertChannel, error)
- func (c *AlertChannelClient) GetX(ctx context.Context, id string) *AlertChannel
- func (c *AlertChannelClient) Hooks() []Hook
- func (c *AlertChannelClient) Query() *AlertChannelQuery
- func (c *AlertChannelClient) QueryMonitors(ac *AlertChannel) *MonitorQuery
- func (c *AlertChannelClient) Update() *AlertChannelUpdate
- func (c *AlertChannelClient) UpdateOne(ac *AlertChannel) *AlertChannelUpdateOne
- func (c *AlertChannelClient) UpdateOneID(id string) *AlertChannelUpdateOne
- func (c *AlertChannelClient) Use(hooks ...Hook)
- type AlertChannelCreate
- func (acc *AlertChannelCreate) AddMonitorIDs(ids ...string) *AlertChannelCreate
- func (acc *AlertChannelCreate) AddMonitors(m ...*Monitor) *AlertChannelCreate
- func (acc *AlertChannelCreate) Exec(ctx context.Context) error
- func (acc *AlertChannelCreate) ExecX(ctx context.Context)
- func (acc *AlertChannelCreate) Mutation() *AlertChannelMutation
- func (acc *AlertChannelCreate) Save(ctx context.Context) (*AlertChannel, error)
- func (acc *AlertChannelCreate) SaveX(ctx context.Context) *AlertChannel
- func (acc *AlertChannelCreate) SetAlertChannelType(s string) *AlertChannelCreate
- func (acc *AlertChannelCreate) SetConfig(m map[string]interface{}) *AlertChannelCreate
- func (acc *AlertChannelCreate) SetCreatedAt(t time.Time) *AlertChannelCreate
- func (acc *AlertChannelCreate) SetID(s string) *AlertChannelCreate
- func (acc *AlertChannelCreate) SetNillableCreatedAt(t *time.Time) *AlertChannelCreate
- func (acc *AlertChannelCreate) SetNillableUpdatedAt(t *time.Time) *AlertChannelCreate
- func (acc *AlertChannelCreate) SetUpdatedAt(t time.Time) *AlertChannelCreate
- type AlertChannelCreateBulk
- type AlertChannelDelete
- type AlertChannelDeleteOne
- type AlertChannelEdges
- type AlertChannelGroupBy
- func (acgb *AlertChannelGroupBy) Aggregate(fns ...AggregateFunc) *AlertChannelGroupBy
- func (s *AlertChannelGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlertChannelGroupBy) BoolX(ctx context.Context) bool
- func (s *AlertChannelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AlertChannelGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AlertChannelGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlertChannelGroupBy) Float64X(ctx context.Context) float64
- func (s *AlertChannelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlertChannelGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AlertChannelGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AlertChannelGroupBy) IntX(ctx context.Context) int
- func (s *AlertChannelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AlertChannelGroupBy) IntsX(ctx context.Context) []int
- func (acgb *AlertChannelGroupBy) Scan(ctx context.Context, v any) error
- func (s *AlertChannelGroupBy) ScanX(ctx context.Context, v any)
- func (s *AlertChannelGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AlertChannelGroupBy) StringX(ctx context.Context) string
- func (s *AlertChannelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AlertChannelGroupBy) StringsX(ctx context.Context) []string
- type AlertChannelMutation
- func (m *AlertChannelMutation) AddField(name string, value ent.Value) error
- func (m *AlertChannelMutation) AddMonitorIDs(ids ...string)
- func (m *AlertChannelMutation) AddedEdges() []string
- func (m *AlertChannelMutation) AddedField(name string) (ent.Value, bool)
- func (m *AlertChannelMutation) AddedFields() []string
- func (m *AlertChannelMutation) AddedIDs(name string) []ent.Value
- func (m *AlertChannelMutation) AlertChannelType() (r string, exists bool)
- func (m *AlertChannelMutation) ClearEdge(name string) error
- func (m *AlertChannelMutation) ClearField(name string) error
- func (m *AlertChannelMutation) ClearMonitors()
- func (m *AlertChannelMutation) ClearedEdges() []string
- func (m *AlertChannelMutation) ClearedFields() []string
- func (m AlertChannelMutation) Client() *Client
- func (m *AlertChannelMutation) Config() (r map[string]interface{}, exists bool)
- func (m *AlertChannelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AlertChannelMutation) EdgeCleared(name string) bool
- func (m *AlertChannelMutation) Field(name string) (ent.Value, bool)
- func (m *AlertChannelMutation) FieldCleared(name string) bool
- func (m *AlertChannelMutation) Fields() []string
- func (m *AlertChannelMutation) ID() (id string, exists bool)
- func (m *AlertChannelMutation) IDs(ctx context.Context) ([]string, error)
- func (m *AlertChannelMutation) MonitorsCleared() bool
- func (m *AlertChannelMutation) MonitorsIDs() (ids []string)
- func (m *AlertChannelMutation) OldAlertChannelType(ctx context.Context) (v string, err error)
- func (m *AlertChannelMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
- func (m *AlertChannelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AlertChannelMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AlertChannelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AlertChannelMutation) Op() Op
- func (m *AlertChannelMutation) RemoveMonitorIDs(ids ...string)
- func (m *AlertChannelMutation) RemovedEdges() []string
- func (m *AlertChannelMutation) RemovedIDs(name string) []ent.Value
- func (m *AlertChannelMutation) RemovedMonitorsIDs() (ids []string)
- func (m *AlertChannelMutation) ResetAlertChannelType()
- func (m *AlertChannelMutation) ResetConfig()
- func (m *AlertChannelMutation) ResetCreatedAt()
- func (m *AlertChannelMutation) ResetEdge(name string) error
- func (m *AlertChannelMutation) ResetField(name string) error
- func (m *AlertChannelMutation) ResetMonitors()
- func (m *AlertChannelMutation) ResetUpdatedAt()
- func (m *AlertChannelMutation) SetAlertChannelType(s string)
- func (m *AlertChannelMutation) SetConfig(value map[string]interface{})
- func (m *AlertChannelMutation) SetCreatedAt(t time.Time)
- func (m *AlertChannelMutation) SetField(name string, value ent.Value) error
- func (m *AlertChannelMutation) SetID(id string)
- func (m *AlertChannelMutation) SetUpdatedAt(t time.Time)
- func (m AlertChannelMutation) Tx() (*Tx, error)
- func (m *AlertChannelMutation) Type() string
- func (m *AlertChannelMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AlertChannelMutation) Where(ps ...predicate.AlertChannel)
- type AlertChannelQuery
- func (acq *AlertChannelQuery) Aggregate(fns ...AggregateFunc) *AlertChannelSelect
- func (acq *AlertChannelQuery) All(ctx context.Context) ([]*AlertChannel, error)
- func (acq *AlertChannelQuery) AllX(ctx context.Context) []*AlertChannel
- func (acq *AlertChannelQuery) Clone() *AlertChannelQuery
- func (acq *AlertChannelQuery) Count(ctx context.Context) (int, error)
- func (acq *AlertChannelQuery) CountX(ctx context.Context) int
- func (acq *AlertChannelQuery) Exist(ctx context.Context) (bool, error)
- func (acq *AlertChannelQuery) ExistX(ctx context.Context) bool
- func (acq *AlertChannelQuery) First(ctx context.Context) (*AlertChannel, error)
- func (acq *AlertChannelQuery) FirstID(ctx context.Context) (id string, err error)
- func (acq *AlertChannelQuery) FirstIDX(ctx context.Context) string
- func (acq *AlertChannelQuery) FirstX(ctx context.Context) *AlertChannel
- func (acq *AlertChannelQuery) GroupBy(field string, fields ...string) *AlertChannelGroupBy
- func (acq *AlertChannelQuery) IDs(ctx context.Context) ([]string, error)
- func (acq *AlertChannelQuery) IDsX(ctx context.Context) []string
- func (acq *AlertChannelQuery) Limit(limit int) *AlertChannelQuery
- func (acq *AlertChannelQuery) Offset(offset int) *AlertChannelQuery
- func (acq *AlertChannelQuery) Only(ctx context.Context) (*AlertChannel, error)
- func (acq *AlertChannelQuery) OnlyID(ctx context.Context) (id string, err error)
- func (acq *AlertChannelQuery) OnlyIDX(ctx context.Context) string
- func (acq *AlertChannelQuery) OnlyX(ctx context.Context) *AlertChannel
- func (acq *AlertChannelQuery) Order(o ...OrderFunc) *AlertChannelQuery
- func (acq *AlertChannelQuery) QueryMonitors() *MonitorQuery
- func (acq *AlertChannelQuery) Select(fields ...string) *AlertChannelSelect
- func (acq *AlertChannelQuery) Unique(unique bool) *AlertChannelQuery
- func (acq *AlertChannelQuery) Where(ps ...predicate.AlertChannel) *AlertChannelQuery
- func (acq *AlertChannelQuery) WithMonitors(opts ...func(*MonitorQuery)) *AlertChannelQuery
- type AlertChannelSelect
- func (acs *AlertChannelSelect) Aggregate(fns ...AggregateFunc) *AlertChannelSelect
- func (s *AlertChannelSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AlertChannelSelect) BoolX(ctx context.Context) bool
- func (s *AlertChannelSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AlertChannelSelect) BoolsX(ctx context.Context) []bool
- func (s *AlertChannelSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AlertChannelSelect) Float64X(ctx context.Context) float64
- func (s *AlertChannelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AlertChannelSelect) Float64sX(ctx context.Context) []float64
- func (s *AlertChannelSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AlertChannelSelect) IntX(ctx context.Context) int
- func (s *AlertChannelSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AlertChannelSelect) IntsX(ctx context.Context) []int
- func (acs *AlertChannelSelect) Scan(ctx context.Context, v any) error
- func (s *AlertChannelSelect) ScanX(ctx context.Context, v any)
- func (s *AlertChannelSelect) String(ctx context.Context) (_ string, err error)
- func (s *AlertChannelSelect) StringX(ctx context.Context) string
- func (s *AlertChannelSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AlertChannelSelect) StringsX(ctx context.Context) []string
- type AlertChannelUpdate
- func (acu *AlertChannelUpdate) AddMonitorIDs(ids ...string) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) AddMonitors(m ...*Monitor) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) ClearMonitors() *AlertChannelUpdate
- func (acu *AlertChannelUpdate) Exec(ctx context.Context) error
- func (acu *AlertChannelUpdate) ExecX(ctx context.Context)
- func (acu *AlertChannelUpdate) Mutation() *AlertChannelMutation
- func (acu *AlertChannelUpdate) RemoveMonitorIDs(ids ...string) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) RemoveMonitors(m ...*Monitor) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) Save(ctx context.Context) (int, error)
- func (acu *AlertChannelUpdate) SaveX(ctx context.Context) int
- func (acu *AlertChannelUpdate) SetConfig(m map[string]interface{}) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) SetCreatedAt(t time.Time) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) SetNillableCreatedAt(t *time.Time) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) SetUpdatedAt(t time.Time) *AlertChannelUpdate
- func (acu *AlertChannelUpdate) Where(ps ...predicate.AlertChannel) *AlertChannelUpdate
- type AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) AddMonitorIDs(ids ...string) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) AddMonitors(m ...*Monitor) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) ClearMonitors() *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) Exec(ctx context.Context) error
- func (acuo *AlertChannelUpdateOne) ExecX(ctx context.Context)
- func (acuo *AlertChannelUpdateOne) Mutation() *AlertChannelMutation
- func (acuo *AlertChannelUpdateOne) RemoveMonitorIDs(ids ...string) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) RemoveMonitors(m ...*Monitor) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) Save(ctx context.Context) (*AlertChannel, error)
- func (acuo *AlertChannelUpdateOne) SaveX(ctx context.Context) *AlertChannel
- func (acuo *AlertChannelUpdateOne) Select(field string, fields ...string) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) SetConfig(m map[string]interface{}) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) SetCreatedAt(t time.Time) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) SetNillableCreatedAt(t *time.Time) *AlertChannelUpdateOne
- func (acuo *AlertChannelUpdateOne) SetUpdatedAt(t time.Time) *AlertChannelUpdateOne
- type AlertChannels
- type Client
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Hook
- type Monitor
- type MonitorClient
- func (c *MonitorClient) Create() *MonitorCreate
- func (c *MonitorClient) CreateBulk(builders ...*MonitorCreate) *MonitorCreateBulk
- func (c *MonitorClient) Delete() *MonitorDelete
- func (c *MonitorClient) DeleteOne(m *Monitor) *MonitorDeleteOne
- func (c *MonitorClient) DeleteOneID(id string) *MonitorDeleteOne
- func (c *MonitorClient) Get(ctx context.Context, id string) (*Monitor, error)
- func (c *MonitorClient) GetX(ctx context.Context, id string) *Monitor
- func (c *MonitorClient) Hooks() []Hook
- func (c *MonitorClient) Query() *MonitorQuery
- func (c *MonitorClient) QueryAlertChannels(m *Monitor) *AlertChannelQuery
- func (c *MonitorClient) Update() *MonitorUpdate
- func (c *MonitorClient) UpdateOne(m *Monitor) *MonitorUpdateOne
- func (c *MonitorClient) UpdateOneID(id string) *MonitorUpdateOne
- func (c *MonitorClient) Use(hooks ...Hook)
- type MonitorCreate
- func (mc *MonitorCreate) AddAlertChannelIDs(ids ...string) *MonitorCreate
- func (mc *MonitorCreate) AddAlertChannels(a ...*AlertChannel) *MonitorCreate
- func (mc *MonitorCreate) Exec(ctx context.Context) error
- func (mc *MonitorCreate) ExecX(ctx context.Context)
- func (mc *MonitorCreate) Mutation() *MonitorMutation
- func (mc *MonitorCreate) Save(ctx context.Context) (*Monitor, error)
- func (mc *MonitorCreate) SaveX(ctx context.Context) *Monitor
- func (mc *MonitorCreate) SetConfig(m map[string]interface{}) *MonitorCreate
- func (mc *MonitorCreate) SetCreatedAt(t time.Time) *MonitorCreate
- func (mc *MonitorCreate) SetCurrentDownReason(s string) *MonitorCreate
- func (mc *MonitorCreate) SetDescription(s string) *MonitorCreate
- func (mc *MonitorCreate) SetFailureCount(i int) *MonitorCreate
- func (mc *MonitorCreate) SetFailureThreshold(i int) *MonitorCreate
- func (mc *MonitorCreate) SetID(s string) *MonitorCreate
- func (mc *MonitorCreate) SetIntervalSeconds(i int) *MonitorCreate
- func (mc *MonitorCreate) SetLastCheckedAt(t time.Time) *MonitorCreate
- func (mc *MonitorCreate) SetMonitorType(s string) *MonitorCreate
- func (mc *MonitorCreate) SetNillableCreatedAt(t *time.Time) *MonitorCreate
- func (mc *MonitorCreate) SetNillableCurrentDownReason(s *string) *MonitorCreate
- func (mc *MonitorCreate) SetNillableDescription(s *string) *MonitorCreate
- func (mc *MonitorCreate) SetNillableFailureCount(i *int) *MonitorCreate
- func (mc *MonitorCreate) SetNillableFailureThreshold(i *int) *MonitorCreate
- func (mc *MonitorCreate) SetNillableIntervalSeconds(i *int) *MonitorCreate
- func (mc *MonitorCreate) SetNillableLastCheckedAt(t *time.Time) *MonitorCreate
- func (mc *MonitorCreate) SetNillablePaused(b *bool) *MonitorCreate
- func (mc *MonitorCreate) SetNillableSilenced(b *bool) *MonitorCreate
- func (mc *MonitorCreate) SetNillableStatusLastChangedAt(t *time.Time) *MonitorCreate
- func (mc *MonitorCreate) SetNillableSuccessCount(i *int) *MonitorCreate
- func (mc *MonitorCreate) SetNillableSuccessThreshold(i *int) *MonitorCreate
- func (mc *MonitorCreate) SetNillableUpdatedAt(t *time.Time) *MonitorCreate
- func (mc *MonitorCreate) SetPaused(b bool) *MonitorCreate
- func (mc *MonitorCreate) SetSilenced(b bool) *MonitorCreate
- func (mc *MonitorCreate) SetStatus(s string) *MonitorCreate
- func (mc *MonitorCreate) SetStatusLastChangedAt(t time.Time) *MonitorCreate
- func (mc *MonitorCreate) SetSuccessCount(i int) *MonitorCreate
- func (mc *MonitorCreate) SetSuccessThreshold(i int) *MonitorCreate
- func (mc *MonitorCreate) SetTags(s []string) *MonitorCreate
- func (mc *MonitorCreate) SetUpdatedAt(t time.Time) *MonitorCreate
- type MonitorCreateBulk
- type MonitorDelete
- type MonitorDeleteOne
- type MonitorEdges
- type MonitorGroupBy
- func (mgb *MonitorGroupBy) Aggregate(fns ...AggregateFunc) *MonitorGroupBy
- func (s *MonitorGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MonitorGroupBy) BoolX(ctx context.Context) bool
- func (s *MonitorGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MonitorGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MonitorGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MonitorGroupBy) Float64X(ctx context.Context) float64
- func (s *MonitorGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MonitorGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MonitorGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MonitorGroupBy) IntX(ctx context.Context) int
- func (s *MonitorGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MonitorGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MonitorGroupBy) Scan(ctx context.Context, v any) error
- func (s *MonitorGroupBy) ScanX(ctx context.Context, v any)
- func (s *MonitorGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MonitorGroupBy) StringX(ctx context.Context) string
- func (s *MonitorGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MonitorGroupBy) StringsX(ctx context.Context) []string
- type MonitorMutation
- func (m *MonitorMutation) AddAlertChannelIDs(ids ...string)
- func (m *MonitorMutation) AddFailureCount(i int)
- func (m *MonitorMutation) AddFailureThreshold(i int)
- func (m *MonitorMutation) AddField(name string, value ent.Value) error
- func (m *MonitorMutation) AddIntervalSeconds(i int)
- func (m *MonitorMutation) AddSuccessCount(i int)
- func (m *MonitorMutation) AddSuccessThreshold(i int)
- func (m *MonitorMutation) AddedEdges() []string
- func (m *MonitorMutation) AddedFailureCount() (r int, exists bool)
- func (m *MonitorMutation) AddedFailureThreshold() (r int, exists bool)
- func (m *MonitorMutation) AddedField(name string) (ent.Value, bool)
- func (m *MonitorMutation) AddedFields() []string
- func (m *MonitorMutation) AddedIDs(name string) []ent.Value
- func (m *MonitorMutation) AddedIntervalSeconds() (r int, exists bool)
- func (m *MonitorMutation) AddedSuccessCount() (r int, exists bool)
- func (m *MonitorMutation) AddedSuccessThreshold() (r int, exists bool)
- func (m *MonitorMutation) AlertChannelsCleared() bool
- func (m *MonitorMutation) AlertChannelsIDs() (ids []string)
- func (m *MonitorMutation) AppendTags(s []string)
- func (m *MonitorMutation) AppendedTags() ([]string, bool)
- func (m *MonitorMutation) ClearAlertChannels()
- func (m *MonitorMutation) ClearEdge(name string) error
- func (m *MonitorMutation) ClearField(name string) error
- func (m *MonitorMutation) ClearLastCheckedAt()
- func (m *MonitorMutation) ClearTags()
- func (m *MonitorMutation) ClearedEdges() []string
- func (m *MonitorMutation) ClearedFields() []string
- func (m MonitorMutation) Client() *Client
- func (m *MonitorMutation) Config() (r map[string]interface{}, exists bool)
- func (m *MonitorMutation) CreatedAt() (r time.Time, exists bool)
- func (m *MonitorMutation) CurrentDownReason() (r string, exists bool)
- func (m *MonitorMutation) Description() (r string, exists bool)
- func (m *MonitorMutation) EdgeCleared(name string) bool
- func (m *MonitorMutation) FailureCount() (r int, exists bool)
- func (m *MonitorMutation) FailureThreshold() (r int, exists bool)
- func (m *MonitorMutation) Field(name string) (ent.Value, bool)
- func (m *MonitorMutation) FieldCleared(name string) bool
- func (m *MonitorMutation) Fields() []string
- func (m *MonitorMutation) ID() (id string, exists bool)
- func (m *MonitorMutation) IDs(ctx context.Context) ([]string, error)
- func (m *MonitorMutation) IntervalSeconds() (r int, exists bool)
- func (m *MonitorMutation) LastCheckedAt() (r time.Time, exists bool)
- func (m *MonitorMutation) LastCheckedAtCleared() bool
- func (m *MonitorMutation) MonitorType() (r string, exists bool)
- func (m *MonitorMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
- func (m *MonitorMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MonitorMutation) OldCurrentDownReason(ctx context.Context) (v string, err error)
- func (m *MonitorMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *MonitorMutation) OldFailureCount(ctx context.Context) (v int, err error)
- func (m *MonitorMutation) OldFailureThreshold(ctx context.Context) (v int, err error)
- func (m *MonitorMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MonitorMutation) OldIntervalSeconds(ctx context.Context) (v int, err error)
- func (m *MonitorMutation) OldLastCheckedAt(ctx context.Context) (v *time.Time, err error)
- func (m *MonitorMutation) OldMonitorType(ctx context.Context) (v string, err error)
- func (m *MonitorMutation) OldPaused(ctx context.Context) (v bool, err error)
- func (m *MonitorMutation) OldSilenced(ctx context.Context) (v bool, err error)
- func (m *MonitorMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *MonitorMutation) OldStatusLastChangedAt(ctx context.Context) (v time.Time, err error)
- func (m *MonitorMutation) OldSuccessCount(ctx context.Context) (v int, err error)
- func (m *MonitorMutation) OldSuccessThreshold(ctx context.Context) (v int, err error)
- func (m *MonitorMutation) OldTags(ctx context.Context) (v []string, err error)
- func (m *MonitorMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *MonitorMutation) Op() Op
- func (m *MonitorMutation) Paused() (r bool, exists bool)
- func (m *MonitorMutation) RemoveAlertChannelIDs(ids ...string)
- func (m *MonitorMutation) RemovedAlertChannelsIDs() (ids []string)
- func (m *MonitorMutation) RemovedEdges() []string
- func (m *MonitorMutation) RemovedIDs(name string) []ent.Value
- func (m *MonitorMutation) ResetAlertChannels()
- func (m *MonitorMutation) ResetConfig()
- func (m *MonitorMutation) ResetCreatedAt()
- func (m *MonitorMutation) ResetCurrentDownReason()
- func (m *MonitorMutation) ResetDescription()
- func (m *MonitorMutation) ResetEdge(name string) error
- func (m *MonitorMutation) ResetFailureCount()
- func (m *MonitorMutation) ResetFailureThreshold()
- func (m *MonitorMutation) ResetField(name string) error
- func (m *MonitorMutation) ResetIntervalSeconds()
- func (m *MonitorMutation) ResetLastCheckedAt()
- func (m *MonitorMutation) ResetMonitorType()
- func (m *MonitorMutation) ResetPaused()
- func (m *MonitorMutation) ResetSilenced()
- func (m *MonitorMutation) ResetStatus()
- func (m *MonitorMutation) ResetStatusLastChangedAt()
- func (m *MonitorMutation) ResetSuccessCount()
- func (m *MonitorMutation) ResetSuccessThreshold()
- func (m *MonitorMutation) ResetTags()
- func (m *MonitorMutation) ResetUpdatedAt()
- func (m *MonitorMutation) SetConfig(value map[string]interface{})
- func (m *MonitorMutation) SetCreatedAt(t time.Time)
- func (m *MonitorMutation) SetCurrentDownReason(s string)
- func (m *MonitorMutation) SetDescription(s string)
- func (m *MonitorMutation) SetFailureCount(i int)
- func (m *MonitorMutation) SetFailureThreshold(i int)
- func (m *MonitorMutation) SetField(name string, value ent.Value) error
- func (m *MonitorMutation) SetID(id string)
- func (m *MonitorMutation) SetIntervalSeconds(i int)
- func (m *MonitorMutation) SetLastCheckedAt(t time.Time)
- func (m *MonitorMutation) SetMonitorType(s string)
- func (m *MonitorMutation) SetPaused(b bool)
- func (m *MonitorMutation) SetSilenced(b bool)
- func (m *MonitorMutation) SetStatus(s string)
- func (m *MonitorMutation) SetStatusLastChangedAt(t time.Time)
- func (m *MonitorMutation) SetSuccessCount(i int)
- func (m *MonitorMutation) SetSuccessThreshold(i int)
- func (m *MonitorMutation) SetTags(s []string)
- func (m *MonitorMutation) SetUpdatedAt(t time.Time)
- func (m *MonitorMutation) Silenced() (r bool, exists bool)
- func (m *MonitorMutation) Status() (r string, exists bool)
- func (m *MonitorMutation) StatusLastChangedAt() (r time.Time, exists bool)
- func (m *MonitorMutation) SuccessCount() (r int, exists bool)
- func (m *MonitorMutation) SuccessThreshold() (r int, exists bool)
- func (m *MonitorMutation) Tags() (r []string, exists bool)
- func (m *MonitorMutation) TagsCleared() bool
- func (m MonitorMutation) Tx() (*Tx, error)
- func (m *MonitorMutation) Type() string
- func (m *MonitorMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *MonitorMutation) Where(ps ...predicate.Monitor)
- type MonitorQuery
- func (mq *MonitorQuery) Aggregate(fns ...AggregateFunc) *MonitorSelect
- func (mq *MonitorQuery) All(ctx context.Context) ([]*Monitor, error)
- func (mq *MonitorQuery) AllX(ctx context.Context) []*Monitor
- func (mq *MonitorQuery) Clone() *MonitorQuery
- func (mq *MonitorQuery) Count(ctx context.Context) (int, error)
- func (mq *MonitorQuery) CountX(ctx context.Context) int
- func (mq *MonitorQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MonitorQuery) ExistX(ctx context.Context) bool
- func (mq *MonitorQuery) First(ctx context.Context) (*Monitor, error)
- func (mq *MonitorQuery) FirstID(ctx context.Context) (id string, err error)
- func (mq *MonitorQuery) FirstIDX(ctx context.Context) string
- func (mq *MonitorQuery) FirstX(ctx context.Context) *Monitor
- func (mq *MonitorQuery) GroupBy(field string, fields ...string) *MonitorGroupBy
- func (mq *MonitorQuery) IDs(ctx context.Context) ([]string, error)
- func (mq *MonitorQuery) IDsX(ctx context.Context) []string
- func (mq *MonitorQuery) Limit(limit int) *MonitorQuery
- func (mq *MonitorQuery) Offset(offset int) *MonitorQuery
- func (mq *MonitorQuery) Only(ctx context.Context) (*Monitor, error)
- func (mq *MonitorQuery) OnlyID(ctx context.Context) (id string, err error)
- func (mq *MonitorQuery) OnlyIDX(ctx context.Context) string
- func (mq *MonitorQuery) OnlyX(ctx context.Context) *Monitor
- func (mq *MonitorQuery) Order(o ...OrderFunc) *MonitorQuery
- func (mq *MonitorQuery) QueryAlertChannels() *AlertChannelQuery
- func (mq *MonitorQuery) Select(fields ...string) *MonitorSelect
- func (mq *MonitorQuery) Unique(unique bool) *MonitorQuery
- func (mq *MonitorQuery) Where(ps ...predicate.Monitor) *MonitorQuery
- func (mq *MonitorQuery) WithAlertChannels(opts ...func(*AlertChannelQuery)) *MonitorQuery
- type MonitorSelect
- func (ms *MonitorSelect) Aggregate(fns ...AggregateFunc) *MonitorSelect
- func (s *MonitorSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MonitorSelect) BoolX(ctx context.Context) bool
- func (s *MonitorSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MonitorSelect) BoolsX(ctx context.Context) []bool
- func (s *MonitorSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MonitorSelect) Float64X(ctx context.Context) float64
- func (s *MonitorSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MonitorSelect) Float64sX(ctx context.Context) []float64
- func (s *MonitorSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MonitorSelect) IntX(ctx context.Context) int
- func (s *MonitorSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MonitorSelect) IntsX(ctx context.Context) []int
- func (ms *MonitorSelect) Scan(ctx context.Context, v any) error
- func (s *MonitorSelect) ScanX(ctx context.Context, v any)
- func (s *MonitorSelect) String(ctx context.Context) (_ string, err error)
- func (s *MonitorSelect) StringX(ctx context.Context) string
- func (s *MonitorSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MonitorSelect) StringsX(ctx context.Context) []string
- type MonitorUpdate
- func (mu *MonitorUpdate) AddAlertChannelIDs(ids ...string) *MonitorUpdate
- func (mu *MonitorUpdate) AddAlertChannels(a ...*AlertChannel) *MonitorUpdate
- func (mu *MonitorUpdate) AddFailureCount(i int) *MonitorUpdate
- func (mu *MonitorUpdate) AddFailureThreshold(i int) *MonitorUpdate
- func (mu *MonitorUpdate) AddIntervalSeconds(i int) *MonitorUpdate
- func (mu *MonitorUpdate) AddSuccessCount(i int) *MonitorUpdate
- func (mu *MonitorUpdate) AddSuccessThreshold(i int) *MonitorUpdate
- func (mu *MonitorUpdate) AppendTags(s []string) *MonitorUpdate
- func (mu *MonitorUpdate) ClearAlertChannels() *MonitorUpdate
- func (mu *MonitorUpdate) ClearLastCheckedAt() *MonitorUpdate
- func (mu *MonitorUpdate) ClearTags() *MonitorUpdate
- func (mu *MonitorUpdate) Exec(ctx context.Context) error
- func (mu *MonitorUpdate) ExecX(ctx context.Context)
- func (mu *MonitorUpdate) Mutation() *MonitorMutation
- func (mu *MonitorUpdate) RemoveAlertChannelIDs(ids ...string) *MonitorUpdate
- func (mu *MonitorUpdate) RemoveAlertChannels(a ...*AlertChannel) *MonitorUpdate
- func (mu *MonitorUpdate) Save(ctx context.Context) (int, error)
- func (mu *MonitorUpdate) SaveX(ctx context.Context) int
- func (mu *MonitorUpdate) SetConfig(m map[string]interface{}) *MonitorUpdate
- func (mu *MonitorUpdate) SetCreatedAt(t time.Time) *MonitorUpdate
- func (mu *MonitorUpdate) SetCurrentDownReason(s string) *MonitorUpdate
- func (mu *MonitorUpdate) SetDescription(s string) *MonitorUpdate
- func (mu *MonitorUpdate) SetFailureCount(i int) *MonitorUpdate
- func (mu *MonitorUpdate) SetFailureThreshold(i int) *MonitorUpdate
- func (mu *MonitorUpdate) SetIntervalSeconds(i int) *MonitorUpdate
- func (mu *MonitorUpdate) SetLastCheckedAt(t time.Time) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableCreatedAt(t *time.Time) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableCurrentDownReason(s *string) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableDescription(s *string) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableFailureCount(i *int) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableFailureThreshold(i *int) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableIntervalSeconds(i *int) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableLastCheckedAt(t *time.Time) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillablePaused(b *bool) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableSilenced(b *bool) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableStatusLastChangedAt(t *time.Time) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableSuccessCount(i *int) *MonitorUpdate
- func (mu *MonitorUpdate) SetNillableSuccessThreshold(i *int) *MonitorUpdate
- func (mu *MonitorUpdate) SetPaused(b bool) *MonitorUpdate
- func (mu *MonitorUpdate) SetSilenced(b bool) *MonitorUpdate
- func (mu *MonitorUpdate) SetStatus(s string) *MonitorUpdate
- func (mu *MonitorUpdate) SetStatusLastChangedAt(t time.Time) *MonitorUpdate
- func (mu *MonitorUpdate) SetSuccessCount(i int) *MonitorUpdate
- func (mu *MonitorUpdate) SetSuccessThreshold(i int) *MonitorUpdate
- func (mu *MonitorUpdate) SetTags(s []string) *MonitorUpdate
- func (mu *MonitorUpdate) SetUpdatedAt(t time.Time) *MonitorUpdate
- func (mu *MonitorUpdate) Where(ps ...predicate.Monitor) *MonitorUpdate
- type MonitorUpdateOne
- func (muo *MonitorUpdateOne) AddAlertChannelIDs(ids ...string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) AddAlertChannels(a ...*AlertChannel) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) AddFailureCount(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) AddFailureThreshold(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) AddIntervalSeconds(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) AddSuccessCount(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) AddSuccessThreshold(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) AppendTags(s []string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) ClearAlertChannels() *MonitorUpdateOne
- func (muo *MonitorUpdateOne) ClearLastCheckedAt() *MonitorUpdateOne
- func (muo *MonitorUpdateOne) ClearTags() *MonitorUpdateOne
- func (muo *MonitorUpdateOne) Exec(ctx context.Context) error
- func (muo *MonitorUpdateOne) ExecX(ctx context.Context)
- func (muo *MonitorUpdateOne) Mutation() *MonitorMutation
- func (muo *MonitorUpdateOne) RemoveAlertChannelIDs(ids ...string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) RemoveAlertChannels(a ...*AlertChannel) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) Save(ctx context.Context) (*Monitor, error)
- func (muo *MonitorUpdateOne) SaveX(ctx context.Context) *Monitor
- func (muo *MonitorUpdateOne) Select(field string, fields ...string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetConfig(m map[string]interface{}) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetCreatedAt(t time.Time) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetCurrentDownReason(s string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetDescription(s string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetFailureCount(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetFailureThreshold(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetIntervalSeconds(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetLastCheckedAt(t time.Time) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableCreatedAt(t *time.Time) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableCurrentDownReason(s *string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableDescription(s *string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableFailureCount(i *int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableFailureThreshold(i *int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableIntervalSeconds(i *int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableLastCheckedAt(t *time.Time) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillablePaused(b *bool) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableSilenced(b *bool) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableStatusLastChangedAt(t *time.Time) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableSuccessCount(i *int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetNillableSuccessThreshold(i *int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetPaused(b bool) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetSilenced(b bool) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetStatus(s string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetStatusLastChangedAt(t time.Time) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetSuccessCount(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetSuccessThreshold(i int) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetTags(s []string) *MonitorUpdateOne
- func (muo *MonitorUpdateOne) SetUpdatedAt(t time.Time) *MonitorUpdateOne
- type Monitors
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Query
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Secret
- type SecretClient
- func (c *SecretClient) Create() *SecretCreate
- func (c *SecretClient) CreateBulk(builders ...*SecretCreate) *SecretCreateBulk
- func (c *SecretClient) Delete() *SecretDelete
- func (c *SecretClient) DeleteOne(s *Secret) *SecretDeleteOne
- func (c *SecretClient) DeleteOneID(id string) *SecretDeleteOne
- func (c *SecretClient) Get(ctx context.Context, id string) (*Secret, error)
- func (c *SecretClient) GetX(ctx context.Context, id string) *Secret
- func (c *SecretClient) Hooks() []Hook
- func (c *SecretClient) Query() *SecretQuery
- func (c *SecretClient) Update() *SecretUpdate
- func (c *SecretClient) UpdateOne(s *Secret) *SecretUpdateOne
- func (c *SecretClient) UpdateOneID(id string) *SecretUpdateOne
- func (c *SecretClient) Use(hooks ...Hook)
- type SecretCreate
- func (sc *SecretCreate) Exec(ctx context.Context) error
- func (sc *SecretCreate) ExecX(ctx context.Context)
- func (sc *SecretCreate) Mutation() *SecretMutation
- func (sc *SecretCreate) Save(ctx context.Context) (*Secret, error)
- func (sc *SecretCreate) SaveX(ctx context.Context) *Secret
- func (sc *SecretCreate) SetCreatedAt(t time.Time) *SecretCreate
- func (sc *SecretCreate) SetCreatedBy(s string) *SecretCreate
- func (sc *SecretCreate) SetID(s string) *SecretCreate
- func (sc *SecretCreate) SetNillableCreatedAt(t *time.Time) *SecretCreate
- func (sc *SecretCreate) SetNillableCreatedBy(s *string) *SecretCreate
- func (sc *SecretCreate) SetNillableUpdatedAt(t *time.Time) *SecretCreate
- func (sc *SecretCreate) SetUpdatedAt(t time.Time) *SecretCreate
- func (sc *SecretCreate) SetValue(s string) *SecretCreate
- type SecretCreateBulk
- type SecretDelete
- type SecretDeleteOne
- type SecretGroupBy
- func (sgb *SecretGroupBy) Aggregate(fns ...AggregateFunc) *SecretGroupBy
- func (s *SecretGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SecretGroupBy) BoolX(ctx context.Context) bool
- func (s *SecretGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SecretGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SecretGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SecretGroupBy) Float64X(ctx context.Context) float64
- func (s *SecretGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SecretGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SecretGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SecretGroupBy) IntX(ctx context.Context) int
- func (s *SecretGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SecretGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SecretGroupBy) Scan(ctx context.Context, v any) error
- func (s *SecretGroupBy) ScanX(ctx context.Context, v any)
- func (s *SecretGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SecretGroupBy) StringX(ctx context.Context) string
- func (s *SecretGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SecretGroupBy) StringsX(ctx context.Context) []string
- type SecretMutation
- func (m *SecretMutation) AddField(name string, value ent.Value) error
- func (m *SecretMutation) AddedEdges() []string
- func (m *SecretMutation) AddedField(name string) (ent.Value, bool)
- func (m *SecretMutation) AddedFields() []string
- func (m *SecretMutation) AddedIDs(name string) []ent.Value
- func (m *SecretMutation) ClearEdge(name string) error
- func (m *SecretMutation) ClearField(name string) error
- func (m *SecretMutation) ClearedEdges() []string
- func (m *SecretMutation) ClearedFields() []string
- func (m SecretMutation) Client() *Client
- func (m *SecretMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SecretMutation) CreatedBy() (r string, exists bool)
- func (m *SecretMutation) EdgeCleared(name string) bool
- func (m *SecretMutation) Field(name string) (ent.Value, bool)
- func (m *SecretMutation) FieldCleared(name string) bool
- func (m *SecretMutation) Fields() []string
- func (m *SecretMutation) ID() (id string, exists bool)
- func (m *SecretMutation) IDs(ctx context.Context) ([]string, error)
- func (m *SecretMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SecretMutation) OldCreatedBy(ctx context.Context) (v string, err error)
- func (m *SecretMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SecretMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SecretMutation) OldValue(ctx context.Context) (v string, err error)
- func (m *SecretMutation) Op() Op
- func (m *SecretMutation) RemovedEdges() []string
- func (m *SecretMutation) RemovedIDs(name string) []ent.Value
- func (m *SecretMutation) ResetCreatedAt()
- func (m *SecretMutation) ResetCreatedBy()
- func (m *SecretMutation) ResetEdge(name string) error
- func (m *SecretMutation) ResetField(name string) error
- func (m *SecretMutation) ResetUpdatedAt()
- func (m *SecretMutation) ResetValue()
- func (m *SecretMutation) SetCreatedAt(t time.Time)
- func (m *SecretMutation) SetCreatedBy(s string)
- func (m *SecretMutation) SetField(name string, value ent.Value) error
- func (m *SecretMutation) SetID(id string)
- func (m *SecretMutation) SetUpdatedAt(t time.Time)
- func (m *SecretMutation) SetValue(s string)
- func (m SecretMutation) Tx() (*Tx, error)
- func (m *SecretMutation) Type() string
- func (m *SecretMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SecretMutation) Value() (r string, exists bool)
- func (m *SecretMutation) Where(ps ...predicate.Secret)
- type SecretQuery
- func (sq *SecretQuery) Aggregate(fns ...AggregateFunc) *SecretSelect
- func (sq *SecretQuery) All(ctx context.Context) ([]*Secret, error)
- func (sq *SecretQuery) AllX(ctx context.Context) []*Secret
- func (sq *SecretQuery) Clone() *SecretQuery
- func (sq *SecretQuery) Count(ctx context.Context) (int, error)
- func (sq *SecretQuery) CountX(ctx context.Context) int
- func (sq *SecretQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SecretQuery) ExistX(ctx context.Context) bool
- func (sq *SecretQuery) First(ctx context.Context) (*Secret, error)
- func (sq *SecretQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SecretQuery) FirstIDX(ctx context.Context) string
- func (sq *SecretQuery) FirstX(ctx context.Context) *Secret
- func (sq *SecretQuery) GroupBy(field string, fields ...string) *SecretGroupBy
- func (sq *SecretQuery) IDs(ctx context.Context) ([]string, error)
- func (sq *SecretQuery) IDsX(ctx context.Context) []string
- func (sq *SecretQuery) Limit(limit int) *SecretQuery
- func (sq *SecretQuery) Offset(offset int) *SecretQuery
- func (sq *SecretQuery) Only(ctx context.Context) (*Secret, error)
- func (sq *SecretQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SecretQuery) OnlyIDX(ctx context.Context) string
- func (sq *SecretQuery) OnlyX(ctx context.Context) *Secret
- func (sq *SecretQuery) Order(o ...OrderFunc) *SecretQuery
- func (sq *SecretQuery) Select(fields ...string) *SecretSelect
- func (sq *SecretQuery) Unique(unique bool) *SecretQuery
- func (sq *SecretQuery) Where(ps ...predicate.Secret) *SecretQuery
- type SecretSelect
- func (ss *SecretSelect) Aggregate(fns ...AggregateFunc) *SecretSelect
- func (s *SecretSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SecretSelect) BoolX(ctx context.Context) bool
- func (s *SecretSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SecretSelect) BoolsX(ctx context.Context) []bool
- func (s *SecretSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SecretSelect) Float64X(ctx context.Context) float64
- func (s *SecretSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SecretSelect) Float64sX(ctx context.Context) []float64
- func (s *SecretSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SecretSelect) IntX(ctx context.Context) int
- func (s *SecretSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SecretSelect) IntsX(ctx context.Context) []int
- func (ss *SecretSelect) Scan(ctx context.Context, v any) error
- func (s *SecretSelect) ScanX(ctx context.Context, v any)
- func (s *SecretSelect) String(ctx context.Context) (_ string, err error)
- func (s *SecretSelect) StringX(ctx context.Context) string
- func (s *SecretSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SecretSelect) StringsX(ctx context.Context) []string
- type SecretUpdate
- func (su *SecretUpdate) Exec(ctx context.Context) error
- func (su *SecretUpdate) ExecX(ctx context.Context)
- func (su *SecretUpdate) Mutation() *SecretMutation
- func (su *SecretUpdate) Save(ctx context.Context) (int, error)
- func (su *SecretUpdate) SaveX(ctx context.Context) int
- func (su *SecretUpdate) SetCreatedAt(t time.Time) *SecretUpdate
- func (su *SecretUpdate) SetCreatedBy(s string) *SecretUpdate
- func (su *SecretUpdate) SetNillableCreatedAt(t *time.Time) *SecretUpdate
- func (su *SecretUpdate) SetNillableCreatedBy(s *string) *SecretUpdate
- func (su *SecretUpdate) SetUpdatedAt(t time.Time) *SecretUpdate
- func (su *SecretUpdate) SetValue(s string) *SecretUpdate
- func (su *SecretUpdate) Where(ps ...predicate.Secret) *SecretUpdate
- type SecretUpdateOne
- func (suo *SecretUpdateOne) Exec(ctx context.Context) error
- func (suo *SecretUpdateOne) ExecX(ctx context.Context)
- func (suo *SecretUpdateOne) Mutation() *SecretMutation
- func (suo *SecretUpdateOne) Save(ctx context.Context) (*Secret, error)
- func (suo *SecretUpdateOne) SaveX(ctx context.Context) *Secret
- func (suo *SecretUpdateOne) Select(field string, fields ...string) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetCreatedAt(t time.Time) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetCreatedBy(s string) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetNillableCreatedAt(t *time.Time) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetNillableCreatedBy(s *string) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetUpdatedAt(t time.Time) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetValue(s string) *SecretUpdateOne
- type Secrets
- type Sink
- type SinkClient
- func (c *SinkClient) Create() *SinkCreate
- func (c *SinkClient) CreateBulk(builders ...*SinkCreate) *SinkCreateBulk
- func (c *SinkClient) Delete() *SinkDelete
- func (c *SinkClient) DeleteOne(s *Sink) *SinkDeleteOne
- func (c *SinkClient) DeleteOneID(id string) *SinkDeleteOne
- func (c *SinkClient) Get(ctx context.Context, id string) (*Sink, error)
- func (c *SinkClient) GetX(ctx context.Context, id string) *Sink
- func (c *SinkClient) Hooks() []Hook
- func (c *SinkClient) Query() *SinkQuery
- func (c *SinkClient) Update() *SinkUpdate
- func (c *SinkClient) UpdateOne(s *Sink) *SinkUpdateOne
- func (c *SinkClient) UpdateOneID(id string) *SinkUpdateOne
- func (c *SinkClient) Use(hooks ...Hook)
- type SinkCreate
- func (sc *SinkCreate) Exec(ctx context.Context) error
- func (sc *SinkCreate) ExecX(ctx context.Context)
- func (sc *SinkCreate) Mutation() *SinkMutation
- func (sc *SinkCreate) Save(ctx context.Context) (*Sink, error)
- func (sc *SinkCreate) SaveX(ctx context.Context) *Sink
- func (sc *SinkCreate) SetConfig(m map[string]interface{}) *SinkCreate
- func (sc *SinkCreate) SetCreatedAt(t time.Time) *SinkCreate
- func (sc *SinkCreate) SetID(s string) *SinkCreate
- func (sc *SinkCreate) SetNillableCreatedAt(t *time.Time) *SinkCreate
- func (sc *SinkCreate) SetNillableUpdatedAt(t *time.Time) *SinkCreate
- func (sc *SinkCreate) SetSinkType(s string) *SinkCreate
- func (sc *SinkCreate) SetUpdatedAt(t time.Time) *SinkCreate
- type SinkCreateBulk
- type SinkDelete
- type SinkDeleteOne
- type SinkGroupBy
- func (sgb *SinkGroupBy) Aggregate(fns ...AggregateFunc) *SinkGroupBy
- func (s *SinkGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SinkGroupBy) BoolX(ctx context.Context) bool
- func (s *SinkGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SinkGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SinkGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SinkGroupBy) Float64X(ctx context.Context) float64
- func (s *SinkGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SinkGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SinkGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SinkGroupBy) IntX(ctx context.Context) int
- func (s *SinkGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SinkGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SinkGroupBy) Scan(ctx context.Context, v any) error
- func (s *SinkGroupBy) ScanX(ctx context.Context, v any)
- func (s *SinkGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SinkGroupBy) StringX(ctx context.Context) string
- func (s *SinkGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SinkGroupBy) StringsX(ctx context.Context) []string
- type SinkMutation
- func (m *SinkMutation) AddField(name string, value ent.Value) error
- func (m *SinkMutation) AddedEdges() []string
- func (m *SinkMutation) AddedField(name string) (ent.Value, bool)
- func (m *SinkMutation) AddedFields() []string
- func (m *SinkMutation) AddedIDs(name string) []ent.Value
- func (m *SinkMutation) ClearEdge(name string) error
- func (m *SinkMutation) ClearField(name string) error
- func (m *SinkMutation) ClearedEdges() []string
- func (m *SinkMutation) ClearedFields() []string
- func (m SinkMutation) Client() *Client
- func (m *SinkMutation) Config() (r map[string]interface{}, exists bool)
- func (m *SinkMutation) CreatedAt() (r time.Time, exists bool)
- func (m *SinkMutation) EdgeCleared(name string) bool
- func (m *SinkMutation) Field(name string) (ent.Value, bool)
- func (m *SinkMutation) FieldCleared(name string) bool
- func (m *SinkMutation) Fields() []string
- func (m *SinkMutation) ID() (id string, exists bool)
- func (m *SinkMutation) IDs(ctx context.Context) ([]string, error)
- func (m *SinkMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
- func (m *SinkMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SinkMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SinkMutation) OldSinkType(ctx context.Context) (v string, err error)
- func (m *SinkMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *SinkMutation) Op() Op
- func (m *SinkMutation) RemovedEdges() []string
- func (m *SinkMutation) RemovedIDs(name string) []ent.Value
- func (m *SinkMutation) ResetConfig()
- func (m *SinkMutation) ResetCreatedAt()
- func (m *SinkMutation) ResetEdge(name string) error
- func (m *SinkMutation) ResetField(name string) error
- func (m *SinkMutation) ResetSinkType()
- func (m *SinkMutation) ResetUpdatedAt()
- func (m *SinkMutation) SetConfig(value map[string]interface{})
- func (m *SinkMutation) SetCreatedAt(t time.Time)
- func (m *SinkMutation) SetField(name string, value ent.Value) error
- func (m *SinkMutation) SetID(id string)
- func (m *SinkMutation) SetSinkType(s string)
- func (m *SinkMutation) SetUpdatedAt(t time.Time)
- func (m *SinkMutation) SinkType() (r string, exists bool)
- func (m SinkMutation) Tx() (*Tx, error)
- func (m *SinkMutation) Type() string
- func (m *SinkMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *SinkMutation) Where(ps ...predicate.Sink)
- type SinkQuery
- func (sq *SinkQuery) Aggregate(fns ...AggregateFunc) *SinkSelect
- func (sq *SinkQuery) All(ctx context.Context) ([]*Sink, error)
- func (sq *SinkQuery) AllX(ctx context.Context) []*Sink
- func (sq *SinkQuery) Clone() *SinkQuery
- func (sq *SinkQuery) Count(ctx context.Context) (int, error)
- func (sq *SinkQuery) CountX(ctx context.Context) int
- func (sq *SinkQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SinkQuery) ExistX(ctx context.Context) bool
- func (sq *SinkQuery) First(ctx context.Context) (*Sink, error)
- func (sq *SinkQuery) FirstID(ctx context.Context) (id string, err error)
- func (sq *SinkQuery) FirstIDX(ctx context.Context) string
- func (sq *SinkQuery) FirstX(ctx context.Context) *Sink
- func (sq *SinkQuery) GroupBy(field string, fields ...string) *SinkGroupBy
- func (sq *SinkQuery) IDs(ctx context.Context) ([]string, error)
- func (sq *SinkQuery) IDsX(ctx context.Context) []string
- func (sq *SinkQuery) Limit(limit int) *SinkQuery
- func (sq *SinkQuery) Offset(offset int) *SinkQuery
- func (sq *SinkQuery) Only(ctx context.Context) (*Sink, error)
- func (sq *SinkQuery) OnlyID(ctx context.Context) (id string, err error)
- func (sq *SinkQuery) OnlyIDX(ctx context.Context) string
- func (sq *SinkQuery) OnlyX(ctx context.Context) *Sink
- func (sq *SinkQuery) Order(o ...OrderFunc) *SinkQuery
- func (sq *SinkQuery) Select(fields ...string) *SinkSelect
- func (sq *SinkQuery) Unique(unique bool) *SinkQuery
- func (sq *SinkQuery) Where(ps ...predicate.Sink) *SinkQuery
- type SinkSelect
- func (ss *SinkSelect) Aggregate(fns ...AggregateFunc) *SinkSelect
- func (s *SinkSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SinkSelect) BoolX(ctx context.Context) bool
- func (s *SinkSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SinkSelect) BoolsX(ctx context.Context) []bool
- func (s *SinkSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SinkSelect) Float64X(ctx context.Context) float64
- func (s *SinkSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SinkSelect) Float64sX(ctx context.Context) []float64
- func (s *SinkSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SinkSelect) IntX(ctx context.Context) int
- func (s *SinkSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SinkSelect) IntsX(ctx context.Context) []int
- func (ss *SinkSelect) Scan(ctx context.Context, v any) error
- func (s *SinkSelect) ScanX(ctx context.Context, v any)
- func (s *SinkSelect) String(ctx context.Context) (_ string, err error)
- func (s *SinkSelect) StringX(ctx context.Context) string
- func (s *SinkSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SinkSelect) StringsX(ctx context.Context) []string
- type SinkUpdate
- func (su *SinkUpdate) Exec(ctx context.Context) error
- func (su *SinkUpdate) ExecX(ctx context.Context)
- func (su *SinkUpdate) Mutation() *SinkMutation
- func (su *SinkUpdate) Save(ctx context.Context) (int, error)
- func (su *SinkUpdate) SaveX(ctx context.Context) int
- func (su *SinkUpdate) SetConfig(m map[string]interface{}) *SinkUpdate
- func (su *SinkUpdate) SetCreatedAt(t time.Time) *SinkUpdate
- func (su *SinkUpdate) SetNillableCreatedAt(t *time.Time) *SinkUpdate
- func (su *SinkUpdate) SetSinkType(s string) *SinkUpdate
- func (su *SinkUpdate) SetUpdatedAt(t time.Time) *SinkUpdate
- func (su *SinkUpdate) Where(ps ...predicate.Sink) *SinkUpdate
- type SinkUpdateOne
- func (suo *SinkUpdateOne) Exec(ctx context.Context) error
- func (suo *SinkUpdateOne) ExecX(ctx context.Context)
- func (suo *SinkUpdateOne) Mutation() *SinkMutation
- func (suo *SinkUpdateOne) Save(ctx context.Context) (*Sink, error)
- func (suo *SinkUpdateOne) SaveX(ctx context.Context) *Sink
- func (suo *SinkUpdateOne) Select(field string, fields ...string) *SinkUpdateOne
- func (suo *SinkUpdateOne) SetConfig(m map[string]interface{}) *SinkUpdateOne
- func (suo *SinkUpdateOne) SetCreatedAt(t time.Time) *SinkUpdateOne
- func (suo *SinkUpdateOne) SetNillableCreatedAt(t *time.Time) *SinkUpdateOne
- func (suo *SinkUpdateOne) SetSinkType(s string) *SinkUpdateOne
- func (suo *SinkUpdateOne) SetUpdatedAt(t time.Time) *SinkUpdateOne
- type Sinks
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id string) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id string) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id string) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id string) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetAPIKey(s string) *UserCreate
- func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
- func (uc *UserCreate) SetID(s string) *UserCreate
- func (uc *UserCreate) SetLocked(b bool) *UserCreate
- func (uc *UserCreate) SetLockedUntil(t time.Time) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableLocked(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableLockedUntil(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableRole(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetRole(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) APIKey() (r string, exists bool)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearLockedUntil()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id string, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]string, error)
- func (m *UserMutation) Locked() (r bool, exists bool)
- func (m *UserMutation) LockedUntil() (r time.Time, exists bool)
- func (m *UserMutation) LockedUntilCleared() bool
- func (m *UserMutation) OldAPIKey(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldLocked(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldLockedUntil(ctx context.Context) (v *time.Time, err error)
- func (m *UserMutation) OldRole(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetAPIKey()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetLocked()
- func (m *UserMutation) ResetLockedUntil()
- func (m *UserMutation) ResetRole()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) Role() (r string, exists bool)
- func (m *UserMutation) SetAPIKey(s string)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id string)
- func (m *UserMutation) SetLocked(b bool)
- func (m *UserMutation) SetLockedUntil(t time.Time)
- func (m *UserMutation) SetRole(s string)
- func (m *UserMutation) SetUpdatedAt(t time.Time)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id string, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) string
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) ([]string, error)
- func (uq *UserQuery) IDsX(ctx context.Context) []string
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id string, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) string
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) ClearLockedUntil() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetAPIKey(s string) *UserUpdate
- func (uu *UserUpdate) SetLocked(b bool) *UserUpdate
- func (uu *UserUpdate) SetLockedUntil(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLocked(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableLockedUntil(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableRole(s *string) *UserUpdate
- func (uu *UserUpdate) SetRole(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) ClearLockedUntil() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetAPIKey(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLocked(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLockedUntil(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLocked(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLockedUntil(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRole(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRole(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- type Users
- 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. TypeAlertChannel = "AlertChannel" TypeMonitor = "Monitor" TypeSecret = "Secret" TypeSink = "Sink" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type AlertChannel ¶
type AlertChannel struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// AlertChannelType holds the value of the "alert_channel_type" field.
AlertChannelType string `json:"alert_channel_type,omitempty"`
// Config holds the value of the "config" field.
Config map[string]interface{} `json:"config,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the AlertChannelQuery when eager-loading is set.
Edges AlertChannelEdges `json:"edges"`
// contains filtered or unexported fields
}
AlertChannel is the model entity for the AlertChannel schema.
func (*AlertChannel) QueryMonitors ¶
func (ac *AlertChannel) QueryMonitors() *MonitorQuery
QueryMonitors queries the "monitors" edge of the AlertChannel entity.
func (*AlertChannel) String ¶
func (ac *AlertChannel) String() string
String implements the fmt.Stringer.
func (*AlertChannel) Unwrap ¶
func (ac *AlertChannel) Unwrap() *AlertChannel
Unwrap unwraps the AlertChannel 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 (*AlertChannel) Update ¶
func (ac *AlertChannel) Update() *AlertChannelUpdateOne
Update returns a builder for updating this AlertChannel. Note that you need to call AlertChannel.Unwrap() before calling this method if this AlertChannel was returned from a transaction, and the transaction was committed or rolled back.
type AlertChannelClient ¶
type AlertChannelClient struct {
// contains filtered or unexported fields
}
AlertChannelClient is a client for the AlertChannel schema.
func NewAlertChannelClient ¶
func NewAlertChannelClient(c config) *AlertChannelClient
NewAlertChannelClient returns a client for the AlertChannel from the given config.
func (*AlertChannelClient) Create ¶
func (c *AlertChannelClient) Create() *AlertChannelCreate
Create returns a builder for creating a AlertChannel entity.
func (*AlertChannelClient) CreateBulk ¶
func (c *AlertChannelClient) CreateBulk(builders ...*AlertChannelCreate) *AlertChannelCreateBulk
CreateBulk returns a builder for creating a bulk of AlertChannel entities.
func (*AlertChannelClient) Delete ¶
func (c *AlertChannelClient) Delete() *AlertChannelDelete
Delete returns a delete builder for AlertChannel.
func (*AlertChannelClient) DeleteOne ¶
func (c *AlertChannelClient) DeleteOne(ac *AlertChannel) *AlertChannelDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AlertChannelClient) DeleteOneID ¶
func (c *AlertChannelClient) DeleteOneID(id string) *AlertChannelDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AlertChannelClient) Get ¶
func (c *AlertChannelClient) Get(ctx context.Context, id string) (*AlertChannel, error)
Get returns a AlertChannel entity by its id.
func (*AlertChannelClient) GetX ¶
func (c *AlertChannelClient) GetX(ctx context.Context, id string) *AlertChannel
GetX is like Get, but panics if an error occurs.
func (*AlertChannelClient) Hooks ¶
func (c *AlertChannelClient) Hooks() []Hook
Hooks returns the client hooks.
func (*AlertChannelClient) Query ¶
func (c *AlertChannelClient) Query() *AlertChannelQuery
Query returns a query builder for AlertChannel.
func (*AlertChannelClient) QueryMonitors ¶
func (c *AlertChannelClient) QueryMonitors(ac *AlertChannel) *MonitorQuery
QueryMonitors queries the monitors edge of a AlertChannel.
func (*AlertChannelClient) Update ¶
func (c *AlertChannelClient) Update() *AlertChannelUpdate
Update returns an update builder for AlertChannel.
func (*AlertChannelClient) UpdateOne ¶
func (c *AlertChannelClient) UpdateOne(ac *AlertChannel) *AlertChannelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AlertChannelClient) UpdateOneID ¶
func (c *AlertChannelClient) UpdateOneID(id string) *AlertChannelUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AlertChannelClient) Use ¶
func (c *AlertChannelClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `alertchannel.Hooks(f(g(h())))`.
type AlertChannelCreate ¶
type AlertChannelCreate struct {
// contains filtered or unexported fields
}
AlertChannelCreate is the builder for creating a AlertChannel entity.
func (*AlertChannelCreate) AddMonitorIDs ¶
func (acc *AlertChannelCreate) AddMonitorIDs(ids ...string) *AlertChannelCreate
AddMonitorIDs adds the "monitors" edge to the Monitor entity by IDs.
func (*AlertChannelCreate) AddMonitors ¶
func (acc *AlertChannelCreate) AddMonitors(m ...*Monitor) *AlertChannelCreate
AddMonitors adds the "monitors" edges to the Monitor entity.
func (*AlertChannelCreate) Exec ¶
func (acc *AlertChannelCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertChannelCreate) ExecX ¶
func (acc *AlertChannelCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertChannelCreate) Mutation ¶
func (acc *AlertChannelCreate) Mutation() *AlertChannelMutation
Mutation returns the AlertChannelMutation object of the builder.
func (*AlertChannelCreate) Save ¶
func (acc *AlertChannelCreate) Save(ctx context.Context) (*AlertChannel, error)
Save creates the AlertChannel in the database.
func (*AlertChannelCreate) SaveX ¶
func (acc *AlertChannelCreate) SaveX(ctx context.Context) *AlertChannel
SaveX calls Save and panics if Save returns an error.
func (*AlertChannelCreate) SetAlertChannelType ¶
func (acc *AlertChannelCreate) SetAlertChannelType(s string) *AlertChannelCreate
SetAlertChannelType sets the "alert_channel_type" field.
func (*AlertChannelCreate) SetConfig ¶
func (acc *AlertChannelCreate) SetConfig(m map[string]interface{}) *AlertChannelCreate
SetConfig sets the "config" field.
func (*AlertChannelCreate) SetCreatedAt ¶
func (acc *AlertChannelCreate) SetCreatedAt(t time.Time) *AlertChannelCreate
SetCreatedAt sets the "created_at" field.
func (*AlertChannelCreate) SetID ¶
func (acc *AlertChannelCreate) SetID(s string) *AlertChannelCreate
SetID sets the "id" field.
func (*AlertChannelCreate) SetNillableCreatedAt ¶
func (acc *AlertChannelCreate) SetNillableCreatedAt(t *time.Time) *AlertChannelCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AlertChannelCreate) SetNillableUpdatedAt ¶
func (acc *AlertChannelCreate) SetNillableUpdatedAt(t *time.Time) *AlertChannelCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AlertChannelCreate) SetUpdatedAt ¶
func (acc *AlertChannelCreate) SetUpdatedAt(t time.Time) *AlertChannelCreate
SetUpdatedAt sets the "updated_at" field.
type AlertChannelCreateBulk ¶
type AlertChannelCreateBulk struct {
// contains filtered or unexported fields
}
AlertChannelCreateBulk is the builder for creating many AlertChannel entities in bulk.
func (*AlertChannelCreateBulk) Exec ¶
func (accb *AlertChannelCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertChannelCreateBulk) ExecX ¶
func (accb *AlertChannelCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertChannelCreateBulk) Save ¶
func (accb *AlertChannelCreateBulk) Save(ctx context.Context) ([]*AlertChannel, error)
Save creates the AlertChannel entities in the database.
func (*AlertChannelCreateBulk) SaveX ¶
func (accb *AlertChannelCreateBulk) SaveX(ctx context.Context) []*AlertChannel
SaveX is like Save, but panics if an error occurs.
type AlertChannelDelete ¶
type AlertChannelDelete struct {
// contains filtered or unexported fields
}
AlertChannelDelete is the builder for deleting a AlertChannel entity.
func (*AlertChannelDelete) Exec ¶
func (acd *AlertChannelDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AlertChannelDelete) ExecX ¶
func (acd *AlertChannelDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AlertChannelDelete) Where ¶
func (acd *AlertChannelDelete) Where(ps ...predicate.AlertChannel) *AlertChannelDelete
Where appends a list predicates to the AlertChannelDelete builder.
type AlertChannelDeleteOne ¶
type AlertChannelDeleteOne struct {
// contains filtered or unexported fields
}
AlertChannelDeleteOne is the builder for deleting a single AlertChannel entity.
func (*AlertChannelDeleteOne) Exec ¶
func (acdo *AlertChannelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AlertChannelDeleteOne) ExecX ¶
func (acdo *AlertChannelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AlertChannelEdges ¶
type AlertChannelEdges struct {
// Monitors holds the value of the monitors edge.
Monitors []*Monitor `json:"monitors,omitempty"`
// contains filtered or unexported fields
}
AlertChannelEdges holds the relations/edges for other nodes in the graph.
func (AlertChannelEdges) MonitorsOrErr ¶
func (e AlertChannelEdges) MonitorsOrErr() ([]*Monitor, error)
MonitorsOrErr returns the Monitors value or an error if the edge was not loaded in eager-loading.
type AlertChannelGroupBy ¶
type AlertChannelGroupBy struct {
// contains filtered or unexported fields
}
AlertChannelGroupBy is the group-by builder for AlertChannel entities.
func (*AlertChannelGroupBy) Aggregate ¶
func (acgb *AlertChannelGroupBy) Aggregate(fns ...AggregateFunc) *AlertChannelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AlertChannelGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlertChannelGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlertChannelGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlertChannelGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlertChannelGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlertChannelGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlertChannelGroupBy) Scan ¶
func (acgb *AlertChannelGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*AlertChannelGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlertChannelMutation ¶
type AlertChannelMutation struct {
// contains filtered or unexported fields
}
AlertChannelMutation represents an operation that mutates the AlertChannel nodes in the graph.
func (*AlertChannelMutation) AddField ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) AddMonitorIDs ¶
func (m *AlertChannelMutation) AddMonitorIDs(ids ...string)
AddMonitorIDs adds the "monitors" edge to the Monitor entity by ids.
func (*AlertChannelMutation) AddedEdges ¶
func (m *AlertChannelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AlertChannelMutation) AddedField ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) AddedFields ¶
func (m *AlertChannelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AlertChannelMutation) AddedIDs ¶
func (m *AlertChannelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AlertChannelMutation) AlertChannelType ¶
func (m *AlertChannelMutation) AlertChannelType() (r string, exists bool)
AlertChannelType returns the value of the "alert_channel_type" field in the mutation.
func (*AlertChannelMutation) ClearEdge ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) ClearField ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) ClearMonitors ¶
func (m *AlertChannelMutation) ClearMonitors()
ClearMonitors clears the "monitors" edge to the Monitor entity.
func (*AlertChannelMutation) ClearedEdges ¶
func (m *AlertChannelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AlertChannelMutation) ClearedFields ¶
func (m *AlertChannelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AlertChannelMutation) Client ¶
func (m AlertChannelMutation) 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 (*AlertChannelMutation) Config ¶
func (m *AlertChannelMutation) Config() (r map[string]interface{}, exists bool)
Config returns the value of the "config" field in the mutation.
func (*AlertChannelMutation) CreatedAt ¶
func (m *AlertChannelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AlertChannelMutation) EdgeCleared ¶
func (m *AlertChannelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AlertChannelMutation) Field ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) FieldCleared ¶
func (m *AlertChannelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AlertChannelMutation) Fields ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) ID ¶
func (m *AlertChannelMutation) ID() (id string, 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 (*AlertChannelMutation) IDs ¶
func (m *AlertChannelMutation) IDs(ctx context.Context) ([]string, 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 (*AlertChannelMutation) MonitorsCleared ¶
func (m *AlertChannelMutation) MonitorsCleared() bool
MonitorsCleared reports if the "monitors" edge to the Monitor entity was cleared.
func (*AlertChannelMutation) MonitorsIDs ¶
func (m *AlertChannelMutation) MonitorsIDs() (ids []string)
MonitorsIDs returns the "monitors" edge IDs in the mutation.
func (*AlertChannelMutation) OldAlertChannelType ¶
func (m *AlertChannelMutation) OldAlertChannelType(ctx context.Context) (v string, err error)
OldAlertChannelType returns the old "alert_channel_type" field's value of the AlertChannel entity. If the AlertChannel 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 (*AlertChannelMutation) OldConfig ¶
func (m *AlertChannelMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
OldConfig returns the old "config" field's value of the AlertChannel entity. If the AlertChannel 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 (*AlertChannelMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the AlertChannel entity. If the AlertChannel 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 (*AlertChannelMutation) 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 (*AlertChannelMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the AlertChannel entity. If the AlertChannel 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 (*AlertChannelMutation) Op ¶
func (m *AlertChannelMutation) Op() Op
Op returns the operation name.
func (*AlertChannelMutation) RemoveMonitorIDs ¶
func (m *AlertChannelMutation) RemoveMonitorIDs(ids ...string)
RemoveMonitorIDs removes the "monitors" edge to the Monitor entity by IDs.
func (*AlertChannelMutation) RemovedEdges ¶
func (m *AlertChannelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AlertChannelMutation) RemovedIDs ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) RemovedMonitorsIDs ¶
func (m *AlertChannelMutation) RemovedMonitorsIDs() (ids []string)
RemovedMonitors returns the removed IDs of the "monitors" edge to the Monitor entity.
func (*AlertChannelMutation) ResetAlertChannelType ¶
func (m *AlertChannelMutation) ResetAlertChannelType()
ResetAlertChannelType resets all changes to the "alert_channel_type" field.
func (*AlertChannelMutation) ResetConfig ¶
func (m *AlertChannelMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*AlertChannelMutation) ResetCreatedAt ¶
func (m *AlertChannelMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AlertChannelMutation) ResetEdge ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) ResetField ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) ResetMonitors ¶
func (m *AlertChannelMutation) ResetMonitors()
ResetMonitors resets all changes to the "monitors" edge.
func (*AlertChannelMutation) ResetUpdatedAt ¶
func (m *AlertChannelMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AlertChannelMutation) SetAlertChannelType ¶
func (m *AlertChannelMutation) SetAlertChannelType(s string)
SetAlertChannelType sets the "alert_channel_type" field.
func (*AlertChannelMutation) SetConfig ¶
func (m *AlertChannelMutation) SetConfig(value map[string]interface{})
SetConfig sets the "config" field.
func (*AlertChannelMutation) SetCreatedAt ¶
func (m *AlertChannelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AlertChannelMutation) SetField ¶
func (m *AlertChannelMutation) 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 (*AlertChannelMutation) SetID ¶
func (m *AlertChannelMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of AlertChannel entities.
func (*AlertChannelMutation) SetUpdatedAt ¶
func (m *AlertChannelMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (AlertChannelMutation) Tx ¶
func (m AlertChannelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AlertChannelMutation) Type ¶
func (m *AlertChannelMutation) Type() string
Type returns the node type of this mutation (AlertChannel).
func (*AlertChannelMutation) UpdatedAt ¶
func (m *AlertChannelMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AlertChannelMutation) Where ¶
func (m *AlertChannelMutation) Where(ps ...predicate.AlertChannel)
Where appends a list predicates to the AlertChannelMutation builder.
type AlertChannelQuery ¶
type AlertChannelQuery struct {
// contains filtered or unexported fields
}
AlertChannelQuery is the builder for querying AlertChannel entities.
func (*AlertChannelQuery) Aggregate ¶
func (acq *AlertChannelQuery) Aggregate(fns ...AggregateFunc) *AlertChannelSelect
Aggregate returns a AlertChannelSelect configured with the given aggregations.
func (*AlertChannelQuery) All ¶
func (acq *AlertChannelQuery) All(ctx context.Context) ([]*AlertChannel, error)
All executes the query and returns a list of AlertChannels.
func (*AlertChannelQuery) AllX ¶
func (acq *AlertChannelQuery) AllX(ctx context.Context) []*AlertChannel
AllX is like All, but panics if an error occurs.
func (*AlertChannelQuery) Clone ¶
func (acq *AlertChannelQuery) Clone() *AlertChannelQuery
Clone returns a duplicate of the AlertChannelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AlertChannelQuery) Count ¶
func (acq *AlertChannelQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AlertChannelQuery) CountX ¶
func (acq *AlertChannelQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AlertChannelQuery) Exist ¶
func (acq *AlertChannelQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AlertChannelQuery) ExistX ¶
func (acq *AlertChannelQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AlertChannelQuery) First ¶
func (acq *AlertChannelQuery) First(ctx context.Context) (*AlertChannel, error)
First returns the first AlertChannel entity from the query. Returns a *NotFoundError when no AlertChannel was found.
func (*AlertChannelQuery) FirstID ¶
func (acq *AlertChannelQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first AlertChannel ID from the query. Returns a *NotFoundError when no AlertChannel ID was found.
func (*AlertChannelQuery) FirstIDX ¶
func (acq *AlertChannelQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*AlertChannelQuery) FirstX ¶
func (acq *AlertChannelQuery) FirstX(ctx context.Context) *AlertChannel
FirstX is like First, but panics if an error occurs.
func (*AlertChannelQuery) GroupBy ¶
func (acq *AlertChannelQuery) GroupBy(field string, fields ...string) *AlertChannelGroupBy
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 {
AlertChannelType string `json:"alert_channel_type,omitempty"`
Count int `json:"count,omitempty"`
}
client.AlertChannel.Query().
GroupBy(alertchannel.FieldAlertChannelType).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*AlertChannelQuery) IDs ¶
func (acq *AlertChannelQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of AlertChannel IDs.
func (*AlertChannelQuery) IDsX ¶
func (acq *AlertChannelQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*AlertChannelQuery) Limit ¶
func (acq *AlertChannelQuery) Limit(limit int) *AlertChannelQuery
Limit adds a limit step to the query.
func (*AlertChannelQuery) Offset ¶
func (acq *AlertChannelQuery) Offset(offset int) *AlertChannelQuery
Offset adds an offset step to the query.
func (*AlertChannelQuery) Only ¶
func (acq *AlertChannelQuery) Only(ctx context.Context) (*AlertChannel, error)
Only returns a single AlertChannel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one AlertChannel entity is found. Returns a *NotFoundError when no AlertChannel entities are found.
func (*AlertChannelQuery) OnlyID ¶
func (acq *AlertChannelQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only AlertChannel ID in the query. Returns a *NotSingularError when more than one AlertChannel ID is found. Returns a *NotFoundError when no entities are found.
func (*AlertChannelQuery) OnlyIDX ¶
func (acq *AlertChannelQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AlertChannelQuery) OnlyX ¶
func (acq *AlertChannelQuery) OnlyX(ctx context.Context) *AlertChannel
OnlyX is like Only, but panics if an error occurs.
func (*AlertChannelQuery) Order ¶
func (acq *AlertChannelQuery) Order(o ...OrderFunc) *AlertChannelQuery
Order adds an order step to the query.
func (*AlertChannelQuery) QueryMonitors ¶
func (acq *AlertChannelQuery) QueryMonitors() *MonitorQuery
QueryMonitors chains the current query on the "monitors" edge.
func (*AlertChannelQuery) Select ¶
func (acq *AlertChannelQuery) Select(fields ...string) *AlertChannelSelect
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 {
AlertChannelType string `json:"alert_channel_type,omitempty"`
}
client.AlertChannel.Query().
Select(alertchannel.FieldAlertChannelType).
Scan(ctx, &v)
func (*AlertChannelQuery) Unique ¶
func (acq *AlertChannelQuery) Unique(unique bool) *AlertChannelQuery
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 (*AlertChannelQuery) Where ¶
func (acq *AlertChannelQuery) Where(ps ...predicate.AlertChannel) *AlertChannelQuery
Where adds a new predicate for the AlertChannelQuery builder.
func (*AlertChannelQuery) WithMonitors ¶
func (acq *AlertChannelQuery) WithMonitors(opts ...func(*MonitorQuery)) *AlertChannelQuery
WithMonitors tells the query-builder to eager-load the nodes that are connected to the "monitors" edge. The optional arguments are used to configure the query builder of the edge.
type AlertChannelSelect ¶
type AlertChannelSelect struct {
*AlertChannelQuery
// contains filtered or unexported fields
}
AlertChannelSelect is the builder for selecting fields of AlertChannel entities.
func (*AlertChannelSelect) Aggregate ¶
func (acs *AlertChannelSelect) Aggregate(fns ...AggregateFunc) *AlertChannelSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AlertChannelSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AlertChannelSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AlertChannelSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AlertChannelSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AlertChannelSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AlertChannelSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AlertChannelSelect) Scan ¶
func (acs *AlertChannelSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AlertChannelSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AlertChannelUpdate ¶
type AlertChannelUpdate struct {
// contains filtered or unexported fields
}
AlertChannelUpdate is the builder for updating AlertChannel entities.
func (*AlertChannelUpdate) AddMonitorIDs ¶
func (acu *AlertChannelUpdate) AddMonitorIDs(ids ...string) *AlertChannelUpdate
AddMonitorIDs adds the "monitors" edge to the Monitor entity by IDs.
func (*AlertChannelUpdate) AddMonitors ¶
func (acu *AlertChannelUpdate) AddMonitors(m ...*Monitor) *AlertChannelUpdate
AddMonitors adds the "monitors" edges to the Monitor entity.
func (*AlertChannelUpdate) ClearMonitors ¶
func (acu *AlertChannelUpdate) ClearMonitors() *AlertChannelUpdate
ClearMonitors clears all "monitors" edges to the Monitor entity.
func (*AlertChannelUpdate) Exec ¶
func (acu *AlertChannelUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AlertChannelUpdate) ExecX ¶
func (acu *AlertChannelUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertChannelUpdate) Mutation ¶
func (acu *AlertChannelUpdate) Mutation() *AlertChannelMutation
Mutation returns the AlertChannelMutation object of the builder.
func (*AlertChannelUpdate) RemoveMonitorIDs ¶
func (acu *AlertChannelUpdate) RemoveMonitorIDs(ids ...string) *AlertChannelUpdate
RemoveMonitorIDs removes the "monitors" edge to Monitor entities by IDs.
func (*AlertChannelUpdate) RemoveMonitors ¶
func (acu *AlertChannelUpdate) RemoveMonitors(m ...*Monitor) *AlertChannelUpdate
RemoveMonitors removes "monitors" edges to Monitor entities.
func (*AlertChannelUpdate) Save ¶
func (acu *AlertChannelUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AlertChannelUpdate) SaveX ¶
func (acu *AlertChannelUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AlertChannelUpdate) SetConfig ¶
func (acu *AlertChannelUpdate) SetConfig(m map[string]interface{}) *AlertChannelUpdate
SetConfig sets the "config" field.
func (*AlertChannelUpdate) SetCreatedAt ¶
func (acu *AlertChannelUpdate) SetCreatedAt(t time.Time) *AlertChannelUpdate
SetCreatedAt sets the "created_at" field.
func (*AlertChannelUpdate) SetNillableCreatedAt ¶
func (acu *AlertChannelUpdate) SetNillableCreatedAt(t *time.Time) *AlertChannelUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AlertChannelUpdate) SetUpdatedAt ¶
func (acu *AlertChannelUpdate) SetUpdatedAt(t time.Time) *AlertChannelUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AlertChannelUpdate) Where ¶
func (acu *AlertChannelUpdate) Where(ps ...predicate.AlertChannel) *AlertChannelUpdate
Where appends a list predicates to the AlertChannelUpdate builder.
type AlertChannelUpdateOne ¶
type AlertChannelUpdateOne struct {
// contains filtered or unexported fields
}
AlertChannelUpdateOne is the builder for updating a single AlertChannel entity.
func (*AlertChannelUpdateOne) AddMonitorIDs ¶
func (acuo *AlertChannelUpdateOne) AddMonitorIDs(ids ...string) *AlertChannelUpdateOne
AddMonitorIDs adds the "monitors" edge to the Monitor entity by IDs.
func (*AlertChannelUpdateOne) AddMonitors ¶
func (acuo *AlertChannelUpdateOne) AddMonitors(m ...*Monitor) *AlertChannelUpdateOne
AddMonitors adds the "monitors" edges to the Monitor entity.
func (*AlertChannelUpdateOne) ClearMonitors ¶
func (acuo *AlertChannelUpdateOne) ClearMonitors() *AlertChannelUpdateOne
ClearMonitors clears all "monitors" edges to the Monitor entity.
func (*AlertChannelUpdateOne) Exec ¶
func (acuo *AlertChannelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AlertChannelUpdateOne) ExecX ¶
func (acuo *AlertChannelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AlertChannelUpdateOne) Mutation ¶
func (acuo *AlertChannelUpdateOne) Mutation() *AlertChannelMutation
Mutation returns the AlertChannelMutation object of the builder.
func (*AlertChannelUpdateOne) RemoveMonitorIDs ¶
func (acuo *AlertChannelUpdateOne) RemoveMonitorIDs(ids ...string) *AlertChannelUpdateOne
RemoveMonitorIDs removes the "monitors" edge to Monitor entities by IDs.
func (*AlertChannelUpdateOne) RemoveMonitors ¶
func (acuo *AlertChannelUpdateOne) RemoveMonitors(m ...*Monitor) *AlertChannelUpdateOne
RemoveMonitors removes "monitors" edges to Monitor entities.
func (*AlertChannelUpdateOne) Save ¶
func (acuo *AlertChannelUpdateOne) Save(ctx context.Context) (*AlertChannel, error)
Save executes the query and returns the updated AlertChannel entity.
func (*AlertChannelUpdateOne) SaveX ¶
func (acuo *AlertChannelUpdateOne) SaveX(ctx context.Context) *AlertChannel
SaveX is like Save, but panics if an error occurs.
func (*AlertChannelUpdateOne) Select ¶
func (acuo *AlertChannelUpdateOne) Select(field string, fields ...string) *AlertChannelUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AlertChannelUpdateOne) SetConfig ¶
func (acuo *AlertChannelUpdateOne) SetConfig(m map[string]interface{}) *AlertChannelUpdateOne
SetConfig sets the "config" field.
func (*AlertChannelUpdateOne) SetCreatedAt ¶
func (acuo *AlertChannelUpdateOne) SetCreatedAt(t time.Time) *AlertChannelUpdateOne
SetCreatedAt sets the "created_at" field.
func (*AlertChannelUpdateOne) SetNillableCreatedAt ¶
func (acuo *AlertChannelUpdateOne) SetNillableCreatedAt(t *time.Time) *AlertChannelUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AlertChannelUpdateOne) SetUpdatedAt ¶
func (acuo *AlertChannelUpdateOne) SetUpdatedAt(t time.Time) *AlertChannelUpdateOne
SetUpdatedAt sets the "updated_at" field.
type AlertChannels ¶
type AlertChannels []*AlertChannel
AlertChannels is a parsable slice of AlertChannel.
type Client ¶
type Client struct {
// Schema is the client for creating, migrating and dropping schema.
Schema *migrate.Schema
// AlertChannel is the client for interacting with the AlertChannel builders.
AlertChannel *AlertChannelClient
// Monitor is the client for interacting with the Monitor builders.
Monitor *MonitorClient
// Secret is the client for interacting with the Secret builders.
Secret *SecretClient
// Sink is the client for interacting with the Sink builders.
Sink *SinkClient
// User is the client for interacting with the User builders.
User *UserClient
// 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(). AlertChannel. Query(). Count(ctx)
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer {
return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Commit(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type 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 Monitor ¶
type Monitor struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// Description holds the value of the "description" field.
Description string `json:"description,omitempty"`
// CurrentDownReason holds the value of the "current_down_reason" field.
CurrentDownReason string `json:"current_down_reason,omitempty"`
// Status holds the value of the "status" field.
Status string `json:"status,omitempty"`
// LastCheckedAt holds the value of the "last_checked_at" field.
LastCheckedAt *time.Time `json:"last_checked_at,omitempty"`
// StatusLastChangedAt holds the value of the "status_last_changed_at" field.
StatusLastChangedAt time.Time `json:"status_last_changed_at,omitempty"`
// MonitorType holds the value of the "monitor_type" field.
MonitorType string `json:"monitor_type,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Config holds the value of the "config" field.
Config map[string]interface{} `json:"config,omitempty"`
// IntervalSeconds holds the value of the "interval_seconds" field.
IntervalSeconds int `json:"interval_seconds,omitempty"`
// Paused holds the value of the "paused" field.
Paused bool `json:"paused,omitempty"`
// FailureCount holds the value of the "failure_count" field.
FailureCount int `json:"failure_count,omitempty"`
// SuccessCount holds the value of the "success_count" field.
SuccessCount int `json:"success_count,omitempty"`
// SuccessThreshold holds the value of the "success_threshold" field.
SuccessThreshold int `json:"success_threshold,omitempty"`
// FailureThreshold holds the value of the "failure_threshold" field.
FailureThreshold int `json:"failure_threshold,omitempty"`
// Tags holds the value of the "tags" field.
Tags []string `json:"tags,omitempty"`
// Silenced holds the value of the "silenced" field.
Silenced bool `json:"silenced,omitempty"`
// Edges holds the relations/edges for other nodes in the graph.
// The values are being populated by the MonitorQuery when eager-loading is set.
Edges MonitorEdges `json:"edges"`
// contains filtered or unexported fields
}
Monitor is the model entity for the Monitor schema.
func (*Monitor) QueryAlertChannels ¶
func (m *Monitor) QueryAlertChannels() *AlertChannelQuery
QueryAlertChannels queries the "alert_channels" edge of the Monitor entity.
func (*Monitor) Unwrap ¶
Unwrap unwraps the Monitor 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 (*Monitor) Update ¶
func (m *Monitor) Update() *MonitorUpdateOne
Update returns a builder for updating this Monitor. Note that you need to call Monitor.Unwrap() before calling this method if this Monitor was returned from a transaction, and the transaction was committed or rolled back.
type MonitorClient ¶
type MonitorClient struct {
// contains filtered or unexported fields
}
MonitorClient is a client for the Monitor schema.
func NewMonitorClient ¶
func NewMonitorClient(c config) *MonitorClient
NewMonitorClient returns a client for the Monitor from the given config.
func (*MonitorClient) Create ¶
func (c *MonitorClient) Create() *MonitorCreate
Create returns a builder for creating a Monitor entity.
func (*MonitorClient) CreateBulk ¶
func (c *MonitorClient) CreateBulk(builders ...*MonitorCreate) *MonitorCreateBulk
CreateBulk returns a builder for creating a bulk of Monitor entities.
func (*MonitorClient) Delete ¶
func (c *MonitorClient) Delete() *MonitorDelete
Delete returns a delete builder for Monitor.
func (*MonitorClient) DeleteOne ¶
func (c *MonitorClient) DeleteOne(m *Monitor) *MonitorDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MonitorClient) DeleteOneID ¶
func (c *MonitorClient) DeleteOneID(id string) *MonitorDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MonitorClient) GetX ¶
func (c *MonitorClient) GetX(ctx context.Context, id string) *Monitor
GetX is like Get, but panics if an error occurs.
func (*MonitorClient) Hooks ¶
func (c *MonitorClient) Hooks() []Hook
Hooks returns the client hooks.
func (*MonitorClient) Query ¶
func (c *MonitorClient) Query() *MonitorQuery
Query returns a query builder for Monitor.
func (*MonitorClient) QueryAlertChannels ¶
func (c *MonitorClient) QueryAlertChannels(m *Monitor) *AlertChannelQuery
QueryAlertChannels queries the alert_channels edge of a Monitor.
func (*MonitorClient) Update ¶
func (c *MonitorClient) Update() *MonitorUpdate
Update returns an update builder for Monitor.
func (*MonitorClient) UpdateOne ¶
func (c *MonitorClient) UpdateOne(m *Monitor) *MonitorUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MonitorClient) UpdateOneID ¶
func (c *MonitorClient) UpdateOneID(id string) *MonitorUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MonitorClient) Use ¶
func (c *MonitorClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `monitor.Hooks(f(g(h())))`.
type MonitorCreate ¶
type MonitorCreate struct {
// contains filtered or unexported fields
}
MonitorCreate is the builder for creating a Monitor entity.
func (*MonitorCreate) AddAlertChannelIDs ¶
func (mc *MonitorCreate) AddAlertChannelIDs(ids ...string) *MonitorCreate
AddAlertChannelIDs adds the "alert_channels" edge to the AlertChannel entity by IDs.
func (*MonitorCreate) AddAlertChannels ¶
func (mc *MonitorCreate) AddAlertChannels(a ...*AlertChannel) *MonitorCreate
AddAlertChannels adds the "alert_channels" edges to the AlertChannel entity.
func (*MonitorCreate) Exec ¶
func (mc *MonitorCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MonitorCreate) ExecX ¶
func (mc *MonitorCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MonitorCreate) Mutation ¶
func (mc *MonitorCreate) Mutation() *MonitorMutation
Mutation returns the MonitorMutation object of the builder.
func (*MonitorCreate) Save ¶
func (mc *MonitorCreate) Save(ctx context.Context) (*Monitor, error)
Save creates the Monitor in the database.
func (*MonitorCreate) SaveX ¶
func (mc *MonitorCreate) SaveX(ctx context.Context) *Monitor
SaveX calls Save and panics if Save returns an error.
func (*MonitorCreate) SetConfig ¶
func (mc *MonitorCreate) SetConfig(m map[string]interface{}) *MonitorCreate
SetConfig sets the "config" field.
func (*MonitorCreate) SetCreatedAt ¶
func (mc *MonitorCreate) SetCreatedAt(t time.Time) *MonitorCreate
SetCreatedAt sets the "created_at" field.
func (*MonitorCreate) SetCurrentDownReason ¶
func (mc *MonitorCreate) SetCurrentDownReason(s string) *MonitorCreate
SetCurrentDownReason sets the "current_down_reason" field.
func (*MonitorCreate) SetDescription ¶
func (mc *MonitorCreate) SetDescription(s string) *MonitorCreate
SetDescription sets the "description" field.
func (*MonitorCreate) SetFailureCount ¶
func (mc *MonitorCreate) SetFailureCount(i int) *MonitorCreate
SetFailureCount sets the "failure_count" field.
func (*MonitorCreate) SetFailureThreshold ¶
func (mc *MonitorCreate) SetFailureThreshold(i int) *MonitorCreate
SetFailureThreshold sets the "failure_threshold" field.
func (*MonitorCreate) SetID ¶
func (mc *MonitorCreate) SetID(s string) *MonitorCreate
SetID sets the "id" field.
func (*MonitorCreate) SetIntervalSeconds ¶
func (mc *MonitorCreate) SetIntervalSeconds(i int) *MonitorCreate
SetIntervalSeconds sets the "interval_seconds" field.
func (*MonitorCreate) SetLastCheckedAt ¶
func (mc *MonitorCreate) SetLastCheckedAt(t time.Time) *MonitorCreate
SetLastCheckedAt sets the "last_checked_at" field.
func (*MonitorCreate) SetMonitorType ¶
func (mc *MonitorCreate) SetMonitorType(s string) *MonitorCreate
SetMonitorType sets the "monitor_type" field.
func (*MonitorCreate) SetNillableCreatedAt ¶
func (mc *MonitorCreate) SetNillableCreatedAt(t *time.Time) *MonitorCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MonitorCreate) SetNillableCurrentDownReason ¶
func (mc *MonitorCreate) SetNillableCurrentDownReason(s *string) *MonitorCreate
SetNillableCurrentDownReason sets the "current_down_reason" field if the given value is not nil.
func (*MonitorCreate) SetNillableDescription ¶
func (mc *MonitorCreate) SetNillableDescription(s *string) *MonitorCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MonitorCreate) SetNillableFailureCount ¶
func (mc *MonitorCreate) SetNillableFailureCount(i *int) *MonitorCreate
SetNillableFailureCount sets the "failure_count" field if the given value is not nil.
func (*MonitorCreate) SetNillableFailureThreshold ¶
func (mc *MonitorCreate) SetNillableFailureThreshold(i *int) *MonitorCreate
SetNillableFailureThreshold sets the "failure_threshold" field if the given value is not nil.
func (*MonitorCreate) SetNillableIntervalSeconds ¶
func (mc *MonitorCreate) SetNillableIntervalSeconds(i *int) *MonitorCreate
SetNillableIntervalSeconds sets the "interval_seconds" field if the given value is not nil.
func (*MonitorCreate) SetNillableLastCheckedAt ¶
func (mc *MonitorCreate) SetNillableLastCheckedAt(t *time.Time) *MonitorCreate
SetNillableLastCheckedAt sets the "last_checked_at" field if the given value is not nil.
func (*MonitorCreate) SetNillablePaused ¶
func (mc *MonitorCreate) SetNillablePaused(b *bool) *MonitorCreate
SetNillablePaused sets the "paused" field if the given value is not nil.
func (*MonitorCreate) SetNillableSilenced ¶
func (mc *MonitorCreate) SetNillableSilenced(b *bool) *MonitorCreate
SetNillableSilenced sets the "silenced" field if the given value is not nil.
func (*MonitorCreate) SetNillableStatusLastChangedAt ¶
func (mc *MonitorCreate) SetNillableStatusLastChangedAt(t *time.Time) *MonitorCreate
SetNillableStatusLastChangedAt sets the "status_last_changed_at" field if the given value is not nil.
func (*MonitorCreate) SetNillableSuccessCount ¶
func (mc *MonitorCreate) SetNillableSuccessCount(i *int) *MonitorCreate
SetNillableSuccessCount sets the "success_count" field if the given value is not nil.
func (*MonitorCreate) SetNillableSuccessThreshold ¶
func (mc *MonitorCreate) SetNillableSuccessThreshold(i *int) *MonitorCreate
SetNillableSuccessThreshold sets the "success_threshold" field if the given value is not nil.
func (*MonitorCreate) SetNillableUpdatedAt ¶
func (mc *MonitorCreate) SetNillableUpdatedAt(t *time.Time) *MonitorCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MonitorCreate) SetPaused ¶
func (mc *MonitorCreate) SetPaused(b bool) *MonitorCreate
SetPaused sets the "paused" field.
func (*MonitorCreate) SetSilenced ¶
func (mc *MonitorCreate) SetSilenced(b bool) *MonitorCreate
SetSilenced sets the "silenced" field.
func (*MonitorCreate) SetStatus ¶
func (mc *MonitorCreate) SetStatus(s string) *MonitorCreate
SetStatus sets the "status" field.
func (*MonitorCreate) SetStatusLastChangedAt ¶
func (mc *MonitorCreate) SetStatusLastChangedAt(t time.Time) *MonitorCreate
SetStatusLastChangedAt sets the "status_last_changed_at" field.
func (*MonitorCreate) SetSuccessCount ¶
func (mc *MonitorCreate) SetSuccessCount(i int) *MonitorCreate
SetSuccessCount sets the "success_count" field.
func (*MonitorCreate) SetSuccessThreshold ¶
func (mc *MonitorCreate) SetSuccessThreshold(i int) *MonitorCreate
SetSuccessThreshold sets the "success_threshold" field.
func (*MonitorCreate) SetTags ¶
func (mc *MonitorCreate) SetTags(s []string) *MonitorCreate
SetTags sets the "tags" field.
func (*MonitorCreate) SetUpdatedAt ¶
func (mc *MonitorCreate) SetUpdatedAt(t time.Time) *MonitorCreate
SetUpdatedAt sets the "updated_at" field.
type MonitorCreateBulk ¶
type MonitorCreateBulk struct {
// contains filtered or unexported fields
}
MonitorCreateBulk is the builder for creating many Monitor entities in bulk.
func (*MonitorCreateBulk) Exec ¶
func (mcb *MonitorCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MonitorCreateBulk) ExecX ¶
func (mcb *MonitorCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MonitorDelete ¶
type MonitorDelete struct {
// contains filtered or unexported fields
}
MonitorDelete is the builder for deleting a Monitor entity.
func (*MonitorDelete) Exec ¶
func (md *MonitorDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MonitorDelete) ExecX ¶
func (md *MonitorDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MonitorDelete) Where ¶
func (md *MonitorDelete) Where(ps ...predicate.Monitor) *MonitorDelete
Where appends a list predicates to the MonitorDelete builder.
type MonitorDeleteOne ¶
type MonitorDeleteOne struct {
// contains filtered or unexported fields
}
MonitorDeleteOne is the builder for deleting a single Monitor entity.
func (*MonitorDeleteOne) Exec ¶
func (mdo *MonitorDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MonitorDeleteOne) ExecX ¶
func (mdo *MonitorDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MonitorEdges ¶
type MonitorEdges struct {
// AlertChannels holds the value of the alert_channels edge.
AlertChannels []*AlertChannel `json:"alert_channels,omitempty"`
// contains filtered or unexported fields
}
MonitorEdges holds the relations/edges for other nodes in the graph.
func (MonitorEdges) AlertChannelsOrErr ¶
func (e MonitorEdges) AlertChannelsOrErr() ([]*AlertChannel, error)
AlertChannelsOrErr returns the AlertChannels value or an error if the edge was not loaded in eager-loading.
type MonitorGroupBy ¶
type MonitorGroupBy struct {
// contains filtered or unexported fields
}
MonitorGroupBy is the group-by builder for Monitor entities.
func (*MonitorGroupBy) Aggregate ¶
func (mgb *MonitorGroupBy) Aggregate(fns ...AggregateFunc) *MonitorGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MonitorGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MonitorGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MonitorGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MonitorGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MonitorGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MonitorGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MonitorGroupBy) Scan ¶
func (mgb *MonitorGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*MonitorGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MonitorMutation ¶
type MonitorMutation struct {
// contains filtered or unexported fields
}
MonitorMutation represents an operation that mutates the Monitor nodes in the graph.
func (*MonitorMutation) AddAlertChannelIDs ¶
func (m *MonitorMutation) AddAlertChannelIDs(ids ...string)
AddAlertChannelIDs adds the "alert_channels" edge to the AlertChannel entity by ids.
func (*MonitorMutation) AddFailureCount ¶
func (m *MonitorMutation) AddFailureCount(i int)
AddFailureCount adds i to the "failure_count" field.
func (*MonitorMutation) AddFailureThreshold ¶
func (m *MonitorMutation) AddFailureThreshold(i int)
AddFailureThreshold adds i to the "failure_threshold" field.
func (*MonitorMutation) AddField ¶
func (m *MonitorMutation) 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 (*MonitorMutation) AddIntervalSeconds ¶
func (m *MonitorMutation) AddIntervalSeconds(i int)
AddIntervalSeconds adds i to the "interval_seconds" field.
func (*MonitorMutation) AddSuccessCount ¶
func (m *MonitorMutation) AddSuccessCount(i int)
AddSuccessCount adds i to the "success_count" field.
func (*MonitorMutation) AddSuccessThreshold ¶
func (m *MonitorMutation) AddSuccessThreshold(i int)
AddSuccessThreshold adds i to the "success_threshold" field.
func (*MonitorMutation) AddedEdges ¶
func (m *MonitorMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MonitorMutation) AddedFailureCount ¶
func (m *MonitorMutation) AddedFailureCount() (r int, exists bool)
AddedFailureCount returns the value that was added to the "failure_count" field in this mutation.
func (*MonitorMutation) AddedFailureThreshold ¶
func (m *MonitorMutation) AddedFailureThreshold() (r int, exists bool)
AddedFailureThreshold returns the value that was added to the "failure_threshold" field in this mutation.
func (*MonitorMutation) AddedField ¶
func (m *MonitorMutation) 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 (*MonitorMutation) AddedFields ¶
func (m *MonitorMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MonitorMutation) AddedIDs ¶
func (m *MonitorMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MonitorMutation) AddedIntervalSeconds ¶
func (m *MonitorMutation) AddedIntervalSeconds() (r int, exists bool)
AddedIntervalSeconds returns the value that was added to the "interval_seconds" field in this mutation.
func (*MonitorMutation) AddedSuccessCount ¶
func (m *MonitorMutation) AddedSuccessCount() (r int, exists bool)
AddedSuccessCount returns the value that was added to the "success_count" field in this mutation.
func (*MonitorMutation) AddedSuccessThreshold ¶
func (m *MonitorMutation) AddedSuccessThreshold() (r int, exists bool)
AddedSuccessThreshold returns the value that was added to the "success_threshold" field in this mutation.
func (*MonitorMutation) AlertChannelsCleared ¶
func (m *MonitorMutation) AlertChannelsCleared() bool
AlertChannelsCleared reports if the "alert_channels" edge to the AlertChannel entity was cleared.
func (*MonitorMutation) AlertChannelsIDs ¶
func (m *MonitorMutation) AlertChannelsIDs() (ids []string)
AlertChannelsIDs returns the "alert_channels" edge IDs in the mutation.
func (*MonitorMutation) AppendTags ¶
func (m *MonitorMutation) AppendTags(s []string)
AppendTags adds s to the "tags" field.
func (*MonitorMutation) AppendedTags ¶
func (m *MonitorMutation) AppendedTags() ([]string, bool)
AppendedTags returns the list of values that were appended to the "tags" field in this mutation.
func (*MonitorMutation) ClearAlertChannels ¶
func (m *MonitorMutation) ClearAlertChannels()
ClearAlertChannels clears the "alert_channels" edge to the AlertChannel entity.
func (*MonitorMutation) ClearEdge ¶
func (m *MonitorMutation) 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 (*MonitorMutation) ClearField ¶
func (m *MonitorMutation) 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 (*MonitorMutation) ClearLastCheckedAt ¶
func (m *MonitorMutation) ClearLastCheckedAt()
ClearLastCheckedAt clears the value of the "last_checked_at" field.
func (*MonitorMutation) ClearTags ¶
func (m *MonitorMutation) ClearTags()
ClearTags clears the value of the "tags" field.
func (*MonitorMutation) ClearedEdges ¶
func (m *MonitorMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MonitorMutation) ClearedFields ¶
func (m *MonitorMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MonitorMutation) Client ¶
func (m MonitorMutation) 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 (*MonitorMutation) Config ¶
func (m *MonitorMutation) Config() (r map[string]interface{}, exists bool)
Config returns the value of the "config" field in the mutation.
func (*MonitorMutation) CreatedAt ¶
func (m *MonitorMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MonitorMutation) CurrentDownReason ¶
func (m *MonitorMutation) CurrentDownReason() (r string, exists bool)
CurrentDownReason returns the value of the "current_down_reason" field in the mutation.
func (*MonitorMutation) Description ¶
func (m *MonitorMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*MonitorMutation) EdgeCleared ¶
func (m *MonitorMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MonitorMutation) FailureCount ¶
func (m *MonitorMutation) FailureCount() (r int, exists bool)
FailureCount returns the value of the "failure_count" field in the mutation.
func (*MonitorMutation) FailureThreshold ¶
func (m *MonitorMutation) FailureThreshold() (r int, exists bool)
FailureThreshold returns the value of the "failure_threshold" field in the mutation.
func (*MonitorMutation) Field ¶
func (m *MonitorMutation) 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 (*MonitorMutation) FieldCleared ¶
func (m *MonitorMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MonitorMutation) Fields ¶
func (m *MonitorMutation) 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 (*MonitorMutation) ID ¶
func (m *MonitorMutation) ID() (id string, 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 (*MonitorMutation) IDs ¶
func (m *MonitorMutation) IDs(ctx context.Context) ([]string, 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 (*MonitorMutation) IntervalSeconds ¶
func (m *MonitorMutation) IntervalSeconds() (r int, exists bool)
IntervalSeconds returns the value of the "interval_seconds" field in the mutation.
func (*MonitorMutation) LastCheckedAt ¶
func (m *MonitorMutation) LastCheckedAt() (r time.Time, exists bool)
LastCheckedAt returns the value of the "last_checked_at" field in the mutation.
func (*MonitorMutation) LastCheckedAtCleared ¶
func (m *MonitorMutation) LastCheckedAtCleared() bool
LastCheckedAtCleared returns if the "last_checked_at" field was cleared in this mutation.
func (*MonitorMutation) MonitorType ¶
func (m *MonitorMutation) MonitorType() (r string, exists bool)
MonitorType returns the value of the "monitor_type" field in the mutation.
func (*MonitorMutation) OldConfig ¶
func (m *MonitorMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
OldConfig returns the old "config" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldCurrentDownReason ¶
func (m *MonitorMutation) OldCurrentDownReason(ctx context.Context) (v string, err error)
OldCurrentDownReason returns the old "current_down_reason" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldDescription ¶
func (m *MonitorMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldFailureCount ¶
func (m *MonitorMutation) OldFailureCount(ctx context.Context) (v int, err error)
OldFailureCount returns the old "failure_count" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldFailureThreshold ¶
func (m *MonitorMutation) OldFailureThreshold(ctx context.Context) (v int, err error)
OldFailureThreshold returns the old "failure_threshold" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) 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 (*MonitorMutation) OldIntervalSeconds ¶
func (m *MonitorMutation) OldIntervalSeconds(ctx context.Context) (v int, err error)
OldIntervalSeconds returns the old "interval_seconds" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldLastCheckedAt ¶
OldLastCheckedAt returns the old "last_checked_at" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldMonitorType ¶
func (m *MonitorMutation) OldMonitorType(ctx context.Context) (v string, err error)
OldMonitorType returns the old "monitor_type" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldPaused ¶
func (m *MonitorMutation) OldPaused(ctx context.Context) (v bool, err error)
OldPaused returns the old "paused" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldSilenced ¶
func (m *MonitorMutation) OldSilenced(ctx context.Context) (v bool, err error)
OldSilenced returns the old "silenced" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldStatus ¶
func (m *MonitorMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldStatusLastChangedAt ¶
OldStatusLastChangedAt returns the old "status_last_changed_at" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldSuccessCount ¶
func (m *MonitorMutation) OldSuccessCount(ctx context.Context) (v int, err error)
OldSuccessCount returns the old "success_count" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldSuccessThreshold ¶
func (m *MonitorMutation) OldSuccessThreshold(ctx context.Context) (v int, err error)
OldSuccessThreshold returns the old "success_threshold" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldTags ¶
func (m *MonitorMutation) OldTags(ctx context.Context) (v []string, err error)
OldTags returns the old "tags" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Monitor entity. If the Monitor 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 (*MonitorMutation) Paused ¶
func (m *MonitorMutation) Paused() (r bool, exists bool)
Paused returns the value of the "paused" field in the mutation.
func (*MonitorMutation) RemoveAlertChannelIDs ¶
func (m *MonitorMutation) RemoveAlertChannelIDs(ids ...string)
RemoveAlertChannelIDs removes the "alert_channels" edge to the AlertChannel entity by IDs.
func (*MonitorMutation) RemovedAlertChannelsIDs ¶
func (m *MonitorMutation) RemovedAlertChannelsIDs() (ids []string)
RemovedAlertChannels returns the removed IDs of the "alert_channels" edge to the AlertChannel entity.
func (*MonitorMutation) RemovedEdges ¶
func (m *MonitorMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MonitorMutation) RemovedIDs ¶
func (m *MonitorMutation) 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 (*MonitorMutation) ResetAlertChannels ¶
func (m *MonitorMutation) ResetAlertChannels()
ResetAlertChannels resets all changes to the "alert_channels" edge.
func (*MonitorMutation) ResetConfig ¶
func (m *MonitorMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*MonitorMutation) ResetCreatedAt ¶
func (m *MonitorMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MonitorMutation) ResetCurrentDownReason ¶
func (m *MonitorMutation) ResetCurrentDownReason()
ResetCurrentDownReason resets all changes to the "current_down_reason" field.
func (*MonitorMutation) ResetDescription ¶
func (m *MonitorMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*MonitorMutation) ResetEdge ¶
func (m *MonitorMutation) 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 (*MonitorMutation) ResetFailureCount ¶
func (m *MonitorMutation) ResetFailureCount()
ResetFailureCount resets all changes to the "failure_count" field.
func (*MonitorMutation) ResetFailureThreshold ¶
func (m *MonitorMutation) ResetFailureThreshold()
ResetFailureThreshold resets all changes to the "failure_threshold" field.
func (*MonitorMutation) ResetField ¶
func (m *MonitorMutation) 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 (*MonitorMutation) ResetIntervalSeconds ¶
func (m *MonitorMutation) ResetIntervalSeconds()
ResetIntervalSeconds resets all changes to the "interval_seconds" field.
func (*MonitorMutation) ResetLastCheckedAt ¶
func (m *MonitorMutation) ResetLastCheckedAt()
ResetLastCheckedAt resets all changes to the "last_checked_at" field.
func (*MonitorMutation) ResetMonitorType ¶
func (m *MonitorMutation) ResetMonitorType()
ResetMonitorType resets all changes to the "monitor_type" field.
func (*MonitorMutation) ResetPaused ¶
func (m *MonitorMutation) ResetPaused()
ResetPaused resets all changes to the "paused" field.
func (*MonitorMutation) ResetSilenced ¶
func (m *MonitorMutation) ResetSilenced()
ResetSilenced resets all changes to the "silenced" field.
func (*MonitorMutation) ResetStatus ¶
func (m *MonitorMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*MonitorMutation) ResetStatusLastChangedAt ¶
func (m *MonitorMutation) ResetStatusLastChangedAt()
ResetStatusLastChangedAt resets all changes to the "status_last_changed_at" field.
func (*MonitorMutation) ResetSuccessCount ¶
func (m *MonitorMutation) ResetSuccessCount()
ResetSuccessCount resets all changes to the "success_count" field.
func (*MonitorMutation) ResetSuccessThreshold ¶
func (m *MonitorMutation) ResetSuccessThreshold()
ResetSuccessThreshold resets all changes to the "success_threshold" field.
func (*MonitorMutation) ResetTags ¶
func (m *MonitorMutation) ResetTags()
ResetTags resets all changes to the "tags" field.
func (*MonitorMutation) ResetUpdatedAt ¶
func (m *MonitorMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MonitorMutation) SetConfig ¶
func (m *MonitorMutation) SetConfig(value map[string]interface{})
SetConfig sets the "config" field.
func (*MonitorMutation) SetCreatedAt ¶
func (m *MonitorMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*MonitorMutation) SetCurrentDownReason ¶
func (m *MonitorMutation) SetCurrentDownReason(s string)
SetCurrentDownReason sets the "current_down_reason" field.
func (*MonitorMutation) SetDescription ¶
func (m *MonitorMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*MonitorMutation) SetFailureCount ¶
func (m *MonitorMutation) SetFailureCount(i int)
SetFailureCount sets the "failure_count" field.
func (*MonitorMutation) SetFailureThreshold ¶
func (m *MonitorMutation) SetFailureThreshold(i int)
SetFailureThreshold sets the "failure_threshold" field.
func (*MonitorMutation) SetField ¶
func (m *MonitorMutation) 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 (*MonitorMutation) SetID ¶
func (m *MonitorMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Monitor entities.
func (*MonitorMutation) SetIntervalSeconds ¶
func (m *MonitorMutation) SetIntervalSeconds(i int)
SetIntervalSeconds sets the "interval_seconds" field.
func (*MonitorMutation) SetLastCheckedAt ¶
func (m *MonitorMutation) SetLastCheckedAt(t time.Time)
SetLastCheckedAt sets the "last_checked_at" field.
func (*MonitorMutation) SetMonitorType ¶
func (m *MonitorMutation) SetMonitorType(s string)
SetMonitorType sets the "monitor_type" field.
func (*MonitorMutation) SetPaused ¶
func (m *MonitorMutation) SetPaused(b bool)
SetPaused sets the "paused" field.
func (*MonitorMutation) SetSilenced ¶
func (m *MonitorMutation) SetSilenced(b bool)
SetSilenced sets the "silenced" field.
func (*MonitorMutation) SetStatus ¶
func (m *MonitorMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*MonitorMutation) SetStatusLastChangedAt ¶
func (m *MonitorMutation) SetStatusLastChangedAt(t time.Time)
SetStatusLastChangedAt sets the "status_last_changed_at" field.
func (*MonitorMutation) SetSuccessCount ¶
func (m *MonitorMutation) SetSuccessCount(i int)
SetSuccessCount sets the "success_count" field.
func (*MonitorMutation) SetSuccessThreshold ¶
func (m *MonitorMutation) SetSuccessThreshold(i int)
SetSuccessThreshold sets the "success_threshold" field.
func (*MonitorMutation) SetTags ¶
func (m *MonitorMutation) SetTags(s []string)
SetTags sets the "tags" field.
func (*MonitorMutation) SetUpdatedAt ¶
func (m *MonitorMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*MonitorMutation) Silenced ¶
func (m *MonitorMutation) Silenced() (r bool, exists bool)
Silenced returns the value of the "silenced" field in the mutation.
func (*MonitorMutation) Status ¶
func (m *MonitorMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (*MonitorMutation) StatusLastChangedAt ¶
func (m *MonitorMutation) StatusLastChangedAt() (r time.Time, exists bool)
StatusLastChangedAt returns the value of the "status_last_changed_at" field in the mutation.
func (*MonitorMutation) SuccessCount ¶
func (m *MonitorMutation) SuccessCount() (r int, exists bool)
SuccessCount returns the value of the "success_count" field in the mutation.
func (*MonitorMutation) SuccessThreshold ¶
func (m *MonitorMutation) SuccessThreshold() (r int, exists bool)
SuccessThreshold returns the value of the "success_threshold" field in the mutation.
func (*MonitorMutation) Tags ¶
func (m *MonitorMutation) Tags() (r []string, exists bool)
Tags returns the value of the "tags" field in the mutation.
func (*MonitorMutation) TagsCleared ¶
func (m *MonitorMutation) TagsCleared() bool
TagsCleared returns if the "tags" field was cleared in this mutation.
func (MonitorMutation) Tx ¶
func (m MonitorMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MonitorMutation) Type ¶
func (m *MonitorMutation) Type() string
Type returns the node type of this mutation (Monitor).
func (*MonitorMutation) UpdatedAt ¶
func (m *MonitorMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MonitorMutation) Where ¶
func (m *MonitorMutation) Where(ps ...predicate.Monitor)
Where appends a list predicates to the MonitorMutation builder.
type MonitorQuery ¶
type MonitorQuery struct {
// contains filtered or unexported fields
}
MonitorQuery is the builder for querying Monitor entities.
func (*MonitorQuery) Aggregate ¶
func (mq *MonitorQuery) Aggregate(fns ...AggregateFunc) *MonitorSelect
Aggregate returns a MonitorSelect configured with the given aggregations.
func (*MonitorQuery) All ¶
func (mq *MonitorQuery) All(ctx context.Context) ([]*Monitor, error)
All executes the query and returns a list of Monitors.
func (*MonitorQuery) AllX ¶
func (mq *MonitorQuery) AllX(ctx context.Context) []*Monitor
AllX is like All, but panics if an error occurs.
func (*MonitorQuery) Clone ¶
func (mq *MonitorQuery) Clone() *MonitorQuery
Clone returns a duplicate of the MonitorQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MonitorQuery) Count ¶
func (mq *MonitorQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MonitorQuery) CountX ¶
func (mq *MonitorQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MonitorQuery) Exist ¶
func (mq *MonitorQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MonitorQuery) ExistX ¶
func (mq *MonitorQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MonitorQuery) First ¶
func (mq *MonitorQuery) First(ctx context.Context) (*Monitor, error)
First returns the first Monitor entity from the query. Returns a *NotFoundError when no Monitor was found.
func (*MonitorQuery) FirstID ¶
func (mq *MonitorQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Monitor ID from the query. Returns a *NotFoundError when no Monitor ID was found.
func (*MonitorQuery) FirstIDX ¶
func (mq *MonitorQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*MonitorQuery) FirstX ¶
func (mq *MonitorQuery) FirstX(ctx context.Context) *Monitor
FirstX is like First, but panics if an error occurs.
func (*MonitorQuery) GroupBy ¶
func (mq *MonitorQuery) GroupBy(field string, fields ...string) *MonitorGroupBy
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 {
Description string `json:"description,omitempty"`
Count int `json:"count,omitempty"`
}
client.Monitor.Query().
GroupBy(monitor.FieldDescription).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*MonitorQuery) IDs ¶
func (mq *MonitorQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Monitor IDs.
func (*MonitorQuery) IDsX ¶
func (mq *MonitorQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*MonitorQuery) Limit ¶
func (mq *MonitorQuery) Limit(limit int) *MonitorQuery
Limit adds a limit step to the query.
func (*MonitorQuery) Offset ¶
func (mq *MonitorQuery) Offset(offset int) *MonitorQuery
Offset adds an offset step to the query.
func (*MonitorQuery) Only ¶
func (mq *MonitorQuery) Only(ctx context.Context) (*Monitor, error)
Only returns a single Monitor entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Monitor entity is found. Returns a *NotFoundError when no Monitor entities are found.
func (*MonitorQuery) OnlyID ¶
func (mq *MonitorQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Monitor ID in the query. Returns a *NotSingularError when more than one Monitor ID is found. Returns a *NotFoundError when no entities are found.
func (*MonitorQuery) OnlyIDX ¶
func (mq *MonitorQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MonitorQuery) OnlyX ¶
func (mq *MonitorQuery) OnlyX(ctx context.Context) *Monitor
OnlyX is like Only, but panics if an error occurs.
func (*MonitorQuery) Order ¶
func (mq *MonitorQuery) Order(o ...OrderFunc) *MonitorQuery
Order adds an order step to the query.
func (*MonitorQuery) QueryAlertChannels ¶
func (mq *MonitorQuery) QueryAlertChannels() *AlertChannelQuery
QueryAlertChannels chains the current query on the "alert_channels" edge.
func (*MonitorQuery) Select ¶
func (mq *MonitorQuery) Select(fields ...string) *MonitorSelect
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 {
Description string `json:"description,omitempty"`
}
client.Monitor.Query().
Select(monitor.FieldDescription).
Scan(ctx, &v)
func (*MonitorQuery) Unique ¶
func (mq *MonitorQuery) Unique(unique bool) *MonitorQuery
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 (*MonitorQuery) Where ¶
func (mq *MonitorQuery) Where(ps ...predicate.Monitor) *MonitorQuery
Where adds a new predicate for the MonitorQuery builder.
func (*MonitorQuery) WithAlertChannels ¶
func (mq *MonitorQuery) WithAlertChannels(opts ...func(*AlertChannelQuery)) *MonitorQuery
WithAlertChannels tells the query-builder to eager-load the nodes that are connected to the "alert_channels" edge. The optional arguments are used to configure the query builder of the edge.
type MonitorSelect ¶
type MonitorSelect struct {
*MonitorQuery
// contains filtered or unexported fields
}
MonitorSelect is the builder for selecting fields of Monitor entities.
func (*MonitorSelect) Aggregate ¶
func (ms *MonitorSelect) Aggregate(fns ...AggregateFunc) *MonitorSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MonitorSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MonitorSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MonitorSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MonitorSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MonitorSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MonitorSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MonitorSelect) Scan ¶
func (ms *MonitorSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MonitorSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MonitorUpdate ¶
type MonitorUpdate struct {
// contains filtered or unexported fields
}
MonitorUpdate is the builder for updating Monitor entities.
func (*MonitorUpdate) AddAlertChannelIDs ¶
func (mu *MonitorUpdate) AddAlertChannelIDs(ids ...string) *MonitorUpdate
AddAlertChannelIDs adds the "alert_channels" edge to the AlertChannel entity by IDs.
func (*MonitorUpdate) AddAlertChannels ¶
func (mu *MonitorUpdate) AddAlertChannels(a ...*AlertChannel) *MonitorUpdate
AddAlertChannels adds the "alert_channels" edges to the AlertChannel entity.
func (*MonitorUpdate) AddFailureCount ¶
func (mu *MonitorUpdate) AddFailureCount(i int) *MonitorUpdate
AddFailureCount adds i to the "failure_count" field.
func (*MonitorUpdate) AddFailureThreshold ¶
func (mu *MonitorUpdate) AddFailureThreshold(i int) *MonitorUpdate
AddFailureThreshold adds i to the "failure_threshold" field.
func (*MonitorUpdate) AddIntervalSeconds ¶
func (mu *MonitorUpdate) AddIntervalSeconds(i int) *MonitorUpdate
AddIntervalSeconds adds i to the "interval_seconds" field.
func (*MonitorUpdate) AddSuccessCount ¶
func (mu *MonitorUpdate) AddSuccessCount(i int) *MonitorUpdate
AddSuccessCount adds i to the "success_count" field.
func (*MonitorUpdate) AddSuccessThreshold ¶
func (mu *MonitorUpdate) AddSuccessThreshold(i int) *MonitorUpdate
AddSuccessThreshold adds i to the "success_threshold" field.
func (*MonitorUpdate) AppendTags ¶
func (mu *MonitorUpdate) AppendTags(s []string) *MonitorUpdate
AppendTags appends s to the "tags" field.
func (*MonitorUpdate) ClearAlertChannels ¶
func (mu *MonitorUpdate) ClearAlertChannels() *MonitorUpdate
ClearAlertChannels clears all "alert_channels" edges to the AlertChannel entity.
func (*MonitorUpdate) ClearLastCheckedAt ¶
func (mu *MonitorUpdate) ClearLastCheckedAt() *MonitorUpdate
ClearLastCheckedAt clears the value of the "last_checked_at" field.
func (*MonitorUpdate) ClearTags ¶
func (mu *MonitorUpdate) ClearTags() *MonitorUpdate
ClearTags clears the value of the "tags" field.
func (*MonitorUpdate) Exec ¶
func (mu *MonitorUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MonitorUpdate) ExecX ¶
func (mu *MonitorUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MonitorUpdate) Mutation ¶
func (mu *MonitorUpdate) Mutation() *MonitorMutation
Mutation returns the MonitorMutation object of the builder.
func (*MonitorUpdate) RemoveAlertChannelIDs ¶
func (mu *MonitorUpdate) RemoveAlertChannelIDs(ids ...string) *MonitorUpdate
RemoveAlertChannelIDs removes the "alert_channels" edge to AlertChannel entities by IDs.
func (*MonitorUpdate) RemoveAlertChannels ¶
func (mu *MonitorUpdate) RemoveAlertChannels(a ...*AlertChannel) *MonitorUpdate
RemoveAlertChannels removes "alert_channels" edges to AlertChannel entities.
func (*MonitorUpdate) Save ¶
func (mu *MonitorUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MonitorUpdate) SaveX ¶
func (mu *MonitorUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MonitorUpdate) SetConfig ¶
func (mu *MonitorUpdate) SetConfig(m map[string]interface{}) *MonitorUpdate
SetConfig sets the "config" field.
func (*MonitorUpdate) SetCreatedAt ¶
func (mu *MonitorUpdate) SetCreatedAt(t time.Time) *MonitorUpdate
SetCreatedAt sets the "created_at" field.
func (*MonitorUpdate) SetCurrentDownReason ¶
func (mu *MonitorUpdate) SetCurrentDownReason(s string) *MonitorUpdate
SetCurrentDownReason sets the "current_down_reason" field.
func (*MonitorUpdate) SetDescription ¶
func (mu *MonitorUpdate) SetDescription(s string) *MonitorUpdate
SetDescription sets the "description" field.
func (*MonitorUpdate) SetFailureCount ¶
func (mu *MonitorUpdate) SetFailureCount(i int) *MonitorUpdate
SetFailureCount sets the "failure_count" field.
func (*MonitorUpdate) SetFailureThreshold ¶
func (mu *MonitorUpdate) SetFailureThreshold(i int) *MonitorUpdate
SetFailureThreshold sets the "failure_threshold" field.
func (*MonitorUpdate) SetIntervalSeconds ¶
func (mu *MonitorUpdate) SetIntervalSeconds(i int) *MonitorUpdate
SetIntervalSeconds sets the "interval_seconds" field.
func (*MonitorUpdate) SetLastCheckedAt ¶
func (mu *MonitorUpdate) SetLastCheckedAt(t time.Time) *MonitorUpdate
SetLastCheckedAt sets the "last_checked_at" field.
func (*MonitorUpdate) SetNillableCreatedAt ¶
func (mu *MonitorUpdate) SetNillableCreatedAt(t *time.Time) *MonitorUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MonitorUpdate) SetNillableCurrentDownReason ¶
func (mu *MonitorUpdate) SetNillableCurrentDownReason(s *string) *MonitorUpdate
SetNillableCurrentDownReason sets the "current_down_reason" field if the given value is not nil.
func (*MonitorUpdate) SetNillableDescription ¶
func (mu *MonitorUpdate) SetNillableDescription(s *string) *MonitorUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MonitorUpdate) SetNillableFailureCount ¶
func (mu *MonitorUpdate) SetNillableFailureCount(i *int) *MonitorUpdate
SetNillableFailureCount sets the "failure_count" field if the given value is not nil.
func (*MonitorUpdate) SetNillableFailureThreshold ¶
func (mu *MonitorUpdate) SetNillableFailureThreshold(i *int) *MonitorUpdate
SetNillableFailureThreshold sets the "failure_threshold" field if the given value is not nil.
func (*MonitorUpdate) SetNillableIntervalSeconds ¶
func (mu *MonitorUpdate) SetNillableIntervalSeconds(i *int) *MonitorUpdate
SetNillableIntervalSeconds sets the "interval_seconds" field if the given value is not nil.
func (*MonitorUpdate) SetNillableLastCheckedAt ¶
func (mu *MonitorUpdate) SetNillableLastCheckedAt(t *time.Time) *MonitorUpdate
SetNillableLastCheckedAt sets the "last_checked_at" field if the given value is not nil.
func (*MonitorUpdate) SetNillablePaused ¶
func (mu *MonitorUpdate) SetNillablePaused(b *bool) *MonitorUpdate
SetNillablePaused sets the "paused" field if the given value is not nil.
func (*MonitorUpdate) SetNillableSilenced ¶
func (mu *MonitorUpdate) SetNillableSilenced(b *bool) *MonitorUpdate
SetNillableSilenced sets the "silenced" field if the given value is not nil.
func (*MonitorUpdate) SetNillableStatusLastChangedAt ¶
func (mu *MonitorUpdate) SetNillableStatusLastChangedAt(t *time.Time) *MonitorUpdate
SetNillableStatusLastChangedAt sets the "status_last_changed_at" field if the given value is not nil.
func (*MonitorUpdate) SetNillableSuccessCount ¶
func (mu *MonitorUpdate) SetNillableSuccessCount(i *int) *MonitorUpdate
SetNillableSuccessCount sets the "success_count" field if the given value is not nil.
func (*MonitorUpdate) SetNillableSuccessThreshold ¶
func (mu *MonitorUpdate) SetNillableSuccessThreshold(i *int) *MonitorUpdate
SetNillableSuccessThreshold sets the "success_threshold" field if the given value is not nil.
func (*MonitorUpdate) SetPaused ¶
func (mu *MonitorUpdate) SetPaused(b bool) *MonitorUpdate
SetPaused sets the "paused" field.
func (*MonitorUpdate) SetSilenced ¶
func (mu *MonitorUpdate) SetSilenced(b bool) *MonitorUpdate
SetSilenced sets the "silenced" field.
func (*MonitorUpdate) SetStatus ¶
func (mu *MonitorUpdate) SetStatus(s string) *MonitorUpdate
SetStatus sets the "status" field.
func (*MonitorUpdate) SetStatusLastChangedAt ¶
func (mu *MonitorUpdate) SetStatusLastChangedAt(t time.Time) *MonitorUpdate
SetStatusLastChangedAt sets the "status_last_changed_at" field.
func (*MonitorUpdate) SetSuccessCount ¶
func (mu *MonitorUpdate) SetSuccessCount(i int) *MonitorUpdate
SetSuccessCount sets the "success_count" field.
func (*MonitorUpdate) SetSuccessThreshold ¶
func (mu *MonitorUpdate) SetSuccessThreshold(i int) *MonitorUpdate
SetSuccessThreshold sets the "success_threshold" field.
func (*MonitorUpdate) SetTags ¶
func (mu *MonitorUpdate) SetTags(s []string) *MonitorUpdate
SetTags sets the "tags" field.
func (*MonitorUpdate) SetUpdatedAt ¶
func (mu *MonitorUpdate) SetUpdatedAt(t time.Time) *MonitorUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MonitorUpdate) Where ¶
func (mu *MonitorUpdate) Where(ps ...predicate.Monitor) *MonitorUpdate
Where appends a list predicates to the MonitorUpdate builder.
type MonitorUpdateOne ¶
type MonitorUpdateOne struct {
// contains filtered or unexported fields
}
MonitorUpdateOne is the builder for updating a single Monitor entity.
func (*MonitorUpdateOne) AddAlertChannelIDs ¶
func (muo *MonitorUpdateOne) AddAlertChannelIDs(ids ...string) *MonitorUpdateOne
AddAlertChannelIDs adds the "alert_channels" edge to the AlertChannel entity by IDs.
func (*MonitorUpdateOne) AddAlertChannels ¶
func (muo *MonitorUpdateOne) AddAlertChannels(a ...*AlertChannel) *MonitorUpdateOne
AddAlertChannels adds the "alert_channels" edges to the AlertChannel entity.
func (*MonitorUpdateOne) AddFailureCount ¶
func (muo *MonitorUpdateOne) AddFailureCount(i int) *MonitorUpdateOne
AddFailureCount adds i to the "failure_count" field.
func (*MonitorUpdateOne) AddFailureThreshold ¶
func (muo *MonitorUpdateOne) AddFailureThreshold(i int) *MonitorUpdateOne
AddFailureThreshold adds i to the "failure_threshold" field.
func (*MonitorUpdateOne) AddIntervalSeconds ¶
func (muo *MonitorUpdateOne) AddIntervalSeconds(i int) *MonitorUpdateOne
AddIntervalSeconds adds i to the "interval_seconds" field.
func (*MonitorUpdateOne) AddSuccessCount ¶
func (muo *MonitorUpdateOne) AddSuccessCount(i int) *MonitorUpdateOne
AddSuccessCount adds i to the "success_count" field.
func (*MonitorUpdateOne) AddSuccessThreshold ¶
func (muo *MonitorUpdateOne) AddSuccessThreshold(i int) *MonitorUpdateOne
AddSuccessThreshold adds i to the "success_threshold" field.
func (*MonitorUpdateOne) AppendTags ¶
func (muo *MonitorUpdateOne) AppendTags(s []string) *MonitorUpdateOne
AppendTags appends s to the "tags" field.
func (*MonitorUpdateOne) ClearAlertChannels ¶
func (muo *MonitorUpdateOne) ClearAlertChannels() *MonitorUpdateOne
ClearAlertChannels clears all "alert_channels" edges to the AlertChannel entity.
func (*MonitorUpdateOne) ClearLastCheckedAt ¶
func (muo *MonitorUpdateOne) ClearLastCheckedAt() *MonitorUpdateOne
ClearLastCheckedAt clears the value of the "last_checked_at" field.
func (*MonitorUpdateOne) ClearTags ¶
func (muo *MonitorUpdateOne) ClearTags() *MonitorUpdateOne
ClearTags clears the value of the "tags" field.
func (*MonitorUpdateOne) Exec ¶
func (muo *MonitorUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MonitorUpdateOne) ExecX ¶
func (muo *MonitorUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MonitorUpdateOne) Mutation ¶
func (muo *MonitorUpdateOne) Mutation() *MonitorMutation
Mutation returns the MonitorMutation object of the builder.
func (*MonitorUpdateOne) RemoveAlertChannelIDs ¶
func (muo *MonitorUpdateOne) RemoveAlertChannelIDs(ids ...string) *MonitorUpdateOne
RemoveAlertChannelIDs removes the "alert_channels" edge to AlertChannel entities by IDs.
func (*MonitorUpdateOne) RemoveAlertChannels ¶
func (muo *MonitorUpdateOne) RemoveAlertChannels(a ...*AlertChannel) *MonitorUpdateOne
RemoveAlertChannels removes "alert_channels" edges to AlertChannel entities.
func (*MonitorUpdateOne) Save ¶
func (muo *MonitorUpdateOne) Save(ctx context.Context) (*Monitor, error)
Save executes the query and returns the updated Monitor entity.
func (*MonitorUpdateOne) SaveX ¶
func (muo *MonitorUpdateOne) SaveX(ctx context.Context) *Monitor
SaveX is like Save, but panics if an error occurs.
func (*MonitorUpdateOne) Select ¶
func (muo *MonitorUpdateOne) Select(field string, fields ...string) *MonitorUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MonitorUpdateOne) SetConfig ¶
func (muo *MonitorUpdateOne) SetConfig(m map[string]interface{}) *MonitorUpdateOne
SetConfig sets the "config" field.
func (*MonitorUpdateOne) SetCreatedAt ¶
func (muo *MonitorUpdateOne) SetCreatedAt(t time.Time) *MonitorUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MonitorUpdateOne) SetCurrentDownReason ¶
func (muo *MonitorUpdateOne) SetCurrentDownReason(s string) *MonitorUpdateOne
SetCurrentDownReason sets the "current_down_reason" field.
func (*MonitorUpdateOne) SetDescription ¶
func (muo *MonitorUpdateOne) SetDescription(s string) *MonitorUpdateOne
SetDescription sets the "description" field.
func (*MonitorUpdateOne) SetFailureCount ¶
func (muo *MonitorUpdateOne) SetFailureCount(i int) *MonitorUpdateOne
SetFailureCount sets the "failure_count" field.
func (*MonitorUpdateOne) SetFailureThreshold ¶
func (muo *MonitorUpdateOne) SetFailureThreshold(i int) *MonitorUpdateOne
SetFailureThreshold sets the "failure_threshold" field.
func (*MonitorUpdateOne) SetIntervalSeconds ¶
func (muo *MonitorUpdateOne) SetIntervalSeconds(i int) *MonitorUpdateOne
SetIntervalSeconds sets the "interval_seconds" field.
func (*MonitorUpdateOne) SetLastCheckedAt ¶
func (muo *MonitorUpdateOne) SetLastCheckedAt(t time.Time) *MonitorUpdateOne
SetLastCheckedAt sets the "last_checked_at" field.
func (*MonitorUpdateOne) SetNillableCreatedAt ¶
func (muo *MonitorUpdateOne) SetNillableCreatedAt(t *time.Time) *MonitorUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableCurrentDownReason ¶
func (muo *MonitorUpdateOne) SetNillableCurrentDownReason(s *string) *MonitorUpdateOne
SetNillableCurrentDownReason sets the "current_down_reason" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableDescription ¶
func (muo *MonitorUpdateOne) SetNillableDescription(s *string) *MonitorUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableFailureCount ¶
func (muo *MonitorUpdateOne) SetNillableFailureCount(i *int) *MonitorUpdateOne
SetNillableFailureCount sets the "failure_count" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableFailureThreshold ¶
func (muo *MonitorUpdateOne) SetNillableFailureThreshold(i *int) *MonitorUpdateOne
SetNillableFailureThreshold sets the "failure_threshold" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableIntervalSeconds ¶
func (muo *MonitorUpdateOne) SetNillableIntervalSeconds(i *int) *MonitorUpdateOne
SetNillableIntervalSeconds sets the "interval_seconds" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableLastCheckedAt ¶
func (muo *MonitorUpdateOne) SetNillableLastCheckedAt(t *time.Time) *MonitorUpdateOne
SetNillableLastCheckedAt sets the "last_checked_at" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillablePaused ¶
func (muo *MonitorUpdateOne) SetNillablePaused(b *bool) *MonitorUpdateOne
SetNillablePaused sets the "paused" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableSilenced ¶
func (muo *MonitorUpdateOne) SetNillableSilenced(b *bool) *MonitorUpdateOne
SetNillableSilenced sets the "silenced" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableStatusLastChangedAt ¶
func (muo *MonitorUpdateOne) SetNillableStatusLastChangedAt(t *time.Time) *MonitorUpdateOne
SetNillableStatusLastChangedAt sets the "status_last_changed_at" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableSuccessCount ¶
func (muo *MonitorUpdateOne) SetNillableSuccessCount(i *int) *MonitorUpdateOne
SetNillableSuccessCount sets the "success_count" field if the given value is not nil.
func (*MonitorUpdateOne) SetNillableSuccessThreshold ¶
func (muo *MonitorUpdateOne) SetNillableSuccessThreshold(i *int) *MonitorUpdateOne
SetNillableSuccessThreshold sets the "success_threshold" field if the given value is not nil.
func (*MonitorUpdateOne) SetPaused ¶
func (muo *MonitorUpdateOne) SetPaused(b bool) *MonitorUpdateOne
SetPaused sets the "paused" field.
func (*MonitorUpdateOne) SetSilenced ¶
func (muo *MonitorUpdateOne) SetSilenced(b bool) *MonitorUpdateOne
SetSilenced sets the "silenced" field.
func (*MonitorUpdateOne) SetStatus ¶
func (muo *MonitorUpdateOne) SetStatus(s string) *MonitorUpdateOne
SetStatus sets the "status" field.
func (*MonitorUpdateOne) SetStatusLastChangedAt ¶
func (muo *MonitorUpdateOne) SetStatusLastChangedAt(t time.Time) *MonitorUpdateOne
SetStatusLastChangedAt sets the "status_last_changed_at" field.
func (*MonitorUpdateOne) SetSuccessCount ¶
func (muo *MonitorUpdateOne) SetSuccessCount(i int) *MonitorUpdateOne
SetSuccessCount sets the "success_count" field.
func (*MonitorUpdateOne) SetSuccessThreshold ¶
func (muo *MonitorUpdateOne) SetSuccessThreshold(i int) *MonitorUpdateOne
SetSuccessThreshold sets the "success_threshold" field.
func (*MonitorUpdateOne) SetTags ¶
func (muo *MonitorUpdateOne) SetTags(s []string) *MonitorUpdateOne
SetTags sets the "tags" field.
func (*MonitorUpdateOne) SetUpdatedAt ¶
func (muo *MonitorUpdateOne) SetUpdatedAt(t time.Time) *MonitorUpdateOne
SetUpdatedAt sets the "updated_at" field.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker {
return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
// Do some stuff before.
if err := next.Rollback(ctx, tx); err != nil {
return err
}
// Do some stuff after.
return nil
})
}
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Secret ¶
type Secret struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// CreatedBy holds the value of the "created_by" field.
CreatedBy string `json:"created_by,omitempty"`
// Value holds the value of the "value" field.
Value string `json:"value,omitempty"`
// contains filtered or unexported fields
}
Secret is the model entity for the Secret schema.
func (*Secret) Unwrap ¶
Unwrap unwraps the Secret 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 (*Secret) Update ¶
func (s *Secret) Update() *SecretUpdateOne
Update returns a builder for updating this Secret. Note that you need to call Secret.Unwrap() before calling this method if this Secret was returned from a transaction, and the transaction was committed or rolled back.
type SecretClient ¶
type SecretClient struct {
// contains filtered or unexported fields
}
SecretClient is a client for the Secret schema.
func NewSecretClient ¶
func NewSecretClient(c config) *SecretClient
NewSecretClient returns a client for the Secret from the given config.
func (*SecretClient) Create ¶
func (c *SecretClient) Create() *SecretCreate
Create returns a builder for creating a Secret entity.
func (*SecretClient) CreateBulk ¶
func (c *SecretClient) CreateBulk(builders ...*SecretCreate) *SecretCreateBulk
CreateBulk returns a builder for creating a bulk of Secret entities.
func (*SecretClient) Delete ¶
func (c *SecretClient) Delete() *SecretDelete
Delete returns a delete builder for Secret.
func (*SecretClient) DeleteOne ¶
func (c *SecretClient) DeleteOne(s *Secret) *SecretDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SecretClient) DeleteOneID ¶
func (c *SecretClient) DeleteOneID(id string) *SecretDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SecretClient) GetX ¶
func (c *SecretClient) GetX(ctx context.Context, id string) *Secret
GetX is like Get, but panics if an error occurs.
func (*SecretClient) Query ¶
func (c *SecretClient) Query() *SecretQuery
Query returns a query builder for Secret.
func (*SecretClient) Update ¶
func (c *SecretClient) Update() *SecretUpdate
Update returns an update builder for Secret.
func (*SecretClient) UpdateOne ¶
func (c *SecretClient) UpdateOne(s *Secret) *SecretUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SecretClient) UpdateOneID ¶
func (c *SecretClient) UpdateOneID(id string) *SecretUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SecretClient) Use ¶
func (c *SecretClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `secret.Hooks(f(g(h())))`.
type SecretCreate ¶
type SecretCreate struct {
// contains filtered or unexported fields
}
SecretCreate is the builder for creating a Secret entity.
func (*SecretCreate) Exec ¶
func (sc *SecretCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretCreate) ExecX ¶
func (sc *SecretCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretCreate) Mutation ¶
func (sc *SecretCreate) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretCreate) Save ¶
func (sc *SecretCreate) Save(ctx context.Context) (*Secret, error)
Save creates the Secret in the database.
func (*SecretCreate) SaveX ¶
func (sc *SecretCreate) SaveX(ctx context.Context) *Secret
SaveX calls Save and panics if Save returns an error.
func (*SecretCreate) SetCreatedAt ¶
func (sc *SecretCreate) SetCreatedAt(t time.Time) *SecretCreate
SetCreatedAt sets the "created_at" field.
func (*SecretCreate) SetCreatedBy ¶
func (sc *SecretCreate) SetCreatedBy(s string) *SecretCreate
SetCreatedBy sets the "created_by" field.
func (*SecretCreate) SetID ¶
func (sc *SecretCreate) SetID(s string) *SecretCreate
SetID sets the "id" field.
func (*SecretCreate) SetNillableCreatedAt ¶
func (sc *SecretCreate) SetNillableCreatedAt(t *time.Time) *SecretCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SecretCreate) SetNillableCreatedBy ¶
func (sc *SecretCreate) SetNillableCreatedBy(s *string) *SecretCreate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*SecretCreate) SetNillableUpdatedAt ¶
func (sc *SecretCreate) SetNillableUpdatedAt(t *time.Time) *SecretCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SecretCreate) SetUpdatedAt ¶
func (sc *SecretCreate) SetUpdatedAt(t time.Time) *SecretCreate
SetUpdatedAt sets the "updated_at" field.
func (*SecretCreate) SetValue ¶
func (sc *SecretCreate) SetValue(s string) *SecretCreate
SetValue sets the "value" field.
type SecretCreateBulk ¶
type SecretCreateBulk struct {
// contains filtered or unexported fields
}
SecretCreateBulk is the builder for creating many Secret entities in bulk.
func (*SecretCreateBulk) Exec ¶
func (scb *SecretCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretCreateBulk) ExecX ¶
func (scb *SecretCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SecretDelete ¶
type SecretDelete struct {
// contains filtered or unexported fields
}
SecretDelete is the builder for deleting a Secret entity.
func (*SecretDelete) Exec ¶
func (sd *SecretDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SecretDelete) ExecX ¶
func (sd *SecretDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SecretDelete) Where ¶
func (sd *SecretDelete) Where(ps ...predicate.Secret) *SecretDelete
Where appends a list predicates to the SecretDelete builder.
type SecretDeleteOne ¶
type SecretDeleteOne struct {
// contains filtered or unexported fields
}
SecretDeleteOne is the builder for deleting a single Secret entity.
func (*SecretDeleteOne) Exec ¶
func (sdo *SecretDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SecretDeleteOne) ExecX ¶
func (sdo *SecretDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SecretGroupBy ¶
type SecretGroupBy struct {
// contains filtered or unexported fields
}
SecretGroupBy is the group-by builder for Secret entities.
func (*SecretGroupBy) Aggregate ¶
func (sgb *SecretGroupBy) Aggregate(fns ...AggregateFunc) *SecretGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SecretGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SecretGroupBy) Scan ¶
func (sgb *SecretGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*SecretGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SecretMutation ¶
type SecretMutation struct {
// contains filtered or unexported fields
}
SecretMutation represents an operation that mutates the Secret nodes in the graph.
func (*SecretMutation) AddField ¶
func (m *SecretMutation) 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 (*SecretMutation) AddedEdges ¶
func (m *SecretMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SecretMutation) AddedField ¶
func (m *SecretMutation) 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 (*SecretMutation) AddedFields ¶
func (m *SecretMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SecretMutation) AddedIDs ¶
func (m *SecretMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SecretMutation) ClearEdge ¶
func (m *SecretMutation) 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 (*SecretMutation) ClearField ¶
func (m *SecretMutation) 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 (*SecretMutation) ClearedEdges ¶
func (m *SecretMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SecretMutation) ClearedFields ¶
func (m *SecretMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SecretMutation) Client ¶
func (m SecretMutation) 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 (*SecretMutation) CreatedAt ¶
func (m *SecretMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SecretMutation) CreatedBy ¶
func (m *SecretMutation) CreatedBy() (r string, exists bool)
CreatedBy returns the value of the "created_by" field in the mutation.
func (*SecretMutation) EdgeCleared ¶
func (m *SecretMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SecretMutation) Field ¶
func (m *SecretMutation) 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 (*SecretMutation) FieldCleared ¶
func (m *SecretMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SecretMutation) Fields ¶
func (m *SecretMutation) 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 (*SecretMutation) ID ¶
func (m *SecretMutation) ID() (id string, 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 (*SecretMutation) IDs ¶
func (m *SecretMutation) IDs(ctx context.Context) ([]string, 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 (*SecretMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Secret entity. If the Secret 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 (*SecretMutation) OldCreatedBy ¶
func (m *SecretMutation) OldCreatedBy(ctx context.Context) (v string, err error)
OldCreatedBy returns the old "created_by" field's value of the Secret entity. If the Secret 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 (*SecretMutation) 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 (*SecretMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Secret entity. If the Secret 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 (*SecretMutation) OldValue ¶
func (m *SecretMutation) OldValue(ctx context.Context) (v string, err error)
OldValue returns the old "value" field's value of the Secret entity. If the Secret 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 (*SecretMutation) RemovedEdges ¶
func (m *SecretMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SecretMutation) RemovedIDs ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetCreatedAt ¶
func (m *SecretMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SecretMutation) ResetCreatedBy ¶
func (m *SecretMutation) ResetCreatedBy()
ResetCreatedBy resets all changes to the "created_by" field.
func (*SecretMutation) ResetEdge ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetField ¶
func (m *SecretMutation) 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 (*SecretMutation) ResetUpdatedAt ¶
func (m *SecretMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SecretMutation) ResetValue ¶
func (m *SecretMutation) ResetValue()
ResetValue resets all changes to the "value" field.
func (*SecretMutation) SetCreatedAt ¶
func (m *SecretMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SecretMutation) SetCreatedBy ¶
func (m *SecretMutation) SetCreatedBy(s string)
SetCreatedBy sets the "created_by" field.
func (*SecretMutation) SetField ¶
func (m *SecretMutation) 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 (*SecretMutation) SetID ¶
func (m *SecretMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Secret entities.
func (*SecretMutation) SetUpdatedAt ¶
func (m *SecretMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SecretMutation) SetValue ¶
func (m *SecretMutation) SetValue(s string)
SetValue sets the "value" field.
func (SecretMutation) Tx ¶
func (m SecretMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SecretMutation) Type ¶
func (m *SecretMutation) Type() string
Type returns the node type of this mutation (Secret).
func (*SecretMutation) UpdatedAt ¶
func (m *SecretMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SecretMutation) Value ¶
func (m *SecretMutation) Value() (r string, exists bool)
Value returns the value of the "value" field in the mutation.
func (*SecretMutation) Where ¶
func (m *SecretMutation) Where(ps ...predicate.Secret)
Where appends a list predicates to the SecretMutation builder.
type SecretQuery ¶
type SecretQuery struct {
// contains filtered or unexported fields
}
SecretQuery is the builder for querying Secret entities.
func (*SecretQuery) Aggregate ¶
func (sq *SecretQuery) Aggregate(fns ...AggregateFunc) *SecretSelect
Aggregate returns a SecretSelect configured with the given aggregations.
func (*SecretQuery) All ¶
func (sq *SecretQuery) All(ctx context.Context) ([]*Secret, error)
All executes the query and returns a list of Secrets.
func (*SecretQuery) AllX ¶
func (sq *SecretQuery) AllX(ctx context.Context) []*Secret
AllX is like All, but panics if an error occurs.
func (*SecretQuery) Clone ¶
func (sq *SecretQuery) Clone() *SecretQuery
Clone returns a duplicate of the SecretQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SecretQuery) Count ¶
func (sq *SecretQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SecretQuery) CountX ¶
func (sq *SecretQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SecretQuery) Exist ¶
func (sq *SecretQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SecretQuery) ExistX ¶
func (sq *SecretQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SecretQuery) First ¶
func (sq *SecretQuery) First(ctx context.Context) (*Secret, error)
First returns the first Secret entity from the query. Returns a *NotFoundError when no Secret was found.
func (*SecretQuery) FirstID ¶
func (sq *SecretQuery) FirstID(ctx context.Context) (id string, err error)
FirstID returns the first Secret ID from the query. Returns a *NotFoundError when no Secret ID was found.
func (*SecretQuery) FirstIDX ¶
func (sq *SecretQuery) FirstIDX(ctx context.Context) string
FirstIDX is like FirstID, but panics if an error occurs.
func (*SecretQuery) FirstX ¶
func (sq *SecretQuery) FirstX(ctx context.Context) *Secret
FirstX is like First, but panics if an error occurs.
func (*SecretQuery) GroupBy ¶
func (sq *SecretQuery) GroupBy(field string, fields ...string) *SecretGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Secret.Query().
GroupBy(secret.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SecretQuery) IDs ¶
func (sq *SecretQuery) IDs(ctx context.Context) ([]string, error)
IDs executes the query and returns a list of Secret IDs.
func (*SecretQuery) IDsX ¶
func (sq *SecretQuery) IDsX(ctx context.Context) []string
IDsX is like IDs, but panics if an error occurs.
func (*SecretQuery) Limit ¶
func (sq *SecretQuery) Limit(limit int) *SecretQuery
Limit adds a limit step to the query.
func (*SecretQuery) Offset ¶
func (sq *SecretQuery) Offset(offset int) *SecretQuery
Offset adds an offset step to the query.
func (*SecretQuery) Only ¶
func (sq *SecretQuery) Only(ctx context.Context) (*Secret, error)
Only returns a single Secret entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Secret entity is found. Returns a *NotFoundError when no Secret entities are found.
func (*SecretQuery) OnlyID ¶
func (sq *SecretQuery) OnlyID(ctx context.Context) (id string, err error)
OnlyID is like Only, but returns the only Secret ID in the query. Returns a *NotSingularError when more than one Secret ID is found. Returns a *NotFoundError when no entities are found.
func (*SecretQuery) OnlyIDX ¶
func (sq *SecretQuery) OnlyIDX(ctx context.Context) string
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SecretQuery) OnlyX ¶
func (sq *SecretQuery) OnlyX(ctx context.Context) *Secret
OnlyX is like Only, but panics if an error occurs.
func (*SecretQuery) Order ¶
func (sq *SecretQuery) Order(o ...OrderFunc) *SecretQuery
Order adds an order step to the query.
func (*SecretQuery) Select ¶
func (sq *SecretQuery) Select(fields ...string) *SecretSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Secret.Query().
Select(secret.FieldCreatedAt).
Scan(ctx, &v)
func (*SecretQuery) Unique ¶
func (sq *SecretQuery) Unique(unique bool) *SecretQuery
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 (*SecretQuery) Where ¶
func (sq *SecretQuery) Where(ps ...predicate.Secret) *SecretQuery
Where adds a new predicate for the SecretQuery builder.
type SecretSelect ¶
type SecretSelect struct {
*SecretQuery
// contains filtered or unexported fields
}
SecretSelect is the builder for selecting fields of Secret entities.
func (*SecretSelect) Aggregate ¶
func (ss *SecretSelect) Aggregate(fns ...AggregateFunc) *SecretSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SecretSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SecretSelect) Scan ¶
func (ss *SecretSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SecretSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SecretUpdate ¶
type SecretUpdate struct {
// contains filtered or unexported fields
}
SecretUpdate is the builder for updating Secret entities.
func (*SecretUpdate) Exec ¶
func (su *SecretUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SecretUpdate) ExecX ¶
func (su *SecretUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpdate) Mutation ¶
func (su *SecretUpdate) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretUpdate) Save ¶
func (su *SecretUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SecretUpdate) SaveX ¶
func (su *SecretUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SecretUpdate) SetCreatedAt ¶
func (su *SecretUpdate) SetCreatedAt(t time.Time) *SecretUpdate
SetCreatedAt sets the "created_at" field.
func (*SecretUpdate) SetCreatedBy ¶
func (su *SecretUpdate) SetCreatedBy(s string) *SecretUpdate
SetCreatedBy sets the "created_by" field.
func (*SecretUpdate) SetNillableCreatedAt ¶
func (su *SecretUpdate) SetNillableCreatedAt(t *time.Time) *SecretUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SecretUpdate) SetNillableCreatedBy ¶
func (su *SecretUpdate) SetNillableCreatedBy(s *string) *SecretUpdate
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*SecretUpdate) SetUpdatedAt ¶
func (su *SecretUpdate) SetUpdatedAt(t time.Time) *SecretUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpdate) SetValue ¶
func (su *SecretUpdate) SetValue(s string) *SecretUpdate
SetValue sets the "value" field.
func (*SecretUpdate) Where ¶
func (su *SecretUpdate) Where(ps ...predicate.Secret) *SecretUpdate
Where appends a list predicates to the SecretUpdate builder.
type SecretUpdateOne ¶
type SecretUpdateOne struct {
// contains filtered or unexported fields
}
SecretUpdateOne is the builder for updating a single Secret entity.
func (*SecretUpdateOne) Exec ¶
func (suo *SecretUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SecretUpdateOne) ExecX ¶
func (suo *SecretUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SecretUpdateOne) Mutation ¶
func (suo *SecretUpdateOne) Mutation() *SecretMutation
Mutation returns the SecretMutation object of the builder.
func (*SecretUpdateOne) Save ¶
func (suo *SecretUpdateOne) Save(ctx context.Context) (*Secret, error)
Save executes the query and returns the updated Secret entity.
func (*SecretUpdateOne) SaveX ¶
func (suo *SecretUpdateOne) SaveX(ctx context.Context) *Secret
SaveX is like Save, but panics if an error occurs.
func (*SecretUpdateOne) Select ¶
func (suo *SecretUpdateOne) Select(field string, fields ...string) *SecretUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SecretUpdateOne) SetCreatedAt ¶
func (suo *SecretUpdateOne) SetCreatedAt(t time.Time) *SecretUpdateOne
SetCreatedAt sets the "created_at" field.
func (*SecretUpdateOne) SetCreatedBy ¶
func (suo *SecretUpdateOne) SetCreatedBy(s string) *SecretUpdateOne
SetCreatedBy sets the "created_by" field.
func (*SecretUpdateOne) SetNillableCreatedAt ¶
func (suo *SecretUpdateOne) SetNillableCreatedAt(t *time.Time) *SecretUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SecretUpdateOne) SetNillableCreatedBy ¶
func (suo *SecretUpdateOne) SetNillableCreatedBy(s *string) *SecretUpdateOne
SetNillableCreatedBy sets the "created_by" field if the given value is not nil.
func (*SecretUpdateOne) SetUpdatedAt ¶
func (suo *SecretUpdateOne) SetUpdatedAt(t time.Time) *SecretUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*SecretUpdateOne) SetValue ¶
func (suo *SecretUpdateOne) SetValue(s string) *SecretUpdateOne
SetValue sets the "value" field.
type Sink ¶
type Sink struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// SinkType holds the value of the "sink_type" field.
SinkType string `json:"sink_type,omitempty"`
// Config holds the value of the "config" field.
Config map[string]interface{} `json:"config,omitempty"`
// contains filtered or unexported fields
}
Sink is the model entity for the Sink schema.
func (*Sink) Unwrap ¶
Unwrap unwraps the Sink 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 (*Sink) Update ¶
func (s *Sink) Update() *SinkUpdateOne
Update returns a builder for updating this Sink. Note that you need to call Sink.Unwrap() before calling this method if this Sink was returned from a transaction, and the transaction was committed or rolled back.
type SinkClient ¶
type SinkClient struct {
// contains filtered or unexported fields
}
SinkClient is a client for the Sink schema.
func NewSinkClient ¶
func NewSinkClient(c config) *SinkClient
NewSinkClient returns a client for the Sink from the given config.
func (*SinkClient) Create ¶
func (c *SinkClient) Create() *SinkCreate
Create returns a builder for creating a Sink entity.
func (*SinkClient) CreateBulk ¶
func (c *SinkClient) CreateBulk(builders ...*SinkCreate) *SinkCreateBulk
CreateBulk returns a builder for creating a bulk of Sink entities.
func (*SinkClient) Delete ¶
func (c *SinkClient) Delete() *SinkDelete
Delete returns a delete builder for Sink.
func (*SinkClient) DeleteOne ¶
func (c *SinkClient) DeleteOne(s *Sink) *SinkDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SinkClient) DeleteOneID ¶
func (c *SinkClient) DeleteOneID(id string) *SinkDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SinkClient) GetX ¶
func (c *SinkClient) GetX(ctx context.Context, id string) *Sink
GetX is like Get, but panics if an error occurs.
func (*SinkClient) Query ¶
func (c *SinkClient) Query() *SinkQuery
Query returns a query builder for Sink.
func (*SinkClient) Update ¶
func (c *SinkClient) Update() *SinkUpdate
Update returns an update builder for Sink.
func (*SinkClient) UpdateOne ¶
func (c *SinkClient) UpdateOne(s *Sink) *SinkUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SinkClient) UpdateOneID ¶
func (c *SinkClient) UpdateOneID(id string) *SinkUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SinkClient) Use ¶
func (c *SinkClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `sink.Hooks(f(g(h())))`.
type SinkCreate ¶
type SinkCreate struct {
// contains filtered or unexported fields
}
SinkCreate is the builder for creating a Sink entity.
func (*SinkCreate) Exec ¶
func (sc *SinkCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SinkCreate) ExecX ¶
func (sc *SinkCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SinkCreate) Mutation ¶
func (sc *SinkCreate) Mutation() *SinkMutation
Mutation returns the SinkMutation object of the builder.
func (*SinkCreate) Save ¶
func (sc *SinkCreate) Save(ctx context.Context) (*Sink, error)
Save creates the Sink in the database.
func (*SinkCreate) SaveX ¶
func (sc *SinkCreate) SaveX(ctx context.Context) *Sink
SaveX calls Save and panics if Save returns an error.
func (*SinkCreate) SetConfig ¶
func (sc *SinkCreate) SetConfig(m map[string]interface{}) *SinkCreate
SetConfig sets the "config" field.
func (*SinkCreate) SetCreatedAt ¶
func (sc *SinkCreate) SetCreatedAt(t time.Time) *SinkCreate
SetCreatedAt sets the "created_at" field.
func (*SinkCreate) SetID ¶
func (sc *SinkCreate) SetID(s string) *SinkCreate
SetID sets the "id" field.
func (*SinkCreate) SetNillableCreatedAt ¶
func (sc *SinkCreate) SetNillableCreatedAt(t *time.Time) *SinkCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SinkCreate) SetNillableUpdatedAt ¶
func (sc *SinkCreate) SetNillableUpdatedAt(t *time.Time) *SinkCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SinkCreate) SetSinkType ¶
func (sc *SinkCreate) SetSinkType(s string) *SinkCreate
SetSinkType sets the "sink_type" field.
func (*SinkCreate) SetUpdatedAt ¶
func (sc *SinkCreate) SetUpdatedAt(t time.Time) *SinkCreate
SetUpdatedAt sets the "updated_at" field.
type SinkCreateBulk ¶
type SinkCreateBulk struct {
// contains filtered or unexported fields
}
SinkCreateBulk is the builder for creating many Sink entities in bulk.
func (*SinkCreateBulk) Exec ¶
func (scb *SinkCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SinkCreateBulk) ExecX ¶
func (scb *SinkCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SinkDelete ¶
type SinkDelete struct {
// contains filtered or unexported fields
}
SinkDelete is the builder for deleting a Sink entity.
func (*SinkDelete) Exec ¶
func (sd *SinkDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SinkDelete) ExecX ¶
func (sd *SinkDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SinkDelete) Where ¶
func (sd *SinkDelete) Where(ps ...predicate.Sink) *SinkDelete
Where appends a list predicates to the SinkDelete builder.
type SinkDeleteOne ¶
type SinkDeleteOne struct {
// contains filtered or unexported fields
}
SinkDeleteOne is the builder for deleting a single Sink entity.
func (*SinkDeleteOne) Exec ¶
func (sdo *SinkDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SinkDeleteOne) ExecX ¶
func (sdo *SinkDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SinkGroupBy ¶
type SinkGroupBy struct {
// contains filtered or unexported fields
}
SinkGroupBy is the group-by builder for Sink entities.
func (*SinkGroupBy) Aggregate ¶
func (sgb *SinkGroupBy) Aggregate(fns ...AggregateFunc) *SinkGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SinkGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SinkGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SinkGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SinkGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SinkGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SinkGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SinkGroupBy) Scan ¶
func (sgb *SinkGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*SinkGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SinkMutation ¶
type SinkMutation struct {
// contains filtered or unexported fields
}
SinkMutation represents an operation that mutates the Sink nodes in the graph.
func (*SinkMutation) AddField ¶
func (m *SinkMutation) 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 (*SinkMutation) AddedEdges ¶
func (m *SinkMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SinkMutation) AddedField ¶
func (m *SinkMutation) 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 (*SinkMutation) AddedFields ¶
func (m *SinkMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SinkMutation) AddedIDs ¶
func (m *SinkMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SinkMutation) ClearEdge ¶
func (m *SinkMutation) 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 (*SinkMutation) ClearField ¶
func (m *SinkMutation) 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 (*SinkMutation) ClearedEdges ¶
func (m *SinkMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SinkMutation) ClearedFields ¶
func (m *SinkMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SinkMutation) Client ¶
func (m SinkMutation) 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 (*SinkMutation) Config ¶
func (m *SinkMutation) Config() (r map[string]interface{}, exists bool)
Config returns the value of the "config" field in the mutation.
func (*SinkMutation) CreatedAt ¶
func (m *SinkMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*SinkMutation) EdgeCleared ¶
func (m *SinkMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SinkMutation) Field ¶
func (m *SinkMutation) 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 (*SinkMutation) FieldCleared ¶
func (m *SinkMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SinkMutation) Fields ¶
func (m *SinkMutation) 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 (*SinkMutation) ID ¶
func (m *SinkMutation) ID() (id string, 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 (*SinkMutation) IDs ¶
func (m *SinkMutation) IDs(ctx context.Context) ([]string, 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 (*SinkMutation) OldConfig ¶
func (m *SinkMutation) OldConfig(ctx context.Context) (v map[string]interface{}, err error)
OldConfig returns the old "config" field's value of the Sink entity. If the Sink 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 (*SinkMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Sink entity. If the Sink 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 (*SinkMutation) 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 (*SinkMutation) OldSinkType ¶
func (m *SinkMutation) OldSinkType(ctx context.Context) (v string, err error)
OldSinkType returns the old "sink_type" field's value of the Sink entity. If the Sink 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 (*SinkMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Sink entity. If the Sink 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 (*SinkMutation) RemovedEdges ¶
func (m *SinkMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SinkMutation) RemovedIDs ¶
func (m *SinkMutation) 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 (*SinkMutation) ResetConfig ¶
func (m *SinkMutation) ResetConfig()
ResetConfig resets all changes to the "config" field.
func (*SinkMutation) ResetCreatedAt ¶
func (m *SinkMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*SinkMutation) ResetEdge ¶
func (m *SinkMutation) 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 (*SinkMutation) ResetField ¶
func (m *SinkMutation) 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 (*SinkMutation) ResetSinkType ¶
func (m *SinkMutation) ResetSinkType()
ResetSinkType resets all changes to the "sink_type" field.
func (*SinkMutation) ResetUpdatedAt ¶
func (m *SinkMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*SinkMutation) SetConfig ¶
func (m *SinkMutation) SetConfig(value map[string]interface{})
SetConfig sets the "config" field.
func (*SinkMutation) SetCreatedAt ¶
func (m *SinkMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*SinkMutation) SetField ¶
func (m *SinkMutation) 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 (*SinkMutation) SetID ¶
func (m *SinkMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Sink entities.
func (*SinkMutation) SetSinkType ¶
func (m *SinkMutation) SetSinkType(s string)
SetSinkType sets the "sink_type" field.
func (*SinkMutation) SetUpdatedAt ¶
func (m *SinkMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*SinkMutation) SinkType ¶
func (m *SinkMutation) SinkType() (r string, exists bool)
SinkType returns the value of the "sink_type" field in the mutation.
func (SinkMutation) Tx ¶
func (m SinkMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SinkMutation) Type ¶
func (m *SinkMutation) Type() string
Type returns the node type of this mutation (Sink).
func (*SinkMutation) UpdatedAt ¶
func (m *SinkMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*SinkMutation) Where ¶
func (m *SinkMutation) Where(ps ...predicate.Sink)
Where appends a list predicates to the SinkMutation builder.
type SinkQuery ¶
type SinkQuery struct {
// contains filtered or unexported fields
}
SinkQuery is the builder for querying Sink entities.
func (*SinkQuery) Aggregate ¶
func (sq *SinkQuery) Aggregate(fns ...AggregateFunc) *SinkSelect
Aggregate returns a SinkSelect configured with the given aggregations.
func (*SinkQuery) Clone ¶
Clone returns a duplicate of the SinkQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SinkQuery) First ¶
First returns the first Sink entity from the query. Returns a *NotFoundError when no Sink was found.
func (*SinkQuery) FirstID ¶
FirstID returns the first Sink ID from the query. Returns a *NotFoundError when no Sink ID was found.
func (*SinkQuery) GroupBy ¶
func (sq *SinkQuery) GroupBy(field string, fields ...string) *SinkGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
Count int `json:"count,omitempty"`
}
client.Sink.Query().
GroupBy(sink.FieldCreatedAt).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*SinkQuery) Only ¶
Only returns a single Sink entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Sink entity is found. Returns a *NotFoundError when no Sink entities are found.
func (*SinkQuery) OnlyID ¶
OnlyID is like Only, but returns the only Sink ID in the query. Returns a *NotSingularError when more than one Sink ID is found. Returns a *NotFoundError when no entities are found.
func (*SinkQuery) Select ¶
func (sq *SinkQuery) Select(fields ...string) *SinkSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct {
CreatedAt time.Time `json:"created_at,omitempty"`
}
client.Sink.Query().
Select(sink.FieldCreatedAt).
Scan(ctx, &v)
type SinkSelect ¶
type SinkSelect struct {
*SinkQuery
// contains filtered or unexported fields
}
SinkSelect is the builder for selecting fields of Sink entities.
func (*SinkSelect) Aggregate ¶
func (ss *SinkSelect) Aggregate(fns ...AggregateFunc) *SinkSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SinkSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SinkSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SinkSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SinkSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SinkSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SinkSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SinkSelect) Scan ¶
func (ss *SinkSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SinkSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SinkUpdate ¶
type SinkUpdate struct {
// contains filtered or unexported fields
}
SinkUpdate is the builder for updating Sink entities.
func (*SinkUpdate) Exec ¶
func (su *SinkUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SinkUpdate) ExecX ¶
func (su *SinkUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SinkUpdate) Mutation ¶
func (su *SinkUpdate) Mutation() *SinkMutation
Mutation returns the SinkMutation object of the builder.
func (*SinkUpdate) Save ¶
func (su *SinkUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SinkUpdate) SaveX ¶
func (su *SinkUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SinkUpdate) SetConfig ¶
func (su *SinkUpdate) SetConfig(m map[string]interface{}) *SinkUpdate
SetConfig sets the "config" field.
func (*SinkUpdate) SetCreatedAt ¶
func (su *SinkUpdate) SetCreatedAt(t time.Time) *SinkUpdate
SetCreatedAt sets the "created_at" field.
func (*SinkUpdate) SetNillableCreatedAt ¶
func (su *SinkUpdate) SetNillableCreatedAt(t *time.Time) *SinkUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SinkUpdate) SetSinkType ¶
func (su *SinkUpdate) SetSinkType(s string) *SinkUpdate
SetSinkType sets the "sink_type" field.
func (*SinkUpdate) SetUpdatedAt ¶
func (su *SinkUpdate) SetUpdatedAt(t time.Time) *SinkUpdate
SetUpdatedAt sets the "updated_at" field.
func (*SinkUpdate) Where ¶
func (su *SinkUpdate) Where(ps ...predicate.Sink) *SinkUpdate
Where appends a list predicates to the SinkUpdate builder.
type SinkUpdateOne ¶
type SinkUpdateOne struct {
// contains filtered or unexported fields
}
SinkUpdateOne is the builder for updating a single Sink entity.
func (*SinkUpdateOne) Exec ¶
func (suo *SinkUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SinkUpdateOne) ExecX ¶
func (suo *SinkUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SinkUpdateOne) Mutation ¶
func (suo *SinkUpdateOne) Mutation() *SinkMutation
Mutation returns the SinkMutation object of the builder.
func (*SinkUpdateOne) Save ¶
func (suo *SinkUpdateOne) Save(ctx context.Context) (*Sink, error)
Save executes the query and returns the updated Sink entity.
func (*SinkUpdateOne) SaveX ¶
func (suo *SinkUpdateOne) SaveX(ctx context.Context) *Sink
SaveX is like Save, but panics if an error occurs.
func (*SinkUpdateOne) Select ¶
func (suo *SinkUpdateOne) Select(field string, fields ...string) *SinkUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SinkUpdateOne) SetConfig ¶
func (suo *SinkUpdateOne) SetConfig(m map[string]interface{}) *SinkUpdateOne
SetConfig sets the "config" field.
func (*SinkUpdateOne) SetCreatedAt ¶
func (suo *SinkUpdateOne) SetCreatedAt(t time.Time) *SinkUpdateOne
SetCreatedAt sets the "created_at" field.
func (*SinkUpdateOne) SetNillableCreatedAt ¶
func (suo *SinkUpdateOne) SetNillableCreatedAt(t *time.Time) *SinkUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*SinkUpdateOne) SetSinkType ¶
func (suo *SinkUpdateOne) SetSinkType(s string) *SinkUpdateOne
SetSinkType sets the "sink_type" field.
func (*SinkUpdateOne) SetUpdatedAt ¶
func (suo *SinkUpdateOne) SetUpdatedAt(t time.Time) *SinkUpdateOne
SetUpdatedAt sets the "updated_at" field.
type Tx ¶
type Tx struct {
// AlertChannel is the client for interacting with the AlertChannel builders.
AlertChannel *AlertChannelClient
// Monitor is the client for interacting with the Monitor builders.
Monitor *MonitorClient
// Secret is the client for interacting with the Secret builders.
Secret *SecretClient
// Sink is the client for interacting with the Sink builders.
Sink *SinkClient
// User is the client for interacting with the User builders.
User *UserClient
// 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 User ¶
type User struct {
// ID of the ent.
ID string `json:"id,omitempty"`
// APIKey holds the value of the "api_key" field.
APIKey string `json:"api_key,omitempty"`
// CreatedAt holds the value of the "created_at" field.
CreatedAt time.Time `json:"created_at,omitempty"`
// UpdatedAt holds the value of the "updated_at" field.
UpdatedAt time.Time `json:"updated_at,omitempty"`
// Role holds the value of the "role" field.
Role string `json:"role,omitempty"`
// Locked holds the value of the "locked" field.
Locked bool `json:"locked,omitempty"`
// LockedUntil holds the value of the "locked_until" field.
LockedUntil *time.Time `json:"locked_until,omitempty"`
// contains filtered or unexported fields
}
User is the model entity for the User schema.
func (*User) Unwrap ¶
Unwrap unwraps the User 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 (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id string) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id string) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id string) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetAPIKey ¶
func (uc *UserCreate) SetAPIKey(s string) *UserCreate
SetAPIKey sets the "api_key" field.
func (*UserCreate) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(s string) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetLocked ¶
func (uc *UserCreate) SetLocked(b bool) *UserCreate
SetLocked sets the "locked" field.
func (*UserCreate) SetLockedUntil ¶
func (uc *UserCreate) SetLockedUntil(t time.Time) *UserCreate
SetLockedUntil sets the "locked_until" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableLocked ¶
func (uc *UserCreate) SetNillableLocked(b *bool) *UserCreate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserCreate) SetNillableLockedUntil ¶
func (uc *UserCreate) SetNillableLockedUntil(t *time.Time) *UserCreate
SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.
func (*UserCreate) SetNillableRole ¶
func (uc *UserCreate) SetNillableRole(s *string) *UserCreate
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetRole ¶
func (uc *UserCreate) SetRole(s string) *UserCreate
SetRole sets the "role" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate
SetUpdatedAt sets the "updated_at" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the group-by query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) APIKey ¶
func (m *UserMutation) APIKey() (r string, exists bool)
APIKey returns the value of the "api_key" field in the mutation.
func (*UserMutation) AddField ¶
func (m *UserMutation) 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 (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) 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 (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) 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 (*UserMutation) ClearField ¶
func (m *UserMutation) 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 (*UserMutation) ClearLockedUntil ¶
func (m *UserMutation) ClearLockedUntil()
ClearLockedUntil clears the value of the "locked_until" field.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) 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 (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) 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 (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) 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 (*UserMutation) ID ¶
func (m *UserMutation) ID() (id string, 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 (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]string, 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 (*UserMutation) Locked ¶
func (m *UserMutation) Locked() (r bool, exists bool)
Locked returns the value of the "locked" field in the mutation.
func (*UserMutation) LockedUntil ¶
func (m *UserMutation) LockedUntil() (r time.Time, exists bool)
LockedUntil returns the value of the "locked_until" field in the mutation.
func (*UserMutation) LockedUntilCleared ¶
func (m *UserMutation) LockedUntilCleared() bool
LockedUntilCleared returns if the "locked_until" field was cleared in this mutation.
func (*UserMutation) OldAPIKey ¶
func (m *UserMutation) OldAPIKey(ctx context.Context) (v string, err error)
OldAPIKey returns the old "api_key" field's value of the User entity. If the User 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 (*UserMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User 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 (*UserMutation) 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 (*UserMutation) OldLocked ¶
func (m *UserMutation) OldLocked(ctx context.Context) (v bool, err error)
OldLocked returns the old "locked" field's value of the User entity. If the User 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 (*UserMutation) OldLockedUntil ¶
OldLockedUntil returns the old "locked_until" field's value of the User entity. If the User 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 (*UserMutation) OldRole ¶
func (m *UserMutation) OldRole(ctx context.Context) (v string, err error)
OldRole returns the old "role" field's value of the User entity. If the User 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 (*UserMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User 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 (*UserMutation) RemovedEdges ¶
func (m *UserMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*UserMutation) RemovedIDs ¶
func (m *UserMutation) 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 (*UserMutation) ResetAPIKey ¶
func (m *UserMutation) ResetAPIKey()
ResetAPIKey resets all changes to the "api_key" field.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) 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 (*UserMutation) ResetField ¶
func (m *UserMutation) 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 (*UserMutation) ResetLocked ¶
func (m *UserMutation) ResetLocked()
ResetLocked resets all changes to the "locked" field.
func (*UserMutation) ResetLockedUntil ¶
func (m *UserMutation) ResetLockedUntil()
ResetLockedUntil resets all changes to the "locked_until" field.
func (*UserMutation) ResetRole ¶
func (m *UserMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) Role ¶
func (m *UserMutation) Role() (r string, exists bool)
Role returns the value of the "role" field in the mutation.
func (*UserMutation) SetAPIKey ¶
func (m *UserMutation) SetAPIKey(s string)
SetAPIKey sets the "api_key" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) 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 (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id string)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetLocked ¶
func (m *UserMutation) SetLocked(b bool)
SetLocked sets the "locked" field.
func (*UserMutation) SetLockedUntil ¶
func (m *UserMutation) SetLockedUntil(t time.Time)
SetLockedUntil sets the "locked_until" field.
func (*UserMutation) SetRole ¶
func (m *UserMutation) SetRole(s string)
SetRole sets the "role" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
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 {
APIKey string `json:"api_key,omitempty"`
Count int `json:"count,omitempty"`
}
client.User.Query().
GroupBy(user.FieldAPIKey).
Aggregate(ent.Count()).
Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
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 {
APIKey string `json:"api_key,omitempty"`
}
client.User.Query().
Select(user.FieldAPIKey).
Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct {
*UserQuery
// contains filtered or unexported fields
}
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) ClearLockedUntil ¶
func (uu *UserUpdate) ClearLockedUntil() *UserUpdate
ClearLockedUntil clears the value of the "locked_until" field.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetAPIKey ¶
func (uu *UserUpdate) SetAPIKey(s string) *UserUpdate
SetAPIKey sets the "api_key" field.
func (*UserUpdate) SetLocked ¶
func (uu *UserUpdate) SetLocked(b bool) *UserUpdate
SetLocked sets the "locked" field.
func (*UserUpdate) SetLockedUntil ¶
func (uu *UserUpdate) SetLockedUntil(t time.Time) *UserUpdate
SetLockedUntil sets the "locked_until" field.
func (*UserUpdate) SetNillableLocked ¶
func (uu *UserUpdate) SetNillableLocked(b *bool) *UserUpdate
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserUpdate) SetNillableLockedUntil ¶
func (uu *UserUpdate) SetNillableLockedUntil(t *time.Time) *UserUpdate
SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.
func (*UserUpdate) SetNillableRole ¶
func (uu *UserUpdate) SetNillableRole(s *string) *UserUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdate) SetRole ¶
func (uu *UserUpdate) SetRole(s string) *UserUpdate
SetRole sets the "role" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) ClearLockedUntil ¶
func (uuo *UserUpdateOne) ClearLockedUntil() *UserUpdateOne
ClearLockedUntil clears the value of the "locked_until" field.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetAPIKey ¶
func (uuo *UserUpdateOne) SetAPIKey(s string) *UserUpdateOne
SetAPIKey sets the "api_key" field.
func (*UserUpdateOne) SetLocked ¶
func (uuo *UserUpdateOne) SetLocked(b bool) *UserUpdateOne
SetLocked sets the "locked" field.
func (*UserUpdateOne) SetLockedUntil ¶
func (uuo *UserUpdateOne) SetLockedUntil(t time.Time) *UserUpdateOne
SetLockedUntil sets the "locked_until" field.
func (*UserUpdateOne) SetNillableLocked ¶
func (uuo *UserUpdateOne) SetNillableLocked(b *bool) *UserUpdateOne
SetNillableLocked sets the "locked" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLockedUntil ¶
func (uuo *UserUpdateOne) SetNillableLockedUntil(t *time.Time) *UserUpdateOne
SetNillableLockedUntil sets the "locked_until" field if the given value is not nil.
func (*UserUpdateOne) SetNillableRole ¶
func (uuo *UserUpdateOne) SetNillableRole(s *string) *UserUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdateOne) SetRole ¶
func (uuo *UserUpdateOne) SetRole(s string) *UserUpdateOne
SetRole sets the "role" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
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
¶
- alertchannel.go
- alertchannel_create.go
- alertchannel_delete.go
- alertchannel_query.go
- alertchannel_update.go
- client.go
- config.go
- context.go
- ent.go
- generate.go
- monitor.go
- monitor_create.go
- monitor_delete.go
- monitor_query.go
- monitor_update.go
- mutation.go
- runtime.go
- secret.go
- secret_create.go
- secret_delete.go
- secret_query.go
- secret_update.go
- sink.go
- sink_create.go
- sink_delete.go
- sink_query.go
- sink_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go