Documentation ¶
Index ¶
- Constants
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- 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 Access
- type AccessClient
- func (c *AccessClient) Create() *AccessCreate
- func (c *AccessClient) CreateBulk(builders ...*AccessCreate) *AccessCreateBulk
- func (c *AccessClient) Delete() *AccessDelete
- func (c *AccessClient) DeleteOne(a *Access) *AccessDeleteOne
- func (c *AccessClient) DeleteOneID(id int) *AccessDeleteOne
- func (c *AccessClient) Get(ctx context.Context, id int) (*Access, error)
- func (c *AccessClient) GetX(ctx context.Context, id int) *Access
- func (c *AccessClient) Hooks() []Hook
- func (c *AccessClient) Intercept(interceptors ...Interceptor)
- func (c *AccessClient) Interceptors() []Interceptor
- func (c *AccessClient) Query() *AccessQuery
- func (c *AccessClient) Update() *AccessUpdate
- func (c *AccessClient) UpdateOne(a *Access) *AccessUpdateOne
- func (c *AccessClient) UpdateOneID(id int) *AccessUpdateOne
- func (c *AccessClient) Use(hooks ...Hook)
- type AccessCreate
- func (ac *AccessCreate) Exec(ctx context.Context) error
- func (ac *AccessCreate) ExecX(ctx context.Context)
- func (ac *AccessCreate) Mutation() *AccessMutation
- func (ac *AccessCreate) Save(ctx context.Context) (*Access, error)
- func (ac *AccessCreate) SaveX(ctx context.Context) *Access
- func (ac *AccessCreate) SetCreatedAt(t time.Time) *AccessCreate
- func (ac *AccessCreate) SetNillableCreatedAt(t *time.Time) *AccessCreate
- func (ac *AccessCreate) SetNillableRole(a *access.Role) *AccessCreate
- func (ac *AccessCreate) SetNillableUpdatedAt(t *time.Time) *AccessCreate
- func (ac *AccessCreate) SetProjectID(i int) *AccessCreate
- func (ac *AccessCreate) SetRole(a access.Role) *AccessCreate
- func (ac *AccessCreate) SetUpdatedAt(t time.Time) *AccessCreate
- func (ac *AccessCreate) SetUserID(i int) *AccessCreate
- type AccessCreateBulk
- type AccessDelete
- type AccessDeleteOne
- type AccessGroupBy
- func (agb *AccessGroupBy) Aggregate(fns ...AggregateFunc) *AccessGroupBy
- func (s *AccessGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccessGroupBy) BoolX(ctx context.Context) bool
- func (s *AccessGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AccessGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AccessGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccessGroupBy) Float64X(ctx context.Context) float64
- func (s *AccessGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccessGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AccessGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AccessGroupBy) IntX(ctx context.Context) int
- func (s *AccessGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AccessGroupBy) IntsX(ctx context.Context) []int
- func (agb *AccessGroupBy) Scan(ctx context.Context, v any) error
- func (s *AccessGroupBy) ScanX(ctx context.Context, v any)
- func (s *AccessGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AccessGroupBy) StringX(ctx context.Context) string
- func (s *AccessGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AccessGroupBy) StringsX(ctx context.Context) []string
- type AccessMutation
- func (m *AccessMutation) AddField(name string, value ent.Value) error
- func (m *AccessMutation) AddProjectID(i int)
- func (m *AccessMutation) AddUserID(i int)
- func (m *AccessMutation) AddedEdges() []string
- func (m *AccessMutation) AddedField(name string) (ent.Value, bool)
- func (m *AccessMutation) AddedFields() []string
- func (m *AccessMutation) AddedIDs(name string) []ent.Value
- func (m *AccessMutation) AddedProjectID() (r int, exists bool)
- func (m *AccessMutation) AddedUserID() (r int, exists bool)
- func (m *AccessMutation) ClearEdge(name string) error
- func (m *AccessMutation) ClearField(name string) error
- func (m *AccessMutation) ClearedEdges() []string
- func (m *AccessMutation) ClearedFields() []string
- func (m AccessMutation) Client() *Client
- func (m *AccessMutation) CreatedAt() (r time.Time, exists bool)
- func (m *AccessMutation) EdgeCleared(name string) bool
- func (m *AccessMutation) Field(name string) (ent.Value, bool)
- func (m *AccessMutation) FieldCleared(name string) bool
- func (m *AccessMutation) Fields() []string
- func (m *AccessMutation) ID() (id int, exists bool)
- func (m *AccessMutation) IDs(ctx context.Context) ([]int, error)
- func (m *AccessMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccessMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AccessMutation) OldProjectID(ctx context.Context) (v int, err error)
- func (m *AccessMutation) OldRole(ctx context.Context) (v access.Role, err error)
- func (m *AccessMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *AccessMutation) OldUserID(ctx context.Context) (v int, err error)
- func (m *AccessMutation) Op() Op
- func (m *AccessMutation) ProjectID() (r int, exists bool)
- func (m *AccessMutation) RemovedEdges() []string
- func (m *AccessMutation) RemovedIDs(name string) []ent.Value
- func (m *AccessMutation) ResetCreatedAt()
- func (m *AccessMutation) ResetEdge(name string) error
- func (m *AccessMutation) ResetField(name string) error
- func (m *AccessMutation) ResetProjectID()
- func (m *AccessMutation) ResetRole()
- func (m *AccessMutation) ResetUpdatedAt()
- func (m *AccessMutation) ResetUserID()
- func (m *AccessMutation) Role() (r access.Role, exists bool)
- func (m *AccessMutation) SetCreatedAt(t time.Time)
- func (m *AccessMutation) SetField(name string, value ent.Value) error
- func (m *AccessMutation) SetOp(op Op)
- func (m *AccessMutation) SetProjectID(i int)
- func (m *AccessMutation) SetRole(a access.Role)
- func (m *AccessMutation) SetUpdatedAt(t time.Time)
- func (m *AccessMutation) SetUserID(i int)
- func (m AccessMutation) Tx() (*Tx, error)
- func (m *AccessMutation) Type() string
- func (m *AccessMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *AccessMutation) UserID() (r int, exists bool)
- func (m *AccessMutation) Where(ps ...predicate.Access)
- func (m *AccessMutation) WhereP(ps ...func(*sql.Selector))
- type AccessQuery
- func (aq *AccessQuery) Aggregate(fns ...AggregateFunc) *AccessSelect
- func (aq *AccessQuery) All(ctx context.Context) ([]*Access, error)
- func (aq *AccessQuery) AllX(ctx context.Context) []*Access
- func (aq *AccessQuery) Clone() *AccessQuery
- func (aq *AccessQuery) Count(ctx context.Context) (int, error)
- func (aq *AccessQuery) CountX(ctx context.Context) int
- func (aq *AccessQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AccessQuery) ExistX(ctx context.Context) bool
- func (aq *AccessQuery) First(ctx context.Context) (*Access, error)
- func (aq *AccessQuery) FirstID(ctx context.Context) (id int, err error)
- func (aq *AccessQuery) FirstIDX(ctx context.Context) int
- func (aq *AccessQuery) FirstX(ctx context.Context) *Access
- func (aq *AccessQuery) GroupBy(field string, fields ...string) *AccessGroupBy
- func (aq *AccessQuery) IDs(ctx context.Context) (ids []int, err error)
- func (aq *AccessQuery) IDsX(ctx context.Context) []int
- func (aq *AccessQuery) Limit(limit int) *AccessQuery
- func (aq *AccessQuery) Offset(offset int) *AccessQuery
- func (aq *AccessQuery) Only(ctx context.Context) (*Access, error)
- func (aq *AccessQuery) OnlyID(ctx context.Context) (id int, err error)
- func (aq *AccessQuery) OnlyIDX(ctx context.Context) int
- func (aq *AccessQuery) OnlyX(ctx context.Context) *Access
- func (aq *AccessQuery) Order(o ...access.OrderOption) *AccessQuery
- func (aq *AccessQuery) Select(fields ...string) *AccessSelect
- func (aq *AccessQuery) Unique(unique bool) *AccessQuery
- func (aq *AccessQuery) Where(ps ...predicate.Access) *AccessQuery
- type AccessSelect
- func (as *AccessSelect) Aggregate(fns ...AggregateFunc) *AccessSelect
- func (s *AccessSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AccessSelect) BoolX(ctx context.Context) bool
- func (s *AccessSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AccessSelect) BoolsX(ctx context.Context) []bool
- func (s *AccessSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AccessSelect) Float64X(ctx context.Context) float64
- func (s *AccessSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AccessSelect) Float64sX(ctx context.Context) []float64
- func (s *AccessSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AccessSelect) IntX(ctx context.Context) int
- func (s *AccessSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AccessSelect) IntsX(ctx context.Context) []int
- func (as *AccessSelect) Scan(ctx context.Context, v any) error
- func (s *AccessSelect) ScanX(ctx context.Context, v any)
- func (s *AccessSelect) String(ctx context.Context) (_ string, err error)
- func (s *AccessSelect) StringX(ctx context.Context) string
- func (s *AccessSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AccessSelect) StringsX(ctx context.Context) []string
- type AccessUpdate
- func (au *AccessUpdate) AddProjectID(i int) *AccessUpdate
- func (au *AccessUpdate) AddUserID(i int) *AccessUpdate
- func (au *AccessUpdate) Exec(ctx context.Context) error
- func (au *AccessUpdate) ExecX(ctx context.Context)
- func (au *AccessUpdate) Mutation() *AccessMutation
- func (au *AccessUpdate) Save(ctx context.Context) (int, error)
- func (au *AccessUpdate) SaveX(ctx context.Context) int
- func (au *AccessUpdate) SetNillableRole(a *access.Role) *AccessUpdate
- func (au *AccessUpdate) SetProjectID(i int) *AccessUpdate
- func (au *AccessUpdate) SetRole(a access.Role) *AccessUpdate
- func (au *AccessUpdate) SetUpdatedAt(t time.Time) *AccessUpdate
- func (au *AccessUpdate) SetUserID(i int) *AccessUpdate
- func (au *AccessUpdate) Where(ps ...predicate.Access) *AccessUpdate
- type AccessUpdateOne
- func (auo *AccessUpdateOne) AddProjectID(i int) *AccessUpdateOne
- func (auo *AccessUpdateOne) AddUserID(i int) *AccessUpdateOne
- func (auo *AccessUpdateOne) Exec(ctx context.Context) error
- func (auo *AccessUpdateOne) ExecX(ctx context.Context)
- func (auo *AccessUpdateOne) Mutation() *AccessMutation
- func (auo *AccessUpdateOne) Save(ctx context.Context) (*Access, error)
- func (auo *AccessUpdateOne) SaveX(ctx context.Context) *Access
- func (auo *AccessUpdateOne) Select(field string, fields ...string) *AccessUpdateOne
- func (auo *AccessUpdateOne) SetNillableRole(a *access.Role) *AccessUpdateOne
- func (auo *AccessUpdateOne) SetProjectID(i int) *AccessUpdateOne
- func (auo *AccessUpdateOne) SetRole(a access.Role) *AccessUpdateOne
- func (auo *AccessUpdateOne) SetUpdatedAt(t time.Time) *AccessUpdateOne
- func (auo *AccessUpdateOne) SetUserID(i int) *AccessUpdateOne
- func (auo *AccessUpdateOne) Where(ps ...predicate.Access) *AccessUpdateOne
- type Accesses
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Histories
- type History
- type HistoryClient
- func (c *HistoryClient) Create() *HistoryCreate
- func (c *HistoryClient) CreateBulk(builders ...*HistoryCreate) *HistoryCreateBulk
- func (c *HistoryClient) Delete() *HistoryDelete
- func (c *HistoryClient) DeleteOne(h *History) *HistoryDeleteOne
- func (c *HistoryClient) DeleteOneID(id int) *HistoryDeleteOne
- func (c *HistoryClient) Get(ctx context.Context, id int) (*History, error)
- func (c *HistoryClient) GetX(ctx context.Context, id int) *History
- func (c *HistoryClient) Hooks() []Hook
- func (c *HistoryClient) Intercept(interceptors ...Interceptor)
- func (c *HistoryClient) Interceptors() []Interceptor
- func (c *HistoryClient) Query() *HistoryQuery
- func (c *HistoryClient) Update() *HistoryUpdate
- func (c *HistoryClient) UpdateOne(h *History) *HistoryUpdateOne
- func (c *HistoryClient) UpdateOneID(id int) *HistoryUpdateOne
- func (c *HistoryClient) Use(hooks ...Hook)
- type HistoryCreate
- func (hc *HistoryCreate) Exec(ctx context.Context) error
- func (hc *HistoryCreate) ExecX(ctx context.Context)
- func (hc *HistoryCreate) Mutation() *HistoryMutation
- func (hc *HistoryCreate) Save(ctx context.Context) (*History, error)
- func (hc *HistoryCreate) SaveX(ctx context.Context) *History
- func (hc *HistoryCreate) SetArguments(m map[string]string) *HistoryCreate
- func (hc *HistoryCreate) SetCreatedAt(t time.Time) *HistoryCreate
- func (hc *HistoryCreate) SetDuration(i int) *HistoryCreate
- func (hc *HistoryCreate) SetExitCode(i int) *HistoryCreate
- func (hc *HistoryCreate) SetNillableCreatedAt(t *time.Time) *HistoryCreate
- func (hc *HistoryCreate) SetNillableStatus(s *string) *HistoryCreate
- func (hc *HistoryCreate) SetNillableUpdatedAt(t *time.Time) *HistoryCreate
- func (hc *HistoryCreate) SetOutput(s string) *HistoryCreate
- func (hc *HistoryCreate) SetRunID(s string) *HistoryCreate
- func (hc *HistoryCreate) SetScriptID(i int) *HistoryCreate
- func (hc *HistoryCreate) SetStatus(s string) *HistoryCreate
- func (hc *HistoryCreate) SetSuccess(b bool) *HistoryCreate
- func (hc *HistoryCreate) SetTrigger(s string) *HistoryCreate
- func (hc *HistoryCreate) SetTriggeredBy(s string) *HistoryCreate
- func (hc *HistoryCreate) SetUpdatedAt(t time.Time) *HistoryCreate
- type HistoryCreateBulk
- type HistoryDelete
- type HistoryDeleteOne
- type HistoryGroupBy
- func (hgb *HistoryGroupBy) Aggregate(fns ...AggregateFunc) *HistoryGroupBy
- func (s *HistoryGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HistoryGroupBy) BoolX(ctx context.Context) bool
- func (s *HistoryGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HistoryGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HistoryGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HistoryGroupBy) Float64X(ctx context.Context) float64
- func (s *HistoryGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HistoryGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HistoryGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HistoryGroupBy) IntX(ctx context.Context) int
- func (s *HistoryGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HistoryGroupBy) IntsX(ctx context.Context) []int
- func (hgb *HistoryGroupBy) Scan(ctx context.Context, v any) error
- func (s *HistoryGroupBy) ScanX(ctx context.Context, v any)
- func (s *HistoryGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HistoryGroupBy) StringX(ctx context.Context) string
- func (s *HistoryGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HistoryGroupBy) StringsX(ctx context.Context) []string
- type HistoryMutation
- func (m *HistoryMutation) AddDuration(i int)
- func (m *HistoryMutation) AddExitCode(i int)
- func (m *HistoryMutation) AddField(name string, value ent.Value) error
- func (m *HistoryMutation) AddScriptID(i int)
- func (m *HistoryMutation) AddedDuration() (r int, exists bool)
- func (m *HistoryMutation) AddedEdges() []string
- func (m *HistoryMutation) AddedExitCode() (r int, exists bool)
- func (m *HistoryMutation) AddedField(name string) (ent.Value, bool)
- func (m *HistoryMutation) AddedFields() []string
- func (m *HistoryMutation) AddedIDs(name string) []ent.Value
- func (m *HistoryMutation) AddedScriptID() (r int, exists bool)
- func (m *HistoryMutation) Arguments() (r map[string]string, exists bool)
- func (m *HistoryMutation) ClearEdge(name string) error
- func (m *HistoryMutation) ClearField(name string) error
- func (m *HistoryMutation) ClearedEdges() []string
- func (m *HistoryMutation) ClearedFields() []string
- func (m HistoryMutation) Client() *Client
- func (m *HistoryMutation) CreatedAt() (r time.Time, exists bool)
- func (m *HistoryMutation) Duration() (r int, exists bool)
- func (m *HistoryMutation) EdgeCleared(name string) bool
- func (m *HistoryMutation) ExitCode() (r int, exists bool)
- func (m *HistoryMutation) Field(name string) (ent.Value, bool)
- func (m *HistoryMutation) FieldCleared(name string) bool
- func (m *HistoryMutation) Fields() []string
- func (m *HistoryMutation) ID() (id int, exists bool)
- func (m *HistoryMutation) IDs(ctx context.Context) ([]int, error)
- func (m *HistoryMutation) OldArguments(ctx context.Context) (v map[string]string, err error)
- func (m *HistoryMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *HistoryMutation) OldDuration(ctx context.Context) (v int, err error)
- func (m *HistoryMutation) OldExitCode(ctx context.Context) (v int, err error)
- func (m *HistoryMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HistoryMutation) OldOutput(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldRunID(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldScriptID(ctx context.Context) (v int, err error)
- func (m *HistoryMutation) OldStatus(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldSuccess(ctx context.Context) (v bool, err error)
- func (m *HistoryMutation) OldTrigger(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldTriggeredBy(ctx context.Context) (v string, err error)
- func (m *HistoryMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *HistoryMutation) Op() Op
- func (m *HistoryMutation) Output() (r string, exists bool)
- func (m *HistoryMutation) RemovedEdges() []string
- func (m *HistoryMutation) RemovedIDs(name string) []ent.Value
- func (m *HistoryMutation) ResetArguments()
- func (m *HistoryMutation) ResetCreatedAt()
- func (m *HistoryMutation) ResetDuration()
- func (m *HistoryMutation) ResetEdge(name string) error
- func (m *HistoryMutation) ResetExitCode()
- func (m *HistoryMutation) ResetField(name string) error
- func (m *HistoryMutation) ResetOutput()
- func (m *HistoryMutation) ResetRunID()
- func (m *HistoryMutation) ResetScriptID()
- func (m *HistoryMutation) ResetStatus()
- func (m *HistoryMutation) ResetSuccess()
- func (m *HistoryMutation) ResetTrigger()
- func (m *HistoryMutation) ResetTriggeredBy()
- func (m *HistoryMutation) ResetUpdatedAt()
- func (m *HistoryMutation) RunID() (r string, exists bool)
- func (m *HistoryMutation) ScriptID() (r int, exists bool)
- func (m *HistoryMutation) SetArguments(value map[string]string)
- func (m *HistoryMutation) SetCreatedAt(t time.Time)
- func (m *HistoryMutation) SetDuration(i int)
- func (m *HistoryMutation) SetExitCode(i int)
- func (m *HistoryMutation) SetField(name string, value ent.Value) error
- func (m *HistoryMutation) SetOp(op Op)
- func (m *HistoryMutation) SetOutput(s string)
- func (m *HistoryMutation) SetRunID(s string)
- func (m *HistoryMutation) SetScriptID(i int)
- func (m *HistoryMutation) SetStatus(s string)
- func (m *HistoryMutation) SetSuccess(b bool)
- func (m *HistoryMutation) SetTrigger(s string)
- func (m *HistoryMutation) SetTriggeredBy(s string)
- func (m *HistoryMutation) SetUpdatedAt(t time.Time)
- func (m *HistoryMutation) Status() (r string, exists bool)
- func (m *HistoryMutation) Success() (r bool, exists bool)
- func (m *HistoryMutation) Trigger() (r string, exists bool)
- func (m *HistoryMutation) TriggeredBy() (r string, exists bool)
- func (m HistoryMutation) Tx() (*Tx, error)
- func (m *HistoryMutation) Type() string
- func (m *HistoryMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *HistoryMutation) Where(ps ...predicate.History)
- func (m *HistoryMutation) WhereP(ps ...func(*sql.Selector))
- type HistoryQuery
- func (hq *HistoryQuery) Aggregate(fns ...AggregateFunc) *HistorySelect
- func (hq *HistoryQuery) All(ctx context.Context) ([]*History, error)
- func (hq *HistoryQuery) AllX(ctx context.Context) []*History
- func (hq *HistoryQuery) Clone() *HistoryQuery
- func (hq *HistoryQuery) Count(ctx context.Context) (int, error)
- func (hq *HistoryQuery) CountX(ctx context.Context) int
- func (hq *HistoryQuery) Exist(ctx context.Context) (bool, error)
- func (hq *HistoryQuery) ExistX(ctx context.Context) bool
- func (hq *HistoryQuery) First(ctx context.Context) (*History, error)
- func (hq *HistoryQuery) FirstID(ctx context.Context) (id int, err error)
- func (hq *HistoryQuery) FirstIDX(ctx context.Context) int
- func (hq *HistoryQuery) FirstX(ctx context.Context) *History
- func (hq *HistoryQuery) GroupBy(field string, fields ...string) *HistoryGroupBy
- func (hq *HistoryQuery) IDs(ctx context.Context) (ids []int, err error)
- func (hq *HistoryQuery) IDsX(ctx context.Context) []int
- func (hq *HistoryQuery) Limit(limit int) *HistoryQuery
- func (hq *HistoryQuery) Offset(offset int) *HistoryQuery
- func (hq *HistoryQuery) Only(ctx context.Context) (*History, error)
- func (hq *HistoryQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hq *HistoryQuery) OnlyIDX(ctx context.Context) int
- func (hq *HistoryQuery) OnlyX(ctx context.Context) *History
- func (hq *HistoryQuery) Order(o ...history.OrderOption) *HistoryQuery
- func (hq *HistoryQuery) Select(fields ...string) *HistorySelect
- func (hq *HistoryQuery) Unique(unique bool) *HistoryQuery
- func (hq *HistoryQuery) Where(ps ...predicate.History) *HistoryQuery
- type HistorySelect
- func (hs *HistorySelect) Aggregate(fns ...AggregateFunc) *HistorySelect
- func (s *HistorySelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HistorySelect) BoolX(ctx context.Context) bool
- func (s *HistorySelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HistorySelect) BoolsX(ctx context.Context) []bool
- func (s *HistorySelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HistorySelect) Float64X(ctx context.Context) float64
- func (s *HistorySelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HistorySelect) Float64sX(ctx context.Context) []float64
- func (s *HistorySelect) Int(ctx context.Context) (_ int, err error)
- func (s *HistorySelect) IntX(ctx context.Context) int
- func (s *HistorySelect) Ints(ctx context.Context) ([]int, error)
- func (s *HistorySelect) IntsX(ctx context.Context) []int
- func (hs *HistorySelect) Scan(ctx context.Context, v any) error
- func (s *HistorySelect) ScanX(ctx context.Context, v any)
- func (s *HistorySelect) String(ctx context.Context) (_ string, err error)
- func (s *HistorySelect) StringX(ctx context.Context) string
- func (s *HistorySelect) Strings(ctx context.Context) ([]string, error)
- func (s *HistorySelect) StringsX(ctx context.Context) []string
- type HistoryUpdate
- func (hu *HistoryUpdate) AddDuration(i int) *HistoryUpdate
- func (hu *HistoryUpdate) AddExitCode(i int) *HistoryUpdate
- func (hu *HistoryUpdate) AddScriptID(i int) *HistoryUpdate
- func (hu *HistoryUpdate) Exec(ctx context.Context) error
- func (hu *HistoryUpdate) ExecX(ctx context.Context)
- func (hu *HistoryUpdate) Mutation() *HistoryMutation
- func (hu *HistoryUpdate) Save(ctx context.Context) (int, error)
- func (hu *HistoryUpdate) SaveX(ctx context.Context) int
- func (hu *HistoryUpdate) SetArguments(m map[string]string) *HistoryUpdate
- func (hu *HistoryUpdate) SetDuration(i int) *HistoryUpdate
- func (hu *HistoryUpdate) SetExitCode(i int) *HistoryUpdate
- func (hu *HistoryUpdate) SetNillableStatus(s *string) *HistoryUpdate
- func (hu *HistoryUpdate) SetOutput(s string) *HistoryUpdate
- func (hu *HistoryUpdate) SetRunID(s string) *HistoryUpdate
- func (hu *HistoryUpdate) SetScriptID(i int) *HistoryUpdate
- func (hu *HistoryUpdate) SetStatus(s string) *HistoryUpdate
- func (hu *HistoryUpdate) SetSuccess(b bool) *HistoryUpdate
- func (hu *HistoryUpdate) SetTrigger(s string) *HistoryUpdate
- func (hu *HistoryUpdate) SetTriggeredBy(s string) *HistoryUpdate
- func (hu *HistoryUpdate) SetUpdatedAt(t time.Time) *HistoryUpdate
- func (hu *HistoryUpdate) Where(ps ...predicate.History) *HistoryUpdate
- type HistoryUpdateOne
- func (huo *HistoryUpdateOne) AddDuration(i int) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) AddExitCode(i int) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) AddScriptID(i int) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) Exec(ctx context.Context) error
- func (huo *HistoryUpdateOne) ExecX(ctx context.Context)
- func (huo *HistoryUpdateOne) Mutation() *HistoryMutation
- func (huo *HistoryUpdateOne) Save(ctx context.Context) (*History, error)
- func (huo *HistoryUpdateOne) SaveX(ctx context.Context) *History
- func (huo *HistoryUpdateOne) Select(field string, fields ...string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetArguments(m map[string]string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetDuration(i int) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetExitCode(i int) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetNillableStatus(s *string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetOutput(s string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetRunID(s string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetScriptID(i int) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetStatus(s string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetSuccess(b bool) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetTrigger(s string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetTriggeredBy(s string) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) SetUpdatedAt(t time.Time) *HistoryUpdateOne
- func (huo *HistoryUpdateOne) Where(ps ...predicate.History) *HistoryUpdateOne
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type NotificationChannel
- type NotificationChannelClient
- func (c *NotificationChannelClient) Create() *NotificationChannelCreate
- func (c *NotificationChannelClient) CreateBulk(builders ...*NotificationChannelCreate) *NotificationChannelCreateBulk
- func (c *NotificationChannelClient) Delete() *NotificationChannelDelete
- func (c *NotificationChannelClient) DeleteOne(nc *NotificationChannel) *NotificationChannelDeleteOne
- func (c *NotificationChannelClient) DeleteOneID(id int) *NotificationChannelDeleteOne
- func (c *NotificationChannelClient) Get(ctx context.Context, id int) (*NotificationChannel, error)
- func (c *NotificationChannelClient) GetX(ctx context.Context, id int) *NotificationChannel
- func (c *NotificationChannelClient) Hooks() []Hook
- func (c *NotificationChannelClient) Intercept(interceptors ...Interceptor)
- func (c *NotificationChannelClient) Interceptors() []Interceptor
- func (c *NotificationChannelClient) Query() *NotificationChannelQuery
- func (c *NotificationChannelClient) Update() *NotificationChannelUpdate
- func (c *NotificationChannelClient) UpdateOne(nc *NotificationChannel) *NotificationChannelUpdateOne
- func (c *NotificationChannelClient) UpdateOneID(id int) *NotificationChannelUpdateOne
- func (c *NotificationChannelClient) Use(hooks ...Hook)
- type NotificationChannelCreate
- func (ncc *NotificationChannelCreate) Exec(ctx context.Context) error
- func (ncc *NotificationChannelCreate) ExecX(ctx context.Context)
- func (ncc *NotificationChannelCreate) Mutation() *NotificationChannelMutation
- func (ncc *NotificationChannelCreate) Save(ctx context.Context) (*NotificationChannel, error)
- func (ncc *NotificationChannelCreate) SaveX(ctx context.Context) *NotificationChannel
- func (ncc *NotificationChannelCreate) SetCreatedAt(t time.Time) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetEmailConfig(sc schema.EmailConfig) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetEnabled(b bool) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetLastUsed(t time.Time) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetLastUsedSuccess(b bool) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetName(s string) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableCreatedAt(t *time.Time) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableEmailConfig(sc *schema.EmailConfig) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableEnabled(b *bool) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableLastUsed(t *time.Time) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableLastUsedSuccess(b *bool) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableSlackConfig(sc *schema.SlackConfig) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableUpdatedAt(t *time.Time) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetNillableWebhookConfig(sc *schema.WebhookConfig) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetSlackConfig(sc schema.SlackConfig) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetType(s string) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetUpdatedAt(t time.Time) *NotificationChannelCreate
- func (ncc *NotificationChannelCreate) SetWebhookConfig(sc schema.WebhookConfig) *NotificationChannelCreate
- type NotificationChannelCreateBulk
- func (nccb *NotificationChannelCreateBulk) Exec(ctx context.Context) error
- func (nccb *NotificationChannelCreateBulk) ExecX(ctx context.Context)
- func (nccb *NotificationChannelCreateBulk) Save(ctx context.Context) ([]*NotificationChannel, error)
- func (nccb *NotificationChannelCreateBulk) SaveX(ctx context.Context) []*NotificationChannel
- type NotificationChannelDelete
- type NotificationChannelDeleteOne
- type NotificationChannelGroupBy
- func (ncgb *NotificationChannelGroupBy) Aggregate(fns ...AggregateFunc) *NotificationChannelGroupBy
- func (s *NotificationChannelGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotificationChannelGroupBy) BoolX(ctx context.Context) bool
- func (s *NotificationChannelGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NotificationChannelGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NotificationChannelGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotificationChannelGroupBy) Float64X(ctx context.Context) float64
- func (s *NotificationChannelGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotificationChannelGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NotificationChannelGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NotificationChannelGroupBy) IntX(ctx context.Context) int
- func (s *NotificationChannelGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NotificationChannelGroupBy) IntsX(ctx context.Context) []int
- func (ncgb *NotificationChannelGroupBy) Scan(ctx context.Context, v any) error
- func (s *NotificationChannelGroupBy) ScanX(ctx context.Context, v any)
- func (s *NotificationChannelGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NotificationChannelGroupBy) StringX(ctx context.Context) string
- func (s *NotificationChannelGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NotificationChannelGroupBy) StringsX(ctx context.Context) []string
- type NotificationChannelMutation
- func (m *NotificationChannelMutation) AddField(name string, value ent.Value) error
- func (m *NotificationChannelMutation) AddedEdges() []string
- func (m *NotificationChannelMutation) AddedField(name string) (ent.Value, bool)
- func (m *NotificationChannelMutation) AddedFields() []string
- func (m *NotificationChannelMutation) AddedIDs(name string) []ent.Value
- func (m *NotificationChannelMutation) ClearEdge(name string) error
- func (m *NotificationChannelMutation) ClearEmailConfig()
- func (m *NotificationChannelMutation) ClearField(name string) error
- func (m *NotificationChannelMutation) ClearLastUsed()
- func (m *NotificationChannelMutation) ClearLastUsedSuccess()
- func (m *NotificationChannelMutation) ClearSlackConfig()
- func (m *NotificationChannelMutation) ClearWebhookConfig()
- func (m *NotificationChannelMutation) ClearedEdges() []string
- func (m *NotificationChannelMutation) ClearedFields() []string
- func (m NotificationChannelMutation) Client() *Client
- func (m *NotificationChannelMutation) CreatedAt() (r time.Time, exists bool)
- func (m *NotificationChannelMutation) EdgeCleared(name string) bool
- func (m *NotificationChannelMutation) EmailConfig() (r schema.EmailConfig, exists bool)
- func (m *NotificationChannelMutation) EmailConfigCleared() bool
- func (m *NotificationChannelMutation) Enabled() (r bool, exists bool)
- func (m *NotificationChannelMutation) Field(name string) (ent.Value, bool)
- func (m *NotificationChannelMutation) FieldCleared(name string) bool
- func (m *NotificationChannelMutation) Fields() []string
- func (m *NotificationChannelMutation) GetType() (r string, exists bool)
- func (m *NotificationChannelMutation) ID() (id int, exists bool)
- func (m *NotificationChannelMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NotificationChannelMutation) LastUsed() (r time.Time, exists bool)
- func (m *NotificationChannelMutation) LastUsedCleared() bool
- func (m *NotificationChannelMutation) LastUsedSuccess() (r bool, exists bool)
- func (m *NotificationChannelMutation) LastUsedSuccessCleared() bool
- func (m *NotificationChannelMutation) Name() (r string, exists bool)
- func (m *NotificationChannelMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NotificationChannelMutation) OldEmailConfig(ctx context.Context) (v schema.EmailConfig, err error)
- func (m *NotificationChannelMutation) OldEnabled(ctx context.Context) (v bool, err error)
- func (m *NotificationChannelMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NotificationChannelMutation) OldLastUsed(ctx context.Context) (v *time.Time, err error)
- func (m *NotificationChannelMutation) OldLastUsedSuccess(ctx context.Context) (v *bool, err error)
- func (m *NotificationChannelMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NotificationChannelMutation) OldSlackConfig(ctx context.Context) (v schema.SlackConfig, err error)
- func (m *NotificationChannelMutation) OldType(ctx context.Context) (v string, err error)
- func (m *NotificationChannelMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *NotificationChannelMutation) OldWebhookConfig(ctx context.Context) (v schema.WebhookConfig, err error)
- func (m *NotificationChannelMutation) Op() Op
- func (m *NotificationChannelMutation) RemovedEdges() []string
- func (m *NotificationChannelMutation) RemovedIDs(name string) []ent.Value
- func (m *NotificationChannelMutation) ResetCreatedAt()
- func (m *NotificationChannelMutation) ResetEdge(name string) error
- func (m *NotificationChannelMutation) ResetEmailConfig()
- func (m *NotificationChannelMutation) ResetEnabled()
- func (m *NotificationChannelMutation) ResetField(name string) error
- func (m *NotificationChannelMutation) ResetLastUsed()
- func (m *NotificationChannelMutation) ResetLastUsedSuccess()
- func (m *NotificationChannelMutation) ResetName()
- func (m *NotificationChannelMutation) ResetSlackConfig()
- func (m *NotificationChannelMutation) ResetType()
- func (m *NotificationChannelMutation) ResetUpdatedAt()
- func (m *NotificationChannelMutation) ResetWebhookConfig()
- func (m *NotificationChannelMutation) SetCreatedAt(t time.Time)
- func (m *NotificationChannelMutation) SetEmailConfig(sc schema.EmailConfig)
- func (m *NotificationChannelMutation) SetEnabled(b bool)
- func (m *NotificationChannelMutation) SetField(name string, value ent.Value) error
- func (m *NotificationChannelMutation) SetLastUsed(t time.Time)
- func (m *NotificationChannelMutation) SetLastUsedSuccess(b bool)
- func (m *NotificationChannelMutation) SetName(s string)
- func (m *NotificationChannelMutation) SetOp(op Op)
- func (m *NotificationChannelMutation) SetSlackConfig(sc schema.SlackConfig)
- func (m *NotificationChannelMutation) SetType(s string)
- func (m *NotificationChannelMutation) SetUpdatedAt(t time.Time)
- func (m *NotificationChannelMutation) SetWebhookConfig(sc schema.WebhookConfig)
- func (m *NotificationChannelMutation) SlackConfig() (r schema.SlackConfig, exists bool)
- func (m *NotificationChannelMutation) SlackConfigCleared() bool
- func (m NotificationChannelMutation) Tx() (*Tx, error)
- func (m *NotificationChannelMutation) Type() string
- func (m *NotificationChannelMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *NotificationChannelMutation) WebhookConfig() (r schema.WebhookConfig, exists bool)
- func (m *NotificationChannelMutation) WebhookConfigCleared() bool
- func (m *NotificationChannelMutation) Where(ps ...predicate.NotificationChannel)
- func (m *NotificationChannelMutation) WhereP(ps ...func(*sql.Selector))
- type NotificationChannelQuery
- func (ncq *NotificationChannelQuery) Aggregate(fns ...AggregateFunc) *NotificationChannelSelect
- func (ncq *NotificationChannelQuery) All(ctx context.Context) ([]*NotificationChannel, error)
- func (ncq *NotificationChannelQuery) AllX(ctx context.Context) []*NotificationChannel
- func (ncq *NotificationChannelQuery) Clone() *NotificationChannelQuery
- func (ncq *NotificationChannelQuery) Count(ctx context.Context) (int, error)
- func (ncq *NotificationChannelQuery) CountX(ctx context.Context) int
- func (ncq *NotificationChannelQuery) Exist(ctx context.Context) (bool, error)
- func (ncq *NotificationChannelQuery) ExistX(ctx context.Context) bool
- func (ncq *NotificationChannelQuery) First(ctx context.Context) (*NotificationChannel, error)
- func (ncq *NotificationChannelQuery) FirstID(ctx context.Context) (id int, err error)
- func (ncq *NotificationChannelQuery) FirstIDX(ctx context.Context) int
- func (ncq *NotificationChannelQuery) FirstX(ctx context.Context) *NotificationChannel
- func (ncq *NotificationChannelQuery) GroupBy(field string, fields ...string) *NotificationChannelGroupBy
- func (ncq *NotificationChannelQuery) IDs(ctx context.Context) (ids []int, err error)
- func (ncq *NotificationChannelQuery) IDsX(ctx context.Context) []int
- func (ncq *NotificationChannelQuery) Limit(limit int) *NotificationChannelQuery
- func (ncq *NotificationChannelQuery) Offset(offset int) *NotificationChannelQuery
- func (ncq *NotificationChannelQuery) Only(ctx context.Context) (*NotificationChannel, error)
- func (ncq *NotificationChannelQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ncq *NotificationChannelQuery) OnlyIDX(ctx context.Context) int
- func (ncq *NotificationChannelQuery) OnlyX(ctx context.Context) *NotificationChannel
- func (ncq *NotificationChannelQuery) Order(o ...notificationchannel.OrderOption) *NotificationChannelQuery
- func (ncq *NotificationChannelQuery) Select(fields ...string) *NotificationChannelSelect
- func (ncq *NotificationChannelQuery) Unique(unique bool) *NotificationChannelQuery
- func (ncq *NotificationChannelQuery) Where(ps ...predicate.NotificationChannel) *NotificationChannelQuery
- type NotificationChannelSelect
- func (ncs *NotificationChannelSelect) Aggregate(fns ...AggregateFunc) *NotificationChannelSelect
- func (s *NotificationChannelSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NotificationChannelSelect) BoolX(ctx context.Context) bool
- func (s *NotificationChannelSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NotificationChannelSelect) BoolsX(ctx context.Context) []bool
- func (s *NotificationChannelSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NotificationChannelSelect) Float64X(ctx context.Context) float64
- func (s *NotificationChannelSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NotificationChannelSelect) Float64sX(ctx context.Context) []float64
- func (s *NotificationChannelSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NotificationChannelSelect) IntX(ctx context.Context) int
- func (s *NotificationChannelSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NotificationChannelSelect) IntsX(ctx context.Context) []int
- func (ncs *NotificationChannelSelect) Scan(ctx context.Context, v any) error
- func (s *NotificationChannelSelect) ScanX(ctx context.Context, v any)
- func (s *NotificationChannelSelect) String(ctx context.Context) (_ string, err error)
- func (s *NotificationChannelSelect) StringX(ctx context.Context) string
- func (s *NotificationChannelSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NotificationChannelSelect) StringsX(ctx context.Context) []string
- type NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) ClearEmailConfig() *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) ClearLastUsed() *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) ClearLastUsedSuccess() *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) ClearSlackConfig() *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) ClearWebhookConfig() *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) Exec(ctx context.Context) error
- func (ncu *NotificationChannelUpdate) ExecX(ctx context.Context)
- func (ncu *NotificationChannelUpdate) Mutation() *NotificationChannelMutation
- func (ncu *NotificationChannelUpdate) Save(ctx context.Context) (int, error)
- func (ncu *NotificationChannelUpdate) SaveX(ctx context.Context) int
- func (ncu *NotificationChannelUpdate) SetEmailConfig(sc schema.EmailConfig) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetEnabled(b bool) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetLastUsed(t time.Time) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetLastUsedSuccess(b bool) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetName(s string) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetNillableEmailConfig(sc *schema.EmailConfig) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetNillableEnabled(b *bool) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetNillableLastUsed(t *time.Time) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetNillableLastUsedSuccess(b *bool) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetNillableSlackConfig(sc *schema.SlackConfig) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetNillableWebhookConfig(sc *schema.WebhookConfig) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetSlackConfig(sc schema.SlackConfig) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetType(s string) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetUpdatedAt(t time.Time) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) SetWebhookConfig(sc schema.WebhookConfig) *NotificationChannelUpdate
- func (ncu *NotificationChannelUpdate) Where(ps ...predicate.NotificationChannel) *NotificationChannelUpdate
- type NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) ClearEmailConfig() *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) ClearLastUsed() *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) ClearLastUsedSuccess() *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) ClearSlackConfig() *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) ClearWebhookConfig() *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) Exec(ctx context.Context) error
- func (ncuo *NotificationChannelUpdateOne) ExecX(ctx context.Context)
- func (ncuo *NotificationChannelUpdateOne) Mutation() *NotificationChannelMutation
- func (ncuo *NotificationChannelUpdateOne) Save(ctx context.Context) (*NotificationChannel, error)
- func (ncuo *NotificationChannelUpdateOne) SaveX(ctx context.Context) *NotificationChannel
- func (ncuo *NotificationChannelUpdateOne) Select(field string, fields ...string) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetEmailConfig(sc schema.EmailConfig) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetEnabled(b bool) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetLastUsed(t time.Time) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetLastUsedSuccess(b bool) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetName(s string) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetNillableEmailConfig(sc *schema.EmailConfig) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetNillableEnabled(b *bool) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetNillableLastUsed(t *time.Time) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetNillableLastUsedSuccess(b *bool) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetNillableSlackConfig(sc *schema.SlackConfig) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetNillableWebhookConfig(sc *schema.WebhookConfig) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetSlackConfig(sc schema.SlackConfig) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetType(s string) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetUpdatedAt(t time.Time) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) SetWebhookConfig(sc schema.WebhookConfig) *NotificationChannelUpdateOne
- func (ncuo *NotificationChannelUpdateOne) Where(ps ...predicate.NotificationChannel) *NotificationChannelUpdateOne
- type NotificationChannels
- type Op
- type Option
- type OrderFunc
- type Policy
- type Project
- type ProjectClient
- func (c *ProjectClient) Create() *ProjectCreate
- func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk
- func (c *ProjectClient) Delete() *ProjectDelete
- func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne
- func (c *ProjectClient) DeleteOneID(id int) *ProjectDeleteOne
- func (c *ProjectClient) Get(ctx context.Context, id int) (*Project, error)
- func (c *ProjectClient) GetX(ctx context.Context, id int) *Project
- func (c *ProjectClient) Hooks() []Hook
- func (c *ProjectClient) Intercept(interceptors ...Interceptor)
- func (c *ProjectClient) Interceptors() []Interceptor
- func (c *ProjectClient) Query() *ProjectQuery
- func (c *ProjectClient) Update() *ProjectUpdate
- func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne
- func (c *ProjectClient) UpdateOneID(id int) *ProjectUpdateOne
- func (c *ProjectClient) Use(hooks ...Hook)
- type ProjectCreate
- func (pc *ProjectCreate) Exec(ctx context.Context) error
- func (pc *ProjectCreate) ExecX(ctx context.Context)
- func (pc *ProjectCreate) Mutation() *ProjectMutation
- func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)
- func (pc *ProjectCreate) SaveX(ctx context.Context) *Project
- func (pc *ProjectCreate) SetCreatedAt(t time.Time) *ProjectCreate
- func (pc *ProjectCreate) SetDescription(s string) *ProjectCreate
- func (pc *ProjectCreate) SetName(s string) *ProjectCreate
- func (pc *ProjectCreate) SetNillableCreatedAt(t *time.Time) *ProjectCreate
- func (pc *ProjectCreate) SetNillableDescription(s *string) *ProjectCreate
- func (pc *ProjectCreate) SetNillableUpdatedAt(t *time.Time) *ProjectCreate
- func (pc *ProjectCreate) SetUpdatedAt(t time.Time) *ProjectCreate
- type ProjectCreateBulk
- type ProjectDelete
- type ProjectDeleteOne
- type ProjectGroupBy
- func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy
- func (s *ProjectGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProjectGroupBy) BoolX(ctx context.Context) bool
- func (s *ProjectGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProjectGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProjectGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProjectGroupBy) Float64X(ctx context.Context) float64
- func (s *ProjectGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProjectGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProjectGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProjectGroupBy) IntX(ctx context.Context) int
- func (s *ProjectGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProjectGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProjectGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProjectGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProjectGroupBy) StringX(ctx context.Context) string
- func (s *ProjectGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProjectGroupBy) StringsX(ctx context.Context) []string
- type ProjectMutation
- func (m *ProjectMutation) AddField(name string, value ent.Value) error
- func (m *ProjectMutation) AddedEdges() []string
- func (m *ProjectMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProjectMutation) AddedFields() []string
- func (m *ProjectMutation) AddedIDs(name string) []ent.Value
- func (m *ProjectMutation) ClearDescription()
- func (m *ProjectMutation) ClearEdge(name string) error
- func (m *ProjectMutation) ClearField(name string) error
- func (m *ProjectMutation) ClearedEdges() []string
- func (m *ProjectMutation) ClearedFields() []string
- func (m ProjectMutation) Client() *Client
- func (m *ProjectMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ProjectMutation) Description() (r string, exists bool)
- func (m *ProjectMutation) DescriptionCleared() bool
- func (m *ProjectMutation) EdgeCleared(name string) bool
- func (m *ProjectMutation) Field(name string) (ent.Value, bool)
- func (m *ProjectMutation) FieldCleared(name string) bool
- func (m *ProjectMutation) Fields() []string
- func (m *ProjectMutation) ID() (id int, exists bool)
- func (m *ProjectMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ProjectMutation) Name() (r string, exists bool)
- func (m *ProjectMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProjectMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ProjectMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProjectMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProjectMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ProjectMutation) Op() Op
- func (m *ProjectMutation) RemovedEdges() []string
- func (m *ProjectMutation) RemovedIDs(name string) []ent.Value
- func (m *ProjectMutation) ResetCreatedAt()
- func (m *ProjectMutation) ResetDescription()
- func (m *ProjectMutation) ResetEdge(name string) error
- func (m *ProjectMutation) ResetField(name string) error
- func (m *ProjectMutation) ResetName()
- func (m *ProjectMutation) ResetUpdatedAt()
- func (m *ProjectMutation) SetCreatedAt(t time.Time)
- func (m *ProjectMutation) SetDescription(s string)
- func (m *ProjectMutation) SetField(name string, value ent.Value) error
- func (m *ProjectMutation) SetName(s string)
- func (m *ProjectMutation) SetOp(op Op)
- func (m *ProjectMutation) SetUpdatedAt(t time.Time)
- func (m ProjectMutation) Tx() (*Tx, error)
- func (m *ProjectMutation) Type() string
- func (m *ProjectMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ProjectMutation) Where(ps ...predicate.Project)
- func (m *ProjectMutation) WhereP(ps ...func(*sql.Selector))
- type ProjectQuery
- func (pq *ProjectQuery) Aggregate(fns ...AggregateFunc) *ProjectSelect
- func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)
- func (pq *ProjectQuery) AllX(ctx context.Context) []*Project
- func (pq *ProjectQuery) Clone() *ProjectQuery
- func (pq *ProjectQuery) Count(ctx context.Context) (int, error)
- func (pq *ProjectQuery) CountX(ctx context.Context) int
- func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProjectQuery) ExistX(ctx context.Context) bool
- func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)
- func (pq *ProjectQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *ProjectQuery) FirstIDX(ctx context.Context) int
- func (pq *ProjectQuery) FirstX(ctx context.Context) *Project
- func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy
- func (pq *ProjectQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *ProjectQuery) IDsX(ctx context.Context) []int
- func (pq *ProjectQuery) Limit(limit int) *ProjectQuery
- func (pq *ProjectQuery) Offset(offset int) *ProjectQuery
- func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)
- func (pq *ProjectQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *ProjectQuery) OnlyIDX(ctx context.Context) int
- func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project
- func (pq *ProjectQuery) Order(o ...project.OrderOption) *ProjectQuery
- func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect
- func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery
- func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery
- type ProjectSelect
- func (ps *ProjectSelect) Aggregate(fns ...AggregateFunc) *ProjectSelect
- func (s *ProjectSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProjectSelect) BoolX(ctx context.Context) bool
- func (s *ProjectSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProjectSelect) BoolsX(ctx context.Context) []bool
- func (s *ProjectSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProjectSelect) Float64X(ctx context.Context) float64
- func (s *ProjectSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProjectSelect) Float64sX(ctx context.Context) []float64
- func (s *ProjectSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProjectSelect) IntX(ctx context.Context) int
- func (s *ProjectSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProjectSelect) IntsX(ctx context.Context) []int
- func (ps *ProjectSelect) Scan(ctx context.Context, v any) error
- func (s *ProjectSelect) ScanX(ctx context.Context, v any)
- func (s *ProjectSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProjectSelect) StringX(ctx context.Context) string
- func (s *ProjectSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProjectSelect) StringsX(ctx context.Context) []string
- type ProjectUpdate
- func (pu *ProjectUpdate) ClearDescription() *ProjectUpdate
- func (pu *ProjectUpdate) Exec(ctx context.Context) error
- func (pu *ProjectUpdate) ExecX(ctx context.Context)
- func (pu *ProjectUpdate) Mutation() *ProjectMutation
- func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProjectUpdate) SaveX(ctx context.Context) int
- func (pu *ProjectUpdate) SetDescription(s string) *ProjectUpdate
- func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate
- func (pu *ProjectUpdate) SetNillableDescription(s *string) *ProjectUpdate
- func (pu *ProjectUpdate) SetUpdatedAt(t time.Time) *ProjectUpdate
- func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate
- type ProjectUpdateOne
- func (puo *ProjectUpdateOne) ClearDescription() *ProjectUpdateOne
- func (puo *ProjectUpdateOne) Exec(ctx context.Context) error
- func (puo *ProjectUpdateOne) ExecX(ctx context.Context)
- func (puo *ProjectUpdateOne) Mutation() *ProjectMutation
- func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)
- func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project
- func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) SetDescription(s string) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) SetNillableDescription(s *string) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) SetUpdatedAt(t time.Time) *ProjectUpdateOne
- func (puo *ProjectUpdateOne) Where(ps ...predicate.Project) *ProjectUpdateOne
- type Projects
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Script
- type ScriptClient
- func (c *ScriptClient) Create() *ScriptCreate
- func (c *ScriptClient) CreateBulk(builders ...*ScriptCreate) *ScriptCreateBulk
- func (c *ScriptClient) Delete() *ScriptDelete
- func (c *ScriptClient) DeleteOne(s *Script) *ScriptDeleteOne
- func (c *ScriptClient) DeleteOneID(id int) *ScriptDeleteOne
- func (c *ScriptClient) Get(ctx context.Context, id int) (*Script, error)
- func (c *ScriptClient) GetX(ctx context.Context, id int) *Script
- func (c *ScriptClient) Hooks() []Hook
- func (c *ScriptClient) Intercept(interceptors ...Interceptor)
- func (c *ScriptClient) Interceptors() []Interceptor
- func (c *ScriptClient) Query() *ScriptQuery
- func (c *ScriptClient) Update() *ScriptUpdate
- func (c *ScriptClient) UpdateOne(s *Script) *ScriptUpdateOne
- func (c *ScriptClient) UpdateOneID(id int) *ScriptUpdateOne
- func (c *ScriptClient) Use(hooks ...Hook)
- type ScriptCreate
- func (sc *ScriptCreate) Exec(ctx context.Context) error
- func (sc *ScriptCreate) ExecX(ctx context.Context)
- func (sc *ScriptCreate) Mutation() *ScriptMutation
- func (sc *ScriptCreate) Save(ctx context.Context) (*Script, error)
- func (sc *ScriptCreate) SaveX(ctx context.Context) *Script
- func (sc *ScriptCreate) SetCreatedAt(t time.Time) *ScriptCreate
- func (sc *ScriptCreate) SetDescription(s string) *ScriptCreate
- func (sc *ScriptCreate) SetFailureNotificationChannelID(i int) *ScriptCreate
- func (sc *ScriptCreate) SetName(s string) *ScriptCreate
- func (sc *ScriptCreate) SetNillableCreatedAt(t *time.Time) *ScriptCreate
- func (sc *ScriptCreate) SetNillableDescription(s *string) *ScriptCreate
- func (sc *ScriptCreate) SetNillableFailureNotificationChannelID(i *int) *ScriptCreate
- func (sc *ScriptCreate) SetNillableScheduleCron(s *string) *ScriptCreate
- func (sc *ScriptCreate) SetNillableScheduleEnabled(b *bool) *ScriptCreate
- func (sc *ScriptCreate) SetNillableSuccessNotificationChannelID(i *int) *ScriptCreate
- func (sc *ScriptCreate) SetNillableTimeoutSeconds(i *int) *ScriptCreate
- func (sc *ScriptCreate) SetNillableUpdatedAt(t *time.Time) *ScriptCreate
- func (sc *ScriptCreate) SetParameters(sio []schema.ScriptInputOptions) *ScriptCreate
- func (sc *ScriptCreate) SetProjectID(i int) *ScriptCreate
- func (sc *ScriptCreate) SetScheduleCron(s string) *ScriptCreate
- func (sc *ScriptCreate) SetScheduleEnabled(b bool) *ScriptCreate
- func (sc *ScriptCreate) SetScript(s string) *ScriptCreate
- func (sc *ScriptCreate) SetSuccessNotificationChannelID(i int) *ScriptCreate
- func (sc *ScriptCreate) SetTimeoutSeconds(i int) *ScriptCreate
- func (sc *ScriptCreate) SetUpdatedAt(t time.Time) *ScriptCreate
- type ScriptCreateBulk
- type ScriptDelete
- type ScriptDeleteOne
- type ScriptGroupBy
- func (sgb *ScriptGroupBy) Aggregate(fns ...AggregateFunc) *ScriptGroupBy
- func (s *ScriptGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptGroupBy) BoolX(ctx context.Context) bool
- func (s *ScriptGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScriptGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptGroupBy) Float64X(ctx context.Context) float64
- func (s *ScriptGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScriptGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptGroupBy) IntX(ctx context.Context) int
- func (s *ScriptGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptGroupBy) IntsX(ctx context.Context) []int
- func (sgb *ScriptGroupBy) Scan(ctx context.Context, v any) error
- func (s *ScriptGroupBy) ScanX(ctx context.Context, v any)
- func (s *ScriptGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScriptGroupBy) StringX(ctx context.Context) string
- func (s *ScriptGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptGroupBy) StringsX(ctx context.Context) []string
- type ScriptMutation
- func (m *ScriptMutation) AddFailureNotificationChannelID(i int)
- func (m *ScriptMutation) AddField(name string, value ent.Value) error
- func (m *ScriptMutation) AddProjectID(i int)
- func (m *ScriptMutation) AddSuccessNotificationChannelID(i int)
- func (m *ScriptMutation) AddTimeoutSeconds(i int)
- func (m *ScriptMutation) AddedEdges() []string
- func (m *ScriptMutation) AddedFailureNotificationChannelID() (r int, exists bool)
- func (m *ScriptMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScriptMutation) AddedFields() []string
- func (m *ScriptMutation) AddedIDs(name string) []ent.Value
- func (m *ScriptMutation) AddedProjectID() (r int, exists bool)
- func (m *ScriptMutation) AddedSuccessNotificationChannelID() (r int, exists bool)
- func (m *ScriptMutation) AddedTimeoutSeconds() (r int, exists bool)
- func (m *ScriptMutation) AppendParameters(sio []schema.ScriptInputOptions)
- func (m *ScriptMutation) AppendedParameters() ([]schema.ScriptInputOptions, bool)
- func (m *ScriptMutation) ClearDescription()
- func (m *ScriptMutation) ClearEdge(name string) error
- func (m *ScriptMutation) ClearFailureNotificationChannelID()
- func (m *ScriptMutation) ClearField(name string) error
- func (m *ScriptMutation) ClearParameters()
- func (m *ScriptMutation) ClearScheduleCron()
- func (m *ScriptMutation) ClearSuccessNotificationChannelID()
- func (m *ScriptMutation) ClearedEdges() []string
- func (m *ScriptMutation) ClearedFields() []string
- func (m ScriptMutation) Client() *Client
- func (m *ScriptMutation) CreatedAt() (r time.Time, exists bool)
- func (m *ScriptMutation) Description() (r string, exists bool)
- func (m *ScriptMutation) DescriptionCleared() bool
- func (m *ScriptMutation) EdgeCleared(name string) bool
- func (m *ScriptMutation) FailureNotificationChannelID() (r int, exists bool)
- func (m *ScriptMutation) FailureNotificationChannelIDCleared() bool
- func (m *ScriptMutation) Field(name string) (ent.Value, bool)
- func (m *ScriptMutation) FieldCleared(name string) bool
- func (m *ScriptMutation) Fields() []string
- func (m *ScriptMutation) ID() (id int, exists bool)
- func (m *ScriptMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ScriptMutation) Name() (r string, exists bool)
- func (m *ScriptMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ScriptMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldFailureNotificationChannelID(ctx context.Context) (v *int, err error)
- func (m *ScriptMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScriptMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldParameters(ctx context.Context) (v []schema.ScriptInputOptions, err error)
- func (m *ScriptMutation) OldProjectID(ctx context.Context) (v int, err error)
- func (m *ScriptMutation) OldScheduleCron(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldScheduleEnabled(ctx context.Context) (v bool, err error)
- func (m *ScriptMutation) OldScript(ctx context.Context) (v string, err error)
- func (m *ScriptMutation) OldSuccessNotificationChannelID(ctx context.Context) (v *int, err error)
- func (m *ScriptMutation) OldTimeoutSeconds(ctx context.Context) (v int, err error)
- func (m *ScriptMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)
- func (m *ScriptMutation) Op() Op
- func (m *ScriptMutation) Parameters() (r []schema.ScriptInputOptions, exists bool)
- func (m *ScriptMutation) ParametersCleared() bool
- func (m *ScriptMutation) ProjectID() (r int, exists bool)
- func (m *ScriptMutation) RemovedEdges() []string
- func (m *ScriptMutation) RemovedIDs(name string) []ent.Value
- func (m *ScriptMutation) ResetCreatedAt()
- func (m *ScriptMutation) ResetDescription()
- func (m *ScriptMutation) ResetEdge(name string) error
- func (m *ScriptMutation) ResetFailureNotificationChannelID()
- func (m *ScriptMutation) ResetField(name string) error
- func (m *ScriptMutation) ResetName()
- func (m *ScriptMutation) ResetParameters()
- func (m *ScriptMutation) ResetProjectID()
- func (m *ScriptMutation) ResetScheduleCron()
- func (m *ScriptMutation) ResetScheduleEnabled()
- func (m *ScriptMutation) ResetScript()
- func (m *ScriptMutation) ResetSuccessNotificationChannelID()
- func (m *ScriptMutation) ResetTimeoutSeconds()
- func (m *ScriptMutation) ResetUpdatedAt()
- func (m *ScriptMutation) ScheduleCron() (r string, exists bool)
- func (m *ScriptMutation) ScheduleCronCleared() bool
- func (m *ScriptMutation) ScheduleEnabled() (r bool, exists bool)
- func (m *ScriptMutation) Script() (r string, exists bool)
- func (m *ScriptMutation) SetCreatedAt(t time.Time)
- func (m *ScriptMutation) SetDescription(s string)
- func (m *ScriptMutation) SetFailureNotificationChannelID(i int)
- func (m *ScriptMutation) SetField(name string, value ent.Value) error
- func (m *ScriptMutation) SetName(s string)
- func (m *ScriptMutation) SetOp(op Op)
- func (m *ScriptMutation) SetParameters(sio []schema.ScriptInputOptions)
- func (m *ScriptMutation) SetProjectID(i int)
- func (m *ScriptMutation) SetScheduleCron(s string)
- func (m *ScriptMutation) SetScheduleEnabled(b bool)
- func (m *ScriptMutation) SetScript(s string)
- func (m *ScriptMutation) SetSuccessNotificationChannelID(i int)
- func (m *ScriptMutation) SetTimeoutSeconds(i int)
- func (m *ScriptMutation) SetUpdatedAt(t time.Time)
- func (m *ScriptMutation) SuccessNotificationChannelID() (r int, exists bool)
- func (m *ScriptMutation) SuccessNotificationChannelIDCleared() bool
- func (m *ScriptMutation) TimeoutSeconds() (r int, exists bool)
- func (m ScriptMutation) Tx() (*Tx, error)
- func (m *ScriptMutation) Type() string
- func (m *ScriptMutation) UpdatedAt() (r time.Time, exists bool)
- func (m *ScriptMutation) Where(ps ...predicate.Script)
- func (m *ScriptMutation) WhereP(ps ...func(*sql.Selector))
- type ScriptQuery
- func (sq *ScriptQuery) Aggregate(fns ...AggregateFunc) *ScriptSelect
- func (sq *ScriptQuery) All(ctx context.Context) ([]*Script, error)
- func (sq *ScriptQuery) AllX(ctx context.Context) []*Script
- func (sq *ScriptQuery) Clone() *ScriptQuery
- func (sq *ScriptQuery) Count(ctx context.Context) (int, error)
- func (sq *ScriptQuery) CountX(ctx context.Context) int
- func (sq *ScriptQuery) Exist(ctx context.Context) (bool, error)
- func (sq *ScriptQuery) ExistX(ctx context.Context) bool
- func (sq *ScriptQuery) First(ctx context.Context) (*Script, error)
- func (sq *ScriptQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *ScriptQuery) FirstIDX(ctx context.Context) int
- func (sq *ScriptQuery) FirstX(ctx context.Context) *Script
- func (sq *ScriptQuery) GroupBy(field string, fields ...string) *ScriptGroupBy
- func (sq *ScriptQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sq *ScriptQuery) IDsX(ctx context.Context) []int
- func (sq *ScriptQuery) Limit(limit int) *ScriptQuery
- func (sq *ScriptQuery) Offset(offset int) *ScriptQuery
- func (sq *ScriptQuery) Only(ctx context.Context) (*Script, error)
- func (sq *ScriptQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *ScriptQuery) OnlyIDX(ctx context.Context) int
- func (sq *ScriptQuery) OnlyX(ctx context.Context) *Script
- func (sq *ScriptQuery) Order(o ...script.OrderOption) *ScriptQuery
- func (sq *ScriptQuery) Select(fields ...string) *ScriptSelect
- func (sq *ScriptQuery) Unique(unique bool) *ScriptQuery
- func (sq *ScriptQuery) Where(ps ...predicate.Script) *ScriptQuery
- type ScriptSelect
- func (ss *ScriptSelect) Aggregate(fns ...AggregateFunc) *ScriptSelect
- func (s *ScriptSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptSelect) BoolX(ctx context.Context) bool
- func (s *ScriptSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptSelect) BoolsX(ctx context.Context) []bool
- func (s *ScriptSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptSelect) Float64X(ctx context.Context) float64
- func (s *ScriptSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptSelect) Float64sX(ctx context.Context) []float64
- func (s *ScriptSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptSelect) IntX(ctx context.Context) int
- func (s *ScriptSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptSelect) IntsX(ctx context.Context) []int
- func (ss *ScriptSelect) Scan(ctx context.Context, v any) error
- func (s *ScriptSelect) ScanX(ctx context.Context, v any)
- func (s *ScriptSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScriptSelect) StringX(ctx context.Context) string
- func (s *ScriptSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptSelect) StringsX(ctx context.Context) []string
- type ScriptStats
- type ScriptStatsClient
- func (c *ScriptStatsClient) Create() *ScriptStatsCreate
- func (c *ScriptStatsClient) CreateBulk(builders ...*ScriptStatsCreate) *ScriptStatsCreateBulk
- func (c *ScriptStatsClient) Delete() *ScriptStatsDelete
- func (c *ScriptStatsClient) DeleteOne(ss *ScriptStats) *ScriptStatsDeleteOne
- func (c *ScriptStatsClient) DeleteOneID(id int) *ScriptStatsDeleteOne
- func (c *ScriptStatsClient) Get(ctx context.Context, id int) (*ScriptStats, error)
- func (c *ScriptStatsClient) GetX(ctx context.Context, id int) *ScriptStats
- func (c *ScriptStatsClient) Hooks() []Hook
- func (c *ScriptStatsClient) Intercept(interceptors ...Interceptor)
- func (c *ScriptStatsClient) Interceptors() []Interceptor
- func (c *ScriptStatsClient) Query() *ScriptStatsQuery
- func (c *ScriptStatsClient) Update() *ScriptStatsUpdate
- func (c *ScriptStatsClient) UpdateOne(ss *ScriptStats) *ScriptStatsUpdateOne
- func (c *ScriptStatsClient) UpdateOneID(id int) *ScriptStatsUpdateOne
- func (c *ScriptStatsClient) Use(hooks ...Hook)
- type ScriptStatsCreate
- func (ssc *ScriptStatsCreate) Exec(ctx context.Context) error
- func (ssc *ScriptStatsCreate) ExecX(ctx context.Context)
- func (ssc *ScriptStatsCreate) Mutation() *ScriptStatsMutation
- func (ssc *ScriptStatsCreate) Save(ctx context.Context) (*ScriptStats, error)
- func (ssc *ScriptStatsCreate) SaveX(ctx context.Context) *ScriptStats
- func (ssc *ScriptStatsCreate) SetAverageRuntime(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetLastRun(t time.Time) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetMaxRuntime(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetMinRuntime(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetProjectID(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetScriptID(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetSuccessRate(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetTotalErrors(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetTotalRuns(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetTotalRuntime(i int) *ScriptStatsCreate
- func (ssc *ScriptStatsCreate) SetTotalSuccess(i int) *ScriptStatsCreate
- type ScriptStatsCreateBulk
- type ScriptStatsDelete
- type ScriptStatsDeleteOne
- type ScriptStatsGroupBy
- func (ssgb *ScriptStatsGroupBy) Aggregate(fns ...AggregateFunc) *ScriptStatsGroupBy
- func (s *ScriptStatsGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptStatsGroupBy) BoolX(ctx context.Context) bool
- func (s *ScriptStatsGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptStatsGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ScriptStatsGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptStatsGroupBy) Float64X(ctx context.Context) float64
- func (s *ScriptStatsGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptStatsGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ScriptStatsGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptStatsGroupBy) IntX(ctx context.Context) int
- func (s *ScriptStatsGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptStatsGroupBy) IntsX(ctx context.Context) []int
- func (ssgb *ScriptStatsGroupBy) Scan(ctx context.Context, v any) error
- func (s *ScriptStatsGroupBy) ScanX(ctx context.Context, v any)
- func (s *ScriptStatsGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ScriptStatsGroupBy) StringX(ctx context.Context) string
- func (s *ScriptStatsGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptStatsGroupBy) StringsX(ctx context.Context) []string
- type ScriptStatsMutation
- func (m *ScriptStatsMutation) AddAverageRuntime(i int)
- func (m *ScriptStatsMutation) AddField(name string, value ent.Value) error
- func (m *ScriptStatsMutation) AddMaxRuntime(i int)
- func (m *ScriptStatsMutation) AddMinRuntime(i int)
- func (m *ScriptStatsMutation) AddProjectID(i int)
- func (m *ScriptStatsMutation) AddScriptID(i int)
- func (m *ScriptStatsMutation) AddSuccessRate(i int)
- func (m *ScriptStatsMutation) AddTotalErrors(i int)
- func (m *ScriptStatsMutation) AddTotalRuns(i int)
- func (m *ScriptStatsMutation) AddTotalRuntime(i int)
- func (m *ScriptStatsMutation) AddTotalSuccess(i int)
- func (m *ScriptStatsMutation) AddedAverageRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedEdges() []string
- func (m *ScriptStatsMutation) AddedField(name string) (ent.Value, bool)
- func (m *ScriptStatsMutation) AddedFields() []string
- func (m *ScriptStatsMutation) AddedIDs(name string) []ent.Value
- func (m *ScriptStatsMutation) AddedMaxRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedMinRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedProjectID() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedScriptID() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedSuccessRate() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedTotalErrors() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedTotalRuns() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedTotalRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) AddedTotalSuccess() (r int, exists bool)
- func (m *ScriptStatsMutation) AverageRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) ClearEdge(name string) error
- func (m *ScriptStatsMutation) ClearField(name string) error
- func (m *ScriptStatsMutation) ClearedEdges() []string
- func (m *ScriptStatsMutation) ClearedFields() []string
- func (m ScriptStatsMutation) Client() *Client
- func (m *ScriptStatsMutation) EdgeCleared(name string) bool
- func (m *ScriptStatsMutation) Field(name string) (ent.Value, bool)
- func (m *ScriptStatsMutation) FieldCleared(name string) bool
- func (m *ScriptStatsMutation) Fields() []string
- func (m *ScriptStatsMutation) ID() (id int, exists bool)
- func (m *ScriptStatsMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ScriptStatsMutation) LastRun() (r time.Time, exists bool)
- func (m *ScriptStatsMutation) MaxRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) MinRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) OldAverageRuntime(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ScriptStatsMutation) OldLastRun(ctx context.Context) (v time.Time, err error)
- func (m *ScriptStatsMutation) OldMaxRuntime(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldMinRuntime(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldProjectID(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldScriptID(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldSuccessRate(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldTotalErrors(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldTotalRuns(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldTotalRuntime(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) OldTotalSuccess(ctx context.Context) (v int, err error)
- func (m *ScriptStatsMutation) Op() Op
- func (m *ScriptStatsMutation) ProjectID() (r int, exists bool)
- func (m *ScriptStatsMutation) RemovedEdges() []string
- func (m *ScriptStatsMutation) RemovedIDs(name string) []ent.Value
- func (m *ScriptStatsMutation) ResetAverageRuntime()
- func (m *ScriptStatsMutation) ResetEdge(name string) error
- func (m *ScriptStatsMutation) ResetField(name string) error
- func (m *ScriptStatsMutation) ResetLastRun()
- func (m *ScriptStatsMutation) ResetMaxRuntime()
- func (m *ScriptStatsMutation) ResetMinRuntime()
- func (m *ScriptStatsMutation) ResetProjectID()
- func (m *ScriptStatsMutation) ResetScriptID()
- func (m *ScriptStatsMutation) ResetSuccessRate()
- func (m *ScriptStatsMutation) ResetTotalErrors()
- func (m *ScriptStatsMutation) ResetTotalRuns()
- func (m *ScriptStatsMutation) ResetTotalRuntime()
- func (m *ScriptStatsMutation) ResetTotalSuccess()
- func (m *ScriptStatsMutation) ScriptID() (r int, exists bool)
- func (m *ScriptStatsMutation) SetAverageRuntime(i int)
- func (m *ScriptStatsMutation) SetField(name string, value ent.Value) error
- func (m *ScriptStatsMutation) SetLastRun(t time.Time)
- func (m *ScriptStatsMutation) SetMaxRuntime(i int)
- func (m *ScriptStatsMutation) SetMinRuntime(i int)
- func (m *ScriptStatsMutation) SetOp(op Op)
- func (m *ScriptStatsMutation) SetProjectID(i int)
- func (m *ScriptStatsMutation) SetScriptID(i int)
- func (m *ScriptStatsMutation) SetSuccessRate(i int)
- func (m *ScriptStatsMutation) SetTotalErrors(i int)
- func (m *ScriptStatsMutation) SetTotalRuns(i int)
- func (m *ScriptStatsMutation) SetTotalRuntime(i int)
- func (m *ScriptStatsMutation) SetTotalSuccess(i int)
- func (m *ScriptStatsMutation) SuccessRate() (r int, exists bool)
- func (m *ScriptStatsMutation) TotalErrors() (r int, exists bool)
- func (m *ScriptStatsMutation) TotalRuns() (r int, exists bool)
- func (m *ScriptStatsMutation) TotalRuntime() (r int, exists bool)
- func (m *ScriptStatsMutation) TotalSuccess() (r int, exists bool)
- func (m ScriptStatsMutation) Tx() (*Tx, error)
- func (m *ScriptStatsMutation) Type() string
- func (m *ScriptStatsMutation) Where(ps ...predicate.ScriptStats)
- func (m *ScriptStatsMutation) WhereP(ps ...func(*sql.Selector))
- type ScriptStatsQuery
- func (ssq *ScriptStatsQuery) Aggregate(fns ...AggregateFunc) *ScriptStatsSelect
- func (ssq *ScriptStatsQuery) All(ctx context.Context) ([]*ScriptStats, error)
- func (ssq *ScriptStatsQuery) AllX(ctx context.Context) []*ScriptStats
- func (ssq *ScriptStatsQuery) Clone() *ScriptStatsQuery
- func (ssq *ScriptStatsQuery) Count(ctx context.Context) (int, error)
- func (ssq *ScriptStatsQuery) CountX(ctx context.Context) int
- func (ssq *ScriptStatsQuery) Exist(ctx context.Context) (bool, error)
- func (ssq *ScriptStatsQuery) ExistX(ctx context.Context) bool
- func (ssq *ScriptStatsQuery) First(ctx context.Context) (*ScriptStats, error)
- func (ssq *ScriptStatsQuery) FirstID(ctx context.Context) (id int, err error)
- func (ssq *ScriptStatsQuery) FirstIDX(ctx context.Context) int
- func (ssq *ScriptStatsQuery) FirstX(ctx context.Context) *ScriptStats
- func (ssq *ScriptStatsQuery) GroupBy(field string, fields ...string) *ScriptStatsGroupBy
- func (ssq *ScriptStatsQuery) IDs(ctx context.Context) (ids []int, err error)
- func (ssq *ScriptStatsQuery) IDsX(ctx context.Context) []int
- func (ssq *ScriptStatsQuery) Limit(limit int) *ScriptStatsQuery
- func (ssq *ScriptStatsQuery) Offset(offset int) *ScriptStatsQuery
- func (ssq *ScriptStatsQuery) Only(ctx context.Context) (*ScriptStats, error)
- func (ssq *ScriptStatsQuery) OnlyID(ctx context.Context) (id int, err error)
- func (ssq *ScriptStatsQuery) OnlyIDX(ctx context.Context) int
- func (ssq *ScriptStatsQuery) OnlyX(ctx context.Context) *ScriptStats
- func (ssq *ScriptStatsQuery) Order(o ...scriptstats.OrderOption) *ScriptStatsQuery
- func (ssq *ScriptStatsQuery) Select(fields ...string) *ScriptStatsSelect
- func (ssq *ScriptStatsQuery) Unique(unique bool) *ScriptStatsQuery
- func (ssq *ScriptStatsQuery) Where(ps ...predicate.ScriptStats) *ScriptStatsQuery
- type ScriptStatsSelect
- func (sss *ScriptStatsSelect) Aggregate(fns ...AggregateFunc) *ScriptStatsSelect
- func (s *ScriptStatsSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ScriptStatsSelect) BoolX(ctx context.Context) bool
- func (s *ScriptStatsSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ScriptStatsSelect) BoolsX(ctx context.Context) []bool
- func (s *ScriptStatsSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ScriptStatsSelect) Float64X(ctx context.Context) float64
- func (s *ScriptStatsSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ScriptStatsSelect) Float64sX(ctx context.Context) []float64
- func (s *ScriptStatsSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ScriptStatsSelect) IntX(ctx context.Context) int
- func (s *ScriptStatsSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ScriptStatsSelect) IntsX(ctx context.Context) []int
- func (sss *ScriptStatsSelect) Scan(ctx context.Context, v any) error
- func (s *ScriptStatsSelect) ScanX(ctx context.Context, v any)
- func (s *ScriptStatsSelect) String(ctx context.Context) (_ string, err error)
- func (s *ScriptStatsSelect) StringX(ctx context.Context) string
- func (s *ScriptStatsSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ScriptStatsSelect) StringsX(ctx context.Context) []string
- type ScriptStatsSlice
- type ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddAverageRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddMaxRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddMinRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddProjectID(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddScriptID(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddSuccessRate(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddTotalErrors(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddTotalRuns(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddTotalRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) AddTotalSuccess(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) Exec(ctx context.Context) error
- func (ssu *ScriptStatsUpdate) ExecX(ctx context.Context)
- func (ssu *ScriptStatsUpdate) Mutation() *ScriptStatsMutation
- func (ssu *ScriptStatsUpdate) Save(ctx context.Context) (int, error)
- func (ssu *ScriptStatsUpdate) SaveX(ctx context.Context) int
- func (ssu *ScriptStatsUpdate) SetAverageRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetLastRun(t time.Time) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetMaxRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetMinRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetProjectID(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetScriptID(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetSuccessRate(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetTotalErrors(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetTotalRuns(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetTotalRuntime(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) SetTotalSuccess(i int) *ScriptStatsUpdate
- func (ssu *ScriptStatsUpdate) Where(ps ...predicate.ScriptStats) *ScriptStatsUpdate
- type ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddAverageRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddMaxRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddMinRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddProjectID(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddScriptID(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddSuccessRate(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddTotalErrors(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddTotalRuns(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddTotalRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) AddTotalSuccess(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) Exec(ctx context.Context) error
- func (ssuo *ScriptStatsUpdateOne) ExecX(ctx context.Context)
- func (ssuo *ScriptStatsUpdateOne) Mutation() *ScriptStatsMutation
- func (ssuo *ScriptStatsUpdateOne) Save(ctx context.Context) (*ScriptStats, error)
- func (ssuo *ScriptStatsUpdateOne) SaveX(ctx context.Context) *ScriptStats
- func (ssuo *ScriptStatsUpdateOne) Select(field string, fields ...string) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetAverageRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetLastRun(t time.Time) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetMaxRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetMinRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetProjectID(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetScriptID(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetSuccessRate(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetTotalErrors(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetTotalRuns(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetTotalRuntime(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) SetTotalSuccess(i int) *ScriptStatsUpdateOne
- func (ssuo *ScriptStatsUpdateOne) Where(ps ...predicate.ScriptStats) *ScriptStatsUpdateOne
- type ScriptUpdate
- func (su *ScriptUpdate) AddFailureNotificationChannelID(i int) *ScriptUpdate
- func (su *ScriptUpdate) AddProjectID(i int) *ScriptUpdate
- func (su *ScriptUpdate) AddSuccessNotificationChannelID(i int) *ScriptUpdate
- func (su *ScriptUpdate) AddTimeoutSeconds(i int) *ScriptUpdate
- func (su *ScriptUpdate) AppendParameters(sio []schema.ScriptInputOptions) *ScriptUpdate
- func (su *ScriptUpdate) ClearDescription() *ScriptUpdate
- func (su *ScriptUpdate) ClearFailureNotificationChannelID() *ScriptUpdate
- func (su *ScriptUpdate) ClearParameters() *ScriptUpdate
- func (su *ScriptUpdate) ClearScheduleCron() *ScriptUpdate
- func (su *ScriptUpdate) ClearSuccessNotificationChannelID() *ScriptUpdate
- func (su *ScriptUpdate) Exec(ctx context.Context) error
- func (su *ScriptUpdate) ExecX(ctx context.Context)
- func (su *ScriptUpdate) Mutation() *ScriptMutation
- func (su *ScriptUpdate) Save(ctx context.Context) (int, error)
- func (su *ScriptUpdate) SaveX(ctx context.Context) int
- func (su *ScriptUpdate) SetDescription(s string) *ScriptUpdate
- func (su *ScriptUpdate) SetFailureNotificationChannelID(i int) *ScriptUpdate
- func (su *ScriptUpdate) SetName(s string) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableDescription(s *string) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableFailureNotificationChannelID(i *int) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableScheduleCron(s *string) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableScheduleEnabled(b *bool) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableSuccessNotificationChannelID(i *int) *ScriptUpdate
- func (su *ScriptUpdate) SetNillableTimeoutSeconds(i *int) *ScriptUpdate
- func (su *ScriptUpdate) SetParameters(sio []schema.ScriptInputOptions) *ScriptUpdate
- func (su *ScriptUpdate) SetProjectID(i int) *ScriptUpdate
- func (su *ScriptUpdate) SetScheduleCron(s string) *ScriptUpdate
- func (su *ScriptUpdate) SetScheduleEnabled(b bool) *ScriptUpdate
- func (su *ScriptUpdate) SetScript(s string) *ScriptUpdate
- func (su *ScriptUpdate) SetSuccessNotificationChannelID(i int) *ScriptUpdate
- func (su *ScriptUpdate) SetTimeoutSeconds(i int) *ScriptUpdate
- func (su *ScriptUpdate) SetUpdatedAt(t time.Time) *ScriptUpdate
- func (su *ScriptUpdate) Where(ps ...predicate.Script) *ScriptUpdate
- type ScriptUpdateOne
- func (suo *ScriptUpdateOne) AddFailureNotificationChannelID(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) AddProjectID(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) AddSuccessNotificationChannelID(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) AddTimeoutSeconds(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) AppendParameters(sio []schema.ScriptInputOptions) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) ClearDescription() *ScriptUpdateOne
- func (suo *ScriptUpdateOne) ClearFailureNotificationChannelID() *ScriptUpdateOne
- func (suo *ScriptUpdateOne) ClearParameters() *ScriptUpdateOne
- func (suo *ScriptUpdateOne) ClearScheduleCron() *ScriptUpdateOne
- func (suo *ScriptUpdateOne) ClearSuccessNotificationChannelID() *ScriptUpdateOne
- func (suo *ScriptUpdateOne) Exec(ctx context.Context) error
- func (suo *ScriptUpdateOne) ExecX(ctx context.Context)
- func (suo *ScriptUpdateOne) Mutation() *ScriptMutation
- func (suo *ScriptUpdateOne) Save(ctx context.Context) (*Script, error)
- func (suo *ScriptUpdateOne) SaveX(ctx context.Context) *Script
- func (suo *ScriptUpdateOne) Select(field string, fields ...string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetDescription(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetFailureNotificationChannelID(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetName(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableDescription(s *string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableFailureNotificationChannelID(i *int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableScheduleCron(s *string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableScheduleEnabled(b *bool) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableSuccessNotificationChannelID(i *int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetNillableTimeoutSeconds(i *int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetParameters(sio []schema.ScriptInputOptions) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetProjectID(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetScheduleCron(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetScheduleEnabled(b bool) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetScript(s string) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetSuccessNotificationChannelID(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetTimeoutSeconds(i int) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) SetUpdatedAt(t time.Time) *ScriptUpdateOne
- func (suo *ScriptUpdateOne) Where(ps ...predicate.Script) *ScriptUpdateOne
- type Scripts
- 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 int) *SecretDeleteOne
- func (c *SecretClient) Get(ctx context.Context, id int) (*Secret, error)
- func (c *SecretClient) GetX(ctx context.Context, id int) *Secret
- func (c *SecretClient) Hooks() []Hook
- func (c *SecretClient) Intercept(interceptors ...Interceptor)
- func (c *SecretClient) Interceptors() []Interceptor
- func (c *SecretClient) Query() *SecretQuery
- func (c *SecretClient) Update() *SecretUpdate
- func (c *SecretClient) UpdateOne(s *Secret) *SecretUpdateOne
- func (c *SecretClient) UpdateOneID(id int) *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) SetName(s string) *SecretCreate
- func (sc *SecretCreate) SetNillableCreatedAt(t *time.Time) *SecretCreate
- func (sc *SecretCreate) SetNillableUpdatedAt(t *time.Time) *SecretCreate
- func (sc *SecretCreate) SetProjectID(i int) *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) AddProjectID(i int)
- 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) AddedProjectID() (r int, exists bool)
- 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 int, exists bool)
- func (m *SecretMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SecretMutation) Name() (r string, exists bool)
- 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) OldName(ctx context.Context) (v string, err error)
- func (m *SecretMutation) OldProjectID(ctx context.Context) (v int, err 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) ProjectID() (r int, exists bool)
- 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) ResetName()
- func (m *SecretMutation) ResetProjectID()
- 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) SetName(s string)
- func (m *SecretMutation) SetOp(op Op)
- func (m *SecretMutation) SetProjectID(i int)
- 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)
- func (m *SecretMutation) WhereP(ps ...func(*sql.Selector))
- 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 int, err error)
- func (sq *SecretQuery) FirstIDX(ctx context.Context) int
- func (sq *SecretQuery) FirstX(ctx context.Context) *Secret
- func (sq *SecretQuery) GroupBy(field string, fields ...string) *SecretGroupBy
- func (sq *SecretQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sq *SecretQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (sq *SecretQuery) OnlyIDX(ctx context.Context) int
- func (sq *SecretQuery) OnlyX(ctx context.Context) *Secret
- func (sq *SecretQuery) Order(o ...secret.OrderOption) *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) AddProjectID(i int) *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) SetCreatedBy(s string) *SecretUpdate
- func (su *SecretUpdate) SetName(s string) *SecretUpdate
- func (su *SecretUpdate) SetProjectID(i int) *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) AddProjectID(i int) *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) SetCreatedBy(s string) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetName(s string) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetProjectID(i int) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetUpdatedAt(t time.Time) *SecretUpdateOne
- func (suo *SecretUpdateOne) SetValue(s string) *SecretUpdateOne
- func (suo *SecretUpdateOne) Where(ps ...predicate.Secret) *SecretUpdateOne
- type Secrets
- type TraverseFunc
- type Traverser
- 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 int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *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) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetHashedPassword(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableRole(u *user.Role) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate
- func (uc *UserCreate) SetRole(u user.Role) *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) 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) Email() (r string, exists 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) HashedPassword() (r string, exists bool)
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- 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) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldHashedPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldRole(ctx context.Context) (v user.Role, 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) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetHashedPassword()
- func (m *UserMutation) ResetRole()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) Role() (r user.Role, exists bool)
- func (m *UserMutation) SetAPIKey(s string)
- func (m *UserMutation) SetCreatedAt(t time.Time)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetHashedPassword(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetRole(u user.Role)
- 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)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- 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 int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- 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 int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *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) 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) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetHashedPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableRole(u *user.Role) *UserUpdate
- func (uu *UserUpdate) SetRole(u user.Role) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type 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) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetHashedPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableRole(u *user.Role) *UserUpdateOne
- func (uuo *UserUpdateOne) SetRole(u user.Role) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *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. TypeAccess = "Access" TypeHistory = "History" TypeNotificationChannel = "NotificationChannel" TypeProject = "Project" TypeScript = "Script" TypeScriptStats = "ScriptStats" TypeSecret = "Secret" 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 Access ¶
type Access struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // UserID holds the value of the "user_id" field. UserID int `json:"user_id,omitempty"` // ProjectID holds the value of the "project_id" field. ProjectID int `json:"project_id,omitempty"` // Role holds the value of the "role" field. Role access.Role `json:"role,omitempty"` // contains filtered or unexported fields }
Access is the model entity for the Access schema.
func (*Access) Unwrap ¶
Unwrap unwraps the Access 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 (*Access) Update ¶
func (a *Access) Update() *AccessUpdateOne
Update returns a builder for updating this Access. Note that you need to call Access.Unwrap() before calling this method if this Access was returned from a transaction, and the transaction was committed or rolled back.
type AccessClient ¶
type AccessClient struct {
// contains filtered or unexported fields
}
AccessClient is a client for the Access schema.
func NewAccessClient ¶
func NewAccessClient(c config) *AccessClient
NewAccessClient returns a client for the Access from the given config.
func (*AccessClient) Create ¶
func (c *AccessClient) Create() *AccessCreate
Create returns a builder for creating a Access entity.
func (*AccessClient) CreateBulk ¶
func (c *AccessClient) CreateBulk(builders ...*AccessCreate) *AccessCreateBulk
CreateBulk returns a builder for creating a bulk of Access entities.
func (*AccessClient) Delete ¶
func (c *AccessClient) Delete() *AccessDelete
Delete returns a delete builder for Access.
func (*AccessClient) DeleteOne ¶
func (c *AccessClient) DeleteOne(a *Access) *AccessDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AccessClient) DeleteOneID ¶
func (c *AccessClient) DeleteOneID(id int) *AccessDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AccessClient) GetX ¶
func (c *AccessClient) GetX(ctx context.Context, id int) *Access
GetX is like Get, but panics if an error occurs.
func (*AccessClient) Intercept ¶
func (c *AccessClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `access.Intercept(f(g(h())))`.
func (*AccessClient) Interceptors ¶
func (c *AccessClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AccessClient) Query ¶
func (c *AccessClient) Query() *AccessQuery
Query returns a query builder for Access.
func (*AccessClient) Update ¶
func (c *AccessClient) Update() *AccessUpdate
Update returns an update builder for Access.
func (*AccessClient) UpdateOne ¶
func (c *AccessClient) UpdateOne(a *Access) *AccessUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AccessClient) UpdateOneID ¶
func (c *AccessClient) UpdateOneID(id int) *AccessUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AccessClient) Use ¶
func (c *AccessClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `access.Hooks(f(g(h())))`.
type AccessCreate ¶
type AccessCreate struct {
// contains filtered or unexported fields
}
AccessCreate is the builder for creating a Access entity.
func (*AccessCreate) Exec ¶
func (ac *AccessCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessCreate) ExecX ¶
func (ac *AccessCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessCreate) Mutation ¶
func (ac *AccessCreate) Mutation() *AccessMutation
Mutation returns the AccessMutation object of the builder.
func (*AccessCreate) Save ¶
func (ac *AccessCreate) Save(ctx context.Context) (*Access, error)
Save creates the Access in the database.
func (*AccessCreate) SaveX ¶
func (ac *AccessCreate) SaveX(ctx context.Context) *Access
SaveX calls Save and panics if Save returns an error.
func (*AccessCreate) SetCreatedAt ¶
func (ac *AccessCreate) SetCreatedAt(t time.Time) *AccessCreate
SetCreatedAt sets the "created_at" field.
func (*AccessCreate) SetNillableCreatedAt ¶
func (ac *AccessCreate) SetNillableCreatedAt(t *time.Time) *AccessCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*AccessCreate) SetNillableRole ¶
func (ac *AccessCreate) SetNillableRole(a *access.Role) *AccessCreate
SetNillableRole sets the "role" field if the given value is not nil.
func (*AccessCreate) SetNillableUpdatedAt ¶
func (ac *AccessCreate) SetNillableUpdatedAt(t *time.Time) *AccessCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*AccessCreate) SetProjectID ¶
func (ac *AccessCreate) SetProjectID(i int) *AccessCreate
SetProjectID sets the "project_id" field.
func (*AccessCreate) SetRole ¶
func (ac *AccessCreate) SetRole(a access.Role) *AccessCreate
SetRole sets the "role" field.
func (*AccessCreate) SetUpdatedAt ¶
func (ac *AccessCreate) SetUpdatedAt(t time.Time) *AccessCreate
SetUpdatedAt sets the "updated_at" field.
func (*AccessCreate) SetUserID ¶
func (ac *AccessCreate) SetUserID(i int) *AccessCreate
SetUserID sets the "user_id" field.
type AccessCreateBulk ¶
type AccessCreateBulk struct {
// contains filtered or unexported fields
}
AccessCreateBulk is the builder for creating many Access entities in bulk.
func (*AccessCreateBulk) Exec ¶
func (acb *AccessCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessCreateBulk) ExecX ¶
func (acb *AccessCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AccessDelete ¶
type AccessDelete struct {
// contains filtered or unexported fields
}
AccessDelete is the builder for deleting a Access entity.
func (*AccessDelete) Exec ¶
func (ad *AccessDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AccessDelete) ExecX ¶
func (ad *AccessDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AccessDelete) Where ¶
func (ad *AccessDelete) Where(ps ...predicate.Access) *AccessDelete
Where appends a list predicates to the AccessDelete builder.
type AccessDeleteOne ¶
type AccessDeleteOne struct {
// contains filtered or unexported fields
}
AccessDeleteOne is the builder for deleting a single Access entity.
func (*AccessDeleteOne) Exec ¶
func (ado *AccessDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AccessDeleteOne) ExecX ¶
func (ado *AccessDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessDeleteOne) Where ¶
func (ado *AccessDeleteOne) Where(ps ...predicate.Access) *AccessDeleteOne
Where appends a list predicates to the AccessDelete builder.
type AccessGroupBy ¶
type AccessGroupBy struct {
// contains filtered or unexported fields
}
AccessGroupBy is the group-by builder for Access entities.
func (*AccessGroupBy) Aggregate ¶
func (agb *AccessGroupBy) Aggregate(fns ...AggregateFunc) *AccessGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AccessGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccessGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccessGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccessGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccessGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccessGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccessGroupBy) Scan ¶
func (agb *AccessGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccessGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccessMutation ¶
type AccessMutation struct {
// contains filtered or unexported fields
}
AccessMutation represents an operation that mutates the Access nodes in the graph.
func (*AccessMutation) AddField ¶
func (m *AccessMutation) 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 (*AccessMutation) AddProjectID ¶
func (m *AccessMutation) AddProjectID(i int)
AddProjectID adds i to the "project_id" field.
func (*AccessMutation) AddUserID ¶
func (m *AccessMutation) AddUserID(i int)
AddUserID adds i to the "user_id" field.
func (*AccessMutation) AddedEdges ¶
func (m *AccessMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AccessMutation) AddedField ¶
func (m *AccessMutation) 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 (*AccessMutation) AddedFields ¶
func (m *AccessMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AccessMutation) AddedIDs ¶
func (m *AccessMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AccessMutation) AddedProjectID ¶
func (m *AccessMutation) AddedProjectID() (r int, exists bool)
AddedProjectID returns the value that was added to the "project_id" field in this mutation.
func (*AccessMutation) AddedUserID ¶
func (m *AccessMutation) AddedUserID() (r int, exists bool)
AddedUserID returns the value that was added to the "user_id" field in this mutation.
func (*AccessMutation) ClearEdge ¶
func (m *AccessMutation) 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 (*AccessMutation) ClearField ¶
func (m *AccessMutation) 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 (*AccessMutation) ClearedEdges ¶
func (m *AccessMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AccessMutation) ClearedFields ¶
func (m *AccessMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AccessMutation) Client ¶
func (m AccessMutation) 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 (*AccessMutation) CreatedAt ¶
func (m *AccessMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*AccessMutation) EdgeCleared ¶
func (m *AccessMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AccessMutation) Field ¶
func (m *AccessMutation) 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 (*AccessMutation) FieldCleared ¶
func (m *AccessMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AccessMutation) Fields ¶
func (m *AccessMutation) 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 (*AccessMutation) ID ¶
func (m *AccessMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*AccessMutation) IDs ¶
func (m *AccessMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*AccessMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Access entity. If the Access 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 (*AccessMutation) 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 (*AccessMutation) OldProjectID ¶
func (m *AccessMutation) OldProjectID(ctx context.Context) (v int, err error)
OldProjectID returns the old "project_id" field's value of the Access entity. If the Access 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 (*AccessMutation) OldRole ¶
OldRole returns the old "role" field's value of the Access entity. If the Access 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 (*AccessMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Access entity. If the Access 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 (*AccessMutation) OldUserID ¶
func (m *AccessMutation) OldUserID(ctx context.Context) (v int, err error)
OldUserID returns the old "user_id" field's value of the Access entity. If the Access 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 (*AccessMutation) ProjectID ¶
func (m *AccessMutation) ProjectID() (r int, exists bool)
ProjectID returns the value of the "project_id" field in the mutation.
func (*AccessMutation) RemovedEdges ¶
func (m *AccessMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AccessMutation) RemovedIDs ¶
func (m *AccessMutation) 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 (*AccessMutation) ResetCreatedAt ¶
func (m *AccessMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*AccessMutation) ResetEdge ¶
func (m *AccessMutation) 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 (*AccessMutation) ResetField ¶
func (m *AccessMutation) 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 (*AccessMutation) ResetProjectID ¶
func (m *AccessMutation) ResetProjectID()
ResetProjectID resets all changes to the "project_id" field.
func (*AccessMutation) ResetRole ¶
func (m *AccessMutation) ResetRole()
ResetRole resets all changes to the "role" field.
func (*AccessMutation) ResetUpdatedAt ¶
func (m *AccessMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*AccessMutation) ResetUserID ¶
func (m *AccessMutation) ResetUserID()
ResetUserID resets all changes to the "user_id" field.
func (*AccessMutation) Role ¶
func (m *AccessMutation) Role() (r access.Role, exists bool)
Role returns the value of the "role" field in the mutation.
func (*AccessMutation) SetCreatedAt ¶
func (m *AccessMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*AccessMutation) SetField ¶
func (m *AccessMutation) 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 (*AccessMutation) SetOp ¶
func (m *AccessMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*AccessMutation) SetProjectID ¶
func (m *AccessMutation) SetProjectID(i int)
SetProjectID sets the "project_id" field.
func (*AccessMutation) SetRole ¶
func (m *AccessMutation) SetRole(a access.Role)
SetRole sets the "role" field.
func (*AccessMutation) SetUpdatedAt ¶
func (m *AccessMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*AccessMutation) SetUserID ¶
func (m *AccessMutation) SetUserID(i int)
SetUserID sets the "user_id" field.
func (AccessMutation) Tx ¶
func (m AccessMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AccessMutation) Type ¶
func (m *AccessMutation) Type() string
Type returns the node type of this mutation (Access).
func (*AccessMutation) UpdatedAt ¶
func (m *AccessMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*AccessMutation) UserID ¶
func (m *AccessMutation) UserID() (r int, exists bool)
UserID returns the value of the "user_id" field in the mutation.
func (*AccessMutation) Where ¶
func (m *AccessMutation) Where(ps ...predicate.Access)
Where appends a list predicates to the AccessMutation builder.
func (*AccessMutation) WhereP ¶
func (m *AccessMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AccessMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AccessQuery ¶
type AccessQuery struct {
// contains filtered or unexported fields
}
AccessQuery is the builder for querying Access entities.
func (*AccessQuery) Aggregate ¶
func (aq *AccessQuery) Aggregate(fns ...AggregateFunc) *AccessSelect
Aggregate returns a AccessSelect configured with the given aggregations.
func (*AccessQuery) All ¶
func (aq *AccessQuery) All(ctx context.Context) ([]*Access, error)
All executes the query and returns a list of Accesses.
func (*AccessQuery) AllX ¶
func (aq *AccessQuery) AllX(ctx context.Context) []*Access
AllX is like All, but panics if an error occurs.
func (*AccessQuery) Clone ¶
func (aq *AccessQuery) Clone() *AccessQuery
Clone returns a duplicate of the AccessQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AccessQuery) Count ¶
func (aq *AccessQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AccessQuery) CountX ¶
func (aq *AccessQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AccessQuery) Exist ¶
func (aq *AccessQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AccessQuery) ExistX ¶
func (aq *AccessQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AccessQuery) First ¶
func (aq *AccessQuery) First(ctx context.Context) (*Access, error)
First returns the first Access entity from the query. Returns a *NotFoundError when no Access was found.
func (*AccessQuery) FirstID ¶
func (aq *AccessQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Access ID from the query. Returns a *NotFoundError when no Access ID was found.
func (*AccessQuery) FirstIDX ¶
func (aq *AccessQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*AccessQuery) FirstX ¶
func (aq *AccessQuery) FirstX(ctx context.Context) *Access
FirstX is like First, but panics if an error occurs.
func (*AccessQuery) GroupBy ¶
func (aq *AccessQuery) GroupBy(field string, fields ...string) *AccessGroupBy
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.Access.Query(). GroupBy(access.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AccessQuery) IDs ¶
func (aq *AccessQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Access IDs.
func (*AccessQuery) IDsX ¶
func (aq *AccessQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*AccessQuery) Limit ¶
func (aq *AccessQuery) Limit(limit int) *AccessQuery
Limit the number of records to be returned by this query.
func (*AccessQuery) Offset ¶
func (aq *AccessQuery) Offset(offset int) *AccessQuery
Offset to start from.
func (*AccessQuery) Only ¶
func (aq *AccessQuery) Only(ctx context.Context) (*Access, error)
Only returns a single Access entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Access entity is found. Returns a *NotFoundError when no Access entities are found.
func (*AccessQuery) OnlyID ¶
func (aq *AccessQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Access ID in the query. Returns a *NotSingularError when more than one Access ID is found. Returns a *NotFoundError when no entities are found.
func (*AccessQuery) OnlyIDX ¶
func (aq *AccessQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AccessQuery) OnlyX ¶
func (aq *AccessQuery) OnlyX(ctx context.Context) *Access
OnlyX is like Only, but panics if an error occurs.
func (*AccessQuery) Order ¶
func (aq *AccessQuery) Order(o ...access.OrderOption) *AccessQuery
Order specifies how the records should be ordered.
func (*AccessQuery) Select ¶
func (aq *AccessQuery) Select(fields ...string) *AccessSelect
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.Access.Query(). Select(access.FieldCreatedAt). Scan(ctx, &v)
func (*AccessQuery) Unique ¶
func (aq *AccessQuery) Unique(unique bool) *AccessQuery
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 (*AccessQuery) Where ¶
func (aq *AccessQuery) Where(ps ...predicate.Access) *AccessQuery
Where adds a new predicate for the AccessQuery builder.
type AccessSelect ¶
type AccessSelect struct { *AccessQuery // contains filtered or unexported fields }
AccessSelect is the builder for selecting fields of Access entities.
func (*AccessSelect) Aggregate ¶
func (as *AccessSelect) Aggregate(fns ...AggregateFunc) *AccessSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AccessSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AccessSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AccessSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AccessSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AccessSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AccessSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AccessSelect) Scan ¶
func (as *AccessSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AccessSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AccessUpdate ¶
type AccessUpdate struct {
// contains filtered or unexported fields
}
AccessUpdate is the builder for updating Access entities.
func (*AccessUpdate) AddProjectID ¶
func (au *AccessUpdate) AddProjectID(i int) *AccessUpdate
AddProjectID adds i to the "project_id" field.
func (*AccessUpdate) AddUserID ¶
func (au *AccessUpdate) AddUserID(i int) *AccessUpdate
AddUserID adds i to the "user_id" field.
func (*AccessUpdate) Exec ¶
func (au *AccessUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AccessUpdate) ExecX ¶
func (au *AccessUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessUpdate) Mutation ¶
func (au *AccessUpdate) Mutation() *AccessMutation
Mutation returns the AccessMutation object of the builder.
func (*AccessUpdate) Save ¶
func (au *AccessUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AccessUpdate) SaveX ¶
func (au *AccessUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AccessUpdate) SetNillableRole ¶
func (au *AccessUpdate) SetNillableRole(a *access.Role) *AccessUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*AccessUpdate) SetProjectID ¶
func (au *AccessUpdate) SetProjectID(i int) *AccessUpdate
SetProjectID sets the "project_id" field.
func (*AccessUpdate) SetRole ¶
func (au *AccessUpdate) SetRole(a access.Role) *AccessUpdate
SetRole sets the "role" field.
func (*AccessUpdate) SetUpdatedAt ¶
func (au *AccessUpdate) SetUpdatedAt(t time.Time) *AccessUpdate
SetUpdatedAt sets the "updated_at" field.
func (*AccessUpdate) SetUserID ¶
func (au *AccessUpdate) SetUserID(i int) *AccessUpdate
SetUserID sets the "user_id" field.
func (*AccessUpdate) Where ¶
func (au *AccessUpdate) Where(ps ...predicate.Access) *AccessUpdate
Where appends a list predicates to the AccessUpdate builder.
type AccessUpdateOne ¶
type AccessUpdateOne struct {
// contains filtered or unexported fields
}
AccessUpdateOne is the builder for updating a single Access entity.
func (*AccessUpdateOne) AddProjectID ¶
func (auo *AccessUpdateOne) AddProjectID(i int) *AccessUpdateOne
AddProjectID adds i to the "project_id" field.
func (*AccessUpdateOne) AddUserID ¶
func (auo *AccessUpdateOne) AddUserID(i int) *AccessUpdateOne
AddUserID adds i to the "user_id" field.
func (*AccessUpdateOne) Exec ¶
func (auo *AccessUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AccessUpdateOne) ExecX ¶
func (auo *AccessUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AccessUpdateOne) Mutation ¶
func (auo *AccessUpdateOne) Mutation() *AccessMutation
Mutation returns the AccessMutation object of the builder.
func (*AccessUpdateOne) Save ¶
func (auo *AccessUpdateOne) Save(ctx context.Context) (*Access, error)
Save executes the query and returns the updated Access entity.
func (*AccessUpdateOne) SaveX ¶
func (auo *AccessUpdateOne) SaveX(ctx context.Context) *Access
SaveX is like Save, but panics if an error occurs.
func (*AccessUpdateOne) Select ¶
func (auo *AccessUpdateOne) Select(field string, fields ...string) *AccessUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AccessUpdateOne) SetNillableRole ¶
func (auo *AccessUpdateOne) SetNillableRole(a *access.Role) *AccessUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*AccessUpdateOne) SetProjectID ¶
func (auo *AccessUpdateOne) SetProjectID(i int) *AccessUpdateOne
SetProjectID sets the "project_id" field.
func (*AccessUpdateOne) SetRole ¶
func (auo *AccessUpdateOne) SetRole(a access.Role) *AccessUpdateOne
SetRole sets the "role" field.
func (*AccessUpdateOne) SetUpdatedAt ¶
func (auo *AccessUpdateOne) SetUpdatedAt(t time.Time) *AccessUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*AccessUpdateOne) SetUserID ¶
func (auo *AccessUpdateOne) SetUserID(i int) *AccessUpdateOne
SetUserID sets the "user_id" field.
func (*AccessUpdateOne) Where ¶
func (auo *AccessUpdateOne) Where(ps ...predicate.Access) *AccessUpdateOne
Where appends a list predicates to the AccessUpdate builder.
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 Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Access is the client for interacting with the Access builders. Access *AccessClient // History is the client for interacting with the History builders. History *HistoryClient // NotificationChannel is the client for interacting with the NotificationChannel builders. NotificationChannel *NotificationChannelClient // Project is the client for interacting with the Project builders. Project *ProjectClient // Script is the client for interacting with the Script builders. Script *ScriptClient // ScriptStats is the client for interacting with the ScriptStats builders. ScriptStats *ScriptStatsClient // Secret is the client for interacting with the Secret builders. Secret *SecretClient // 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(). Access. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
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 History ¶
type History struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // RunID holds the value of the "run_id" field. RunID string `json:"run_id,omitempty"` // Success holds the value of the "success" field. Success bool `json:"success,omitempty"` // ExitCode holds the value of the "exit_code" field. ExitCode int `json:"exit_code,omitempty"` // Duration holds the value of the "duration" field. Duration int `json:"duration,omitempty"` // Trigger holds the value of the "trigger" field. Trigger string `json:"trigger,omitempty"` // Output holds the value of the "output" field. Output string `json:"output,omitempty"` // TriggeredBy holds the value of the "triggered_by" field. TriggeredBy string `json:"triggered_by,omitempty"` // ScriptID holds the value of the "script_id" field. ScriptID int `json:"script_id,omitempty"` // Arguments holds the value of the "arguments" field. Arguments map[string]string `json:"arguments,omitempty"` // Status holds the value of the "status" field. Status string `json:"status,omitempty"` // contains filtered or unexported fields }
History is the model entity for the History schema.
func (*History) Unwrap ¶
Unwrap unwraps the History 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 (*History) Update ¶
func (h *History) Update() *HistoryUpdateOne
Update returns a builder for updating this History. Note that you need to call History.Unwrap() before calling this method if this History was returned from a transaction, and the transaction was committed or rolled back.
type HistoryClient ¶
type HistoryClient struct {
// contains filtered or unexported fields
}
HistoryClient is a client for the History schema.
func NewHistoryClient ¶
func NewHistoryClient(c config) *HistoryClient
NewHistoryClient returns a client for the History from the given config.
func (*HistoryClient) Create ¶
func (c *HistoryClient) Create() *HistoryCreate
Create returns a builder for creating a History entity.
func (*HistoryClient) CreateBulk ¶
func (c *HistoryClient) CreateBulk(builders ...*HistoryCreate) *HistoryCreateBulk
CreateBulk returns a builder for creating a bulk of History entities.
func (*HistoryClient) Delete ¶
func (c *HistoryClient) Delete() *HistoryDelete
Delete returns a delete builder for History.
func (*HistoryClient) DeleteOne ¶
func (c *HistoryClient) DeleteOne(h *History) *HistoryDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HistoryClient) DeleteOneID ¶
func (c *HistoryClient) DeleteOneID(id int) *HistoryDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*HistoryClient) GetX ¶
func (c *HistoryClient) GetX(ctx context.Context, id int) *History
GetX is like Get, but panics if an error occurs.
func (*HistoryClient) Hooks ¶
func (c *HistoryClient) Hooks() []Hook
Hooks returns the client hooks.
func (*HistoryClient) Intercept ¶
func (c *HistoryClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `history.Intercept(f(g(h())))`.
func (*HistoryClient) Interceptors ¶
func (c *HistoryClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*HistoryClient) Query ¶
func (c *HistoryClient) Query() *HistoryQuery
Query returns a query builder for History.
func (*HistoryClient) Update ¶
func (c *HistoryClient) Update() *HistoryUpdate
Update returns an update builder for History.
func (*HistoryClient) UpdateOne ¶
func (c *HistoryClient) UpdateOne(h *History) *HistoryUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HistoryClient) UpdateOneID ¶
func (c *HistoryClient) UpdateOneID(id int) *HistoryUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HistoryClient) Use ¶
func (c *HistoryClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `history.Hooks(f(g(h())))`.
type HistoryCreate ¶
type HistoryCreate struct {
// contains filtered or unexported fields
}
HistoryCreate is the builder for creating a History entity.
func (*HistoryCreate) Exec ¶
func (hc *HistoryCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryCreate) ExecX ¶
func (hc *HistoryCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryCreate) Mutation ¶
func (hc *HistoryCreate) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryCreate) Save ¶
func (hc *HistoryCreate) Save(ctx context.Context) (*History, error)
Save creates the History in the database.
func (*HistoryCreate) SaveX ¶
func (hc *HistoryCreate) SaveX(ctx context.Context) *History
SaveX calls Save and panics if Save returns an error.
func (*HistoryCreate) SetArguments ¶
func (hc *HistoryCreate) SetArguments(m map[string]string) *HistoryCreate
SetArguments sets the "arguments" field.
func (*HistoryCreate) SetCreatedAt ¶
func (hc *HistoryCreate) SetCreatedAt(t time.Time) *HistoryCreate
SetCreatedAt sets the "created_at" field.
func (*HistoryCreate) SetDuration ¶
func (hc *HistoryCreate) SetDuration(i int) *HistoryCreate
SetDuration sets the "duration" field.
func (*HistoryCreate) SetExitCode ¶
func (hc *HistoryCreate) SetExitCode(i int) *HistoryCreate
SetExitCode sets the "exit_code" field.
func (*HistoryCreate) SetNillableCreatedAt ¶
func (hc *HistoryCreate) SetNillableCreatedAt(t *time.Time) *HistoryCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*HistoryCreate) SetNillableStatus ¶
func (hc *HistoryCreate) SetNillableStatus(s *string) *HistoryCreate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*HistoryCreate) SetNillableUpdatedAt ¶
func (hc *HistoryCreate) SetNillableUpdatedAt(t *time.Time) *HistoryCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*HistoryCreate) SetOutput ¶
func (hc *HistoryCreate) SetOutput(s string) *HistoryCreate
SetOutput sets the "output" field.
func (*HistoryCreate) SetRunID ¶
func (hc *HistoryCreate) SetRunID(s string) *HistoryCreate
SetRunID sets the "run_id" field.
func (*HistoryCreate) SetScriptID ¶
func (hc *HistoryCreate) SetScriptID(i int) *HistoryCreate
SetScriptID sets the "script_id" field.
func (*HistoryCreate) SetStatus ¶
func (hc *HistoryCreate) SetStatus(s string) *HistoryCreate
SetStatus sets the "status" field.
func (*HistoryCreate) SetSuccess ¶
func (hc *HistoryCreate) SetSuccess(b bool) *HistoryCreate
SetSuccess sets the "success" field.
func (*HistoryCreate) SetTrigger ¶
func (hc *HistoryCreate) SetTrigger(s string) *HistoryCreate
SetTrigger sets the "trigger" field.
func (*HistoryCreate) SetTriggeredBy ¶
func (hc *HistoryCreate) SetTriggeredBy(s string) *HistoryCreate
SetTriggeredBy sets the "triggered_by" field.
func (*HistoryCreate) SetUpdatedAt ¶
func (hc *HistoryCreate) SetUpdatedAt(t time.Time) *HistoryCreate
SetUpdatedAt sets the "updated_at" field.
type HistoryCreateBulk ¶
type HistoryCreateBulk struct {
// contains filtered or unexported fields
}
HistoryCreateBulk is the builder for creating many History entities in bulk.
func (*HistoryCreateBulk) Exec ¶
func (hcb *HistoryCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryCreateBulk) ExecX ¶
func (hcb *HistoryCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type HistoryDelete ¶
type HistoryDelete struct {
// contains filtered or unexported fields
}
HistoryDelete is the builder for deleting a History entity.
func (*HistoryDelete) Exec ¶
func (hd *HistoryDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HistoryDelete) ExecX ¶
func (hd *HistoryDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HistoryDelete) Where ¶
func (hd *HistoryDelete) Where(ps ...predicate.History) *HistoryDelete
Where appends a list predicates to the HistoryDelete builder.
type HistoryDeleteOne ¶
type HistoryDeleteOne struct {
// contains filtered or unexported fields
}
HistoryDeleteOne is the builder for deleting a single History entity.
func (*HistoryDeleteOne) Exec ¶
func (hdo *HistoryDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HistoryDeleteOne) ExecX ¶
func (hdo *HistoryDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryDeleteOne) Where ¶
func (hdo *HistoryDeleteOne) Where(ps ...predicate.History) *HistoryDeleteOne
Where appends a list predicates to the HistoryDelete builder.
type HistoryGroupBy ¶
type HistoryGroupBy struct {
// contains filtered or unexported fields
}
HistoryGroupBy is the group-by builder for History entities.
func (*HistoryGroupBy) Aggregate ¶
func (hgb *HistoryGroupBy) Aggregate(fns ...AggregateFunc) *HistoryGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HistoryGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HistoryGroupBy) Scan ¶
func (hgb *HistoryGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HistoryGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HistoryMutation ¶
type HistoryMutation struct {
// contains filtered or unexported fields
}
HistoryMutation represents an operation that mutates the History nodes in the graph.
func (*HistoryMutation) AddDuration ¶
func (m *HistoryMutation) AddDuration(i int)
AddDuration adds i to the "duration" field.
func (*HistoryMutation) AddExitCode ¶
func (m *HistoryMutation) AddExitCode(i int)
AddExitCode adds i to the "exit_code" field.
func (*HistoryMutation) AddField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) AddScriptID ¶
func (m *HistoryMutation) AddScriptID(i int)
AddScriptID adds i to the "script_id" field.
func (*HistoryMutation) AddedDuration ¶
func (m *HistoryMutation) AddedDuration() (r int, exists bool)
AddedDuration returns the value that was added to the "duration" field in this mutation.
func (*HistoryMutation) AddedEdges ¶
func (m *HistoryMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HistoryMutation) AddedExitCode ¶
func (m *HistoryMutation) AddedExitCode() (r int, exists bool)
AddedExitCode returns the value that was added to the "exit_code" field in this mutation.
func (*HistoryMutation) AddedField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) AddedFields ¶
func (m *HistoryMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HistoryMutation) AddedIDs ¶
func (m *HistoryMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HistoryMutation) AddedScriptID ¶
func (m *HistoryMutation) AddedScriptID() (r int, exists bool)
AddedScriptID returns the value that was added to the "script_id" field in this mutation.
func (*HistoryMutation) Arguments ¶
func (m *HistoryMutation) Arguments() (r map[string]string, exists bool)
Arguments returns the value of the "arguments" field in the mutation.
func (*HistoryMutation) ClearEdge ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ClearField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ClearedEdges ¶
func (m *HistoryMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HistoryMutation) ClearedFields ¶
func (m *HistoryMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HistoryMutation) Client ¶
func (m HistoryMutation) 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 (*HistoryMutation) CreatedAt ¶
func (m *HistoryMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*HistoryMutation) Duration ¶
func (m *HistoryMutation) Duration() (r int, exists bool)
Duration returns the value of the "duration" field in the mutation.
func (*HistoryMutation) EdgeCleared ¶
func (m *HistoryMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HistoryMutation) ExitCode ¶
func (m *HistoryMutation) ExitCode() (r int, exists bool)
ExitCode returns the value of the "exit_code" field in the mutation.
func (*HistoryMutation) Field ¶
func (m *HistoryMutation) 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 (*HistoryMutation) FieldCleared ¶
func (m *HistoryMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HistoryMutation) Fields ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ID ¶
func (m *HistoryMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*HistoryMutation) IDs ¶
func (m *HistoryMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*HistoryMutation) OldArguments ¶
OldArguments returns the old "arguments" field's value of the History entity. If the History 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 (*HistoryMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the History entity. If the History 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 (*HistoryMutation) OldDuration ¶
func (m *HistoryMutation) OldDuration(ctx context.Context) (v int, err error)
OldDuration returns the old "duration" field's value of the History entity. If the History 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 (*HistoryMutation) OldExitCode ¶
func (m *HistoryMutation) OldExitCode(ctx context.Context) (v int, err error)
OldExitCode returns the old "exit_code" field's value of the History entity. If the History 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 (*HistoryMutation) 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 (*HistoryMutation) OldOutput ¶
func (m *HistoryMutation) OldOutput(ctx context.Context) (v string, err error)
OldOutput returns the old "output" field's value of the History entity. If the History 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 (*HistoryMutation) OldRunID ¶
func (m *HistoryMutation) OldRunID(ctx context.Context) (v string, err error)
OldRunID returns the old "run_id" field's value of the History entity. If the History 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 (*HistoryMutation) OldScriptID ¶
func (m *HistoryMutation) OldScriptID(ctx context.Context) (v int, err error)
OldScriptID returns the old "script_id" field's value of the History entity. If the History 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 (*HistoryMutation) OldStatus ¶
func (m *HistoryMutation) OldStatus(ctx context.Context) (v string, err error)
OldStatus returns the old "status" field's value of the History entity. If the History 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 (*HistoryMutation) OldSuccess ¶
func (m *HistoryMutation) OldSuccess(ctx context.Context) (v bool, err error)
OldSuccess returns the old "success" field's value of the History entity. If the History 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 (*HistoryMutation) OldTrigger ¶
func (m *HistoryMutation) OldTrigger(ctx context.Context) (v string, err error)
OldTrigger returns the old "trigger" field's value of the History entity. If the History 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 (*HistoryMutation) OldTriggeredBy ¶
func (m *HistoryMutation) OldTriggeredBy(ctx context.Context) (v string, err error)
OldTriggeredBy returns the old "triggered_by" field's value of the History entity. If the History 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 (*HistoryMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the History entity. If the History 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 (*HistoryMutation) Output ¶
func (m *HistoryMutation) Output() (r string, exists bool)
Output returns the value of the "output" field in the mutation.
func (*HistoryMutation) RemovedEdges ¶
func (m *HistoryMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HistoryMutation) RemovedIDs ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetArguments ¶
func (m *HistoryMutation) ResetArguments()
ResetArguments resets all changes to the "arguments" field.
func (*HistoryMutation) ResetCreatedAt ¶
func (m *HistoryMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*HistoryMutation) ResetDuration ¶
func (m *HistoryMutation) ResetDuration()
ResetDuration resets all changes to the "duration" field.
func (*HistoryMutation) ResetEdge ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetExitCode ¶
func (m *HistoryMutation) ResetExitCode()
ResetExitCode resets all changes to the "exit_code" field.
func (*HistoryMutation) ResetField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) ResetOutput ¶
func (m *HistoryMutation) ResetOutput()
ResetOutput resets all changes to the "output" field.
func (*HistoryMutation) ResetRunID ¶
func (m *HistoryMutation) ResetRunID()
ResetRunID resets all changes to the "run_id" field.
func (*HistoryMutation) ResetScriptID ¶
func (m *HistoryMutation) ResetScriptID()
ResetScriptID resets all changes to the "script_id" field.
func (*HistoryMutation) ResetStatus ¶
func (m *HistoryMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*HistoryMutation) ResetSuccess ¶
func (m *HistoryMutation) ResetSuccess()
ResetSuccess resets all changes to the "success" field.
func (*HistoryMutation) ResetTrigger ¶
func (m *HistoryMutation) ResetTrigger()
ResetTrigger resets all changes to the "trigger" field.
func (*HistoryMutation) ResetTriggeredBy ¶
func (m *HistoryMutation) ResetTriggeredBy()
ResetTriggeredBy resets all changes to the "triggered_by" field.
func (*HistoryMutation) ResetUpdatedAt ¶
func (m *HistoryMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*HistoryMutation) RunID ¶
func (m *HistoryMutation) RunID() (r string, exists bool)
RunID returns the value of the "run_id" field in the mutation.
func (*HistoryMutation) ScriptID ¶
func (m *HistoryMutation) ScriptID() (r int, exists bool)
ScriptID returns the value of the "script_id" field in the mutation.
func (*HistoryMutation) SetArguments ¶
func (m *HistoryMutation) SetArguments(value map[string]string)
SetArguments sets the "arguments" field.
func (*HistoryMutation) SetCreatedAt ¶
func (m *HistoryMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*HistoryMutation) SetDuration ¶
func (m *HistoryMutation) SetDuration(i int)
SetDuration sets the "duration" field.
func (*HistoryMutation) SetExitCode ¶
func (m *HistoryMutation) SetExitCode(i int)
SetExitCode sets the "exit_code" field.
func (*HistoryMutation) SetField ¶
func (m *HistoryMutation) 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 (*HistoryMutation) SetOp ¶
func (m *HistoryMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*HistoryMutation) SetOutput ¶
func (m *HistoryMutation) SetOutput(s string)
SetOutput sets the "output" field.
func (*HistoryMutation) SetRunID ¶
func (m *HistoryMutation) SetRunID(s string)
SetRunID sets the "run_id" field.
func (*HistoryMutation) SetScriptID ¶
func (m *HistoryMutation) SetScriptID(i int)
SetScriptID sets the "script_id" field.
func (*HistoryMutation) SetStatus ¶
func (m *HistoryMutation) SetStatus(s string)
SetStatus sets the "status" field.
func (*HistoryMutation) SetSuccess ¶
func (m *HistoryMutation) SetSuccess(b bool)
SetSuccess sets the "success" field.
func (*HistoryMutation) SetTrigger ¶
func (m *HistoryMutation) SetTrigger(s string)
SetTrigger sets the "trigger" field.
func (*HistoryMutation) SetTriggeredBy ¶
func (m *HistoryMutation) SetTriggeredBy(s string)
SetTriggeredBy sets the "triggered_by" field.
func (*HistoryMutation) SetUpdatedAt ¶
func (m *HistoryMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*HistoryMutation) Status ¶
func (m *HistoryMutation) Status() (r string, exists bool)
Status returns the value of the "status" field in the mutation.
func (*HistoryMutation) Success ¶
func (m *HistoryMutation) Success() (r bool, exists bool)
Success returns the value of the "success" field in the mutation.
func (*HistoryMutation) Trigger ¶
func (m *HistoryMutation) Trigger() (r string, exists bool)
Trigger returns the value of the "trigger" field in the mutation.
func (*HistoryMutation) TriggeredBy ¶
func (m *HistoryMutation) TriggeredBy() (r string, exists bool)
TriggeredBy returns the value of the "triggered_by" field in the mutation.
func (HistoryMutation) Tx ¶
func (m HistoryMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HistoryMutation) Type ¶
func (m *HistoryMutation) Type() string
Type returns the node type of this mutation (History).
func (*HistoryMutation) UpdatedAt ¶
func (m *HistoryMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*HistoryMutation) Where ¶
func (m *HistoryMutation) Where(ps ...predicate.History)
Where appends a list predicates to the HistoryMutation builder.
func (*HistoryMutation) WhereP ¶
func (m *HistoryMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HistoryMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type HistoryQuery ¶
type HistoryQuery struct {
// contains filtered or unexported fields
}
HistoryQuery is the builder for querying History entities.
func (*HistoryQuery) Aggregate ¶
func (hq *HistoryQuery) Aggregate(fns ...AggregateFunc) *HistorySelect
Aggregate returns a HistorySelect configured with the given aggregations.
func (*HistoryQuery) All ¶
func (hq *HistoryQuery) All(ctx context.Context) ([]*History, error)
All executes the query and returns a list of Histories.
func (*HistoryQuery) AllX ¶
func (hq *HistoryQuery) AllX(ctx context.Context) []*History
AllX is like All, but panics if an error occurs.
func (*HistoryQuery) Clone ¶
func (hq *HistoryQuery) Clone() *HistoryQuery
Clone returns a duplicate of the HistoryQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HistoryQuery) Count ¶
func (hq *HistoryQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*HistoryQuery) CountX ¶
func (hq *HistoryQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*HistoryQuery) Exist ¶
func (hq *HistoryQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*HistoryQuery) ExistX ¶
func (hq *HistoryQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*HistoryQuery) First ¶
func (hq *HistoryQuery) First(ctx context.Context) (*History, error)
First returns the first History entity from the query. Returns a *NotFoundError when no History was found.
func (*HistoryQuery) FirstID ¶
func (hq *HistoryQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first History ID from the query. Returns a *NotFoundError when no History ID was found.
func (*HistoryQuery) FirstIDX ¶
func (hq *HistoryQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*HistoryQuery) FirstX ¶
func (hq *HistoryQuery) FirstX(ctx context.Context) *History
FirstX is like First, but panics if an error occurs.
func (*HistoryQuery) GroupBy ¶
func (hq *HistoryQuery) GroupBy(field string, fields ...string) *HistoryGroupBy
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.History.Query(). GroupBy(history.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HistoryQuery) IDs ¶
func (hq *HistoryQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of History IDs.
func (*HistoryQuery) IDsX ¶
func (hq *HistoryQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*HistoryQuery) Limit ¶
func (hq *HistoryQuery) Limit(limit int) *HistoryQuery
Limit the number of records to be returned by this query.
func (*HistoryQuery) Offset ¶
func (hq *HistoryQuery) Offset(offset int) *HistoryQuery
Offset to start from.
func (*HistoryQuery) Only ¶
func (hq *HistoryQuery) Only(ctx context.Context) (*History, error)
Only returns a single History entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one History entity is found. Returns a *NotFoundError when no History entities are found.
func (*HistoryQuery) OnlyID ¶
func (hq *HistoryQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only History ID in the query. Returns a *NotSingularError when more than one History ID is found. Returns a *NotFoundError when no entities are found.
func (*HistoryQuery) OnlyIDX ¶
func (hq *HistoryQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*HistoryQuery) OnlyX ¶
func (hq *HistoryQuery) OnlyX(ctx context.Context) *History
OnlyX is like Only, but panics if an error occurs.
func (*HistoryQuery) Order ¶
func (hq *HistoryQuery) Order(o ...history.OrderOption) *HistoryQuery
Order specifies how the records should be ordered.
func (*HistoryQuery) Select ¶
func (hq *HistoryQuery) Select(fields ...string) *HistorySelect
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.History.Query(). Select(history.FieldCreatedAt). Scan(ctx, &v)
func (*HistoryQuery) Unique ¶
func (hq *HistoryQuery) Unique(unique bool) *HistoryQuery
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 (*HistoryQuery) Where ¶
func (hq *HistoryQuery) Where(ps ...predicate.History) *HistoryQuery
Where adds a new predicate for the HistoryQuery builder.
type HistorySelect ¶
type HistorySelect struct { *HistoryQuery // contains filtered or unexported fields }
HistorySelect is the builder for selecting fields of History entities.
func (*HistorySelect) Aggregate ¶
func (hs *HistorySelect) Aggregate(fns ...AggregateFunc) *HistorySelect
Aggregate adds the given aggregation functions to the selector query.
func (*HistorySelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HistorySelect) Scan ¶
func (hs *HistorySelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HistorySelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HistoryUpdate ¶
type HistoryUpdate struct {
// contains filtered or unexported fields
}
HistoryUpdate is the builder for updating History entities.
func (*HistoryUpdate) AddDuration ¶
func (hu *HistoryUpdate) AddDuration(i int) *HistoryUpdate
AddDuration adds i to the "duration" field.
func (*HistoryUpdate) AddExitCode ¶
func (hu *HistoryUpdate) AddExitCode(i int) *HistoryUpdate
AddExitCode adds i to the "exit_code" field.
func (*HistoryUpdate) AddScriptID ¶
func (hu *HistoryUpdate) AddScriptID(i int) *HistoryUpdate
AddScriptID adds i to the "script_id" field.
func (*HistoryUpdate) Exec ¶
func (hu *HistoryUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HistoryUpdate) ExecX ¶
func (hu *HistoryUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryUpdate) Mutation ¶
func (hu *HistoryUpdate) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryUpdate) Save ¶
func (hu *HistoryUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HistoryUpdate) SaveX ¶
func (hu *HistoryUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HistoryUpdate) SetArguments ¶
func (hu *HistoryUpdate) SetArguments(m map[string]string) *HistoryUpdate
SetArguments sets the "arguments" field.
func (*HistoryUpdate) SetDuration ¶
func (hu *HistoryUpdate) SetDuration(i int) *HistoryUpdate
SetDuration sets the "duration" field.
func (*HistoryUpdate) SetExitCode ¶
func (hu *HistoryUpdate) SetExitCode(i int) *HistoryUpdate
SetExitCode sets the "exit_code" field.
func (*HistoryUpdate) SetNillableStatus ¶
func (hu *HistoryUpdate) SetNillableStatus(s *string) *HistoryUpdate
SetNillableStatus sets the "status" field if the given value is not nil.
func (*HistoryUpdate) SetOutput ¶
func (hu *HistoryUpdate) SetOutput(s string) *HistoryUpdate
SetOutput sets the "output" field.
func (*HistoryUpdate) SetRunID ¶
func (hu *HistoryUpdate) SetRunID(s string) *HistoryUpdate
SetRunID sets the "run_id" field.
func (*HistoryUpdate) SetScriptID ¶
func (hu *HistoryUpdate) SetScriptID(i int) *HistoryUpdate
SetScriptID sets the "script_id" field.
func (*HistoryUpdate) SetStatus ¶
func (hu *HistoryUpdate) SetStatus(s string) *HistoryUpdate
SetStatus sets the "status" field.
func (*HistoryUpdate) SetSuccess ¶
func (hu *HistoryUpdate) SetSuccess(b bool) *HistoryUpdate
SetSuccess sets the "success" field.
func (*HistoryUpdate) SetTrigger ¶
func (hu *HistoryUpdate) SetTrigger(s string) *HistoryUpdate
SetTrigger sets the "trigger" field.
func (*HistoryUpdate) SetTriggeredBy ¶
func (hu *HistoryUpdate) SetTriggeredBy(s string) *HistoryUpdate
SetTriggeredBy sets the "triggered_by" field.
func (*HistoryUpdate) SetUpdatedAt ¶
func (hu *HistoryUpdate) SetUpdatedAt(t time.Time) *HistoryUpdate
SetUpdatedAt sets the "updated_at" field.
func (*HistoryUpdate) Where ¶
func (hu *HistoryUpdate) Where(ps ...predicate.History) *HistoryUpdate
Where appends a list predicates to the HistoryUpdate builder.
type HistoryUpdateOne ¶
type HistoryUpdateOne struct {
// contains filtered or unexported fields
}
HistoryUpdateOne is the builder for updating a single History entity.
func (*HistoryUpdateOne) AddDuration ¶
func (huo *HistoryUpdateOne) AddDuration(i int) *HistoryUpdateOne
AddDuration adds i to the "duration" field.
func (*HistoryUpdateOne) AddExitCode ¶
func (huo *HistoryUpdateOne) AddExitCode(i int) *HistoryUpdateOne
AddExitCode adds i to the "exit_code" field.
func (*HistoryUpdateOne) AddScriptID ¶
func (huo *HistoryUpdateOne) AddScriptID(i int) *HistoryUpdateOne
AddScriptID adds i to the "script_id" field.
func (*HistoryUpdateOne) Exec ¶
func (huo *HistoryUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HistoryUpdateOne) ExecX ¶
func (huo *HistoryUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HistoryUpdateOne) Mutation ¶
func (huo *HistoryUpdateOne) Mutation() *HistoryMutation
Mutation returns the HistoryMutation object of the builder.
func (*HistoryUpdateOne) Save ¶
func (huo *HistoryUpdateOne) Save(ctx context.Context) (*History, error)
Save executes the query and returns the updated History entity.
func (*HistoryUpdateOne) SaveX ¶
func (huo *HistoryUpdateOne) SaveX(ctx context.Context) *History
SaveX is like Save, but panics if an error occurs.
func (*HistoryUpdateOne) Select ¶
func (huo *HistoryUpdateOne) Select(field string, fields ...string) *HistoryUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HistoryUpdateOne) SetArguments ¶
func (huo *HistoryUpdateOne) SetArguments(m map[string]string) *HistoryUpdateOne
SetArguments sets the "arguments" field.
func (*HistoryUpdateOne) SetDuration ¶
func (huo *HistoryUpdateOne) SetDuration(i int) *HistoryUpdateOne
SetDuration sets the "duration" field.
func (*HistoryUpdateOne) SetExitCode ¶
func (huo *HistoryUpdateOne) SetExitCode(i int) *HistoryUpdateOne
SetExitCode sets the "exit_code" field.
func (*HistoryUpdateOne) SetNillableStatus ¶
func (huo *HistoryUpdateOne) SetNillableStatus(s *string) *HistoryUpdateOne
SetNillableStatus sets the "status" field if the given value is not nil.
func (*HistoryUpdateOne) SetOutput ¶
func (huo *HistoryUpdateOne) SetOutput(s string) *HistoryUpdateOne
SetOutput sets the "output" field.
func (*HistoryUpdateOne) SetRunID ¶
func (huo *HistoryUpdateOne) SetRunID(s string) *HistoryUpdateOne
SetRunID sets the "run_id" field.
func (*HistoryUpdateOne) SetScriptID ¶
func (huo *HistoryUpdateOne) SetScriptID(i int) *HistoryUpdateOne
SetScriptID sets the "script_id" field.
func (*HistoryUpdateOne) SetStatus ¶
func (huo *HistoryUpdateOne) SetStatus(s string) *HistoryUpdateOne
SetStatus sets the "status" field.
func (*HistoryUpdateOne) SetSuccess ¶
func (huo *HistoryUpdateOne) SetSuccess(b bool) *HistoryUpdateOne
SetSuccess sets the "success" field.
func (*HistoryUpdateOne) SetTrigger ¶
func (huo *HistoryUpdateOne) SetTrigger(s string) *HistoryUpdateOne
SetTrigger sets the "trigger" field.
func (*HistoryUpdateOne) SetTriggeredBy ¶
func (huo *HistoryUpdateOne) SetTriggeredBy(s string) *HistoryUpdateOne
SetTriggeredBy sets the "triggered_by" field.
func (*HistoryUpdateOne) SetUpdatedAt ¶
func (huo *HistoryUpdateOne) SetUpdatedAt(t time.Time) *HistoryUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*HistoryUpdateOne) Where ¶
func (huo *HistoryUpdateOne) Where(ps ...predicate.History) *HistoryUpdateOne
Where appends a list predicates to the HistoryUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
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 NotificationChannel ¶
type NotificationChannel struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Type holds the value of the "type" field. Type string `json:"type,omitempty"` // SlackConfig holds the value of the "slack_config" field. SlackConfig schema.SlackConfig `json:"slack_config,omitempty"` // EmailConfig holds the value of the "email_config" field. EmailConfig schema.EmailConfig `json:"email_config,omitempty"` // WebhookConfig holds the value of the "webhook_config" field. WebhookConfig schema.WebhookConfig `json:"webhook_config,omitempty"` // Enabled holds the value of the "enabled" field. Enabled bool `json:"enabled,omitempty"` // LastUsed holds the value of the "last_used" field. LastUsed *time.Time `json:"last_used,omitempty"` // LastUsedSuccess holds the value of the "last_used_success" field. LastUsedSuccess *bool `json:"last_used_success,omitempty"` // contains filtered or unexported fields }
NotificationChannel is the model entity for the NotificationChannel schema.
func (*NotificationChannel) String ¶
func (nc *NotificationChannel) String() string
String implements the fmt.Stringer.
func (*NotificationChannel) Unwrap ¶
func (nc *NotificationChannel) Unwrap() *NotificationChannel
Unwrap unwraps the NotificationChannel 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 (*NotificationChannel) Update ¶
func (nc *NotificationChannel) Update() *NotificationChannelUpdateOne
Update returns a builder for updating this NotificationChannel. Note that you need to call NotificationChannel.Unwrap() before calling this method if this NotificationChannel was returned from a transaction, and the transaction was committed or rolled back.
type NotificationChannelClient ¶
type NotificationChannelClient struct {
// contains filtered or unexported fields
}
NotificationChannelClient is a client for the NotificationChannel schema.
func NewNotificationChannelClient ¶
func NewNotificationChannelClient(c config) *NotificationChannelClient
NewNotificationChannelClient returns a client for the NotificationChannel from the given config.
func (*NotificationChannelClient) Create ¶
func (c *NotificationChannelClient) Create() *NotificationChannelCreate
Create returns a builder for creating a NotificationChannel entity.
func (*NotificationChannelClient) CreateBulk ¶
func (c *NotificationChannelClient) CreateBulk(builders ...*NotificationChannelCreate) *NotificationChannelCreateBulk
CreateBulk returns a builder for creating a bulk of NotificationChannel entities.
func (*NotificationChannelClient) Delete ¶
func (c *NotificationChannelClient) Delete() *NotificationChannelDelete
Delete returns a delete builder for NotificationChannel.
func (*NotificationChannelClient) DeleteOne ¶
func (c *NotificationChannelClient) DeleteOne(nc *NotificationChannel) *NotificationChannelDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NotificationChannelClient) DeleteOneID ¶
func (c *NotificationChannelClient) DeleteOneID(id int) *NotificationChannelDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NotificationChannelClient) Get ¶
func (c *NotificationChannelClient) Get(ctx context.Context, id int) (*NotificationChannel, error)
Get returns a NotificationChannel entity by its id.
func (*NotificationChannelClient) GetX ¶
func (c *NotificationChannelClient) GetX(ctx context.Context, id int) *NotificationChannel
GetX is like Get, but panics if an error occurs.
func (*NotificationChannelClient) Hooks ¶
func (c *NotificationChannelClient) Hooks() []Hook
Hooks returns the client hooks.
func (*NotificationChannelClient) Intercept ¶
func (c *NotificationChannelClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `notificationchannel.Intercept(f(g(h())))`.
func (*NotificationChannelClient) Interceptors ¶
func (c *NotificationChannelClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NotificationChannelClient) Query ¶
func (c *NotificationChannelClient) Query() *NotificationChannelQuery
Query returns a query builder for NotificationChannel.
func (*NotificationChannelClient) Update ¶
func (c *NotificationChannelClient) Update() *NotificationChannelUpdate
Update returns an update builder for NotificationChannel.
func (*NotificationChannelClient) UpdateOne ¶
func (c *NotificationChannelClient) UpdateOne(nc *NotificationChannel) *NotificationChannelUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NotificationChannelClient) UpdateOneID ¶
func (c *NotificationChannelClient) UpdateOneID(id int) *NotificationChannelUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NotificationChannelClient) Use ¶
func (c *NotificationChannelClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notificationchannel.Hooks(f(g(h())))`.
type NotificationChannelCreate ¶
type NotificationChannelCreate struct {
// contains filtered or unexported fields
}
NotificationChannelCreate is the builder for creating a NotificationChannel entity.
func (*NotificationChannelCreate) Exec ¶
func (ncc *NotificationChannelCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationChannelCreate) ExecX ¶
func (ncc *NotificationChannelCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationChannelCreate) Mutation ¶
func (ncc *NotificationChannelCreate) Mutation() *NotificationChannelMutation
Mutation returns the NotificationChannelMutation object of the builder.
func (*NotificationChannelCreate) Save ¶
func (ncc *NotificationChannelCreate) Save(ctx context.Context) (*NotificationChannel, error)
Save creates the NotificationChannel in the database.
func (*NotificationChannelCreate) SaveX ¶
func (ncc *NotificationChannelCreate) SaveX(ctx context.Context) *NotificationChannel
SaveX calls Save and panics if Save returns an error.
func (*NotificationChannelCreate) SetCreatedAt ¶
func (ncc *NotificationChannelCreate) SetCreatedAt(t time.Time) *NotificationChannelCreate
SetCreatedAt sets the "created_at" field.
func (*NotificationChannelCreate) SetEmailConfig ¶
func (ncc *NotificationChannelCreate) SetEmailConfig(sc schema.EmailConfig) *NotificationChannelCreate
SetEmailConfig sets the "email_config" field.
func (*NotificationChannelCreate) SetEnabled ¶
func (ncc *NotificationChannelCreate) SetEnabled(b bool) *NotificationChannelCreate
SetEnabled sets the "enabled" field.
func (*NotificationChannelCreate) SetLastUsed ¶
func (ncc *NotificationChannelCreate) SetLastUsed(t time.Time) *NotificationChannelCreate
SetLastUsed sets the "last_used" field.
func (*NotificationChannelCreate) SetLastUsedSuccess ¶
func (ncc *NotificationChannelCreate) SetLastUsedSuccess(b bool) *NotificationChannelCreate
SetLastUsedSuccess sets the "last_used_success" field.
func (*NotificationChannelCreate) SetName ¶
func (ncc *NotificationChannelCreate) SetName(s string) *NotificationChannelCreate
SetName sets the "name" field.
func (*NotificationChannelCreate) SetNillableCreatedAt ¶
func (ncc *NotificationChannelCreate) SetNillableCreatedAt(t *time.Time) *NotificationChannelCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NotificationChannelCreate) SetNillableEmailConfig ¶
func (ncc *NotificationChannelCreate) SetNillableEmailConfig(sc *schema.EmailConfig) *NotificationChannelCreate
SetNillableEmailConfig sets the "email_config" field if the given value is not nil.
func (*NotificationChannelCreate) SetNillableEnabled ¶
func (ncc *NotificationChannelCreate) SetNillableEnabled(b *bool) *NotificationChannelCreate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*NotificationChannelCreate) SetNillableLastUsed ¶
func (ncc *NotificationChannelCreate) SetNillableLastUsed(t *time.Time) *NotificationChannelCreate
SetNillableLastUsed sets the "last_used" field if the given value is not nil.
func (*NotificationChannelCreate) SetNillableLastUsedSuccess ¶
func (ncc *NotificationChannelCreate) SetNillableLastUsedSuccess(b *bool) *NotificationChannelCreate
SetNillableLastUsedSuccess sets the "last_used_success" field if the given value is not nil.
func (*NotificationChannelCreate) SetNillableSlackConfig ¶
func (ncc *NotificationChannelCreate) SetNillableSlackConfig(sc *schema.SlackConfig) *NotificationChannelCreate
SetNillableSlackConfig sets the "slack_config" field if the given value is not nil.
func (*NotificationChannelCreate) SetNillableUpdatedAt ¶
func (ncc *NotificationChannelCreate) SetNillableUpdatedAt(t *time.Time) *NotificationChannelCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*NotificationChannelCreate) SetNillableWebhookConfig ¶
func (ncc *NotificationChannelCreate) SetNillableWebhookConfig(sc *schema.WebhookConfig) *NotificationChannelCreate
SetNillableWebhookConfig sets the "webhook_config" field if the given value is not nil.
func (*NotificationChannelCreate) SetSlackConfig ¶
func (ncc *NotificationChannelCreate) SetSlackConfig(sc schema.SlackConfig) *NotificationChannelCreate
SetSlackConfig sets the "slack_config" field.
func (*NotificationChannelCreate) SetType ¶
func (ncc *NotificationChannelCreate) SetType(s string) *NotificationChannelCreate
SetType sets the "type" field.
func (*NotificationChannelCreate) SetUpdatedAt ¶
func (ncc *NotificationChannelCreate) SetUpdatedAt(t time.Time) *NotificationChannelCreate
SetUpdatedAt sets the "updated_at" field.
func (*NotificationChannelCreate) SetWebhookConfig ¶
func (ncc *NotificationChannelCreate) SetWebhookConfig(sc schema.WebhookConfig) *NotificationChannelCreate
SetWebhookConfig sets the "webhook_config" field.
type NotificationChannelCreateBulk ¶
type NotificationChannelCreateBulk struct {
// contains filtered or unexported fields
}
NotificationChannelCreateBulk is the builder for creating many NotificationChannel entities in bulk.
func (*NotificationChannelCreateBulk) Exec ¶
func (nccb *NotificationChannelCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationChannelCreateBulk) ExecX ¶
func (nccb *NotificationChannelCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationChannelCreateBulk) Save ¶
func (nccb *NotificationChannelCreateBulk) Save(ctx context.Context) ([]*NotificationChannel, error)
Save creates the NotificationChannel entities in the database.
func (*NotificationChannelCreateBulk) SaveX ¶
func (nccb *NotificationChannelCreateBulk) SaveX(ctx context.Context) []*NotificationChannel
SaveX is like Save, but panics if an error occurs.
type NotificationChannelDelete ¶
type NotificationChannelDelete struct {
// contains filtered or unexported fields
}
NotificationChannelDelete is the builder for deleting a NotificationChannel entity.
func (*NotificationChannelDelete) Exec ¶
func (ncd *NotificationChannelDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NotificationChannelDelete) ExecX ¶
func (ncd *NotificationChannelDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NotificationChannelDelete) Where ¶
func (ncd *NotificationChannelDelete) Where(ps ...predicate.NotificationChannel) *NotificationChannelDelete
Where appends a list predicates to the NotificationChannelDelete builder.
type NotificationChannelDeleteOne ¶
type NotificationChannelDeleteOne struct {
// contains filtered or unexported fields
}
NotificationChannelDeleteOne is the builder for deleting a single NotificationChannel entity.
func (*NotificationChannelDeleteOne) Exec ¶
func (ncdo *NotificationChannelDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NotificationChannelDeleteOne) ExecX ¶
func (ncdo *NotificationChannelDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationChannelDeleteOne) Where ¶
func (ncdo *NotificationChannelDeleteOne) Where(ps ...predicate.NotificationChannel) *NotificationChannelDeleteOne
Where appends a list predicates to the NotificationChannelDelete builder.
type NotificationChannelGroupBy ¶
type NotificationChannelGroupBy struct {
// contains filtered or unexported fields
}
NotificationChannelGroupBy is the group-by builder for NotificationChannel entities.
func (*NotificationChannelGroupBy) Aggregate ¶
func (ncgb *NotificationChannelGroupBy) Aggregate(fns ...AggregateFunc) *NotificationChannelGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NotificationChannelGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotificationChannelGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotificationChannelGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotificationChannelGroupBy) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*NotificationChannelGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotificationChannelGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*NotificationChannelGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotificationChannelGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotificationChannelGroupBy) Scan ¶
func (ncgb *NotificationChannelGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotificationChannelGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotificationChannelMutation ¶
type NotificationChannelMutation struct {
// contains filtered or unexported fields
}
NotificationChannelMutation represents an operation that mutates the NotificationChannel nodes in the graph.
func (*NotificationChannelMutation) AddField ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) AddedEdges ¶
func (m *NotificationChannelMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NotificationChannelMutation) AddedField ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) AddedFields ¶
func (m *NotificationChannelMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NotificationChannelMutation) AddedIDs ¶
func (m *NotificationChannelMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NotificationChannelMutation) ClearEdge ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) ClearEmailConfig ¶
func (m *NotificationChannelMutation) ClearEmailConfig()
ClearEmailConfig clears the value of the "email_config" field.
func (*NotificationChannelMutation) ClearField ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) ClearLastUsed ¶
func (m *NotificationChannelMutation) ClearLastUsed()
ClearLastUsed clears the value of the "last_used" field.
func (*NotificationChannelMutation) ClearLastUsedSuccess ¶
func (m *NotificationChannelMutation) ClearLastUsedSuccess()
ClearLastUsedSuccess clears the value of the "last_used_success" field.
func (*NotificationChannelMutation) ClearSlackConfig ¶
func (m *NotificationChannelMutation) ClearSlackConfig()
ClearSlackConfig clears the value of the "slack_config" field.
func (*NotificationChannelMutation) ClearWebhookConfig ¶
func (m *NotificationChannelMutation) ClearWebhookConfig()
ClearWebhookConfig clears the value of the "webhook_config" field.
func (*NotificationChannelMutation) ClearedEdges ¶
func (m *NotificationChannelMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NotificationChannelMutation) ClearedFields ¶
func (m *NotificationChannelMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NotificationChannelMutation) Client ¶
func (m NotificationChannelMutation) 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 (*NotificationChannelMutation) CreatedAt ¶
func (m *NotificationChannelMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*NotificationChannelMutation) EdgeCleared ¶
func (m *NotificationChannelMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NotificationChannelMutation) EmailConfig ¶
func (m *NotificationChannelMutation) EmailConfig() (r schema.EmailConfig, exists bool)
EmailConfig returns the value of the "email_config" field in the mutation.
func (*NotificationChannelMutation) EmailConfigCleared ¶
func (m *NotificationChannelMutation) EmailConfigCleared() bool
EmailConfigCleared returns if the "email_config" field was cleared in this mutation.
func (*NotificationChannelMutation) Enabled ¶
func (m *NotificationChannelMutation) Enabled() (r bool, exists bool)
Enabled returns the value of the "enabled" field in the mutation.
func (*NotificationChannelMutation) Field ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) FieldCleared ¶
func (m *NotificationChannelMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NotificationChannelMutation) Fields ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) GetType ¶
func (m *NotificationChannelMutation) GetType() (r string, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*NotificationChannelMutation) ID ¶
func (m *NotificationChannelMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*NotificationChannelMutation) IDs ¶
func (m *NotificationChannelMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*NotificationChannelMutation) LastUsed ¶
func (m *NotificationChannelMutation) LastUsed() (r time.Time, exists bool)
LastUsed returns the value of the "last_used" field in the mutation.
func (*NotificationChannelMutation) LastUsedCleared ¶
func (m *NotificationChannelMutation) LastUsedCleared() bool
LastUsedCleared returns if the "last_used" field was cleared in this mutation.
func (*NotificationChannelMutation) LastUsedSuccess ¶
func (m *NotificationChannelMutation) LastUsedSuccess() (r bool, exists bool)
LastUsedSuccess returns the value of the "last_used_success" field in the mutation.
func (*NotificationChannelMutation) LastUsedSuccessCleared ¶
func (m *NotificationChannelMutation) LastUsedSuccessCleared() bool
LastUsedSuccessCleared returns if the "last_used_success" field was cleared in this mutation.
func (*NotificationChannelMutation) Name ¶
func (m *NotificationChannelMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*NotificationChannelMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldEmailConfig ¶
func (m *NotificationChannelMutation) OldEmailConfig(ctx context.Context) (v schema.EmailConfig, err error)
OldEmailConfig returns the old "email_config" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldEnabled ¶
func (m *NotificationChannelMutation) OldEnabled(ctx context.Context) (v bool, err error)
OldEnabled returns the old "enabled" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) 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 (*NotificationChannelMutation) OldLastUsed ¶
OldLastUsed returns the old "last_used" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldLastUsedSuccess ¶
func (m *NotificationChannelMutation) OldLastUsedSuccess(ctx context.Context) (v *bool, err error)
OldLastUsedSuccess returns the old "last_used_success" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldName ¶
func (m *NotificationChannelMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldSlackConfig ¶
func (m *NotificationChannelMutation) OldSlackConfig(ctx context.Context) (v schema.SlackConfig, err error)
OldSlackConfig returns the old "slack_config" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldType ¶
func (m *NotificationChannelMutation) OldType(ctx context.Context) (v string, err error)
OldType returns the old "type" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) OldWebhookConfig ¶
func (m *NotificationChannelMutation) OldWebhookConfig(ctx context.Context) (v schema.WebhookConfig, err error)
OldWebhookConfig returns the old "webhook_config" field's value of the NotificationChannel entity. If the NotificationChannel 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 (*NotificationChannelMutation) Op ¶
func (m *NotificationChannelMutation) Op() Op
Op returns the operation name.
func (*NotificationChannelMutation) RemovedEdges ¶
func (m *NotificationChannelMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NotificationChannelMutation) RemovedIDs ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) ResetCreatedAt ¶
func (m *NotificationChannelMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*NotificationChannelMutation) ResetEdge ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) ResetEmailConfig ¶
func (m *NotificationChannelMutation) ResetEmailConfig()
ResetEmailConfig resets all changes to the "email_config" field.
func (*NotificationChannelMutation) ResetEnabled ¶
func (m *NotificationChannelMutation) ResetEnabled()
ResetEnabled resets all changes to the "enabled" field.
func (*NotificationChannelMutation) ResetField ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) ResetLastUsed ¶
func (m *NotificationChannelMutation) ResetLastUsed()
ResetLastUsed resets all changes to the "last_used" field.
func (*NotificationChannelMutation) ResetLastUsedSuccess ¶
func (m *NotificationChannelMutation) ResetLastUsedSuccess()
ResetLastUsedSuccess resets all changes to the "last_used_success" field.
func (*NotificationChannelMutation) ResetName ¶
func (m *NotificationChannelMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NotificationChannelMutation) ResetSlackConfig ¶
func (m *NotificationChannelMutation) ResetSlackConfig()
ResetSlackConfig resets all changes to the "slack_config" field.
func (*NotificationChannelMutation) ResetType ¶
func (m *NotificationChannelMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*NotificationChannelMutation) ResetUpdatedAt ¶
func (m *NotificationChannelMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*NotificationChannelMutation) ResetWebhookConfig ¶
func (m *NotificationChannelMutation) ResetWebhookConfig()
ResetWebhookConfig resets all changes to the "webhook_config" field.
func (*NotificationChannelMutation) SetCreatedAt ¶
func (m *NotificationChannelMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*NotificationChannelMutation) SetEmailConfig ¶
func (m *NotificationChannelMutation) SetEmailConfig(sc schema.EmailConfig)
SetEmailConfig sets the "email_config" field.
func (*NotificationChannelMutation) SetEnabled ¶
func (m *NotificationChannelMutation) SetEnabled(b bool)
SetEnabled sets the "enabled" field.
func (*NotificationChannelMutation) SetField ¶
func (m *NotificationChannelMutation) 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 (*NotificationChannelMutation) SetLastUsed ¶
func (m *NotificationChannelMutation) SetLastUsed(t time.Time)
SetLastUsed sets the "last_used" field.
func (*NotificationChannelMutation) SetLastUsedSuccess ¶
func (m *NotificationChannelMutation) SetLastUsedSuccess(b bool)
SetLastUsedSuccess sets the "last_used_success" field.
func (*NotificationChannelMutation) SetName ¶
func (m *NotificationChannelMutation) SetName(s string)
SetName sets the "name" field.
func (*NotificationChannelMutation) SetOp ¶
func (m *NotificationChannelMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NotificationChannelMutation) SetSlackConfig ¶
func (m *NotificationChannelMutation) SetSlackConfig(sc schema.SlackConfig)
SetSlackConfig sets the "slack_config" field.
func (*NotificationChannelMutation) SetType ¶
func (m *NotificationChannelMutation) SetType(s string)
SetType sets the "type" field.
func (*NotificationChannelMutation) SetUpdatedAt ¶
func (m *NotificationChannelMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*NotificationChannelMutation) SetWebhookConfig ¶
func (m *NotificationChannelMutation) SetWebhookConfig(sc schema.WebhookConfig)
SetWebhookConfig sets the "webhook_config" field.
func (*NotificationChannelMutation) SlackConfig ¶
func (m *NotificationChannelMutation) SlackConfig() (r schema.SlackConfig, exists bool)
SlackConfig returns the value of the "slack_config" field in the mutation.
func (*NotificationChannelMutation) SlackConfigCleared ¶
func (m *NotificationChannelMutation) SlackConfigCleared() bool
SlackConfigCleared returns if the "slack_config" field was cleared in this mutation.
func (NotificationChannelMutation) Tx ¶
func (m NotificationChannelMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NotificationChannelMutation) Type ¶
func (m *NotificationChannelMutation) Type() string
Type returns the node type of this mutation (NotificationChannel).
func (*NotificationChannelMutation) UpdatedAt ¶
func (m *NotificationChannelMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*NotificationChannelMutation) WebhookConfig ¶
func (m *NotificationChannelMutation) WebhookConfig() (r schema.WebhookConfig, exists bool)
WebhookConfig returns the value of the "webhook_config" field in the mutation.
func (*NotificationChannelMutation) WebhookConfigCleared ¶
func (m *NotificationChannelMutation) WebhookConfigCleared() bool
WebhookConfigCleared returns if the "webhook_config" field was cleared in this mutation.
func (*NotificationChannelMutation) Where ¶
func (m *NotificationChannelMutation) Where(ps ...predicate.NotificationChannel)
Where appends a list predicates to the NotificationChannelMutation builder.
func (*NotificationChannelMutation) WhereP ¶
func (m *NotificationChannelMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NotificationChannelMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NotificationChannelQuery ¶
type NotificationChannelQuery struct {
// contains filtered or unexported fields
}
NotificationChannelQuery is the builder for querying NotificationChannel entities.
func (*NotificationChannelQuery) Aggregate ¶
func (ncq *NotificationChannelQuery) Aggregate(fns ...AggregateFunc) *NotificationChannelSelect
Aggregate returns a NotificationChannelSelect configured with the given aggregations.
func (*NotificationChannelQuery) All ¶
func (ncq *NotificationChannelQuery) All(ctx context.Context) ([]*NotificationChannel, error)
All executes the query and returns a list of NotificationChannels.
func (*NotificationChannelQuery) AllX ¶
func (ncq *NotificationChannelQuery) AllX(ctx context.Context) []*NotificationChannel
AllX is like All, but panics if an error occurs.
func (*NotificationChannelQuery) Clone ¶
func (ncq *NotificationChannelQuery) Clone() *NotificationChannelQuery
Clone returns a duplicate of the NotificationChannelQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NotificationChannelQuery) Count ¶
func (ncq *NotificationChannelQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*NotificationChannelQuery) CountX ¶
func (ncq *NotificationChannelQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*NotificationChannelQuery) Exist ¶
func (ncq *NotificationChannelQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*NotificationChannelQuery) ExistX ¶
func (ncq *NotificationChannelQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*NotificationChannelQuery) First ¶
func (ncq *NotificationChannelQuery) First(ctx context.Context) (*NotificationChannel, error)
First returns the first NotificationChannel entity from the query. Returns a *NotFoundError when no NotificationChannel was found.
func (*NotificationChannelQuery) FirstID ¶
func (ncq *NotificationChannelQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first NotificationChannel ID from the query. Returns a *NotFoundError when no NotificationChannel ID was found.
func (*NotificationChannelQuery) FirstIDX ¶
func (ncq *NotificationChannelQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*NotificationChannelQuery) FirstX ¶
func (ncq *NotificationChannelQuery) FirstX(ctx context.Context) *NotificationChannel
FirstX is like First, but panics if an error occurs.
func (*NotificationChannelQuery) GroupBy ¶
func (ncq *NotificationChannelQuery) GroupBy(field string, fields ...string) *NotificationChannelGroupBy
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.NotificationChannel.Query(). GroupBy(notificationchannel.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NotificationChannelQuery) IDs ¶
func (ncq *NotificationChannelQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of NotificationChannel IDs.
func (*NotificationChannelQuery) IDsX ¶
func (ncq *NotificationChannelQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*NotificationChannelQuery) Limit ¶
func (ncq *NotificationChannelQuery) Limit(limit int) *NotificationChannelQuery
Limit the number of records to be returned by this query.
func (*NotificationChannelQuery) Offset ¶
func (ncq *NotificationChannelQuery) Offset(offset int) *NotificationChannelQuery
Offset to start from.
func (*NotificationChannelQuery) Only ¶
func (ncq *NotificationChannelQuery) Only(ctx context.Context) (*NotificationChannel, error)
Only returns a single NotificationChannel entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NotificationChannel entity is found. Returns a *NotFoundError when no NotificationChannel entities are found.
func (*NotificationChannelQuery) OnlyID ¶
func (ncq *NotificationChannelQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only NotificationChannel ID in the query. Returns a *NotSingularError when more than one NotificationChannel ID is found. Returns a *NotFoundError when no entities are found.
func (*NotificationChannelQuery) OnlyIDX ¶
func (ncq *NotificationChannelQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*NotificationChannelQuery) OnlyX ¶
func (ncq *NotificationChannelQuery) OnlyX(ctx context.Context) *NotificationChannel
OnlyX is like Only, but panics if an error occurs.
func (*NotificationChannelQuery) Order ¶
func (ncq *NotificationChannelQuery) Order(o ...notificationchannel.OrderOption) *NotificationChannelQuery
Order specifies how the records should be ordered.
func (*NotificationChannelQuery) Select ¶
func (ncq *NotificationChannelQuery) Select(fields ...string) *NotificationChannelSelect
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.NotificationChannel.Query(). Select(notificationchannel.FieldCreatedAt). Scan(ctx, &v)
func (*NotificationChannelQuery) Unique ¶
func (ncq *NotificationChannelQuery) Unique(unique bool) *NotificationChannelQuery
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 (*NotificationChannelQuery) Where ¶
func (ncq *NotificationChannelQuery) Where(ps ...predicate.NotificationChannel) *NotificationChannelQuery
Where adds a new predicate for the NotificationChannelQuery builder.
type NotificationChannelSelect ¶
type NotificationChannelSelect struct { *NotificationChannelQuery // contains filtered or unexported fields }
NotificationChannelSelect is the builder for selecting fields of NotificationChannel entities.
func (*NotificationChannelSelect) Aggregate ¶
func (ncs *NotificationChannelSelect) Aggregate(fns ...AggregateFunc) *NotificationChannelSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NotificationChannelSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NotificationChannelSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NotificationChannelSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NotificationChannelSelect) Float64X ¶
Float64X is like Float64, but panics if an error occurs.
func (*NotificationChannelSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NotificationChannelSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*NotificationChannelSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NotificationChannelSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NotificationChannelSelect) Scan ¶
func (ncs *NotificationChannelSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NotificationChannelSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NotificationChannelUpdate ¶
type NotificationChannelUpdate struct {
// contains filtered or unexported fields
}
NotificationChannelUpdate is the builder for updating NotificationChannel entities.
func (*NotificationChannelUpdate) ClearEmailConfig ¶
func (ncu *NotificationChannelUpdate) ClearEmailConfig() *NotificationChannelUpdate
ClearEmailConfig clears the value of the "email_config" field.
func (*NotificationChannelUpdate) ClearLastUsed ¶
func (ncu *NotificationChannelUpdate) ClearLastUsed() *NotificationChannelUpdate
ClearLastUsed clears the value of the "last_used" field.
func (*NotificationChannelUpdate) ClearLastUsedSuccess ¶
func (ncu *NotificationChannelUpdate) ClearLastUsedSuccess() *NotificationChannelUpdate
ClearLastUsedSuccess clears the value of the "last_used_success" field.
func (*NotificationChannelUpdate) ClearSlackConfig ¶
func (ncu *NotificationChannelUpdate) ClearSlackConfig() *NotificationChannelUpdate
ClearSlackConfig clears the value of the "slack_config" field.
func (*NotificationChannelUpdate) ClearWebhookConfig ¶
func (ncu *NotificationChannelUpdate) ClearWebhookConfig() *NotificationChannelUpdate
ClearWebhookConfig clears the value of the "webhook_config" field.
func (*NotificationChannelUpdate) Exec ¶
func (ncu *NotificationChannelUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NotificationChannelUpdate) ExecX ¶
func (ncu *NotificationChannelUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationChannelUpdate) Mutation ¶
func (ncu *NotificationChannelUpdate) Mutation() *NotificationChannelMutation
Mutation returns the NotificationChannelMutation object of the builder.
func (*NotificationChannelUpdate) Save ¶
func (ncu *NotificationChannelUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NotificationChannelUpdate) SaveX ¶
func (ncu *NotificationChannelUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NotificationChannelUpdate) SetEmailConfig ¶
func (ncu *NotificationChannelUpdate) SetEmailConfig(sc schema.EmailConfig) *NotificationChannelUpdate
SetEmailConfig sets the "email_config" field.
func (*NotificationChannelUpdate) SetEnabled ¶
func (ncu *NotificationChannelUpdate) SetEnabled(b bool) *NotificationChannelUpdate
SetEnabled sets the "enabled" field.
func (*NotificationChannelUpdate) SetLastUsed ¶
func (ncu *NotificationChannelUpdate) SetLastUsed(t time.Time) *NotificationChannelUpdate
SetLastUsed sets the "last_used" field.
func (*NotificationChannelUpdate) SetLastUsedSuccess ¶
func (ncu *NotificationChannelUpdate) SetLastUsedSuccess(b bool) *NotificationChannelUpdate
SetLastUsedSuccess sets the "last_used_success" field.
func (*NotificationChannelUpdate) SetName ¶
func (ncu *NotificationChannelUpdate) SetName(s string) *NotificationChannelUpdate
SetName sets the "name" field.
func (*NotificationChannelUpdate) SetNillableEmailConfig ¶
func (ncu *NotificationChannelUpdate) SetNillableEmailConfig(sc *schema.EmailConfig) *NotificationChannelUpdate
SetNillableEmailConfig sets the "email_config" field if the given value is not nil.
func (*NotificationChannelUpdate) SetNillableEnabled ¶
func (ncu *NotificationChannelUpdate) SetNillableEnabled(b *bool) *NotificationChannelUpdate
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*NotificationChannelUpdate) SetNillableLastUsed ¶
func (ncu *NotificationChannelUpdate) SetNillableLastUsed(t *time.Time) *NotificationChannelUpdate
SetNillableLastUsed sets the "last_used" field if the given value is not nil.
func (*NotificationChannelUpdate) SetNillableLastUsedSuccess ¶
func (ncu *NotificationChannelUpdate) SetNillableLastUsedSuccess(b *bool) *NotificationChannelUpdate
SetNillableLastUsedSuccess sets the "last_used_success" field if the given value is not nil.
func (*NotificationChannelUpdate) SetNillableSlackConfig ¶
func (ncu *NotificationChannelUpdate) SetNillableSlackConfig(sc *schema.SlackConfig) *NotificationChannelUpdate
SetNillableSlackConfig sets the "slack_config" field if the given value is not nil.
func (*NotificationChannelUpdate) SetNillableWebhookConfig ¶
func (ncu *NotificationChannelUpdate) SetNillableWebhookConfig(sc *schema.WebhookConfig) *NotificationChannelUpdate
SetNillableWebhookConfig sets the "webhook_config" field if the given value is not nil.
func (*NotificationChannelUpdate) SetSlackConfig ¶
func (ncu *NotificationChannelUpdate) SetSlackConfig(sc schema.SlackConfig) *NotificationChannelUpdate
SetSlackConfig sets the "slack_config" field.
func (*NotificationChannelUpdate) SetType ¶
func (ncu *NotificationChannelUpdate) SetType(s string) *NotificationChannelUpdate
SetType sets the "type" field.
func (*NotificationChannelUpdate) SetUpdatedAt ¶
func (ncu *NotificationChannelUpdate) SetUpdatedAt(t time.Time) *NotificationChannelUpdate
SetUpdatedAt sets the "updated_at" field.
func (*NotificationChannelUpdate) SetWebhookConfig ¶
func (ncu *NotificationChannelUpdate) SetWebhookConfig(sc schema.WebhookConfig) *NotificationChannelUpdate
SetWebhookConfig sets the "webhook_config" field.
func (*NotificationChannelUpdate) Where ¶
func (ncu *NotificationChannelUpdate) Where(ps ...predicate.NotificationChannel) *NotificationChannelUpdate
Where appends a list predicates to the NotificationChannelUpdate builder.
type NotificationChannelUpdateOne ¶
type NotificationChannelUpdateOne struct {
// contains filtered or unexported fields
}
NotificationChannelUpdateOne is the builder for updating a single NotificationChannel entity.
func (*NotificationChannelUpdateOne) ClearEmailConfig ¶
func (ncuo *NotificationChannelUpdateOne) ClearEmailConfig() *NotificationChannelUpdateOne
ClearEmailConfig clears the value of the "email_config" field.
func (*NotificationChannelUpdateOne) ClearLastUsed ¶
func (ncuo *NotificationChannelUpdateOne) ClearLastUsed() *NotificationChannelUpdateOne
ClearLastUsed clears the value of the "last_used" field.
func (*NotificationChannelUpdateOne) ClearLastUsedSuccess ¶
func (ncuo *NotificationChannelUpdateOne) ClearLastUsedSuccess() *NotificationChannelUpdateOne
ClearLastUsedSuccess clears the value of the "last_used_success" field.
func (*NotificationChannelUpdateOne) ClearSlackConfig ¶
func (ncuo *NotificationChannelUpdateOne) ClearSlackConfig() *NotificationChannelUpdateOne
ClearSlackConfig clears the value of the "slack_config" field.
func (*NotificationChannelUpdateOne) ClearWebhookConfig ¶
func (ncuo *NotificationChannelUpdateOne) ClearWebhookConfig() *NotificationChannelUpdateOne
ClearWebhookConfig clears the value of the "webhook_config" field.
func (*NotificationChannelUpdateOne) Exec ¶
func (ncuo *NotificationChannelUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NotificationChannelUpdateOne) ExecX ¶
func (ncuo *NotificationChannelUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NotificationChannelUpdateOne) Mutation ¶
func (ncuo *NotificationChannelUpdateOne) Mutation() *NotificationChannelMutation
Mutation returns the NotificationChannelMutation object of the builder.
func (*NotificationChannelUpdateOne) Save ¶
func (ncuo *NotificationChannelUpdateOne) Save(ctx context.Context) (*NotificationChannel, error)
Save executes the query and returns the updated NotificationChannel entity.
func (*NotificationChannelUpdateOne) SaveX ¶
func (ncuo *NotificationChannelUpdateOne) SaveX(ctx context.Context) *NotificationChannel
SaveX is like Save, but panics if an error occurs.
func (*NotificationChannelUpdateOne) Select ¶
func (ncuo *NotificationChannelUpdateOne) Select(field string, fields ...string) *NotificationChannelUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NotificationChannelUpdateOne) SetEmailConfig ¶
func (ncuo *NotificationChannelUpdateOne) SetEmailConfig(sc schema.EmailConfig) *NotificationChannelUpdateOne
SetEmailConfig sets the "email_config" field.
func (*NotificationChannelUpdateOne) SetEnabled ¶
func (ncuo *NotificationChannelUpdateOne) SetEnabled(b bool) *NotificationChannelUpdateOne
SetEnabled sets the "enabled" field.
func (*NotificationChannelUpdateOne) SetLastUsed ¶
func (ncuo *NotificationChannelUpdateOne) SetLastUsed(t time.Time) *NotificationChannelUpdateOne
SetLastUsed sets the "last_used" field.
func (*NotificationChannelUpdateOne) SetLastUsedSuccess ¶
func (ncuo *NotificationChannelUpdateOne) SetLastUsedSuccess(b bool) *NotificationChannelUpdateOne
SetLastUsedSuccess sets the "last_used_success" field.
func (*NotificationChannelUpdateOne) SetName ¶
func (ncuo *NotificationChannelUpdateOne) SetName(s string) *NotificationChannelUpdateOne
SetName sets the "name" field.
func (*NotificationChannelUpdateOne) SetNillableEmailConfig ¶
func (ncuo *NotificationChannelUpdateOne) SetNillableEmailConfig(sc *schema.EmailConfig) *NotificationChannelUpdateOne
SetNillableEmailConfig sets the "email_config" field if the given value is not nil.
func (*NotificationChannelUpdateOne) SetNillableEnabled ¶
func (ncuo *NotificationChannelUpdateOne) SetNillableEnabled(b *bool) *NotificationChannelUpdateOne
SetNillableEnabled sets the "enabled" field if the given value is not nil.
func (*NotificationChannelUpdateOne) SetNillableLastUsed ¶
func (ncuo *NotificationChannelUpdateOne) SetNillableLastUsed(t *time.Time) *NotificationChannelUpdateOne
SetNillableLastUsed sets the "last_used" field if the given value is not nil.
func (*NotificationChannelUpdateOne) SetNillableLastUsedSuccess ¶
func (ncuo *NotificationChannelUpdateOne) SetNillableLastUsedSuccess(b *bool) *NotificationChannelUpdateOne
SetNillableLastUsedSuccess sets the "last_used_success" field if the given value is not nil.
func (*NotificationChannelUpdateOne) SetNillableSlackConfig ¶
func (ncuo *NotificationChannelUpdateOne) SetNillableSlackConfig(sc *schema.SlackConfig) *NotificationChannelUpdateOne
SetNillableSlackConfig sets the "slack_config" field if the given value is not nil.
func (*NotificationChannelUpdateOne) SetNillableWebhookConfig ¶
func (ncuo *NotificationChannelUpdateOne) SetNillableWebhookConfig(sc *schema.WebhookConfig) *NotificationChannelUpdateOne
SetNillableWebhookConfig sets the "webhook_config" field if the given value is not nil.
func (*NotificationChannelUpdateOne) SetSlackConfig ¶
func (ncuo *NotificationChannelUpdateOne) SetSlackConfig(sc schema.SlackConfig) *NotificationChannelUpdateOne
SetSlackConfig sets the "slack_config" field.
func (*NotificationChannelUpdateOne) SetType ¶
func (ncuo *NotificationChannelUpdateOne) SetType(s string) *NotificationChannelUpdateOne
SetType sets the "type" field.
func (*NotificationChannelUpdateOne) SetUpdatedAt ¶
func (ncuo *NotificationChannelUpdateOne) SetUpdatedAt(t time.Time) *NotificationChannelUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*NotificationChannelUpdateOne) SetWebhookConfig ¶
func (ncuo *NotificationChannelUpdateOne) SetWebhookConfig(sc schema.WebhookConfig) *NotificationChannelUpdateOne
SetWebhookConfig sets the "webhook_config" field.
func (*NotificationChannelUpdateOne) Where ¶
func (ncuo *NotificationChannelUpdateOne) Where(ps ...predicate.NotificationChannel) *NotificationChannelUpdateOne
Where appends a list predicates to the NotificationChannelUpdate builder.
type NotificationChannels ¶
type NotificationChannels []*NotificationChannel
NotificationChannels is a parsable slice of NotificationChannel.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type Project ¶
type Project struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // contains filtered or unexported fields }
Project is the model entity for the Project schema.
func (*Project) Unwrap ¶
Unwrap unwraps the Project 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 (*Project) Update ¶
func (pr *Project) Update() *ProjectUpdateOne
Update returns a builder for updating this Project. Note that you need to call Project.Unwrap() before calling this method if this Project was returned from a transaction, and the transaction was committed or rolled back.
type ProjectClient ¶
type ProjectClient struct {
// contains filtered or unexported fields
}
ProjectClient is a client for the Project schema.
func NewProjectClient ¶
func NewProjectClient(c config) *ProjectClient
NewProjectClient returns a client for the Project from the given config.
func (*ProjectClient) Create ¶
func (c *ProjectClient) Create() *ProjectCreate
Create returns a builder for creating a Project entity.
func (*ProjectClient) CreateBulk ¶
func (c *ProjectClient) CreateBulk(builders ...*ProjectCreate) *ProjectCreateBulk
CreateBulk returns a builder for creating a bulk of Project entities.
func (*ProjectClient) Delete ¶
func (c *ProjectClient) Delete() *ProjectDelete
Delete returns a delete builder for Project.
func (*ProjectClient) DeleteOne ¶
func (c *ProjectClient) DeleteOne(pr *Project) *ProjectDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProjectClient) DeleteOneID ¶
func (c *ProjectClient) DeleteOneID(id int) *ProjectDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProjectClient) GetX ¶
func (c *ProjectClient) GetX(ctx context.Context, id int) *Project
GetX is like Get, but panics if an error occurs.
func (*ProjectClient) Hooks ¶
func (c *ProjectClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProjectClient) Intercept ¶
func (c *ProjectClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `project.Intercept(f(g(h())))`.
func (*ProjectClient) Interceptors ¶
func (c *ProjectClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProjectClient) Query ¶
func (c *ProjectClient) Query() *ProjectQuery
Query returns a query builder for Project.
func (*ProjectClient) Update ¶
func (c *ProjectClient) Update() *ProjectUpdate
Update returns an update builder for Project.
func (*ProjectClient) UpdateOne ¶
func (c *ProjectClient) UpdateOne(pr *Project) *ProjectUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProjectClient) UpdateOneID ¶
func (c *ProjectClient) UpdateOneID(id int) *ProjectUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProjectClient) Use ¶
func (c *ProjectClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `project.Hooks(f(g(h())))`.
type ProjectCreate ¶
type ProjectCreate struct {
// contains filtered or unexported fields
}
ProjectCreate is the builder for creating a Project entity.
func (*ProjectCreate) Exec ¶
func (pc *ProjectCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProjectCreate) ExecX ¶
func (pc *ProjectCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProjectCreate) Mutation ¶
func (pc *ProjectCreate) Mutation() *ProjectMutation
Mutation returns the ProjectMutation object of the builder.
func (*ProjectCreate) Save ¶
func (pc *ProjectCreate) Save(ctx context.Context) (*Project, error)
Save creates the Project in the database.
func (*ProjectCreate) SaveX ¶
func (pc *ProjectCreate) SaveX(ctx context.Context) *Project
SaveX calls Save and panics if Save returns an error.
func (*ProjectCreate) SetCreatedAt ¶
func (pc *ProjectCreate) SetCreatedAt(t time.Time) *ProjectCreate
SetCreatedAt sets the "created_at" field.
func (*ProjectCreate) SetDescription ¶
func (pc *ProjectCreate) SetDescription(s string) *ProjectCreate
SetDescription sets the "description" field.
func (*ProjectCreate) SetName ¶
func (pc *ProjectCreate) SetName(s string) *ProjectCreate
SetName sets the "name" field.
func (*ProjectCreate) SetNillableCreatedAt ¶
func (pc *ProjectCreate) SetNillableCreatedAt(t *time.Time) *ProjectCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ProjectCreate) SetNillableDescription ¶
func (pc *ProjectCreate) SetNillableDescription(s *string) *ProjectCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProjectCreate) SetNillableUpdatedAt ¶
func (pc *ProjectCreate) SetNillableUpdatedAt(t *time.Time) *ProjectCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ProjectCreate) SetUpdatedAt ¶
func (pc *ProjectCreate) SetUpdatedAt(t time.Time) *ProjectCreate
SetUpdatedAt sets the "updated_at" field.
type ProjectCreateBulk ¶
type ProjectCreateBulk struct {
// contains filtered or unexported fields
}
ProjectCreateBulk is the builder for creating many Project entities in bulk.
func (*ProjectCreateBulk) Exec ¶
func (pcb *ProjectCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProjectCreateBulk) ExecX ¶
func (pcb *ProjectCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProjectDelete ¶
type ProjectDelete struct {
// contains filtered or unexported fields
}
ProjectDelete is the builder for deleting a Project entity.
func (*ProjectDelete) Exec ¶
func (pd *ProjectDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProjectDelete) ExecX ¶
func (pd *ProjectDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProjectDelete) Where ¶
func (pd *ProjectDelete) Where(ps ...predicate.Project) *ProjectDelete
Where appends a list predicates to the ProjectDelete builder.
type ProjectDeleteOne ¶
type ProjectDeleteOne struct {
// contains filtered or unexported fields
}
ProjectDeleteOne is the builder for deleting a single Project entity.
func (*ProjectDeleteOne) Exec ¶
func (pdo *ProjectDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProjectDeleteOne) ExecX ¶
func (pdo *ProjectDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProjectDeleteOne) Where ¶
func (pdo *ProjectDeleteOne) Where(ps ...predicate.Project) *ProjectDeleteOne
Where appends a list predicates to the ProjectDelete builder.
type ProjectGroupBy ¶
type ProjectGroupBy struct {
// contains filtered or unexported fields
}
ProjectGroupBy is the group-by builder for Project entities.
func (*ProjectGroupBy) Aggregate ¶
func (pgb *ProjectGroupBy) Aggregate(fns ...AggregateFunc) *ProjectGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProjectGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProjectGroupBy) Scan ¶
func (pgb *ProjectGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProjectGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProjectMutation ¶
type ProjectMutation struct {
// contains filtered or unexported fields
}
ProjectMutation represents an operation that mutates the Project nodes in the graph.
func (*ProjectMutation) AddField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) AddedEdges ¶
func (m *ProjectMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProjectMutation) AddedField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) AddedFields ¶
func (m *ProjectMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProjectMutation) AddedIDs ¶
func (m *ProjectMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProjectMutation) ClearDescription ¶
func (m *ProjectMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ProjectMutation) ClearEdge ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ClearField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ClearedEdges ¶
func (m *ProjectMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProjectMutation) ClearedFields ¶
func (m *ProjectMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProjectMutation) Client ¶
func (m ProjectMutation) 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 (*ProjectMutation) CreatedAt ¶
func (m *ProjectMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ProjectMutation) Description ¶
func (m *ProjectMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ProjectMutation) DescriptionCleared ¶
func (m *ProjectMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ProjectMutation) EdgeCleared ¶
func (m *ProjectMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProjectMutation) Field ¶
func (m *ProjectMutation) 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 (*ProjectMutation) FieldCleared ¶
func (m *ProjectMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProjectMutation) Fields ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ID ¶
func (m *ProjectMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ProjectMutation) IDs ¶
func (m *ProjectMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ProjectMutation) Name ¶
func (m *ProjectMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProjectMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldDescription ¶
func (m *ProjectMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Project entity. If the Project 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 (*ProjectMutation) 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 (*ProjectMutation) OldName ¶
func (m *ProjectMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Project entity. If the Project 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 (*ProjectMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Project entity. If the Project 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 (*ProjectMutation) RemovedEdges ¶
func (m *ProjectMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProjectMutation) RemovedIDs ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ResetCreatedAt ¶
func (m *ProjectMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ProjectMutation) ResetDescription ¶
func (m *ProjectMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ProjectMutation) ResetEdge ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ResetField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) ResetName ¶
func (m *ProjectMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProjectMutation) ResetUpdatedAt ¶
func (m *ProjectMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ProjectMutation) SetCreatedAt ¶
func (m *ProjectMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ProjectMutation) SetDescription ¶
func (m *ProjectMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ProjectMutation) SetField ¶
func (m *ProjectMutation) 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 (*ProjectMutation) SetName ¶
func (m *ProjectMutation) SetName(s string)
SetName sets the "name" field.
func (*ProjectMutation) SetOp ¶
func (m *ProjectMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProjectMutation) SetUpdatedAt ¶
func (m *ProjectMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (ProjectMutation) Tx ¶
func (m ProjectMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProjectMutation) Type ¶
func (m *ProjectMutation) Type() string
Type returns the node type of this mutation (Project).
func (*ProjectMutation) UpdatedAt ¶
func (m *ProjectMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ProjectMutation) Where ¶
func (m *ProjectMutation) Where(ps ...predicate.Project)
Where appends a list predicates to the ProjectMutation builder.
func (*ProjectMutation) WhereP ¶
func (m *ProjectMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProjectMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProjectQuery ¶
type ProjectQuery struct {
// contains filtered or unexported fields
}
ProjectQuery is the builder for querying Project entities.
func (*ProjectQuery) Aggregate ¶
func (pq *ProjectQuery) Aggregate(fns ...AggregateFunc) *ProjectSelect
Aggregate returns a ProjectSelect configured with the given aggregations.
func (*ProjectQuery) All ¶
func (pq *ProjectQuery) All(ctx context.Context) ([]*Project, error)
All executes the query and returns a list of Projects.
func (*ProjectQuery) AllX ¶
func (pq *ProjectQuery) AllX(ctx context.Context) []*Project
AllX is like All, but panics if an error occurs.
func (*ProjectQuery) Clone ¶
func (pq *ProjectQuery) Clone() *ProjectQuery
Clone returns a duplicate of the ProjectQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProjectQuery) Count ¶
func (pq *ProjectQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProjectQuery) CountX ¶
func (pq *ProjectQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProjectQuery) Exist ¶
func (pq *ProjectQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProjectQuery) ExistX ¶
func (pq *ProjectQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProjectQuery) First ¶
func (pq *ProjectQuery) First(ctx context.Context) (*Project, error)
First returns the first Project entity from the query. Returns a *NotFoundError when no Project was found.
func (*ProjectQuery) FirstID ¶
func (pq *ProjectQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Project ID from the query. Returns a *NotFoundError when no Project ID was found.
func (*ProjectQuery) FirstIDX ¶
func (pq *ProjectQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProjectQuery) FirstX ¶
func (pq *ProjectQuery) FirstX(ctx context.Context) *Project
FirstX is like First, but panics if an error occurs.
func (*ProjectQuery) GroupBy ¶
func (pq *ProjectQuery) GroupBy(field string, fields ...string) *ProjectGroupBy
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.Project.Query(). GroupBy(project.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProjectQuery) IDs ¶
func (pq *ProjectQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Project IDs.
func (*ProjectQuery) IDsX ¶
func (pq *ProjectQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ProjectQuery) Limit ¶
func (pq *ProjectQuery) Limit(limit int) *ProjectQuery
Limit the number of records to be returned by this query.
func (*ProjectQuery) Offset ¶
func (pq *ProjectQuery) Offset(offset int) *ProjectQuery
Offset to start from.
func (*ProjectQuery) Only ¶
func (pq *ProjectQuery) Only(ctx context.Context) (*Project, error)
Only returns a single Project entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Project entity is found. Returns a *NotFoundError when no Project entities are found.
func (*ProjectQuery) OnlyID ¶
func (pq *ProjectQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Project ID in the query. Returns a *NotSingularError when more than one Project ID is found. Returns a *NotFoundError when no entities are found.
func (*ProjectQuery) OnlyIDX ¶
func (pq *ProjectQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProjectQuery) OnlyX ¶
func (pq *ProjectQuery) OnlyX(ctx context.Context) *Project
OnlyX is like Only, but panics if an error occurs.
func (*ProjectQuery) Order ¶
func (pq *ProjectQuery) Order(o ...project.OrderOption) *ProjectQuery
Order specifies how the records should be ordered.
func (*ProjectQuery) Select ¶
func (pq *ProjectQuery) Select(fields ...string) *ProjectSelect
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.Project.Query(). Select(project.FieldCreatedAt). Scan(ctx, &v)
func (*ProjectQuery) Unique ¶
func (pq *ProjectQuery) Unique(unique bool) *ProjectQuery
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 (*ProjectQuery) Where ¶
func (pq *ProjectQuery) Where(ps ...predicate.Project) *ProjectQuery
Where adds a new predicate for the ProjectQuery builder.
type ProjectSelect ¶
type ProjectSelect struct { *ProjectQuery // contains filtered or unexported fields }
ProjectSelect is the builder for selecting fields of Project entities.
func (*ProjectSelect) Aggregate ¶
func (ps *ProjectSelect) Aggregate(fns ...AggregateFunc) *ProjectSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProjectSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProjectSelect) Scan ¶
func (ps *ProjectSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProjectSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProjectUpdate ¶
type ProjectUpdate struct {
// contains filtered or unexported fields
}
ProjectUpdate is the builder for updating Project entities.
func (*ProjectUpdate) ClearDescription ¶
func (pu *ProjectUpdate) ClearDescription() *ProjectUpdate
ClearDescription clears the value of the "description" field.
func (*ProjectUpdate) Exec ¶
func (pu *ProjectUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProjectUpdate) ExecX ¶
func (pu *ProjectUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProjectUpdate) Mutation ¶
func (pu *ProjectUpdate) Mutation() *ProjectMutation
Mutation returns the ProjectMutation object of the builder.
func (*ProjectUpdate) Save ¶
func (pu *ProjectUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProjectUpdate) SaveX ¶
func (pu *ProjectUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProjectUpdate) SetDescription ¶
func (pu *ProjectUpdate) SetDescription(s string) *ProjectUpdate
SetDescription sets the "description" field.
func (*ProjectUpdate) SetName ¶
func (pu *ProjectUpdate) SetName(s string) *ProjectUpdate
SetName sets the "name" field.
func (*ProjectUpdate) SetNillableDescription ¶
func (pu *ProjectUpdate) SetNillableDescription(s *string) *ProjectUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProjectUpdate) SetUpdatedAt ¶
func (pu *ProjectUpdate) SetUpdatedAt(t time.Time) *ProjectUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ProjectUpdate) Where ¶
func (pu *ProjectUpdate) Where(ps ...predicate.Project) *ProjectUpdate
Where appends a list predicates to the ProjectUpdate builder.
type ProjectUpdateOne ¶
type ProjectUpdateOne struct {
// contains filtered or unexported fields
}
ProjectUpdateOne is the builder for updating a single Project entity.
func (*ProjectUpdateOne) ClearDescription ¶
func (puo *ProjectUpdateOne) ClearDescription() *ProjectUpdateOne
ClearDescription clears the value of the "description" field.
func (*ProjectUpdateOne) Exec ¶
func (puo *ProjectUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProjectUpdateOne) ExecX ¶
func (puo *ProjectUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProjectUpdateOne) Mutation ¶
func (puo *ProjectUpdateOne) Mutation() *ProjectMutation
Mutation returns the ProjectMutation object of the builder.
func (*ProjectUpdateOne) Save ¶
func (puo *ProjectUpdateOne) Save(ctx context.Context) (*Project, error)
Save executes the query and returns the updated Project entity.
func (*ProjectUpdateOne) SaveX ¶
func (puo *ProjectUpdateOne) SaveX(ctx context.Context) *Project
SaveX is like Save, but panics if an error occurs.
func (*ProjectUpdateOne) Select ¶
func (puo *ProjectUpdateOne) Select(field string, fields ...string) *ProjectUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProjectUpdateOne) SetDescription ¶
func (puo *ProjectUpdateOne) SetDescription(s string) *ProjectUpdateOne
SetDescription sets the "description" field.
func (*ProjectUpdateOne) SetName ¶
func (puo *ProjectUpdateOne) SetName(s string) *ProjectUpdateOne
SetName sets the "name" field.
func (*ProjectUpdateOne) SetNillableDescription ¶
func (puo *ProjectUpdateOne) SetNillableDescription(s *string) *ProjectUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ProjectUpdateOne) SetUpdatedAt ¶
func (puo *ProjectUpdateOne) SetUpdatedAt(t time.Time) *ProjectUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ProjectUpdateOne) Where ¶
func (puo *ProjectUpdateOne) Where(ps ...predicate.Project) *ProjectUpdateOne
Where appends a list predicates to the ProjectUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
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 Script ¶
type Script struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // Script holds the value of the "script" field. Script string `json:"script,omitempty"` // TimeoutSeconds holds the value of the "timeout_seconds" field. TimeoutSeconds int `json:"timeout_seconds,omitempty"` // ProjectID holds the value of the "project_id" field. ProjectID int `json:"project_id,omitempty"` // Parameters holds the value of the "parameters" field. Parameters []schema.ScriptInputOptions `json:"parameters,omitempty"` // ScheduleEnabled holds the value of the "schedule_enabled" field. ScheduleEnabled bool `json:"schedule_enabled,omitempty"` // ScheduleCron holds the value of the "schedule_cron" field. ScheduleCron string `json:"schedule_cron,omitempty"` // SuccessNotificationChannelID holds the value of the "success_notification_channel_id" field. SuccessNotificationChannelID *int `json:"success_notification_channel_id,omitempty"` // FailureNotificationChannelID holds the value of the "failure_notification_channel_id" field. FailureNotificationChannelID *int `json:"failure_notification_channel_id,omitempty"` // contains filtered or unexported fields }
Script is the model entity for the Script schema.
func (*Script) Unwrap ¶
Unwrap unwraps the Script 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 (*Script) Update ¶
func (s *Script) Update() *ScriptUpdateOne
Update returns a builder for updating this Script. Note that you need to call Script.Unwrap() before calling this method if this Script was returned from a transaction, and the transaction was committed or rolled back.
type ScriptClient ¶
type ScriptClient struct {
// contains filtered or unexported fields
}
ScriptClient is a client for the Script schema.
func NewScriptClient ¶
func NewScriptClient(c config) *ScriptClient
NewScriptClient returns a client for the Script from the given config.
func (*ScriptClient) Create ¶
func (c *ScriptClient) Create() *ScriptCreate
Create returns a builder for creating a Script entity.
func (*ScriptClient) CreateBulk ¶
func (c *ScriptClient) CreateBulk(builders ...*ScriptCreate) *ScriptCreateBulk
CreateBulk returns a builder for creating a bulk of Script entities.
func (*ScriptClient) Delete ¶
func (c *ScriptClient) Delete() *ScriptDelete
Delete returns a delete builder for Script.
func (*ScriptClient) DeleteOne ¶
func (c *ScriptClient) DeleteOne(s *Script) *ScriptDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScriptClient) DeleteOneID ¶
func (c *ScriptClient) DeleteOneID(id int) *ScriptDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ScriptClient) GetX ¶
func (c *ScriptClient) GetX(ctx context.Context, id int) *Script
GetX is like Get, but panics if an error occurs.
func (*ScriptClient) Intercept ¶
func (c *ScriptClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `script.Intercept(f(g(h())))`.
func (*ScriptClient) Interceptors ¶
func (c *ScriptClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ScriptClient) Query ¶
func (c *ScriptClient) Query() *ScriptQuery
Query returns a query builder for Script.
func (*ScriptClient) Update ¶
func (c *ScriptClient) Update() *ScriptUpdate
Update returns an update builder for Script.
func (*ScriptClient) UpdateOne ¶
func (c *ScriptClient) UpdateOne(s *Script) *ScriptUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScriptClient) UpdateOneID ¶
func (c *ScriptClient) UpdateOneID(id int) *ScriptUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScriptClient) Use ¶
func (c *ScriptClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `script.Hooks(f(g(h())))`.
type ScriptCreate ¶
type ScriptCreate struct {
// contains filtered or unexported fields
}
ScriptCreate is the builder for creating a Script entity.
func (*ScriptCreate) Exec ¶
func (sc *ScriptCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptCreate) ExecX ¶
func (sc *ScriptCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptCreate) Mutation ¶
func (sc *ScriptCreate) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptCreate) Save ¶
func (sc *ScriptCreate) Save(ctx context.Context) (*Script, error)
Save creates the Script in the database.
func (*ScriptCreate) SaveX ¶
func (sc *ScriptCreate) SaveX(ctx context.Context) *Script
SaveX calls Save and panics if Save returns an error.
func (*ScriptCreate) SetCreatedAt ¶
func (sc *ScriptCreate) SetCreatedAt(t time.Time) *ScriptCreate
SetCreatedAt sets the "created_at" field.
func (*ScriptCreate) SetDescription ¶
func (sc *ScriptCreate) SetDescription(s string) *ScriptCreate
SetDescription sets the "description" field.
func (*ScriptCreate) SetFailureNotificationChannelID ¶
func (sc *ScriptCreate) SetFailureNotificationChannelID(i int) *ScriptCreate
SetFailureNotificationChannelID sets the "failure_notification_channel_id" field.
func (*ScriptCreate) SetName ¶
func (sc *ScriptCreate) SetName(s string) *ScriptCreate
SetName sets the "name" field.
func (*ScriptCreate) SetNillableCreatedAt ¶
func (sc *ScriptCreate) SetNillableCreatedAt(t *time.Time) *ScriptCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ScriptCreate) SetNillableDescription ¶
func (sc *ScriptCreate) SetNillableDescription(s *string) *ScriptCreate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ScriptCreate) SetNillableFailureNotificationChannelID ¶
func (sc *ScriptCreate) SetNillableFailureNotificationChannelID(i *int) *ScriptCreate
SetNillableFailureNotificationChannelID sets the "failure_notification_channel_id" field if the given value is not nil.
func (*ScriptCreate) SetNillableScheduleCron ¶
func (sc *ScriptCreate) SetNillableScheduleCron(s *string) *ScriptCreate
SetNillableScheduleCron sets the "schedule_cron" field if the given value is not nil.
func (*ScriptCreate) SetNillableScheduleEnabled ¶
func (sc *ScriptCreate) SetNillableScheduleEnabled(b *bool) *ScriptCreate
SetNillableScheduleEnabled sets the "schedule_enabled" field if the given value is not nil.
func (*ScriptCreate) SetNillableSuccessNotificationChannelID ¶
func (sc *ScriptCreate) SetNillableSuccessNotificationChannelID(i *int) *ScriptCreate
SetNillableSuccessNotificationChannelID sets the "success_notification_channel_id" field if the given value is not nil.
func (*ScriptCreate) SetNillableTimeoutSeconds ¶
func (sc *ScriptCreate) SetNillableTimeoutSeconds(i *int) *ScriptCreate
SetNillableTimeoutSeconds sets the "timeout_seconds" field if the given value is not nil.
func (*ScriptCreate) SetNillableUpdatedAt ¶
func (sc *ScriptCreate) SetNillableUpdatedAt(t *time.Time) *ScriptCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ScriptCreate) SetParameters ¶
func (sc *ScriptCreate) SetParameters(sio []schema.ScriptInputOptions) *ScriptCreate
SetParameters sets the "parameters" field.
func (*ScriptCreate) SetProjectID ¶
func (sc *ScriptCreate) SetProjectID(i int) *ScriptCreate
SetProjectID sets the "project_id" field.
func (*ScriptCreate) SetScheduleCron ¶
func (sc *ScriptCreate) SetScheduleCron(s string) *ScriptCreate
SetScheduleCron sets the "schedule_cron" field.
func (*ScriptCreate) SetScheduleEnabled ¶
func (sc *ScriptCreate) SetScheduleEnabled(b bool) *ScriptCreate
SetScheduleEnabled sets the "schedule_enabled" field.
func (*ScriptCreate) SetScript ¶
func (sc *ScriptCreate) SetScript(s string) *ScriptCreate
SetScript sets the "script" field.
func (*ScriptCreate) SetSuccessNotificationChannelID ¶
func (sc *ScriptCreate) SetSuccessNotificationChannelID(i int) *ScriptCreate
SetSuccessNotificationChannelID sets the "success_notification_channel_id" field.
func (*ScriptCreate) SetTimeoutSeconds ¶
func (sc *ScriptCreate) SetTimeoutSeconds(i int) *ScriptCreate
SetTimeoutSeconds sets the "timeout_seconds" field.
func (*ScriptCreate) SetUpdatedAt ¶
func (sc *ScriptCreate) SetUpdatedAt(t time.Time) *ScriptCreate
SetUpdatedAt sets the "updated_at" field.
type ScriptCreateBulk ¶
type ScriptCreateBulk struct {
// contains filtered or unexported fields
}
ScriptCreateBulk is the builder for creating many Script entities in bulk.
func (*ScriptCreateBulk) Exec ¶
func (scb *ScriptCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptCreateBulk) ExecX ¶
func (scb *ScriptCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ScriptDelete ¶
type ScriptDelete struct {
// contains filtered or unexported fields
}
ScriptDelete is the builder for deleting a Script entity.
func (*ScriptDelete) Exec ¶
func (sd *ScriptDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScriptDelete) ExecX ¶
func (sd *ScriptDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScriptDelete) Where ¶
func (sd *ScriptDelete) Where(ps ...predicate.Script) *ScriptDelete
Where appends a list predicates to the ScriptDelete builder.
type ScriptDeleteOne ¶
type ScriptDeleteOne struct {
// contains filtered or unexported fields
}
ScriptDeleteOne is the builder for deleting a single Script entity.
func (*ScriptDeleteOne) Exec ¶
func (sdo *ScriptDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScriptDeleteOne) ExecX ¶
func (sdo *ScriptDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptDeleteOne) Where ¶
func (sdo *ScriptDeleteOne) Where(ps ...predicate.Script) *ScriptDeleteOne
Where appends a list predicates to the ScriptDelete builder.
type ScriptGroupBy ¶
type ScriptGroupBy struct {
// contains filtered or unexported fields
}
ScriptGroupBy is the group-by builder for Script entities.
func (*ScriptGroupBy) Aggregate ¶
func (sgb *ScriptGroupBy) Aggregate(fns ...AggregateFunc) *ScriptGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScriptGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptGroupBy) Scan ¶
func (sgb *ScriptGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScriptMutation ¶
type ScriptMutation struct {
// contains filtered or unexported fields
}
ScriptMutation represents an operation that mutates the Script nodes in the graph.
func (*ScriptMutation) AddFailureNotificationChannelID ¶
func (m *ScriptMutation) AddFailureNotificationChannelID(i int)
AddFailureNotificationChannelID adds i to the "failure_notification_channel_id" field.
func (*ScriptMutation) AddField ¶
func (m *ScriptMutation) 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 (*ScriptMutation) AddProjectID ¶
func (m *ScriptMutation) AddProjectID(i int)
AddProjectID adds i to the "project_id" field.
func (*ScriptMutation) AddSuccessNotificationChannelID ¶
func (m *ScriptMutation) AddSuccessNotificationChannelID(i int)
AddSuccessNotificationChannelID adds i to the "success_notification_channel_id" field.
func (*ScriptMutation) AddTimeoutSeconds ¶
func (m *ScriptMutation) AddTimeoutSeconds(i int)
AddTimeoutSeconds adds i to the "timeout_seconds" field.
func (*ScriptMutation) AddedEdges ¶
func (m *ScriptMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScriptMutation) AddedFailureNotificationChannelID ¶
func (m *ScriptMutation) AddedFailureNotificationChannelID() (r int, exists bool)
AddedFailureNotificationChannelID returns the value that was added to the "failure_notification_channel_id" field in this mutation.
func (*ScriptMutation) AddedField ¶
func (m *ScriptMutation) 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 (*ScriptMutation) AddedFields ¶
func (m *ScriptMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScriptMutation) AddedIDs ¶
func (m *ScriptMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScriptMutation) AddedProjectID ¶
func (m *ScriptMutation) AddedProjectID() (r int, exists bool)
AddedProjectID returns the value that was added to the "project_id" field in this mutation.
func (*ScriptMutation) AddedSuccessNotificationChannelID ¶
func (m *ScriptMutation) AddedSuccessNotificationChannelID() (r int, exists bool)
AddedSuccessNotificationChannelID returns the value that was added to the "success_notification_channel_id" field in this mutation.
func (*ScriptMutation) AddedTimeoutSeconds ¶
func (m *ScriptMutation) AddedTimeoutSeconds() (r int, exists bool)
AddedTimeoutSeconds returns the value that was added to the "timeout_seconds" field in this mutation.
func (*ScriptMutation) AppendParameters ¶
func (m *ScriptMutation) AppendParameters(sio []schema.ScriptInputOptions)
AppendParameters adds sio to the "parameters" field.
func (*ScriptMutation) AppendedParameters ¶
func (m *ScriptMutation) AppendedParameters() ([]schema.ScriptInputOptions, bool)
AppendedParameters returns the list of values that were appended to the "parameters" field in this mutation.
func (*ScriptMutation) ClearDescription ¶
func (m *ScriptMutation) ClearDescription()
ClearDescription clears the value of the "description" field.
func (*ScriptMutation) ClearEdge ¶
func (m *ScriptMutation) 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 (*ScriptMutation) ClearFailureNotificationChannelID ¶
func (m *ScriptMutation) ClearFailureNotificationChannelID()
ClearFailureNotificationChannelID clears the value of the "failure_notification_channel_id" field.
func (*ScriptMutation) ClearField ¶
func (m *ScriptMutation) 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 (*ScriptMutation) ClearParameters ¶
func (m *ScriptMutation) ClearParameters()
ClearParameters clears the value of the "parameters" field.
func (*ScriptMutation) ClearScheduleCron ¶
func (m *ScriptMutation) ClearScheduleCron()
ClearScheduleCron clears the value of the "schedule_cron" field.
func (*ScriptMutation) ClearSuccessNotificationChannelID ¶
func (m *ScriptMutation) ClearSuccessNotificationChannelID()
ClearSuccessNotificationChannelID clears the value of the "success_notification_channel_id" field.
func (*ScriptMutation) ClearedEdges ¶
func (m *ScriptMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScriptMutation) ClearedFields ¶
func (m *ScriptMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScriptMutation) Client ¶
func (m ScriptMutation) 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 (*ScriptMutation) CreatedAt ¶
func (m *ScriptMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ScriptMutation) Description ¶
func (m *ScriptMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*ScriptMutation) DescriptionCleared ¶
func (m *ScriptMutation) DescriptionCleared() bool
DescriptionCleared returns if the "description" field was cleared in this mutation.
func (*ScriptMutation) EdgeCleared ¶
func (m *ScriptMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScriptMutation) FailureNotificationChannelID ¶
func (m *ScriptMutation) FailureNotificationChannelID() (r int, exists bool)
FailureNotificationChannelID returns the value of the "failure_notification_channel_id" field in the mutation.
func (*ScriptMutation) FailureNotificationChannelIDCleared ¶
func (m *ScriptMutation) FailureNotificationChannelIDCleared() bool
FailureNotificationChannelIDCleared returns if the "failure_notification_channel_id" field was cleared in this mutation.
func (*ScriptMutation) Field ¶
func (m *ScriptMutation) 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 (*ScriptMutation) FieldCleared ¶
func (m *ScriptMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScriptMutation) Fields ¶
func (m *ScriptMutation) 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 (*ScriptMutation) ID ¶
func (m *ScriptMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ScriptMutation) IDs ¶
func (m *ScriptMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ScriptMutation) Name ¶
func (m *ScriptMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ScriptMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldDescription ¶
func (m *ScriptMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldFailureNotificationChannelID ¶
func (m *ScriptMutation) OldFailureNotificationChannelID(ctx context.Context) (v *int, err error)
OldFailureNotificationChannelID returns the old "failure_notification_channel_id" field's value of the Script entity. If the Script 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 (*ScriptMutation) 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 (*ScriptMutation) OldName ¶
func (m *ScriptMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldParameters ¶
func (m *ScriptMutation) OldParameters(ctx context.Context) (v []schema.ScriptInputOptions, err error)
OldParameters returns the old "parameters" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldProjectID ¶
func (m *ScriptMutation) OldProjectID(ctx context.Context) (v int, err error)
OldProjectID returns the old "project_id" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldScheduleCron ¶
func (m *ScriptMutation) OldScheduleCron(ctx context.Context) (v string, err error)
OldScheduleCron returns the old "schedule_cron" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldScheduleEnabled ¶
func (m *ScriptMutation) OldScheduleEnabled(ctx context.Context) (v bool, err error)
OldScheduleEnabled returns the old "schedule_enabled" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldScript ¶
func (m *ScriptMutation) OldScript(ctx context.Context) (v string, err error)
OldScript returns the old "script" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldSuccessNotificationChannelID ¶
func (m *ScriptMutation) OldSuccessNotificationChannelID(ctx context.Context) (v *int, err error)
OldSuccessNotificationChannelID returns the old "success_notification_channel_id" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldTimeoutSeconds ¶
func (m *ScriptMutation) OldTimeoutSeconds(ctx context.Context) (v int, err error)
OldTimeoutSeconds returns the old "timeout_seconds" field's value of the Script entity. If the Script 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 (*ScriptMutation) OldUpdatedAt ¶
OldUpdatedAt returns the old "updated_at" field's value of the Script entity. If the Script 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 (*ScriptMutation) Parameters ¶
func (m *ScriptMutation) Parameters() (r []schema.ScriptInputOptions, exists bool)
Parameters returns the value of the "parameters" field in the mutation.
func (*ScriptMutation) ParametersCleared ¶
func (m *ScriptMutation) ParametersCleared() bool
ParametersCleared returns if the "parameters" field was cleared in this mutation.
func (*ScriptMutation) ProjectID ¶
func (m *ScriptMutation) ProjectID() (r int, exists bool)
ProjectID returns the value of the "project_id" field in the mutation.
func (*ScriptMutation) RemovedEdges ¶
func (m *ScriptMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScriptMutation) RemovedIDs ¶
func (m *ScriptMutation) 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 (*ScriptMutation) ResetCreatedAt ¶
func (m *ScriptMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ScriptMutation) ResetDescription ¶
func (m *ScriptMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*ScriptMutation) ResetEdge ¶
func (m *ScriptMutation) 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 (*ScriptMutation) ResetFailureNotificationChannelID ¶
func (m *ScriptMutation) ResetFailureNotificationChannelID()
ResetFailureNotificationChannelID resets all changes to the "failure_notification_channel_id" field.
func (*ScriptMutation) ResetField ¶
func (m *ScriptMutation) 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 (*ScriptMutation) ResetName ¶
func (m *ScriptMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ScriptMutation) ResetParameters ¶
func (m *ScriptMutation) ResetParameters()
ResetParameters resets all changes to the "parameters" field.
func (*ScriptMutation) ResetProjectID ¶
func (m *ScriptMutation) ResetProjectID()
ResetProjectID resets all changes to the "project_id" field.
func (*ScriptMutation) ResetScheduleCron ¶
func (m *ScriptMutation) ResetScheduleCron()
ResetScheduleCron resets all changes to the "schedule_cron" field.
func (*ScriptMutation) ResetScheduleEnabled ¶
func (m *ScriptMutation) ResetScheduleEnabled()
ResetScheduleEnabled resets all changes to the "schedule_enabled" field.
func (*ScriptMutation) ResetScript ¶
func (m *ScriptMutation) ResetScript()
ResetScript resets all changes to the "script" field.
func (*ScriptMutation) ResetSuccessNotificationChannelID ¶
func (m *ScriptMutation) ResetSuccessNotificationChannelID()
ResetSuccessNotificationChannelID resets all changes to the "success_notification_channel_id" field.
func (*ScriptMutation) ResetTimeoutSeconds ¶
func (m *ScriptMutation) ResetTimeoutSeconds()
ResetTimeoutSeconds resets all changes to the "timeout_seconds" field.
func (*ScriptMutation) ResetUpdatedAt ¶
func (m *ScriptMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ScriptMutation) ScheduleCron ¶
func (m *ScriptMutation) ScheduleCron() (r string, exists bool)
ScheduleCron returns the value of the "schedule_cron" field in the mutation.
func (*ScriptMutation) ScheduleCronCleared ¶
func (m *ScriptMutation) ScheduleCronCleared() bool
ScheduleCronCleared returns if the "schedule_cron" field was cleared in this mutation.
func (*ScriptMutation) ScheduleEnabled ¶
func (m *ScriptMutation) ScheduleEnabled() (r bool, exists bool)
ScheduleEnabled returns the value of the "schedule_enabled" field in the mutation.
func (*ScriptMutation) Script ¶
func (m *ScriptMutation) Script() (r string, exists bool)
Script returns the value of the "script" field in the mutation.
func (*ScriptMutation) SetCreatedAt ¶
func (m *ScriptMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*ScriptMutation) SetDescription ¶
func (m *ScriptMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*ScriptMutation) SetFailureNotificationChannelID ¶
func (m *ScriptMutation) SetFailureNotificationChannelID(i int)
SetFailureNotificationChannelID sets the "failure_notification_channel_id" field.
func (*ScriptMutation) SetField ¶
func (m *ScriptMutation) 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 (*ScriptMutation) SetName ¶
func (m *ScriptMutation) SetName(s string)
SetName sets the "name" field.
func (*ScriptMutation) SetOp ¶
func (m *ScriptMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ScriptMutation) SetParameters ¶
func (m *ScriptMutation) SetParameters(sio []schema.ScriptInputOptions)
SetParameters sets the "parameters" field.
func (*ScriptMutation) SetProjectID ¶
func (m *ScriptMutation) SetProjectID(i int)
SetProjectID sets the "project_id" field.
func (*ScriptMutation) SetScheduleCron ¶
func (m *ScriptMutation) SetScheduleCron(s string)
SetScheduleCron sets the "schedule_cron" field.
func (*ScriptMutation) SetScheduleEnabled ¶
func (m *ScriptMutation) SetScheduleEnabled(b bool)
SetScheduleEnabled sets the "schedule_enabled" field.
func (*ScriptMutation) SetScript ¶
func (m *ScriptMutation) SetScript(s string)
SetScript sets the "script" field.
func (*ScriptMutation) SetSuccessNotificationChannelID ¶
func (m *ScriptMutation) SetSuccessNotificationChannelID(i int)
SetSuccessNotificationChannelID sets the "success_notification_channel_id" field.
func (*ScriptMutation) SetTimeoutSeconds ¶
func (m *ScriptMutation) SetTimeoutSeconds(i int)
SetTimeoutSeconds sets the "timeout_seconds" field.
func (*ScriptMutation) SetUpdatedAt ¶
func (m *ScriptMutation) SetUpdatedAt(t time.Time)
SetUpdatedAt sets the "updated_at" field.
func (*ScriptMutation) SuccessNotificationChannelID ¶
func (m *ScriptMutation) SuccessNotificationChannelID() (r int, exists bool)
SuccessNotificationChannelID returns the value of the "success_notification_channel_id" field in the mutation.
func (*ScriptMutation) SuccessNotificationChannelIDCleared ¶
func (m *ScriptMutation) SuccessNotificationChannelIDCleared() bool
SuccessNotificationChannelIDCleared returns if the "success_notification_channel_id" field was cleared in this mutation.
func (*ScriptMutation) TimeoutSeconds ¶
func (m *ScriptMutation) TimeoutSeconds() (r int, exists bool)
TimeoutSeconds returns the value of the "timeout_seconds" field in the mutation.
func (ScriptMutation) Tx ¶
func (m ScriptMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScriptMutation) Type ¶
func (m *ScriptMutation) Type() string
Type returns the node type of this mutation (Script).
func (*ScriptMutation) UpdatedAt ¶
func (m *ScriptMutation) UpdatedAt() (r time.Time, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ScriptMutation) Where ¶
func (m *ScriptMutation) Where(ps ...predicate.Script)
Where appends a list predicates to the ScriptMutation builder.
func (*ScriptMutation) WhereP ¶
func (m *ScriptMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ScriptMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ScriptQuery ¶
type ScriptQuery struct {
// contains filtered or unexported fields
}
ScriptQuery is the builder for querying Script entities.
func (*ScriptQuery) Aggregate ¶
func (sq *ScriptQuery) Aggregate(fns ...AggregateFunc) *ScriptSelect
Aggregate returns a ScriptSelect configured with the given aggregations.
func (*ScriptQuery) All ¶
func (sq *ScriptQuery) All(ctx context.Context) ([]*Script, error)
All executes the query and returns a list of Scripts.
func (*ScriptQuery) AllX ¶
func (sq *ScriptQuery) AllX(ctx context.Context) []*Script
AllX is like All, but panics if an error occurs.
func (*ScriptQuery) Clone ¶
func (sq *ScriptQuery) Clone() *ScriptQuery
Clone returns a duplicate of the ScriptQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScriptQuery) Count ¶
func (sq *ScriptQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScriptQuery) CountX ¶
func (sq *ScriptQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScriptQuery) Exist ¶
func (sq *ScriptQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScriptQuery) ExistX ¶
func (sq *ScriptQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScriptQuery) First ¶
func (sq *ScriptQuery) First(ctx context.Context) (*Script, error)
First returns the first Script entity from the query. Returns a *NotFoundError when no Script was found.
func (*ScriptQuery) FirstID ¶
func (sq *ScriptQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Script ID from the query. Returns a *NotFoundError when no Script ID was found.
func (*ScriptQuery) FirstIDX ¶
func (sq *ScriptQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScriptQuery) FirstX ¶
func (sq *ScriptQuery) FirstX(ctx context.Context) *Script
FirstX is like First, but panics if an error occurs.
func (*ScriptQuery) GroupBy ¶
func (sq *ScriptQuery) GroupBy(field string, fields ...string) *ScriptGroupBy
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.Script.Query(). GroupBy(script.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScriptQuery) IDs ¶
func (sq *ScriptQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Script IDs.
func (*ScriptQuery) IDsX ¶
func (sq *ScriptQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ScriptQuery) Limit ¶
func (sq *ScriptQuery) Limit(limit int) *ScriptQuery
Limit the number of records to be returned by this query.
func (*ScriptQuery) Offset ¶
func (sq *ScriptQuery) Offset(offset int) *ScriptQuery
Offset to start from.
func (*ScriptQuery) Only ¶
func (sq *ScriptQuery) Only(ctx context.Context) (*Script, error)
Only returns a single Script entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Script entity is found. Returns a *NotFoundError when no Script entities are found.
func (*ScriptQuery) OnlyID ¶
func (sq *ScriptQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Script ID in the query. Returns a *NotSingularError when more than one Script ID is found. Returns a *NotFoundError when no entities are found.
func (*ScriptQuery) OnlyIDX ¶
func (sq *ScriptQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScriptQuery) OnlyX ¶
func (sq *ScriptQuery) OnlyX(ctx context.Context) *Script
OnlyX is like Only, but panics if an error occurs.
func (*ScriptQuery) Order ¶
func (sq *ScriptQuery) Order(o ...script.OrderOption) *ScriptQuery
Order specifies how the records should be ordered.
func (*ScriptQuery) Select ¶
func (sq *ScriptQuery) Select(fields ...string) *ScriptSelect
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.Script.Query(). Select(script.FieldCreatedAt). Scan(ctx, &v)
func (*ScriptQuery) Unique ¶
func (sq *ScriptQuery) Unique(unique bool) *ScriptQuery
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 (*ScriptQuery) Where ¶
func (sq *ScriptQuery) Where(ps ...predicate.Script) *ScriptQuery
Where adds a new predicate for the ScriptQuery builder.
type ScriptSelect ¶
type ScriptSelect struct { *ScriptQuery // contains filtered or unexported fields }
ScriptSelect is the builder for selecting fields of Script entities.
func (*ScriptSelect) Aggregate ¶
func (ss *ScriptSelect) Aggregate(fns ...AggregateFunc) *ScriptSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ScriptSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptSelect) Scan ¶
func (ss *ScriptSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScriptStats ¶
type ScriptStats struct { // ID of the ent. ID int `json:"id,omitempty"` // ScriptID holds the value of the "script_id" field. ScriptID int `json:"script_id,omitempty"` // ProjectID holds the value of the "project_id" field. ProjectID int `json:"project_id,omitempty"` // TotalRuns holds the value of the "total_runs" field. TotalRuns int `json:"total_runs,omitempty"` // TotalErrors holds the value of the "total_errors" field. TotalErrors int `json:"total_errors,omitempty"` // TotalSuccess holds the value of the "total_success" field. TotalSuccess int `json:"total_success,omitempty"` // AverageRuntime holds the value of the "average_runtime" field. AverageRuntime int `json:"average_runtime,omitempty"` // MinRuntime holds the value of the "min_runtime" field. MinRuntime int `json:"min_runtime,omitempty"` // MaxRuntime holds the value of the "max_runtime" field. MaxRuntime int `json:"max_runtime,omitempty"` // LastRun holds the value of the "last_run" field. LastRun time.Time `json:"last_run,omitempty"` // TotalRuntime holds the value of the "total_runtime" field. TotalRuntime int `json:"total_runtime,omitempty"` // SuccessRate holds the value of the "success_rate" field. SuccessRate int `json:"success_rate,omitempty"` // contains filtered or unexported fields }
ScriptStats is the model entity for the ScriptStats schema.
func (*ScriptStats) String ¶
func (ss *ScriptStats) String() string
String implements the fmt.Stringer.
func (*ScriptStats) Unwrap ¶
func (ss *ScriptStats) Unwrap() *ScriptStats
Unwrap unwraps the ScriptStats 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 (*ScriptStats) Update ¶
func (ss *ScriptStats) Update() *ScriptStatsUpdateOne
Update returns a builder for updating this ScriptStats. Note that you need to call ScriptStats.Unwrap() before calling this method if this ScriptStats was returned from a transaction, and the transaction was committed or rolled back.
type ScriptStatsClient ¶
type ScriptStatsClient struct {
// contains filtered or unexported fields
}
ScriptStatsClient is a client for the ScriptStats schema.
func NewScriptStatsClient ¶
func NewScriptStatsClient(c config) *ScriptStatsClient
NewScriptStatsClient returns a client for the ScriptStats from the given config.
func (*ScriptStatsClient) Create ¶
func (c *ScriptStatsClient) Create() *ScriptStatsCreate
Create returns a builder for creating a ScriptStats entity.
func (*ScriptStatsClient) CreateBulk ¶
func (c *ScriptStatsClient) CreateBulk(builders ...*ScriptStatsCreate) *ScriptStatsCreateBulk
CreateBulk returns a builder for creating a bulk of ScriptStats entities.
func (*ScriptStatsClient) Delete ¶
func (c *ScriptStatsClient) Delete() *ScriptStatsDelete
Delete returns a delete builder for ScriptStats.
func (*ScriptStatsClient) DeleteOne ¶
func (c *ScriptStatsClient) DeleteOne(ss *ScriptStats) *ScriptStatsDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ScriptStatsClient) DeleteOneID ¶
func (c *ScriptStatsClient) DeleteOneID(id int) *ScriptStatsDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ScriptStatsClient) Get ¶
func (c *ScriptStatsClient) Get(ctx context.Context, id int) (*ScriptStats, error)
Get returns a ScriptStats entity by its id.
func (*ScriptStatsClient) GetX ¶
func (c *ScriptStatsClient) GetX(ctx context.Context, id int) *ScriptStats
GetX is like Get, but panics if an error occurs.
func (*ScriptStatsClient) Hooks ¶
func (c *ScriptStatsClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ScriptStatsClient) Intercept ¶
func (c *ScriptStatsClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `scriptstats.Intercept(f(g(h())))`.
func (*ScriptStatsClient) Interceptors ¶
func (c *ScriptStatsClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ScriptStatsClient) Query ¶
func (c *ScriptStatsClient) Query() *ScriptStatsQuery
Query returns a query builder for ScriptStats.
func (*ScriptStatsClient) Update ¶
func (c *ScriptStatsClient) Update() *ScriptStatsUpdate
Update returns an update builder for ScriptStats.
func (*ScriptStatsClient) UpdateOne ¶
func (c *ScriptStatsClient) UpdateOne(ss *ScriptStats) *ScriptStatsUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ScriptStatsClient) UpdateOneID ¶
func (c *ScriptStatsClient) UpdateOneID(id int) *ScriptStatsUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ScriptStatsClient) Use ¶
func (c *ScriptStatsClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `scriptstats.Hooks(f(g(h())))`.
type ScriptStatsCreate ¶
type ScriptStatsCreate struct {
// contains filtered or unexported fields
}
ScriptStatsCreate is the builder for creating a ScriptStats entity.
func (*ScriptStatsCreate) Exec ¶
func (ssc *ScriptStatsCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptStatsCreate) ExecX ¶
func (ssc *ScriptStatsCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptStatsCreate) Mutation ¶
func (ssc *ScriptStatsCreate) Mutation() *ScriptStatsMutation
Mutation returns the ScriptStatsMutation object of the builder.
func (*ScriptStatsCreate) Save ¶
func (ssc *ScriptStatsCreate) Save(ctx context.Context) (*ScriptStats, error)
Save creates the ScriptStats in the database.
func (*ScriptStatsCreate) SaveX ¶
func (ssc *ScriptStatsCreate) SaveX(ctx context.Context) *ScriptStats
SaveX calls Save and panics if Save returns an error.
func (*ScriptStatsCreate) SetAverageRuntime ¶
func (ssc *ScriptStatsCreate) SetAverageRuntime(i int) *ScriptStatsCreate
SetAverageRuntime sets the "average_runtime" field.
func (*ScriptStatsCreate) SetLastRun ¶
func (ssc *ScriptStatsCreate) SetLastRun(t time.Time) *ScriptStatsCreate
SetLastRun sets the "last_run" field.
func (*ScriptStatsCreate) SetMaxRuntime ¶
func (ssc *ScriptStatsCreate) SetMaxRuntime(i int) *ScriptStatsCreate
SetMaxRuntime sets the "max_runtime" field.
func (*ScriptStatsCreate) SetMinRuntime ¶
func (ssc *ScriptStatsCreate) SetMinRuntime(i int) *ScriptStatsCreate
SetMinRuntime sets the "min_runtime" field.
func (*ScriptStatsCreate) SetProjectID ¶
func (ssc *ScriptStatsCreate) SetProjectID(i int) *ScriptStatsCreate
SetProjectID sets the "project_id" field.
func (*ScriptStatsCreate) SetScriptID ¶
func (ssc *ScriptStatsCreate) SetScriptID(i int) *ScriptStatsCreate
SetScriptID sets the "script_id" field.
func (*ScriptStatsCreate) SetSuccessRate ¶
func (ssc *ScriptStatsCreate) SetSuccessRate(i int) *ScriptStatsCreate
SetSuccessRate sets the "success_rate" field.
func (*ScriptStatsCreate) SetTotalErrors ¶
func (ssc *ScriptStatsCreate) SetTotalErrors(i int) *ScriptStatsCreate
SetTotalErrors sets the "total_errors" field.
func (*ScriptStatsCreate) SetTotalRuns ¶
func (ssc *ScriptStatsCreate) SetTotalRuns(i int) *ScriptStatsCreate
SetTotalRuns sets the "total_runs" field.
func (*ScriptStatsCreate) SetTotalRuntime ¶
func (ssc *ScriptStatsCreate) SetTotalRuntime(i int) *ScriptStatsCreate
SetTotalRuntime sets the "total_runtime" field.
func (*ScriptStatsCreate) SetTotalSuccess ¶
func (ssc *ScriptStatsCreate) SetTotalSuccess(i int) *ScriptStatsCreate
SetTotalSuccess sets the "total_success" field.
type ScriptStatsCreateBulk ¶
type ScriptStatsCreateBulk struct {
// contains filtered or unexported fields
}
ScriptStatsCreateBulk is the builder for creating many ScriptStats entities in bulk.
func (*ScriptStatsCreateBulk) Exec ¶
func (sscb *ScriptStatsCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptStatsCreateBulk) ExecX ¶
func (sscb *ScriptStatsCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptStatsCreateBulk) Save ¶
func (sscb *ScriptStatsCreateBulk) Save(ctx context.Context) ([]*ScriptStats, error)
Save creates the ScriptStats entities in the database.
func (*ScriptStatsCreateBulk) SaveX ¶
func (sscb *ScriptStatsCreateBulk) SaveX(ctx context.Context) []*ScriptStats
SaveX is like Save, but panics if an error occurs.
type ScriptStatsDelete ¶
type ScriptStatsDelete struct {
// contains filtered or unexported fields
}
ScriptStatsDelete is the builder for deleting a ScriptStats entity.
func (*ScriptStatsDelete) Exec ¶
func (ssd *ScriptStatsDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ScriptStatsDelete) ExecX ¶
func (ssd *ScriptStatsDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ScriptStatsDelete) Where ¶
func (ssd *ScriptStatsDelete) Where(ps ...predicate.ScriptStats) *ScriptStatsDelete
Where appends a list predicates to the ScriptStatsDelete builder.
type ScriptStatsDeleteOne ¶
type ScriptStatsDeleteOne struct {
// contains filtered or unexported fields
}
ScriptStatsDeleteOne is the builder for deleting a single ScriptStats entity.
func (*ScriptStatsDeleteOne) Exec ¶
func (ssdo *ScriptStatsDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ScriptStatsDeleteOne) ExecX ¶
func (ssdo *ScriptStatsDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptStatsDeleteOne) Where ¶
func (ssdo *ScriptStatsDeleteOne) Where(ps ...predicate.ScriptStats) *ScriptStatsDeleteOne
Where appends a list predicates to the ScriptStatsDelete builder.
type ScriptStatsGroupBy ¶
type ScriptStatsGroupBy struct {
// contains filtered or unexported fields
}
ScriptStatsGroupBy is the group-by builder for ScriptStats entities.
func (*ScriptStatsGroupBy) Aggregate ¶
func (ssgb *ScriptStatsGroupBy) Aggregate(fns ...AggregateFunc) *ScriptStatsGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ScriptStatsGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptStatsGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptStatsGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptStatsGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptStatsGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptStatsGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptStatsGroupBy) Scan ¶
func (ssgb *ScriptStatsGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptStatsGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScriptStatsMutation ¶
type ScriptStatsMutation struct {
// contains filtered or unexported fields
}
ScriptStatsMutation represents an operation that mutates the ScriptStats nodes in the graph.
func (*ScriptStatsMutation) AddAverageRuntime ¶
func (m *ScriptStatsMutation) AddAverageRuntime(i int)
AddAverageRuntime adds i to the "average_runtime" field.
func (*ScriptStatsMutation) AddField ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) AddMaxRuntime ¶
func (m *ScriptStatsMutation) AddMaxRuntime(i int)
AddMaxRuntime adds i to the "max_runtime" field.
func (*ScriptStatsMutation) AddMinRuntime ¶
func (m *ScriptStatsMutation) AddMinRuntime(i int)
AddMinRuntime adds i to the "min_runtime" field.
func (*ScriptStatsMutation) AddProjectID ¶
func (m *ScriptStatsMutation) AddProjectID(i int)
AddProjectID adds i to the "project_id" field.
func (*ScriptStatsMutation) AddScriptID ¶
func (m *ScriptStatsMutation) AddScriptID(i int)
AddScriptID adds i to the "script_id" field.
func (*ScriptStatsMutation) AddSuccessRate ¶
func (m *ScriptStatsMutation) AddSuccessRate(i int)
AddSuccessRate adds i to the "success_rate" field.
func (*ScriptStatsMutation) AddTotalErrors ¶
func (m *ScriptStatsMutation) AddTotalErrors(i int)
AddTotalErrors adds i to the "total_errors" field.
func (*ScriptStatsMutation) AddTotalRuns ¶
func (m *ScriptStatsMutation) AddTotalRuns(i int)
AddTotalRuns adds i to the "total_runs" field.
func (*ScriptStatsMutation) AddTotalRuntime ¶
func (m *ScriptStatsMutation) AddTotalRuntime(i int)
AddTotalRuntime adds i to the "total_runtime" field.
func (*ScriptStatsMutation) AddTotalSuccess ¶
func (m *ScriptStatsMutation) AddTotalSuccess(i int)
AddTotalSuccess adds i to the "total_success" field.
func (*ScriptStatsMutation) AddedAverageRuntime ¶
func (m *ScriptStatsMutation) AddedAverageRuntime() (r int, exists bool)
AddedAverageRuntime returns the value that was added to the "average_runtime" field in this mutation.
func (*ScriptStatsMutation) AddedEdges ¶
func (m *ScriptStatsMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ScriptStatsMutation) AddedField ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) AddedFields ¶
func (m *ScriptStatsMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ScriptStatsMutation) AddedIDs ¶
func (m *ScriptStatsMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ScriptStatsMutation) AddedMaxRuntime ¶
func (m *ScriptStatsMutation) AddedMaxRuntime() (r int, exists bool)
AddedMaxRuntime returns the value that was added to the "max_runtime" field in this mutation.
func (*ScriptStatsMutation) AddedMinRuntime ¶
func (m *ScriptStatsMutation) AddedMinRuntime() (r int, exists bool)
AddedMinRuntime returns the value that was added to the "min_runtime" field in this mutation.
func (*ScriptStatsMutation) AddedProjectID ¶
func (m *ScriptStatsMutation) AddedProjectID() (r int, exists bool)
AddedProjectID returns the value that was added to the "project_id" field in this mutation.
func (*ScriptStatsMutation) AddedScriptID ¶
func (m *ScriptStatsMutation) AddedScriptID() (r int, exists bool)
AddedScriptID returns the value that was added to the "script_id" field in this mutation.
func (*ScriptStatsMutation) AddedSuccessRate ¶
func (m *ScriptStatsMutation) AddedSuccessRate() (r int, exists bool)
AddedSuccessRate returns the value that was added to the "success_rate" field in this mutation.
func (*ScriptStatsMutation) AddedTotalErrors ¶
func (m *ScriptStatsMutation) AddedTotalErrors() (r int, exists bool)
AddedTotalErrors returns the value that was added to the "total_errors" field in this mutation.
func (*ScriptStatsMutation) AddedTotalRuns ¶
func (m *ScriptStatsMutation) AddedTotalRuns() (r int, exists bool)
AddedTotalRuns returns the value that was added to the "total_runs" field in this mutation.
func (*ScriptStatsMutation) AddedTotalRuntime ¶
func (m *ScriptStatsMutation) AddedTotalRuntime() (r int, exists bool)
AddedTotalRuntime returns the value that was added to the "total_runtime" field in this mutation.
func (*ScriptStatsMutation) AddedTotalSuccess ¶
func (m *ScriptStatsMutation) AddedTotalSuccess() (r int, exists bool)
AddedTotalSuccess returns the value that was added to the "total_success" field in this mutation.
func (*ScriptStatsMutation) AverageRuntime ¶
func (m *ScriptStatsMutation) AverageRuntime() (r int, exists bool)
AverageRuntime returns the value of the "average_runtime" field in the mutation.
func (*ScriptStatsMutation) ClearEdge ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) ClearField ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) ClearedEdges ¶
func (m *ScriptStatsMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ScriptStatsMutation) ClearedFields ¶
func (m *ScriptStatsMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ScriptStatsMutation) Client ¶
func (m ScriptStatsMutation) 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 (*ScriptStatsMutation) EdgeCleared ¶
func (m *ScriptStatsMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ScriptStatsMutation) Field ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) FieldCleared ¶
func (m *ScriptStatsMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ScriptStatsMutation) Fields ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) ID ¶
func (m *ScriptStatsMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*ScriptStatsMutation) IDs ¶
func (m *ScriptStatsMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*ScriptStatsMutation) LastRun ¶
func (m *ScriptStatsMutation) LastRun() (r time.Time, exists bool)
LastRun returns the value of the "last_run" field in the mutation.
func (*ScriptStatsMutation) MaxRuntime ¶
func (m *ScriptStatsMutation) MaxRuntime() (r int, exists bool)
MaxRuntime returns the value of the "max_runtime" field in the mutation.
func (*ScriptStatsMutation) MinRuntime ¶
func (m *ScriptStatsMutation) MinRuntime() (r int, exists bool)
MinRuntime returns the value of the "min_runtime" field in the mutation.
func (*ScriptStatsMutation) OldAverageRuntime ¶
func (m *ScriptStatsMutation) OldAverageRuntime(ctx context.Context) (v int, err error)
OldAverageRuntime returns the old "average_runtime" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) 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 (*ScriptStatsMutation) OldLastRun ¶
OldLastRun returns the old "last_run" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldMaxRuntime ¶
func (m *ScriptStatsMutation) OldMaxRuntime(ctx context.Context) (v int, err error)
OldMaxRuntime returns the old "max_runtime" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldMinRuntime ¶
func (m *ScriptStatsMutation) OldMinRuntime(ctx context.Context) (v int, err error)
OldMinRuntime returns the old "min_runtime" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldProjectID ¶
func (m *ScriptStatsMutation) OldProjectID(ctx context.Context) (v int, err error)
OldProjectID returns the old "project_id" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldScriptID ¶
func (m *ScriptStatsMutation) OldScriptID(ctx context.Context) (v int, err error)
OldScriptID returns the old "script_id" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldSuccessRate ¶
func (m *ScriptStatsMutation) OldSuccessRate(ctx context.Context) (v int, err error)
OldSuccessRate returns the old "success_rate" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldTotalErrors ¶
func (m *ScriptStatsMutation) OldTotalErrors(ctx context.Context) (v int, err error)
OldTotalErrors returns the old "total_errors" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldTotalRuns ¶
func (m *ScriptStatsMutation) OldTotalRuns(ctx context.Context) (v int, err error)
OldTotalRuns returns the old "total_runs" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldTotalRuntime ¶
func (m *ScriptStatsMutation) OldTotalRuntime(ctx context.Context) (v int, err error)
OldTotalRuntime returns the old "total_runtime" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) OldTotalSuccess ¶
func (m *ScriptStatsMutation) OldTotalSuccess(ctx context.Context) (v int, err error)
OldTotalSuccess returns the old "total_success" field's value of the ScriptStats entity. If the ScriptStats 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 (*ScriptStatsMutation) Op ¶
func (m *ScriptStatsMutation) Op() Op
Op returns the operation name.
func (*ScriptStatsMutation) ProjectID ¶
func (m *ScriptStatsMutation) ProjectID() (r int, exists bool)
ProjectID returns the value of the "project_id" field in the mutation.
func (*ScriptStatsMutation) RemovedEdges ¶
func (m *ScriptStatsMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ScriptStatsMutation) RemovedIDs ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) ResetAverageRuntime ¶
func (m *ScriptStatsMutation) ResetAverageRuntime()
ResetAverageRuntime resets all changes to the "average_runtime" field.
func (*ScriptStatsMutation) ResetEdge ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) ResetField ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) ResetLastRun ¶
func (m *ScriptStatsMutation) ResetLastRun()
ResetLastRun resets all changes to the "last_run" field.
func (*ScriptStatsMutation) ResetMaxRuntime ¶
func (m *ScriptStatsMutation) ResetMaxRuntime()
ResetMaxRuntime resets all changes to the "max_runtime" field.
func (*ScriptStatsMutation) ResetMinRuntime ¶
func (m *ScriptStatsMutation) ResetMinRuntime()
ResetMinRuntime resets all changes to the "min_runtime" field.
func (*ScriptStatsMutation) ResetProjectID ¶
func (m *ScriptStatsMutation) ResetProjectID()
ResetProjectID resets all changes to the "project_id" field.
func (*ScriptStatsMutation) ResetScriptID ¶
func (m *ScriptStatsMutation) ResetScriptID()
ResetScriptID resets all changes to the "script_id" field.
func (*ScriptStatsMutation) ResetSuccessRate ¶
func (m *ScriptStatsMutation) ResetSuccessRate()
ResetSuccessRate resets all changes to the "success_rate" field.
func (*ScriptStatsMutation) ResetTotalErrors ¶
func (m *ScriptStatsMutation) ResetTotalErrors()
ResetTotalErrors resets all changes to the "total_errors" field.
func (*ScriptStatsMutation) ResetTotalRuns ¶
func (m *ScriptStatsMutation) ResetTotalRuns()
ResetTotalRuns resets all changes to the "total_runs" field.
func (*ScriptStatsMutation) ResetTotalRuntime ¶
func (m *ScriptStatsMutation) ResetTotalRuntime()
ResetTotalRuntime resets all changes to the "total_runtime" field.
func (*ScriptStatsMutation) ResetTotalSuccess ¶
func (m *ScriptStatsMutation) ResetTotalSuccess()
ResetTotalSuccess resets all changes to the "total_success" field.
func (*ScriptStatsMutation) ScriptID ¶
func (m *ScriptStatsMutation) ScriptID() (r int, exists bool)
ScriptID returns the value of the "script_id" field in the mutation.
func (*ScriptStatsMutation) SetAverageRuntime ¶
func (m *ScriptStatsMutation) SetAverageRuntime(i int)
SetAverageRuntime sets the "average_runtime" field.
func (*ScriptStatsMutation) SetField ¶
func (m *ScriptStatsMutation) 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 (*ScriptStatsMutation) SetLastRun ¶
func (m *ScriptStatsMutation) SetLastRun(t time.Time)
SetLastRun sets the "last_run" field.
func (*ScriptStatsMutation) SetMaxRuntime ¶
func (m *ScriptStatsMutation) SetMaxRuntime(i int)
SetMaxRuntime sets the "max_runtime" field.
func (*ScriptStatsMutation) SetMinRuntime ¶
func (m *ScriptStatsMutation) SetMinRuntime(i int)
SetMinRuntime sets the "min_runtime" field.
func (*ScriptStatsMutation) SetOp ¶
func (m *ScriptStatsMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ScriptStatsMutation) SetProjectID ¶
func (m *ScriptStatsMutation) SetProjectID(i int)
SetProjectID sets the "project_id" field.
func (*ScriptStatsMutation) SetScriptID ¶
func (m *ScriptStatsMutation) SetScriptID(i int)
SetScriptID sets the "script_id" field.
func (*ScriptStatsMutation) SetSuccessRate ¶
func (m *ScriptStatsMutation) SetSuccessRate(i int)
SetSuccessRate sets the "success_rate" field.
func (*ScriptStatsMutation) SetTotalErrors ¶
func (m *ScriptStatsMutation) SetTotalErrors(i int)
SetTotalErrors sets the "total_errors" field.
func (*ScriptStatsMutation) SetTotalRuns ¶
func (m *ScriptStatsMutation) SetTotalRuns(i int)
SetTotalRuns sets the "total_runs" field.
func (*ScriptStatsMutation) SetTotalRuntime ¶
func (m *ScriptStatsMutation) SetTotalRuntime(i int)
SetTotalRuntime sets the "total_runtime" field.
func (*ScriptStatsMutation) SetTotalSuccess ¶
func (m *ScriptStatsMutation) SetTotalSuccess(i int)
SetTotalSuccess sets the "total_success" field.
func (*ScriptStatsMutation) SuccessRate ¶
func (m *ScriptStatsMutation) SuccessRate() (r int, exists bool)
SuccessRate returns the value of the "success_rate" field in the mutation.
func (*ScriptStatsMutation) TotalErrors ¶
func (m *ScriptStatsMutation) TotalErrors() (r int, exists bool)
TotalErrors returns the value of the "total_errors" field in the mutation.
func (*ScriptStatsMutation) TotalRuns ¶
func (m *ScriptStatsMutation) TotalRuns() (r int, exists bool)
TotalRuns returns the value of the "total_runs" field in the mutation.
func (*ScriptStatsMutation) TotalRuntime ¶
func (m *ScriptStatsMutation) TotalRuntime() (r int, exists bool)
TotalRuntime returns the value of the "total_runtime" field in the mutation.
func (*ScriptStatsMutation) TotalSuccess ¶
func (m *ScriptStatsMutation) TotalSuccess() (r int, exists bool)
TotalSuccess returns the value of the "total_success" field in the mutation.
func (ScriptStatsMutation) Tx ¶
func (m ScriptStatsMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ScriptStatsMutation) Type ¶
func (m *ScriptStatsMutation) Type() string
Type returns the node type of this mutation (ScriptStats).
func (*ScriptStatsMutation) Where ¶
func (m *ScriptStatsMutation) Where(ps ...predicate.ScriptStats)
Where appends a list predicates to the ScriptStatsMutation builder.
func (*ScriptStatsMutation) WhereP ¶
func (m *ScriptStatsMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ScriptStatsMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ScriptStatsQuery ¶
type ScriptStatsQuery struct {
// contains filtered or unexported fields
}
ScriptStatsQuery is the builder for querying ScriptStats entities.
func (*ScriptStatsQuery) Aggregate ¶
func (ssq *ScriptStatsQuery) Aggregate(fns ...AggregateFunc) *ScriptStatsSelect
Aggregate returns a ScriptStatsSelect configured with the given aggregations.
func (*ScriptStatsQuery) All ¶
func (ssq *ScriptStatsQuery) All(ctx context.Context) ([]*ScriptStats, error)
All executes the query and returns a list of ScriptStatsSlice.
func (*ScriptStatsQuery) AllX ¶
func (ssq *ScriptStatsQuery) AllX(ctx context.Context) []*ScriptStats
AllX is like All, but panics if an error occurs.
func (*ScriptStatsQuery) Clone ¶
func (ssq *ScriptStatsQuery) Clone() *ScriptStatsQuery
Clone returns a duplicate of the ScriptStatsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ScriptStatsQuery) Count ¶
func (ssq *ScriptStatsQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ScriptStatsQuery) CountX ¶
func (ssq *ScriptStatsQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ScriptStatsQuery) Exist ¶
func (ssq *ScriptStatsQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ScriptStatsQuery) ExistX ¶
func (ssq *ScriptStatsQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ScriptStatsQuery) First ¶
func (ssq *ScriptStatsQuery) First(ctx context.Context) (*ScriptStats, error)
First returns the first ScriptStats entity from the query. Returns a *NotFoundError when no ScriptStats was found.
func (*ScriptStatsQuery) FirstID ¶
func (ssq *ScriptStatsQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first ScriptStats ID from the query. Returns a *NotFoundError when no ScriptStats ID was found.
func (*ScriptStatsQuery) FirstIDX ¶
func (ssq *ScriptStatsQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ScriptStatsQuery) FirstX ¶
func (ssq *ScriptStatsQuery) FirstX(ctx context.Context) *ScriptStats
FirstX is like First, but panics if an error occurs.
func (*ScriptStatsQuery) GroupBy ¶
func (ssq *ScriptStatsQuery) GroupBy(field string, fields ...string) *ScriptStatsGroupBy
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 { ScriptID int `json:"script_id,omitempty"` Count int `json:"count,omitempty"` } client.ScriptStats.Query(). GroupBy(scriptstats.FieldScriptID). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ScriptStatsQuery) IDs ¶
func (ssq *ScriptStatsQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of ScriptStats IDs.
func (*ScriptStatsQuery) IDsX ¶
func (ssq *ScriptStatsQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ScriptStatsQuery) Limit ¶
func (ssq *ScriptStatsQuery) Limit(limit int) *ScriptStatsQuery
Limit the number of records to be returned by this query.
func (*ScriptStatsQuery) Offset ¶
func (ssq *ScriptStatsQuery) Offset(offset int) *ScriptStatsQuery
Offset to start from.
func (*ScriptStatsQuery) Only ¶
func (ssq *ScriptStatsQuery) Only(ctx context.Context) (*ScriptStats, error)
Only returns a single ScriptStats entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ScriptStats entity is found. Returns a *NotFoundError when no ScriptStats entities are found.
func (*ScriptStatsQuery) OnlyID ¶
func (ssq *ScriptStatsQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only ScriptStats ID in the query. Returns a *NotSingularError when more than one ScriptStats ID is found. Returns a *NotFoundError when no entities are found.
func (*ScriptStatsQuery) OnlyIDX ¶
func (ssq *ScriptStatsQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ScriptStatsQuery) OnlyX ¶
func (ssq *ScriptStatsQuery) OnlyX(ctx context.Context) *ScriptStats
OnlyX is like Only, but panics if an error occurs.
func (*ScriptStatsQuery) Order ¶
func (ssq *ScriptStatsQuery) Order(o ...scriptstats.OrderOption) *ScriptStatsQuery
Order specifies how the records should be ordered.
func (*ScriptStatsQuery) Select ¶
func (ssq *ScriptStatsQuery) Select(fields ...string) *ScriptStatsSelect
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 { ScriptID int `json:"script_id,omitempty"` } client.ScriptStats.Query(). Select(scriptstats.FieldScriptID). Scan(ctx, &v)
func (*ScriptStatsQuery) Unique ¶
func (ssq *ScriptStatsQuery) Unique(unique bool) *ScriptStatsQuery
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 (*ScriptStatsQuery) Where ¶
func (ssq *ScriptStatsQuery) Where(ps ...predicate.ScriptStats) *ScriptStatsQuery
Where adds a new predicate for the ScriptStatsQuery builder.
type ScriptStatsSelect ¶
type ScriptStatsSelect struct { *ScriptStatsQuery // contains filtered or unexported fields }
ScriptStatsSelect is the builder for selecting fields of ScriptStats entities.
func (*ScriptStatsSelect) Aggregate ¶
func (sss *ScriptStatsSelect) Aggregate(fns ...AggregateFunc) *ScriptStatsSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ScriptStatsSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ScriptStatsSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ScriptStatsSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ScriptStatsSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ScriptStatsSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ScriptStatsSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ScriptStatsSelect) Scan ¶
func (sss *ScriptStatsSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ScriptStatsSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ScriptStatsSlice ¶
type ScriptStatsSlice []*ScriptStats
ScriptStatsSlice is a parsable slice of ScriptStats.
type ScriptStatsUpdate ¶
type ScriptStatsUpdate struct {
// contains filtered or unexported fields
}
ScriptStatsUpdate is the builder for updating ScriptStats entities.
func (*ScriptStatsUpdate) AddAverageRuntime ¶
func (ssu *ScriptStatsUpdate) AddAverageRuntime(i int) *ScriptStatsUpdate
AddAverageRuntime adds i to the "average_runtime" field.
func (*ScriptStatsUpdate) AddMaxRuntime ¶
func (ssu *ScriptStatsUpdate) AddMaxRuntime(i int) *ScriptStatsUpdate
AddMaxRuntime adds i to the "max_runtime" field.
func (*ScriptStatsUpdate) AddMinRuntime ¶
func (ssu *ScriptStatsUpdate) AddMinRuntime(i int) *ScriptStatsUpdate
AddMinRuntime adds i to the "min_runtime" field.
func (*ScriptStatsUpdate) AddProjectID ¶
func (ssu *ScriptStatsUpdate) AddProjectID(i int) *ScriptStatsUpdate
AddProjectID adds i to the "project_id" field.
func (*ScriptStatsUpdate) AddScriptID ¶
func (ssu *ScriptStatsUpdate) AddScriptID(i int) *ScriptStatsUpdate
AddScriptID adds i to the "script_id" field.
func (*ScriptStatsUpdate) AddSuccessRate ¶
func (ssu *ScriptStatsUpdate) AddSuccessRate(i int) *ScriptStatsUpdate
AddSuccessRate adds i to the "success_rate" field.
func (*ScriptStatsUpdate) AddTotalErrors ¶
func (ssu *ScriptStatsUpdate) AddTotalErrors(i int) *ScriptStatsUpdate
AddTotalErrors adds i to the "total_errors" field.
func (*ScriptStatsUpdate) AddTotalRuns ¶
func (ssu *ScriptStatsUpdate) AddTotalRuns(i int) *ScriptStatsUpdate
AddTotalRuns adds i to the "total_runs" field.
func (*ScriptStatsUpdate) AddTotalRuntime ¶
func (ssu *ScriptStatsUpdate) AddTotalRuntime(i int) *ScriptStatsUpdate
AddTotalRuntime adds i to the "total_runtime" field.
func (*ScriptStatsUpdate) AddTotalSuccess ¶
func (ssu *ScriptStatsUpdate) AddTotalSuccess(i int) *ScriptStatsUpdate
AddTotalSuccess adds i to the "total_success" field.
func (*ScriptStatsUpdate) Exec ¶
func (ssu *ScriptStatsUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptStatsUpdate) ExecX ¶
func (ssu *ScriptStatsUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptStatsUpdate) Mutation ¶
func (ssu *ScriptStatsUpdate) Mutation() *ScriptStatsMutation
Mutation returns the ScriptStatsMutation object of the builder.
func (*ScriptStatsUpdate) Save ¶
func (ssu *ScriptStatsUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScriptStatsUpdate) SaveX ¶
func (ssu *ScriptStatsUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScriptStatsUpdate) SetAverageRuntime ¶
func (ssu *ScriptStatsUpdate) SetAverageRuntime(i int) *ScriptStatsUpdate
SetAverageRuntime sets the "average_runtime" field.
func (*ScriptStatsUpdate) SetLastRun ¶
func (ssu *ScriptStatsUpdate) SetLastRun(t time.Time) *ScriptStatsUpdate
SetLastRun sets the "last_run" field.
func (*ScriptStatsUpdate) SetMaxRuntime ¶
func (ssu *ScriptStatsUpdate) SetMaxRuntime(i int) *ScriptStatsUpdate
SetMaxRuntime sets the "max_runtime" field.
func (*ScriptStatsUpdate) SetMinRuntime ¶
func (ssu *ScriptStatsUpdate) SetMinRuntime(i int) *ScriptStatsUpdate
SetMinRuntime sets the "min_runtime" field.
func (*ScriptStatsUpdate) SetProjectID ¶
func (ssu *ScriptStatsUpdate) SetProjectID(i int) *ScriptStatsUpdate
SetProjectID sets the "project_id" field.
func (*ScriptStatsUpdate) SetScriptID ¶
func (ssu *ScriptStatsUpdate) SetScriptID(i int) *ScriptStatsUpdate
SetScriptID sets the "script_id" field.
func (*ScriptStatsUpdate) SetSuccessRate ¶
func (ssu *ScriptStatsUpdate) SetSuccessRate(i int) *ScriptStatsUpdate
SetSuccessRate sets the "success_rate" field.
func (*ScriptStatsUpdate) SetTotalErrors ¶
func (ssu *ScriptStatsUpdate) SetTotalErrors(i int) *ScriptStatsUpdate
SetTotalErrors sets the "total_errors" field.
func (*ScriptStatsUpdate) SetTotalRuns ¶
func (ssu *ScriptStatsUpdate) SetTotalRuns(i int) *ScriptStatsUpdate
SetTotalRuns sets the "total_runs" field.
func (*ScriptStatsUpdate) SetTotalRuntime ¶
func (ssu *ScriptStatsUpdate) SetTotalRuntime(i int) *ScriptStatsUpdate
SetTotalRuntime sets the "total_runtime" field.
func (*ScriptStatsUpdate) SetTotalSuccess ¶
func (ssu *ScriptStatsUpdate) SetTotalSuccess(i int) *ScriptStatsUpdate
SetTotalSuccess sets the "total_success" field.
func (*ScriptStatsUpdate) Where ¶
func (ssu *ScriptStatsUpdate) Where(ps ...predicate.ScriptStats) *ScriptStatsUpdate
Where appends a list predicates to the ScriptStatsUpdate builder.
type ScriptStatsUpdateOne ¶
type ScriptStatsUpdateOne struct {
// contains filtered or unexported fields
}
ScriptStatsUpdateOne is the builder for updating a single ScriptStats entity.
func (*ScriptStatsUpdateOne) AddAverageRuntime ¶
func (ssuo *ScriptStatsUpdateOne) AddAverageRuntime(i int) *ScriptStatsUpdateOne
AddAverageRuntime adds i to the "average_runtime" field.
func (*ScriptStatsUpdateOne) AddMaxRuntime ¶
func (ssuo *ScriptStatsUpdateOne) AddMaxRuntime(i int) *ScriptStatsUpdateOne
AddMaxRuntime adds i to the "max_runtime" field.
func (*ScriptStatsUpdateOne) AddMinRuntime ¶
func (ssuo *ScriptStatsUpdateOne) AddMinRuntime(i int) *ScriptStatsUpdateOne
AddMinRuntime adds i to the "min_runtime" field.
func (*ScriptStatsUpdateOne) AddProjectID ¶
func (ssuo *ScriptStatsUpdateOne) AddProjectID(i int) *ScriptStatsUpdateOne
AddProjectID adds i to the "project_id" field.
func (*ScriptStatsUpdateOne) AddScriptID ¶
func (ssuo *ScriptStatsUpdateOne) AddScriptID(i int) *ScriptStatsUpdateOne
AddScriptID adds i to the "script_id" field.
func (*ScriptStatsUpdateOne) AddSuccessRate ¶
func (ssuo *ScriptStatsUpdateOne) AddSuccessRate(i int) *ScriptStatsUpdateOne
AddSuccessRate adds i to the "success_rate" field.
func (*ScriptStatsUpdateOne) AddTotalErrors ¶
func (ssuo *ScriptStatsUpdateOne) AddTotalErrors(i int) *ScriptStatsUpdateOne
AddTotalErrors adds i to the "total_errors" field.
func (*ScriptStatsUpdateOne) AddTotalRuns ¶
func (ssuo *ScriptStatsUpdateOne) AddTotalRuns(i int) *ScriptStatsUpdateOne
AddTotalRuns adds i to the "total_runs" field.
func (*ScriptStatsUpdateOne) AddTotalRuntime ¶
func (ssuo *ScriptStatsUpdateOne) AddTotalRuntime(i int) *ScriptStatsUpdateOne
AddTotalRuntime adds i to the "total_runtime" field.
func (*ScriptStatsUpdateOne) AddTotalSuccess ¶
func (ssuo *ScriptStatsUpdateOne) AddTotalSuccess(i int) *ScriptStatsUpdateOne
AddTotalSuccess adds i to the "total_success" field.
func (*ScriptStatsUpdateOne) Exec ¶
func (ssuo *ScriptStatsUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScriptStatsUpdateOne) ExecX ¶
func (ssuo *ScriptStatsUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptStatsUpdateOne) Mutation ¶
func (ssuo *ScriptStatsUpdateOne) Mutation() *ScriptStatsMutation
Mutation returns the ScriptStatsMutation object of the builder.
func (*ScriptStatsUpdateOne) Save ¶
func (ssuo *ScriptStatsUpdateOne) Save(ctx context.Context) (*ScriptStats, error)
Save executes the query and returns the updated ScriptStats entity.
func (*ScriptStatsUpdateOne) SaveX ¶
func (ssuo *ScriptStatsUpdateOne) SaveX(ctx context.Context) *ScriptStats
SaveX is like Save, but panics if an error occurs.
func (*ScriptStatsUpdateOne) Select ¶
func (ssuo *ScriptStatsUpdateOne) Select(field string, fields ...string) *ScriptStatsUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScriptStatsUpdateOne) SetAverageRuntime ¶
func (ssuo *ScriptStatsUpdateOne) SetAverageRuntime(i int) *ScriptStatsUpdateOne
SetAverageRuntime sets the "average_runtime" field.
func (*ScriptStatsUpdateOne) SetLastRun ¶
func (ssuo *ScriptStatsUpdateOne) SetLastRun(t time.Time) *ScriptStatsUpdateOne
SetLastRun sets the "last_run" field.
func (*ScriptStatsUpdateOne) SetMaxRuntime ¶
func (ssuo *ScriptStatsUpdateOne) SetMaxRuntime(i int) *ScriptStatsUpdateOne
SetMaxRuntime sets the "max_runtime" field.
func (*ScriptStatsUpdateOne) SetMinRuntime ¶
func (ssuo *ScriptStatsUpdateOne) SetMinRuntime(i int) *ScriptStatsUpdateOne
SetMinRuntime sets the "min_runtime" field.
func (*ScriptStatsUpdateOne) SetProjectID ¶
func (ssuo *ScriptStatsUpdateOne) SetProjectID(i int) *ScriptStatsUpdateOne
SetProjectID sets the "project_id" field.
func (*ScriptStatsUpdateOne) SetScriptID ¶
func (ssuo *ScriptStatsUpdateOne) SetScriptID(i int) *ScriptStatsUpdateOne
SetScriptID sets the "script_id" field.
func (*ScriptStatsUpdateOne) SetSuccessRate ¶
func (ssuo *ScriptStatsUpdateOne) SetSuccessRate(i int) *ScriptStatsUpdateOne
SetSuccessRate sets the "success_rate" field.
func (*ScriptStatsUpdateOne) SetTotalErrors ¶
func (ssuo *ScriptStatsUpdateOne) SetTotalErrors(i int) *ScriptStatsUpdateOne
SetTotalErrors sets the "total_errors" field.
func (*ScriptStatsUpdateOne) SetTotalRuns ¶
func (ssuo *ScriptStatsUpdateOne) SetTotalRuns(i int) *ScriptStatsUpdateOne
SetTotalRuns sets the "total_runs" field.
func (*ScriptStatsUpdateOne) SetTotalRuntime ¶
func (ssuo *ScriptStatsUpdateOne) SetTotalRuntime(i int) *ScriptStatsUpdateOne
SetTotalRuntime sets the "total_runtime" field.
func (*ScriptStatsUpdateOne) SetTotalSuccess ¶
func (ssuo *ScriptStatsUpdateOne) SetTotalSuccess(i int) *ScriptStatsUpdateOne
SetTotalSuccess sets the "total_success" field.
func (*ScriptStatsUpdateOne) Where ¶
func (ssuo *ScriptStatsUpdateOne) Where(ps ...predicate.ScriptStats) *ScriptStatsUpdateOne
Where appends a list predicates to the ScriptStatsUpdate builder.
type ScriptUpdate ¶
type ScriptUpdate struct {
// contains filtered or unexported fields
}
ScriptUpdate is the builder for updating Script entities.
func (*ScriptUpdate) AddFailureNotificationChannelID ¶
func (su *ScriptUpdate) AddFailureNotificationChannelID(i int) *ScriptUpdate
AddFailureNotificationChannelID adds i to the "failure_notification_channel_id" field.
func (*ScriptUpdate) AddProjectID ¶
func (su *ScriptUpdate) AddProjectID(i int) *ScriptUpdate
AddProjectID adds i to the "project_id" field.
func (*ScriptUpdate) AddSuccessNotificationChannelID ¶
func (su *ScriptUpdate) AddSuccessNotificationChannelID(i int) *ScriptUpdate
AddSuccessNotificationChannelID adds i to the "success_notification_channel_id" field.
func (*ScriptUpdate) AddTimeoutSeconds ¶
func (su *ScriptUpdate) AddTimeoutSeconds(i int) *ScriptUpdate
AddTimeoutSeconds adds i to the "timeout_seconds" field.
func (*ScriptUpdate) AppendParameters ¶
func (su *ScriptUpdate) AppendParameters(sio []schema.ScriptInputOptions) *ScriptUpdate
AppendParameters appends sio to the "parameters" field.
func (*ScriptUpdate) ClearDescription ¶
func (su *ScriptUpdate) ClearDescription() *ScriptUpdate
ClearDescription clears the value of the "description" field.
func (*ScriptUpdate) ClearFailureNotificationChannelID ¶
func (su *ScriptUpdate) ClearFailureNotificationChannelID() *ScriptUpdate
ClearFailureNotificationChannelID clears the value of the "failure_notification_channel_id" field.
func (*ScriptUpdate) ClearParameters ¶
func (su *ScriptUpdate) ClearParameters() *ScriptUpdate
ClearParameters clears the value of the "parameters" field.
func (*ScriptUpdate) ClearScheduleCron ¶
func (su *ScriptUpdate) ClearScheduleCron() *ScriptUpdate
ClearScheduleCron clears the value of the "schedule_cron" field.
func (*ScriptUpdate) ClearSuccessNotificationChannelID ¶
func (su *ScriptUpdate) ClearSuccessNotificationChannelID() *ScriptUpdate
ClearSuccessNotificationChannelID clears the value of the "success_notification_channel_id" field.
func (*ScriptUpdate) Exec ¶
func (su *ScriptUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ScriptUpdate) ExecX ¶
func (su *ScriptUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptUpdate) Mutation ¶
func (su *ScriptUpdate) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptUpdate) Save ¶
func (su *ScriptUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ScriptUpdate) SaveX ¶
func (su *ScriptUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ScriptUpdate) SetDescription ¶
func (su *ScriptUpdate) SetDescription(s string) *ScriptUpdate
SetDescription sets the "description" field.
func (*ScriptUpdate) SetFailureNotificationChannelID ¶
func (su *ScriptUpdate) SetFailureNotificationChannelID(i int) *ScriptUpdate
SetFailureNotificationChannelID sets the "failure_notification_channel_id" field.
func (*ScriptUpdate) SetName ¶
func (su *ScriptUpdate) SetName(s string) *ScriptUpdate
SetName sets the "name" field.
func (*ScriptUpdate) SetNillableDescription ¶
func (su *ScriptUpdate) SetNillableDescription(s *string) *ScriptUpdate
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ScriptUpdate) SetNillableFailureNotificationChannelID ¶
func (su *ScriptUpdate) SetNillableFailureNotificationChannelID(i *int) *ScriptUpdate
SetNillableFailureNotificationChannelID sets the "failure_notification_channel_id" field if the given value is not nil.
func (*ScriptUpdate) SetNillableScheduleCron ¶
func (su *ScriptUpdate) SetNillableScheduleCron(s *string) *ScriptUpdate
SetNillableScheduleCron sets the "schedule_cron" field if the given value is not nil.
func (*ScriptUpdate) SetNillableScheduleEnabled ¶
func (su *ScriptUpdate) SetNillableScheduleEnabled(b *bool) *ScriptUpdate
SetNillableScheduleEnabled sets the "schedule_enabled" field if the given value is not nil.
func (*ScriptUpdate) SetNillableSuccessNotificationChannelID ¶
func (su *ScriptUpdate) SetNillableSuccessNotificationChannelID(i *int) *ScriptUpdate
SetNillableSuccessNotificationChannelID sets the "success_notification_channel_id" field if the given value is not nil.
func (*ScriptUpdate) SetNillableTimeoutSeconds ¶
func (su *ScriptUpdate) SetNillableTimeoutSeconds(i *int) *ScriptUpdate
SetNillableTimeoutSeconds sets the "timeout_seconds" field if the given value is not nil.
func (*ScriptUpdate) SetParameters ¶
func (su *ScriptUpdate) SetParameters(sio []schema.ScriptInputOptions) *ScriptUpdate
SetParameters sets the "parameters" field.
func (*ScriptUpdate) SetProjectID ¶
func (su *ScriptUpdate) SetProjectID(i int) *ScriptUpdate
SetProjectID sets the "project_id" field.
func (*ScriptUpdate) SetScheduleCron ¶
func (su *ScriptUpdate) SetScheduleCron(s string) *ScriptUpdate
SetScheduleCron sets the "schedule_cron" field.
func (*ScriptUpdate) SetScheduleEnabled ¶
func (su *ScriptUpdate) SetScheduleEnabled(b bool) *ScriptUpdate
SetScheduleEnabled sets the "schedule_enabled" field.
func (*ScriptUpdate) SetScript ¶
func (su *ScriptUpdate) SetScript(s string) *ScriptUpdate
SetScript sets the "script" field.
func (*ScriptUpdate) SetSuccessNotificationChannelID ¶
func (su *ScriptUpdate) SetSuccessNotificationChannelID(i int) *ScriptUpdate
SetSuccessNotificationChannelID sets the "success_notification_channel_id" field.
func (*ScriptUpdate) SetTimeoutSeconds ¶
func (su *ScriptUpdate) SetTimeoutSeconds(i int) *ScriptUpdate
SetTimeoutSeconds sets the "timeout_seconds" field.
func (*ScriptUpdate) SetUpdatedAt ¶
func (su *ScriptUpdate) SetUpdatedAt(t time.Time) *ScriptUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ScriptUpdate) Where ¶
func (su *ScriptUpdate) Where(ps ...predicate.Script) *ScriptUpdate
Where appends a list predicates to the ScriptUpdate builder.
type ScriptUpdateOne ¶
type ScriptUpdateOne struct {
// contains filtered or unexported fields
}
ScriptUpdateOne is the builder for updating a single Script entity.
func (*ScriptUpdateOne) AddFailureNotificationChannelID ¶
func (suo *ScriptUpdateOne) AddFailureNotificationChannelID(i int) *ScriptUpdateOne
AddFailureNotificationChannelID adds i to the "failure_notification_channel_id" field.
func (*ScriptUpdateOne) AddProjectID ¶
func (suo *ScriptUpdateOne) AddProjectID(i int) *ScriptUpdateOne
AddProjectID adds i to the "project_id" field.
func (*ScriptUpdateOne) AddSuccessNotificationChannelID ¶
func (suo *ScriptUpdateOne) AddSuccessNotificationChannelID(i int) *ScriptUpdateOne
AddSuccessNotificationChannelID adds i to the "success_notification_channel_id" field.
func (*ScriptUpdateOne) AddTimeoutSeconds ¶
func (suo *ScriptUpdateOne) AddTimeoutSeconds(i int) *ScriptUpdateOne
AddTimeoutSeconds adds i to the "timeout_seconds" field.
func (*ScriptUpdateOne) AppendParameters ¶
func (suo *ScriptUpdateOne) AppendParameters(sio []schema.ScriptInputOptions) *ScriptUpdateOne
AppendParameters appends sio to the "parameters" field.
func (*ScriptUpdateOne) ClearDescription ¶
func (suo *ScriptUpdateOne) ClearDescription() *ScriptUpdateOne
ClearDescription clears the value of the "description" field.
func (*ScriptUpdateOne) ClearFailureNotificationChannelID ¶
func (suo *ScriptUpdateOne) ClearFailureNotificationChannelID() *ScriptUpdateOne
ClearFailureNotificationChannelID clears the value of the "failure_notification_channel_id" field.
func (*ScriptUpdateOne) ClearParameters ¶
func (suo *ScriptUpdateOne) ClearParameters() *ScriptUpdateOne
ClearParameters clears the value of the "parameters" field.
func (*ScriptUpdateOne) ClearScheduleCron ¶
func (suo *ScriptUpdateOne) ClearScheduleCron() *ScriptUpdateOne
ClearScheduleCron clears the value of the "schedule_cron" field.
func (*ScriptUpdateOne) ClearSuccessNotificationChannelID ¶
func (suo *ScriptUpdateOne) ClearSuccessNotificationChannelID() *ScriptUpdateOne
ClearSuccessNotificationChannelID clears the value of the "success_notification_channel_id" field.
func (*ScriptUpdateOne) Exec ¶
func (suo *ScriptUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ScriptUpdateOne) ExecX ¶
func (suo *ScriptUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ScriptUpdateOne) Mutation ¶
func (suo *ScriptUpdateOne) Mutation() *ScriptMutation
Mutation returns the ScriptMutation object of the builder.
func (*ScriptUpdateOne) Save ¶
func (suo *ScriptUpdateOne) Save(ctx context.Context) (*Script, error)
Save executes the query and returns the updated Script entity.
func (*ScriptUpdateOne) SaveX ¶
func (suo *ScriptUpdateOne) SaveX(ctx context.Context) *Script
SaveX is like Save, but panics if an error occurs.
func (*ScriptUpdateOne) Select ¶
func (suo *ScriptUpdateOne) Select(field string, fields ...string) *ScriptUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ScriptUpdateOne) SetDescription ¶
func (suo *ScriptUpdateOne) SetDescription(s string) *ScriptUpdateOne
SetDescription sets the "description" field.
func (*ScriptUpdateOne) SetFailureNotificationChannelID ¶
func (suo *ScriptUpdateOne) SetFailureNotificationChannelID(i int) *ScriptUpdateOne
SetFailureNotificationChannelID sets the "failure_notification_channel_id" field.
func (*ScriptUpdateOne) SetName ¶
func (suo *ScriptUpdateOne) SetName(s string) *ScriptUpdateOne
SetName sets the "name" field.
func (*ScriptUpdateOne) SetNillableDescription ¶
func (suo *ScriptUpdateOne) SetNillableDescription(s *string) *ScriptUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableFailureNotificationChannelID ¶
func (suo *ScriptUpdateOne) SetNillableFailureNotificationChannelID(i *int) *ScriptUpdateOne
SetNillableFailureNotificationChannelID sets the "failure_notification_channel_id" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableScheduleCron ¶
func (suo *ScriptUpdateOne) SetNillableScheduleCron(s *string) *ScriptUpdateOne
SetNillableScheduleCron sets the "schedule_cron" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableScheduleEnabled ¶
func (suo *ScriptUpdateOne) SetNillableScheduleEnabled(b *bool) *ScriptUpdateOne
SetNillableScheduleEnabled sets the "schedule_enabled" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableSuccessNotificationChannelID ¶
func (suo *ScriptUpdateOne) SetNillableSuccessNotificationChannelID(i *int) *ScriptUpdateOne
SetNillableSuccessNotificationChannelID sets the "success_notification_channel_id" field if the given value is not nil.
func (*ScriptUpdateOne) SetNillableTimeoutSeconds ¶
func (suo *ScriptUpdateOne) SetNillableTimeoutSeconds(i *int) *ScriptUpdateOne
SetNillableTimeoutSeconds sets the "timeout_seconds" field if the given value is not nil.
func (*ScriptUpdateOne) SetParameters ¶
func (suo *ScriptUpdateOne) SetParameters(sio []schema.ScriptInputOptions) *ScriptUpdateOne
SetParameters sets the "parameters" field.
func (*ScriptUpdateOne) SetProjectID ¶
func (suo *ScriptUpdateOne) SetProjectID(i int) *ScriptUpdateOne
SetProjectID sets the "project_id" field.
func (*ScriptUpdateOne) SetScheduleCron ¶
func (suo *ScriptUpdateOne) SetScheduleCron(s string) *ScriptUpdateOne
SetScheduleCron sets the "schedule_cron" field.
func (*ScriptUpdateOne) SetScheduleEnabled ¶
func (suo *ScriptUpdateOne) SetScheduleEnabled(b bool) *ScriptUpdateOne
SetScheduleEnabled sets the "schedule_enabled" field.
func (*ScriptUpdateOne) SetScript ¶
func (suo *ScriptUpdateOne) SetScript(s string) *ScriptUpdateOne
SetScript sets the "script" field.
func (*ScriptUpdateOne) SetSuccessNotificationChannelID ¶
func (suo *ScriptUpdateOne) SetSuccessNotificationChannelID(i int) *ScriptUpdateOne
SetSuccessNotificationChannelID sets the "success_notification_channel_id" field.
func (*ScriptUpdateOne) SetTimeoutSeconds ¶
func (suo *ScriptUpdateOne) SetTimeoutSeconds(i int) *ScriptUpdateOne
SetTimeoutSeconds sets the "timeout_seconds" field.
func (*ScriptUpdateOne) SetUpdatedAt ¶
func (suo *ScriptUpdateOne) SetUpdatedAt(t time.Time) *ScriptUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ScriptUpdateOne) Where ¶
func (suo *ScriptUpdateOne) Where(ps ...predicate.Script) *ScriptUpdateOne
Where appends a list predicates to the ScriptUpdate builder.
type Secret ¶
type Secret struct { // ID of the ent. ID int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Value holds the value of the "value" field. Value string `json:"value,omitempty"` // ProjectID holds the value of the "project_id" field. ProjectID int `json:"project_id,omitempty"` // CreatedBy holds the value of the "created_by" field. CreatedBy string `json:"created_by,omitempty"` // contains filtered or unexported fields }
Secret is the model entity for the Secret schema.
func (*Secret) GetValue ¶
GetValue returns the ent.Value that was dynamically selected and assigned to the Secret. This includes values selected through modifiers, order, etc.
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 int) *SecretDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SecretClient) GetX ¶
func (c *SecretClient) GetX(ctx context.Context, id int) *Secret
GetX is like Get, but panics if an error occurs.
func (*SecretClient) Intercept ¶
func (c *SecretClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `secret.Intercept(f(g(h())))`.
func (*SecretClient) Interceptors ¶
func (c *SecretClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
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 int) *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) SetName ¶
func (sc *SecretCreate) SetName(s string) *SecretCreate
SetName sets the "name" 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) SetNillableUpdatedAt ¶
func (sc *SecretCreate) SetNillableUpdatedAt(t *time.Time) *SecretCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*SecretCreate) SetProjectID ¶
func (sc *SecretCreate) SetProjectID(i int) *SecretCreate
SetProjectID sets the "project_id" field.
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.
func (*SecretDeleteOne) Where ¶
func (sdo *SecretDeleteOne) Where(ps ...predicate.Secret) *SecretDeleteOne
Where appends a list predicates to the SecretDelete builder.
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 selector 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) AddProjectID ¶
func (m *SecretMutation) AddProjectID(i int)
AddProjectID adds i to the "project_id" field.
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) AddedProjectID ¶
func (m *SecretMutation) AddedProjectID() (r int, exists bool)
AddedProjectID returns the value that was added to the "project_id" field 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 int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*SecretMutation) IDs ¶
func (m *SecretMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*SecretMutation) Name ¶
func (m *SecretMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in 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) OldName ¶
func (m *SecretMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" 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) OldProjectID ¶
func (m *SecretMutation) OldProjectID(ctx context.Context) (v int, err error)
OldProjectID returns the old "project_id" 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) 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) ProjectID ¶
func (m *SecretMutation) ProjectID() (r int, exists bool)
ProjectID returns the value of the "project_id" field in the mutation.
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) ResetName ¶
func (m *SecretMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SecretMutation) ResetProjectID ¶
func (m *SecretMutation) ResetProjectID()
ResetProjectID resets all changes to the "project_id" field.
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) SetName ¶
func (m *SecretMutation) SetName(s string)
SetName sets the "name" field.
func (*SecretMutation) SetOp ¶
func (m *SecretMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SecretMutation) SetProjectID ¶
func (m *SecretMutation) SetProjectID(i int)
SetProjectID sets the "project_id" field.
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.
func (*SecretMutation) WhereP ¶
func (m *SecretMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SecretMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
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 int, 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) int
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) (ids []int, err error)
IDs executes the query and returns a list of Secret IDs.
func (*SecretQuery) IDsX ¶
func (sq *SecretQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SecretQuery) Limit ¶
func (sq *SecretQuery) Limit(limit int) *SecretQuery
Limit the number of records to be returned by this query.
func (*SecretQuery) Offset ¶
func (sq *SecretQuery) Offset(offset int) *SecretQuery
Offset to start from.
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 int, 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) int
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 ...secret.OrderOption) *SecretQuery
Order specifies how the records should be ordered.
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) AddProjectID ¶
func (su *SecretUpdate) AddProjectID(i int) *SecretUpdate
AddProjectID adds i to the "project_id" field.
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) SetCreatedBy ¶
func (su *SecretUpdate) SetCreatedBy(s string) *SecretUpdate
SetCreatedBy sets the "created_by" field.
func (*SecretUpdate) SetName ¶
func (su *SecretUpdate) SetName(s string) *SecretUpdate
SetName sets the "name" field.
func (*SecretUpdate) SetProjectID ¶
func (su *SecretUpdate) SetProjectID(i int) *SecretUpdate
SetProjectID sets the "project_id" field.
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) AddProjectID ¶
func (suo *SecretUpdateOne) AddProjectID(i int) *SecretUpdateOne
AddProjectID adds i to the "project_id" field.
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) SetCreatedBy ¶
func (suo *SecretUpdateOne) SetCreatedBy(s string) *SecretUpdateOne
SetCreatedBy sets the "created_by" field.
func (*SecretUpdateOne) SetName ¶
func (suo *SecretUpdateOne) SetName(s string) *SecretUpdateOne
SetName sets the "name" field.
func (*SecretUpdateOne) SetProjectID ¶
func (suo *SecretUpdateOne) SetProjectID(i int) *SecretUpdateOne
SetProjectID sets the "project_id" field.
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.
func (*SecretUpdateOne) Where ¶
func (suo *SecretUpdateOne) Where(ps ...predicate.Secret) *SecretUpdateOne
Where appends a list predicates to the SecretUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Access is the client for interacting with the Access builders. Access *AccessClient // History is the client for interacting with the History builders. History *HistoryClient // NotificationChannel is the client for interacting with the NotificationChannel builders. NotificationChannel *NotificationChannelClient // Project is the client for interacting with the Project builders. Project *ProjectClient // Script is the client for interacting with the Script builders. Script *ScriptClient // ScriptStats is the client for interacting with the ScriptStats builders. ScriptStats *ScriptStatsClient // Secret is the client for interacting with the Secret builders. Secret *SecretClient // 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 int `json:"id,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt time.Time `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt time.Time `json:"updated_at,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // HashedPassword holds the value of the "hashed_password" field. HashedPassword string `json:"hashed_password,omitempty"` // APIKey holds the value of the "api_key" field. APIKey string `json:"api_key,omitempty"` // Role holds the value of the "role" field. Role user.Role `json:"role,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 int) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) GetX ¶
func (c *UserClient) GetX(ctx context.Context, id int) *User
GetX is like Get, but panics if an error occurs.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
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 int) *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) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetHashedPassword ¶
func (uc *UserCreate) SetHashedPassword(s string) *UserCreate
SetHashedPassword sets the "hashed_password" 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) SetNillableRole ¶
func (uc *UserCreate) SetNillableRole(u *user.Role) *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(u user.Role) *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.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
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 selector 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) 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) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the 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) HashedPassword ¶
func (m *UserMutation) HashedPassword() (r string, exists bool)
HashedPassword returns the value of the "hashed_password" field in the mutation.
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*UserMutation) IDs ¶
func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*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) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" 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) OldHashedPassword ¶
func (m *UserMutation) OldHashedPassword(ctx context.Context) (v string, err error)
OldHashedPassword returns the old "hashed_password" 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 ¶
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) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
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) ResetHashedPassword ¶
func (m *UserMutation) ResetHashedPassword()
ResetHashedPassword resets all changes to the "hashed_password" 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 user.Role, 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) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" 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) SetHashedPassword ¶
func (m *UserMutation) SetHashedPassword(s string)
SetHashedPassword sets the "hashed_password" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetRole ¶
func (m *UserMutation) SetRole(u user.Role)
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.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
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 { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCreatedAt). 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) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
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 { CreatedAt time.Time `json:"created_at,omitempty"` } client.User.Query(). Select(user.FieldCreatedAt). 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) 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) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetHashedPassword ¶
func (uu *UserUpdate) SetHashedPassword(s string) *UserUpdate
SetHashedPassword sets the "hashed_password" field.
func (*UserUpdate) SetNillableRole ¶
func (uu *UserUpdate) SetNillableRole(u *user.Role) *UserUpdate
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdate) SetRole ¶
func (uu *UserUpdate) SetRole(u user.Role) *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) 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) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetHashedPassword ¶
func (uuo *UserUpdateOne) SetHashedPassword(s string) *UserUpdateOne
SetHashedPassword sets the "hashed_password" field.
func (*UserUpdateOne) SetNillableRole ¶
func (uuo *UserUpdateOne) SetNillableRole(u *user.Role) *UserUpdateOne
SetNillableRole sets the "role" field if the given value is not nil.
func (*UserUpdateOne) SetRole ¶
func (uuo *UserUpdateOne) SetRole(u user.Role) *UserUpdateOne
SetRole sets the "role" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
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 ¶
- access.go
- access_create.go
- access_delete.go
- access_query.go
- access_update.go
- client.go
- ent.go
- generate.go
- history.go
- history_create.go
- history_delete.go
- history_query.go
- history_update.go
- mutation.go
- notificationchannel.go
- notificationchannel_create.go
- notificationchannel_delete.go
- notificationchannel_query.go
- notificationchannel_update.go
- project.go
- project_create.go
- project_delete.go
- project_query.go
- project_update.go
- runtime.go
- script.go
- script_create.go
- script_delete.go
- script_query.go
- script_update.go
- scriptstats.go
- scriptstats_create.go
- scriptstats_delete.go
- scriptstats_query.go
- scriptstats_update.go
- secret.go
- secret_create.go
- secret_delete.go
- secret_query.go
- secret_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go