Documentation ¶
Index ¶
- Constants
- Variables
- 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
- func OpenTxFromContext(ctx context.Context) (context.Context, driver.Tx, error)
- type AggregateFunc
- type Beacon
- func (b *Beacon) Host(ctx context.Context) (*Host, error)
- func (n *Beacon) IsNode()
- func (b *Beacon) NamedTasks(name string) ([]*Task, error)
- func (b *Beacon) QueryHost() *HostQuery
- func (b *Beacon) QueryTasks() *TaskQuery
- func (b *Beacon) String() string
- func (b *Beacon) Tasks(ctx context.Context) (result []*Task, err error)
- func (b *Beacon) ToEdge(order *BeaconOrder) *BeaconEdge
- func (b *Beacon) Unwrap() *Beacon
- func (b *Beacon) Update() *BeaconUpdateOne
- func (b *Beacon) Value(name string) (ent.Value, error)
- type BeaconClient
- func (c *BeaconClient) Create() *BeaconCreate
- func (c *BeaconClient) CreateBulk(builders ...*BeaconCreate) *BeaconCreateBulk
- func (c *BeaconClient) Delete() *BeaconDelete
- func (c *BeaconClient) DeleteOne(b *Beacon) *BeaconDeleteOne
- func (c *BeaconClient) DeleteOneID(id int) *BeaconDeleteOne
- func (c *BeaconClient) Get(ctx context.Context, id int) (*Beacon, error)
- func (c *BeaconClient) GetX(ctx context.Context, id int) *Beacon
- func (c *BeaconClient) Hooks() []Hook
- func (c *BeaconClient) Intercept(interceptors ...Interceptor)
- func (c *BeaconClient) Interceptors() []Interceptor
- func (c *BeaconClient) MapCreateBulk(slice any, setFunc func(*BeaconCreate, int)) *BeaconCreateBulk
- func (c *BeaconClient) Query() *BeaconQuery
- func (c *BeaconClient) QueryHost(b *Beacon) *HostQuery
- func (c *BeaconClient) QueryTasks(b *Beacon) *TaskQuery
- func (c *BeaconClient) Update() *BeaconUpdate
- func (c *BeaconClient) UpdateOne(b *Beacon) *BeaconUpdateOne
- func (c *BeaconClient) UpdateOneID(id int) *BeaconUpdateOne
- func (c *BeaconClient) Use(hooks ...Hook)
- type BeaconConnection
- type BeaconCreate
- func (bc *BeaconCreate) AddTaskIDs(ids ...int) *BeaconCreate
- func (bc *BeaconCreate) AddTasks(t ...*Task) *BeaconCreate
- func (bc *BeaconCreate) Exec(ctx context.Context) error
- func (bc *BeaconCreate) ExecX(ctx context.Context)
- func (bc *BeaconCreate) Mutation() *BeaconMutation
- func (bc *BeaconCreate) OnConflict(opts ...sql.ConflictOption) *BeaconUpsertOne
- func (bc *BeaconCreate) OnConflictColumns(columns ...string) *BeaconUpsertOne
- func (bc *BeaconCreate) Save(ctx context.Context) (*Beacon, error)
- func (bc *BeaconCreate) SaveX(ctx context.Context) *Beacon
- func (bc *BeaconCreate) SetAgentIdentifier(s string) *BeaconCreate
- func (bc *BeaconCreate) SetCreatedAt(t time.Time) *BeaconCreate
- func (bc *BeaconCreate) SetHost(h *Host) *BeaconCreate
- func (bc *BeaconCreate) SetHostID(id int) *BeaconCreate
- func (bc *BeaconCreate) SetIdentifier(s string) *BeaconCreate
- func (bc *BeaconCreate) SetInterval(u uint64) *BeaconCreate
- func (bc *BeaconCreate) SetLastModifiedAt(t time.Time) *BeaconCreate
- func (bc *BeaconCreate) SetLastSeenAt(t time.Time) *BeaconCreate
- func (bc *BeaconCreate) SetName(s string) *BeaconCreate
- func (bc *BeaconCreate) SetNillableAgentIdentifier(s *string) *BeaconCreate
- func (bc *BeaconCreate) SetNillableCreatedAt(t *time.Time) *BeaconCreate
- func (bc *BeaconCreate) SetNillableIdentifier(s *string) *BeaconCreate
- func (bc *BeaconCreate) SetNillableInterval(u *uint64) *BeaconCreate
- func (bc *BeaconCreate) SetNillableLastModifiedAt(t *time.Time) *BeaconCreate
- func (bc *BeaconCreate) SetNillableLastSeenAt(t *time.Time) *BeaconCreate
- func (bc *BeaconCreate) SetNillableName(s *string) *BeaconCreate
- func (bc *BeaconCreate) SetNillablePrincipal(s *string) *BeaconCreate
- func (bc *BeaconCreate) SetPrincipal(s string) *BeaconCreate
- type BeaconCreateBulk
- func (bcb *BeaconCreateBulk) Exec(ctx context.Context) error
- func (bcb *BeaconCreateBulk) ExecX(ctx context.Context)
- func (bcb *BeaconCreateBulk) OnConflict(opts ...sql.ConflictOption) *BeaconUpsertBulk
- func (bcb *BeaconCreateBulk) OnConflictColumns(columns ...string) *BeaconUpsertBulk
- func (bcb *BeaconCreateBulk) Save(ctx context.Context) ([]*Beacon, error)
- func (bcb *BeaconCreateBulk) SaveX(ctx context.Context) []*Beacon
- type BeaconDelete
- type BeaconDeleteOne
- type BeaconEdge
- type BeaconEdges
- type BeaconGroupBy
- func (bgb *BeaconGroupBy) Aggregate(fns ...AggregateFunc) *BeaconGroupBy
- func (s *BeaconGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *BeaconGroupBy) BoolX(ctx context.Context) bool
- func (s *BeaconGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *BeaconGroupBy) BoolsX(ctx context.Context) []bool
- func (s *BeaconGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *BeaconGroupBy) Float64X(ctx context.Context) float64
- func (s *BeaconGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *BeaconGroupBy) Float64sX(ctx context.Context) []float64
- func (s *BeaconGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *BeaconGroupBy) IntX(ctx context.Context) int
- func (s *BeaconGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *BeaconGroupBy) IntsX(ctx context.Context) []int
- func (bgb *BeaconGroupBy) Scan(ctx context.Context, v any) error
- func (s *BeaconGroupBy) ScanX(ctx context.Context, v any)
- func (s *BeaconGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *BeaconGroupBy) StringX(ctx context.Context) string
- func (s *BeaconGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *BeaconGroupBy) StringsX(ctx context.Context) []string
- type BeaconMutation
- func (m *BeaconMutation) AddField(name string, value ent.Value) error
- func (m *BeaconMutation) AddInterval(u int64)
- func (m *BeaconMutation) AddTaskIDs(ids ...int)
- func (m *BeaconMutation) AddedEdges() []string
- func (m *BeaconMutation) AddedField(name string) (ent.Value, bool)
- func (m *BeaconMutation) AddedFields() []string
- func (m *BeaconMutation) AddedIDs(name string) []ent.Value
- func (m *BeaconMutation) AddedInterval() (r int64, exists bool)
- func (m *BeaconMutation) AgentIdentifier() (r string, exists bool)
- func (m *BeaconMutation) AgentIdentifierCleared() bool
- func (m *BeaconMutation) ClearAgentIdentifier()
- func (m *BeaconMutation) ClearEdge(name string) error
- func (m *BeaconMutation) ClearField(name string) error
- func (m *BeaconMutation) ClearHost()
- func (m *BeaconMutation) ClearInterval()
- func (m *BeaconMutation) ClearLastSeenAt()
- func (m *BeaconMutation) ClearPrincipal()
- func (m *BeaconMutation) ClearTasks()
- func (m *BeaconMutation) ClearedEdges() []string
- func (m *BeaconMutation) ClearedFields() []string
- func (m BeaconMutation) Client() *Client
- func (m *BeaconMutation) CreatedAt() (r time.Time, exists bool)
- func (m *BeaconMutation) EdgeCleared(name string) bool
- func (m *BeaconMutation) Field(name string) (ent.Value, bool)
- func (m *BeaconMutation) FieldCleared(name string) bool
- func (m *BeaconMutation) Fields() []string
- func (m *BeaconMutation) HostCleared() bool
- func (m *BeaconMutation) HostID() (id int, exists bool)
- func (m *BeaconMutation) HostIDs() (ids []int)
- func (m *BeaconMutation) ID() (id int, exists bool)
- func (m *BeaconMutation) IDs(ctx context.Context) ([]int, error)
- func (m *BeaconMutation) Identifier() (r string, exists bool)
- func (m *BeaconMutation) Interval() (r uint64, exists bool)
- func (m *BeaconMutation) IntervalCleared() bool
- func (m *BeaconMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *BeaconMutation) LastSeenAt() (r time.Time, exists bool)
- func (m *BeaconMutation) LastSeenAtCleared() bool
- func (m *BeaconMutation) Name() (r string, exists bool)
- func (m *BeaconMutation) OldAgentIdentifier(ctx context.Context) (v string, err error)
- func (m *BeaconMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *BeaconMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *BeaconMutation) OldIdentifier(ctx context.Context) (v string, err error)
- func (m *BeaconMutation) OldInterval(ctx context.Context) (v uint64, err error)
- func (m *BeaconMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *BeaconMutation) OldLastSeenAt(ctx context.Context) (v time.Time, err error)
- func (m *BeaconMutation) OldName(ctx context.Context) (v string, err error)
- func (m *BeaconMutation) OldPrincipal(ctx context.Context) (v string, err error)
- func (m *BeaconMutation) Op() Op
- func (m *BeaconMutation) Principal() (r string, exists bool)
- func (m *BeaconMutation) PrincipalCleared() bool
- func (m *BeaconMutation) RemoveTaskIDs(ids ...int)
- func (m *BeaconMutation) RemovedEdges() []string
- func (m *BeaconMutation) RemovedIDs(name string) []ent.Value
- func (m *BeaconMutation) RemovedTasksIDs() (ids []int)
- func (m *BeaconMutation) ResetAgentIdentifier()
- func (m *BeaconMutation) ResetCreatedAt()
- func (m *BeaconMutation) ResetEdge(name string) error
- func (m *BeaconMutation) ResetField(name string) error
- func (m *BeaconMutation) ResetHost()
- func (m *BeaconMutation) ResetIdentifier()
- func (m *BeaconMutation) ResetInterval()
- func (m *BeaconMutation) ResetLastModifiedAt()
- func (m *BeaconMutation) ResetLastSeenAt()
- func (m *BeaconMutation) ResetName()
- func (m *BeaconMutation) ResetPrincipal()
- func (m *BeaconMutation) ResetTasks()
- func (m *BeaconMutation) SetAgentIdentifier(s string)
- func (m *BeaconMutation) SetCreatedAt(t time.Time)
- func (m *BeaconMutation) SetField(name string, value ent.Value) error
- func (m *BeaconMutation) SetHostID(id int)
- func (m *BeaconMutation) SetIdentifier(s string)
- func (m *BeaconMutation) SetInterval(u uint64)
- func (m *BeaconMutation) SetLastModifiedAt(t time.Time)
- func (m *BeaconMutation) SetLastSeenAt(t time.Time)
- func (m *BeaconMutation) SetName(s string)
- func (m *BeaconMutation) SetOp(op Op)
- func (m *BeaconMutation) SetPrincipal(s string)
- func (m *BeaconMutation) TasksCleared() bool
- func (m *BeaconMutation) TasksIDs() (ids []int)
- func (m BeaconMutation) Tx() (*Tx, error)
- func (m *BeaconMutation) Type() string
- func (m *BeaconMutation) Where(ps ...predicate.Beacon)
- func (m *BeaconMutation) WhereP(ps ...func(*sql.Selector))
- type BeaconOrder
- type BeaconOrderField
- type BeaconPaginateOption
- type BeaconQuery
- func (bq *BeaconQuery) Aggregate(fns ...AggregateFunc) *BeaconSelect
- func (bq *BeaconQuery) All(ctx context.Context) ([]*Beacon, error)
- func (bq *BeaconQuery) AllX(ctx context.Context) []*Beacon
- func (bq *BeaconQuery) Clone() *BeaconQuery
- func (b *BeaconQuery) CollectFields(ctx context.Context, satisfies ...string) (*BeaconQuery, error)
- func (bq *BeaconQuery) Count(ctx context.Context) (int, error)
- func (bq *BeaconQuery) CountX(ctx context.Context) int
- func (bq *BeaconQuery) Exist(ctx context.Context) (bool, error)
- func (bq *BeaconQuery) ExistX(ctx context.Context) bool
- func (bq *BeaconQuery) First(ctx context.Context) (*Beacon, error)
- func (bq *BeaconQuery) FirstID(ctx context.Context) (id int, err error)
- func (bq *BeaconQuery) FirstIDX(ctx context.Context) int
- func (bq *BeaconQuery) FirstX(ctx context.Context) *Beacon
- func (bq *BeaconQuery) GroupBy(field string, fields ...string) *BeaconGroupBy
- func (bq *BeaconQuery) IDs(ctx context.Context) (ids []int, err error)
- func (bq *BeaconQuery) IDsX(ctx context.Context) []int
- func (bq *BeaconQuery) Limit(limit int) *BeaconQuery
- func (bq *BeaconQuery) Offset(offset int) *BeaconQuery
- func (bq *BeaconQuery) Only(ctx context.Context) (*Beacon, error)
- func (bq *BeaconQuery) OnlyID(ctx context.Context) (id int, err error)
- func (bq *BeaconQuery) OnlyIDX(ctx context.Context) int
- func (bq *BeaconQuery) OnlyX(ctx context.Context) *Beacon
- func (bq *BeaconQuery) Order(o ...beacon.OrderOption) *BeaconQuery
- func (b *BeaconQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*BeaconConnection, error)
- func (bq *BeaconQuery) QueryHost() *HostQuery
- func (bq *BeaconQuery) QueryTasks() *TaskQuery
- func (bq *BeaconQuery) Select(fields ...string) *BeaconSelect
- func (bq *BeaconQuery) Unique(unique bool) *BeaconQuery
- func (bq *BeaconQuery) Where(ps ...predicate.Beacon) *BeaconQuery
- func (bq *BeaconQuery) WithHost(opts ...func(*HostQuery)) *BeaconQuery
- func (bq *BeaconQuery) WithNamedTasks(name string, opts ...func(*TaskQuery)) *BeaconQuery
- func (bq *BeaconQuery) WithTasks(opts ...func(*TaskQuery)) *BeaconQuery
- type BeaconSelect
- func (bs *BeaconSelect) Aggregate(fns ...AggregateFunc) *BeaconSelect
- func (s *BeaconSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *BeaconSelect) BoolX(ctx context.Context) bool
- func (s *BeaconSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *BeaconSelect) BoolsX(ctx context.Context) []bool
- func (s *BeaconSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *BeaconSelect) Float64X(ctx context.Context) float64
- func (s *BeaconSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *BeaconSelect) Float64sX(ctx context.Context) []float64
- func (s *BeaconSelect) Int(ctx context.Context) (_ int, err error)
- func (s *BeaconSelect) IntX(ctx context.Context) int
- func (s *BeaconSelect) Ints(ctx context.Context) ([]int, error)
- func (s *BeaconSelect) IntsX(ctx context.Context) []int
- func (bs *BeaconSelect) Scan(ctx context.Context, v any) error
- func (s *BeaconSelect) ScanX(ctx context.Context, v any)
- func (s *BeaconSelect) String(ctx context.Context) (_ string, err error)
- func (s *BeaconSelect) StringX(ctx context.Context) string
- func (s *BeaconSelect) Strings(ctx context.Context) ([]string, error)
- func (s *BeaconSelect) StringsX(ctx context.Context) []string
- type BeaconUpdate
- func (bu *BeaconUpdate) AddInterval(u int64) *BeaconUpdate
- func (bu *BeaconUpdate) AddTaskIDs(ids ...int) *BeaconUpdate
- func (bu *BeaconUpdate) AddTasks(t ...*Task) *BeaconUpdate
- func (bu *BeaconUpdate) ClearAgentIdentifier() *BeaconUpdate
- func (bu *BeaconUpdate) ClearHost() *BeaconUpdate
- func (bu *BeaconUpdate) ClearInterval() *BeaconUpdate
- func (bu *BeaconUpdate) ClearLastSeenAt() *BeaconUpdate
- func (bu *BeaconUpdate) ClearPrincipal() *BeaconUpdate
- func (bu *BeaconUpdate) ClearTasks() *BeaconUpdate
- func (bu *BeaconUpdate) Exec(ctx context.Context) error
- func (bu *BeaconUpdate) ExecX(ctx context.Context)
- func (bu *BeaconUpdate) Mutation() *BeaconMutation
- func (bu *BeaconUpdate) RemoveTaskIDs(ids ...int) *BeaconUpdate
- func (bu *BeaconUpdate) RemoveTasks(t ...*Task) *BeaconUpdate
- func (bu *BeaconUpdate) Save(ctx context.Context) (int, error)
- func (bu *BeaconUpdate) SaveX(ctx context.Context) int
- func (bu *BeaconUpdate) SetAgentIdentifier(s string) *BeaconUpdate
- func (bu *BeaconUpdate) SetHost(h *Host) *BeaconUpdate
- func (bu *BeaconUpdate) SetHostID(id int) *BeaconUpdate
- func (bu *BeaconUpdate) SetIdentifier(s string) *BeaconUpdate
- func (c *BeaconUpdate) SetInput(i UpdateBeaconInput) *BeaconUpdate
- func (bu *BeaconUpdate) SetInterval(u uint64) *BeaconUpdate
- func (bu *BeaconUpdate) SetLastModifiedAt(t time.Time) *BeaconUpdate
- func (bu *BeaconUpdate) SetLastSeenAt(t time.Time) *BeaconUpdate
- func (bu *BeaconUpdate) SetNillableAgentIdentifier(s *string) *BeaconUpdate
- func (bu *BeaconUpdate) SetNillableIdentifier(s *string) *BeaconUpdate
- func (bu *BeaconUpdate) SetNillableInterval(u *uint64) *BeaconUpdate
- func (bu *BeaconUpdate) SetNillableLastSeenAt(t *time.Time) *BeaconUpdate
- func (bu *BeaconUpdate) SetNillablePrincipal(s *string) *BeaconUpdate
- func (bu *BeaconUpdate) SetPrincipal(s string) *BeaconUpdate
- func (bu *BeaconUpdate) Where(ps ...predicate.Beacon) *BeaconUpdate
- type BeaconUpdateOne
- func (buo *BeaconUpdateOne) AddInterval(u int64) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) AddTaskIDs(ids ...int) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) AddTasks(t ...*Task) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) ClearAgentIdentifier() *BeaconUpdateOne
- func (buo *BeaconUpdateOne) ClearHost() *BeaconUpdateOne
- func (buo *BeaconUpdateOne) ClearInterval() *BeaconUpdateOne
- func (buo *BeaconUpdateOne) ClearLastSeenAt() *BeaconUpdateOne
- func (buo *BeaconUpdateOne) ClearPrincipal() *BeaconUpdateOne
- func (buo *BeaconUpdateOne) ClearTasks() *BeaconUpdateOne
- func (buo *BeaconUpdateOne) Exec(ctx context.Context) error
- func (buo *BeaconUpdateOne) ExecX(ctx context.Context)
- func (buo *BeaconUpdateOne) Mutation() *BeaconMutation
- func (buo *BeaconUpdateOne) RemoveTaskIDs(ids ...int) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) RemoveTasks(t ...*Task) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) Save(ctx context.Context) (*Beacon, error)
- func (buo *BeaconUpdateOne) SaveX(ctx context.Context) *Beacon
- func (buo *BeaconUpdateOne) Select(field string, fields ...string) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetAgentIdentifier(s string) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetHost(h *Host) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetHostID(id int) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetIdentifier(s string) *BeaconUpdateOne
- func (c *BeaconUpdateOne) SetInput(i UpdateBeaconInput) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetInterval(u uint64) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetLastModifiedAt(t time.Time) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetLastSeenAt(t time.Time) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetNillableAgentIdentifier(s *string) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetNillableIdentifier(s *string) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetNillableInterval(u *uint64) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetNillableLastSeenAt(t *time.Time) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetNillablePrincipal(s *string) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) SetPrincipal(s string) *BeaconUpdateOne
- func (buo *BeaconUpdateOne) Where(ps ...predicate.Beacon) *BeaconUpdateOne
- type BeaconUpsert
- func (u *BeaconUpsert) AddInterval(v uint64) *BeaconUpsert
- func (u *BeaconUpsert) ClearAgentIdentifier() *BeaconUpsert
- func (u *BeaconUpsert) ClearInterval() *BeaconUpsert
- func (u *BeaconUpsert) ClearLastSeenAt() *BeaconUpsert
- func (u *BeaconUpsert) ClearPrincipal() *BeaconUpsert
- func (u *BeaconUpsert) SetAgentIdentifier(v string) *BeaconUpsert
- func (u *BeaconUpsert) SetIdentifier(v string) *BeaconUpsert
- func (u *BeaconUpsert) SetInterval(v uint64) *BeaconUpsert
- func (u *BeaconUpsert) SetLastModifiedAt(v time.Time) *BeaconUpsert
- func (u *BeaconUpsert) SetLastSeenAt(v time.Time) *BeaconUpsert
- func (u *BeaconUpsert) SetPrincipal(v string) *BeaconUpsert
- func (u *BeaconUpsert) UpdateAgentIdentifier() *BeaconUpsert
- func (u *BeaconUpsert) UpdateIdentifier() *BeaconUpsert
- func (u *BeaconUpsert) UpdateInterval() *BeaconUpsert
- func (u *BeaconUpsert) UpdateLastModifiedAt() *BeaconUpsert
- func (u *BeaconUpsert) UpdateLastSeenAt() *BeaconUpsert
- func (u *BeaconUpsert) UpdatePrincipal() *BeaconUpsert
- type BeaconUpsertBulk
- func (u *BeaconUpsertBulk) AddInterval(v uint64) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) ClearAgentIdentifier() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) ClearInterval() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) ClearLastSeenAt() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) ClearPrincipal() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) DoNothing() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) Exec(ctx context.Context) error
- func (u *BeaconUpsertBulk) ExecX(ctx context.Context)
- func (u *BeaconUpsertBulk) Ignore() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) SetAgentIdentifier(v string) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) SetIdentifier(v string) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) SetInterval(v uint64) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) SetLastModifiedAt(v time.Time) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) SetLastSeenAt(v time.Time) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) SetPrincipal(v string) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) Update(set func(*BeaconUpsert)) *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) UpdateAgentIdentifier() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) UpdateIdentifier() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) UpdateInterval() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) UpdateLastModifiedAt() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) UpdateLastSeenAt() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) UpdateNewValues() *BeaconUpsertBulk
- func (u *BeaconUpsertBulk) UpdatePrincipal() *BeaconUpsertBulk
- type BeaconUpsertOne
- func (u *BeaconUpsertOne) AddInterval(v uint64) *BeaconUpsertOne
- func (u *BeaconUpsertOne) ClearAgentIdentifier() *BeaconUpsertOne
- func (u *BeaconUpsertOne) ClearInterval() *BeaconUpsertOne
- func (u *BeaconUpsertOne) ClearLastSeenAt() *BeaconUpsertOne
- func (u *BeaconUpsertOne) ClearPrincipal() *BeaconUpsertOne
- func (u *BeaconUpsertOne) DoNothing() *BeaconUpsertOne
- func (u *BeaconUpsertOne) Exec(ctx context.Context) error
- func (u *BeaconUpsertOne) ExecX(ctx context.Context)
- func (u *BeaconUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *BeaconUpsertOne) IDX(ctx context.Context) int
- func (u *BeaconUpsertOne) Ignore() *BeaconUpsertOne
- func (u *BeaconUpsertOne) SetAgentIdentifier(v string) *BeaconUpsertOne
- func (u *BeaconUpsertOne) SetIdentifier(v string) *BeaconUpsertOne
- func (u *BeaconUpsertOne) SetInterval(v uint64) *BeaconUpsertOne
- func (u *BeaconUpsertOne) SetLastModifiedAt(v time.Time) *BeaconUpsertOne
- func (u *BeaconUpsertOne) SetLastSeenAt(v time.Time) *BeaconUpsertOne
- func (u *BeaconUpsertOne) SetPrincipal(v string) *BeaconUpsertOne
- func (u *BeaconUpsertOne) Update(set func(*BeaconUpsert)) *BeaconUpsertOne
- func (u *BeaconUpsertOne) UpdateAgentIdentifier() *BeaconUpsertOne
- func (u *BeaconUpsertOne) UpdateIdentifier() *BeaconUpsertOne
- func (u *BeaconUpsertOne) UpdateInterval() *BeaconUpsertOne
- func (u *BeaconUpsertOne) UpdateLastModifiedAt() *BeaconUpsertOne
- func (u *BeaconUpsertOne) UpdateLastSeenAt() *BeaconUpsertOne
- func (u *BeaconUpsertOne) UpdateNewValues() *BeaconUpsertOne
- func (u *BeaconUpsertOne) UpdatePrincipal() *BeaconUpsertOne
- type BeaconWhereInput
- type Beacons
- 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) Noder(ctx context.Context, id int, opts ...NodeOption) (_ Noder, err error)
- func (c *Client) Noders(ctx context.Context, ids []int, opts ...NodeOption) ([]Noder, error)
- func (c *Client) OpenTx(ctx context.Context) (context.Context, driver.Tx, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type CreateQuestInput
- type CreateTagInput
- type CreateTomeInput
- type Cursor
- type File
- func (n *File) IsNode()
- func (f *File) NamedTomes(name string) ([]*Tome, error)
- func (f *File) QueryTomes() *TomeQuery
- func (f *File) String() string
- func (f *File) ToEdge(order *FileOrder) *FileEdge
- func (f *File) Tomes(ctx context.Context) (result []*Tome, err error)
- func (f *File) Unwrap() *File
- func (f *File) Update() *FileUpdateOne
- func (f *File) Value(name string) (ent.Value, error)
- type FileClient
- func (c *FileClient) Create() *FileCreate
- func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
- func (c *FileClient) Delete() *FileDelete
- func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
- func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
- func (c *FileClient) Get(ctx context.Context, id int) (*File, error)
- func (c *FileClient) GetX(ctx context.Context, id int) *File
- func (c *FileClient) Hooks() []Hook
- func (c *FileClient) Intercept(interceptors ...Interceptor)
- func (c *FileClient) Interceptors() []Interceptor
- func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
- func (c *FileClient) Query() *FileQuery
- func (c *FileClient) QueryTomes(f *File) *TomeQuery
- func (c *FileClient) Update() *FileUpdate
- func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
- func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
- func (c *FileClient) Use(hooks ...Hook)
- type FileConnection
- type FileCreate
- func (fc *FileCreate) AddTomeIDs(ids ...int) *FileCreate
- func (fc *FileCreate) AddTomes(t ...*Tome) *FileCreate
- func (fc *FileCreate) Exec(ctx context.Context) error
- func (fc *FileCreate) ExecX(ctx context.Context)
- func (fc *FileCreate) Mutation() *FileMutation
- func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
- func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
- func (fc *FileCreate) Save(ctx context.Context) (*File, error)
- func (fc *FileCreate) SaveX(ctx context.Context) *File
- func (fc *FileCreate) SetContent(b []byte) *FileCreate
- func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetHash(s string) *FileCreate
- func (fc *FileCreate) SetLastModifiedAt(t time.Time) *FileCreate
- func (fc *FileCreate) SetName(s string) *FileCreate
- func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetNillableLastModifiedAt(t *time.Time) *FileCreate
- func (fc *FileCreate) SetNillableSize(i *int) *FileCreate
- func (fc *FileCreate) SetSize(i int) *FileCreate
- type FileCreateBulk
- func (fcb *FileCreateBulk) Exec(ctx context.Context) error
- func (fcb *FileCreateBulk) ExecX(ctx context.Context)
- func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
- func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
- func (fcb *FileCreateBulk) Save(ctx context.Context) ([]*File, error)
- func (fcb *FileCreateBulk) SaveX(ctx context.Context) []*File
- type FileDelete
- type FileDeleteOne
- type FileEdge
- type FileEdges
- type FileGroupBy
- func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
- func (s *FileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileGroupBy) BoolX(ctx context.Context) bool
- func (s *FileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *FileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *FileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileGroupBy) Float64X(ctx context.Context) float64
- func (s *FileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *FileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *FileGroupBy) IntX(ctx context.Context) int
- func (s *FileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *FileGroupBy) IntsX(ctx context.Context) []int
- func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
- func (s *FileGroupBy) ScanX(ctx context.Context, v any)
- func (s *FileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *FileGroupBy) StringX(ctx context.Context) string
- func (s *FileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *FileGroupBy) StringsX(ctx context.Context) []string
- type FileMutation
- func (m *FileMutation) AddField(name string, value ent.Value) error
- func (m *FileMutation) AddSize(i int)
- func (m *FileMutation) AddTomeIDs(ids ...int)
- func (m *FileMutation) AddedEdges() []string
- func (m *FileMutation) AddedField(name string) (ent.Value, bool)
- func (m *FileMutation) AddedFields() []string
- func (m *FileMutation) AddedIDs(name string) []ent.Value
- func (m *FileMutation) AddedSize() (r int, exists bool)
- func (m *FileMutation) ClearEdge(name string) error
- func (m *FileMutation) ClearField(name string) error
- func (m *FileMutation) ClearTomes()
- func (m *FileMutation) ClearedEdges() []string
- func (m *FileMutation) ClearedFields() []string
- func (m FileMutation) Client() *Client
- func (m *FileMutation) Content() (r []byte, exists bool)
- func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *FileMutation) EdgeCleared(name string) bool
- func (m *FileMutation) Field(name string) (ent.Value, bool)
- func (m *FileMutation) FieldCleared(name string) bool
- func (m *FileMutation) Fields() []string
- func (m *FileMutation) Hash() (r string, exists bool)
- func (m *FileMutation) ID() (id int, exists bool)
- func (m *FileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *FileMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *FileMutation) Name() (r string, exists bool)
- func (m *FileMutation) OldContent(ctx context.Context) (v []byte, err error)
- func (m *FileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *FileMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
- func (m *FileMutation) OldSize(ctx context.Context) (v int, err error)
- func (m *FileMutation) Op() Op
- func (m *FileMutation) RemoveTomeIDs(ids ...int)
- func (m *FileMutation) RemovedEdges() []string
- func (m *FileMutation) RemovedIDs(name string) []ent.Value
- func (m *FileMutation) RemovedTomesIDs() (ids []int)
- func (m *FileMutation) ResetContent()
- func (m *FileMutation) ResetCreatedAt()
- func (m *FileMutation) ResetEdge(name string) error
- func (m *FileMutation) ResetField(name string) error
- func (m *FileMutation) ResetHash()
- func (m *FileMutation) ResetLastModifiedAt()
- func (m *FileMutation) ResetName()
- func (m *FileMutation) ResetSize()
- func (m *FileMutation) ResetTomes()
- func (m *FileMutation) SetContent(b []byte)
- func (m *FileMutation) SetCreatedAt(t time.Time)
- func (m *FileMutation) SetField(name string, value ent.Value) error
- func (m *FileMutation) SetHash(s string)
- func (m *FileMutation) SetLastModifiedAt(t time.Time)
- func (m *FileMutation) SetName(s string)
- func (m *FileMutation) SetOp(op Op)
- func (m *FileMutation) SetSize(i int)
- func (m *FileMutation) Size() (r int, exists bool)
- func (m *FileMutation) TomesCleared() bool
- func (m *FileMutation) TomesIDs() (ids []int)
- func (m FileMutation) Tx() (*Tx, error)
- func (m *FileMutation) Type() string
- func (m *FileMutation) Where(ps ...predicate.File)
- func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
- type FileOrder
- type FileOrderField
- type FilePaginateOption
- type FileQuery
- func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
- func (fq *FileQuery) All(ctx context.Context) ([]*File, error)
- func (fq *FileQuery) AllX(ctx context.Context) []*File
- func (fq *FileQuery) Clone() *FileQuery
- func (f *FileQuery) CollectFields(ctx context.Context, satisfies ...string) (*FileQuery, error)
- func (fq *FileQuery) Count(ctx context.Context) (int, error)
- func (fq *FileQuery) CountX(ctx context.Context) int
- func (fq *FileQuery) Exist(ctx context.Context) (bool, error)
- func (fq *FileQuery) ExistX(ctx context.Context) bool
- func (fq *FileQuery) First(ctx context.Context) (*File, error)
- func (fq *FileQuery) FirstID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) FirstIDX(ctx context.Context) int
- func (fq *FileQuery) FirstX(ctx context.Context) *File
- func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
- func (fq *FileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (fq *FileQuery) IDsX(ctx context.Context) []int
- func (fq *FileQuery) Limit(limit int) *FileQuery
- func (fq *FileQuery) Offset(offset int) *FileQuery
- func (fq *FileQuery) Only(ctx context.Context) (*File, error)
- func (fq *FileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (fq *FileQuery) OnlyIDX(ctx context.Context) int
- func (fq *FileQuery) OnlyX(ctx context.Context) *File
- func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
- func (f *FileQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*FileConnection, error)
- func (fq *FileQuery) QueryTomes() *TomeQuery
- func (fq *FileQuery) Select(fields ...string) *FileSelect
- func (fq *FileQuery) Unique(unique bool) *FileQuery
- func (fq *FileQuery) Where(ps ...predicate.File) *FileQuery
- func (fq *FileQuery) WithNamedTomes(name string, opts ...func(*TomeQuery)) *FileQuery
- func (fq *FileQuery) WithTomes(opts ...func(*TomeQuery)) *FileQuery
- type FileSelect
- func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
- func (s *FileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *FileSelect) BoolX(ctx context.Context) bool
- func (s *FileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *FileSelect) BoolsX(ctx context.Context) []bool
- func (s *FileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *FileSelect) Float64X(ctx context.Context) float64
- func (s *FileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *FileSelect) Float64sX(ctx context.Context) []float64
- func (s *FileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *FileSelect) IntX(ctx context.Context) int
- func (s *FileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *FileSelect) IntsX(ctx context.Context) []int
- func (fs *FileSelect) Scan(ctx context.Context, v any) error
- func (s *FileSelect) ScanX(ctx context.Context, v any)
- func (s *FileSelect) String(ctx context.Context) (_ string, err error)
- func (s *FileSelect) StringX(ctx context.Context) string
- func (s *FileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *FileSelect) StringsX(ctx context.Context) []string
- type FileUpdate
- func (fu *FileUpdate) AddSize(i int) *FileUpdate
- func (fu *FileUpdate) AddTomeIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) AddTomes(t ...*Tome) *FileUpdate
- func (fu *FileUpdate) ClearTomes() *FileUpdate
- func (fu *FileUpdate) Exec(ctx context.Context) error
- func (fu *FileUpdate) ExecX(ctx context.Context)
- func (fu *FileUpdate) Mutation() *FileMutation
- func (fu *FileUpdate) RemoveTomeIDs(ids ...int) *FileUpdate
- func (fu *FileUpdate) RemoveTomes(t ...*Tome) *FileUpdate
- func (fu *FileUpdate) Save(ctx context.Context) (int, error)
- func (fu *FileUpdate) SaveX(ctx context.Context) int
- func (fu *FileUpdate) SetContent(b []byte) *FileUpdate
- func (fu *FileUpdate) SetHash(s string) *FileUpdate
- func (fu *FileUpdate) SetLastModifiedAt(t time.Time) *FileUpdate
- func (fu *FileUpdate) SetName(s string) *FileUpdate
- func (fu *FileUpdate) SetNillableSize(i *int) *FileUpdate
- func (fu *FileUpdate) SetSize(i int) *FileUpdate
- func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
- type FileUpdateOne
- func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddTomeIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) AddTomes(t ...*Tome) *FileUpdateOne
- func (fuo *FileUpdateOne) ClearTomes() *FileUpdateOne
- func (fuo *FileUpdateOne) Exec(ctx context.Context) error
- func (fuo *FileUpdateOne) ExecX(ctx context.Context)
- func (fuo *FileUpdateOne) Mutation() *FileMutation
- func (fuo *FileUpdateOne) RemoveTomeIDs(ids ...int) *FileUpdateOne
- func (fuo *FileUpdateOne) RemoveTomes(t ...*Tome) *FileUpdateOne
- func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
- func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
- func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetContent(b []byte) *FileUpdateOne
- func (fuo *FileUpdateOne) SetHash(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetLastModifiedAt(t time.Time) *FileUpdateOne
- func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
- func (fuo *FileUpdateOne) SetNillableSize(i *int) *FileUpdateOne
- func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne
- func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
- type FileUpsert
- func (u *FileUpsert) AddSize(v int) *FileUpsert
- func (u *FileUpsert) SetContent(v []byte) *FileUpsert
- func (u *FileUpsert) SetHash(v string) *FileUpsert
- func (u *FileUpsert) SetLastModifiedAt(v time.Time) *FileUpsert
- func (u *FileUpsert) SetName(v string) *FileUpsert
- func (u *FileUpsert) SetSize(v int) *FileUpsert
- func (u *FileUpsert) UpdateContent() *FileUpsert
- func (u *FileUpsert) UpdateHash() *FileUpsert
- func (u *FileUpsert) UpdateLastModifiedAt() *FileUpsert
- func (u *FileUpsert) UpdateName() *FileUpsert
- func (u *FileUpsert) UpdateSize() *FileUpsert
- type FileUpsertBulk
- func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
- func (u *FileUpsertBulk) Exec(ctx context.Context) error
- func (u *FileUpsertBulk) ExecX(ctx context.Context)
- func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
- func (u *FileUpsertBulk) SetContent(v []byte) *FileUpsertBulk
- func (u *FileUpsertBulk) SetHash(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetLastModifiedAt(v time.Time) *FileUpsertBulk
- func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
- func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk
- func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateContent() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateHash() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateLastModifiedAt() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
- func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
- type FileUpsertOne
- func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne
- func (u *FileUpsertOne) DoNothing() *FileUpsertOne
- func (u *FileUpsertOne) Exec(ctx context.Context) error
- func (u *FileUpsertOne) ExecX(ctx context.Context)
- func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *FileUpsertOne) IDX(ctx context.Context) int
- func (u *FileUpsertOne) Ignore() *FileUpsertOne
- func (u *FileUpsertOne) SetContent(v []byte) *FileUpsertOne
- func (u *FileUpsertOne) SetHash(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetLastModifiedAt(v time.Time) *FileUpsertOne
- func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
- func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne
- func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
- func (u *FileUpsertOne) UpdateContent() *FileUpsertOne
- func (u *FileUpsertOne) UpdateHash() *FileUpsertOne
- func (u *FileUpsertOne) UpdateLastModifiedAt() *FileUpsertOne
- func (u *FileUpsertOne) UpdateName() *FileUpsertOne
- func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
- func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
- type FileWhereInput
- type Files
- type Hook
- type Host
- func (h *Host) Beacons(ctx context.Context) (result []*Beacon, err error)
- func (h *Host) Files(ctx context.Context) (result []*HostFile, err error)
- func (n *Host) IsNode()
- func (h *Host) NamedBeacons(name string) ([]*Beacon, error)
- func (h *Host) NamedFiles(name string) ([]*HostFile, error)
- func (h *Host) NamedProcesses(name string) ([]*HostProcess, error)
- func (h *Host) NamedTags(name string) ([]*Tag, error)
- func (h *Host) Processes(ctx context.Context) (result []*HostProcess, err error)
- func (h *Host) QueryBeacons() *BeaconQuery
- func (h *Host) QueryFiles() *HostFileQuery
- func (h *Host) QueryProcesses() *HostProcessQuery
- func (h *Host) QueryTags() *TagQuery
- func (h *Host) String() string
- func (h *Host) Tags(ctx context.Context) (result []*Tag, err error)
- func (h *Host) ToEdge(order *HostOrder) *HostEdge
- func (h *Host) Unwrap() *Host
- func (h *Host) Update() *HostUpdateOne
- func (h *Host) Value(name string) (ent.Value, error)
- type HostClient
- func (c *HostClient) Create() *HostCreate
- func (c *HostClient) CreateBulk(builders ...*HostCreate) *HostCreateBulk
- func (c *HostClient) Delete() *HostDelete
- func (c *HostClient) DeleteOne(h *Host) *HostDeleteOne
- func (c *HostClient) DeleteOneID(id int) *HostDeleteOne
- func (c *HostClient) Get(ctx context.Context, id int) (*Host, error)
- func (c *HostClient) GetX(ctx context.Context, id int) *Host
- func (c *HostClient) Hooks() []Hook
- func (c *HostClient) Intercept(interceptors ...Interceptor)
- func (c *HostClient) Interceptors() []Interceptor
- func (c *HostClient) MapCreateBulk(slice any, setFunc func(*HostCreate, int)) *HostCreateBulk
- func (c *HostClient) Query() *HostQuery
- func (c *HostClient) QueryBeacons(h *Host) *BeaconQuery
- func (c *HostClient) QueryFiles(h *Host) *HostFileQuery
- func (c *HostClient) QueryProcesses(h *Host) *HostProcessQuery
- func (c *HostClient) QueryTags(h *Host) *TagQuery
- func (c *HostClient) Update() *HostUpdate
- func (c *HostClient) UpdateOne(h *Host) *HostUpdateOne
- func (c *HostClient) UpdateOneID(id int) *HostUpdateOne
- func (c *HostClient) Use(hooks ...Hook)
- type HostConnection
- type HostCreate
- func (hc *HostCreate) AddBeaconIDs(ids ...int) *HostCreate
- func (hc *HostCreate) AddBeacons(b ...*Beacon) *HostCreate
- func (hc *HostCreate) AddFileIDs(ids ...int) *HostCreate
- func (hc *HostCreate) AddFiles(h ...*HostFile) *HostCreate
- func (hc *HostCreate) AddProcessIDs(ids ...int) *HostCreate
- func (hc *HostCreate) AddProcesses(h ...*HostProcess) *HostCreate
- func (hc *HostCreate) AddTagIDs(ids ...int) *HostCreate
- func (hc *HostCreate) AddTags(t ...*Tag) *HostCreate
- func (hc *HostCreate) Exec(ctx context.Context) error
- func (hc *HostCreate) ExecX(ctx context.Context)
- func (hc *HostCreate) Mutation() *HostMutation
- func (hc *HostCreate) OnConflict(opts ...sql.ConflictOption) *HostUpsertOne
- func (hc *HostCreate) OnConflictColumns(columns ...string) *HostUpsertOne
- func (hc *HostCreate) Save(ctx context.Context) (*Host, error)
- func (hc *HostCreate) SaveX(ctx context.Context) *Host
- func (hc *HostCreate) SetCreatedAt(t time.Time) *HostCreate
- func (hc *HostCreate) SetIdentifier(s string) *HostCreate
- func (hc *HostCreate) SetLastModifiedAt(t time.Time) *HostCreate
- func (hc *HostCreate) SetLastSeenAt(t time.Time) *HostCreate
- func (hc *HostCreate) SetName(s string) *HostCreate
- func (hc *HostCreate) SetNillableCreatedAt(t *time.Time) *HostCreate
- func (hc *HostCreate) SetNillableLastModifiedAt(t *time.Time) *HostCreate
- func (hc *HostCreate) SetNillableLastSeenAt(t *time.Time) *HostCreate
- func (hc *HostCreate) SetNillableName(s *string) *HostCreate
- func (hc *HostCreate) SetNillablePrimaryIP(s *string) *HostCreate
- func (hc *HostCreate) SetPlatform(cp c2pb.Host_Platform) *HostCreate
- func (hc *HostCreate) SetPrimaryIP(s string) *HostCreate
- type HostCreateBulk
- func (hcb *HostCreateBulk) Exec(ctx context.Context) error
- func (hcb *HostCreateBulk) ExecX(ctx context.Context)
- func (hcb *HostCreateBulk) OnConflict(opts ...sql.ConflictOption) *HostUpsertBulk
- func (hcb *HostCreateBulk) OnConflictColumns(columns ...string) *HostUpsertBulk
- func (hcb *HostCreateBulk) Save(ctx context.Context) ([]*Host, error)
- func (hcb *HostCreateBulk) SaveX(ctx context.Context) []*Host
- type HostDelete
- type HostDeleteOne
- type HostEdge
- type HostEdges
- type HostFile
- func (hf *HostFile) Host(ctx context.Context) (*Host, error)
- func (n *HostFile) IsNode()
- func (hf *HostFile) QueryHost() *HostQuery
- func (hf *HostFile) QueryTask() *TaskQuery
- func (hf *HostFile) String() string
- func (hf *HostFile) Task(ctx context.Context) (*Task, error)
- func (hf *HostFile) ToEdge(order *HostFileOrder) *HostFileEdge
- func (hf *HostFile) Unwrap() *HostFile
- func (hf *HostFile) Update() *HostFileUpdateOne
- func (hf *HostFile) Value(name string) (ent.Value, error)
- type HostFileClient
- func (c *HostFileClient) Create() *HostFileCreate
- func (c *HostFileClient) CreateBulk(builders ...*HostFileCreate) *HostFileCreateBulk
- func (c *HostFileClient) Delete() *HostFileDelete
- func (c *HostFileClient) DeleteOne(hf *HostFile) *HostFileDeleteOne
- func (c *HostFileClient) DeleteOneID(id int) *HostFileDeleteOne
- func (c *HostFileClient) Get(ctx context.Context, id int) (*HostFile, error)
- func (c *HostFileClient) GetX(ctx context.Context, id int) *HostFile
- func (c *HostFileClient) Hooks() []Hook
- func (c *HostFileClient) Intercept(interceptors ...Interceptor)
- func (c *HostFileClient) Interceptors() []Interceptor
- func (c *HostFileClient) MapCreateBulk(slice any, setFunc func(*HostFileCreate, int)) *HostFileCreateBulk
- func (c *HostFileClient) Query() *HostFileQuery
- func (c *HostFileClient) QueryHost(hf *HostFile) *HostQuery
- func (c *HostFileClient) QueryTask(hf *HostFile) *TaskQuery
- func (c *HostFileClient) Update() *HostFileUpdate
- func (c *HostFileClient) UpdateOne(hf *HostFile) *HostFileUpdateOne
- func (c *HostFileClient) UpdateOneID(id int) *HostFileUpdateOne
- func (c *HostFileClient) Use(hooks ...Hook)
- type HostFileConnection
- type HostFileCreate
- func (hfc *HostFileCreate) Exec(ctx context.Context) error
- func (hfc *HostFileCreate) ExecX(ctx context.Context)
- func (hfc *HostFileCreate) Mutation() *HostFileMutation
- func (hfc *HostFileCreate) OnConflict(opts ...sql.ConflictOption) *HostFileUpsertOne
- func (hfc *HostFileCreate) OnConflictColumns(columns ...string) *HostFileUpsertOne
- func (hfc *HostFileCreate) Save(ctx context.Context) (*HostFile, error)
- func (hfc *HostFileCreate) SaveX(ctx context.Context) *HostFile
- func (hfc *HostFileCreate) SetContent(b []byte) *HostFileCreate
- func (hfc *HostFileCreate) SetCreatedAt(t time.Time) *HostFileCreate
- func (hfc *HostFileCreate) SetGroup(s string) *HostFileCreate
- func (hfc *HostFileCreate) SetHash(s string) *HostFileCreate
- func (hfc *HostFileCreate) SetHost(h *Host) *HostFileCreate
- func (hfc *HostFileCreate) SetHostID(id int) *HostFileCreate
- func (hfc *HostFileCreate) SetLastModifiedAt(t time.Time) *HostFileCreate
- func (hfc *HostFileCreate) SetNillableCreatedAt(t *time.Time) *HostFileCreate
- func (hfc *HostFileCreate) SetNillableGroup(s *string) *HostFileCreate
- func (hfc *HostFileCreate) SetNillableHash(s *string) *HostFileCreate
- func (hfc *HostFileCreate) SetNillableLastModifiedAt(t *time.Time) *HostFileCreate
- func (hfc *HostFileCreate) SetNillableOwner(s *string) *HostFileCreate
- func (hfc *HostFileCreate) SetNillablePermissions(s *string) *HostFileCreate
- func (hfc *HostFileCreate) SetNillableSize(i *int) *HostFileCreate
- func (hfc *HostFileCreate) SetOwner(s string) *HostFileCreate
- func (hfc *HostFileCreate) SetPath(s string) *HostFileCreate
- func (hfc *HostFileCreate) SetPermissions(s string) *HostFileCreate
- func (hfc *HostFileCreate) SetSize(i int) *HostFileCreate
- func (hfc *HostFileCreate) SetTask(t *Task) *HostFileCreate
- func (hfc *HostFileCreate) SetTaskID(id int) *HostFileCreate
- type HostFileCreateBulk
- func (hfcb *HostFileCreateBulk) Exec(ctx context.Context) error
- func (hfcb *HostFileCreateBulk) ExecX(ctx context.Context)
- func (hfcb *HostFileCreateBulk) OnConflict(opts ...sql.ConflictOption) *HostFileUpsertBulk
- func (hfcb *HostFileCreateBulk) OnConflictColumns(columns ...string) *HostFileUpsertBulk
- func (hfcb *HostFileCreateBulk) Save(ctx context.Context) ([]*HostFile, error)
- func (hfcb *HostFileCreateBulk) SaveX(ctx context.Context) []*HostFile
- type HostFileDelete
- type HostFileDeleteOne
- type HostFileEdge
- type HostFileEdges
- type HostFileGroupBy
- func (hfgb *HostFileGroupBy) Aggregate(fns ...AggregateFunc) *HostFileGroupBy
- func (s *HostFileGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HostFileGroupBy) BoolX(ctx context.Context) bool
- func (s *HostFileGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HostFileGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HostFileGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HostFileGroupBy) Float64X(ctx context.Context) float64
- func (s *HostFileGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HostFileGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HostFileGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HostFileGroupBy) IntX(ctx context.Context) int
- func (s *HostFileGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HostFileGroupBy) IntsX(ctx context.Context) []int
- func (hfgb *HostFileGroupBy) Scan(ctx context.Context, v any) error
- func (s *HostFileGroupBy) ScanX(ctx context.Context, v any)
- func (s *HostFileGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HostFileGroupBy) StringX(ctx context.Context) string
- func (s *HostFileGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HostFileGroupBy) StringsX(ctx context.Context) []string
- type HostFileMutation
- func (m *HostFileMutation) AddField(name string, value ent.Value) error
- func (m *HostFileMutation) AddSize(i int)
- func (m *HostFileMutation) AddedEdges() []string
- func (m *HostFileMutation) AddedField(name string) (ent.Value, bool)
- func (m *HostFileMutation) AddedFields() []string
- func (m *HostFileMutation) AddedIDs(name string) []ent.Value
- func (m *HostFileMutation) AddedSize() (r int, exists bool)
- func (m *HostFileMutation) ClearContent()
- func (m *HostFileMutation) ClearEdge(name string) error
- func (m *HostFileMutation) ClearField(name string) error
- func (m *HostFileMutation) ClearGroup()
- func (m *HostFileMutation) ClearHash()
- func (m *HostFileMutation) ClearHost()
- func (m *HostFileMutation) ClearOwner()
- func (m *HostFileMutation) ClearPermissions()
- func (m *HostFileMutation) ClearTask()
- func (m *HostFileMutation) ClearedEdges() []string
- func (m *HostFileMutation) ClearedFields() []string
- func (m HostFileMutation) Client() *Client
- func (m *HostFileMutation) Content() (r []byte, exists bool)
- func (m *HostFileMutation) ContentCleared() bool
- func (m *HostFileMutation) CreatedAt() (r time.Time, exists bool)
- func (m *HostFileMutation) EdgeCleared(name string) bool
- func (m *HostFileMutation) Field(name string) (ent.Value, bool)
- func (m *HostFileMutation) FieldCleared(name string) bool
- func (m *HostFileMutation) Fields() []string
- func (m *HostFileMutation) Group() (r string, exists bool)
- func (m *HostFileMutation) GroupCleared() bool
- func (m *HostFileMutation) Hash() (r string, exists bool)
- func (m *HostFileMutation) HashCleared() bool
- func (m *HostFileMutation) HostCleared() bool
- func (m *HostFileMutation) HostID() (id int, exists bool)
- func (m *HostFileMutation) HostIDs() (ids []int)
- func (m *HostFileMutation) ID() (id int, exists bool)
- func (m *HostFileMutation) IDs(ctx context.Context) ([]int, error)
- func (m *HostFileMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *HostFileMutation) OldContent(ctx context.Context) (v []byte, err error)
- func (m *HostFileMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *HostFileMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HostFileMutation) OldGroup(ctx context.Context) (v string, err error)
- func (m *HostFileMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *HostFileMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *HostFileMutation) OldOwner(ctx context.Context) (v string, err error)
- func (m *HostFileMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *HostFileMutation) OldPermissions(ctx context.Context) (v string, err error)
- func (m *HostFileMutation) OldSize(ctx context.Context) (v int, err error)
- func (m *HostFileMutation) Op() Op
- func (m *HostFileMutation) Owner() (r string, exists bool)
- func (m *HostFileMutation) OwnerCleared() bool
- func (m *HostFileMutation) Path() (r string, exists bool)
- func (m *HostFileMutation) Permissions() (r string, exists bool)
- func (m *HostFileMutation) PermissionsCleared() bool
- func (m *HostFileMutation) RemovedEdges() []string
- func (m *HostFileMutation) RemovedIDs(name string) []ent.Value
- func (m *HostFileMutation) ResetContent()
- func (m *HostFileMutation) ResetCreatedAt()
- func (m *HostFileMutation) ResetEdge(name string) error
- func (m *HostFileMutation) ResetField(name string) error
- func (m *HostFileMutation) ResetGroup()
- func (m *HostFileMutation) ResetHash()
- func (m *HostFileMutation) ResetHost()
- func (m *HostFileMutation) ResetLastModifiedAt()
- func (m *HostFileMutation) ResetOwner()
- func (m *HostFileMutation) ResetPath()
- func (m *HostFileMutation) ResetPermissions()
- func (m *HostFileMutation) ResetSize()
- func (m *HostFileMutation) ResetTask()
- func (m *HostFileMutation) SetContent(b []byte)
- func (m *HostFileMutation) SetCreatedAt(t time.Time)
- func (m *HostFileMutation) SetField(name string, value ent.Value) error
- func (m *HostFileMutation) SetGroup(s string)
- func (m *HostFileMutation) SetHash(s string)
- func (m *HostFileMutation) SetHostID(id int)
- func (m *HostFileMutation) SetLastModifiedAt(t time.Time)
- func (m *HostFileMutation) SetOp(op Op)
- func (m *HostFileMutation) SetOwner(s string)
- func (m *HostFileMutation) SetPath(s string)
- func (m *HostFileMutation) SetPermissions(s string)
- func (m *HostFileMutation) SetSize(i int)
- func (m *HostFileMutation) SetTaskID(id int)
- func (m *HostFileMutation) Size() (r int, exists bool)
- func (m *HostFileMutation) TaskCleared() bool
- func (m *HostFileMutation) TaskID() (id int, exists bool)
- func (m *HostFileMutation) TaskIDs() (ids []int)
- func (m HostFileMutation) Tx() (*Tx, error)
- func (m *HostFileMutation) Type() string
- func (m *HostFileMutation) Where(ps ...predicate.HostFile)
- func (m *HostFileMutation) WhereP(ps ...func(*sql.Selector))
- type HostFileOrder
- type HostFileOrderField
- type HostFilePaginateOption
- type HostFileQuery
- func (hfq *HostFileQuery) Aggregate(fns ...AggregateFunc) *HostFileSelect
- func (hfq *HostFileQuery) All(ctx context.Context) ([]*HostFile, error)
- func (hfq *HostFileQuery) AllX(ctx context.Context) []*HostFile
- func (hfq *HostFileQuery) Clone() *HostFileQuery
- func (hf *HostFileQuery) CollectFields(ctx context.Context, satisfies ...string) (*HostFileQuery, error)
- func (hfq *HostFileQuery) Count(ctx context.Context) (int, error)
- func (hfq *HostFileQuery) CountX(ctx context.Context) int
- func (hfq *HostFileQuery) Exist(ctx context.Context) (bool, error)
- func (hfq *HostFileQuery) ExistX(ctx context.Context) bool
- func (hfq *HostFileQuery) First(ctx context.Context) (*HostFile, error)
- func (hfq *HostFileQuery) FirstID(ctx context.Context) (id int, err error)
- func (hfq *HostFileQuery) FirstIDX(ctx context.Context) int
- func (hfq *HostFileQuery) FirstX(ctx context.Context) *HostFile
- func (hfq *HostFileQuery) GroupBy(field string, fields ...string) *HostFileGroupBy
- func (hfq *HostFileQuery) IDs(ctx context.Context) (ids []int, err error)
- func (hfq *HostFileQuery) IDsX(ctx context.Context) []int
- func (hfq *HostFileQuery) Limit(limit int) *HostFileQuery
- func (hfq *HostFileQuery) Offset(offset int) *HostFileQuery
- func (hfq *HostFileQuery) Only(ctx context.Context) (*HostFile, error)
- func (hfq *HostFileQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hfq *HostFileQuery) OnlyIDX(ctx context.Context) int
- func (hfq *HostFileQuery) OnlyX(ctx context.Context) *HostFile
- func (hfq *HostFileQuery) Order(o ...hostfile.OrderOption) *HostFileQuery
- func (hf *HostFileQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*HostFileConnection, error)
- func (hfq *HostFileQuery) QueryHost() *HostQuery
- func (hfq *HostFileQuery) QueryTask() *TaskQuery
- func (hfq *HostFileQuery) Select(fields ...string) *HostFileSelect
- func (hfq *HostFileQuery) Unique(unique bool) *HostFileQuery
- func (hfq *HostFileQuery) Where(ps ...predicate.HostFile) *HostFileQuery
- func (hfq *HostFileQuery) WithHost(opts ...func(*HostQuery)) *HostFileQuery
- func (hfq *HostFileQuery) WithTask(opts ...func(*TaskQuery)) *HostFileQuery
- type HostFileSelect
- func (hfs *HostFileSelect) Aggregate(fns ...AggregateFunc) *HostFileSelect
- func (s *HostFileSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HostFileSelect) BoolX(ctx context.Context) bool
- func (s *HostFileSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HostFileSelect) BoolsX(ctx context.Context) []bool
- func (s *HostFileSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HostFileSelect) Float64X(ctx context.Context) float64
- func (s *HostFileSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HostFileSelect) Float64sX(ctx context.Context) []float64
- func (s *HostFileSelect) Int(ctx context.Context) (_ int, err error)
- func (s *HostFileSelect) IntX(ctx context.Context) int
- func (s *HostFileSelect) Ints(ctx context.Context) ([]int, error)
- func (s *HostFileSelect) IntsX(ctx context.Context) []int
- func (hfs *HostFileSelect) Scan(ctx context.Context, v any) error
- func (s *HostFileSelect) ScanX(ctx context.Context, v any)
- func (s *HostFileSelect) String(ctx context.Context) (_ string, err error)
- func (s *HostFileSelect) StringX(ctx context.Context) string
- func (s *HostFileSelect) Strings(ctx context.Context) ([]string, error)
- func (s *HostFileSelect) StringsX(ctx context.Context) []string
- type HostFileUpdate
- func (hfu *HostFileUpdate) AddSize(i int) *HostFileUpdate
- func (hfu *HostFileUpdate) ClearContent() *HostFileUpdate
- func (hfu *HostFileUpdate) ClearGroup() *HostFileUpdate
- func (hfu *HostFileUpdate) ClearHash() *HostFileUpdate
- func (hfu *HostFileUpdate) ClearHost() *HostFileUpdate
- func (hfu *HostFileUpdate) ClearOwner() *HostFileUpdate
- func (hfu *HostFileUpdate) ClearPermissions() *HostFileUpdate
- func (hfu *HostFileUpdate) ClearTask() *HostFileUpdate
- func (hfu *HostFileUpdate) Exec(ctx context.Context) error
- func (hfu *HostFileUpdate) ExecX(ctx context.Context)
- func (hfu *HostFileUpdate) Mutation() *HostFileMutation
- func (hfu *HostFileUpdate) Save(ctx context.Context) (int, error)
- func (hfu *HostFileUpdate) SaveX(ctx context.Context) int
- func (hfu *HostFileUpdate) SetContent(b []byte) *HostFileUpdate
- func (hfu *HostFileUpdate) SetGroup(s string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetHash(s string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetHost(h *Host) *HostFileUpdate
- func (hfu *HostFileUpdate) SetHostID(id int) *HostFileUpdate
- func (hfu *HostFileUpdate) SetLastModifiedAt(t time.Time) *HostFileUpdate
- func (hfu *HostFileUpdate) SetNillableGroup(s *string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetNillableHash(s *string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetNillableOwner(s *string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetNillablePermissions(s *string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetNillableSize(i *int) *HostFileUpdate
- func (hfu *HostFileUpdate) SetOwner(s string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetPath(s string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetPermissions(s string) *HostFileUpdate
- func (hfu *HostFileUpdate) SetSize(i int) *HostFileUpdate
- func (hfu *HostFileUpdate) SetTask(t *Task) *HostFileUpdate
- func (hfu *HostFileUpdate) SetTaskID(id int) *HostFileUpdate
- func (hfu *HostFileUpdate) Where(ps ...predicate.HostFile) *HostFileUpdate
- type HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) AddSize(i int) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) ClearContent() *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) ClearGroup() *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) ClearHash() *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) ClearHost() *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) ClearOwner() *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) ClearPermissions() *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) ClearTask() *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) Exec(ctx context.Context) error
- func (hfuo *HostFileUpdateOne) ExecX(ctx context.Context)
- func (hfuo *HostFileUpdateOne) Mutation() *HostFileMutation
- func (hfuo *HostFileUpdateOne) Save(ctx context.Context) (*HostFile, error)
- func (hfuo *HostFileUpdateOne) SaveX(ctx context.Context) *HostFile
- func (hfuo *HostFileUpdateOne) Select(field string, fields ...string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetContent(b []byte) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetGroup(s string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetHash(s string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetHost(h *Host) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetHostID(id int) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetLastModifiedAt(t time.Time) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetNillableGroup(s *string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetNillableHash(s *string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetNillableOwner(s *string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetNillablePermissions(s *string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetNillableSize(i *int) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetOwner(s string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetPath(s string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetPermissions(s string) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetSize(i int) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetTask(t *Task) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) SetTaskID(id int) *HostFileUpdateOne
- func (hfuo *HostFileUpdateOne) Where(ps ...predicate.HostFile) *HostFileUpdateOne
- type HostFileUpsert
- func (u *HostFileUpsert) AddSize(v int) *HostFileUpsert
- func (u *HostFileUpsert) ClearContent() *HostFileUpsert
- func (u *HostFileUpsert) ClearGroup() *HostFileUpsert
- func (u *HostFileUpsert) ClearHash() *HostFileUpsert
- func (u *HostFileUpsert) ClearOwner() *HostFileUpsert
- func (u *HostFileUpsert) ClearPermissions() *HostFileUpsert
- func (u *HostFileUpsert) SetContent(v []byte) *HostFileUpsert
- func (u *HostFileUpsert) SetGroup(v string) *HostFileUpsert
- func (u *HostFileUpsert) SetHash(v string) *HostFileUpsert
- func (u *HostFileUpsert) SetLastModifiedAt(v time.Time) *HostFileUpsert
- func (u *HostFileUpsert) SetOwner(v string) *HostFileUpsert
- func (u *HostFileUpsert) SetPath(v string) *HostFileUpsert
- func (u *HostFileUpsert) SetPermissions(v string) *HostFileUpsert
- func (u *HostFileUpsert) SetSize(v int) *HostFileUpsert
- func (u *HostFileUpsert) UpdateContent() *HostFileUpsert
- func (u *HostFileUpsert) UpdateGroup() *HostFileUpsert
- func (u *HostFileUpsert) UpdateHash() *HostFileUpsert
- func (u *HostFileUpsert) UpdateLastModifiedAt() *HostFileUpsert
- func (u *HostFileUpsert) UpdateOwner() *HostFileUpsert
- func (u *HostFileUpsert) UpdatePath() *HostFileUpsert
- func (u *HostFileUpsert) UpdatePermissions() *HostFileUpsert
- func (u *HostFileUpsert) UpdateSize() *HostFileUpsert
- type HostFileUpsertBulk
- func (u *HostFileUpsertBulk) AddSize(v int) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) ClearContent() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) ClearGroup() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) ClearHash() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) ClearOwner() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) ClearPermissions() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) DoNothing() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) Exec(ctx context.Context) error
- func (u *HostFileUpsertBulk) ExecX(ctx context.Context)
- func (u *HostFileUpsertBulk) Ignore() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetContent(v []byte) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetGroup(v string) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetHash(v string) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetLastModifiedAt(v time.Time) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetOwner(v string) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetPath(v string) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetPermissions(v string) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) SetSize(v int) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) Update(set func(*HostFileUpsert)) *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdateContent() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdateGroup() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdateHash() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdateLastModifiedAt() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdateNewValues() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdateOwner() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdatePath() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdatePermissions() *HostFileUpsertBulk
- func (u *HostFileUpsertBulk) UpdateSize() *HostFileUpsertBulk
- type HostFileUpsertOne
- func (u *HostFileUpsertOne) AddSize(v int) *HostFileUpsertOne
- func (u *HostFileUpsertOne) ClearContent() *HostFileUpsertOne
- func (u *HostFileUpsertOne) ClearGroup() *HostFileUpsertOne
- func (u *HostFileUpsertOne) ClearHash() *HostFileUpsertOne
- func (u *HostFileUpsertOne) ClearOwner() *HostFileUpsertOne
- func (u *HostFileUpsertOne) ClearPermissions() *HostFileUpsertOne
- func (u *HostFileUpsertOne) DoNothing() *HostFileUpsertOne
- func (u *HostFileUpsertOne) Exec(ctx context.Context) error
- func (u *HostFileUpsertOne) ExecX(ctx context.Context)
- func (u *HostFileUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *HostFileUpsertOne) IDX(ctx context.Context) int
- func (u *HostFileUpsertOne) Ignore() *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetContent(v []byte) *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetGroup(v string) *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetHash(v string) *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetLastModifiedAt(v time.Time) *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetOwner(v string) *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetPath(v string) *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetPermissions(v string) *HostFileUpsertOne
- func (u *HostFileUpsertOne) SetSize(v int) *HostFileUpsertOne
- func (u *HostFileUpsertOne) Update(set func(*HostFileUpsert)) *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdateContent() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdateGroup() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdateHash() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdateLastModifiedAt() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdateNewValues() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdateOwner() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdatePath() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdatePermissions() *HostFileUpsertOne
- func (u *HostFileUpsertOne) UpdateSize() *HostFileUpsertOne
- type HostFileWhereInput
- type HostFiles
- type HostGroupBy
- func (hgb *HostGroupBy) Aggregate(fns ...AggregateFunc) *HostGroupBy
- func (s *HostGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HostGroupBy) BoolX(ctx context.Context) bool
- func (s *HostGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HostGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HostGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HostGroupBy) Float64X(ctx context.Context) float64
- func (s *HostGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HostGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HostGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HostGroupBy) IntX(ctx context.Context) int
- func (s *HostGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HostGroupBy) IntsX(ctx context.Context) []int
- func (hgb *HostGroupBy) Scan(ctx context.Context, v any) error
- func (s *HostGroupBy) ScanX(ctx context.Context, v any)
- func (s *HostGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HostGroupBy) StringX(ctx context.Context) string
- func (s *HostGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HostGroupBy) StringsX(ctx context.Context) []string
- type HostMutation
- func (m *HostMutation) AddBeaconIDs(ids ...int)
- func (m *HostMutation) AddField(name string, value ent.Value) error
- func (m *HostMutation) AddFileIDs(ids ...int)
- func (m *HostMutation) AddProcessIDs(ids ...int)
- func (m *HostMutation) AddTagIDs(ids ...int)
- func (m *HostMutation) AddedEdges() []string
- func (m *HostMutation) AddedField(name string) (ent.Value, bool)
- func (m *HostMutation) AddedFields() []string
- func (m *HostMutation) AddedIDs(name string) []ent.Value
- func (m *HostMutation) BeaconsCleared() bool
- func (m *HostMutation) BeaconsIDs() (ids []int)
- func (m *HostMutation) ClearBeacons()
- func (m *HostMutation) ClearEdge(name string) error
- func (m *HostMutation) ClearField(name string) error
- func (m *HostMutation) ClearFiles()
- func (m *HostMutation) ClearLastSeenAt()
- func (m *HostMutation) ClearName()
- func (m *HostMutation) ClearPrimaryIP()
- func (m *HostMutation) ClearProcesses()
- func (m *HostMutation) ClearTags()
- func (m *HostMutation) ClearedEdges() []string
- func (m *HostMutation) ClearedFields() []string
- func (m HostMutation) Client() *Client
- func (m *HostMutation) CreatedAt() (r time.Time, exists bool)
- func (m *HostMutation) EdgeCleared(name string) bool
- func (m *HostMutation) Field(name string) (ent.Value, bool)
- func (m *HostMutation) FieldCleared(name string) bool
- func (m *HostMutation) Fields() []string
- func (m *HostMutation) FilesCleared() bool
- func (m *HostMutation) FilesIDs() (ids []int)
- func (m *HostMutation) ID() (id int, exists bool)
- func (m *HostMutation) IDs(ctx context.Context) ([]int, error)
- func (m *HostMutation) Identifier() (r string, exists bool)
- func (m *HostMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *HostMutation) LastSeenAt() (r time.Time, exists bool)
- func (m *HostMutation) LastSeenAtCleared() bool
- func (m *HostMutation) Name() (r string, exists bool)
- func (m *HostMutation) NameCleared() bool
- func (m *HostMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *HostMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HostMutation) OldIdentifier(ctx context.Context) (v string, err error)
- func (m *HostMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *HostMutation) OldLastSeenAt(ctx context.Context) (v time.Time, err error)
- func (m *HostMutation) OldName(ctx context.Context) (v string, err error)
- func (m *HostMutation) OldPlatform(ctx context.Context) (v c2pb.Host_Platform, err error)
- func (m *HostMutation) OldPrimaryIP(ctx context.Context) (v string, err error)
- func (m *HostMutation) Op() Op
- func (m *HostMutation) Platform() (r c2pb.Host_Platform, exists bool)
- func (m *HostMutation) PrimaryIP() (r string, exists bool)
- func (m *HostMutation) PrimaryIPCleared() bool
- func (m *HostMutation) ProcessesCleared() bool
- func (m *HostMutation) ProcessesIDs() (ids []int)
- func (m *HostMutation) RemoveBeaconIDs(ids ...int)
- func (m *HostMutation) RemoveFileIDs(ids ...int)
- func (m *HostMutation) RemoveProcessIDs(ids ...int)
- func (m *HostMutation) RemoveTagIDs(ids ...int)
- func (m *HostMutation) RemovedBeaconsIDs() (ids []int)
- func (m *HostMutation) RemovedEdges() []string
- func (m *HostMutation) RemovedFilesIDs() (ids []int)
- func (m *HostMutation) RemovedIDs(name string) []ent.Value
- func (m *HostMutation) RemovedProcessesIDs() (ids []int)
- func (m *HostMutation) RemovedTagsIDs() (ids []int)
- func (m *HostMutation) ResetBeacons()
- func (m *HostMutation) ResetCreatedAt()
- func (m *HostMutation) ResetEdge(name string) error
- func (m *HostMutation) ResetField(name string) error
- func (m *HostMutation) ResetFiles()
- func (m *HostMutation) ResetIdentifier()
- func (m *HostMutation) ResetLastModifiedAt()
- func (m *HostMutation) ResetLastSeenAt()
- func (m *HostMutation) ResetName()
- func (m *HostMutation) ResetPlatform()
- func (m *HostMutation) ResetPrimaryIP()
- func (m *HostMutation) ResetProcesses()
- func (m *HostMutation) ResetTags()
- func (m *HostMutation) SetCreatedAt(t time.Time)
- func (m *HostMutation) SetField(name string, value ent.Value) error
- func (m *HostMutation) SetIdentifier(s string)
- func (m *HostMutation) SetLastModifiedAt(t time.Time)
- func (m *HostMutation) SetLastSeenAt(t time.Time)
- func (m *HostMutation) SetName(s string)
- func (m *HostMutation) SetOp(op Op)
- func (m *HostMutation) SetPlatform(cp c2pb.Host_Platform)
- func (m *HostMutation) SetPrimaryIP(s string)
- func (m *HostMutation) TagsCleared() bool
- func (m *HostMutation) TagsIDs() (ids []int)
- func (m HostMutation) Tx() (*Tx, error)
- func (m *HostMutation) Type() string
- func (m *HostMutation) Where(ps ...predicate.Host)
- func (m *HostMutation) WhereP(ps ...func(*sql.Selector))
- type HostOrder
- type HostOrderField
- type HostPaginateOption
- type HostProcess
- func (hp *HostProcess) Host(ctx context.Context) (*Host, error)
- func (n *HostProcess) IsNode()
- func (hp *HostProcess) QueryHost() *HostQuery
- func (hp *HostProcess) QueryTask() *TaskQuery
- func (hp *HostProcess) String() string
- func (hp *HostProcess) Task(ctx context.Context) (*Task, error)
- func (hp *HostProcess) ToEdge(order *HostProcessOrder) *HostProcessEdge
- func (hp *HostProcess) Unwrap() *HostProcess
- func (hp *HostProcess) Update() *HostProcessUpdateOne
- func (hp *HostProcess) Value(name string) (ent.Value, error)
- type HostProcessClient
- func (c *HostProcessClient) Create() *HostProcessCreate
- func (c *HostProcessClient) CreateBulk(builders ...*HostProcessCreate) *HostProcessCreateBulk
- func (c *HostProcessClient) Delete() *HostProcessDelete
- func (c *HostProcessClient) DeleteOne(hp *HostProcess) *HostProcessDeleteOne
- func (c *HostProcessClient) DeleteOneID(id int) *HostProcessDeleteOne
- func (c *HostProcessClient) Get(ctx context.Context, id int) (*HostProcess, error)
- func (c *HostProcessClient) GetX(ctx context.Context, id int) *HostProcess
- func (c *HostProcessClient) Hooks() []Hook
- func (c *HostProcessClient) Intercept(interceptors ...Interceptor)
- func (c *HostProcessClient) Interceptors() []Interceptor
- func (c *HostProcessClient) MapCreateBulk(slice any, setFunc func(*HostProcessCreate, int)) *HostProcessCreateBulk
- func (c *HostProcessClient) Query() *HostProcessQuery
- func (c *HostProcessClient) QueryHost(hp *HostProcess) *HostQuery
- func (c *HostProcessClient) QueryTask(hp *HostProcess) *TaskQuery
- func (c *HostProcessClient) Update() *HostProcessUpdate
- func (c *HostProcessClient) UpdateOne(hp *HostProcess) *HostProcessUpdateOne
- func (c *HostProcessClient) UpdateOneID(id int) *HostProcessUpdateOne
- func (c *HostProcessClient) Use(hooks ...Hook)
- type HostProcessConnection
- type HostProcessCreate
- func (hpc *HostProcessCreate) Exec(ctx context.Context) error
- func (hpc *HostProcessCreate) ExecX(ctx context.Context)
- func (hpc *HostProcessCreate) Mutation() *HostProcessMutation
- func (hpc *HostProcessCreate) OnConflict(opts ...sql.ConflictOption) *HostProcessUpsertOne
- func (hpc *HostProcessCreate) OnConflictColumns(columns ...string) *HostProcessUpsertOne
- func (hpc *HostProcessCreate) Save(ctx context.Context) (*HostProcess, error)
- func (hpc *HostProcessCreate) SaveX(ctx context.Context) *HostProcess
- func (hpc *HostProcessCreate) SetCmd(s string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetCreatedAt(t time.Time) *HostProcessCreate
- func (hpc *HostProcessCreate) SetCwd(s string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetEnv(s string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetHost(h *Host) *HostProcessCreate
- func (hpc *HostProcessCreate) SetHostID(id int) *HostProcessCreate
- func (hpc *HostProcessCreate) SetLastModifiedAt(t time.Time) *HostProcessCreate
- func (hpc *HostProcessCreate) SetName(s string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetNillableCmd(s *string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetNillableCreatedAt(t *time.Time) *HostProcessCreate
- func (hpc *HostProcessCreate) SetNillableCwd(s *string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetNillableEnv(s *string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetNillableLastModifiedAt(t *time.Time) *HostProcessCreate
- func (hpc *HostProcessCreate) SetNillablePath(s *string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetPath(s string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetPid(u uint64) *HostProcessCreate
- func (hpc *HostProcessCreate) SetPpid(u uint64) *HostProcessCreate
- func (hpc *HostProcessCreate) SetPrincipal(s string) *HostProcessCreate
- func (hpc *HostProcessCreate) SetStatus(es epb.Process_Status) *HostProcessCreate
- func (hpc *HostProcessCreate) SetTask(t *Task) *HostProcessCreate
- func (hpc *HostProcessCreate) SetTaskID(id int) *HostProcessCreate
- type HostProcessCreateBulk
- func (hpcb *HostProcessCreateBulk) Exec(ctx context.Context) error
- func (hpcb *HostProcessCreateBulk) ExecX(ctx context.Context)
- func (hpcb *HostProcessCreateBulk) OnConflict(opts ...sql.ConflictOption) *HostProcessUpsertBulk
- func (hpcb *HostProcessCreateBulk) OnConflictColumns(columns ...string) *HostProcessUpsertBulk
- func (hpcb *HostProcessCreateBulk) Save(ctx context.Context) ([]*HostProcess, error)
- func (hpcb *HostProcessCreateBulk) SaveX(ctx context.Context) []*HostProcess
- type HostProcessDelete
- type HostProcessDeleteOne
- type HostProcessEdge
- type HostProcessEdges
- type HostProcessGroupBy
- func (hpgb *HostProcessGroupBy) Aggregate(fns ...AggregateFunc) *HostProcessGroupBy
- func (s *HostProcessGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *HostProcessGroupBy) BoolX(ctx context.Context) bool
- func (s *HostProcessGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *HostProcessGroupBy) BoolsX(ctx context.Context) []bool
- func (s *HostProcessGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *HostProcessGroupBy) Float64X(ctx context.Context) float64
- func (s *HostProcessGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *HostProcessGroupBy) Float64sX(ctx context.Context) []float64
- func (s *HostProcessGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *HostProcessGroupBy) IntX(ctx context.Context) int
- func (s *HostProcessGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *HostProcessGroupBy) IntsX(ctx context.Context) []int
- func (hpgb *HostProcessGroupBy) Scan(ctx context.Context, v any) error
- func (s *HostProcessGroupBy) ScanX(ctx context.Context, v any)
- func (s *HostProcessGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *HostProcessGroupBy) StringX(ctx context.Context) string
- func (s *HostProcessGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *HostProcessGroupBy) StringsX(ctx context.Context) []string
- type HostProcessMutation
- func (m *HostProcessMutation) AddField(name string, value ent.Value) error
- func (m *HostProcessMutation) AddPid(u int64)
- func (m *HostProcessMutation) AddPpid(u int64)
- func (m *HostProcessMutation) AddedEdges() []string
- func (m *HostProcessMutation) AddedField(name string) (ent.Value, bool)
- func (m *HostProcessMutation) AddedFields() []string
- func (m *HostProcessMutation) AddedIDs(name string) []ent.Value
- func (m *HostProcessMutation) AddedPid() (r int64, exists bool)
- func (m *HostProcessMutation) AddedPpid() (r int64, exists bool)
- func (m *HostProcessMutation) ClearCmd()
- func (m *HostProcessMutation) ClearCwd()
- func (m *HostProcessMutation) ClearEdge(name string) error
- func (m *HostProcessMutation) ClearEnv()
- func (m *HostProcessMutation) ClearField(name string) error
- func (m *HostProcessMutation) ClearHost()
- func (m *HostProcessMutation) ClearPath()
- func (m *HostProcessMutation) ClearTask()
- func (m *HostProcessMutation) ClearedEdges() []string
- func (m *HostProcessMutation) ClearedFields() []string
- func (m HostProcessMutation) Client() *Client
- func (m *HostProcessMutation) Cmd() (r string, exists bool)
- func (m *HostProcessMutation) CmdCleared() bool
- func (m *HostProcessMutation) CreatedAt() (r time.Time, exists bool)
- func (m *HostProcessMutation) Cwd() (r string, exists bool)
- func (m *HostProcessMutation) CwdCleared() bool
- func (m *HostProcessMutation) EdgeCleared(name string) bool
- func (m *HostProcessMutation) Env() (r string, exists bool)
- func (m *HostProcessMutation) EnvCleared() bool
- func (m *HostProcessMutation) Field(name string) (ent.Value, bool)
- func (m *HostProcessMutation) FieldCleared(name string) bool
- func (m *HostProcessMutation) Fields() []string
- func (m *HostProcessMutation) HostCleared() bool
- func (m *HostProcessMutation) HostID() (id int, exists bool)
- func (m *HostProcessMutation) HostIDs() (ids []int)
- func (m *HostProcessMutation) ID() (id int, exists bool)
- func (m *HostProcessMutation) IDs(ctx context.Context) ([]int, error)
- func (m *HostProcessMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *HostProcessMutation) Name() (r string, exists bool)
- func (m *HostProcessMutation) OldCmd(ctx context.Context) (v string, err error)
- func (m *HostProcessMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *HostProcessMutation) OldCwd(ctx context.Context) (v string, err error)
- func (m *HostProcessMutation) OldEnv(ctx context.Context) (v string, err error)
- func (m *HostProcessMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *HostProcessMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *HostProcessMutation) OldName(ctx context.Context) (v string, err error)
- func (m *HostProcessMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *HostProcessMutation) OldPid(ctx context.Context) (v uint64, err error)
- func (m *HostProcessMutation) OldPpid(ctx context.Context) (v uint64, err error)
- func (m *HostProcessMutation) OldPrincipal(ctx context.Context) (v string, err error)
- func (m *HostProcessMutation) OldStatus(ctx context.Context) (v epb.Process_Status, err error)
- func (m *HostProcessMutation) Op() Op
- func (m *HostProcessMutation) Path() (r string, exists bool)
- func (m *HostProcessMutation) PathCleared() bool
- func (m *HostProcessMutation) Pid() (r uint64, exists bool)
- func (m *HostProcessMutation) Ppid() (r uint64, exists bool)
- func (m *HostProcessMutation) Principal() (r string, exists bool)
- func (m *HostProcessMutation) RemovedEdges() []string
- func (m *HostProcessMutation) RemovedIDs(name string) []ent.Value
- func (m *HostProcessMutation) ResetCmd()
- func (m *HostProcessMutation) ResetCreatedAt()
- func (m *HostProcessMutation) ResetCwd()
- func (m *HostProcessMutation) ResetEdge(name string) error
- func (m *HostProcessMutation) ResetEnv()
- func (m *HostProcessMutation) ResetField(name string) error
- func (m *HostProcessMutation) ResetHost()
- func (m *HostProcessMutation) ResetLastModifiedAt()
- func (m *HostProcessMutation) ResetName()
- func (m *HostProcessMutation) ResetPath()
- func (m *HostProcessMutation) ResetPid()
- func (m *HostProcessMutation) ResetPpid()
- func (m *HostProcessMutation) ResetPrincipal()
- func (m *HostProcessMutation) ResetStatus()
- func (m *HostProcessMutation) ResetTask()
- func (m *HostProcessMutation) SetCmd(s string)
- func (m *HostProcessMutation) SetCreatedAt(t time.Time)
- func (m *HostProcessMutation) SetCwd(s string)
- func (m *HostProcessMutation) SetEnv(s string)
- func (m *HostProcessMutation) SetField(name string, value ent.Value) error
- func (m *HostProcessMutation) SetHostID(id int)
- func (m *HostProcessMutation) SetLastModifiedAt(t time.Time)
- func (m *HostProcessMutation) SetName(s string)
- func (m *HostProcessMutation) SetOp(op Op)
- func (m *HostProcessMutation) SetPath(s string)
- func (m *HostProcessMutation) SetPid(u uint64)
- func (m *HostProcessMutation) SetPpid(u uint64)
- func (m *HostProcessMutation) SetPrincipal(s string)
- func (m *HostProcessMutation) SetStatus(es epb.Process_Status)
- func (m *HostProcessMutation) SetTaskID(id int)
- func (m *HostProcessMutation) Status() (r epb.Process_Status, exists bool)
- func (m *HostProcessMutation) TaskCleared() bool
- func (m *HostProcessMutation) TaskID() (id int, exists bool)
- func (m *HostProcessMutation) TaskIDs() (ids []int)
- func (m HostProcessMutation) Tx() (*Tx, error)
- func (m *HostProcessMutation) Type() string
- func (m *HostProcessMutation) Where(ps ...predicate.HostProcess)
- func (m *HostProcessMutation) WhereP(ps ...func(*sql.Selector))
- type HostProcessOrder
- type HostProcessOrderField
- type HostProcessPaginateOption
- type HostProcessQuery
- func (hpq *HostProcessQuery) Aggregate(fns ...AggregateFunc) *HostProcessSelect
- func (hpq *HostProcessQuery) All(ctx context.Context) ([]*HostProcess, error)
- func (hpq *HostProcessQuery) AllX(ctx context.Context) []*HostProcess
- func (hpq *HostProcessQuery) Clone() *HostProcessQuery
- func (hp *HostProcessQuery) CollectFields(ctx context.Context, satisfies ...string) (*HostProcessQuery, error)
- func (hpq *HostProcessQuery) Count(ctx context.Context) (int, error)
- func (hpq *HostProcessQuery) CountX(ctx context.Context) int
- func (hpq *HostProcessQuery) Exist(ctx context.Context) (bool, error)
- func (hpq *HostProcessQuery) ExistX(ctx context.Context) bool
- func (hpq *HostProcessQuery) First(ctx context.Context) (*HostProcess, error)
- func (hpq *HostProcessQuery) FirstID(ctx context.Context) (id int, err error)
- func (hpq *HostProcessQuery) FirstIDX(ctx context.Context) int
- func (hpq *HostProcessQuery) FirstX(ctx context.Context) *HostProcess
- func (hpq *HostProcessQuery) GroupBy(field string, fields ...string) *HostProcessGroupBy
- func (hpq *HostProcessQuery) IDs(ctx context.Context) (ids []int, err error)
- func (hpq *HostProcessQuery) IDsX(ctx context.Context) []int
- func (hpq *HostProcessQuery) Limit(limit int) *HostProcessQuery
- func (hpq *HostProcessQuery) Offset(offset int) *HostProcessQuery
- func (hpq *HostProcessQuery) Only(ctx context.Context) (*HostProcess, error)
- func (hpq *HostProcessQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hpq *HostProcessQuery) OnlyIDX(ctx context.Context) int
- func (hpq *HostProcessQuery) OnlyX(ctx context.Context) *HostProcess
- func (hpq *HostProcessQuery) Order(o ...hostprocess.OrderOption) *HostProcessQuery
- func (hp *HostProcessQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*HostProcessConnection, error)
- func (hpq *HostProcessQuery) QueryHost() *HostQuery
- func (hpq *HostProcessQuery) QueryTask() *TaskQuery
- func (hpq *HostProcessQuery) Select(fields ...string) *HostProcessSelect
- func (hpq *HostProcessQuery) Unique(unique bool) *HostProcessQuery
- func (hpq *HostProcessQuery) Where(ps ...predicate.HostProcess) *HostProcessQuery
- func (hpq *HostProcessQuery) WithHost(opts ...func(*HostQuery)) *HostProcessQuery
- func (hpq *HostProcessQuery) WithTask(opts ...func(*TaskQuery)) *HostProcessQuery
- type HostProcessSelect
- func (hps *HostProcessSelect) Aggregate(fns ...AggregateFunc) *HostProcessSelect
- func (s *HostProcessSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HostProcessSelect) BoolX(ctx context.Context) bool
- func (s *HostProcessSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HostProcessSelect) BoolsX(ctx context.Context) []bool
- func (s *HostProcessSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HostProcessSelect) Float64X(ctx context.Context) float64
- func (s *HostProcessSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HostProcessSelect) Float64sX(ctx context.Context) []float64
- func (s *HostProcessSelect) Int(ctx context.Context) (_ int, err error)
- func (s *HostProcessSelect) IntX(ctx context.Context) int
- func (s *HostProcessSelect) Ints(ctx context.Context) ([]int, error)
- func (s *HostProcessSelect) IntsX(ctx context.Context) []int
- func (hps *HostProcessSelect) Scan(ctx context.Context, v any) error
- func (s *HostProcessSelect) ScanX(ctx context.Context, v any)
- func (s *HostProcessSelect) String(ctx context.Context) (_ string, err error)
- func (s *HostProcessSelect) StringX(ctx context.Context) string
- func (s *HostProcessSelect) Strings(ctx context.Context) ([]string, error)
- func (s *HostProcessSelect) StringsX(ctx context.Context) []string
- type HostProcessUpdate
- func (hpu *HostProcessUpdate) AddPid(u int64) *HostProcessUpdate
- func (hpu *HostProcessUpdate) AddPpid(u int64) *HostProcessUpdate
- func (hpu *HostProcessUpdate) ClearCmd() *HostProcessUpdate
- func (hpu *HostProcessUpdate) ClearCwd() *HostProcessUpdate
- func (hpu *HostProcessUpdate) ClearEnv() *HostProcessUpdate
- func (hpu *HostProcessUpdate) ClearHost() *HostProcessUpdate
- func (hpu *HostProcessUpdate) ClearPath() *HostProcessUpdate
- func (hpu *HostProcessUpdate) ClearTask() *HostProcessUpdate
- func (hpu *HostProcessUpdate) Exec(ctx context.Context) error
- func (hpu *HostProcessUpdate) ExecX(ctx context.Context)
- func (hpu *HostProcessUpdate) Mutation() *HostProcessMutation
- func (hpu *HostProcessUpdate) Save(ctx context.Context) (int, error)
- func (hpu *HostProcessUpdate) SaveX(ctx context.Context) int
- func (hpu *HostProcessUpdate) SetCmd(s string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetCwd(s string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetEnv(s string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetHost(h *Host) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetHostID(id int) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetLastModifiedAt(t time.Time) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetName(s string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetNillableCmd(s *string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetNillableCwd(s *string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetNillableEnv(s *string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetNillablePath(s *string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetPath(s string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetPid(u uint64) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetPpid(u uint64) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetPrincipal(s string) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetStatus(es epb.Process_Status) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetTask(t *Task) *HostProcessUpdate
- func (hpu *HostProcessUpdate) SetTaskID(id int) *HostProcessUpdate
- func (hpu *HostProcessUpdate) Where(ps ...predicate.HostProcess) *HostProcessUpdate
- type HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) AddPid(u int64) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) AddPpid(u int64) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) ClearCmd() *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) ClearCwd() *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) ClearEnv() *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) ClearHost() *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) ClearPath() *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) ClearTask() *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) Exec(ctx context.Context) error
- func (hpuo *HostProcessUpdateOne) ExecX(ctx context.Context)
- func (hpuo *HostProcessUpdateOne) Mutation() *HostProcessMutation
- func (hpuo *HostProcessUpdateOne) Save(ctx context.Context) (*HostProcess, error)
- func (hpuo *HostProcessUpdateOne) SaveX(ctx context.Context) *HostProcess
- func (hpuo *HostProcessUpdateOne) Select(field string, fields ...string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetCmd(s string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetCwd(s string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetEnv(s string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetHost(h *Host) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetHostID(id int) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetLastModifiedAt(t time.Time) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetName(s string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetNillableCmd(s *string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetNillableCwd(s *string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetNillableEnv(s *string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetNillablePath(s *string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetPath(s string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetPid(u uint64) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetPpid(u uint64) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetPrincipal(s string) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetStatus(es epb.Process_Status) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetTask(t *Task) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) SetTaskID(id int) *HostProcessUpdateOne
- func (hpuo *HostProcessUpdateOne) Where(ps ...predicate.HostProcess) *HostProcessUpdateOne
- type HostProcessUpsert
- func (u *HostProcessUpsert) AddPid(v uint64) *HostProcessUpsert
- func (u *HostProcessUpsert) AddPpid(v uint64) *HostProcessUpsert
- func (u *HostProcessUpsert) ClearCmd() *HostProcessUpsert
- func (u *HostProcessUpsert) ClearCwd() *HostProcessUpsert
- func (u *HostProcessUpsert) ClearEnv() *HostProcessUpsert
- func (u *HostProcessUpsert) ClearPath() *HostProcessUpsert
- func (u *HostProcessUpsert) SetCmd(v string) *HostProcessUpsert
- func (u *HostProcessUpsert) SetCwd(v string) *HostProcessUpsert
- func (u *HostProcessUpsert) SetEnv(v string) *HostProcessUpsert
- func (u *HostProcessUpsert) SetLastModifiedAt(v time.Time) *HostProcessUpsert
- func (u *HostProcessUpsert) SetName(v string) *HostProcessUpsert
- func (u *HostProcessUpsert) SetPath(v string) *HostProcessUpsert
- func (u *HostProcessUpsert) SetPid(v uint64) *HostProcessUpsert
- func (u *HostProcessUpsert) SetPpid(v uint64) *HostProcessUpsert
- func (u *HostProcessUpsert) SetPrincipal(v string) *HostProcessUpsert
- func (u *HostProcessUpsert) SetStatus(v epb.Process_Status) *HostProcessUpsert
- func (u *HostProcessUpsert) UpdateCmd() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdateCwd() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdateEnv() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdateLastModifiedAt() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdateName() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdatePath() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdatePid() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdatePpid() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdatePrincipal() *HostProcessUpsert
- func (u *HostProcessUpsert) UpdateStatus() *HostProcessUpsert
- type HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) AddPid(v uint64) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) AddPpid(v uint64) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) ClearCmd() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) ClearCwd() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) ClearEnv() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) ClearPath() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) DoNothing() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) Exec(ctx context.Context) error
- func (u *HostProcessUpsertBulk) ExecX(ctx context.Context)
- func (u *HostProcessUpsertBulk) Ignore() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetCmd(v string) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetCwd(v string) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetEnv(v string) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetLastModifiedAt(v time.Time) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetName(v string) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetPath(v string) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetPid(v uint64) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetPpid(v uint64) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetPrincipal(v string) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) SetStatus(v epb.Process_Status) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) Update(set func(*HostProcessUpsert)) *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdateCmd() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdateCwd() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdateEnv() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdateLastModifiedAt() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdateName() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdateNewValues() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdatePath() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdatePid() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdatePpid() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdatePrincipal() *HostProcessUpsertBulk
- func (u *HostProcessUpsertBulk) UpdateStatus() *HostProcessUpsertBulk
- type HostProcessUpsertOne
- func (u *HostProcessUpsertOne) AddPid(v uint64) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) AddPpid(v uint64) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) ClearCmd() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) ClearCwd() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) ClearEnv() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) ClearPath() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) DoNothing() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) Exec(ctx context.Context) error
- func (u *HostProcessUpsertOne) ExecX(ctx context.Context)
- func (u *HostProcessUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *HostProcessUpsertOne) IDX(ctx context.Context) int
- func (u *HostProcessUpsertOne) Ignore() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetCmd(v string) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetCwd(v string) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetEnv(v string) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetLastModifiedAt(v time.Time) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetName(v string) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetPath(v string) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetPid(v uint64) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetPpid(v uint64) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetPrincipal(v string) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) SetStatus(v epb.Process_Status) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) Update(set func(*HostProcessUpsert)) *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdateCmd() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdateCwd() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdateEnv() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdateLastModifiedAt() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdateName() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdateNewValues() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdatePath() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdatePid() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdatePpid() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdatePrincipal() *HostProcessUpsertOne
- func (u *HostProcessUpsertOne) UpdateStatus() *HostProcessUpsertOne
- type HostProcessWhereInput
- type HostProcesses
- type HostQuery
- func (hq *HostQuery) Aggregate(fns ...AggregateFunc) *HostSelect
- func (hq *HostQuery) All(ctx context.Context) ([]*Host, error)
- func (hq *HostQuery) AllX(ctx context.Context) []*Host
- func (hq *HostQuery) Clone() *HostQuery
- func (h *HostQuery) CollectFields(ctx context.Context, satisfies ...string) (*HostQuery, error)
- func (hq *HostQuery) Count(ctx context.Context) (int, error)
- func (hq *HostQuery) CountX(ctx context.Context) int
- func (hq *HostQuery) Exist(ctx context.Context) (bool, error)
- func (hq *HostQuery) ExistX(ctx context.Context) bool
- func (hq *HostQuery) First(ctx context.Context) (*Host, error)
- func (hq *HostQuery) FirstID(ctx context.Context) (id int, err error)
- func (hq *HostQuery) FirstIDX(ctx context.Context) int
- func (hq *HostQuery) FirstX(ctx context.Context) *Host
- func (hq *HostQuery) GroupBy(field string, fields ...string) *HostGroupBy
- func (hq *HostQuery) IDs(ctx context.Context) (ids []int, err error)
- func (hq *HostQuery) IDsX(ctx context.Context) []int
- func (hq *HostQuery) Limit(limit int) *HostQuery
- func (hq *HostQuery) Offset(offset int) *HostQuery
- func (hq *HostQuery) Only(ctx context.Context) (*Host, error)
- func (hq *HostQuery) OnlyID(ctx context.Context) (id int, err error)
- func (hq *HostQuery) OnlyIDX(ctx context.Context) int
- func (hq *HostQuery) OnlyX(ctx context.Context) *Host
- func (hq *HostQuery) Order(o ...host.OrderOption) *HostQuery
- func (h *HostQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*HostConnection, error)
- func (hq *HostQuery) QueryBeacons() *BeaconQuery
- func (hq *HostQuery) QueryFiles() *HostFileQuery
- func (hq *HostQuery) QueryProcesses() *HostProcessQuery
- func (hq *HostQuery) QueryTags() *TagQuery
- func (hq *HostQuery) Select(fields ...string) *HostSelect
- func (hq *HostQuery) Unique(unique bool) *HostQuery
- func (hq *HostQuery) Where(ps ...predicate.Host) *HostQuery
- func (hq *HostQuery) WithBeacons(opts ...func(*BeaconQuery)) *HostQuery
- func (hq *HostQuery) WithFiles(opts ...func(*HostFileQuery)) *HostQuery
- func (hq *HostQuery) WithNamedBeacons(name string, opts ...func(*BeaconQuery)) *HostQuery
- func (hq *HostQuery) WithNamedFiles(name string, opts ...func(*HostFileQuery)) *HostQuery
- func (hq *HostQuery) WithNamedProcesses(name string, opts ...func(*HostProcessQuery)) *HostQuery
- func (hq *HostQuery) WithNamedTags(name string, opts ...func(*TagQuery)) *HostQuery
- func (hq *HostQuery) WithProcesses(opts ...func(*HostProcessQuery)) *HostQuery
- func (hq *HostQuery) WithTags(opts ...func(*TagQuery)) *HostQuery
- type HostSelect
- func (hs *HostSelect) Aggregate(fns ...AggregateFunc) *HostSelect
- func (s *HostSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *HostSelect) BoolX(ctx context.Context) bool
- func (s *HostSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *HostSelect) BoolsX(ctx context.Context) []bool
- func (s *HostSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *HostSelect) Float64X(ctx context.Context) float64
- func (s *HostSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *HostSelect) Float64sX(ctx context.Context) []float64
- func (s *HostSelect) Int(ctx context.Context) (_ int, err error)
- func (s *HostSelect) IntX(ctx context.Context) int
- func (s *HostSelect) Ints(ctx context.Context) ([]int, error)
- func (s *HostSelect) IntsX(ctx context.Context) []int
- func (hs *HostSelect) Scan(ctx context.Context, v any) error
- func (s *HostSelect) ScanX(ctx context.Context, v any)
- func (s *HostSelect) String(ctx context.Context) (_ string, err error)
- func (s *HostSelect) StringX(ctx context.Context) string
- func (s *HostSelect) Strings(ctx context.Context) ([]string, error)
- func (s *HostSelect) StringsX(ctx context.Context) []string
- type HostUpdate
- func (hu *HostUpdate) AddBeaconIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) AddBeacons(b ...*Beacon) *HostUpdate
- func (hu *HostUpdate) AddFileIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) AddFiles(h ...*HostFile) *HostUpdate
- func (hu *HostUpdate) AddProcessIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) AddProcesses(h ...*HostProcess) *HostUpdate
- func (hu *HostUpdate) AddTagIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) AddTags(t ...*Tag) *HostUpdate
- func (hu *HostUpdate) ClearBeacons() *HostUpdate
- func (hu *HostUpdate) ClearFiles() *HostUpdate
- func (hu *HostUpdate) ClearLastSeenAt() *HostUpdate
- func (hu *HostUpdate) ClearName() *HostUpdate
- func (hu *HostUpdate) ClearPrimaryIP() *HostUpdate
- func (hu *HostUpdate) ClearProcesses() *HostUpdate
- func (hu *HostUpdate) ClearTags() *HostUpdate
- func (hu *HostUpdate) Exec(ctx context.Context) error
- func (hu *HostUpdate) ExecX(ctx context.Context)
- func (hu *HostUpdate) Mutation() *HostMutation
- func (hu *HostUpdate) RemoveBeaconIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) RemoveBeacons(b ...*Beacon) *HostUpdate
- func (hu *HostUpdate) RemoveFileIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) RemoveFiles(h ...*HostFile) *HostUpdate
- func (hu *HostUpdate) RemoveProcessIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) RemoveProcesses(h ...*HostProcess) *HostUpdate
- func (hu *HostUpdate) RemoveTagIDs(ids ...int) *HostUpdate
- func (hu *HostUpdate) RemoveTags(t ...*Tag) *HostUpdate
- func (hu *HostUpdate) Save(ctx context.Context) (int, error)
- func (hu *HostUpdate) SaveX(ctx context.Context) int
- func (hu *HostUpdate) SetIdentifier(s string) *HostUpdate
- func (c *HostUpdate) SetInput(i UpdateHostInput) *HostUpdate
- func (hu *HostUpdate) SetLastModifiedAt(t time.Time) *HostUpdate
- func (hu *HostUpdate) SetLastSeenAt(t time.Time) *HostUpdate
- func (hu *HostUpdate) SetName(s string) *HostUpdate
- func (hu *HostUpdate) SetNillableLastSeenAt(t *time.Time) *HostUpdate
- func (hu *HostUpdate) SetNillableName(s *string) *HostUpdate
- func (hu *HostUpdate) SetNillablePrimaryIP(s *string) *HostUpdate
- func (hu *HostUpdate) SetPlatform(cp c2pb.Host_Platform) *HostUpdate
- func (hu *HostUpdate) SetPrimaryIP(s string) *HostUpdate
- func (hu *HostUpdate) Where(ps ...predicate.Host) *HostUpdate
- type HostUpdateOne
- func (huo *HostUpdateOne) AddBeaconIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) AddBeacons(b ...*Beacon) *HostUpdateOne
- func (huo *HostUpdateOne) AddFileIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) AddFiles(h ...*HostFile) *HostUpdateOne
- func (huo *HostUpdateOne) AddProcessIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) AddProcesses(h ...*HostProcess) *HostUpdateOne
- func (huo *HostUpdateOne) AddTagIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) AddTags(t ...*Tag) *HostUpdateOne
- func (huo *HostUpdateOne) ClearBeacons() *HostUpdateOne
- func (huo *HostUpdateOne) ClearFiles() *HostUpdateOne
- func (huo *HostUpdateOne) ClearLastSeenAt() *HostUpdateOne
- func (huo *HostUpdateOne) ClearName() *HostUpdateOne
- func (huo *HostUpdateOne) ClearPrimaryIP() *HostUpdateOne
- func (huo *HostUpdateOne) ClearProcesses() *HostUpdateOne
- func (huo *HostUpdateOne) ClearTags() *HostUpdateOne
- func (huo *HostUpdateOne) Exec(ctx context.Context) error
- func (huo *HostUpdateOne) ExecX(ctx context.Context)
- func (huo *HostUpdateOne) Mutation() *HostMutation
- func (huo *HostUpdateOne) RemoveBeaconIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) RemoveBeacons(b ...*Beacon) *HostUpdateOne
- func (huo *HostUpdateOne) RemoveFileIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) RemoveFiles(h ...*HostFile) *HostUpdateOne
- func (huo *HostUpdateOne) RemoveProcessIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) RemoveProcesses(h ...*HostProcess) *HostUpdateOne
- func (huo *HostUpdateOne) RemoveTagIDs(ids ...int) *HostUpdateOne
- func (huo *HostUpdateOne) RemoveTags(t ...*Tag) *HostUpdateOne
- func (huo *HostUpdateOne) Save(ctx context.Context) (*Host, error)
- func (huo *HostUpdateOne) SaveX(ctx context.Context) *Host
- func (huo *HostUpdateOne) Select(field string, fields ...string) *HostUpdateOne
- func (huo *HostUpdateOne) SetIdentifier(s string) *HostUpdateOne
- func (c *HostUpdateOne) SetInput(i UpdateHostInput) *HostUpdateOne
- func (huo *HostUpdateOne) SetLastModifiedAt(t time.Time) *HostUpdateOne
- func (huo *HostUpdateOne) SetLastSeenAt(t time.Time) *HostUpdateOne
- func (huo *HostUpdateOne) SetName(s string) *HostUpdateOne
- func (huo *HostUpdateOne) SetNillableLastSeenAt(t *time.Time) *HostUpdateOne
- func (huo *HostUpdateOne) SetNillableName(s *string) *HostUpdateOne
- func (huo *HostUpdateOne) SetNillablePrimaryIP(s *string) *HostUpdateOne
- func (huo *HostUpdateOne) SetPlatform(cp c2pb.Host_Platform) *HostUpdateOne
- func (huo *HostUpdateOne) SetPrimaryIP(s string) *HostUpdateOne
- func (huo *HostUpdateOne) Where(ps ...predicate.Host) *HostUpdateOne
- type HostUpsert
- func (u *HostUpsert) ClearLastSeenAt() *HostUpsert
- func (u *HostUpsert) ClearName() *HostUpsert
- func (u *HostUpsert) ClearPrimaryIP() *HostUpsert
- func (u *HostUpsert) SetIdentifier(v string) *HostUpsert
- func (u *HostUpsert) SetLastModifiedAt(v time.Time) *HostUpsert
- func (u *HostUpsert) SetLastSeenAt(v time.Time) *HostUpsert
- func (u *HostUpsert) SetName(v string) *HostUpsert
- func (u *HostUpsert) SetPlatform(v c2pb.Host_Platform) *HostUpsert
- func (u *HostUpsert) SetPrimaryIP(v string) *HostUpsert
- func (u *HostUpsert) UpdateIdentifier() *HostUpsert
- func (u *HostUpsert) UpdateLastModifiedAt() *HostUpsert
- func (u *HostUpsert) UpdateLastSeenAt() *HostUpsert
- func (u *HostUpsert) UpdateName() *HostUpsert
- func (u *HostUpsert) UpdatePlatform() *HostUpsert
- func (u *HostUpsert) UpdatePrimaryIP() *HostUpsert
- type HostUpsertBulk
- func (u *HostUpsertBulk) ClearLastSeenAt() *HostUpsertBulk
- func (u *HostUpsertBulk) ClearName() *HostUpsertBulk
- func (u *HostUpsertBulk) ClearPrimaryIP() *HostUpsertBulk
- func (u *HostUpsertBulk) DoNothing() *HostUpsertBulk
- func (u *HostUpsertBulk) Exec(ctx context.Context) error
- func (u *HostUpsertBulk) ExecX(ctx context.Context)
- func (u *HostUpsertBulk) Ignore() *HostUpsertBulk
- func (u *HostUpsertBulk) SetIdentifier(v string) *HostUpsertBulk
- func (u *HostUpsertBulk) SetLastModifiedAt(v time.Time) *HostUpsertBulk
- func (u *HostUpsertBulk) SetLastSeenAt(v time.Time) *HostUpsertBulk
- func (u *HostUpsertBulk) SetName(v string) *HostUpsertBulk
- func (u *HostUpsertBulk) SetPlatform(v c2pb.Host_Platform) *HostUpsertBulk
- func (u *HostUpsertBulk) SetPrimaryIP(v string) *HostUpsertBulk
- func (u *HostUpsertBulk) Update(set func(*HostUpsert)) *HostUpsertBulk
- func (u *HostUpsertBulk) UpdateIdentifier() *HostUpsertBulk
- func (u *HostUpsertBulk) UpdateLastModifiedAt() *HostUpsertBulk
- func (u *HostUpsertBulk) UpdateLastSeenAt() *HostUpsertBulk
- func (u *HostUpsertBulk) UpdateName() *HostUpsertBulk
- func (u *HostUpsertBulk) UpdateNewValues() *HostUpsertBulk
- func (u *HostUpsertBulk) UpdatePlatform() *HostUpsertBulk
- func (u *HostUpsertBulk) UpdatePrimaryIP() *HostUpsertBulk
- type HostUpsertOne
- func (u *HostUpsertOne) ClearLastSeenAt() *HostUpsertOne
- func (u *HostUpsertOne) ClearName() *HostUpsertOne
- func (u *HostUpsertOne) ClearPrimaryIP() *HostUpsertOne
- func (u *HostUpsertOne) DoNothing() *HostUpsertOne
- func (u *HostUpsertOne) Exec(ctx context.Context) error
- func (u *HostUpsertOne) ExecX(ctx context.Context)
- func (u *HostUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *HostUpsertOne) IDX(ctx context.Context) int
- func (u *HostUpsertOne) Ignore() *HostUpsertOne
- func (u *HostUpsertOne) SetIdentifier(v string) *HostUpsertOne
- func (u *HostUpsertOne) SetLastModifiedAt(v time.Time) *HostUpsertOne
- func (u *HostUpsertOne) SetLastSeenAt(v time.Time) *HostUpsertOne
- func (u *HostUpsertOne) SetName(v string) *HostUpsertOne
- func (u *HostUpsertOne) SetPlatform(v c2pb.Host_Platform) *HostUpsertOne
- func (u *HostUpsertOne) SetPrimaryIP(v string) *HostUpsertOne
- func (u *HostUpsertOne) Update(set func(*HostUpsert)) *HostUpsertOne
- func (u *HostUpsertOne) UpdateIdentifier() *HostUpsertOne
- func (u *HostUpsertOne) UpdateLastModifiedAt() *HostUpsertOne
- func (u *HostUpsertOne) UpdateLastSeenAt() *HostUpsertOne
- func (u *HostUpsertOne) UpdateName() *HostUpsertOne
- func (u *HostUpsertOne) UpdateNewValues() *HostUpsertOne
- func (u *HostUpsertOne) UpdatePlatform() *HostUpsertOne
- func (u *HostUpsertOne) UpdatePrimaryIP() *HostUpsertOne
- type HostWhereInput
- type Hosts
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NodeOption
- type Noder
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderDirection
- type OrderFunc
- type PageInfo
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type Quest
- func (q *Quest) Bundle(ctx context.Context) (*File, error)
- func (q *Quest) Creator(ctx context.Context) (*User, error)
- func (n *Quest) IsNode()
- func (q *Quest) NamedTasks(name string) ([]*Task, error)
- func (q *Quest) QueryBundle() *FileQuery
- func (q *Quest) QueryCreator() *UserQuery
- func (q *Quest) QueryTasks() *TaskQuery
- func (q *Quest) QueryTome() *TomeQuery
- func (q *Quest) String() string
- func (q *Quest) Tasks(ctx context.Context) (result []*Task, err error)
- func (q *Quest) ToEdge(order *QuestOrder) *QuestEdge
- func (q *Quest) Tome(ctx context.Context) (*Tome, error)
- func (q *Quest) Unwrap() *Quest
- func (q *Quest) Update() *QuestUpdateOne
- func (q *Quest) Value(name string) (ent.Value, error)
- type QuestClient
- func (c *QuestClient) Create() *QuestCreate
- func (c *QuestClient) CreateBulk(builders ...*QuestCreate) *QuestCreateBulk
- func (c *QuestClient) Delete() *QuestDelete
- func (c *QuestClient) DeleteOne(q *Quest) *QuestDeleteOne
- func (c *QuestClient) DeleteOneID(id int) *QuestDeleteOne
- func (c *QuestClient) Get(ctx context.Context, id int) (*Quest, error)
- func (c *QuestClient) GetX(ctx context.Context, id int) *Quest
- func (c *QuestClient) Hooks() []Hook
- func (c *QuestClient) Intercept(interceptors ...Interceptor)
- func (c *QuestClient) Interceptors() []Interceptor
- func (c *QuestClient) MapCreateBulk(slice any, setFunc func(*QuestCreate, int)) *QuestCreateBulk
- func (c *QuestClient) Query() *QuestQuery
- func (c *QuestClient) QueryBundle(q *Quest) *FileQuery
- func (c *QuestClient) QueryCreator(q *Quest) *UserQuery
- func (c *QuestClient) QueryTasks(q *Quest) *TaskQuery
- func (c *QuestClient) QueryTome(q *Quest) *TomeQuery
- func (c *QuestClient) Update() *QuestUpdate
- func (c *QuestClient) UpdateOne(q *Quest) *QuestUpdateOne
- func (c *QuestClient) UpdateOneID(id int) *QuestUpdateOne
- func (c *QuestClient) Use(hooks ...Hook)
- type QuestConnection
- type QuestCreate
- func (qc *QuestCreate) AddTaskIDs(ids ...int) *QuestCreate
- func (qc *QuestCreate) AddTasks(t ...*Task) *QuestCreate
- func (qc *QuestCreate) Exec(ctx context.Context) error
- func (qc *QuestCreate) ExecX(ctx context.Context)
- func (qc *QuestCreate) Mutation() *QuestMutation
- func (qc *QuestCreate) OnConflict(opts ...sql.ConflictOption) *QuestUpsertOne
- func (qc *QuestCreate) OnConflictColumns(columns ...string) *QuestUpsertOne
- func (qc *QuestCreate) Save(ctx context.Context) (*Quest, error)
- func (qc *QuestCreate) SaveX(ctx context.Context) *Quest
- func (qc *QuestCreate) SetBundle(f *File) *QuestCreate
- func (qc *QuestCreate) SetBundleID(id int) *QuestCreate
- func (qc *QuestCreate) SetCreatedAt(t time.Time) *QuestCreate
- func (qc *QuestCreate) SetCreator(u *User) *QuestCreate
- func (qc *QuestCreate) SetCreatorID(id int) *QuestCreate
- func (c *QuestCreate) SetInput(i CreateQuestInput) *QuestCreate
- func (qc *QuestCreate) SetLastModifiedAt(t time.Time) *QuestCreate
- func (qc *QuestCreate) SetName(s string) *QuestCreate
- func (qc *QuestCreate) SetNillableBundleID(id *int) *QuestCreate
- func (qc *QuestCreate) SetNillableCreatedAt(t *time.Time) *QuestCreate
- func (qc *QuestCreate) SetNillableCreatorID(id *int) *QuestCreate
- func (qc *QuestCreate) SetNillableLastModifiedAt(t *time.Time) *QuestCreate
- func (qc *QuestCreate) SetNillableParameters(s *string) *QuestCreate
- func (qc *QuestCreate) SetParameters(s string) *QuestCreate
- func (qc *QuestCreate) SetTome(t *Tome) *QuestCreate
- func (qc *QuestCreate) SetTomeID(id int) *QuestCreate
- type QuestCreateBulk
- func (qcb *QuestCreateBulk) Exec(ctx context.Context) error
- func (qcb *QuestCreateBulk) ExecX(ctx context.Context)
- func (qcb *QuestCreateBulk) OnConflict(opts ...sql.ConflictOption) *QuestUpsertBulk
- func (qcb *QuestCreateBulk) OnConflictColumns(columns ...string) *QuestUpsertBulk
- func (qcb *QuestCreateBulk) Save(ctx context.Context) ([]*Quest, error)
- func (qcb *QuestCreateBulk) SaveX(ctx context.Context) []*Quest
- type QuestDelete
- type QuestDeleteOne
- type QuestEdge
- type QuestEdges
- type QuestGroupBy
- func (qgb *QuestGroupBy) Aggregate(fns ...AggregateFunc) *QuestGroupBy
- func (s *QuestGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *QuestGroupBy) BoolX(ctx context.Context) bool
- func (s *QuestGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *QuestGroupBy) BoolsX(ctx context.Context) []bool
- func (s *QuestGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *QuestGroupBy) Float64X(ctx context.Context) float64
- func (s *QuestGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *QuestGroupBy) Float64sX(ctx context.Context) []float64
- func (s *QuestGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *QuestGroupBy) IntX(ctx context.Context) int
- func (s *QuestGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *QuestGroupBy) IntsX(ctx context.Context) []int
- func (qgb *QuestGroupBy) Scan(ctx context.Context, v any) error
- func (s *QuestGroupBy) ScanX(ctx context.Context, v any)
- func (s *QuestGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *QuestGroupBy) StringX(ctx context.Context) string
- func (s *QuestGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *QuestGroupBy) StringsX(ctx context.Context) []string
- type QuestMutation
- func (m *QuestMutation) AddField(name string, value ent.Value) error
- func (m *QuestMutation) AddTaskIDs(ids ...int)
- func (m *QuestMutation) AddedEdges() []string
- func (m *QuestMutation) AddedField(name string) (ent.Value, bool)
- func (m *QuestMutation) AddedFields() []string
- func (m *QuestMutation) AddedIDs(name string) []ent.Value
- func (m *QuestMutation) BundleCleared() bool
- func (m *QuestMutation) BundleID() (id int, exists bool)
- func (m *QuestMutation) BundleIDs() (ids []int)
- func (m *QuestMutation) ClearBundle()
- func (m *QuestMutation) ClearCreator()
- func (m *QuestMutation) ClearEdge(name string) error
- func (m *QuestMutation) ClearField(name string) error
- func (m *QuestMutation) ClearParameters()
- func (m *QuestMutation) ClearTasks()
- func (m *QuestMutation) ClearTome()
- func (m *QuestMutation) ClearedEdges() []string
- func (m *QuestMutation) ClearedFields() []string
- func (m QuestMutation) Client() *Client
- func (m *QuestMutation) CreatedAt() (r time.Time, exists bool)
- func (m *QuestMutation) CreatorCleared() bool
- func (m *QuestMutation) CreatorID() (id int, exists bool)
- func (m *QuestMutation) CreatorIDs() (ids []int)
- func (m *QuestMutation) EdgeCleared(name string) bool
- func (m *QuestMutation) Field(name string) (ent.Value, bool)
- func (m *QuestMutation) FieldCleared(name string) bool
- func (m *QuestMutation) Fields() []string
- func (m *QuestMutation) ID() (id int, exists bool)
- func (m *QuestMutation) IDs(ctx context.Context) ([]int, error)
- func (m *QuestMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *QuestMutation) Name() (r string, exists bool)
- func (m *QuestMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *QuestMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *QuestMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *QuestMutation) OldName(ctx context.Context) (v string, err error)
- func (m *QuestMutation) OldParameters(ctx context.Context) (v string, err error)
- func (m *QuestMutation) Op() Op
- func (m *QuestMutation) Parameters() (r string, exists bool)
- func (m *QuestMutation) ParametersCleared() bool
- func (m *QuestMutation) RemoveTaskIDs(ids ...int)
- func (m *QuestMutation) RemovedEdges() []string
- func (m *QuestMutation) RemovedIDs(name string) []ent.Value
- func (m *QuestMutation) RemovedTasksIDs() (ids []int)
- func (m *QuestMutation) ResetBundle()
- func (m *QuestMutation) ResetCreatedAt()
- func (m *QuestMutation) ResetCreator()
- func (m *QuestMutation) ResetEdge(name string) error
- func (m *QuestMutation) ResetField(name string) error
- func (m *QuestMutation) ResetLastModifiedAt()
- func (m *QuestMutation) ResetName()
- func (m *QuestMutation) ResetParameters()
- func (m *QuestMutation) ResetTasks()
- func (m *QuestMutation) ResetTome()
- func (m *QuestMutation) SetBundleID(id int)
- func (m *QuestMutation) SetCreatedAt(t time.Time)
- func (m *QuestMutation) SetCreatorID(id int)
- func (m *QuestMutation) SetField(name string, value ent.Value) error
- func (m *QuestMutation) SetLastModifiedAt(t time.Time)
- func (m *QuestMutation) SetName(s string)
- func (m *QuestMutation) SetOp(op Op)
- func (m *QuestMutation) SetParameters(s string)
- func (m *QuestMutation) SetTomeID(id int)
- func (m *QuestMutation) TasksCleared() bool
- func (m *QuestMutation) TasksIDs() (ids []int)
- func (m *QuestMutation) TomeCleared() bool
- func (m *QuestMutation) TomeID() (id int, exists bool)
- func (m *QuestMutation) TomeIDs() (ids []int)
- func (m QuestMutation) Tx() (*Tx, error)
- func (m *QuestMutation) Type() string
- func (m *QuestMutation) Where(ps ...predicate.Quest)
- func (m *QuestMutation) WhereP(ps ...func(*sql.Selector))
- type QuestOrder
- type QuestOrderField
- type QuestPaginateOption
- type QuestQuery
- func (qq *QuestQuery) Aggregate(fns ...AggregateFunc) *QuestSelect
- func (qq *QuestQuery) All(ctx context.Context) ([]*Quest, error)
- func (qq *QuestQuery) AllX(ctx context.Context) []*Quest
- func (qq *QuestQuery) Clone() *QuestQuery
- func (q *QuestQuery) CollectFields(ctx context.Context, satisfies ...string) (*QuestQuery, error)
- func (qq *QuestQuery) Count(ctx context.Context) (int, error)
- func (qq *QuestQuery) CountX(ctx context.Context) int
- func (qq *QuestQuery) Exist(ctx context.Context) (bool, error)
- func (qq *QuestQuery) ExistX(ctx context.Context) bool
- func (qq *QuestQuery) First(ctx context.Context) (*Quest, error)
- func (qq *QuestQuery) FirstID(ctx context.Context) (id int, err error)
- func (qq *QuestQuery) FirstIDX(ctx context.Context) int
- func (qq *QuestQuery) FirstX(ctx context.Context) *Quest
- func (qq *QuestQuery) GroupBy(field string, fields ...string) *QuestGroupBy
- func (qq *QuestQuery) IDs(ctx context.Context) (ids []int, err error)
- func (qq *QuestQuery) IDsX(ctx context.Context) []int
- func (qq *QuestQuery) Limit(limit int) *QuestQuery
- func (qq *QuestQuery) Offset(offset int) *QuestQuery
- func (qq *QuestQuery) Only(ctx context.Context) (*Quest, error)
- func (qq *QuestQuery) OnlyID(ctx context.Context) (id int, err error)
- func (qq *QuestQuery) OnlyIDX(ctx context.Context) int
- func (qq *QuestQuery) OnlyX(ctx context.Context) *Quest
- func (qq *QuestQuery) Order(o ...quest.OrderOption) *QuestQuery
- func (q *QuestQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*QuestConnection, error)
- func (qq *QuestQuery) QueryBundle() *FileQuery
- func (qq *QuestQuery) QueryCreator() *UserQuery
- func (qq *QuestQuery) QueryTasks() *TaskQuery
- func (qq *QuestQuery) QueryTome() *TomeQuery
- func (qq *QuestQuery) Select(fields ...string) *QuestSelect
- func (qq *QuestQuery) Unique(unique bool) *QuestQuery
- func (qq *QuestQuery) Where(ps ...predicate.Quest) *QuestQuery
- func (qq *QuestQuery) WithBundle(opts ...func(*FileQuery)) *QuestQuery
- func (qq *QuestQuery) WithCreator(opts ...func(*UserQuery)) *QuestQuery
- func (qq *QuestQuery) WithNamedTasks(name string, opts ...func(*TaskQuery)) *QuestQuery
- func (qq *QuestQuery) WithTasks(opts ...func(*TaskQuery)) *QuestQuery
- func (qq *QuestQuery) WithTome(opts ...func(*TomeQuery)) *QuestQuery
- type QuestSelect
- func (qs *QuestSelect) Aggregate(fns ...AggregateFunc) *QuestSelect
- func (s *QuestSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *QuestSelect) BoolX(ctx context.Context) bool
- func (s *QuestSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *QuestSelect) BoolsX(ctx context.Context) []bool
- func (s *QuestSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *QuestSelect) Float64X(ctx context.Context) float64
- func (s *QuestSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *QuestSelect) Float64sX(ctx context.Context) []float64
- func (s *QuestSelect) Int(ctx context.Context) (_ int, err error)
- func (s *QuestSelect) IntX(ctx context.Context) int
- func (s *QuestSelect) Ints(ctx context.Context) ([]int, error)
- func (s *QuestSelect) IntsX(ctx context.Context) []int
- func (qs *QuestSelect) Scan(ctx context.Context, v any) error
- func (s *QuestSelect) ScanX(ctx context.Context, v any)
- func (s *QuestSelect) String(ctx context.Context) (_ string, err error)
- func (s *QuestSelect) StringX(ctx context.Context) string
- func (s *QuestSelect) Strings(ctx context.Context) ([]string, error)
- func (s *QuestSelect) StringsX(ctx context.Context) []string
- type QuestUpdate
- func (qu *QuestUpdate) AddTaskIDs(ids ...int) *QuestUpdate
- func (qu *QuestUpdate) AddTasks(t ...*Task) *QuestUpdate
- func (qu *QuestUpdate) ClearBundle() *QuestUpdate
- func (qu *QuestUpdate) ClearCreator() *QuestUpdate
- func (qu *QuestUpdate) ClearParameters() *QuestUpdate
- func (qu *QuestUpdate) ClearTasks() *QuestUpdate
- func (qu *QuestUpdate) ClearTome() *QuestUpdate
- func (qu *QuestUpdate) Exec(ctx context.Context) error
- func (qu *QuestUpdate) ExecX(ctx context.Context)
- func (qu *QuestUpdate) Mutation() *QuestMutation
- func (qu *QuestUpdate) RemoveTaskIDs(ids ...int) *QuestUpdate
- func (qu *QuestUpdate) RemoveTasks(t ...*Task) *QuestUpdate
- func (qu *QuestUpdate) Save(ctx context.Context) (int, error)
- func (qu *QuestUpdate) SaveX(ctx context.Context) int
- func (qu *QuestUpdate) SetBundle(f *File) *QuestUpdate
- func (qu *QuestUpdate) SetBundleID(id int) *QuestUpdate
- func (qu *QuestUpdate) SetCreator(u *User) *QuestUpdate
- func (qu *QuestUpdate) SetCreatorID(id int) *QuestUpdate
- func (qu *QuestUpdate) SetLastModifiedAt(t time.Time) *QuestUpdate
- func (qu *QuestUpdate) SetName(s string) *QuestUpdate
- func (qu *QuestUpdate) SetNillableBundleID(id *int) *QuestUpdate
- func (qu *QuestUpdate) SetNillableCreatorID(id *int) *QuestUpdate
- func (qu *QuestUpdate) SetNillableParameters(s *string) *QuestUpdate
- func (qu *QuestUpdate) SetParameters(s string) *QuestUpdate
- func (qu *QuestUpdate) SetTome(t *Tome) *QuestUpdate
- func (qu *QuestUpdate) SetTomeID(id int) *QuestUpdate
- func (qu *QuestUpdate) Where(ps ...predicate.Quest) *QuestUpdate
- type QuestUpdateOne
- func (quo *QuestUpdateOne) AddTaskIDs(ids ...int) *QuestUpdateOne
- func (quo *QuestUpdateOne) AddTasks(t ...*Task) *QuestUpdateOne
- func (quo *QuestUpdateOne) ClearBundle() *QuestUpdateOne
- func (quo *QuestUpdateOne) ClearCreator() *QuestUpdateOne
- func (quo *QuestUpdateOne) ClearParameters() *QuestUpdateOne
- func (quo *QuestUpdateOne) ClearTasks() *QuestUpdateOne
- func (quo *QuestUpdateOne) ClearTome() *QuestUpdateOne
- func (quo *QuestUpdateOne) Exec(ctx context.Context) error
- func (quo *QuestUpdateOne) ExecX(ctx context.Context)
- func (quo *QuestUpdateOne) Mutation() *QuestMutation
- func (quo *QuestUpdateOne) RemoveTaskIDs(ids ...int) *QuestUpdateOne
- func (quo *QuestUpdateOne) RemoveTasks(t ...*Task) *QuestUpdateOne
- func (quo *QuestUpdateOne) Save(ctx context.Context) (*Quest, error)
- func (quo *QuestUpdateOne) SaveX(ctx context.Context) *Quest
- func (quo *QuestUpdateOne) Select(field string, fields ...string) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetBundle(f *File) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetBundleID(id int) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetCreator(u *User) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetCreatorID(id int) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetLastModifiedAt(t time.Time) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetName(s string) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetNillableBundleID(id *int) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetNillableCreatorID(id *int) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetNillableParameters(s *string) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetParameters(s string) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetTome(t *Tome) *QuestUpdateOne
- func (quo *QuestUpdateOne) SetTomeID(id int) *QuestUpdateOne
- func (quo *QuestUpdateOne) Where(ps ...predicate.Quest) *QuestUpdateOne
- type QuestUpsert
- func (u *QuestUpsert) ClearParameters() *QuestUpsert
- func (u *QuestUpsert) SetLastModifiedAt(v time.Time) *QuestUpsert
- func (u *QuestUpsert) SetName(v string) *QuestUpsert
- func (u *QuestUpsert) SetParameters(v string) *QuestUpsert
- func (u *QuestUpsert) UpdateLastModifiedAt() *QuestUpsert
- func (u *QuestUpsert) UpdateName() *QuestUpsert
- func (u *QuestUpsert) UpdateParameters() *QuestUpsert
- type QuestUpsertBulk
- func (u *QuestUpsertBulk) ClearParameters() *QuestUpsertBulk
- func (u *QuestUpsertBulk) DoNothing() *QuestUpsertBulk
- func (u *QuestUpsertBulk) Exec(ctx context.Context) error
- func (u *QuestUpsertBulk) ExecX(ctx context.Context)
- func (u *QuestUpsertBulk) Ignore() *QuestUpsertBulk
- func (u *QuestUpsertBulk) SetLastModifiedAt(v time.Time) *QuestUpsertBulk
- func (u *QuestUpsertBulk) SetName(v string) *QuestUpsertBulk
- func (u *QuestUpsertBulk) SetParameters(v string) *QuestUpsertBulk
- func (u *QuestUpsertBulk) Update(set func(*QuestUpsert)) *QuestUpsertBulk
- func (u *QuestUpsertBulk) UpdateLastModifiedAt() *QuestUpsertBulk
- func (u *QuestUpsertBulk) UpdateName() *QuestUpsertBulk
- func (u *QuestUpsertBulk) UpdateNewValues() *QuestUpsertBulk
- func (u *QuestUpsertBulk) UpdateParameters() *QuestUpsertBulk
- type QuestUpsertOne
- func (u *QuestUpsertOne) ClearParameters() *QuestUpsertOne
- func (u *QuestUpsertOne) DoNothing() *QuestUpsertOne
- func (u *QuestUpsertOne) Exec(ctx context.Context) error
- func (u *QuestUpsertOne) ExecX(ctx context.Context)
- func (u *QuestUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *QuestUpsertOne) IDX(ctx context.Context) int
- func (u *QuestUpsertOne) Ignore() *QuestUpsertOne
- func (u *QuestUpsertOne) SetLastModifiedAt(v time.Time) *QuestUpsertOne
- func (u *QuestUpsertOne) SetName(v string) *QuestUpsertOne
- func (u *QuestUpsertOne) SetParameters(v string) *QuestUpsertOne
- func (u *QuestUpsertOne) Update(set func(*QuestUpsert)) *QuestUpsertOne
- func (u *QuestUpsertOne) UpdateLastModifiedAt() *QuestUpsertOne
- func (u *QuestUpsertOne) UpdateName() *QuestUpsertOne
- func (u *QuestUpsertOne) UpdateNewValues() *QuestUpsertOne
- func (u *QuestUpsertOne) UpdateParameters() *QuestUpsertOne
- type QuestWhereInput
- type Quests
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Tag
- func (t *Tag) Hosts(ctx context.Context) (result []*Host, err error)
- func (n *Tag) IsNode()
- func (t *Tag) NamedHosts(name string) ([]*Host, error)
- func (t *Tag) QueryHosts() *HostQuery
- func (t *Tag) String() string
- func (t *Tag) ToEdge(order *TagOrder) *TagEdge
- func (t *Tag) Unwrap() *Tag
- func (t *Tag) Update() *TagUpdateOne
- func (t *Tag) Value(name string) (ent.Value, error)
- type TagClient
- func (c *TagClient) Create() *TagCreate
- func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
- func (c *TagClient) Delete() *TagDelete
- func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
- func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
- func (c *TagClient) Get(ctx context.Context, id int) (*Tag, error)
- func (c *TagClient) GetX(ctx context.Context, id int) *Tag
- func (c *TagClient) Hooks() []Hook
- func (c *TagClient) Intercept(interceptors ...Interceptor)
- func (c *TagClient) Interceptors() []Interceptor
- func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
- func (c *TagClient) Query() *TagQuery
- func (c *TagClient) QueryHosts(t *Tag) *HostQuery
- func (c *TagClient) Update() *TagUpdate
- func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
- func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
- func (c *TagClient) Use(hooks ...Hook)
- type TagConnection
- type TagCreate
- func (tc *TagCreate) AddHostIDs(ids ...int) *TagCreate
- func (tc *TagCreate) AddHosts(h ...*Host) *TagCreate
- func (tc *TagCreate) Exec(ctx context.Context) error
- func (tc *TagCreate) ExecX(ctx context.Context)
- func (tc *TagCreate) Mutation() *TagMutation
- func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
- func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
- func (tc *TagCreate) Save(ctx context.Context) (*Tag, error)
- func (tc *TagCreate) SaveX(ctx context.Context) *Tag
- func (c *TagCreate) SetInput(i CreateTagInput) *TagCreate
- func (tc *TagCreate) SetKind(t tag.Kind) *TagCreate
- func (tc *TagCreate) SetName(s string) *TagCreate
- type TagCreateBulk
- func (tcb *TagCreateBulk) Exec(ctx context.Context) error
- func (tcb *TagCreateBulk) ExecX(ctx context.Context)
- func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
- func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
- func (tcb *TagCreateBulk) Save(ctx context.Context) ([]*Tag, error)
- func (tcb *TagCreateBulk) SaveX(ctx context.Context) []*Tag
- type TagDelete
- type TagDeleteOne
- type TagEdge
- type TagEdges
- type TagGroupBy
- func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
- func (s *TagGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagGroupBy) BoolX(ctx context.Context) bool
- func (s *TagGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TagGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TagGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagGroupBy) Float64X(ctx context.Context) float64
- func (s *TagGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TagGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TagGroupBy) IntX(ctx context.Context) int
- func (s *TagGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TagGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
- func (s *TagGroupBy) ScanX(ctx context.Context, v any)
- func (s *TagGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TagGroupBy) StringX(ctx context.Context) string
- func (s *TagGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TagGroupBy) StringsX(ctx context.Context) []string
- type TagMutation
- func (m *TagMutation) AddField(name string, value ent.Value) error
- func (m *TagMutation) AddHostIDs(ids ...int)
- func (m *TagMutation) AddedEdges() []string
- func (m *TagMutation) AddedField(name string) (ent.Value, bool)
- func (m *TagMutation) AddedFields() []string
- func (m *TagMutation) AddedIDs(name string) []ent.Value
- func (m *TagMutation) ClearEdge(name string) error
- func (m *TagMutation) ClearField(name string) error
- func (m *TagMutation) ClearHosts()
- func (m *TagMutation) ClearedEdges() []string
- func (m *TagMutation) ClearedFields() []string
- func (m TagMutation) Client() *Client
- func (m *TagMutation) EdgeCleared(name string) bool
- func (m *TagMutation) Field(name string) (ent.Value, bool)
- func (m *TagMutation) FieldCleared(name string) bool
- func (m *TagMutation) Fields() []string
- func (m *TagMutation) HostsCleared() bool
- func (m *TagMutation) HostsIDs() (ids []int)
- func (m *TagMutation) ID() (id int, exists bool)
- func (m *TagMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TagMutation) Kind() (r tag.Kind, exists bool)
- func (m *TagMutation) Name() (r string, exists bool)
- func (m *TagMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TagMutation) OldKind(ctx context.Context) (v tag.Kind, err error)
- func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TagMutation) Op() Op
- func (m *TagMutation) RemoveHostIDs(ids ...int)
- func (m *TagMutation) RemovedEdges() []string
- func (m *TagMutation) RemovedHostsIDs() (ids []int)
- func (m *TagMutation) RemovedIDs(name string) []ent.Value
- func (m *TagMutation) ResetEdge(name string) error
- func (m *TagMutation) ResetField(name string) error
- func (m *TagMutation) ResetHosts()
- func (m *TagMutation) ResetKind()
- func (m *TagMutation) ResetName()
- func (m *TagMutation) SetField(name string, value ent.Value) error
- func (m *TagMutation) SetKind(t tag.Kind)
- func (m *TagMutation) SetName(s string)
- func (m *TagMutation) SetOp(op Op)
- func (m TagMutation) Tx() (*Tx, error)
- func (m *TagMutation) Type() string
- func (m *TagMutation) Where(ps ...predicate.Tag)
- func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
- type TagOrder
- type TagOrderField
- type TagPaginateOption
- type TagQuery
- func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
- func (tq *TagQuery) All(ctx context.Context) ([]*Tag, error)
- func (tq *TagQuery) AllX(ctx context.Context) []*Tag
- func (tq *TagQuery) Clone() *TagQuery
- func (t *TagQuery) CollectFields(ctx context.Context, satisfies ...string) (*TagQuery, error)
- func (tq *TagQuery) Count(ctx context.Context) (int, error)
- func (tq *TagQuery) CountX(ctx context.Context) int
- func (tq *TagQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TagQuery) ExistX(ctx context.Context) bool
- func (tq *TagQuery) First(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) FirstIDX(ctx context.Context) int
- func (tq *TagQuery) FirstX(ctx context.Context) *Tag
- func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
- func (tq *TagQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TagQuery) IDsX(ctx context.Context) []int
- func (tq *TagQuery) Limit(limit int) *TagQuery
- func (tq *TagQuery) Offset(offset int) *TagQuery
- func (tq *TagQuery) Only(ctx context.Context) (*Tag, error)
- func (tq *TagQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TagQuery) OnlyIDX(ctx context.Context) int
- func (tq *TagQuery) OnlyX(ctx context.Context) *Tag
- func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
- func (t *TagQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TagConnection, error)
- func (tq *TagQuery) QueryHosts() *HostQuery
- func (tq *TagQuery) Select(fields ...string) *TagSelect
- func (tq *TagQuery) Unique(unique bool) *TagQuery
- func (tq *TagQuery) Where(ps ...predicate.Tag) *TagQuery
- func (tq *TagQuery) WithHosts(opts ...func(*HostQuery)) *TagQuery
- func (tq *TagQuery) WithNamedHosts(name string, opts ...func(*HostQuery)) *TagQuery
- type TagSelect
- func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
- func (s *TagSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TagSelect) BoolX(ctx context.Context) bool
- func (s *TagSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TagSelect) BoolsX(ctx context.Context) []bool
- func (s *TagSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TagSelect) Float64X(ctx context.Context) float64
- func (s *TagSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TagSelect) Float64sX(ctx context.Context) []float64
- func (s *TagSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TagSelect) IntX(ctx context.Context) int
- func (s *TagSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TagSelect) IntsX(ctx context.Context) []int
- func (ts *TagSelect) Scan(ctx context.Context, v any) error
- func (s *TagSelect) ScanX(ctx context.Context, v any)
- func (s *TagSelect) String(ctx context.Context) (_ string, err error)
- func (s *TagSelect) StringX(ctx context.Context) string
- func (s *TagSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TagSelect) StringsX(ctx context.Context) []string
- type TagUpdate
- func (tu *TagUpdate) AddHostIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) AddHosts(h ...*Host) *TagUpdate
- func (tu *TagUpdate) ClearHosts() *TagUpdate
- func (tu *TagUpdate) Exec(ctx context.Context) error
- func (tu *TagUpdate) ExecX(ctx context.Context)
- func (tu *TagUpdate) Mutation() *TagMutation
- func (tu *TagUpdate) RemoveHostIDs(ids ...int) *TagUpdate
- func (tu *TagUpdate) RemoveHosts(h ...*Host) *TagUpdate
- func (tu *TagUpdate) Save(ctx context.Context) (int, error)
- func (tu *TagUpdate) SaveX(ctx context.Context) int
- func (c *TagUpdate) SetInput(i UpdateTagInput) *TagUpdate
- func (tu *TagUpdate) SetKind(t tag.Kind) *TagUpdate
- func (tu *TagUpdate) SetName(s string) *TagUpdate
- func (tu *TagUpdate) Where(ps ...predicate.Tag) *TagUpdate
- type TagUpdateOne
- func (tuo *TagUpdateOne) AddHostIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) AddHosts(h ...*Host) *TagUpdateOne
- func (tuo *TagUpdateOne) ClearHosts() *TagUpdateOne
- func (tuo *TagUpdateOne) Exec(ctx context.Context) error
- func (tuo *TagUpdateOne) ExecX(ctx context.Context)
- func (tuo *TagUpdateOne) Mutation() *TagMutation
- func (tuo *TagUpdateOne) RemoveHostIDs(ids ...int) *TagUpdateOne
- func (tuo *TagUpdateOne) RemoveHosts(h ...*Host) *TagUpdateOne
- func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
- func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
- func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
- func (c *TagUpdateOne) SetInput(i UpdateTagInput) *TagUpdateOne
- func (tuo *TagUpdateOne) SetKind(t tag.Kind) *TagUpdateOne
- func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
- func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
- type TagUpsert
- type TagUpsertBulk
- func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
- func (u *TagUpsertBulk) Exec(ctx context.Context) error
- func (u *TagUpsertBulk) ExecX(ctx context.Context)
- func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
- func (u *TagUpsertBulk) SetKind(v tag.Kind) *TagUpsertBulk
- func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk
- func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateKind() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk
- func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
- type TagUpsertOne
- func (u *TagUpsertOne) DoNothing() *TagUpsertOne
- func (u *TagUpsertOne) Exec(ctx context.Context) error
- func (u *TagUpsertOne) ExecX(ctx context.Context)
- func (u *TagUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TagUpsertOne) IDX(ctx context.Context) int
- func (u *TagUpsertOne) Ignore() *TagUpsertOne
- func (u *TagUpsertOne) SetKind(v tag.Kind) *TagUpsertOne
- func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
- func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
- func (u *TagUpsertOne) UpdateKind() *TagUpsertOne
- func (u *TagUpsertOne) UpdateName() *TagUpsertOne
- func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
- type TagWhereInput
- type Tags
- type Task
- func (t *Task) Beacon(ctx context.Context) (*Beacon, error)
- func (n *Task) IsNode()
- func (t *Task) NamedReportedFiles(name string) ([]*HostFile, error)
- func (t *Task) NamedReportedProcesses(name string) ([]*HostProcess, error)
- func (t *Task) QueryBeacon() *BeaconQuery
- func (t *Task) QueryQuest() *QuestQuery
- func (t *Task) QueryReportedFiles() *HostFileQuery
- func (t *Task) QueryReportedProcesses() *HostProcessQuery
- func (t *Task) Quest(ctx context.Context) (*Quest, error)
- func (t *Task) ReportedFiles(ctx context.Context) (result []*HostFile, err error)
- func (t *Task) ReportedProcesses(ctx context.Context) (result []*HostProcess, err error)
- func (t *Task) String() string
- func (t *Task) ToEdge(order *TaskOrder) *TaskEdge
- func (t *Task) Unwrap() *Task
- func (t *Task) Update() *TaskUpdateOne
- func (t *Task) Value(name string) (ent.Value, error)
- type TaskClient
- func (c *TaskClient) Create() *TaskCreate
- func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
- func (c *TaskClient) Delete() *TaskDelete
- func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
- func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne
- func (c *TaskClient) Get(ctx context.Context, id int) (*Task, error)
- func (c *TaskClient) GetX(ctx context.Context, id int) *Task
- func (c *TaskClient) Hooks() []Hook
- func (c *TaskClient) Intercept(interceptors ...Interceptor)
- func (c *TaskClient) Interceptors() []Interceptor
- func (c *TaskClient) MapCreateBulk(slice any, setFunc func(*TaskCreate, int)) *TaskCreateBulk
- func (c *TaskClient) Query() *TaskQuery
- func (c *TaskClient) QueryBeacon(t *Task) *BeaconQuery
- func (c *TaskClient) QueryQuest(t *Task) *QuestQuery
- func (c *TaskClient) QueryReportedFiles(t *Task) *HostFileQuery
- func (c *TaskClient) QueryReportedProcesses(t *Task) *HostProcessQuery
- func (c *TaskClient) Update() *TaskUpdate
- func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
- func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne
- func (c *TaskClient) Use(hooks ...Hook)
- type TaskConnection
- type TaskCreate
- func (tc *TaskCreate) AddReportedFileIDs(ids ...int) *TaskCreate
- func (tc *TaskCreate) AddReportedFiles(h ...*HostFile) *TaskCreate
- func (tc *TaskCreate) AddReportedProcessIDs(ids ...int) *TaskCreate
- func (tc *TaskCreate) AddReportedProcesses(h ...*HostProcess) *TaskCreate
- func (tc *TaskCreate) Exec(ctx context.Context) error
- func (tc *TaskCreate) ExecX(ctx context.Context)
- func (tc *TaskCreate) Mutation() *TaskMutation
- func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne
- func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne
- func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
- func (tc *TaskCreate) SaveX(ctx context.Context) *Task
- func (tc *TaskCreate) SetBeacon(b *Beacon) *TaskCreate
- func (tc *TaskCreate) SetBeaconID(id int) *TaskCreate
- func (tc *TaskCreate) SetClaimedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetCreatedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetError(s string) *TaskCreate
- func (tc *TaskCreate) SetExecFinishedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetExecStartedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetLastModifiedAt(t time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableClaimedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableCreatedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableError(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableExecFinishedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableExecStartedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableLastModifiedAt(t *time.Time) *TaskCreate
- func (tc *TaskCreate) SetNillableOutput(s *string) *TaskCreate
- func (tc *TaskCreate) SetNillableOutputSize(i *int) *TaskCreate
- func (tc *TaskCreate) SetOutput(s string) *TaskCreate
- func (tc *TaskCreate) SetOutputSize(i int) *TaskCreate
- func (tc *TaskCreate) SetQuest(q *Quest) *TaskCreate
- func (tc *TaskCreate) SetQuestID(id int) *TaskCreate
- type TaskCreateBulk
- func (tcb *TaskCreateBulk) Exec(ctx context.Context) error
- func (tcb *TaskCreateBulk) ExecX(ctx context.Context)
- func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk
- func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk
- func (tcb *TaskCreateBulk) Save(ctx context.Context) ([]*Task, error)
- func (tcb *TaskCreateBulk) SaveX(ctx context.Context) []*Task
- type TaskDelete
- type TaskDeleteOne
- type TaskEdge
- type TaskEdges
- type TaskGroupBy
- func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
- func (s *TaskGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TaskGroupBy) BoolX(ctx context.Context) bool
- func (s *TaskGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TaskGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TaskGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TaskGroupBy) Float64X(ctx context.Context) float64
- func (s *TaskGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TaskGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TaskGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TaskGroupBy) IntX(ctx context.Context) int
- func (s *TaskGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TaskGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TaskGroupBy) Scan(ctx context.Context, v any) error
- func (s *TaskGroupBy) ScanX(ctx context.Context, v any)
- func (s *TaskGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TaskGroupBy) StringX(ctx context.Context) string
- func (s *TaskGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TaskGroupBy) StringsX(ctx context.Context) []string
- type TaskMutation
- func (m *TaskMutation) AddField(name string, value ent.Value) error
- func (m *TaskMutation) AddOutputSize(i int)
- func (m *TaskMutation) AddReportedFileIDs(ids ...int)
- func (m *TaskMutation) AddReportedProcessIDs(ids ...int)
- func (m *TaskMutation) AddedEdges() []string
- func (m *TaskMutation) AddedField(name string) (ent.Value, bool)
- func (m *TaskMutation) AddedFields() []string
- func (m *TaskMutation) AddedIDs(name string) []ent.Value
- func (m *TaskMutation) AddedOutputSize() (r int, exists bool)
- func (m *TaskMutation) BeaconCleared() bool
- func (m *TaskMutation) BeaconID() (id int, exists bool)
- func (m *TaskMutation) BeaconIDs() (ids []int)
- func (m *TaskMutation) ClaimedAt() (r time.Time, exists bool)
- func (m *TaskMutation) ClaimedAtCleared() bool
- func (m *TaskMutation) ClearBeacon()
- func (m *TaskMutation) ClearClaimedAt()
- func (m *TaskMutation) ClearEdge(name string) error
- func (m *TaskMutation) ClearError()
- func (m *TaskMutation) ClearExecFinishedAt()
- func (m *TaskMutation) ClearExecStartedAt()
- func (m *TaskMutation) ClearField(name string) error
- func (m *TaskMutation) ClearOutput()
- func (m *TaskMutation) ClearQuest()
- func (m *TaskMutation) ClearReportedFiles()
- func (m *TaskMutation) ClearReportedProcesses()
- func (m *TaskMutation) ClearedEdges() []string
- func (m *TaskMutation) ClearedFields() []string
- func (m TaskMutation) Client() *Client
- func (m *TaskMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TaskMutation) EdgeCleared(name string) bool
- func (m *TaskMutation) Error() (r string, exists bool)
- func (m *TaskMutation) ErrorCleared() bool
- func (m *TaskMutation) ExecFinishedAt() (r time.Time, exists bool)
- func (m *TaskMutation) ExecFinishedAtCleared() bool
- func (m *TaskMutation) ExecStartedAt() (r time.Time, exists bool)
- func (m *TaskMutation) ExecStartedAtCleared() bool
- func (m *TaskMutation) Field(name string) (ent.Value, bool)
- func (m *TaskMutation) FieldCleared(name string) bool
- func (m *TaskMutation) Fields() []string
- func (m *TaskMutation) ID() (id int, exists bool)
- func (m *TaskMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TaskMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *TaskMutation) OldClaimedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldError(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldExecFinishedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldExecStartedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TaskMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *TaskMutation) OldOutput(ctx context.Context) (v string, err error)
- func (m *TaskMutation) OldOutputSize(ctx context.Context) (v int, err error)
- func (m *TaskMutation) Op() Op
- func (m *TaskMutation) Output() (r string, exists bool)
- func (m *TaskMutation) OutputCleared() bool
- func (m *TaskMutation) OutputSize() (r int, exists bool)
- func (m *TaskMutation) QuestCleared() bool
- func (m *TaskMutation) QuestID() (id int, exists bool)
- func (m *TaskMutation) QuestIDs() (ids []int)
- func (m *TaskMutation) RemoveReportedFileIDs(ids ...int)
- func (m *TaskMutation) RemoveReportedProcessIDs(ids ...int)
- func (m *TaskMutation) RemovedEdges() []string
- func (m *TaskMutation) RemovedIDs(name string) []ent.Value
- func (m *TaskMutation) RemovedReportedFilesIDs() (ids []int)
- func (m *TaskMutation) RemovedReportedProcessesIDs() (ids []int)
- func (m *TaskMutation) ReportedFilesCleared() bool
- func (m *TaskMutation) ReportedFilesIDs() (ids []int)
- func (m *TaskMutation) ReportedProcessesCleared() bool
- func (m *TaskMutation) ReportedProcessesIDs() (ids []int)
- func (m *TaskMutation) ResetBeacon()
- func (m *TaskMutation) ResetClaimedAt()
- func (m *TaskMutation) ResetCreatedAt()
- func (m *TaskMutation) ResetEdge(name string) error
- func (m *TaskMutation) ResetError()
- func (m *TaskMutation) ResetExecFinishedAt()
- func (m *TaskMutation) ResetExecStartedAt()
- func (m *TaskMutation) ResetField(name string) error
- func (m *TaskMutation) ResetLastModifiedAt()
- func (m *TaskMutation) ResetOutput()
- func (m *TaskMutation) ResetOutputSize()
- func (m *TaskMutation) ResetQuest()
- func (m *TaskMutation) ResetReportedFiles()
- func (m *TaskMutation) ResetReportedProcesses()
- func (m *TaskMutation) SetBeaconID(id int)
- func (m *TaskMutation) SetClaimedAt(t time.Time)
- func (m *TaskMutation) SetCreatedAt(t time.Time)
- func (m *TaskMutation) SetError(s string)
- func (m *TaskMutation) SetExecFinishedAt(t time.Time)
- func (m *TaskMutation) SetExecStartedAt(t time.Time)
- func (m *TaskMutation) SetField(name string, value ent.Value) error
- func (m *TaskMutation) SetLastModifiedAt(t time.Time)
- func (m *TaskMutation) SetOp(op Op)
- func (m *TaskMutation) SetOutput(s string)
- func (m *TaskMutation) SetOutputSize(i int)
- func (m *TaskMutation) SetQuestID(id int)
- func (m TaskMutation) Tx() (*Tx, error)
- func (m *TaskMutation) Type() string
- func (m *TaskMutation) Where(ps ...predicate.Task)
- func (m *TaskMutation) WhereP(ps ...func(*sql.Selector))
- type TaskOrder
- type TaskOrderField
- type TaskPaginateOption
- type TaskQuery
- func (tq *TaskQuery) Aggregate(fns ...AggregateFunc) *TaskSelect
- func (tq *TaskQuery) All(ctx context.Context) ([]*Task, error)
- func (tq *TaskQuery) AllX(ctx context.Context) []*Task
- func (tq *TaskQuery) Clone() *TaskQuery
- func (t *TaskQuery) CollectFields(ctx context.Context, satisfies ...string) (*TaskQuery, error)
- func (tq *TaskQuery) Count(ctx context.Context) (int, error)
- func (tq *TaskQuery) CountX(ctx context.Context) int
- func (tq *TaskQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TaskQuery) ExistX(ctx context.Context) bool
- func (tq *TaskQuery) First(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TaskQuery) FirstIDX(ctx context.Context) int
- func (tq *TaskQuery) FirstX(ctx context.Context) *Task
- func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
- func (tq *TaskQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TaskQuery) IDsX(ctx context.Context) []int
- func (tq *TaskQuery) Limit(limit int) *TaskQuery
- func (tq *TaskQuery) Offset(offset int) *TaskQuery
- func (tq *TaskQuery) Only(ctx context.Context) (*Task, error)
- func (tq *TaskQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TaskQuery) OnlyIDX(ctx context.Context) int
- func (tq *TaskQuery) OnlyX(ctx context.Context) *Task
- func (tq *TaskQuery) Order(o ...task.OrderOption) *TaskQuery
- func (t *TaskQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TaskConnection, error)
- func (tq *TaskQuery) QueryBeacon() *BeaconQuery
- func (tq *TaskQuery) QueryQuest() *QuestQuery
- func (tq *TaskQuery) QueryReportedFiles() *HostFileQuery
- func (tq *TaskQuery) QueryReportedProcesses() *HostProcessQuery
- func (tq *TaskQuery) Select(fields ...string) *TaskSelect
- func (tq *TaskQuery) Unique(unique bool) *TaskQuery
- func (tq *TaskQuery) Where(ps ...predicate.Task) *TaskQuery
- func (tq *TaskQuery) WithBeacon(opts ...func(*BeaconQuery)) *TaskQuery
- func (tq *TaskQuery) WithNamedReportedFiles(name string, opts ...func(*HostFileQuery)) *TaskQuery
- func (tq *TaskQuery) WithNamedReportedProcesses(name string, opts ...func(*HostProcessQuery)) *TaskQuery
- func (tq *TaskQuery) WithQuest(opts ...func(*QuestQuery)) *TaskQuery
- func (tq *TaskQuery) WithReportedFiles(opts ...func(*HostFileQuery)) *TaskQuery
- func (tq *TaskQuery) WithReportedProcesses(opts ...func(*HostProcessQuery)) *TaskQuery
- type TaskSelect
- func (ts *TaskSelect) Aggregate(fns ...AggregateFunc) *TaskSelect
- func (s *TaskSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TaskSelect) BoolX(ctx context.Context) bool
- func (s *TaskSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TaskSelect) BoolsX(ctx context.Context) []bool
- func (s *TaskSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TaskSelect) Float64X(ctx context.Context) float64
- func (s *TaskSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TaskSelect) Float64sX(ctx context.Context) []float64
- func (s *TaskSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TaskSelect) IntX(ctx context.Context) int
- func (s *TaskSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TaskSelect) IntsX(ctx context.Context) []int
- func (ts *TaskSelect) Scan(ctx context.Context, v any) error
- func (s *TaskSelect) ScanX(ctx context.Context, v any)
- func (s *TaskSelect) String(ctx context.Context) (_ string, err error)
- func (s *TaskSelect) StringX(ctx context.Context) string
- func (s *TaskSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TaskSelect) StringsX(ctx context.Context) []string
- type TaskUpdate
- func (tu *TaskUpdate) AddOutputSize(i int) *TaskUpdate
- func (tu *TaskUpdate) AddReportedFileIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) AddReportedFiles(h ...*HostFile) *TaskUpdate
- func (tu *TaskUpdate) AddReportedProcessIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) AddReportedProcesses(h ...*HostProcess) *TaskUpdate
- func (tu *TaskUpdate) ClearBeacon() *TaskUpdate
- func (tu *TaskUpdate) ClearClaimedAt() *TaskUpdate
- func (tu *TaskUpdate) ClearError() *TaskUpdate
- func (tu *TaskUpdate) ClearExecFinishedAt() *TaskUpdate
- func (tu *TaskUpdate) ClearExecStartedAt() *TaskUpdate
- func (tu *TaskUpdate) ClearOutput() *TaskUpdate
- func (tu *TaskUpdate) ClearQuest() *TaskUpdate
- func (tu *TaskUpdate) ClearReportedFiles() *TaskUpdate
- func (tu *TaskUpdate) ClearReportedProcesses() *TaskUpdate
- func (tu *TaskUpdate) Exec(ctx context.Context) error
- func (tu *TaskUpdate) ExecX(ctx context.Context)
- func (tu *TaskUpdate) Mutation() *TaskMutation
- func (tu *TaskUpdate) RemoveReportedFileIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) RemoveReportedFiles(h ...*HostFile) *TaskUpdate
- func (tu *TaskUpdate) RemoveReportedProcessIDs(ids ...int) *TaskUpdate
- func (tu *TaskUpdate) RemoveReportedProcesses(h ...*HostProcess) *TaskUpdate
- func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
- func (tu *TaskUpdate) SaveX(ctx context.Context) int
- func (tu *TaskUpdate) SetBeacon(b *Beacon) *TaskUpdate
- func (tu *TaskUpdate) SetBeaconID(id int) *TaskUpdate
- func (tu *TaskUpdate) SetClaimedAt(t time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetError(s string) *TaskUpdate
- func (tu *TaskUpdate) SetExecFinishedAt(t time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetExecStartedAt(t time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetLastModifiedAt(t time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetNillableClaimedAt(t *time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetNillableError(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableExecFinishedAt(t *time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetNillableExecStartedAt(t *time.Time) *TaskUpdate
- func (tu *TaskUpdate) SetNillableOutput(s *string) *TaskUpdate
- func (tu *TaskUpdate) SetNillableOutputSize(i *int) *TaskUpdate
- func (tu *TaskUpdate) SetOutput(s string) *TaskUpdate
- func (tu *TaskUpdate) SetOutputSize(i int) *TaskUpdate
- func (tu *TaskUpdate) SetQuest(q *Quest) *TaskUpdate
- func (tu *TaskUpdate) SetQuestID(id int) *TaskUpdate
- func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
- type TaskUpdateOne
- func (tuo *TaskUpdateOne) AddOutputSize(i int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddReportedFileIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddReportedFiles(h ...*HostFile) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddReportedProcessIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) AddReportedProcesses(h ...*HostProcess) *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearBeacon() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearClaimedAt() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearError() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearExecFinishedAt() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearExecStartedAt() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearOutput() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearQuest() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearReportedFiles() *TaskUpdateOne
- func (tuo *TaskUpdateOne) ClearReportedProcesses() *TaskUpdateOne
- func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
- func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
- func (tuo *TaskUpdateOne) Mutation() *TaskMutation
- func (tuo *TaskUpdateOne) RemoveReportedFileIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveReportedFiles(h ...*HostFile) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveReportedProcessIDs(ids ...int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) RemoveReportedProcesses(h ...*HostProcess) *TaskUpdateOne
- func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
- func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
- func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetBeacon(b *Beacon) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetBeaconID(id int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetClaimedAt(t time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetError(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetExecFinishedAt(t time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetExecStartedAt(t time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetLastModifiedAt(t time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableClaimedAt(t *time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableError(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableExecFinishedAt(t *time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableExecStartedAt(t *time.Time) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableOutput(s *string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetNillableOutputSize(i *int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetOutput(s string) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetOutputSize(i int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetQuest(q *Quest) *TaskUpdateOne
- func (tuo *TaskUpdateOne) SetQuestID(id int) *TaskUpdateOne
- func (tuo *TaskUpdateOne) Where(ps ...predicate.Task) *TaskUpdateOne
- type TaskUpsert
- func (u *TaskUpsert) AddOutputSize(v int) *TaskUpsert
- func (u *TaskUpsert) ClearClaimedAt() *TaskUpsert
- func (u *TaskUpsert) ClearError() *TaskUpsert
- func (u *TaskUpsert) ClearExecFinishedAt() *TaskUpsert
- func (u *TaskUpsert) ClearExecStartedAt() *TaskUpsert
- func (u *TaskUpsert) ClearOutput() *TaskUpsert
- func (u *TaskUpsert) SetClaimedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetError(v string) *TaskUpsert
- func (u *TaskUpsert) SetExecFinishedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetExecStartedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetLastModifiedAt(v time.Time) *TaskUpsert
- func (u *TaskUpsert) SetOutput(v string) *TaskUpsert
- func (u *TaskUpsert) SetOutputSize(v int) *TaskUpsert
- func (u *TaskUpsert) UpdateClaimedAt() *TaskUpsert
- func (u *TaskUpsert) UpdateError() *TaskUpsert
- func (u *TaskUpsert) UpdateExecFinishedAt() *TaskUpsert
- func (u *TaskUpsert) UpdateExecStartedAt() *TaskUpsert
- func (u *TaskUpsert) UpdateLastModifiedAt() *TaskUpsert
- func (u *TaskUpsert) UpdateOutput() *TaskUpsert
- func (u *TaskUpsert) UpdateOutputSize() *TaskUpsert
- type TaskUpsertBulk
- func (u *TaskUpsertBulk) AddOutputSize(v int) *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearClaimedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearError() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearExecFinishedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearExecStartedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) ClearOutput() *TaskUpsertBulk
- func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk
- func (u *TaskUpsertBulk) Exec(ctx context.Context) error
- func (u *TaskUpsertBulk) ExecX(ctx context.Context)
- func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetClaimedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetError(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetExecFinishedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetExecStartedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetLastModifiedAt(v time.Time) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetOutput(v string) *TaskUpsertBulk
- func (u *TaskUpsertBulk) SetOutputSize(v int) *TaskUpsertBulk
- func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateClaimedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateError() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateExecFinishedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateExecStartedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateLastModifiedAt() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateOutput() *TaskUpsertBulk
- func (u *TaskUpsertBulk) UpdateOutputSize() *TaskUpsertBulk
- type TaskUpsertOne
- func (u *TaskUpsertOne) AddOutputSize(v int) *TaskUpsertOne
- func (u *TaskUpsertOne) ClearClaimedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearError() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearExecFinishedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearExecStartedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) ClearOutput() *TaskUpsertOne
- func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne
- func (u *TaskUpsertOne) Exec(ctx context.Context) error
- func (u *TaskUpsertOne) ExecX(ctx context.Context)
- func (u *TaskUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TaskUpsertOne) IDX(ctx context.Context) int
- func (u *TaskUpsertOne) Ignore() *TaskUpsertOne
- func (u *TaskUpsertOne) SetClaimedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetError(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetExecFinishedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetExecStartedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetLastModifiedAt(v time.Time) *TaskUpsertOne
- func (u *TaskUpsertOne) SetOutput(v string) *TaskUpsertOne
- func (u *TaskUpsertOne) SetOutputSize(v int) *TaskUpsertOne
- func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateClaimedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateError() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateExecFinishedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateExecStartedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateLastModifiedAt() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateOutput() *TaskUpsertOne
- func (u *TaskUpsertOne) UpdateOutputSize() *TaskUpsertOne
- type TaskWhereInput
- type Tasks
- type Tome
- func (t *Tome) Files(ctx context.Context) (result []*File, err error)
- func (n *Tome) IsNode()
- func (t *Tome) NamedFiles(name string) ([]*File, error)
- func (t *Tome) QueryFiles() *FileQuery
- func (t *Tome) QueryUploader() *UserQuery
- func (t *Tome) String() string
- func (t *Tome) ToEdge(order *TomeOrder) *TomeEdge
- func (t *Tome) Unwrap() *Tome
- func (t *Tome) Update() *TomeUpdateOne
- func (t *Tome) Uploader(ctx context.Context) (*User, error)
- func (t *Tome) Value(name string) (ent.Value, error)
- type TomeClient
- func (c *TomeClient) Create() *TomeCreate
- func (c *TomeClient) CreateBulk(builders ...*TomeCreate) *TomeCreateBulk
- func (c *TomeClient) Delete() *TomeDelete
- func (c *TomeClient) DeleteOne(t *Tome) *TomeDeleteOne
- func (c *TomeClient) DeleteOneID(id int) *TomeDeleteOne
- func (c *TomeClient) Get(ctx context.Context, id int) (*Tome, error)
- func (c *TomeClient) GetX(ctx context.Context, id int) *Tome
- func (c *TomeClient) Hooks() []Hook
- func (c *TomeClient) Intercept(interceptors ...Interceptor)
- func (c *TomeClient) Interceptors() []Interceptor
- func (c *TomeClient) MapCreateBulk(slice any, setFunc func(*TomeCreate, int)) *TomeCreateBulk
- func (c *TomeClient) Query() *TomeQuery
- func (c *TomeClient) QueryFiles(t *Tome) *FileQuery
- func (c *TomeClient) QueryUploader(t *Tome) *UserQuery
- func (c *TomeClient) Update() *TomeUpdate
- func (c *TomeClient) UpdateOne(t *Tome) *TomeUpdateOne
- func (c *TomeClient) UpdateOneID(id int) *TomeUpdateOne
- func (c *TomeClient) Use(hooks ...Hook)
- type TomeConnection
- type TomeCreate
- func (tc *TomeCreate) AddFileIDs(ids ...int) *TomeCreate
- func (tc *TomeCreate) AddFiles(f ...*File) *TomeCreate
- func (tc *TomeCreate) Exec(ctx context.Context) error
- func (tc *TomeCreate) ExecX(ctx context.Context)
- func (tc *TomeCreate) Mutation() *TomeMutation
- func (tc *TomeCreate) OnConflict(opts ...sql.ConflictOption) *TomeUpsertOne
- func (tc *TomeCreate) OnConflictColumns(columns ...string) *TomeUpsertOne
- func (tc *TomeCreate) Save(ctx context.Context) (*Tome, error)
- func (tc *TomeCreate) SaveX(ctx context.Context) *Tome
- func (tc *TomeCreate) SetAuthor(s string) *TomeCreate
- func (tc *TomeCreate) SetCreatedAt(t time.Time) *TomeCreate
- func (tc *TomeCreate) SetDescription(s string) *TomeCreate
- func (tc *TomeCreate) SetEldritch(s string) *TomeCreate
- func (tc *TomeCreate) SetHash(s string) *TomeCreate
- func (c *TomeCreate) SetInput(i CreateTomeInput) *TomeCreate
- func (tc *TomeCreate) SetLastModifiedAt(t time.Time) *TomeCreate
- func (tc *TomeCreate) SetName(s string) *TomeCreate
- func (tc *TomeCreate) SetNillableCreatedAt(t *time.Time) *TomeCreate
- func (tc *TomeCreate) SetNillableLastModifiedAt(t *time.Time) *TomeCreate
- func (tc *TomeCreate) SetNillableParamDefs(s *string) *TomeCreate
- func (tc *TomeCreate) SetNillableSupportModel(tm *tome.SupportModel) *TomeCreate
- func (tc *TomeCreate) SetNillableTactic(t *tome.Tactic) *TomeCreate
- func (tc *TomeCreate) SetNillableUploaderID(id *int) *TomeCreate
- func (tc *TomeCreate) SetParamDefs(s string) *TomeCreate
- func (tc *TomeCreate) SetSupportModel(tm tome.SupportModel) *TomeCreate
- func (tc *TomeCreate) SetTactic(t tome.Tactic) *TomeCreate
- func (tc *TomeCreate) SetUploader(u *User) *TomeCreate
- func (tc *TomeCreate) SetUploaderID(id int) *TomeCreate
- type TomeCreateBulk
- func (tcb *TomeCreateBulk) Exec(ctx context.Context) error
- func (tcb *TomeCreateBulk) ExecX(ctx context.Context)
- func (tcb *TomeCreateBulk) OnConflict(opts ...sql.ConflictOption) *TomeUpsertBulk
- func (tcb *TomeCreateBulk) OnConflictColumns(columns ...string) *TomeUpsertBulk
- func (tcb *TomeCreateBulk) Save(ctx context.Context) ([]*Tome, error)
- func (tcb *TomeCreateBulk) SaveX(ctx context.Context) []*Tome
- type TomeDelete
- type TomeDeleteOne
- type TomeEdge
- type TomeEdges
- type TomeGroupBy
- func (tgb *TomeGroupBy) Aggregate(fns ...AggregateFunc) *TomeGroupBy
- func (s *TomeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *TomeGroupBy) BoolX(ctx context.Context) bool
- func (s *TomeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *TomeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *TomeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *TomeGroupBy) Float64X(ctx context.Context) float64
- func (s *TomeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *TomeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *TomeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *TomeGroupBy) IntX(ctx context.Context) int
- func (s *TomeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *TomeGroupBy) IntsX(ctx context.Context) []int
- func (tgb *TomeGroupBy) Scan(ctx context.Context, v any) error
- func (s *TomeGroupBy) ScanX(ctx context.Context, v any)
- func (s *TomeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *TomeGroupBy) StringX(ctx context.Context) string
- func (s *TomeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *TomeGroupBy) StringsX(ctx context.Context) []string
- type TomeMutation
- func (m *TomeMutation) AddField(name string, value ent.Value) error
- func (m *TomeMutation) AddFileIDs(ids ...int)
- func (m *TomeMutation) AddedEdges() []string
- func (m *TomeMutation) AddedField(name string) (ent.Value, bool)
- func (m *TomeMutation) AddedFields() []string
- func (m *TomeMutation) AddedIDs(name string) []ent.Value
- func (m *TomeMutation) Author() (r string, exists bool)
- func (m *TomeMutation) ClearEdge(name string) error
- func (m *TomeMutation) ClearField(name string) error
- func (m *TomeMutation) ClearFiles()
- func (m *TomeMutation) ClearParamDefs()
- func (m *TomeMutation) ClearUploader()
- func (m *TomeMutation) ClearedEdges() []string
- func (m *TomeMutation) ClearedFields() []string
- func (m TomeMutation) Client() *Client
- func (m *TomeMutation) CreatedAt() (r time.Time, exists bool)
- func (m *TomeMutation) Description() (r string, exists bool)
- func (m *TomeMutation) EdgeCleared(name string) bool
- func (m *TomeMutation) Eldritch() (r string, exists bool)
- func (m *TomeMutation) Field(name string) (ent.Value, bool)
- func (m *TomeMutation) FieldCleared(name string) bool
- func (m *TomeMutation) Fields() []string
- func (m *TomeMutation) FilesCleared() bool
- func (m *TomeMutation) FilesIDs() (ids []int)
- func (m *TomeMutation) Hash() (r string, exists bool)
- func (m *TomeMutation) ID() (id int, exists bool)
- func (m *TomeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *TomeMutation) LastModifiedAt() (r time.Time, exists bool)
- func (m *TomeMutation) Name() (r string, exists bool)
- func (m *TomeMutation) OldAuthor(ctx context.Context) (v string, err error)
- func (m *TomeMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)
- func (m *TomeMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *TomeMutation) OldEldritch(ctx context.Context) (v string, err error)
- func (m *TomeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *TomeMutation) OldHash(ctx context.Context) (v string, err error)
- func (m *TomeMutation) OldLastModifiedAt(ctx context.Context) (v time.Time, err error)
- func (m *TomeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *TomeMutation) OldParamDefs(ctx context.Context) (v string, err error)
- func (m *TomeMutation) OldSupportModel(ctx context.Context) (v tome.SupportModel, err error)
- func (m *TomeMutation) OldTactic(ctx context.Context) (v tome.Tactic, err error)
- func (m *TomeMutation) Op() Op
- func (m *TomeMutation) ParamDefs() (r string, exists bool)
- func (m *TomeMutation) ParamDefsCleared() bool
- func (m *TomeMutation) RemoveFileIDs(ids ...int)
- func (m *TomeMutation) RemovedEdges() []string
- func (m *TomeMutation) RemovedFilesIDs() (ids []int)
- func (m *TomeMutation) RemovedIDs(name string) []ent.Value
- func (m *TomeMutation) ResetAuthor()
- func (m *TomeMutation) ResetCreatedAt()
- func (m *TomeMutation) ResetDescription()
- func (m *TomeMutation) ResetEdge(name string) error
- func (m *TomeMutation) ResetEldritch()
- func (m *TomeMutation) ResetField(name string) error
- func (m *TomeMutation) ResetFiles()
- func (m *TomeMutation) ResetHash()
- func (m *TomeMutation) ResetLastModifiedAt()
- func (m *TomeMutation) ResetName()
- func (m *TomeMutation) ResetParamDefs()
- func (m *TomeMutation) ResetSupportModel()
- func (m *TomeMutation) ResetTactic()
- func (m *TomeMutation) ResetUploader()
- func (m *TomeMutation) SetAuthor(s string)
- func (m *TomeMutation) SetCreatedAt(t time.Time)
- func (m *TomeMutation) SetDescription(s string)
- func (m *TomeMutation) SetEldritch(s string)
- func (m *TomeMutation) SetField(name string, value ent.Value) error
- func (m *TomeMutation) SetHash(s string)
- func (m *TomeMutation) SetLastModifiedAt(t time.Time)
- func (m *TomeMutation) SetName(s string)
- func (m *TomeMutation) SetOp(op Op)
- func (m *TomeMutation) SetParamDefs(s string)
- func (m *TomeMutation) SetSupportModel(tm tome.SupportModel)
- func (m *TomeMutation) SetTactic(t tome.Tactic)
- func (m *TomeMutation) SetUploaderID(id int)
- func (m *TomeMutation) SupportModel() (r tome.SupportModel, exists bool)
- func (m *TomeMutation) Tactic() (r tome.Tactic, exists bool)
- func (m TomeMutation) Tx() (*Tx, error)
- func (m *TomeMutation) Type() string
- func (m *TomeMutation) UploaderCleared() bool
- func (m *TomeMutation) UploaderID() (id int, exists bool)
- func (m *TomeMutation) UploaderIDs() (ids []int)
- func (m *TomeMutation) Where(ps ...predicate.Tome)
- func (m *TomeMutation) WhereP(ps ...func(*sql.Selector))
- type TomeOrder
- type TomeOrderField
- type TomePaginateOption
- type TomeQuery
- func (tq *TomeQuery) Aggregate(fns ...AggregateFunc) *TomeSelect
- func (tq *TomeQuery) All(ctx context.Context) ([]*Tome, error)
- func (tq *TomeQuery) AllX(ctx context.Context) []*Tome
- func (tq *TomeQuery) Clone() *TomeQuery
- func (t *TomeQuery) CollectFields(ctx context.Context, satisfies ...string) (*TomeQuery, error)
- func (tq *TomeQuery) Count(ctx context.Context) (int, error)
- func (tq *TomeQuery) CountX(ctx context.Context) int
- func (tq *TomeQuery) Exist(ctx context.Context) (bool, error)
- func (tq *TomeQuery) ExistX(ctx context.Context) bool
- func (tq *TomeQuery) First(ctx context.Context) (*Tome, error)
- func (tq *TomeQuery) FirstID(ctx context.Context) (id int, err error)
- func (tq *TomeQuery) FirstIDX(ctx context.Context) int
- func (tq *TomeQuery) FirstX(ctx context.Context) *Tome
- func (tq *TomeQuery) GroupBy(field string, fields ...string) *TomeGroupBy
- func (tq *TomeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (tq *TomeQuery) IDsX(ctx context.Context) []int
- func (tq *TomeQuery) Limit(limit int) *TomeQuery
- func (tq *TomeQuery) Offset(offset int) *TomeQuery
- func (tq *TomeQuery) Only(ctx context.Context) (*Tome, error)
- func (tq *TomeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (tq *TomeQuery) OnlyIDX(ctx context.Context) int
- func (tq *TomeQuery) OnlyX(ctx context.Context) *Tome
- func (tq *TomeQuery) Order(o ...tome.OrderOption) *TomeQuery
- func (t *TomeQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*TomeConnection, error)
- func (tq *TomeQuery) QueryFiles() *FileQuery
- func (tq *TomeQuery) QueryUploader() *UserQuery
- func (tq *TomeQuery) Select(fields ...string) *TomeSelect
- func (tq *TomeQuery) Unique(unique bool) *TomeQuery
- func (tq *TomeQuery) Where(ps ...predicate.Tome) *TomeQuery
- func (tq *TomeQuery) WithFiles(opts ...func(*FileQuery)) *TomeQuery
- func (tq *TomeQuery) WithNamedFiles(name string, opts ...func(*FileQuery)) *TomeQuery
- func (tq *TomeQuery) WithUploader(opts ...func(*UserQuery)) *TomeQuery
- type TomeSelect
- func (ts *TomeSelect) Aggregate(fns ...AggregateFunc) *TomeSelect
- func (s *TomeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *TomeSelect) BoolX(ctx context.Context) bool
- func (s *TomeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *TomeSelect) BoolsX(ctx context.Context) []bool
- func (s *TomeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *TomeSelect) Float64X(ctx context.Context) float64
- func (s *TomeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *TomeSelect) Float64sX(ctx context.Context) []float64
- func (s *TomeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *TomeSelect) IntX(ctx context.Context) int
- func (s *TomeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *TomeSelect) IntsX(ctx context.Context) []int
- func (ts *TomeSelect) Scan(ctx context.Context, v any) error
- func (s *TomeSelect) ScanX(ctx context.Context, v any)
- func (s *TomeSelect) String(ctx context.Context) (_ string, err error)
- func (s *TomeSelect) StringX(ctx context.Context) string
- func (s *TomeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *TomeSelect) StringsX(ctx context.Context) []string
- type TomeUpdate
- func (tu *TomeUpdate) AddFileIDs(ids ...int) *TomeUpdate
- func (tu *TomeUpdate) AddFiles(f ...*File) *TomeUpdate
- func (tu *TomeUpdate) ClearFiles() *TomeUpdate
- func (tu *TomeUpdate) ClearParamDefs() *TomeUpdate
- func (tu *TomeUpdate) ClearUploader() *TomeUpdate
- func (tu *TomeUpdate) Exec(ctx context.Context) error
- func (tu *TomeUpdate) ExecX(ctx context.Context)
- func (tu *TomeUpdate) Mutation() *TomeMutation
- func (tu *TomeUpdate) RemoveFileIDs(ids ...int) *TomeUpdate
- func (tu *TomeUpdate) RemoveFiles(f ...*File) *TomeUpdate
- func (tu *TomeUpdate) Save(ctx context.Context) (int, error)
- func (tu *TomeUpdate) SaveX(ctx context.Context) int
- func (tu *TomeUpdate) SetAuthor(s string) *TomeUpdate
- func (tu *TomeUpdate) SetDescription(s string) *TomeUpdate
- func (tu *TomeUpdate) SetEldritch(s string) *TomeUpdate
- func (tu *TomeUpdate) SetHash(s string) *TomeUpdate
- func (c *TomeUpdate) SetInput(i UpdateTomeInput) *TomeUpdate
- func (tu *TomeUpdate) SetLastModifiedAt(t time.Time) *TomeUpdate
- func (tu *TomeUpdate) SetName(s string) *TomeUpdate
- func (tu *TomeUpdate) SetNillableParamDefs(s *string) *TomeUpdate
- func (tu *TomeUpdate) SetNillableSupportModel(tm *tome.SupportModel) *TomeUpdate
- func (tu *TomeUpdate) SetNillableTactic(t *tome.Tactic) *TomeUpdate
- func (tu *TomeUpdate) SetNillableUploaderID(id *int) *TomeUpdate
- func (tu *TomeUpdate) SetParamDefs(s string) *TomeUpdate
- func (tu *TomeUpdate) SetSupportModel(tm tome.SupportModel) *TomeUpdate
- func (tu *TomeUpdate) SetTactic(t tome.Tactic) *TomeUpdate
- func (tu *TomeUpdate) SetUploader(u *User) *TomeUpdate
- func (tu *TomeUpdate) SetUploaderID(id int) *TomeUpdate
- func (tu *TomeUpdate) Where(ps ...predicate.Tome) *TomeUpdate
- type TomeUpdateOne
- func (tuo *TomeUpdateOne) AddFileIDs(ids ...int) *TomeUpdateOne
- func (tuo *TomeUpdateOne) AddFiles(f ...*File) *TomeUpdateOne
- func (tuo *TomeUpdateOne) ClearFiles() *TomeUpdateOne
- func (tuo *TomeUpdateOne) ClearParamDefs() *TomeUpdateOne
- func (tuo *TomeUpdateOne) ClearUploader() *TomeUpdateOne
- func (tuo *TomeUpdateOne) Exec(ctx context.Context) error
- func (tuo *TomeUpdateOne) ExecX(ctx context.Context)
- func (tuo *TomeUpdateOne) Mutation() *TomeMutation
- func (tuo *TomeUpdateOne) RemoveFileIDs(ids ...int) *TomeUpdateOne
- func (tuo *TomeUpdateOne) RemoveFiles(f ...*File) *TomeUpdateOne
- func (tuo *TomeUpdateOne) Save(ctx context.Context) (*Tome, error)
- func (tuo *TomeUpdateOne) SaveX(ctx context.Context) *Tome
- func (tuo *TomeUpdateOne) Select(field string, fields ...string) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetAuthor(s string) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetDescription(s string) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetEldritch(s string) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetHash(s string) *TomeUpdateOne
- func (c *TomeUpdateOne) SetInput(i UpdateTomeInput) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetLastModifiedAt(t time.Time) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetName(s string) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetNillableParamDefs(s *string) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetNillableSupportModel(tm *tome.SupportModel) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetNillableTactic(t *tome.Tactic) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetNillableUploaderID(id *int) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetParamDefs(s string) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetSupportModel(tm tome.SupportModel) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetTactic(t tome.Tactic) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetUploader(u *User) *TomeUpdateOne
- func (tuo *TomeUpdateOne) SetUploaderID(id int) *TomeUpdateOne
- func (tuo *TomeUpdateOne) Where(ps ...predicate.Tome) *TomeUpdateOne
- type TomeUpsert
- func (u *TomeUpsert) ClearParamDefs() *TomeUpsert
- func (u *TomeUpsert) SetAuthor(v string) *TomeUpsert
- func (u *TomeUpsert) SetDescription(v string) *TomeUpsert
- func (u *TomeUpsert) SetEldritch(v string) *TomeUpsert
- func (u *TomeUpsert) SetHash(v string) *TomeUpsert
- func (u *TomeUpsert) SetLastModifiedAt(v time.Time) *TomeUpsert
- func (u *TomeUpsert) SetName(v string) *TomeUpsert
- func (u *TomeUpsert) SetParamDefs(v string) *TomeUpsert
- func (u *TomeUpsert) SetSupportModel(v tome.SupportModel) *TomeUpsert
- func (u *TomeUpsert) SetTactic(v tome.Tactic) *TomeUpsert
- func (u *TomeUpsert) UpdateAuthor() *TomeUpsert
- func (u *TomeUpsert) UpdateDescription() *TomeUpsert
- func (u *TomeUpsert) UpdateEldritch() *TomeUpsert
- func (u *TomeUpsert) UpdateHash() *TomeUpsert
- func (u *TomeUpsert) UpdateLastModifiedAt() *TomeUpsert
- func (u *TomeUpsert) UpdateName() *TomeUpsert
- func (u *TomeUpsert) UpdateParamDefs() *TomeUpsert
- func (u *TomeUpsert) UpdateSupportModel() *TomeUpsert
- func (u *TomeUpsert) UpdateTactic() *TomeUpsert
- type TomeUpsertBulk
- func (u *TomeUpsertBulk) ClearParamDefs() *TomeUpsertBulk
- func (u *TomeUpsertBulk) DoNothing() *TomeUpsertBulk
- func (u *TomeUpsertBulk) Exec(ctx context.Context) error
- func (u *TomeUpsertBulk) ExecX(ctx context.Context)
- func (u *TomeUpsertBulk) Ignore() *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetAuthor(v string) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetDescription(v string) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetEldritch(v string) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetHash(v string) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetLastModifiedAt(v time.Time) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetName(v string) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetParamDefs(v string) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetSupportModel(v tome.SupportModel) *TomeUpsertBulk
- func (u *TomeUpsertBulk) SetTactic(v tome.Tactic) *TomeUpsertBulk
- func (u *TomeUpsertBulk) Update(set func(*TomeUpsert)) *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateAuthor() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateDescription() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateEldritch() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateHash() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateLastModifiedAt() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateName() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateNewValues() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateParamDefs() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateSupportModel() *TomeUpsertBulk
- func (u *TomeUpsertBulk) UpdateTactic() *TomeUpsertBulk
- type TomeUpsertOne
- func (u *TomeUpsertOne) ClearParamDefs() *TomeUpsertOne
- func (u *TomeUpsertOne) DoNothing() *TomeUpsertOne
- func (u *TomeUpsertOne) Exec(ctx context.Context) error
- func (u *TomeUpsertOne) ExecX(ctx context.Context)
- func (u *TomeUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *TomeUpsertOne) IDX(ctx context.Context) int
- func (u *TomeUpsertOne) Ignore() *TomeUpsertOne
- func (u *TomeUpsertOne) SetAuthor(v string) *TomeUpsertOne
- func (u *TomeUpsertOne) SetDescription(v string) *TomeUpsertOne
- func (u *TomeUpsertOne) SetEldritch(v string) *TomeUpsertOne
- func (u *TomeUpsertOne) SetHash(v string) *TomeUpsertOne
- func (u *TomeUpsertOne) SetLastModifiedAt(v time.Time) *TomeUpsertOne
- func (u *TomeUpsertOne) SetName(v string) *TomeUpsertOne
- func (u *TomeUpsertOne) SetParamDefs(v string) *TomeUpsertOne
- func (u *TomeUpsertOne) SetSupportModel(v tome.SupportModel) *TomeUpsertOne
- func (u *TomeUpsertOne) SetTactic(v tome.Tactic) *TomeUpsertOne
- func (u *TomeUpsertOne) Update(set func(*TomeUpsert)) *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateAuthor() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateDescription() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateEldritch() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateHash() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateLastModifiedAt() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateName() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateNewValues() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateParamDefs() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateSupportModel() *TomeUpsertOne
- func (u *TomeUpsertOne) UpdateTactic() *TomeUpsertOne
- type TomeWhereInput
- type Tomes
- type TraverseFunc
- type Traverser
- type Tx
- type UpdateBeaconInput
- type UpdateHostInput
- type UpdateTagInput
- type UpdateTomeInput
- type UpdateUserInput
- type User
- func (n *User) IsNode()
- func (u *User) NamedTomes(name string) ([]*Tome, error)
- func (u *User) QueryTomes() *TomeQuery
- func (u *User) String() string
- func (u *User) ToEdge(order *UserOrder) *UserEdge
- func (u *User) Tomes(ctx context.Context) (result []*Tome, err error)
- func (u *User) Unwrap() *User
- func (u *User) Update() *UserUpdateOne
- func (u *User) Value(name string) (ent.Value, error)
- 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) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryTomes(u *User) *TomeQuery
- 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 UserConnection
- type UserCreate
- func (uc *UserCreate) AddTomeIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddTomes(t ...*Tome) *UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
- func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetIsActivated(b bool) *UserCreate
- func (uc *UserCreate) SetIsAdmin(b bool) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableIsActivated(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableIsAdmin(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableSessionToken(s *string) *UserCreate
- func (uc *UserCreate) SetOauthID(s string) *UserCreate
- func (uc *UserCreate) SetPhotoURL(s string) *UserCreate
- func (uc *UserCreate) SetSessionToken(s string) *UserCreate
- type UserCreateBulk
- func (ucb *UserCreateBulk) Exec(ctx context.Context) error
- func (ucb *UserCreateBulk) ExecX(ctx context.Context)
- func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
- func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
- func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)
- func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User
- type UserDelete
- type UserDeleteOne
- type UserEdge
- type UserEdges
- 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) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddTomeIDs(ids ...int)
- 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) ClearTomes()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) IsActivated() (r bool, exists bool)
- func (m *UserMutation) IsAdmin() (r bool, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OauthID() (r string, exists bool)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIsActivated(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldOauthID(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPhotoURL(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldSessionToken(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) PhotoURL() (r string, exists bool)
- func (m *UserMutation) RemoveTomeIDs(ids ...int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) RemovedTomesIDs() (ids []int)
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIsActivated()
- func (m *UserMutation) ResetIsAdmin()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetOauthID()
- func (m *UserMutation) ResetPhotoURL()
- func (m *UserMutation) ResetSessionToken()
- func (m *UserMutation) ResetTomes()
- func (m *UserMutation) SessionToken() (r string, exists bool)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetIsActivated(b bool)
- func (m *UserMutation) SetIsAdmin(b bool)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOauthID(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPhotoURL(s string)
- func (m *UserMutation) SetSessionToken(s string)
- func (m *UserMutation) TomesCleared() bool
- func (m *UserMutation) TomesIDs() (ids []int)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserOrder
- type UserOrderField
- type UserPaginateOption
- 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 (u *UserQuery) CollectFields(ctx context.Context, satisfies ...string) (*UserQuery, error)
- 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 (u *UserQuery) Paginate(ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, ...) (*UserConnection, error)
- func (uq *UserQuery) QueryTomes() *TomeQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- func (uq *UserQuery) WithNamedTomes(name string, opts ...func(*TomeQuery)) *UserQuery
- func (uq *UserQuery) WithTomes(opts ...func(*TomeQuery)) *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) AddTomeIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddTomes(t ...*Tome) *UserUpdate
- func (uu *UserUpdate) ClearTomes() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveTomeIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveTomes(t ...*Tome) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate
- func (uu *UserUpdate) SetIsActivated(b bool) *UserUpdate
- func (uu *UserUpdate) SetIsAdmin(b bool) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableIsActivated(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableIsAdmin(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableSessionToken(s *string) *UserUpdate
- func (uu *UserUpdate) SetPhotoURL(s string) *UserUpdate
- func (uu *UserUpdate) SetSessionToken(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddTomeIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddTomes(t ...*Tome) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearTomes() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveTomeIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveTomes(t ...*Tome) *UserUpdateOne
- 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 (c *UserUpdateOne) SetInput(i UpdateUserInput) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsActivated(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIsAdmin(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsActivated(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableIsAdmin(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSessionToken(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPhotoURL(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSessionToken(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type UserUpsert
- func (u *UserUpsert) SetIsActivated(v bool) *UserUpsert
- func (u *UserUpsert) SetIsAdmin(v bool) *UserUpsert
- func (u *UserUpsert) SetName(v string) *UserUpsert
- func (u *UserUpsert) SetPhotoURL(v string) *UserUpsert
- func (u *UserUpsert) SetSessionToken(v string) *UserUpsert
- func (u *UserUpsert) UpdateIsActivated() *UserUpsert
- func (u *UserUpsert) UpdateIsAdmin() *UserUpsert
- func (u *UserUpsert) UpdateName() *UserUpsert
- func (u *UserUpsert) UpdatePhotoURL() *UserUpsert
- func (u *UserUpsert) UpdateSessionToken() *UserUpsert
- type UserUpsertBulk
- func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
- func (u *UserUpsertBulk) Exec(ctx context.Context) error
- func (u *UserUpsertBulk) ExecX(ctx context.Context)
- func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
- func (u *UserUpsertBulk) SetIsActivated(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetIsAdmin(v bool) *UserUpsertBulk
- func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetPhotoURL(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) SetSessionToken(v string) *UserUpsertBulk
- func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateIsActivated() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateIsAdmin() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdatePhotoURL() *UserUpsertBulk
- func (u *UserUpsertBulk) UpdateSessionToken() *UserUpsertBulk
- type UserUpsertOne
- func (u *UserUpsertOne) DoNothing() *UserUpsertOne
- func (u *UserUpsertOne) Exec(ctx context.Context) error
- func (u *UserUpsertOne) ExecX(ctx context.Context)
- func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
- func (u *UserUpsertOne) IDX(ctx context.Context) int
- func (u *UserUpsertOne) Ignore() *UserUpsertOne
- func (u *UserUpsertOne) SetIsActivated(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetIsAdmin(v bool) *UserUpsertOne
- func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetPhotoURL(v string) *UserUpsertOne
- func (u *UserUpsertOne) SetSessionToken(v string) *UserUpsertOne
- func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
- func (u *UserUpsertOne) UpdateIsActivated() *UserUpsertOne
- func (u *UserUpsertOne) UpdateIsAdmin() *UserUpsertOne
- func (u *UserUpsertOne) UpdateName() *UserUpsertOne
- func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
- func (u *UserUpsertOne) UpdatePhotoURL() *UserUpsertOne
- func (u *UserUpsertOne) UpdateSessionToken() *UserUpsertOne
- type UserWhereInput
- 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. TypeBeacon = "Beacon" TypeFile = "File" TypeHost = "Host" TypeHostFile = "HostFile" TypeHostProcess = "HostProcess" TypeQuest = "Quest" TypeTag = "Tag" TypeTask = "Task" TypeTome = "Tome" TypeUser = "User" )
Variables ¶
var ( // BeaconOrderFieldCreatedAt orders Beacon by created_at. BeaconOrderFieldCreatedAt = &BeaconOrderField{ Value: func(b *Beacon) (ent.Value, error) { return b.CreatedAt, nil }, column: beacon.FieldCreatedAt, toTerm: beacon.ByCreatedAt, toCursor: func(b *Beacon) Cursor { return Cursor{ ID: b.ID, Value: b.CreatedAt, } }, } // BeaconOrderFieldLastModifiedAt orders Beacon by last_modified_at. BeaconOrderFieldLastModifiedAt = &BeaconOrderField{ Value: func(b *Beacon) (ent.Value, error) { return b.LastModifiedAt, nil }, column: beacon.FieldLastModifiedAt, toTerm: beacon.ByLastModifiedAt, toCursor: func(b *Beacon) Cursor { return Cursor{ ID: b.ID, Value: b.LastModifiedAt, } }, } // BeaconOrderFieldLastSeenAt orders Beacon by last_seen_at. BeaconOrderFieldLastSeenAt = &BeaconOrderField{ Value: func(b *Beacon) (ent.Value, error) { return b.LastSeenAt, nil }, column: beacon.FieldLastSeenAt, toTerm: beacon.ByLastSeenAt, toCursor: func(b *Beacon) Cursor { return Cursor{ ID: b.ID, Value: b.LastSeenAt, } }, } // BeaconOrderFieldInterval orders Beacon by interval. BeaconOrderFieldInterval = &BeaconOrderField{ Value: func(b *Beacon) (ent.Value, error) { return b.Interval, nil }, column: beacon.FieldInterval, toTerm: beacon.ByInterval, toCursor: func(b *Beacon) Cursor { return Cursor{ ID: b.ID, Value: b.Interval, } }, } )
var ( // FileOrderFieldCreatedAt orders File by created_at. FileOrderFieldCreatedAt = &FileOrderField{ Value: func(f *File) (ent.Value, error) { return f.CreatedAt, nil }, column: file.FieldCreatedAt, toTerm: file.ByCreatedAt, toCursor: func(f *File) Cursor { return Cursor{ ID: f.ID, Value: f.CreatedAt, } }, } // FileOrderFieldLastModifiedAt orders File by last_modified_at. FileOrderFieldLastModifiedAt = &FileOrderField{ Value: func(f *File) (ent.Value, error) { return f.LastModifiedAt, nil }, column: file.FieldLastModifiedAt, toTerm: file.ByLastModifiedAt, toCursor: func(f *File) Cursor { return Cursor{ ID: f.ID, Value: f.LastModifiedAt, } }, } // FileOrderFieldName orders File by name. FileOrderFieldName = &FileOrderField{ Value: func(f *File) (ent.Value, error) { return f.Name, nil }, column: file.FieldName, toTerm: file.ByName, toCursor: func(f *File) Cursor { return Cursor{ ID: f.ID, Value: f.Name, } }, } // FileOrderFieldSize orders File by size. FileOrderFieldSize = &FileOrderField{ Value: func(f *File) (ent.Value, error) { return f.Size, nil }, column: file.FieldSize, toTerm: file.BySize, toCursor: func(f *File) Cursor { return Cursor{ ID: f.ID, Value: f.Size, } }, } )
var ( // HostOrderFieldCreatedAt orders Host by created_at. HostOrderFieldCreatedAt = &HostOrderField{ Value: func(h *Host) (ent.Value, error) { return h.CreatedAt, nil }, column: host.FieldCreatedAt, toTerm: host.ByCreatedAt, toCursor: func(h *Host) Cursor { return Cursor{ ID: h.ID, Value: h.CreatedAt, } }, } // HostOrderFieldLastModifiedAt orders Host by last_modified_at. HostOrderFieldLastModifiedAt = &HostOrderField{ Value: func(h *Host) (ent.Value, error) { return h.LastModifiedAt, nil }, column: host.FieldLastModifiedAt, toTerm: host.ByLastModifiedAt, toCursor: func(h *Host) Cursor { return Cursor{ ID: h.ID, Value: h.LastModifiedAt, } }, } // HostOrderFieldLastSeenAt orders Host by last_seen_at. HostOrderFieldLastSeenAt = &HostOrderField{ Value: func(h *Host) (ent.Value, error) { return h.LastSeenAt, nil }, column: host.FieldLastSeenAt, toTerm: host.ByLastSeenAt, toCursor: func(h *Host) Cursor { return Cursor{ ID: h.ID, Value: h.LastSeenAt, } }, } )
var ( // HostFileOrderFieldCreatedAt orders HostFile by created_at. HostFileOrderFieldCreatedAt = &HostFileOrderField{ Value: func(hf *HostFile) (ent.Value, error) { return hf.CreatedAt, nil }, column: hostfile.FieldCreatedAt, toTerm: hostfile.ByCreatedAt, toCursor: func(hf *HostFile) Cursor { return Cursor{ ID: hf.ID, Value: hf.CreatedAt, } }, } // HostFileOrderFieldLastModifiedAt orders HostFile by last_modified_at. HostFileOrderFieldLastModifiedAt = &HostFileOrderField{ Value: func(hf *HostFile) (ent.Value, error) { return hf.LastModifiedAt, nil }, column: hostfile.FieldLastModifiedAt, toTerm: hostfile.ByLastModifiedAt, toCursor: func(hf *HostFile) Cursor { return Cursor{ ID: hf.ID, Value: hf.LastModifiedAt, } }, } // HostFileOrderFieldPath orders HostFile by path. HostFileOrderFieldPath = &HostFileOrderField{ Value: func(hf *HostFile) (ent.Value, error) { return hf.Path, nil }, column: hostfile.FieldPath, toTerm: hostfile.ByPath, toCursor: func(hf *HostFile) Cursor { return Cursor{ ID: hf.ID, Value: hf.Path, } }, } // HostFileOrderFieldSize orders HostFile by size. HostFileOrderFieldSize = &HostFileOrderField{ Value: func(hf *HostFile) (ent.Value, error) { return hf.Size, nil }, column: hostfile.FieldSize, toTerm: hostfile.BySize, toCursor: func(hf *HostFile) Cursor { return Cursor{ ID: hf.ID, Value: hf.Size, } }, } )
var ( // HostProcessOrderFieldCreatedAt orders HostProcess by created_at. HostProcessOrderFieldCreatedAt = &HostProcessOrderField{ Value: func(hp *HostProcess) (ent.Value, error) { return hp.CreatedAt, nil }, column: hostprocess.FieldCreatedAt, toTerm: hostprocess.ByCreatedAt, toCursor: func(hp *HostProcess) Cursor { return Cursor{ ID: hp.ID, Value: hp.CreatedAt, } }, } // HostProcessOrderFieldLastModifiedAt orders HostProcess by last_modified_at. HostProcessOrderFieldLastModifiedAt = &HostProcessOrderField{ Value: func(hp *HostProcess) (ent.Value, error) { return hp.LastModifiedAt, nil }, column: hostprocess.FieldLastModifiedAt, toTerm: hostprocess.ByLastModifiedAt, toCursor: func(hp *HostProcess) Cursor { return Cursor{ ID: hp.ID, Value: hp.LastModifiedAt, } }, } // HostProcessOrderFieldPid orders HostProcess by pid. HostProcessOrderFieldPid = &HostProcessOrderField{ Value: func(hp *HostProcess) (ent.Value, error) { return hp.Pid, nil }, column: hostprocess.FieldPid, toTerm: hostprocess.ByPid, toCursor: func(hp *HostProcess) Cursor { return Cursor{ ID: hp.ID, Value: hp.Pid, } }, } // HostProcessOrderFieldPpid orders HostProcess by ppid. HostProcessOrderFieldPpid = &HostProcessOrderField{ Value: func(hp *HostProcess) (ent.Value, error) { return hp.Ppid, nil }, column: hostprocess.FieldPpid, toTerm: hostprocess.ByPpid, toCursor: func(hp *HostProcess) Cursor { return Cursor{ ID: hp.ID, Value: hp.Ppid, } }, } // HostProcessOrderFieldName orders HostProcess by name. HostProcessOrderFieldName = &HostProcessOrderField{ Value: func(hp *HostProcess) (ent.Value, error) { return hp.Name, nil }, column: hostprocess.FieldName, toTerm: hostprocess.ByName, toCursor: func(hp *HostProcess) Cursor { return Cursor{ ID: hp.ID, Value: hp.Name, } }, } )
var ( // QuestOrderFieldCreatedAt orders Quest by created_at. QuestOrderFieldCreatedAt = &QuestOrderField{ Value: func(q *Quest) (ent.Value, error) { return q.CreatedAt, nil }, column: quest.FieldCreatedAt, toTerm: quest.ByCreatedAt, toCursor: func(q *Quest) Cursor { return Cursor{ ID: q.ID, Value: q.CreatedAt, } }, } // QuestOrderFieldLastModifiedAt orders Quest by last_modified_at. QuestOrderFieldLastModifiedAt = &QuestOrderField{ Value: func(q *Quest) (ent.Value, error) { return q.LastModifiedAt, nil }, column: quest.FieldLastModifiedAt, toTerm: quest.ByLastModifiedAt, toCursor: func(q *Quest) Cursor { return Cursor{ ID: q.ID, Value: q.LastModifiedAt, } }, } // QuestOrderFieldName orders Quest by name. QuestOrderFieldName = &QuestOrderField{ Value: func(q *Quest) (ent.Value, error) { return q.Name, nil }, column: quest.FieldName, toTerm: quest.ByName, toCursor: func(q *Quest) Cursor { return Cursor{ ID: q.ID, Value: q.Name, } }, } )
var ( // TaskOrderFieldCreatedAt orders Task by created_at. TaskOrderFieldCreatedAt = &TaskOrderField{ Value: func(t *Task) (ent.Value, error) { return t.CreatedAt, nil }, column: task.FieldCreatedAt, toTerm: task.ByCreatedAt, toCursor: func(t *Task) Cursor { return Cursor{ ID: t.ID, Value: t.CreatedAt, } }, } // TaskOrderFieldLastModifiedAt orders Task by last_modified_at. TaskOrderFieldLastModifiedAt = &TaskOrderField{ Value: func(t *Task) (ent.Value, error) { return t.LastModifiedAt, nil }, column: task.FieldLastModifiedAt, toTerm: task.ByLastModifiedAt, toCursor: func(t *Task) Cursor { return Cursor{ ID: t.ID, Value: t.LastModifiedAt, } }, } // TaskOrderFieldClaimedAt orders Task by claimed_at. TaskOrderFieldClaimedAt = &TaskOrderField{ Value: func(t *Task) (ent.Value, error) { return t.ClaimedAt, nil }, column: task.FieldClaimedAt, toTerm: task.ByClaimedAt, toCursor: func(t *Task) Cursor { return Cursor{ ID: t.ID, Value: t.ClaimedAt, } }, } // TaskOrderFieldExecStartedAt orders Task by exec_started_at. TaskOrderFieldExecStartedAt = &TaskOrderField{ Value: func(t *Task) (ent.Value, error) { return t.ExecStartedAt, nil }, column: task.FieldExecStartedAt, toTerm: task.ByExecStartedAt, toCursor: func(t *Task) Cursor { return Cursor{ ID: t.ID, Value: t.ExecStartedAt, } }, } // TaskOrderFieldExecFinishedAt orders Task by exec_finished_at. TaskOrderFieldExecFinishedAt = &TaskOrderField{ Value: func(t *Task) (ent.Value, error) { return t.ExecFinishedAt, nil }, column: task.FieldExecFinishedAt, toTerm: task.ByExecFinishedAt, toCursor: func(t *Task) Cursor { return Cursor{ ID: t.ID, Value: t.ExecFinishedAt, } }, } // TaskOrderFieldOutputSize orders Task by output_size. TaskOrderFieldOutputSize = &TaskOrderField{ Value: func(t *Task) (ent.Value, error) { return t.OutputSize, nil }, column: task.FieldOutputSize, toTerm: task.ByOutputSize, toCursor: func(t *Task) Cursor { return Cursor{ ID: t.ID, Value: t.OutputSize, } }, } )
var ( // TomeOrderFieldCreatedAt orders Tome by created_at. TomeOrderFieldCreatedAt = &TomeOrderField{ Value: func(t *Tome) (ent.Value, error) { return t.CreatedAt, nil }, column: tome.FieldCreatedAt, toTerm: tome.ByCreatedAt, toCursor: func(t *Tome) Cursor { return Cursor{ ID: t.ID, Value: t.CreatedAt, } }, } // TomeOrderFieldLastModifiedAt orders Tome by last_modified_at. TomeOrderFieldLastModifiedAt = &TomeOrderField{ Value: func(t *Tome) (ent.Value, error) { return t.LastModifiedAt, nil }, column: tome.FieldLastModifiedAt, toTerm: tome.ByLastModifiedAt, toCursor: func(t *Tome) Cursor { return Cursor{ ID: t.ID, Value: t.LastModifiedAt, } }, } // TomeOrderFieldName orders Tome by name. TomeOrderFieldName = &TomeOrderField{ Value: func(t *Tome) (ent.Value, error) { return t.Name, nil }, column: tome.FieldName, toTerm: tome.ByName, toCursor: func(t *Tome) Cursor { return Cursor{ ID: t.ID, Value: t.Name, } }, } )
var DefaultBeaconOrder = &BeaconOrder{ Direction: entgql.OrderDirectionAsc, Field: &BeaconOrderField{ Value: func(b *Beacon) (ent.Value, error) { return b.ID, nil }, column: beacon.FieldID, toTerm: beacon.ByID, toCursor: func(b *Beacon) Cursor { return Cursor{ID: b.ID} }, }, }
DefaultBeaconOrder is the default ordering of Beacon.
var DefaultFileOrder = &FileOrder{ Direction: entgql.OrderDirectionAsc, Field: &FileOrderField{ Value: func(f *File) (ent.Value, error) { return f.ID, nil }, column: file.FieldID, toTerm: file.ByID, toCursor: func(f *File) Cursor { return Cursor{ID: f.ID} }, }, }
DefaultFileOrder is the default ordering of File.
var DefaultHostFileOrder = &HostFileOrder{ Direction: entgql.OrderDirectionAsc, Field: &HostFileOrderField{ Value: func(hf *HostFile) (ent.Value, error) { return hf.ID, nil }, column: hostfile.FieldID, toTerm: hostfile.ByID, toCursor: func(hf *HostFile) Cursor { return Cursor{ID: hf.ID} }, }, }
DefaultHostFileOrder is the default ordering of HostFile.
var DefaultHostOrder = &HostOrder{ Direction: entgql.OrderDirectionAsc, Field: &HostOrderField{ Value: func(h *Host) (ent.Value, error) { return h.ID, nil }, column: host.FieldID, toTerm: host.ByID, toCursor: func(h *Host) Cursor { return Cursor{ID: h.ID} }, }, }
DefaultHostOrder is the default ordering of Host.
var DefaultHostProcessOrder = &HostProcessOrder{ Direction: entgql.OrderDirectionAsc, Field: &HostProcessOrderField{ Value: func(hp *HostProcess) (ent.Value, error) { return hp.ID, nil }, column: hostprocess.FieldID, toTerm: hostprocess.ByID, toCursor: func(hp *HostProcess) Cursor { return Cursor{ID: hp.ID} }, }, }
DefaultHostProcessOrder is the default ordering of HostProcess.
var DefaultQuestOrder = &QuestOrder{ Direction: entgql.OrderDirectionAsc, Field: &QuestOrderField{ Value: func(q *Quest) (ent.Value, error) { return q.ID, nil }, column: quest.FieldID, toTerm: quest.ByID, toCursor: func(q *Quest) Cursor { return Cursor{ID: q.ID} }, }, }
DefaultQuestOrder is the default ordering of Quest.
var DefaultTagOrder = &TagOrder{ Direction: entgql.OrderDirectionAsc, Field: &TagOrderField{ Value: func(t *Tag) (ent.Value, error) { return t.ID, nil }, column: tag.FieldID, toTerm: tag.ByID, toCursor: func(t *Tag) Cursor { return Cursor{ID: t.ID} }, }, }
DefaultTagOrder is the default ordering of Tag.
var DefaultTaskOrder = &TaskOrder{ Direction: entgql.OrderDirectionAsc, Field: &TaskOrderField{ Value: func(t *Task) (ent.Value, error) { return t.ID, nil }, column: task.FieldID, toTerm: task.ByID, toCursor: func(t *Task) Cursor { return Cursor{ID: t.ID} }, }, }
DefaultTaskOrder is the default ordering of Task.
var DefaultTomeOrder = &TomeOrder{ Direction: entgql.OrderDirectionAsc, Field: &TomeOrderField{ Value: func(t *Tome) (ent.Value, error) { return t.ID, nil }, column: tome.FieldID, toTerm: tome.ByID, toCursor: func(t *Tome) Cursor { return Cursor{ID: t.ID} }, }, }
DefaultTomeOrder is the default ordering of Tome.
var DefaultUserOrder = &UserOrder{ Direction: entgql.OrderDirectionAsc, Field: &UserOrderField{ Value: func(u *User) (ent.Value, error) { return u.ID, nil }, column: user.FieldID, toTerm: user.ByID, toCursor: func(u *User) Cursor { return Cursor{ID: u.ID} }, }, }
DefaultUserOrder is the default ordering of User.
var ErrEmptyBeaconWhereInput = errors.New("ent: empty predicate BeaconWhereInput")
ErrEmptyBeaconWhereInput is returned in case the BeaconWhereInput is empty.
var ErrEmptyFileWhereInput = errors.New("ent: empty predicate FileWhereInput")
ErrEmptyFileWhereInput is returned in case the FileWhereInput is empty.
var ErrEmptyHostFileWhereInput = errors.New("ent: empty predicate HostFileWhereInput")
ErrEmptyHostFileWhereInput is returned in case the HostFileWhereInput is empty.
var ErrEmptyHostProcessWhereInput = errors.New("ent: empty predicate HostProcessWhereInput")
ErrEmptyHostProcessWhereInput is returned in case the HostProcessWhereInput is empty.
var ErrEmptyHostWhereInput = errors.New("ent: empty predicate HostWhereInput")
ErrEmptyHostWhereInput is returned in case the HostWhereInput is empty.
var ErrEmptyQuestWhereInput = errors.New("ent: empty predicate QuestWhereInput")
ErrEmptyQuestWhereInput is returned in case the QuestWhereInput is empty.
var ErrEmptyTagWhereInput = errors.New("ent: empty predicate TagWhereInput")
ErrEmptyTagWhereInput is returned in case the TagWhereInput is empty.
var ErrEmptyTaskWhereInput = errors.New("ent: empty predicate TaskWhereInput")
ErrEmptyTaskWhereInput is returned in case the TaskWhereInput is empty.
var ErrEmptyTomeWhereInput = errors.New("ent: empty predicate TomeWhereInput")
ErrEmptyTomeWhereInput is returned in case the TomeWhereInput is empty.
var ErrEmptyUserWhereInput = errors.New("ent: empty predicate UserWhereInput")
ErrEmptyUserWhereInput is returned in case the UserWhereInput is empty.
var ErrTxStarted = errors.New("ent: cannot start a transaction within a transaction")
ErrTxStarted is returned when trying to start a new transaction from a transactional client.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
func NewTxContext ¶
NewTxContext returns a new context with the given Tx attached.
Types ¶
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Beacon ¶
type Beacon struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // A human readable identifier for the beacon. Name string `json:"name,omitempty"` // The identity the beacon is authenticated as (e.g. 'root') Principal string `json:"principal,omitempty"` // Unique identifier for the beacon. Unique to each instance of the beacon. Identifier string `json:"identifier,omitempty"` // Identifies the agent that the beacon is running as (e.g. 'imix'). AgentIdentifier string `json:"agent_identifier,omitempty"` // Timestamp of when a task was last claimed or updated for the beacon. LastSeenAt time.Time `json:"last_seen_at,omitempty"` // Duration until next callback, in seconds. Interval uint64 `json:"interval,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the BeaconQuery when eager-loading is set. Edges BeaconEdges `json:"edges"` // contains filtered or unexported fields }
Beacon is the model entity for the Beacon schema.
func (*Beacon) IsNode ¶
func (n *Beacon) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Beacon) NamedTasks ¶
NamedTasks returns the Tasks named value or an error if the edge was not loaded in eager-loading with this name.
func (*Beacon) QueryTasks ¶
QueryTasks queries the "tasks" edge of the Beacon entity.
func (*Beacon) ToEdge ¶
func (b *Beacon) ToEdge(order *BeaconOrder) *BeaconEdge
ToEdge converts Beacon into BeaconEdge.
func (*Beacon) Unwrap ¶
Unwrap unwraps the Beacon 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 (*Beacon) Update ¶
func (b *Beacon) Update() *BeaconUpdateOne
Update returns a builder for updating this Beacon. Note that you need to call Beacon.Unwrap() before calling this method if this Beacon was returned from a transaction, and the transaction was committed or rolled back.
type BeaconClient ¶
type BeaconClient struct {
// contains filtered or unexported fields
}
BeaconClient is a client for the Beacon schema.
func NewBeaconClient ¶
func NewBeaconClient(c config) *BeaconClient
NewBeaconClient returns a client for the Beacon from the given config.
func (*BeaconClient) Create ¶
func (c *BeaconClient) Create() *BeaconCreate
Create returns a builder for creating a Beacon entity.
func (*BeaconClient) CreateBulk ¶
func (c *BeaconClient) CreateBulk(builders ...*BeaconCreate) *BeaconCreateBulk
CreateBulk returns a builder for creating a bulk of Beacon entities.
func (*BeaconClient) Delete ¶
func (c *BeaconClient) Delete() *BeaconDelete
Delete returns a delete builder for Beacon.
func (*BeaconClient) DeleteOne ¶
func (c *BeaconClient) DeleteOne(b *Beacon) *BeaconDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*BeaconClient) DeleteOneID ¶
func (c *BeaconClient) DeleteOneID(id int) *BeaconDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*BeaconClient) GetX ¶
func (c *BeaconClient) GetX(ctx context.Context, id int) *Beacon
GetX is like Get, but panics if an error occurs.
func (*BeaconClient) Intercept ¶
func (c *BeaconClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `beacon.Intercept(f(g(h())))`.
func (*BeaconClient) Interceptors ¶
func (c *BeaconClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*BeaconClient) MapCreateBulk ¶
func (c *BeaconClient) MapCreateBulk(slice any, setFunc func(*BeaconCreate, int)) *BeaconCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*BeaconClient) Query ¶
func (c *BeaconClient) Query() *BeaconQuery
Query returns a query builder for Beacon.
func (*BeaconClient) QueryHost ¶
func (c *BeaconClient) QueryHost(b *Beacon) *HostQuery
QueryHost queries the host edge of a Beacon.
func (*BeaconClient) QueryTasks ¶
func (c *BeaconClient) QueryTasks(b *Beacon) *TaskQuery
QueryTasks queries the tasks edge of a Beacon.
func (*BeaconClient) Update ¶
func (c *BeaconClient) Update() *BeaconUpdate
Update returns an update builder for Beacon.
func (*BeaconClient) UpdateOne ¶
func (c *BeaconClient) UpdateOne(b *Beacon) *BeaconUpdateOne
UpdateOne returns an update builder for the given entity.
func (*BeaconClient) UpdateOneID ¶
func (c *BeaconClient) UpdateOneID(id int) *BeaconUpdateOne
UpdateOneID returns an update builder for the given id.
func (*BeaconClient) Use ¶
func (c *BeaconClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `beacon.Hooks(f(g(h())))`.
type BeaconConnection ¶
type BeaconConnection struct { Edges []*BeaconEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
BeaconConnection is the connection containing edges to Beacon.
type BeaconCreate ¶
type BeaconCreate struct {
// contains filtered or unexported fields
}
BeaconCreate is the builder for creating a Beacon entity.
func (*BeaconCreate) AddTaskIDs ¶
func (bc *BeaconCreate) AddTaskIDs(ids ...int) *BeaconCreate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*BeaconCreate) AddTasks ¶
func (bc *BeaconCreate) AddTasks(t ...*Task) *BeaconCreate
AddTasks adds the "tasks" edges to the Task entity.
func (*BeaconCreate) Exec ¶
func (bc *BeaconCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*BeaconCreate) ExecX ¶
func (bc *BeaconCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BeaconCreate) Mutation ¶
func (bc *BeaconCreate) Mutation() *BeaconMutation
Mutation returns the BeaconMutation object of the builder.
func (*BeaconCreate) OnConflict ¶
func (bc *BeaconCreate) OnConflict(opts ...sql.ConflictOption) *BeaconUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Beacon.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BeaconUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*BeaconCreate) OnConflictColumns ¶
func (bc *BeaconCreate) OnConflictColumns(columns ...string) *BeaconUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Beacon.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*BeaconCreate) Save ¶
func (bc *BeaconCreate) Save(ctx context.Context) (*Beacon, error)
Save creates the Beacon in the database.
func (*BeaconCreate) SaveX ¶
func (bc *BeaconCreate) SaveX(ctx context.Context) *Beacon
SaveX calls Save and panics if Save returns an error.
func (*BeaconCreate) SetAgentIdentifier ¶
func (bc *BeaconCreate) SetAgentIdentifier(s string) *BeaconCreate
SetAgentIdentifier sets the "agent_identifier" field.
func (*BeaconCreate) SetCreatedAt ¶ added in v0.0.5
func (bc *BeaconCreate) SetCreatedAt(t time.Time) *BeaconCreate
SetCreatedAt sets the "created_at" field.
func (*BeaconCreate) SetHost ¶
func (bc *BeaconCreate) SetHost(h *Host) *BeaconCreate
SetHost sets the "host" edge to the Host entity.
func (*BeaconCreate) SetHostID ¶
func (bc *BeaconCreate) SetHostID(id int) *BeaconCreate
SetHostID sets the "host" edge to the Host entity by ID.
func (*BeaconCreate) SetIdentifier ¶
func (bc *BeaconCreate) SetIdentifier(s string) *BeaconCreate
SetIdentifier sets the "identifier" field.
func (*BeaconCreate) SetInterval ¶
func (bc *BeaconCreate) SetInterval(u uint64) *BeaconCreate
SetInterval sets the "interval" field.
func (*BeaconCreate) SetLastModifiedAt ¶ added in v0.0.5
func (bc *BeaconCreate) SetLastModifiedAt(t time.Time) *BeaconCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*BeaconCreate) SetLastSeenAt ¶
func (bc *BeaconCreate) SetLastSeenAt(t time.Time) *BeaconCreate
SetLastSeenAt sets the "last_seen_at" field.
func (*BeaconCreate) SetName ¶
func (bc *BeaconCreate) SetName(s string) *BeaconCreate
SetName sets the "name" field.
func (*BeaconCreate) SetNillableAgentIdentifier ¶
func (bc *BeaconCreate) SetNillableAgentIdentifier(s *string) *BeaconCreate
SetNillableAgentIdentifier sets the "agent_identifier" field if the given value is not nil.
func (*BeaconCreate) SetNillableCreatedAt ¶ added in v0.0.5
func (bc *BeaconCreate) SetNillableCreatedAt(t *time.Time) *BeaconCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*BeaconCreate) SetNillableIdentifier ¶
func (bc *BeaconCreate) SetNillableIdentifier(s *string) *BeaconCreate
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*BeaconCreate) SetNillableInterval ¶
func (bc *BeaconCreate) SetNillableInterval(u *uint64) *BeaconCreate
SetNillableInterval sets the "interval" field if the given value is not nil.
func (*BeaconCreate) SetNillableLastModifiedAt ¶ added in v0.0.5
func (bc *BeaconCreate) SetNillableLastModifiedAt(t *time.Time) *BeaconCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*BeaconCreate) SetNillableLastSeenAt ¶
func (bc *BeaconCreate) SetNillableLastSeenAt(t *time.Time) *BeaconCreate
SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.
func (*BeaconCreate) SetNillableName ¶
func (bc *BeaconCreate) SetNillableName(s *string) *BeaconCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*BeaconCreate) SetNillablePrincipal ¶
func (bc *BeaconCreate) SetNillablePrincipal(s *string) *BeaconCreate
SetNillablePrincipal sets the "principal" field if the given value is not nil.
func (*BeaconCreate) SetPrincipal ¶
func (bc *BeaconCreate) SetPrincipal(s string) *BeaconCreate
SetPrincipal sets the "principal" field.
type BeaconCreateBulk ¶
type BeaconCreateBulk struct {
// contains filtered or unexported fields
}
BeaconCreateBulk is the builder for creating many Beacon entities in bulk.
func (*BeaconCreateBulk) Exec ¶
func (bcb *BeaconCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BeaconCreateBulk) ExecX ¶
func (bcb *BeaconCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BeaconCreateBulk) OnConflict ¶
func (bcb *BeaconCreateBulk) OnConflict(opts ...sql.ConflictOption) *BeaconUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Beacon.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.BeaconUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*BeaconCreateBulk) OnConflictColumns ¶
func (bcb *BeaconCreateBulk) OnConflictColumns(columns ...string) *BeaconUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Beacon.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type BeaconDelete ¶
type BeaconDelete struct {
// contains filtered or unexported fields
}
BeaconDelete is the builder for deleting a Beacon entity.
func (*BeaconDelete) Exec ¶
func (bd *BeaconDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*BeaconDelete) ExecX ¶
func (bd *BeaconDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*BeaconDelete) Where ¶
func (bd *BeaconDelete) Where(ps ...predicate.Beacon) *BeaconDelete
Where appends a list predicates to the BeaconDelete builder.
type BeaconDeleteOne ¶
type BeaconDeleteOne struct {
// contains filtered or unexported fields
}
BeaconDeleteOne is the builder for deleting a single Beacon entity.
func (*BeaconDeleteOne) Exec ¶
func (bdo *BeaconDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*BeaconDeleteOne) ExecX ¶
func (bdo *BeaconDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BeaconDeleteOne) Where ¶
func (bdo *BeaconDeleteOne) Where(ps ...predicate.Beacon) *BeaconDeleteOne
Where appends a list predicates to the BeaconDelete builder.
type BeaconEdge ¶
BeaconEdge is the edge representation of Beacon.
type BeaconEdges ¶
type BeaconEdges struct { // Host this beacon is running on. Host *Host `json:"host,omitempty"` // Tasks that have been assigned to the beacon. Tasks []*Task `json:"tasks,omitempty"` // contains filtered or unexported fields }
BeaconEdges holds the relations/edges for other nodes in the graph.
func (BeaconEdges) HostOrErr ¶
func (e BeaconEdges) HostOrErr() (*Host, error)
HostOrErr returns the Host value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (BeaconEdges) TasksOrErr ¶
func (e BeaconEdges) TasksOrErr() ([]*Task, error)
TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.
type BeaconGroupBy ¶
type BeaconGroupBy struct {
// contains filtered or unexported fields
}
BeaconGroupBy is the group-by builder for Beacon entities.
func (*BeaconGroupBy) Aggregate ¶
func (bgb *BeaconGroupBy) Aggregate(fns ...AggregateFunc) *BeaconGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*BeaconGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BeaconGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BeaconGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BeaconGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BeaconGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BeaconGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BeaconGroupBy) Scan ¶
func (bgb *BeaconGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BeaconGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BeaconMutation ¶
type BeaconMutation struct {
// contains filtered or unexported fields
}
BeaconMutation represents an operation that mutates the Beacon nodes in the graph.
func (*BeaconMutation) AddField ¶
func (m *BeaconMutation) 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 (*BeaconMutation) AddInterval ¶
func (m *BeaconMutation) AddInterval(u int64)
AddInterval adds u to the "interval" field.
func (*BeaconMutation) AddTaskIDs ¶
func (m *BeaconMutation) AddTaskIDs(ids ...int)
AddTaskIDs adds the "tasks" edge to the Task entity by ids.
func (*BeaconMutation) AddedEdges ¶
func (m *BeaconMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*BeaconMutation) AddedField ¶
func (m *BeaconMutation) 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 (*BeaconMutation) AddedFields ¶
func (m *BeaconMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*BeaconMutation) AddedIDs ¶
func (m *BeaconMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*BeaconMutation) AddedInterval ¶
func (m *BeaconMutation) AddedInterval() (r int64, exists bool)
AddedInterval returns the value that was added to the "interval" field in this mutation.
func (*BeaconMutation) AgentIdentifier ¶
func (m *BeaconMutation) AgentIdentifier() (r string, exists bool)
AgentIdentifier returns the value of the "agent_identifier" field in the mutation.
func (*BeaconMutation) AgentIdentifierCleared ¶
func (m *BeaconMutation) AgentIdentifierCleared() bool
AgentIdentifierCleared returns if the "agent_identifier" field was cleared in this mutation.
func (*BeaconMutation) ClearAgentIdentifier ¶
func (m *BeaconMutation) ClearAgentIdentifier()
ClearAgentIdentifier clears the value of the "agent_identifier" field.
func (*BeaconMutation) ClearEdge ¶
func (m *BeaconMutation) 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 (*BeaconMutation) ClearField ¶
func (m *BeaconMutation) 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 (*BeaconMutation) ClearHost ¶
func (m *BeaconMutation) ClearHost()
ClearHost clears the "host" edge to the Host entity.
func (*BeaconMutation) ClearInterval ¶
func (m *BeaconMutation) ClearInterval()
ClearInterval clears the value of the "interval" field.
func (*BeaconMutation) ClearLastSeenAt ¶
func (m *BeaconMutation) ClearLastSeenAt()
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*BeaconMutation) ClearPrincipal ¶
func (m *BeaconMutation) ClearPrincipal()
ClearPrincipal clears the value of the "principal" field.
func (*BeaconMutation) ClearTasks ¶
func (m *BeaconMutation) ClearTasks()
ClearTasks clears the "tasks" edge to the Task entity.
func (*BeaconMutation) ClearedEdges ¶
func (m *BeaconMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*BeaconMutation) ClearedFields ¶
func (m *BeaconMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (BeaconMutation) Client ¶
func (m BeaconMutation) 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 (*BeaconMutation) CreatedAt ¶ added in v0.0.5
func (m *BeaconMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*BeaconMutation) EdgeCleared ¶
func (m *BeaconMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*BeaconMutation) Field ¶
func (m *BeaconMutation) 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 (*BeaconMutation) FieldCleared ¶
func (m *BeaconMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*BeaconMutation) Fields ¶
func (m *BeaconMutation) 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 (*BeaconMutation) HostCleared ¶
func (m *BeaconMutation) HostCleared() bool
HostCleared reports if the "host" edge to the Host entity was cleared.
func (*BeaconMutation) HostID ¶
func (m *BeaconMutation) HostID() (id int, exists bool)
HostID returns the "host" edge ID in the mutation.
func (*BeaconMutation) HostIDs ¶
func (m *BeaconMutation) HostIDs() (ids []int)
HostIDs returns the "host" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HostID instead. It exists only for internal usage by the builders.
func (*BeaconMutation) ID ¶
func (m *BeaconMutation) 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 (*BeaconMutation) IDs ¶
func (m *BeaconMutation) 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 (*BeaconMutation) Identifier ¶
func (m *BeaconMutation) Identifier() (r string, exists bool)
Identifier returns the value of the "identifier" field in the mutation.
func (*BeaconMutation) Interval ¶
func (m *BeaconMutation) Interval() (r uint64, exists bool)
Interval returns the value of the "interval" field in the mutation.
func (*BeaconMutation) IntervalCleared ¶
func (m *BeaconMutation) IntervalCleared() bool
IntervalCleared returns if the "interval" field was cleared in this mutation.
func (*BeaconMutation) LastModifiedAt ¶ added in v0.0.5
func (m *BeaconMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*BeaconMutation) LastSeenAt ¶
func (m *BeaconMutation) LastSeenAt() (r time.Time, exists bool)
LastSeenAt returns the value of the "last_seen_at" field in the mutation.
func (*BeaconMutation) LastSeenAtCleared ¶
func (m *BeaconMutation) LastSeenAtCleared() bool
LastSeenAtCleared returns if the "last_seen_at" field was cleared in this mutation.
func (*BeaconMutation) Name ¶
func (m *BeaconMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*BeaconMutation) OldAgentIdentifier ¶
func (m *BeaconMutation) OldAgentIdentifier(ctx context.Context) (v string, err error)
OldAgentIdentifier returns the old "agent_identifier" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) OldCreatedAt ¶ added in v0.0.5
OldCreatedAt returns the old "created_at" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) 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 (*BeaconMutation) OldIdentifier ¶
func (m *BeaconMutation) OldIdentifier(ctx context.Context) (v string, err error)
OldIdentifier returns the old "identifier" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) OldInterval ¶
func (m *BeaconMutation) OldInterval(ctx context.Context) (v uint64, err error)
OldInterval returns the old "interval" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) OldLastModifiedAt ¶ added in v0.0.5
OldLastModifiedAt returns the old "last_modified_at" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) OldLastSeenAt ¶
OldLastSeenAt returns the old "last_seen_at" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) OldName ¶
func (m *BeaconMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) OldPrincipal ¶
func (m *BeaconMutation) OldPrincipal(ctx context.Context) (v string, err error)
OldPrincipal returns the old "principal" field's value of the Beacon entity. If the Beacon 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 (*BeaconMutation) Principal ¶
func (m *BeaconMutation) Principal() (r string, exists bool)
Principal returns the value of the "principal" field in the mutation.
func (*BeaconMutation) PrincipalCleared ¶
func (m *BeaconMutation) PrincipalCleared() bool
PrincipalCleared returns if the "principal" field was cleared in this mutation.
func (*BeaconMutation) RemoveTaskIDs ¶
func (m *BeaconMutation) RemoveTaskIDs(ids ...int)
RemoveTaskIDs removes the "tasks" edge to the Task entity by IDs.
func (*BeaconMutation) RemovedEdges ¶
func (m *BeaconMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*BeaconMutation) RemovedIDs ¶
func (m *BeaconMutation) 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 (*BeaconMutation) RemovedTasksIDs ¶
func (m *BeaconMutation) RemovedTasksIDs() (ids []int)
RemovedTasks returns the removed IDs of the "tasks" edge to the Task entity.
func (*BeaconMutation) ResetAgentIdentifier ¶
func (m *BeaconMutation) ResetAgentIdentifier()
ResetAgentIdentifier resets all changes to the "agent_identifier" field.
func (*BeaconMutation) ResetCreatedAt ¶ added in v0.0.5
func (m *BeaconMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*BeaconMutation) ResetEdge ¶
func (m *BeaconMutation) 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 (*BeaconMutation) ResetField ¶
func (m *BeaconMutation) 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 (*BeaconMutation) ResetHost ¶
func (m *BeaconMutation) ResetHost()
ResetHost resets all changes to the "host" edge.
func (*BeaconMutation) ResetIdentifier ¶
func (m *BeaconMutation) ResetIdentifier()
ResetIdentifier resets all changes to the "identifier" field.
func (*BeaconMutation) ResetInterval ¶
func (m *BeaconMutation) ResetInterval()
ResetInterval resets all changes to the "interval" field.
func (*BeaconMutation) ResetLastModifiedAt ¶ added in v0.0.5
func (m *BeaconMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*BeaconMutation) ResetLastSeenAt ¶
func (m *BeaconMutation) ResetLastSeenAt()
ResetLastSeenAt resets all changes to the "last_seen_at" field.
func (*BeaconMutation) ResetName ¶
func (m *BeaconMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*BeaconMutation) ResetPrincipal ¶
func (m *BeaconMutation) ResetPrincipal()
ResetPrincipal resets all changes to the "principal" field.
func (*BeaconMutation) ResetTasks ¶
func (m *BeaconMutation) ResetTasks()
ResetTasks resets all changes to the "tasks" edge.
func (*BeaconMutation) SetAgentIdentifier ¶
func (m *BeaconMutation) SetAgentIdentifier(s string)
SetAgentIdentifier sets the "agent_identifier" field.
func (*BeaconMutation) SetCreatedAt ¶ added in v0.0.5
func (m *BeaconMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*BeaconMutation) SetField ¶
func (m *BeaconMutation) 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 (*BeaconMutation) SetHostID ¶
func (m *BeaconMutation) SetHostID(id int)
SetHostID sets the "host" edge to the Host entity by id.
func (*BeaconMutation) SetIdentifier ¶
func (m *BeaconMutation) SetIdentifier(s string)
SetIdentifier sets the "identifier" field.
func (*BeaconMutation) SetInterval ¶
func (m *BeaconMutation) SetInterval(u uint64)
SetInterval sets the "interval" field.
func (*BeaconMutation) SetLastModifiedAt ¶ added in v0.0.5
func (m *BeaconMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*BeaconMutation) SetLastSeenAt ¶
func (m *BeaconMutation) SetLastSeenAt(t time.Time)
SetLastSeenAt sets the "last_seen_at" field.
func (*BeaconMutation) SetName ¶
func (m *BeaconMutation) SetName(s string)
SetName sets the "name" field.
func (*BeaconMutation) SetOp ¶
func (m *BeaconMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*BeaconMutation) SetPrincipal ¶
func (m *BeaconMutation) SetPrincipal(s string)
SetPrincipal sets the "principal" field.
func (*BeaconMutation) TasksCleared ¶
func (m *BeaconMutation) TasksCleared() bool
TasksCleared reports if the "tasks" edge to the Task entity was cleared.
func (*BeaconMutation) TasksIDs ¶
func (m *BeaconMutation) TasksIDs() (ids []int)
TasksIDs returns the "tasks" edge IDs in the mutation.
func (BeaconMutation) Tx ¶
func (m BeaconMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*BeaconMutation) Type ¶
func (m *BeaconMutation) Type() string
Type returns the node type of this mutation (Beacon).
func (*BeaconMutation) Where ¶
func (m *BeaconMutation) Where(ps ...predicate.Beacon)
Where appends a list predicates to the BeaconMutation builder.
func (*BeaconMutation) WhereP ¶
func (m *BeaconMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the BeaconMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type BeaconOrder ¶
type BeaconOrder struct { Direction OrderDirection `json:"direction"` Field *BeaconOrderField `json:"field"` }
BeaconOrder defines the ordering of Beacon.
type BeaconOrderField ¶
type BeaconOrderField struct { // Value extracts the ordering value from the given Beacon. Value func(*Beacon) (ent.Value, error) // contains filtered or unexported fields }
BeaconOrderField defines the ordering field of Beacon.
func (BeaconOrderField) MarshalGQL ¶
func (f BeaconOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (BeaconOrderField) String ¶
func (f BeaconOrderField) String() string
String implement fmt.Stringer interface.
func (*BeaconOrderField) UnmarshalGQL ¶
func (f *BeaconOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type BeaconPaginateOption ¶
type BeaconPaginateOption func(*beaconPager) error
BeaconPaginateOption enables pagination customization.
func WithBeaconFilter ¶
func WithBeaconFilter(filter func(*BeaconQuery) (*BeaconQuery, error)) BeaconPaginateOption
WithBeaconFilter configures pagination filter.
func WithBeaconOrder ¶
func WithBeaconOrder(order *BeaconOrder) BeaconPaginateOption
WithBeaconOrder configures pagination ordering.
type BeaconQuery ¶
type BeaconQuery struct {
// contains filtered or unexported fields
}
BeaconQuery is the builder for querying Beacon entities.
func (*BeaconQuery) Aggregate ¶
func (bq *BeaconQuery) Aggregate(fns ...AggregateFunc) *BeaconSelect
Aggregate returns a BeaconSelect configured with the given aggregations.
func (*BeaconQuery) All ¶
func (bq *BeaconQuery) All(ctx context.Context) ([]*Beacon, error)
All executes the query and returns a list of Beacons.
func (*BeaconQuery) AllX ¶
func (bq *BeaconQuery) AllX(ctx context.Context) []*Beacon
AllX is like All, but panics if an error occurs.
func (*BeaconQuery) Clone ¶
func (bq *BeaconQuery) Clone() *BeaconQuery
Clone returns a duplicate of the BeaconQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*BeaconQuery) CollectFields ¶
func (b *BeaconQuery) CollectFields(ctx context.Context, satisfies ...string) (*BeaconQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*BeaconQuery) Count ¶
func (bq *BeaconQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*BeaconQuery) CountX ¶
func (bq *BeaconQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*BeaconQuery) Exist ¶
func (bq *BeaconQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*BeaconQuery) ExistX ¶
func (bq *BeaconQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*BeaconQuery) First ¶
func (bq *BeaconQuery) First(ctx context.Context) (*Beacon, error)
First returns the first Beacon entity from the query. Returns a *NotFoundError when no Beacon was found.
func (*BeaconQuery) FirstID ¶
func (bq *BeaconQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Beacon ID from the query. Returns a *NotFoundError when no Beacon ID was found.
func (*BeaconQuery) FirstIDX ¶
func (bq *BeaconQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*BeaconQuery) FirstX ¶
func (bq *BeaconQuery) FirstX(ctx context.Context) *Beacon
FirstX is like First, but panics if an error occurs.
func (*BeaconQuery) GroupBy ¶
func (bq *BeaconQuery) GroupBy(field string, fields ...string) *BeaconGroupBy
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.Beacon.Query(). GroupBy(beacon.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*BeaconQuery) IDs ¶
func (bq *BeaconQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Beacon IDs.
func (*BeaconQuery) IDsX ¶
func (bq *BeaconQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*BeaconQuery) Limit ¶
func (bq *BeaconQuery) Limit(limit int) *BeaconQuery
Limit the number of records to be returned by this query.
func (*BeaconQuery) Offset ¶
func (bq *BeaconQuery) Offset(offset int) *BeaconQuery
Offset to start from.
func (*BeaconQuery) Only ¶
func (bq *BeaconQuery) Only(ctx context.Context) (*Beacon, error)
Only returns a single Beacon entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Beacon entity is found. Returns a *NotFoundError when no Beacon entities are found.
func (*BeaconQuery) OnlyID ¶
func (bq *BeaconQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Beacon ID in the query. Returns a *NotSingularError when more than one Beacon ID is found. Returns a *NotFoundError when no entities are found.
func (*BeaconQuery) OnlyIDX ¶
func (bq *BeaconQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*BeaconQuery) OnlyX ¶
func (bq *BeaconQuery) OnlyX(ctx context.Context) *Beacon
OnlyX is like Only, but panics if an error occurs.
func (*BeaconQuery) Order ¶
func (bq *BeaconQuery) Order(o ...beacon.OrderOption) *BeaconQuery
Order specifies how the records should be ordered.
func (*BeaconQuery) Paginate ¶
func (b *BeaconQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...BeaconPaginateOption, ) (*BeaconConnection, error)
Paginate executes the query and returns a relay based cursor connection to Beacon.
func (*BeaconQuery) QueryHost ¶
func (bq *BeaconQuery) QueryHost() *HostQuery
QueryHost chains the current query on the "host" edge.
func (*BeaconQuery) QueryTasks ¶
func (bq *BeaconQuery) QueryTasks() *TaskQuery
QueryTasks chains the current query on the "tasks" edge.
func (*BeaconQuery) Select ¶
func (bq *BeaconQuery) Select(fields ...string) *BeaconSelect
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.Beacon.Query(). Select(beacon.FieldCreatedAt). Scan(ctx, &v)
func (*BeaconQuery) Unique ¶
func (bq *BeaconQuery) Unique(unique bool) *BeaconQuery
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 (*BeaconQuery) Where ¶
func (bq *BeaconQuery) Where(ps ...predicate.Beacon) *BeaconQuery
Where adds a new predicate for the BeaconQuery builder.
func (*BeaconQuery) WithHost ¶
func (bq *BeaconQuery) WithHost(opts ...func(*HostQuery)) *BeaconQuery
WithHost tells the query-builder to eager-load the nodes that are connected to the "host" edge. The optional arguments are used to configure the query builder of the edge.
func (*BeaconQuery) WithNamedTasks ¶
func (bq *BeaconQuery) WithNamedTasks(name string, opts ...func(*TaskQuery)) *BeaconQuery
WithNamedTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*BeaconQuery) WithTasks ¶
func (bq *BeaconQuery) WithTasks(opts ...func(*TaskQuery)) *BeaconQuery
WithTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge. The optional arguments are used to configure the query builder of the edge.
type BeaconSelect ¶
type BeaconSelect struct { *BeaconQuery // contains filtered or unexported fields }
BeaconSelect is the builder for selecting fields of Beacon entities.
func (*BeaconSelect) Aggregate ¶
func (bs *BeaconSelect) Aggregate(fns ...AggregateFunc) *BeaconSelect
Aggregate adds the given aggregation functions to the selector query.
func (*BeaconSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*BeaconSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*BeaconSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*BeaconSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*BeaconSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*BeaconSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*BeaconSelect) Scan ¶
func (bs *BeaconSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*BeaconSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type BeaconUpdate ¶
type BeaconUpdate struct {
// contains filtered or unexported fields
}
BeaconUpdate is the builder for updating Beacon entities.
func (*BeaconUpdate) AddInterval ¶
func (bu *BeaconUpdate) AddInterval(u int64) *BeaconUpdate
AddInterval adds u to the "interval" field.
func (*BeaconUpdate) AddTaskIDs ¶
func (bu *BeaconUpdate) AddTaskIDs(ids ...int) *BeaconUpdate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*BeaconUpdate) AddTasks ¶
func (bu *BeaconUpdate) AddTasks(t ...*Task) *BeaconUpdate
AddTasks adds the "tasks" edges to the Task entity.
func (*BeaconUpdate) ClearAgentIdentifier ¶
func (bu *BeaconUpdate) ClearAgentIdentifier() *BeaconUpdate
ClearAgentIdentifier clears the value of the "agent_identifier" field.
func (*BeaconUpdate) ClearHost ¶
func (bu *BeaconUpdate) ClearHost() *BeaconUpdate
ClearHost clears the "host" edge to the Host entity.
func (*BeaconUpdate) ClearInterval ¶
func (bu *BeaconUpdate) ClearInterval() *BeaconUpdate
ClearInterval clears the value of the "interval" field.
func (*BeaconUpdate) ClearLastSeenAt ¶
func (bu *BeaconUpdate) ClearLastSeenAt() *BeaconUpdate
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*BeaconUpdate) ClearPrincipal ¶
func (bu *BeaconUpdate) ClearPrincipal() *BeaconUpdate
ClearPrincipal clears the value of the "principal" field.
func (*BeaconUpdate) ClearTasks ¶
func (bu *BeaconUpdate) ClearTasks() *BeaconUpdate
ClearTasks clears all "tasks" edges to the Task entity.
func (*BeaconUpdate) Exec ¶
func (bu *BeaconUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*BeaconUpdate) ExecX ¶
func (bu *BeaconUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BeaconUpdate) Mutation ¶
func (bu *BeaconUpdate) Mutation() *BeaconMutation
Mutation returns the BeaconMutation object of the builder.
func (*BeaconUpdate) RemoveTaskIDs ¶
func (bu *BeaconUpdate) RemoveTaskIDs(ids ...int) *BeaconUpdate
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*BeaconUpdate) RemoveTasks ¶
func (bu *BeaconUpdate) RemoveTasks(t ...*Task) *BeaconUpdate
RemoveTasks removes "tasks" edges to Task entities.
func (*BeaconUpdate) Save ¶
func (bu *BeaconUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*BeaconUpdate) SaveX ¶
func (bu *BeaconUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*BeaconUpdate) SetAgentIdentifier ¶
func (bu *BeaconUpdate) SetAgentIdentifier(s string) *BeaconUpdate
SetAgentIdentifier sets the "agent_identifier" field.
func (*BeaconUpdate) SetHost ¶
func (bu *BeaconUpdate) SetHost(h *Host) *BeaconUpdate
SetHost sets the "host" edge to the Host entity.
func (*BeaconUpdate) SetHostID ¶
func (bu *BeaconUpdate) SetHostID(id int) *BeaconUpdate
SetHostID sets the "host" edge to the Host entity by ID.
func (*BeaconUpdate) SetIdentifier ¶
func (bu *BeaconUpdate) SetIdentifier(s string) *BeaconUpdate
SetIdentifier sets the "identifier" field.
func (*BeaconUpdate) SetInput ¶
func (c *BeaconUpdate) SetInput(i UpdateBeaconInput) *BeaconUpdate
SetInput applies the change-set in the UpdateBeaconInput on the BeaconUpdate builder.
func (*BeaconUpdate) SetInterval ¶
func (bu *BeaconUpdate) SetInterval(u uint64) *BeaconUpdate
SetInterval sets the "interval" field.
func (*BeaconUpdate) SetLastModifiedAt ¶ added in v0.0.5
func (bu *BeaconUpdate) SetLastModifiedAt(t time.Time) *BeaconUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*BeaconUpdate) SetLastSeenAt ¶
func (bu *BeaconUpdate) SetLastSeenAt(t time.Time) *BeaconUpdate
SetLastSeenAt sets the "last_seen_at" field.
func (*BeaconUpdate) SetNillableAgentIdentifier ¶
func (bu *BeaconUpdate) SetNillableAgentIdentifier(s *string) *BeaconUpdate
SetNillableAgentIdentifier sets the "agent_identifier" field if the given value is not nil.
func (*BeaconUpdate) SetNillableIdentifier ¶
func (bu *BeaconUpdate) SetNillableIdentifier(s *string) *BeaconUpdate
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*BeaconUpdate) SetNillableInterval ¶
func (bu *BeaconUpdate) SetNillableInterval(u *uint64) *BeaconUpdate
SetNillableInterval sets the "interval" field if the given value is not nil.
func (*BeaconUpdate) SetNillableLastSeenAt ¶
func (bu *BeaconUpdate) SetNillableLastSeenAt(t *time.Time) *BeaconUpdate
SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.
func (*BeaconUpdate) SetNillablePrincipal ¶
func (bu *BeaconUpdate) SetNillablePrincipal(s *string) *BeaconUpdate
SetNillablePrincipal sets the "principal" field if the given value is not nil.
func (*BeaconUpdate) SetPrincipal ¶
func (bu *BeaconUpdate) SetPrincipal(s string) *BeaconUpdate
SetPrincipal sets the "principal" field.
func (*BeaconUpdate) Where ¶
func (bu *BeaconUpdate) Where(ps ...predicate.Beacon) *BeaconUpdate
Where appends a list predicates to the BeaconUpdate builder.
type BeaconUpdateOne ¶
type BeaconUpdateOne struct {
// contains filtered or unexported fields
}
BeaconUpdateOne is the builder for updating a single Beacon entity.
func (*BeaconUpdateOne) AddInterval ¶
func (buo *BeaconUpdateOne) AddInterval(u int64) *BeaconUpdateOne
AddInterval adds u to the "interval" field.
func (*BeaconUpdateOne) AddTaskIDs ¶
func (buo *BeaconUpdateOne) AddTaskIDs(ids ...int) *BeaconUpdateOne
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*BeaconUpdateOne) AddTasks ¶
func (buo *BeaconUpdateOne) AddTasks(t ...*Task) *BeaconUpdateOne
AddTasks adds the "tasks" edges to the Task entity.
func (*BeaconUpdateOne) ClearAgentIdentifier ¶
func (buo *BeaconUpdateOne) ClearAgentIdentifier() *BeaconUpdateOne
ClearAgentIdentifier clears the value of the "agent_identifier" field.
func (*BeaconUpdateOne) ClearHost ¶
func (buo *BeaconUpdateOne) ClearHost() *BeaconUpdateOne
ClearHost clears the "host" edge to the Host entity.
func (*BeaconUpdateOne) ClearInterval ¶
func (buo *BeaconUpdateOne) ClearInterval() *BeaconUpdateOne
ClearInterval clears the value of the "interval" field.
func (*BeaconUpdateOne) ClearLastSeenAt ¶
func (buo *BeaconUpdateOne) ClearLastSeenAt() *BeaconUpdateOne
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*BeaconUpdateOne) ClearPrincipal ¶
func (buo *BeaconUpdateOne) ClearPrincipal() *BeaconUpdateOne
ClearPrincipal clears the value of the "principal" field.
func (*BeaconUpdateOne) ClearTasks ¶
func (buo *BeaconUpdateOne) ClearTasks() *BeaconUpdateOne
ClearTasks clears all "tasks" edges to the Task entity.
func (*BeaconUpdateOne) Exec ¶
func (buo *BeaconUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*BeaconUpdateOne) ExecX ¶
func (buo *BeaconUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BeaconUpdateOne) Mutation ¶
func (buo *BeaconUpdateOne) Mutation() *BeaconMutation
Mutation returns the BeaconMutation object of the builder.
func (*BeaconUpdateOne) RemoveTaskIDs ¶
func (buo *BeaconUpdateOne) RemoveTaskIDs(ids ...int) *BeaconUpdateOne
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*BeaconUpdateOne) RemoveTasks ¶
func (buo *BeaconUpdateOne) RemoveTasks(t ...*Task) *BeaconUpdateOne
RemoveTasks removes "tasks" edges to Task entities.
func (*BeaconUpdateOne) Save ¶
func (buo *BeaconUpdateOne) Save(ctx context.Context) (*Beacon, error)
Save executes the query and returns the updated Beacon entity.
func (*BeaconUpdateOne) SaveX ¶
func (buo *BeaconUpdateOne) SaveX(ctx context.Context) *Beacon
SaveX is like Save, but panics if an error occurs.
func (*BeaconUpdateOne) Select ¶
func (buo *BeaconUpdateOne) Select(field string, fields ...string) *BeaconUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*BeaconUpdateOne) SetAgentIdentifier ¶
func (buo *BeaconUpdateOne) SetAgentIdentifier(s string) *BeaconUpdateOne
SetAgentIdentifier sets the "agent_identifier" field.
func (*BeaconUpdateOne) SetHost ¶
func (buo *BeaconUpdateOne) SetHost(h *Host) *BeaconUpdateOne
SetHost sets the "host" edge to the Host entity.
func (*BeaconUpdateOne) SetHostID ¶
func (buo *BeaconUpdateOne) SetHostID(id int) *BeaconUpdateOne
SetHostID sets the "host" edge to the Host entity by ID.
func (*BeaconUpdateOne) SetIdentifier ¶
func (buo *BeaconUpdateOne) SetIdentifier(s string) *BeaconUpdateOne
SetIdentifier sets the "identifier" field.
func (*BeaconUpdateOne) SetInput ¶
func (c *BeaconUpdateOne) SetInput(i UpdateBeaconInput) *BeaconUpdateOne
SetInput applies the change-set in the UpdateBeaconInput on the BeaconUpdateOne builder.
func (*BeaconUpdateOne) SetInterval ¶
func (buo *BeaconUpdateOne) SetInterval(u uint64) *BeaconUpdateOne
SetInterval sets the "interval" field.
func (*BeaconUpdateOne) SetLastModifiedAt ¶ added in v0.0.5
func (buo *BeaconUpdateOne) SetLastModifiedAt(t time.Time) *BeaconUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*BeaconUpdateOne) SetLastSeenAt ¶
func (buo *BeaconUpdateOne) SetLastSeenAt(t time.Time) *BeaconUpdateOne
SetLastSeenAt sets the "last_seen_at" field.
func (*BeaconUpdateOne) SetNillableAgentIdentifier ¶
func (buo *BeaconUpdateOne) SetNillableAgentIdentifier(s *string) *BeaconUpdateOne
SetNillableAgentIdentifier sets the "agent_identifier" field if the given value is not nil.
func (*BeaconUpdateOne) SetNillableIdentifier ¶
func (buo *BeaconUpdateOne) SetNillableIdentifier(s *string) *BeaconUpdateOne
SetNillableIdentifier sets the "identifier" field if the given value is not nil.
func (*BeaconUpdateOne) SetNillableInterval ¶
func (buo *BeaconUpdateOne) SetNillableInterval(u *uint64) *BeaconUpdateOne
SetNillableInterval sets the "interval" field if the given value is not nil.
func (*BeaconUpdateOne) SetNillableLastSeenAt ¶
func (buo *BeaconUpdateOne) SetNillableLastSeenAt(t *time.Time) *BeaconUpdateOne
SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.
func (*BeaconUpdateOne) SetNillablePrincipal ¶
func (buo *BeaconUpdateOne) SetNillablePrincipal(s *string) *BeaconUpdateOne
SetNillablePrincipal sets the "principal" field if the given value is not nil.
func (*BeaconUpdateOne) SetPrincipal ¶
func (buo *BeaconUpdateOne) SetPrincipal(s string) *BeaconUpdateOne
SetPrincipal sets the "principal" field.
func (*BeaconUpdateOne) Where ¶
func (buo *BeaconUpdateOne) Where(ps ...predicate.Beacon) *BeaconUpdateOne
Where appends a list predicates to the BeaconUpdate builder.
type BeaconUpsert ¶
BeaconUpsert is the "OnConflict" setter.
func (*BeaconUpsert) AddInterval ¶
func (u *BeaconUpsert) AddInterval(v uint64) *BeaconUpsert
AddInterval adds v to the "interval" field.
func (*BeaconUpsert) ClearAgentIdentifier ¶
func (u *BeaconUpsert) ClearAgentIdentifier() *BeaconUpsert
ClearAgentIdentifier clears the value of the "agent_identifier" field.
func (*BeaconUpsert) ClearInterval ¶
func (u *BeaconUpsert) ClearInterval() *BeaconUpsert
ClearInterval clears the value of the "interval" field.
func (*BeaconUpsert) ClearLastSeenAt ¶
func (u *BeaconUpsert) ClearLastSeenAt() *BeaconUpsert
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*BeaconUpsert) ClearPrincipal ¶
func (u *BeaconUpsert) ClearPrincipal() *BeaconUpsert
ClearPrincipal clears the value of the "principal" field.
func (*BeaconUpsert) SetAgentIdentifier ¶
func (u *BeaconUpsert) SetAgentIdentifier(v string) *BeaconUpsert
SetAgentIdentifier sets the "agent_identifier" field.
func (*BeaconUpsert) SetIdentifier ¶
func (u *BeaconUpsert) SetIdentifier(v string) *BeaconUpsert
SetIdentifier sets the "identifier" field.
func (*BeaconUpsert) SetInterval ¶
func (u *BeaconUpsert) SetInterval(v uint64) *BeaconUpsert
SetInterval sets the "interval" field.
func (*BeaconUpsert) SetLastModifiedAt ¶ added in v0.0.5
func (u *BeaconUpsert) SetLastModifiedAt(v time.Time) *BeaconUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*BeaconUpsert) SetLastSeenAt ¶
func (u *BeaconUpsert) SetLastSeenAt(v time.Time) *BeaconUpsert
SetLastSeenAt sets the "last_seen_at" field.
func (*BeaconUpsert) SetPrincipal ¶
func (u *BeaconUpsert) SetPrincipal(v string) *BeaconUpsert
SetPrincipal sets the "principal" field.
func (*BeaconUpsert) UpdateAgentIdentifier ¶
func (u *BeaconUpsert) UpdateAgentIdentifier() *BeaconUpsert
UpdateAgentIdentifier sets the "agent_identifier" field to the value that was provided on create.
func (*BeaconUpsert) UpdateIdentifier ¶
func (u *BeaconUpsert) UpdateIdentifier() *BeaconUpsert
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*BeaconUpsert) UpdateInterval ¶
func (u *BeaconUpsert) UpdateInterval() *BeaconUpsert
UpdateInterval sets the "interval" field to the value that was provided on create.
func (*BeaconUpsert) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *BeaconUpsert) UpdateLastModifiedAt() *BeaconUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*BeaconUpsert) UpdateLastSeenAt ¶
func (u *BeaconUpsert) UpdateLastSeenAt() *BeaconUpsert
UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.
func (*BeaconUpsert) UpdatePrincipal ¶
func (u *BeaconUpsert) UpdatePrincipal() *BeaconUpsert
UpdatePrincipal sets the "principal" field to the value that was provided on create.
type BeaconUpsertBulk ¶
type BeaconUpsertBulk struct {
// contains filtered or unexported fields
}
BeaconUpsertBulk is the builder for "upsert"-ing a bulk of Beacon nodes.
func (*BeaconUpsertBulk) AddInterval ¶
func (u *BeaconUpsertBulk) AddInterval(v uint64) *BeaconUpsertBulk
AddInterval adds v to the "interval" field.
func (*BeaconUpsertBulk) ClearAgentIdentifier ¶
func (u *BeaconUpsertBulk) ClearAgentIdentifier() *BeaconUpsertBulk
ClearAgentIdentifier clears the value of the "agent_identifier" field.
func (*BeaconUpsertBulk) ClearInterval ¶
func (u *BeaconUpsertBulk) ClearInterval() *BeaconUpsertBulk
ClearInterval clears the value of the "interval" field.
func (*BeaconUpsertBulk) ClearLastSeenAt ¶
func (u *BeaconUpsertBulk) ClearLastSeenAt() *BeaconUpsertBulk
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*BeaconUpsertBulk) ClearPrincipal ¶
func (u *BeaconUpsertBulk) ClearPrincipal() *BeaconUpsertBulk
ClearPrincipal clears the value of the "principal" field.
func (*BeaconUpsertBulk) DoNothing ¶
func (u *BeaconUpsertBulk) DoNothing() *BeaconUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BeaconUpsertBulk) Exec ¶
func (u *BeaconUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*BeaconUpsertBulk) ExecX ¶
func (u *BeaconUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BeaconUpsertBulk) Ignore ¶
func (u *BeaconUpsertBulk) Ignore() *BeaconUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Beacon.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BeaconUpsertBulk) SetAgentIdentifier ¶
func (u *BeaconUpsertBulk) SetAgentIdentifier(v string) *BeaconUpsertBulk
SetAgentIdentifier sets the "agent_identifier" field.
func (*BeaconUpsertBulk) SetIdentifier ¶
func (u *BeaconUpsertBulk) SetIdentifier(v string) *BeaconUpsertBulk
SetIdentifier sets the "identifier" field.
func (*BeaconUpsertBulk) SetInterval ¶
func (u *BeaconUpsertBulk) SetInterval(v uint64) *BeaconUpsertBulk
SetInterval sets the "interval" field.
func (*BeaconUpsertBulk) SetLastModifiedAt ¶ added in v0.0.5
func (u *BeaconUpsertBulk) SetLastModifiedAt(v time.Time) *BeaconUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*BeaconUpsertBulk) SetLastSeenAt ¶
func (u *BeaconUpsertBulk) SetLastSeenAt(v time.Time) *BeaconUpsertBulk
SetLastSeenAt sets the "last_seen_at" field.
func (*BeaconUpsertBulk) SetPrincipal ¶
func (u *BeaconUpsertBulk) SetPrincipal(v string) *BeaconUpsertBulk
SetPrincipal sets the "principal" field.
func (*BeaconUpsertBulk) Update ¶
func (u *BeaconUpsertBulk) Update(set func(*BeaconUpsert)) *BeaconUpsertBulk
Update allows overriding fields `UPDATE` values. See the BeaconCreateBulk.OnConflict documentation for more info.
func (*BeaconUpsertBulk) UpdateAgentIdentifier ¶
func (u *BeaconUpsertBulk) UpdateAgentIdentifier() *BeaconUpsertBulk
UpdateAgentIdentifier sets the "agent_identifier" field to the value that was provided on create.
func (*BeaconUpsertBulk) UpdateIdentifier ¶
func (u *BeaconUpsertBulk) UpdateIdentifier() *BeaconUpsertBulk
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*BeaconUpsertBulk) UpdateInterval ¶
func (u *BeaconUpsertBulk) UpdateInterval() *BeaconUpsertBulk
UpdateInterval sets the "interval" field to the value that was provided on create.
func (*BeaconUpsertBulk) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *BeaconUpsertBulk) UpdateLastModifiedAt() *BeaconUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*BeaconUpsertBulk) UpdateLastSeenAt ¶
func (u *BeaconUpsertBulk) UpdateLastSeenAt() *BeaconUpsertBulk
UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.
func (*BeaconUpsertBulk) UpdateNewValues ¶
func (u *BeaconUpsertBulk) UpdateNewValues() *BeaconUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Beacon.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*BeaconUpsertBulk) UpdatePrincipal ¶
func (u *BeaconUpsertBulk) UpdatePrincipal() *BeaconUpsertBulk
UpdatePrincipal sets the "principal" field to the value that was provided on create.
type BeaconUpsertOne ¶
type BeaconUpsertOne struct {
// contains filtered or unexported fields
}
BeaconUpsertOne is the builder for "upsert"-ing
one Beacon node.
func (*BeaconUpsertOne) AddInterval ¶
func (u *BeaconUpsertOne) AddInterval(v uint64) *BeaconUpsertOne
AddInterval adds v to the "interval" field.
func (*BeaconUpsertOne) ClearAgentIdentifier ¶
func (u *BeaconUpsertOne) ClearAgentIdentifier() *BeaconUpsertOne
ClearAgentIdentifier clears the value of the "agent_identifier" field.
func (*BeaconUpsertOne) ClearInterval ¶
func (u *BeaconUpsertOne) ClearInterval() *BeaconUpsertOne
ClearInterval clears the value of the "interval" field.
func (*BeaconUpsertOne) ClearLastSeenAt ¶
func (u *BeaconUpsertOne) ClearLastSeenAt() *BeaconUpsertOne
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*BeaconUpsertOne) ClearPrincipal ¶
func (u *BeaconUpsertOne) ClearPrincipal() *BeaconUpsertOne
ClearPrincipal clears the value of the "principal" field.
func (*BeaconUpsertOne) DoNothing ¶
func (u *BeaconUpsertOne) DoNothing() *BeaconUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*BeaconUpsertOne) Exec ¶
func (u *BeaconUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*BeaconUpsertOne) ExecX ¶
func (u *BeaconUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*BeaconUpsertOne) ID ¶
func (u *BeaconUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*BeaconUpsertOne) IDX ¶
func (u *BeaconUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*BeaconUpsertOne) Ignore ¶
func (u *BeaconUpsertOne) Ignore() *BeaconUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Beacon.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*BeaconUpsertOne) SetAgentIdentifier ¶
func (u *BeaconUpsertOne) SetAgentIdentifier(v string) *BeaconUpsertOne
SetAgentIdentifier sets the "agent_identifier" field.
func (*BeaconUpsertOne) SetIdentifier ¶
func (u *BeaconUpsertOne) SetIdentifier(v string) *BeaconUpsertOne
SetIdentifier sets the "identifier" field.
func (*BeaconUpsertOne) SetInterval ¶
func (u *BeaconUpsertOne) SetInterval(v uint64) *BeaconUpsertOne
SetInterval sets the "interval" field.
func (*BeaconUpsertOne) SetLastModifiedAt ¶ added in v0.0.5
func (u *BeaconUpsertOne) SetLastModifiedAt(v time.Time) *BeaconUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*BeaconUpsertOne) SetLastSeenAt ¶
func (u *BeaconUpsertOne) SetLastSeenAt(v time.Time) *BeaconUpsertOne
SetLastSeenAt sets the "last_seen_at" field.
func (*BeaconUpsertOne) SetPrincipal ¶
func (u *BeaconUpsertOne) SetPrincipal(v string) *BeaconUpsertOne
SetPrincipal sets the "principal" field.
func (*BeaconUpsertOne) Update ¶
func (u *BeaconUpsertOne) Update(set func(*BeaconUpsert)) *BeaconUpsertOne
Update allows overriding fields `UPDATE` values. See the BeaconCreate.OnConflict documentation for more info.
func (*BeaconUpsertOne) UpdateAgentIdentifier ¶
func (u *BeaconUpsertOne) UpdateAgentIdentifier() *BeaconUpsertOne
UpdateAgentIdentifier sets the "agent_identifier" field to the value that was provided on create.
func (*BeaconUpsertOne) UpdateIdentifier ¶
func (u *BeaconUpsertOne) UpdateIdentifier() *BeaconUpsertOne
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*BeaconUpsertOne) UpdateInterval ¶
func (u *BeaconUpsertOne) UpdateInterval() *BeaconUpsertOne
UpdateInterval sets the "interval" field to the value that was provided on create.
func (*BeaconUpsertOne) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *BeaconUpsertOne) UpdateLastModifiedAt() *BeaconUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*BeaconUpsertOne) UpdateLastSeenAt ¶
func (u *BeaconUpsertOne) UpdateLastSeenAt() *BeaconUpsertOne
UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.
func (*BeaconUpsertOne) UpdateNewValues ¶
func (u *BeaconUpsertOne) UpdateNewValues() *BeaconUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Beacon.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*BeaconUpsertOne) UpdatePrincipal ¶
func (u *BeaconUpsertOne) UpdatePrincipal() *BeaconUpsertOne
UpdatePrincipal sets the "principal" field to the value that was provided on create.
type BeaconWhereInput ¶
type BeaconWhereInput struct { Predicates []predicate.Beacon `json:"-"` Not *BeaconWhereInput `json:"not,omitempty"` Or []*BeaconWhereInput `json:"or,omitempty"` And []*BeaconWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "principal" field predicates. Principal *string `json:"principal,omitempty"` PrincipalNEQ *string `json:"principalNEQ,omitempty"` PrincipalIn []string `json:"principalIn,omitempty"` PrincipalNotIn []string `json:"principalNotIn,omitempty"` PrincipalGT *string `json:"principalGT,omitempty"` PrincipalGTE *string `json:"principalGTE,omitempty"` PrincipalLT *string `json:"principalLT,omitempty"` PrincipalLTE *string `json:"principalLTE,omitempty"` PrincipalContains *string `json:"principalContains,omitempty"` PrincipalHasPrefix *string `json:"principalHasPrefix,omitempty"` PrincipalHasSuffix *string `json:"principalHasSuffix,omitempty"` PrincipalIsNil bool `json:"principalIsNil,omitempty"` PrincipalNotNil bool `json:"principalNotNil,omitempty"` PrincipalEqualFold *string `json:"principalEqualFold,omitempty"` PrincipalContainsFold *string `json:"principalContainsFold,omitempty"` // "identifier" field predicates. Identifier *string `json:"identifier,omitempty"` IdentifierNEQ *string `json:"identifierNEQ,omitempty"` IdentifierIn []string `json:"identifierIn,omitempty"` IdentifierNotIn []string `json:"identifierNotIn,omitempty"` IdentifierGT *string `json:"identifierGT,omitempty"` IdentifierGTE *string `json:"identifierGTE,omitempty"` IdentifierLT *string `json:"identifierLT,omitempty"` IdentifierLTE *string `json:"identifierLTE,omitempty"` IdentifierContains *string `json:"identifierContains,omitempty"` IdentifierHasPrefix *string `json:"identifierHasPrefix,omitempty"` IdentifierHasSuffix *string `json:"identifierHasSuffix,omitempty"` IdentifierEqualFold *string `json:"identifierEqualFold,omitempty"` IdentifierContainsFold *string `json:"identifierContainsFold,omitempty"` // "agent_identifier" field predicates. AgentIdentifier *string `json:"agentIdentifier,omitempty"` AgentIdentifierNEQ *string `json:"agentIdentifierNEQ,omitempty"` AgentIdentifierIn []string `json:"agentIdentifierIn,omitempty"` AgentIdentifierNotIn []string `json:"agentIdentifierNotIn,omitempty"` AgentIdentifierGT *string `json:"agentIdentifierGT,omitempty"` AgentIdentifierGTE *string `json:"agentIdentifierGTE,omitempty"` AgentIdentifierLT *string `json:"agentIdentifierLT,omitempty"` AgentIdentifierLTE *string `json:"agentIdentifierLTE,omitempty"` AgentIdentifierContains *string `json:"agentIdentifierContains,omitempty"` AgentIdentifierHasPrefix *string `json:"agentIdentifierHasPrefix,omitempty"` AgentIdentifierHasSuffix *string `json:"agentIdentifierHasSuffix,omitempty"` AgentIdentifierIsNil bool `json:"agentIdentifierIsNil,omitempty"` AgentIdentifierNotNil bool `json:"agentIdentifierNotNil,omitempty"` AgentIdentifierEqualFold *string `json:"agentIdentifierEqualFold,omitempty"` AgentIdentifierContainsFold *string `json:"agentIdentifierContainsFold,omitempty"` // "last_seen_at" field predicates. LastSeenAt *time.Time `json:"lastSeenAt,omitempty"` LastSeenAtNEQ *time.Time `json:"lastSeenAtNEQ,omitempty"` LastSeenAtIn []time.Time `json:"lastSeenAtIn,omitempty"` LastSeenAtNotIn []time.Time `json:"lastSeenAtNotIn,omitempty"` LastSeenAtGT *time.Time `json:"lastSeenAtGT,omitempty"` LastSeenAtGTE *time.Time `json:"lastSeenAtGTE,omitempty"` LastSeenAtLT *time.Time `json:"lastSeenAtLT,omitempty"` LastSeenAtLTE *time.Time `json:"lastSeenAtLTE,omitempty"` LastSeenAtIsNil bool `json:"lastSeenAtIsNil,omitempty"` LastSeenAtNotNil bool `json:"lastSeenAtNotNil,omitempty"` // "interval" field predicates. Interval *uint64 `json:"interval,omitempty"` IntervalNEQ *uint64 `json:"intervalNEQ,omitempty"` IntervalIn []uint64 `json:"intervalIn,omitempty"` IntervalNotIn []uint64 `json:"intervalNotIn,omitempty"` IntervalGT *uint64 `json:"intervalGT,omitempty"` IntervalGTE *uint64 `json:"intervalGTE,omitempty"` IntervalLT *uint64 `json:"intervalLT,omitempty"` IntervalLTE *uint64 `json:"intervalLTE,omitempty"` IntervalIsNil bool `json:"intervalIsNil,omitempty"` IntervalNotNil bool `json:"intervalNotNil,omitempty"` // "host" edge predicates. HasHost *bool `json:"hasHost,omitempty"` HasHostWith []*HostWhereInput `json:"hasHostWith,omitempty"` // "tasks" edge predicates. HasTasks *bool `json:"hasTasks,omitempty"` HasTasksWith []*TaskWhereInput `json:"hasTasksWith,omitempty"` }
BeaconWhereInput represents a where input for filtering Beacon queries.
func (*BeaconWhereInput) AddPredicates ¶
func (i *BeaconWhereInput) AddPredicates(predicates ...predicate.Beacon)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*BeaconWhereInput) Filter ¶
func (i *BeaconWhereInput) Filter(q *BeaconQuery) (*BeaconQuery, error)
Filter applies the BeaconWhereInput filter on the BeaconQuery builder.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Beacon is the client for interacting with the Beacon builders. Beacon *BeaconClient // File is the client for interacting with the File builders. File *FileClient // Host is the client for interacting with the Host builders. Host *HostClient // HostFile is the client for interacting with the HostFile builders. HostFile *HostFileClient // HostProcess is the client for interacting with the HostProcess builders. HostProcess *HostProcessClient // Quest is the client for interacting with the Quest builders. Quest *QuestClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // Task is the client for interacting with the Task builders. Task *TaskClient // Tome is the client for interacting with the Tome builders. Tome *TomeClient // 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(). Beacon. 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(...)`.
func (*Client) Noder ¶
Noder returns a Node by its id. If the NodeType was not provided, it will be derived from the id value according to the universal-id configuration.
c.Noder(ctx, id) c.Noder(ctx, id, ent.WithNodeType(typeResolver))
func (*Client) OpenTx ¶
OpenTx opens a transaction and returns a transactional context along with the created transaction.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type CreateQuestInput ¶
CreateQuestInput represents a mutation input for creating quests.
func (*CreateQuestInput) Mutate ¶
func (i *CreateQuestInput) Mutate(m *QuestMutation)
Mutate applies the CreateQuestInput on the QuestMutation builder.
type CreateTagInput ¶
CreateTagInput represents a mutation input for creating tags.
func (*CreateTagInput) Mutate ¶
func (i *CreateTagInput) Mutate(m *TagMutation)
Mutate applies the CreateTagInput on the TagMutation builder.
type CreateTomeInput ¶
type CreateTomeInput struct { Name string Description string Author string SupportModel *tome.SupportModel Tactic *tome.Tactic ParamDefs *string Eldritch string FileIDs []int }
CreateTomeInput represents a mutation input for creating tomes.
func (*CreateTomeInput) Mutate ¶
func (i *CreateTomeInput) Mutate(m *TomeMutation)
Mutate applies the CreateTomeInput on the TomeMutation builder.
type File ¶
type File struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // The name of the file, used to reference it for downloads Name string `json:"name,omitempty"` // The size of the file in bytes Size int `json:"size,omitempty"` // A SHA3-256 digest of the content field Hash string `json:"hash,omitempty"` // The content of the file Content []byte `json:"content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the FileQuery when eager-loading is set. Edges FileEdges `json:"edges"` // contains filtered or unexported fields }
File is the model entity for the File schema.
func (*File) IsNode ¶
func (n *File) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*File) NamedTomes ¶ added in v0.0.5
NamedTomes returns the Tomes named value or an error if the edge was not loaded in eager-loading with this name.
func (*File) QueryTomes ¶ added in v0.0.5
QueryTomes queries the "tomes" edge of the File entity.
func (*File) Unwrap ¶
Unwrap unwraps the File entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*File) Update ¶
func (f *File) Update() *FileUpdateOne
Update returns a builder for updating this File. Note that you need to call File.Unwrap() before calling this method if this File was returned from a transaction, and the transaction was committed or rolled back.
type FileClient ¶
type FileClient struct {
// contains filtered or unexported fields
}
FileClient is a client for the File schema.
func NewFileClient ¶
func NewFileClient(c config) *FileClient
NewFileClient returns a client for the File from the given config.
func (*FileClient) Create ¶
func (c *FileClient) Create() *FileCreate
Create returns a builder for creating a File entity.
func (*FileClient) CreateBulk ¶
func (c *FileClient) CreateBulk(builders ...*FileCreate) *FileCreateBulk
CreateBulk returns a builder for creating a bulk of File entities.
func (*FileClient) Delete ¶
func (c *FileClient) Delete() *FileDelete
Delete returns a delete builder for File.
func (*FileClient) DeleteOne ¶
func (c *FileClient) DeleteOne(f *File) *FileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*FileClient) DeleteOneID ¶
func (c *FileClient) DeleteOneID(id int) *FileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*FileClient) GetX ¶
func (c *FileClient) GetX(ctx context.Context, id int) *File
GetX is like Get, but panics if an error occurs.
func (*FileClient) Intercept ¶
func (c *FileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `file.Intercept(f(g(h())))`.
func (*FileClient) Interceptors ¶
func (c *FileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*FileClient) MapCreateBulk ¶
func (c *FileClient) MapCreateBulk(slice any, setFunc func(*FileCreate, int)) *FileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*FileClient) Query ¶
func (c *FileClient) Query() *FileQuery
Query returns a query builder for File.
func (*FileClient) QueryTomes ¶ added in v0.0.5
func (c *FileClient) QueryTomes(f *File) *TomeQuery
QueryTomes queries the tomes edge of a File.
func (*FileClient) Update ¶
func (c *FileClient) Update() *FileUpdate
Update returns an update builder for File.
func (*FileClient) UpdateOne ¶
func (c *FileClient) UpdateOne(f *File) *FileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*FileClient) UpdateOneID ¶
func (c *FileClient) UpdateOneID(id int) *FileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*FileClient) Use ¶
func (c *FileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `file.Hooks(f(g(h())))`.
type FileConnection ¶
type FileConnection struct { Edges []*FileEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
FileConnection is the connection containing edges to File.
type FileCreate ¶
type FileCreate struct {
// contains filtered or unexported fields
}
FileCreate is the builder for creating a File entity.
func (*FileCreate) AddTomeIDs ¶ added in v0.0.5
func (fc *FileCreate) AddTomeIDs(ids ...int) *FileCreate
AddTomeIDs adds the "tomes" edge to the Tome entity by IDs.
func (*FileCreate) AddTomes ¶ added in v0.0.5
func (fc *FileCreate) AddTomes(t ...*Tome) *FileCreate
AddTomes adds the "tomes" edges to the Tome entity.
func (*FileCreate) Exec ¶
func (fc *FileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreate) ExecX ¶
func (fc *FileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreate) Mutation ¶
func (fc *FileCreate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileCreate) OnConflict ¶
func (fc *FileCreate) OnConflict(opts ...sql.ConflictOption) *FileUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FileUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*FileCreate) OnConflictColumns ¶
func (fc *FileCreate) OnConflictColumns(columns ...string) *FileUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*FileCreate) Save ¶
func (fc *FileCreate) Save(ctx context.Context) (*File, error)
Save creates the File in the database.
func (*FileCreate) SaveX ¶
func (fc *FileCreate) SaveX(ctx context.Context) *File
SaveX calls Save and panics if Save returns an error.
func (*FileCreate) SetContent ¶
func (fc *FileCreate) SetContent(b []byte) *FileCreate
SetContent sets the "content" field.
func (*FileCreate) SetCreatedAt ¶
func (fc *FileCreate) SetCreatedAt(t time.Time) *FileCreate
SetCreatedAt sets the "created_at" field.
func (*FileCreate) SetHash ¶
func (fc *FileCreate) SetHash(s string) *FileCreate
SetHash sets the "hash" field.
func (*FileCreate) SetLastModifiedAt ¶
func (fc *FileCreate) SetLastModifiedAt(t time.Time) *FileCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*FileCreate) SetName ¶
func (fc *FileCreate) SetName(s string) *FileCreate
SetName sets the "name" field.
func (*FileCreate) SetNillableCreatedAt ¶
func (fc *FileCreate) SetNillableCreatedAt(t *time.Time) *FileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*FileCreate) SetNillableLastModifiedAt ¶
func (fc *FileCreate) SetNillableLastModifiedAt(t *time.Time) *FileCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*FileCreate) SetNillableSize ¶
func (fc *FileCreate) SetNillableSize(i *int) *FileCreate
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileCreate) SetSize ¶
func (fc *FileCreate) SetSize(i int) *FileCreate
SetSize sets the "size" field.
type FileCreateBulk ¶
type FileCreateBulk struct {
// contains filtered or unexported fields
}
FileCreateBulk is the builder for creating many File entities in bulk.
func (*FileCreateBulk) Exec ¶
func (fcb *FileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileCreateBulk) ExecX ¶
func (fcb *FileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileCreateBulk) OnConflict ¶
func (fcb *FileCreateBulk) OnConflict(opts ...sql.ConflictOption) *FileUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.File.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.FileUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*FileCreateBulk) OnConflictColumns ¶
func (fcb *FileCreateBulk) OnConflictColumns(columns ...string) *FileUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type FileDelete ¶
type FileDelete struct {
// contains filtered or unexported fields
}
FileDelete is the builder for deleting a File entity.
func (*FileDelete) Exec ¶
func (fd *FileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*FileDelete) ExecX ¶
func (fd *FileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*FileDelete) Where ¶
func (fd *FileDelete) Where(ps ...predicate.File) *FileDelete
Where appends a list predicates to the FileDelete builder.
type FileDeleteOne ¶
type FileDeleteOne struct {
// contains filtered or unexported fields
}
FileDeleteOne is the builder for deleting a single File entity.
func (*FileDeleteOne) Exec ¶
func (fdo *FileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*FileDeleteOne) ExecX ¶
func (fdo *FileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileDeleteOne) Where ¶
func (fdo *FileDeleteOne) Where(ps ...predicate.File) *FileDeleteOne
Where appends a list predicates to the FileDelete builder.
type FileEdges ¶ added in v0.0.5
type FileEdges struct { // Tomes holds the value of the tomes edge. Tomes []*Tome `json:"tomes,omitempty"` // contains filtered or unexported fields }
FileEdges holds the relations/edges for other nodes in the graph.
func (FileEdges) TomesOrErr ¶ added in v0.0.5
TomesOrErr returns the Tomes value or an error if the edge was not loaded in eager-loading.
type FileGroupBy ¶
type FileGroupBy struct {
// contains filtered or unexported fields
}
FileGroupBy is the group-by builder for File entities.
func (*FileGroupBy) Aggregate ¶
func (fgb *FileGroupBy) Aggregate(fns ...AggregateFunc) *FileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*FileGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileGroupBy) Scan ¶
func (fgb *FileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileMutation ¶
type FileMutation struct {
// contains filtered or unexported fields
}
FileMutation represents an operation that mutates the File nodes in the graph.
func (*FileMutation) AddField ¶
func (m *FileMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*FileMutation) AddSize ¶
func (m *FileMutation) AddSize(i int)
AddSize adds i to the "size" field.
func (*FileMutation) AddTomeIDs ¶ added in v0.0.5
func (m *FileMutation) AddTomeIDs(ids ...int)
AddTomeIDs adds the "tomes" edge to the Tome entity by ids.
func (*FileMutation) AddedEdges ¶
func (m *FileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*FileMutation) AddedField ¶
func (m *FileMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*FileMutation) AddedFields ¶
func (m *FileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*FileMutation) AddedIDs ¶
func (m *FileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*FileMutation) AddedSize ¶
func (m *FileMutation) AddedSize() (r int, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*FileMutation) ClearEdge ¶
func (m *FileMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*FileMutation) ClearField ¶
func (m *FileMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*FileMutation) ClearTomes ¶ added in v0.0.5
func (m *FileMutation) ClearTomes()
ClearTomes clears the "tomes" edge to the Tome entity.
func (*FileMutation) ClearedEdges ¶
func (m *FileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*FileMutation) ClearedFields ¶
func (m *FileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (FileMutation) Client ¶
func (m FileMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*FileMutation) Content ¶
func (m *FileMutation) Content() (r []byte, exists bool)
Content returns the value of the "content" field in the mutation.
func (*FileMutation) CreatedAt ¶
func (m *FileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*FileMutation) EdgeCleared ¶
func (m *FileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*FileMutation) Field ¶
func (m *FileMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*FileMutation) FieldCleared ¶
func (m *FileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*FileMutation) Fields ¶
func (m *FileMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*FileMutation) Hash ¶
func (m *FileMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*FileMutation) ID ¶
func (m *FileMutation) ID() (id int, exists bool)
ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.
func (*FileMutation) IDs ¶
func (m *FileMutation) IDs(ctx context.Context) ([]int, error)
IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.
func (*FileMutation) LastModifiedAt ¶
func (m *FileMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*FileMutation) Name ¶
func (m *FileMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*FileMutation) OldContent ¶
func (m *FileMutation) OldContent(ctx context.Context) (v []byte, err error)
OldContent returns the old "content" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FileMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FileMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*FileMutation) OldHash ¶
func (m *FileMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FileMutation) OldLastModifiedAt ¶
OldLastModifiedAt returns the old "last_modified_at" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FileMutation) OldName ¶
func (m *FileMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FileMutation) OldSize ¶
func (m *FileMutation) OldSize(ctx context.Context) (v int, err error)
OldSize returns the old "size" field's value of the File entity. If the File object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*FileMutation) RemoveTomeIDs ¶ added in v0.0.5
func (m *FileMutation) RemoveTomeIDs(ids ...int)
RemoveTomeIDs removes the "tomes" edge to the Tome entity by IDs.
func (*FileMutation) RemovedEdges ¶
func (m *FileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*FileMutation) RemovedIDs ¶
func (m *FileMutation) RemovedIDs(name string) []ent.Value
RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.
func (*FileMutation) RemovedTomesIDs ¶ added in v0.0.5
func (m *FileMutation) RemovedTomesIDs() (ids []int)
RemovedTomes returns the removed IDs of the "tomes" edge to the Tome entity.
func (*FileMutation) ResetContent ¶
func (m *FileMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*FileMutation) ResetCreatedAt ¶
func (m *FileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*FileMutation) ResetEdge ¶
func (m *FileMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*FileMutation) ResetField ¶
func (m *FileMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*FileMutation) ResetHash ¶
func (m *FileMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*FileMutation) ResetLastModifiedAt ¶
func (m *FileMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*FileMutation) ResetName ¶
func (m *FileMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*FileMutation) ResetSize ¶
func (m *FileMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*FileMutation) ResetTomes ¶ added in v0.0.5
func (m *FileMutation) ResetTomes()
ResetTomes resets all changes to the "tomes" edge.
func (*FileMutation) SetContent ¶
func (m *FileMutation) SetContent(b []byte)
SetContent sets the "content" field.
func (*FileMutation) SetCreatedAt ¶
func (m *FileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*FileMutation) SetField ¶
func (m *FileMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*FileMutation) SetHash ¶
func (m *FileMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*FileMutation) SetLastModifiedAt ¶
func (m *FileMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*FileMutation) SetName ¶
func (m *FileMutation) SetName(s string)
SetName sets the "name" field.
func (*FileMutation) SetOp ¶
func (m *FileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*FileMutation) Size ¶
func (m *FileMutation) Size() (r int, exists bool)
Size returns the value of the "size" field in the mutation.
func (*FileMutation) TomesCleared ¶ added in v0.0.5
func (m *FileMutation) TomesCleared() bool
TomesCleared reports if the "tomes" edge to the Tome entity was cleared.
func (*FileMutation) TomesIDs ¶ added in v0.0.5
func (m *FileMutation) TomesIDs() (ids []int)
TomesIDs returns the "tomes" edge IDs in the mutation.
func (FileMutation) Tx ¶
func (m FileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*FileMutation) Type ¶
func (m *FileMutation) Type() string
Type returns the node type of this mutation (File).
func (*FileMutation) Where ¶
func (m *FileMutation) Where(ps ...predicate.File)
Where appends a list predicates to the FileMutation builder.
func (*FileMutation) WhereP ¶
func (m *FileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the FileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type FileOrder ¶
type FileOrder struct { Direction OrderDirection `json:"direction"` Field *FileOrderField `json:"field"` }
FileOrder defines the ordering of File.
type FileOrderField ¶
type FileOrderField struct { // Value extracts the ordering value from the given File. Value func(*File) (ent.Value, error) // contains filtered or unexported fields }
FileOrderField defines the ordering field of File.
func (FileOrderField) MarshalGQL ¶
func (f FileOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (FileOrderField) String ¶
func (f FileOrderField) String() string
String implement fmt.Stringer interface.
func (*FileOrderField) UnmarshalGQL ¶
func (f *FileOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type FilePaginateOption ¶
type FilePaginateOption func(*filePager) error
FilePaginateOption enables pagination customization.
func WithFileFilter ¶
func WithFileFilter(filter func(*FileQuery) (*FileQuery, error)) FilePaginateOption
WithFileFilter configures pagination filter.
func WithFileOrder ¶
func WithFileOrder(order *FileOrder) FilePaginateOption
WithFileOrder configures pagination ordering.
type FileQuery ¶
type FileQuery struct {
// contains filtered or unexported fields
}
FileQuery is the builder for querying File entities.
func (*FileQuery) Aggregate ¶
func (fq *FileQuery) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate returns a FileSelect configured with the given aggregations.
func (*FileQuery) Clone ¶
Clone returns a duplicate of the FileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*FileQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*FileQuery) First ¶
First returns the first File entity from the query. Returns a *NotFoundError when no File was found.
func (*FileQuery) FirstID ¶
FirstID returns the first File ID from the query. Returns a *NotFoundError when no File ID was found.
func (*FileQuery) GroupBy ¶
func (fq *FileQuery) GroupBy(field string, fields ...string) *FileGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` Count int `json:"count,omitempty"` } client.File.Query(). GroupBy(file.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*FileQuery) Only ¶
Only returns a single File entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one File entity is found. Returns a *NotFoundError when no File entities are found.
func (*FileQuery) OnlyID ¶
OnlyID is like Only, but returns the only File ID in the query. Returns a *NotSingularError when more than one File ID is found. Returns a *NotFoundError when no entities are found.
func (*FileQuery) Order ¶
func (fq *FileQuery) Order(o ...file.OrderOption) *FileQuery
Order specifies how the records should be ordered.
func (*FileQuery) Paginate ¶
func (f *FileQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...FilePaginateOption, ) (*FileConnection, error)
Paginate executes the query and returns a relay based cursor connection to File.
func (*FileQuery) QueryTomes ¶ added in v0.0.5
QueryTomes chains the current query on the "tomes" edge.
func (*FileQuery) Select ¶
func (fq *FileQuery) Select(fields ...string) *FileSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CreatedAt time.Time `json:"created_at,omitempty"` } client.File.Query(). Select(file.FieldCreatedAt). Scan(ctx, &v)
func (*FileQuery) Unique ¶
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 (*FileQuery) WithNamedTomes ¶ added in v0.0.5
WithNamedTomes tells the query-builder to eager-load the nodes that are connected to the "tomes" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type FileSelect ¶
type FileSelect struct { *FileQuery // contains filtered or unexported fields }
FileSelect is the builder for selecting fields of File entities.
func (*FileSelect) Aggregate ¶
func (fs *FileSelect) Aggregate(fns ...AggregateFunc) *FileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*FileSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*FileSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*FileSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*FileSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*FileSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*FileSelect) Scan ¶
func (fs *FileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*FileSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type FileUpdate ¶
type FileUpdate struct {
// contains filtered or unexported fields
}
FileUpdate is the builder for updating File entities.
func (*FileUpdate) AddSize ¶
func (fu *FileUpdate) AddSize(i int) *FileUpdate
AddSize adds i to the "size" field.
func (*FileUpdate) AddTomeIDs ¶ added in v0.0.5
func (fu *FileUpdate) AddTomeIDs(ids ...int) *FileUpdate
AddTomeIDs adds the "tomes" edge to the Tome entity by IDs.
func (*FileUpdate) AddTomes ¶ added in v0.0.5
func (fu *FileUpdate) AddTomes(t ...*Tome) *FileUpdate
AddTomes adds the "tomes" edges to the Tome entity.
func (*FileUpdate) ClearTomes ¶ added in v0.0.5
func (fu *FileUpdate) ClearTomes() *FileUpdate
ClearTomes clears all "tomes" edges to the Tome entity.
func (*FileUpdate) Exec ¶
func (fu *FileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpdate) ExecX ¶
func (fu *FileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdate) Mutation ¶
func (fu *FileUpdate) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdate) RemoveTomeIDs ¶ added in v0.0.5
func (fu *FileUpdate) RemoveTomeIDs(ids ...int) *FileUpdate
RemoveTomeIDs removes the "tomes" edge to Tome entities by IDs.
func (*FileUpdate) RemoveTomes ¶ added in v0.0.5
func (fu *FileUpdate) RemoveTomes(t ...*Tome) *FileUpdate
RemoveTomes removes "tomes" edges to Tome entities.
func (*FileUpdate) Save ¶
func (fu *FileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*FileUpdate) SaveX ¶
func (fu *FileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*FileUpdate) SetContent ¶
func (fu *FileUpdate) SetContent(b []byte) *FileUpdate
SetContent sets the "content" field.
func (*FileUpdate) SetHash ¶
func (fu *FileUpdate) SetHash(s string) *FileUpdate
SetHash sets the "hash" field.
func (*FileUpdate) SetLastModifiedAt ¶
func (fu *FileUpdate) SetLastModifiedAt(t time.Time) *FileUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*FileUpdate) SetName ¶
func (fu *FileUpdate) SetName(s string) *FileUpdate
SetName sets the "name" field.
func (*FileUpdate) SetNillableSize ¶
func (fu *FileUpdate) SetNillableSize(i *int) *FileUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdate) SetSize ¶
func (fu *FileUpdate) SetSize(i int) *FileUpdate
SetSize sets the "size" field.
func (*FileUpdate) Where ¶
func (fu *FileUpdate) Where(ps ...predicate.File) *FileUpdate
Where appends a list predicates to the FileUpdate builder.
type FileUpdateOne ¶
type FileUpdateOne struct {
// contains filtered or unexported fields
}
FileUpdateOne is the builder for updating a single File entity.
func (*FileUpdateOne) AddSize ¶
func (fuo *FileUpdateOne) AddSize(i int) *FileUpdateOne
AddSize adds i to the "size" field.
func (*FileUpdateOne) AddTomeIDs ¶ added in v0.0.5
func (fuo *FileUpdateOne) AddTomeIDs(ids ...int) *FileUpdateOne
AddTomeIDs adds the "tomes" edge to the Tome entity by IDs.
func (*FileUpdateOne) AddTomes ¶ added in v0.0.5
func (fuo *FileUpdateOne) AddTomes(t ...*Tome) *FileUpdateOne
AddTomes adds the "tomes" edges to the Tome entity.
func (*FileUpdateOne) ClearTomes ¶ added in v0.0.5
func (fuo *FileUpdateOne) ClearTomes() *FileUpdateOne
ClearTomes clears all "tomes" edges to the Tome entity.
func (*FileUpdateOne) Exec ¶
func (fuo *FileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*FileUpdateOne) ExecX ¶
func (fuo *FileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpdateOne) Mutation ¶
func (fuo *FileUpdateOne) Mutation() *FileMutation
Mutation returns the FileMutation object of the builder.
func (*FileUpdateOne) RemoveTomeIDs ¶ added in v0.0.5
func (fuo *FileUpdateOne) RemoveTomeIDs(ids ...int) *FileUpdateOne
RemoveTomeIDs removes the "tomes" edge to Tome entities by IDs.
func (*FileUpdateOne) RemoveTomes ¶ added in v0.0.5
func (fuo *FileUpdateOne) RemoveTomes(t ...*Tome) *FileUpdateOne
RemoveTomes removes "tomes" edges to Tome entities.
func (*FileUpdateOne) Save ¶
func (fuo *FileUpdateOne) Save(ctx context.Context) (*File, error)
Save executes the query and returns the updated File entity.
func (*FileUpdateOne) SaveX ¶
func (fuo *FileUpdateOne) SaveX(ctx context.Context) *File
SaveX is like Save, but panics if an error occurs.
func (*FileUpdateOne) Select ¶
func (fuo *FileUpdateOne) Select(field string, fields ...string) *FileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*FileUpdateOne) SetContent ¶
func (fuo *FileUpdateOne) SetContent(b []byte) *FileUpdateOne
SetContent sets the "content" field.
func (*FileUpdateOne) SetHash ¶
func (fuo *FileUpdateOne) SetHash(s string) *FileUpdateOne
SetHash sets the "hash" field.
func (*FileUpdateOne) SetLastModifiedAt ¶
func (fuo *FileUpdateOne) SetLastModifiedAt(t time.Time) *FileUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*FileUpdateOne) SetName ¶
func (fuo *FileUpdateOne) SetName(s string) *FileUpdateOne
SetName sets the "name" field.
func (*FileUpdateOne) SetNillableSize ¶
func (fuo *FileUpdateOne) SetNillableSize(i *int) *FileUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*FileUpdateOne) SetSize ¶
func (fuo *FileUpdateOne) SetSize(i int) *FileUpdateOne
SetSize sets the "size" field.
func (*FileUpdateOne) Where ¶
func (fuo *FileUpdateOne) Where(ps ...predicate.File) *FileUpdateOne
Where appends a list predicates to the FileUpdate builder.
type FileUpsert ¶
FileUpsert is the "OnConflict" setter.
func (*FileUpsert) AddSize ¶
func (u *FileUpsert) AddSize(v int) *FileUpsert
AddSize adds v to the "size" field.
func (*FileUpsert) SetContent ¶
func (u *FileUpsert) SetContent(v []byte) *FileUpsert
SetContent sets the "content" field.
func (*FileUpsert) SetHash ¶
func (u *FileUpsert) SetHash(v string) *FileUpsert
SetHash sets the "hash" field.
func (*FileUpsert) SetLastModifiedAt ¶
func (u *FileUpsert) SetLastModifiedAt(v time.Time) *FileUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*FileUpsert) SetName ¶
func (u *FileUpsert) SetName(v string) *FileUpsert
SetName sets the "name" field.
func (*FileUpsert) SetSize ¶
func (u *FileUpsert) SetSize(v int) *FileUpsert
SetSize sets the "size" field.
func (*FileUpsert) UpdateContent ¶
func (u *FileUpsert) UpdateContent() *FileUpsert
UpdateContent sets the "content" field to the value that was provided on create.
func (*FileUpsert) UpdateHash ¶
func (u *FileUpsert) UpdateHash() *FileUpsert
UpdateHash sets the "hash" field to the value that was provided on create.
func (*FileUpsert) UpdateLastModifiedAt ¶
func (u *FileUpsert) UpdateLastModifiedAt() *FileUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*FileUpsert) UpdateName ¶
func (u *FileUpsert) UpdateName() *FileUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsert) UpdateSize ¶
func (u *FileUpsert) UpdateSize() *FileUpsert
UpdateSize sets the "size" field to the value that was provided on create.
type FileUpsertBulk ¶
type FileUpsertBulk struct {
// contains filtered or unexported fields
}
FileUpsertBulk is the builder for "upsert"-ing a bulk of File nodes.
func (*FileUpsertBulk) AddSize ¶
func (u *FileUpsertBulk) AddSize(v int) *FileUpsertBulk
AddSize adds v to the "size" field.
func (*FileUpsertBulk) DoNothing ¶
func (u *FileUpsertBulk) DoNothing() *FileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertBulk) Exec ¶
func (u *FileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertBulk) ExecX ¶
func (u *FileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertBulk) Ignore ¶
func (u *FileUpsertBulk) Ignore() *FileUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FileUpsertBulk) SetContent ¶
func (u *FileUpsertBulk) SetContent(v []byte) *FileUpsertBulk
SetContent sets the "content" field.
func (*FileUpsertBulk) SetHash ¶
func (u *FileUpsertBulk) SetHash(v string) *FileUpsertBulk
SetHash sets the "hash" field.
func (*FileUpsertBulk) SetLastModifiedAt ¶
func (u *FileUpsertBulk) SetLastModifiedAt(v time.Time) *FileUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*FileUpsertBulk) SetName ¶
func (u *FileUpsertBulk) SetName(v string) *FileUpsertBulk
SetName sets the "name" field.
func (*FileUpsertBulk) SetSize ¶
func (u *FileUpsertBulk) SetSize(v int) *FileUpsertBulk
SetSize sets the "size" field.
func (*FileUpsertBulk) Update ¶
func (u *FileUpsertBulk) Update(set func(*FileUpsert)) *FileUpsertBulk
Update allows overriding fields `UPDATE` values. See the FileCreateBulk.OnConflict documentation for more info.
func (*FileUpsertBulk) UpdateContent ¶
func (u *FileUpsertBulk) UpdateContent() *FileUpsertBulk
UpdateContent sets the "content" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateHash ¶
func (u *FileUpsertBulk) UpdateHash() *FileUpsertBulk
UpdateHash sets the "hash" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateLastModifiedAt ¶
func (u *FileUpsertBulk) UpdateLastModifiedAt() *FileUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateName ¶
func (u *FileUpsertBulk) UpdateName() *FileUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertBulk) UpdateNewValues ¶
func (u *FileUpsertBulk) UpdateNewValues() *FileUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FileUpsertBulk) UpdateSize ¶
func (u *FileUpsertBulk) UpdateSize() *FileUpsertBulk
UpdateSize sets the "size" field to the value that was provided on create.
type FileUpsertOne ¶
type FileUpsertOne struct {
// contains filtered or unexported fields
}
FileUpsertOne is the builder for "upsert"-ing
one File node.
func (*FileUpsertOne) AddSize ¶
func (u *FileUpsertOne) AddSize(v int) *FileUpsertOne
AddSize adds v to the "size" field.
func (*FileUpsertOne) DoNothing ¶
func (u *FileUpsertOne) DoNothing() *FileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*FileUpsertOne) Exec ¶
func (u *FileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*FileUpsertOne) ExecX ¶
func (u *FileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*FileUpsertOne) ID ¶
func (u *FileUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*FileUpsertOne) IDX ¶
func (u *FileUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*FileUpsertOne) Ignore ¶
func (u *FileUpsertOne) Ignore() *FileUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.File.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*FileUpsertOne) SetContent ¶
func (u *FileUpsertOne) SetContent(v []byte) *FileUpsertOne
SetContent sets the "content" field.
func (*FileUpsertOne) SetHash ¶
func (u *FileUpsertOne) SetHash(v string) *FileUpsertOne
SetHash sets the "hash" field.
func (*FileUpsertOne) SetLastModifiedAt ¶
func (u *FileUpsertOne) SetLastModifiedAt(v time.Time) *FileUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*FileUpsertOne) SetName ¶
func (u *FileUpsertOne) SetName(v string) *FileUpsertOne
SetName sets the "name" field.
func (*FileUpsertOne) SetSize ¶
func (u *FileUpsertOne) SetSize(v int) *FileUpsertOne
SetSize sets the "size" field.
func (*FileUpsertOne) Update ¶
func (u *FileUpsertOne) Update(set func(*FileUpsert)) *FileUpsertOne
Update allows overriding fields `UPDATE` values. See the FileCreate.OnConflict documentation for more info.
func (*FileUpsertOne) UpdateContent ¶
func (u *FileUpsertOne) UpdateContent() *FileUpsertOne
UpdateContent sets the "content" field to the value that was provided on create.
func (*FileUpsertOne) UpdateHash ¶
func (u *FileUpsertOne) UpdateHash() *FileUpsertOne
UpdateHash sets the "hash" field to the value that was provided on create.
func (*FileUpsertOne) UpdateLastModifiedAt ¶
func (u *FileUpsertOne) UpdateLastModifiedAt() *FileUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*FileUpsertOne) UpdateName ¶
func (u *FileUpsertOne) UpdateName() *FileUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*FileUpsertOne) UpdateNewValues ¶
func (u *FileUpsertOne) UpdateNewValues() *FileUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.File.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*FileUpsertOne) UpdateSize ¶
func (u *FileUpsertOne) UpdateSize() *FileUpsertOne
UpdateSize sets the "size" field to the value that was provided on create.
type FileWhereInput ¶
type FileWhereInput struct { Predicates []predicate.File `json:"-"` Not *FileWhereInput `json:"not,omitempty"` Or []*FileWhereInput `json:"or,omitempty"` And []*FileWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "size" field predicates. Size *int `json:"size,omitempty"` SizeNEQ *int `json:"sizeNEQ,omitempty"` SizeIn []int `json:"sizeIn,omitempty"` SizeNotIn []int `json:"sizeNotIn,omitempty"` SizeGT *int `json:"sizeGT,omitempty"` SizeGTE *int `json:"sizeGTE,omitempty"` SizeLT *int `json:"sizeLT,omitempty"` SizeLTE *int `json:"sizeLTE,omitempty"` // "hash" field predicates. Hash *string `json:"hash,omitempty"` HashNEQ *string `json:"hashNEQ,omitempty"` HashIn []string `json:"hashIn,omitempty"` HashNotIn []string `json:"hashNotIn,omitempty"` HashGT *string `json:"hashGT,omitempty"` HashGTE *string `json:"hashGTE,omitempty"` HashLT *string `json:"hashLT,omitempty"` HashLTE *string `json:"hashLTE,omitempty"` HashContains *string `json:"hashContains,omitempty"` HashHasPrefix *string `json:"hashHasPrefix,omitempty"` HashHasSuffix *string `json:"hashHasSuffix,omitempty"` HashEqualFold *string `json:"hashEqualFold,omitempty"` HashContainsFold *string `json:"hashContainsFold,omitempty"` // "tomes" edge predicates. HasTomes *bool `json:"hasTomes,omitempty"` HasTomesWith []*TomeWhereInput `json:"hasTomesWith,omitempty"` }
FileWhereInput represents a where input for filtering File queries.
func (*FileWhereInput) AddPredicates ¶
func (i *FileWhereInput) AddPredicates(predicates ...predicate.File)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type Host ¶
type Host struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // Unique identifier for the host. Unique to each host. Identifier string `json:"identifier,omitempty"` // A human readable identifier for the host. Name string `json:"name,omitempty"` // Primary interface IP address reported by the agent. PrimaryIP string `json:"primary_ip,omitempty"` // Platform the agent is operating on. Platform c2pb.Host_Platform `json:"platform,omitempty"` // Timestamp of when a task was last claimed or updated for the host. LastSeenAt time.Time `json:"last_seen_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the HostQuery when eager-loading is set. Edges HostEdges `json:"edges"` // contains filtered or unexported fields }
Host is the model entity for the Host schema.
func (*Host) IsNode ¶
func (n *Host) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Host) NamedBeacons ¶
NamedBeacons returns the Beacons named value or an error if the edge was not loaded in eager-loading with this name.
func (*Host) NamedFiles ¶ added in v0.0.5
NamedFiles returns the Files named value or an error if the edge was not loaded in eager-loading with this name.
func (*Host) NamedProcesses ¶ added in v0.0.5
func (h *Host) NamedProcesses(name string) ([]*HostProcess, error)
NamedProcesses returns the Processes named value or an error if the edge was not loaded in eager-loading with this name.
func (*Host) NamedTags ¶
NamedTags returns the Tags named value or an error if the edge was not loaded in eager-loading with this name.
func (*Host) Processes ¶ added in v0.0.5
func (h *Host) Processes(ctx context.Context) (result []*HostProcess, err error)
func (*Host) QueryBeacons ¶
func (h *Host) QueryBeacons() *BeaconQuery
QueryBeacons queries the "beacons" edge of the Host entity.
func (*Host) QueryFiles ¶ added in v0.0.5
func (h *Host) QueryFiles() *HostFileQuery
QueryFiles queries the "files" edge of the Host entity.
func (*Host) QueryProcesses ¶ added in v0.0.5
func (h *Host) QueryProcesses() *HostProcessQuery
QueryProcesses queries the "processes" edge of the Host entity.
func (*Host) Unwrap ¶
Unwrap unwraps the Host 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 (*Host) Update ¶
func (h *Host) Update() *HostUpdateOne
Update returns a builder for updating this Host. Note that you need to call Host.Unwrap() before calling this method if this Host was returned from a transaction, and the transaction was committed or rolled back.
type HostClient ¶
type HostClient struct {
// contains filtered or unexported fields
}
HostClient is a client for the Host schema.
func NewHostClient ¶
func NewHostClient(c config) *HostClient
NewHostClient returns a client for the Host from the given config.
func (*HostClient) Create ¶
func (c *HostClient) Create() *HostCreate
Create returns a builder for creating a Host entity.
func (*HostClient) CreateBulk ¶
func (c *HostClient) CreateBulk(builders ...*HostCreate) *HostCreateBulk
CreateBulk returns a builder for creating a bulk of Host entities.
func (*HostClient) Delete ¶
func (c *HostClient) Delete() *HostDelete
Delete returns a delete builder for Host.
func (*HostClient) DeleteOne ¶
func (c *HostClient) DeleteOne(h *Host) *HostDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HostClient) DeleteOneID ¶
func (c *HostClient) DeleteOneID(id int) *HostDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*HostClient) GetX ¶
func (c *HostClient) GetX(ctx context.Context, id int) *Host
GetX is like Get, but panics if an error occurs.
func (*HostClient) Intercept ¶
func (c *HostClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `host.Intercept(f(g(h())))`.
func (*HostClient) Interceptors ¶
func (c *HostClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*HostClient) MapCreateBulk ¶
func (c *HostClient) MapCreateBulk(slice any, setFunc func(*HostCreate, int)) *HostCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*HostClient) Query ¶
func (c *HostClient) Query() *HostQuery
Query returns a query builder for Host.
func (*HostClient) QueryBeacons ¶
func (c *HostClient) QueryBeacons(h *Host) *BeaconQuery
QueryBeacons queries the beacons edge of a Host.
func (*HostClient) QueryFiles ¶ added in v0.0.5
func (c *HostClient) QueryFiles(h *Host) *HostFileQuery
QueryFiles queries the files edge of a Host.
func (*HostClient) QueryProcesses ¶ added in v0.0.5
func (c *HostClient) QueryProcesses(h *Host) *HostProcessQuery
QueryProcesses queries the processes edge of a Host.
func (*HostClient) QueryTags ¶
func (c *HostClient) QueryTags(h *Host) *TagQuery
QueryTags queries the tags edge of a Host.
func (*HostClient) Update ¶
func (c *HostClient) Update() *HostUpdate
Update returns an update builder for Host.
func (*HostClient) UpdateOne ¶
func (c *HostClient) UpdateOne(h *Host) *HostUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HostClient) UpdateOneID ¶
func (c *HostClient) UpdateOneID(id int) *HostUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HostClient) Use ¶
func (c *HostClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `host.Hooks(f(g(h())))`.
type HostConnection ¶
type HostConnection struct { Edges []*HostEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
HostConnection is the connection containing edges to Host.
type HostCreate ¶
type HostCreate struct {
// contains filtered or unexported fields
}
HostCreate is the builder for creating a Host entity.
func (*HostCreate) AddBeaconIDs ¶
func (hc *HostCreate) AddBeaconIDs(ids ...int) *HostCreate
AddBeaconIDs adds the "beacons" edge to the Beacon entity by IDs.
func (*HostCreate) AddBeacons ¶
func (hc *HostCreate) AddBeacons(b ...*Beacon) *HostCreate
AddBeacons adds the "beacons" edges to the Beacon entity.
func (*HostCreate) AddFileIDs ¶ added in v0.0.5
func (hc *HostCreate) AddFileIDs(ids ...int) *HostCreate
AddFileIDs adds the "files" edge to the HostFile entity by IDs.
func (*HostCreate) AddFiles ¶ added in v0.0.5
func (hc *HostCreate) AddFiles(h ...*HostFile) *HostCreate
AddFiles adds the "files" edges to the HostFile entity.
func (*HostCreate) AddProcessIDs ¶ added in v0.0.5
func (hc *HostCreate) AddProcessIDs(ids ...int) *HostCreate
AddProcessIDs adds the "processes" edge to the HostProcess entity by IDs.
func (*HostCreate) AddProcesses ¶ added in v0.0.5
func (hc *HostCreate) AddProcesses(h ...*HostProcess) *HostCreate
AddProcesses adds the "processes" edges to the HostProcess entity.
func (*HostCreate) AddTagIDs ¶
func (hc *HostCreate) AddTagIDs(ids ...int) *HostCreate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*HostCreate) AddTags ¶
func (hc *HostCreate) AddTags(t ...*Tag) *HostCreate
AddTags adds the "tags" edges to the Tag entity.
func (*HostCreate) Exec ¶
func (hc *HostCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HostCreate) ExecX ¶
func (hc *HostCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostCreate) Mutation ¶
func (hc *HostCreate) Mutation() *HostMutation
Mutation returns the HostMutation object of the builder.
func (*HostCreate) OnConflict ¶
func (hc *HostCreate) OnConflict(opts ...sql.ConflictOption) *HostUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Host.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.HostUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*HostCreate) OnConflictColumns ¶
func (hc *HostCreate) OnConflictColumns(columns ...string) *HostUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Host.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*HostCreate) Save ¶
func (hc *HostCreate) Save(ctx context.Context) (*Host, error)
Save creates the Host in the database.
func (*HostCreate) SaveX ¶
func (hc *HostCreate) SaveX(ctx context.Context) *Host
SaveX calls Save and panics if Save returns an error.
func (*HostCreate) SetCreatedAt ¶ added in v0.0.5
func (hc *HostCreate) SetCreatedAt(t time.Time) *HostCreate
SetCreatedAt sets the "created_at" field.
func (*HostCreate) SetIdentifier ¶
func (hc *HostCreate) SetIdentifier(s string) *HostCreate
SetIdentifier sets the "identifier" field.
func (*HostCreate) SetLastModifiedAt ¶ added in v0.0.5
func (hc *HostCreate) SetLastModifiedAt(t time.Time) *HostCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostCreate) SetLastSeenAt ¶
func (hc *HostCreate) SetLastSeenAt(t time.Time) *HostCreate
SetLastSeenAt sets the "last_seen_at" field.
func (*HostCreate) SetName ¶
func (hc *HostCreate) SetName(s string) *HostCreate
SetName sets the "name" field.
func (*HostCreate) SetNillableCreatedAt ¶ added in v0.0.5
func (hc *HostCreate) SetNillableCreatedAt(t *time.Time) *HostCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*HostCreate) SetNillableLastModifiedAt ¶ added in v0.0.5
func (hc *HostCreate) SetNillableLastModifiedAt(t *time.Time) *HostCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*HostCreate) SetNillableLastSeenAt ¶
func (hc *HostCreate) SetNillableLastSeenAt(t *time.Time) *HostCreate
SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.
func (*HostCreate) SetNillableName ¶
func (hc *HostCreate) SetNillableName(s *string) *HostCreate
SetNillableName sets the "name" field if the given value is not nil.
func (*HostCreate) SetNillablePrimaryIP ¶
func (hc *HostCreate) SetNillablePrimaryIP(s *string) *HostCreate
SetNillablePrimaryIP sets the "primary_ip" field if the given value is not nil.
func (*HostCreate) SetPlatform ¶
func (hc *HostCreate) SetPlatform(cp c2pb.Host_Platform) *HostCreate
SetPlatform sets the "platform" field.
func (*HostCreate) SetPrimaryIP ¶
func (hc *HostCreate) SetPrimaryIP(s string) *HostCreate
SetPrimaryIP sets the "primary_ip" field.
type HostCreateBulk ¶
type HostCreateBulk struct {
// contains filtered or unexported fields
}
HostCreateBulk is the builder for creating many Host entities in bulk.
func (*HostCreateBulk) Exec ¶
func (hcb *HostCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HostCreateBulk) ExecX ¶
func (hcb *HostCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostCreateBulk) OnConflict ¶
func (hcb *HostCreateBulk) OnConflict(opts ...sql.ConflictOption) *HostUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Host.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.HostUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*HostCreateBulk) OnConflictColumns ¶
func (hcb *HostCreateBulk) OnConflictColumns(columns ...string) *HostUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Host.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type HostDelete ¶
type HostDelete struct {
// contains filtered or unexported fields
}
HostDelete is the builder for deleting a Host entity.
func (*HostDelete) Exec ¶
func (hd *HostDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HostDelete) ExecX ¶
func (hd *HostDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HostDelete) Where ¶
func (hd *HostDelete) Where(ps ...predicate.Host) *HostDelete
Where appends a list predicates to the HostDelete builder.
type HostDeleteOne ¶
type HostDeleteOne struct {
// contains filtered or unexported fields
}
HostDeleteOne is the builder for deleting a single Host entity.
func (*HostDeleteOne) Exec ¶
func (hdo *HostDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HostDeleteOne) ExecX ¶
func (hdo *HostDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostDeleteOne) Where ¶
func (hdo *HostDeleteOne) Where(ps ...predicate.Host) *HostDeleteOne
Where appends a list predicates to the HostDelete builder.
type HostEdges ¶
type HostEdges struct { // Tags used to group this host with other hosts. Tags []*Tag `json:"tags,omitempty"` // Beacons that are present on this host system. Beacons []*Beacon `json:"beacons,omitempty"` // Files reported on this host system. Files []*HostFile `json:"files,omitempty"` // Processes reported as running on this host system. Processes []*HostProcess `json:"processes,omitempty"` // contains filtered or unexported fields }
HostEdges holds the relations/edges for other nodes in the graph.
func (HostEdges) BeaconsOrErr ¶
BeaconsOrErr returns the Beacons value or an error if the edge was not loaded in eager-loading.
func (HostEdges) FilesOrErr ¶ added in v0.0.5
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
func (HostEdges) ProcessesOrErr ¶ added in v0.0.5
func (e HostEdges) ProcessesOrErr() ([]*HostProcess, error)
ProcessesOrErr returns the Processes value or an error if the edge was not loaded in eager-loading.
type HostFile ¶ added in v0.0.5
type HostFile struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // Path to the file on the host system. Path string `json:"path,omitempty"` // User who owns the file on the host system. Owner string `json:"owner,omitempty"` // Group who owns the file on the host system. Group string `json:"group,omitempty"` // Permissions for the file on the host system. Permissions string `json:"permissions,omitempty"` // The size of the file in bytes Size int `json:"size,omitempty"` // A SHA3-256 digest of the content field Hash string `json:"hash,omitempty"` // The content of the file Content []byte `json:"content,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the HostFileQuery when eager-loading is set. Edges HostFileEdges `json:"edges"` // contains filtered or unexported fields }
HostFile is the model entity for the HostFile schema.
func (*HostFile) IsNode ¶ added in v0.0.5
func (n *HostFile) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*HostFile) QueryHost ¶ added in v0.0.5
QueryHost queries the "host" edge of the HostFile entity.
func (*HostFile) QueryTask ¶ added in v0.0.5
QueryTask queries the "task" edge of the HostFile entity.
func (*HostFile) ToEdge ¶ added in v0.0.5
func (hf *HostFile) ToEdge(order *HostFileOrder) *HostFileEdge
ToEdge converts HostFile into HostFileEdge.
func (*HostFile) Unwrap ¶ added in v0.0.5
Unwrap unwraps the HostFile 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 (*HostFile) Update ¶ added in v0.0.5
func (hf *HostFile) Update() *HostFileUpdateOne
Update returns a builder for updating this HostFile. Note that you need to call HostFile.Unwrap() before calling this method if this HostFile was returned from a transaction, and the transaction was committed or rolled back.
type HostFileClient ¶ added in v0.0.5
type HostFileClient struct {
// contains filtered or unexported fields
}
HostFileClient is a client for the HostFile schema.
func NewHostFileClient ¶ added in v0.0.5
func NewHostFileClient(c config) *HostFileClient
NewHostFileClient returns a client for the HostFile from the given config.
func (*HostFileClient) Create ¶ added in v0.0.5
func (c *HostFileClient) Create() *HostFileCreate
Create returns a builder for creating a HostFile entity.
func (*HostFileClient) CreateBulk ¶ added in v0.0.5
func (c *HostFileClient) CreateBulk(builders ...*HostFileCreate) *HostFileCreateBulk
CreateBulk returns a builder for creating a bulk of HostFile entities.
func (*HostFileClient) Delete ¶ added in v0.0.5
func (c *HostFileClient) Delete() *HostFileDelete
Delete returns a delete builder for HostFile.
func (*HostFileClient) DeleteOne ¶ added in v0.0.5
func (c *HostFileClient) DeleteOne(hf *HostFile) *HostFileDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HostFileClient) DeleteOneID ¶ added in v0.0.5
func (c *HostFileClient) DeleteOneID(id int) *HostFileDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*HostFileClient) GetX ¶ added in v0.0.5
func (c *HostFileClient) GetX(ctx context.Context, id int) *HostFile
GetX is like Get, but panics if an error occurs.
func (*HostFileClient) Hooks ¶ added in v0.0.5
func (c *HostFileClient) Hooks() []Hook
Hooks returns the client hooks.
func (*HostFileClient) Intercept ¶ added in v0.0.5
func (c *HostFileClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hostfile.Intercept(f(g(h())))`.
func (*HostFileClient) Interceptors ¶ added in v0.0.5
func (c *HostFileClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*HostFileClient) MapCreateBulk ¶ added in v0.0.5
func (c *HostFileClient) MapCreateBulk(slice any, setFunc func(*HostFileCreate, int)) *HostFileCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*HostFileClient) Query ¶ added in v0.0.5
func (c *HostFileClient) Query() *HostFileQuery
Query returns a query builder for HostFile.
func (*HostFileClient) QueryHost ¶ added in v0.0.5
func (c *HostFileClient) QueryHost(hf *HostFile) *HostQuery
QueryHost queries the host edge of a HostFile.
func (*HostFileClient) QueryTask ¶ added in v0.0.5
func (c *HostFileClient) QueryTask(hf *HostFile) *TaskQuery
QueryTask queries the task edge of a HostFile.
func (*HostFileClient) Update ¶ added in v0.0.5
func (c *HostFileClient) Update() *HostFileUpdate
Update returns an update builder for HostFile.
func (*HostFileClient) UpdateOne ¶ added in v0.0.5
func (c *HostFileClient) UpdateOne(hf *HostFile) *HostFileUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HostFileClient) UpdateOneID ¶ added in v0.0.5
func (c *HostFileClient) UpdateOneID(id int) *HostFileUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HostFileClient) Use ¶ added in v0.0.5
func (c *HostFileClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hostfile.Hooks(f(g(h())))`.
type HostFileConnection ¶ added in v0.0.5
type HostFileConnection struct { Edges []*HostFileEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
HostFileConnection is the connection containing edges to HostFile.
type HostFileCreate ¶ added in v0.0.5
type HostFileCreate struct {
// contains filtered or unexported fields
}
HostFileCreate is the builder for creating a HostFile entity.
func (*HostFileCreate) Exec ¶ added in v0.0.5
func (hfc *HostFileCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HostFileCreate) ExecX ¶ added in v0.0.5
func (hfc *HostFileCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostFileCreate) Mutation ¶ added in v0.0.5
func (hfc *HostFileCreate) Mutation() *HostFileMutation
Mutation returns the HostFileMutation object of the builder.
func (*HostFileCreate) OnConflict ¶ added in v0.0.5
func (hfc *HostFileCreate) OnConflict(opts ...sql.ConflictOption) *HostFileUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HostFile.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.HostFileUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*HostFileCreate) OnConflictColumns ¶ added in v0.0.5
func (hfc *HostFileCreate) OnConflictColumns(columns ...string) *HostFileUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HostFile.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*HostFileCreate) Save ¶ added in v0.0.5
func (hfc *HostFileCreate) Save(ctx context.Context) (*HostFile, error)
Save creates the HostFile in the database.
func (*HostFileCreate) SaveX ¶ added in v0.0.5
func (hfc *HostFileCreate) SaveX(ctx context.Context) *HostFile
SaveX calls Save and panics if Save returns an error.
func (*HostFileCreate) SetContent ¶ added in v0.0.5
func (hfc *HostFileCreate) SetContent(b []byte) *HostFileCreate
SetContent sets the "content" field.
func (*HostFileCreate) SetCreatedAt ¶ added in v0.0.5
func (hfc *HostFileCreate) SetCreatedAt(t time.Time) *HostFileCreate
SetCreatedAt sets the "created_at" field.
func (*HostFileCreate) SetGroup ¶ added in v0.0.5
func (hfc *HostFileCreate) SetGroup(s string) *HostFileCreate
SetGroup sets the "group" field.
func (*HostFileCreate) SetHash ¶ added in v0.0.5
func (hfc *HostFileCreate) SetHash(s string) *HostFileCreate
SetHash sets the "hash" field.
func (*HostFileCreate) SetHost ¶ added in v0.0.5
func (hfc *HostFileCreate) SetHost(h *Host) *HostFileCreate
SetHost sets the "host" edge to the Host entity.
func (*HostFileCreate) SetHostID ¶ added in v0.0.5
func (hfc *HostFileCreate) SetHostID(id int) *HostFileCreate
SetHostID sets the "host" edge to the Host entity by ID.
func (*HostFileCreate) SetLastModifiedAt ¶ added in v0.0.5
func (hfc *HostFileCreate) SetLastModifiedAt(t time.Time) *HostFileCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostFileCreate) SetNillableCreatedAt ¶ added in v0.0.5
func (hfc *HostFileCreate) SetNillableCreatedAt(t *time.Time) *HostFileCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*HostFileCreate) SetNillableGroup ¶ added in v0.0.5
func (hfc *HostFileCreate) SetNillableGroup(s *string) *HostFileCreate
SetNillableGroup sets the "group" field if the given value is not nil.
func (*HostFileCreate) SetNillableHash ¶ added in v0.0.5
func (hfc *HostFileCreate) SetNillableHash(s *string) *HostFileCreate
SetNillableHash sets the "hash" field if the given value is not nil.
func (*HostFileCreate) SetNillableLastModifiedAt ¶ added in v0.0.5
func (hfc *HostFileCreate) SetNillableLastModifiedAt(t *time.Time) *HostFileCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*HostFileCreate) SetNillableOwner ¶ added in v0.0.5
func (hfc *HostFileCreate) SetNillableOwner(s *string) *HostFileCreate
SetNillableOwner sets the "owner" field if the given value is not nil.
func (*HostFileCreate) SetNillablePermissions ¶ added in v0.0.5
func (hfc *HostFileCreate) SetNillablePermissions(s *string) *HostFileCreate
SetNillablePermissions sets the "permissions" field if the given value is not nil.
func (*HostFileCreate) SetNillableSize ¶ added in v0.0.5
func (hfc *HostFileCreate) SetNillableSize(i *int) *HostFileCreate
SetNillableSize sets the "size" field if the given value is not nil.
func (*HostFileCreate) SetOwner ¶ added in v0.0.5
func (hfc *HostFileCreate) SetOwner(s string) *HostFileCreate
SetOwner sets the "owner" field.
func (*HostFileCreate) SetPath ¶ added in v0.0.5
func (hfc *HostFileCreate) SetPath(s string) *HostFileCreate
SetPath sets the "path" field.
func (*HostFileCreate) SetPermissions ¶ added in v0.0.5
func (hfc *HostFileCreate) SetPermissions(s string) *HostFileCreate
SetPermissions sets the "permissions" field.
func (*HostFileCreate) SetSize ¶ added in v0.0.5
func (hfc *HostFileCreate) SetSize(i int) *HostFileCreate
SetSize sets the "size" field.
func (*HostFileCreate) SetTask ¶ added in v0.0.5
func (hfc *HostFileCreate) SetTask(t *Task) *HostFileCreate
SetTask sets the "task" edge to the Task entity.
func (*HostFileCreate) SetTaskID ¶ added in v0.0.5
func (hfc *HostFileCreate) SetTaskID(id int) *HostFileCreate
SetTaskID sets the "task" edge to the Task entity by ID.
type HostFileCreateBulk ¶ added in v0.0.5
type HostFileCreateBulk struct {
// contains filtered or unexported fields
}
HostFileCreateBulk is the builder for creating many HostFile entities in bulk.
func (*HostFileCreateBulk) Exec ¶ added in v0.0.5
func (hfcb *HostFileCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HostFileCreateBulk) ExecX ¶ added in v0.0.5
func (hfcb *HostFileCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostFileCreateBulk) OnConflict ¶ added in v0.0.5
func (hfcb *HostFileCreateBulk) OnConflict(opts ...sql.ConflictOption) *HostFileUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HostFile.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.HostFileUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*HostFileCreateBulk) OnConflictColumns ¶ added in v0.0.5
func (hfcb *HostFileCreateBulk) OnConflictColumns(columns ...string) *HostFileUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HostFile.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type HostFileDelete ¶ added in v0.0.5
type HostFileDelete struct {
// contains filtered or unexported fields
}
HostFileDelete is the builder for deleting a HostFile entity.
func (*HostFileDelete) Exec ¶ added in v0.0.5
func (hfd *HostFileDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HostFileDelete) ExecX ¶ added in v0.0.5
func (hfd *HostFileDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HostFileDelete) Where ¶ added in v0.0.5
func (hfd *HostFileDelete) Where(ps ...predicate.HostFile) *HostFileDelete
Where appends a list predicates to the HostFileDelete builder.
type HostFileDeleteOne ¶ added in v0.0.5
type HostFileDeleteOne struct {
// contains filtered or unexported fields
}
HostFileDeleteOne is the builder for deleting a single HostFile entity.
func (*HostFileDeleteOne) Exec ¶ added in v0.0.5
func (hfdo *HostFileDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HostFileDeleteOne) ExecX ¶ added in v0.0.5
func (hfdo *HostFileDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostFileDeleteOne) Where ¶ added in v0.0.5
func (hfdo *HostFileDeleteOne) Where(ps ...predicate.HostFile) *HostFileDeleteOne
Where appends a list predicates to the HostFileDelete builder.
type HostFileEdge ¶ added in v0.0.5
HostFileEdge is the edge representation of HostFile.
type HostFileEdges ¶ added in v0.0.5
type HostFileEdges struct { // Host the file was reported on. Host *Host `json:"host,omitempty"` // Task that reported this file. Task *Task `json:"task,omitempty"` // contains filtered or unexported fields }
HostFileEdges holds the relations/edges for other nodes in the graph.
func (HostFileEdges) HostOrErr ¶ added in v0.0.5
func (e HostFileEdges) HostOrErr() (*Host, error)
HostOrErr returns the Host value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (HostFileEdges) TaskOrErr ¶ added in v0.0.5
func (e HostFileEdges) TaskOrErr() (*Task, error)
TaskOrErr returns the Task value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type HostFileGroupBy ¶ added in v0.0.5
type HostFileGroupBy struct {
// contains filtered or unexported fields
}
HostFileGroupBy is the group-by builder for HostFile entities.
func (*HostFileGroupBy) Aggregate ¶ added in v0.0.5
func (hfgb *HostFileGroupBy) Aggregate(fns ...AggregateFunc) *HostFileGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HostFileGroupBy) Bool ¶ added in v0.0.5
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HostFileGroupBy) Bools ¶ added in v0.0.5
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HostFileGroupBy) BoolsX ¶ added in v0.0.5
BoolsX is like Bools, but panics if an error occurs.
func (*HostFileGroupBy) Float64 ¶ added in v0.0.5
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HostFileGroupBy) Float64X ¶ added in v0.0.5
Float64X is like Float64, but panics if an error occurs.
func (*HostFileGroupBy) Float64s ¶ added in v0.0.5
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HostFileGroupBy) Float64sX ¶ added in v0.0.5
Float64sX is like Float64s, but panics if an error occurs.
func (*HostFileGroupBy) Int ¶ added in v0.0.5
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HostFileGroupBy) Ints ¶ added in v0.0.5
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HostFileGroupBy) Scan ¶ added in v0.0.5
func (hfgb *HostFileGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HostFileGroupBy) String ¶ added in v0.0.5
String returns a single string from a selector. It is only allowed when selecting one field.
func (*HostFileGroupBy) StringX ¶ added in v0.0.5
StringX is like String, but panics if an error occurs.
type HostFileMutation ¶ added in v0.0.5
type HostFileMutation struct {
// contains filtered or unexported fields
}
HostFileMutation represents an operation that mutates the HostFile nodes in the graph.
func (*HostFileMutation) AddField ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) AddSize ¶ added in v0.0.5
func (m *HostFileMutation) AddSize(i int)
AddSize adds i to the "size" field.
func (*HostFileMutation) AddedEdges ¶ added in v0.0.5
func (m *HostFileMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HostFileMutation) AddedField ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) AddedFields ¶ added in v0.0.5
func (m *HostFileMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HostFileMutation) AddedIDs ¶ added in v0.0.5
func (m *HostFileMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HostFileMutation) AddedSize ¶ added in v0.0.5
func (m *HostFileMutation) AddedSize() (r int, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*HostFileMutation) ClearContent ¶ added in v0.0.5
func (m *HostFileMutation) ClearContent()
ClearContent clears the value of the "content" field.
func (*HostFileMutation) ClearEdge ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) ClearField ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) ClearGroup ¶ added in v0.0.5
func (m *HostFileMutation) ClearGroup()
ClearGroup clears the value of the "group" field.
func (*HostFileMutation) ClearHash ¶ added in v0.0.5
func (m *HostFileMutation) ClearHash()
ClearHash clears the value of the "hash" field.
func (*HostFileMutation) ClearHost ¶ added in v0.0.5
func (m *HostFileMutation) ClearHost()
ClearHost clears the "host" edge to the Host entity.
func (*HostFileMutation) ClearOwner ¶ added in v0.0.5
func (m *HostFileMutation) ClearOwner()
ClearOwner clears the value of the "owner" field.
func (*HostFileMutation) ClearPermissions ¶ added in v0.0.5
func (m *HostFileMutation) ClearPermissions()
ClearPermissions clears the value of the "permissions" field.
func (*HostFileMutation) ClearTask ¶ added in v0.0.5
func (m *HostFileMutation) ClearTask()
ClearTask clears the "task" edge to the Task entity.
func (*HostFileMutation) ClearedEdges ¶ added in v0.0.5
func (m *HostFileMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HostFileMutation) ClearedFields ¶ added in v0.0.5
func (m *HostFileMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HostFileMutation) Client ¶ added in v0.0.5
func (m HostFileMutation) 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 (*HostFileMutation) Content ¶ added in v0.0.5
func (m *HostFileMutation) Content() (r []byte, exists bool)
Content returns the value of the "content" field in the mutation.
func (*HostFileMutation) ContentCleared ¶ added in v0.0.5
func (m *HostFileMutation) ContentCleared() bool
ContentCleared returns if the "content" field was cleared in this mutation.
func (*HostFileMutation) CreatedAt ¶ added in v0.0.5
func (m *HostFileMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*HostFileMutation) EdgeCleared ¶ added in v0.0.5
func (m *HostFileMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HostFileMutation) Field ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) FieldCleared ¶ added in v0.0.5
func (m *HostFileMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HostFileMutation) Fields ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) Group ¶ added in v0.0.5
func (m *HostFileMutation) Group() (r string, exists bool)
Group returns the value of the "group" field in the mutation.
func (*HostFileMutation) GroupCleared ¶ added in v0.0.5
func (m *HostFileMutation) GroupCleared() bool
GroupCleared returns if the "group" field was cleared in this mutation.
func (*HostFileMutation) Hash ¶ added in v0.0.5
func (m *HostFileMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*HostFileMutation) HashCleared ¶ added in v0.0.5
func (m *HostFileMutation) HashCleared() bool
HashCleared returns if the "hash" field was cleared in this mutation.
func (*HostFileMutation) HostCleared ¶ added in v0.0.5
func (m *HostFileMutation) HostCleared() bool
HostCleared reports if the "host" edge to the Host entity was cleared.
func (*HostFileMutation) HostID ¶ added in v0.0.5
func (m *HostFileMutation) HostID() (id int, exists bool)
HostID returns the "host" edge ID in the mutation.
func (*HostFileMutation) HostIDs ¶ added in v0.0.5
func (m *HostFileMutation) HostIDs() (ids []int)
HostIDs returns the "host" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HostID instead. It exists only for internal usage by the builders.
func (*HostFileMutation) ID ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) IDs ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) LastModifiedAt ¶ added in v0.0.5
func (m *HostFileMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*HostFileMutation) OldContent ¶ added in v0.0.5
func (m *HostFileMutation) OldContent(ctx context.Context) (v []byte, err error)
OldContent returns the old "content" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldCreatedAt ¶ added in v0.0.5
OldCreatedAt returns the old "created_at" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldField ¶ added in v0.0.5
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 (*HostFileMutation) OldGroup ¶ added in v0.0.5
func (m *HostFileMutation) OldGroup(ctx context.Context) (v string, err error)
OldGroup returns the old "group" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldHash ¶ added in v0.0.5
func (m *HostFileMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldLastModifiedAt ¶ added in v0.0.5
OldLastModifiedAt returns the old "last_modified_at" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldOwner ¶ added in v0.0.5
func (m *HostFileMutation) OldOwner(ctx context.Context) (v string, err error)
OldOwner returns the old "owner" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldPath ¶ added in v0.0.5
func (m *HostFileMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldPermissions ¶ added in v0.0.5
func (m *HostFileMutation) OldPermissions(ctx context.Context) (v string, err error)
OldPermissions returns the old "permissions" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) OldSize ¶ added in v0.0.5
func (m *HostFileMutation) OldSize(ctx context.Context) (v int, err error)
OldSize returns the old "size" field's value of the HostFile entity. If the HostFile 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 (*HostFileMutation) Op ¶ added in v0.0.5
func (m *HostFileMutation) Op() Op
Op returns the operation name.
func (*HostFileMutation) Owner ¶ added in v0.0.5
func (m *HostFileMutation) Owner() (r string, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*HostFileMutation) OwnerCleared ¶ added in v0.0.5
func (m *HostFileMutation) OwnerCleared() bool
OwnerCleared returns if the "owner" field was cleared in this mutation.
func (*HostFileMutation) Path ¶ added in v0.0.5
func (m *HostFileMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*HostFileMutation) Permissions ¶ added in v0.0.5
func (m *HostFileMutation) Permissions() (r string, exists bool)
Permissions returns the value of the "permissions" field in the mutation.
func (*HostFileMutation) PermissionsCleared ¶ added in v0.0.5
func (m *HostFileMutation) PermissionsCleared() bool
PermissionsCleared returns if the "permissions" field was cleared in this mutation.
func (*HostFileMutation) RemovedEdges ¶ added in v0.0.5
func (m *HostFileMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HostFileMutation) RemovedIDs ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) ResetContent ¶ added in v0.0.5
func (m *HostFileMutation) ResetContent()
ResetContent resets all changes to the "content" field.
func (*HostFileMutation) ResetCreatedAt ¶ added in v0.0.5
func (m *HostFileMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*HostFileMutation) ResetEdge ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) ResetField ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) ResetGroup ¶ added in v0.0.5
func (m *HostFileMutation) ResetGroup()
ResetGroup resets all changes to the "group" field.
func (*HostFileMutation) ResetHash ¶ added in v0.0.5
func (m *HostFileMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*HostFileMutation) ResetHost ¶ added in v0.0.5
func (m *HostFileMutation) ResetHost()
ResetHost resets all changes to the "host" edge.
func (*HostFileMutation) ResetLastModifiedAt ¶ added in v0.0.5
func (m *HostFileMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*HostFileMutation) ResetOwner ¶ added in v0.0.5
func (m *HostFileMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*HostFileMutation) ResetPath ¶ added in v0.0.5
func (m *HostFileMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*HostFileMutation) ResetPermissions ¶ added in v0.0.5
func (m *HostFileMutation) ResetPermissions()
ResetPermissions resets all changes to the "permissions" field.
func (*HostFileMutation) ResetSize ¶ added in v0.0.5
func (m *HostFileMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*HostFileMutation) ResetTask ¶ added in v0.0.5
func (m *HostFileMutation) ResetTask()
ResetTask resets all changes to the "task" edge.
func (*HostFileMutation) SetContent ¶ added in v0.0.5
func (m *HostFileMutation) SetContent(b []byte)
SetContent sets the "content" field.
func (*HostFileMutation) SetCreatedAt ¶ added in v0.0.5
func (m *HostFileMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*HostFileMutation) SetField ¶ added in v0.0.5
func (m *HostFileMutation) 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 (*HostFileMutation) SetGroup ¶ added in v0.0.5
func (m *HostFileMutation) SetGroup(s string)
SetGroup sets the "group" field.
func (*HostFileMutation) SetHash ¶ added in v0.0.5
func (m *HostFileMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*HostFileMutation) SetHostID ¶ added in v0.0.5
func (m *HostFileMutation) SetHostID(id int)
SetHostID sets the "host" edge to the Host entity by id.
func (*HostFileMutation) SetLastModifiedAt ¶ added in v0.0.5
func (m *HostFileMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostFileMutation) SetOp ¶ added in v0.0.5
func (m *HostFileMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*HostFileMutation) SetOwner ¶ added in v0.0.5
func (m *HostFileMutation) SetOwner(s string)
SetOwner sets the "owner" field.
func (*HostFileMutation) SetPath ¶ added in v0.0.5
func (m *HostFileMutation) SetPath(s string)
SetPath sets the "path" field.
func (*HostFileMutation) SetPermissions ¶ added in v0.0.5
func (m *HostFileMutation) SetPermissions(s string)
SetPermissions sets the "permissions" field.
func (*HostFileMutation) SetSize ¶ added in v0.0.5
func (m *HostFileMutation) SetSize(i int)
SetSize sets the "size" field.
func (*HostFileMutation) SetTaskID ¶ added in v0.0.5
func (m *HostFileMutation) SetTaskID(id int)
SetTaskID sets the "task" edge to the Task entity by id.
func (*HostFileMutation) Size ¶ added in v0.0.5
func (m *HostFileMutation) Size() (r int, exists bool)
Size returns the value of the "size" field in the mutation.
func (*HostFileMutation) TaskCleared ¶ added in v0.0.5
func (m *HostFileMutation) TaskCleared() bool
TaskCleared reports if the "task" edge to the Task entity was cleared.
func (*HostFileMutation) TaskID ¶ added in v0.0.5
func (m *HostFileMutation) TaskID() (id int, exists bool)
TaskID returns the "task" edge ID in the mutation.
func (*HostFileMutation) TaskIDs ¶ added in v0.0.5
func (m *HostFileMutation) TaskIDs() (ids []int)
TaskIDs returns the "task" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TaskID instead. It exists only for internal usage by the builders.
func (HostFileMutation) Tx ¶ added in v0.0.5
func (m HostFileMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HostFileMutation) Type ¶ added in v0.0.5
func (m *HostFileMutation) Type() string
Type returns the node type of this mutation (HostFile).
func (*HostFileMutation) Where ¶ added in v0.0.5
func (m *HostFileMutation) Where(ps ...predicate.HostFile)
Where appends a list predicates to the HostFileMutation builder.
func (*HostFileMutation) WhereP ¶ added in v0.0.5
func (m *HostFileMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HostFileMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type HostFileOrder ¶ added in v0.0.5
type HostFileOrder struct { Direction OrderDirection `json:"direction"` Field *HostFileOrderField `json:"field"` }
HostFileOrder defines the ordering of HostFile.
type HostFileOrderField ¶ added in v0.0.5
type HostFileOrderField struct { // Value extracts the ordering value from the given HostFile. Value func(*HostFile) (ent.Value, error) // contains filtered or unexported fields }
HostFileOrderField defines the ordering field of HostFile.
func (HostFileOrderField) MarshalGQL ¶ added in v0.0.5
func (f HostFileOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (HostFileOrderField) String ¶ added in v0.0.5
func (f HostFileOrderField) String() string
String implement fmt.Stringer interface.
func (*HostFileOrderField) UnmarshalGQL ¶ added in v0.0.5
func (f *HostFileOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type HostFilePaginateOption ¶ added in v0.0.5
type HostFilePaginateOption func(*hostfilePager) error
HostFilePaginateOption enables pagination customization.
func WithHostFileFilter ¶ added in v0.0.5
func WithHostFileFilter(filter func(*HostFileQuery) (*HostFileQuery, error)) HostFilePaginateOption
WithHostFileFilter configures pagination filter.
func WithHostFileOrder ¶ added in v0.0.5
func WithHostFileOrder(order *HostFileOrder) HostFilePaginateOption
WithHostFileOrder configures pagination ordering.
type HostFileQuery ¶ added in v0.0.5
type HostFileQuery struct {
// contains filtered or unexported fields
}
HostFileQuery is the builder for querying HostFile entities.
func (*HostFileQuery) Aggregate ¶ added in v0.0.5
func (hfq *HostFileQuery) Aggregate(fns ...AggregateFunc) *HostFileSelect
Aggregate returns a HostFileSelect configured with the given aggregations.
func (*HostFileQuery) All ¶ added in v0.0.5
func (hfq *HostFileQuery) All(ctx context.Context) ([]*HostFile, error)
All executes the query and returns a list of HostFiles.
func (*HostFileQuery) AllX ¶ added in v0.0.5
func (hfq *HostFileQuery) AllX(ctx context.Context) []*HostFile
AllX is like All, but panics if an error occurs.
func (*HostFileQuery) Clone ¶ added in v0.0.5
func (hfq *HostFileQuery) Clone() *HostFileQuery
Clone returns a duplicate of the HostFileQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HostFileQuery) CollectFields ¶ added in v0.0.5
func (hf *HostFileQuery) CollectFields(ctx context.Context, satisfies ...string) (*HostFileQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*HostFileQuery) Count ¶ added in v0.0.5
func (hfq *HostFileQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*HostFileQuery) CountX ¶ added in v0.0.5
func (hfq *HostFileQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*HostFileQuery) Exist ¶ added in v0.0.5
func (hfq *HostFileQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*HostFileQuery) ExistX ¶ added in v0.0.5
func (hfq *HostFileQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*HostFileQuery) First ¶ added in v0.0.5
func (hfq *HostFileQuery) First(ctx context.Context) (*HostFile, error)
First returns the first HostFile entity from the query. Returns a *NotFoundError when no HostFile was found.
func (*HostFileQuery) FirstID ¶ added in v0.0.5
func (hfq *HostFileQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HostFile ID from the query. Returns a *NotFoundError when no HostFile ID was found.
func (*HostFileQuery) FirstIDX ¶ added in v0.0.5
func (hfq *HostFileQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*HostFileQuery) FirstX ¶ added in v0.0.5
func (hfq *HostFileQuery) FirstX(ctx context.Context) *HostFile
FirstX is like First, but panics if an error occurs.
func (*HostFileQuery) GroupBy ¶ added in v0.0.5
func (hfq *HostFileQuery) GroupBy(field string, fields ...string) *HostFileGroupBy
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.HostFile.Query(). GroupBy(hostfile.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HostFileQuery) IDs ¶ added in v0.0.5
func (hfq *HostFileQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HostFile IDs.
func (*HostFileQuery) IDsX ¶ added in v0.0.5
func (hfq *HostFileQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*HostFileQuery) Limit ¶ added in v0.0.5
func (hfq *HostFileQuery) Limit(limit int) *HostFileQuery
Limit the number of records to be returned by this query.
func (*HostFileQuery) Offset ¶ added in v0.0.5
func (hfq *HostFileQuery) Offset(offset int) *HostFileQuery
Offset to start from.
func (*HostFileQuery) Only ¶ added in v0.0.5
func (hfq *HostFileQuery) Only(ctx context.Context) (*HostFile, error)
Only returns a single HostFile entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HostFile entity is found. Returns a *NotFoundError when no HostFile entities are found.
func (*HostFileQuery) OnlyID ¶ added in v0.0.5
func (hfq *HostFileQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HostFile ID in the query. Returns a *NotSingularError when more than one HostFile ID is found. Returns a *NotFoundError when no entities are found.
func (*HostFileQuery) OnlyIDX ¶ added in v0.0.5
func (hfq *HostFileQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*HostFileQuery) OnlyX ¶ added in v0.0.5
func (hfq *HostFileQuery) OnlyX(ctx context.Context) *HostFile
OnlyX is like Only, but panics if an error occurs.
func (*HostFileQuery) Order ¶ added in v0.0.5
func (hfq *HostFileQuery) Order(o ...hostfile.OrderOption) *HostFileQuery
Order specifies how the records should be ordered.
func (*HostFileQuery) Paginate ¶ added in v0.0.5
func (hf *HostFileQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HostFilePaginateOption, ) (*HostFileConnection, error)
Paginate executes the query and returns a relay based cursor connection to HostFile.
func (*HostFileQuery) QueryHost ¶ added in v0.0.5
func (hfq *HostFileQuery) QueryHost() *HostQuery
QueryHost chains the current query on the "host" edge.
func (*HostFileQuery) QueryTask ¶ added in v0.0.5
func (hfq *HostFileQuery) QueryTask() *TaskQuery
QueryTask chains the current query on the "task" edge.
func (*HostFileQuery) Select ¶ added in v0.0.5
func (hfq *HostFileQuery) Select(fields ...string) *HostFileSelect
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.HostFile.Query(). Select(hostfile.FieldCreatedAt). Scan(ctx, &v)
func (*HostFileQuery) Unique ¶ added in v0.0.5
func (hfq *HostFileQuery) Unique(unique bool) *HostFileQuery
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 (*HostFileQuery) Where ¶ added in v0.0.5
func (hfq *HostFileQuery) Where(ps ...predicate.HostFile) *HostFileQuery
Where adds a new predicate for the HostFileQuery builder.
func (*HostFileQuery) WithHost ¶ added in v0.0.5
func (hfq *HostFileQuery) WithHost(opts ...func(*HostQuery)) *HostFileQuery
WithHost tells the query-builder to eager-load the nodes that are connected to the "host" edge. The optional arguments are used to configure the query builder of the edge.
func (*HostFileQuery) WithTask ¶ added in v0.0.5
func (hfq *HostFileQuery) WithTask(opts ...func(*TaskQuery)) *HostFileQuery
WithTask tells the query-builder to eager-load the nodes that are connected to the "task" edge. The optional arguments are used to configure the query builder of the edge.
type HostFileSelect ¶ added in v0.0.5
type HostFileSelect struct { *HostFileQuery // contains filtered or unexported fields }
HostFileSelect is the builder for selecting fields of HostFile entities.
func (*HostFileSelect) Aggregate ¶ added in v0.0.5
func (hfs *HostFileSelect) Aggregate(fns ...AggregateFunc) *HostFileSelect
Aggregate adds the given aggregation functions to the selector query.
func (*HostFileSelect) Bool ¶ added in v0.0.5
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HostFileSelect) Bools ¶ added in v0.0.5
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HostFileSelect) BoolsX ¶ added in v0.0.5
BoolsX is like Bools, but panics if an error occurs.
func (*HostFileSelect) Float64 ¶ added in v0.0.5
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HostFileSelect) Float64X ¶ added in v0.0.5
Float64X is like Float64, but panics if an error occurs.
func (*HostFileSelect) Float64s ¶ added in v0.0.5
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HostFileSelect) Float64sX ¶ added in v0.0.5
Float64sX is like Float64s, but panics if an error occurs.
func (*HostFileSelect) Int ¶ added in v0.0.5
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HostFileSelect) Ints ¶ added in v0.0.5
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HostFileSelect) Scan ¶ added in v0.0.5
func (hfs *HostFileSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HostFileSelect) String ¶ added in v0.0.5
String returns a single string from a selector. It is only allowed when selecting one field.
func (*HostFileSelect) StringX ¶ added in v0.0.5
StringX is like String, but panics if an error occurs.
type HostFileUpdate ¶ added in v0.0.5
type HostFileUpdate struct {
// contains filtered or unexported fields
}
HostFileUpdate is the builder for updating HostFile entities.
func (*HostFileUpdate) AddSize ¶ added in v0.0.5
func (hfu *HostFileUpdate) AddSize(i int) *HostFileUpdate
AddSize adds i to the "size" field.
func (*HostFileUpdate) ClearContent ¶ added in v0.0.5
func (hfu *HostFileUpdate) ClearContent() *HostFileUpdate
ClearContent clears the value of the "content" field.
func (*HostFileUpdate) ClearGroup ¶ added in v0.0.5
func (hfu *HostFileUpdate) ClearGroup() *HostFileUpdate
ClearGroup clears the value of the "group" field.
func (*HostFileUpdate) ClearHash ¶ added in v0.0.5
func (hfu *HostFileUpdate) ClearHash() *HostFileUpdate
ClearHash clears the value of the "hash" field.
func (*HostFileUpdate) ClearHost ¶ added in v0.0.5
func (hfu *HostFileUpdate) ClearHost() *HostFileUpdate
ClearHost clears the "host" edge to the Host entity.
func (*HostFileUpdate) ClearOwner ¶ added in v0.0.5
func (hfu *HostFileUpdate) ClearOwner() *HostFileUpdate
ClearOwner clears the value of the "owner" field.
func (*HostFileUpdate) ClearPermissions ¶ added in v0.0.5
func (hfu *HostFileUpdate) ClearPermissions() *HostFileUpdate
ClearPermissions clears the value of the "permissions" field.
func (*HostFileUpdate) ClearTask ¶ added in v0.0.5
func (hfu *HostFileUpdate) ClearTask() *HostFileUpdate
ClearTask clears the "task" edge to the Task entity.
func (*HostFileUpdate) Exec ¶ added in v0.0.5
func (hfu *HostFileUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HostFileUpdate) ExecX ¶ added in v0.0.5
func (hfu *HostFileUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostFileUpdate) Mutation ¶ added in v0.0.5
func (hfu *HostFileUpdate) Mutation() *HostFileMutation
Mutation returns the HostFileMutation object of the builder.
func (*HostFileUpdate) Save ¶ added in v0.0.5
func (hfu *HostFileUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HostFileUpdate) SaveX ¶ added in v0.0.5
func (hfu *HostFileUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HostFileUpdate) SetContent ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetContent(b []byte) *HostFileUpdate
SetContent sets the "content" field.
func (*HostFileUpdate) SetGroup ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetGroup(s string) *HostFileUpdate
SetGroup sets the "group" field.
func (*HostFileUpdate) SetHash ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetHash(s string) *HostFileUpdate
SetHash sets the "hash" field.
func (*HostFileUpdate) SetHost ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetHost(h *Host) *HostFileUpdate
SetHost sets the "host" edge to the Host entity.
func (*HostFileUpdate) SetHostID ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetHostID(id int) *HostFileUpdate
SetHostID sets the "host" edge to the Host entity by ID.
func (*HostFileUpdate) SetLastModifiedAt ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetLastModifiedAt(t time.Time) *HostFileUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostFileUpdate) SetNillableGroup ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetNillableGroup(s *string) *HostFileUpdate
SetNillableGroup sets the "group" field if the given value is not nil.
func (*HostFileUpdate) SetNillableHash ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetNillableHash(s *string) *HostFileUpdate
SetNillableHash sets the "hash" field if the given value is not nil.
func (*HostFileUpdate) SetNillableOwner ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetNillableOwner(s *string) *HostFileUpdate
SetNillableOwner sets the "owner" field if the given value is not nil.
func (*HostFileUpdate) SetNillablePermissions ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetNillablePermissions(s *string) *HostFileUpdate
SetNillablePermissions sets the "permissions" field if the given value is not nil.
func (*HostFileUpdate) SetNillableSize ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetNillableSize(i *int) *HostFileUpdate
SetNillableSize sets the "size" field if the given value is not nil.
func (*HostFileUpdate) SetOwner ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetOwner(s string) *HostFileUpdate
SetOwner sets the "owner" field.
func (*HostFileUpdate) SetPath ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetPath(s string) *HostFileUpdate
SetPath sets the "path" field.
func (*HostFileUpdate) SetPermissions ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetPermissions(s string) *HostFileUpdate
SetPermissions sets the "permissions" field.
func (*HostFileUpdate) SetSize ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetSize(i int) *HostFileUpdate
SetSize sets the "size" field.
func (*HostFileUpdate) SetTask ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetTask(t *Task) *HostFileUpdate
SetTask sets the "task" edge to the Task entity.
func (*HostFileUpdate) SetTaskID ¶ added in v0.0.5
func (hfu *HostFileUpdate) SetTaskID(id int) *HostFileUpdate
SetTaskID sets the "task" edge to the Task entity by ID.
func (*HostFileUpdate) Where ¶ added in v0.0.5
func (hfu *HostFileUpdate) Where(ps ...predicate.HostFile) *HostFileUpdate
Where appends a list predicates to the HostFileUpdate builder.
type HostFileUpdateOne ¶ added in v0.0.5
type HostFileUpdateOne struct {
// contains filtered or unexported fields
}
HostFileUpdateOne is the builder for updating a single HostFile entity.
func (*HostFileUpdateOne) AddSize ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) AddSize(i int) *HostFileUpdateOne
AddSize adds i to the "size" field.
func (*HostFileUpdateOne) ClearContent ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ClearContent() *HostFileUpdateOne
ClearContent clears the value of the "content" field.
func (*HostFileUpdateOne) ClearGroup ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ClearGroup() *HostFileUpdateOne
ClearGroup clears the value of the "group" field.
func (*HostFileUpdateOne) ClearHash ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ClearHash() *HostFileUpdateOne
ClearHash clears the value of the "hash" field.
func (*HostFileUpdateOne) ClearHost ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ClearHost() *HostFileUpdateOne
ClearHost clears the "host" edge to the Host entity.
func (*HostFileUpdateOne) ClearOwner ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ClearOwner() *HostFileUpdateOne
ClearOwner clears the value of the "owner" field.
func (*HostFileUpdateOne) ClearPermissions ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ClearPermissions() *HostFileUpdateOne
ClearPermissions clears the value of the "permissions" field.
func (*HostFileUpdateOne) ClearTask ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ClearTask() *HostFileUpdateOne
ClearTask clears the "task" edge to the Task entity.
func (*HostFileUpdateOne) Exec ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HostFileUpdateOne) ExecX ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostFileUpdateOne) Mutation ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) Mutation() *HostFileMutation
Mutation returns the HostFileMutation object of the builder.
func (*HostFileUpdateOne) Save ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) Save(ctx context.Context) (*HostFile, error)
Save executes the query and returns the updated HostFile entity.
func (*HostFileUpdateOne) SaveX ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SaveX(ctx context.Context) *HostFile
SaveX is like Save, but panics if an error occurs.
func (*HostFileUpdateOne) Select ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) Select(field string, fields ...string) *HostFileUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HostFileUpdateOne) SetContent ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetContent(b []byte) *HostFileUpdateOne
SetContent sets the "content" field.
func (*HostFileUpdateOne) SetGroup ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetGroup(s string) *HostFileUpdateOne
SetGroup sets the "group" field.
func (*HostFileUpdateOne) SetHash ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetHash(s string) *HostFileUpdateOne
SetHash sets the "hash" field.
func (*HostFileUpdateOne) SetHost ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetHost(h *Host) *HostFileUpdateOne
SetHost sets the "host" edge to the Host entity.
func (*HostFileUpdateOne) SetHostID ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetHostID(id int) *HostFileUpdateOne
SetHostID sets the "host" edge to the Host entity by ID.
func (*HostFileUpdateOne) SetLastModifiedAt ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetLastModifiedAt(t time.Time) *HostFileUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostFileUpdateOne) SetNillableGroup ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetNillableGroup(s *string) *HostFileUpdateOne
SetNillableGroup sets the "group" field if the given value is not nil.
func (*HostFileUpdateOne) SetNillableHash ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetNillableHash(s *string) *HostFileUpdateOne
SetNillableHash sets the "hash" field if the given value is not nil.
func (*HostFileUpdateOne) SetNillableOwner ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetNillableOwner(s *string) *HostFileUpdateOne
SetNillableOwner sets the "owner" field if the given value is not nil.
func (*HostFileUpdateOne) SetNillablePermissions ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetNillablePermissions(s *string) *HostFileUpdateOne
SetNillablePermissions sets the "permissions" field if the given value is not nil.
func (*HostFileUpdateOne) SetNillableSize ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetNillableSize(i *int) *HostFileUpdateOne
SetNillableSize sets the "size" field if the given value is not nil.
func (*HostFileUpdateOne) SetOwner ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetOwner(s string) *HostFileUpdateOne
SetOwner sets the "owner" field.
func (*HostFileUpdateOne) SetPath ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetPath(s string) *HostFileUpdateOne
SetPath sets the "path" field.
func (*HostFileUpdateOne) SetPermissions ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetPermissions(s string) *HostFileUpdateOne
SetPermissions sets the "permissions" field.
func (*HostFileUpdateOne) SetSize ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetSize(i int) *HostFileUpdateOne
SetSize sets the "size" field.
func (*HostFileUpdateOne) SetTask ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetTask(t *Task) *HostFileUpdateOne
SetTask sets the "task" edge to the Task entity.
func (*HostFileUpdateOne) SetTaskID ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) SetTaskID(id int) *HostFileUpdateOne
SetTaskID sets the "task" edge to the Task entity by ID.
func (*HostFileUpdateOne) Where ¶ added in v0.0.5
func (hfuo *HostFileUpdateOne) Where(ps ...predicate.HostFile) *HostFileUpdateOne
Where appends a list predicates to the HostFileUpdate builder.
type HostFileUpsert ¶ added in v0.0.5
HostFileUpsert is the "OnConflict" setter.
func (*HostFileUpsert) AddSize ¶ added in v0.0.5
func (u *HostFileUpsert) AddSize(v int) *HostFileUpsert
AddSize adds v to the "size" field.
func (*HostFileUpsert) ClearContent ¶ added in v0.0.5
func (u *HostFileUpsert) ClearContent() *HostFileUpsert
ClearContent clears the value of the "content" field.
func (*HostFileUpsert) ClearGroup ¶ added in v0.0.5
func (u *HostFileUpsert) ClearGroup() *HostFileUpsert
ClearGroup clears the value of the "group" field.
func (*HostFileUpsert) ClearHash ¶ added in v0.0.5
func (u *HostFileUpsert) ClearHash() *HostFileUpsert
ClearHash clears the value of the "hash" field.
func (*HostFileUpsert) ClearOwner ¶ added in v0.0.5
func (u *HostFileUpsert) ClearOwner() *HostFileUpsert
ClearOwner clears the value of the "owner" field.
func (*HostFileUpsert) ClearPermissions ¶ added in v0.0.5
func (u *HostFileUpsert) ClearPermissions() *HostFileUpsert
ClearPermissions clears the value of the "permissions" field.
func (*HostFileUpsert) SetContent ¶ added in v0.0.5
func (u *HostFileUpsert) SetContent(v []byte) *HostFileUpsert
SetContent sets the "content" field.
func (*HostFileUpsert) SetGroup ¶ added in v0.0.5
func (u *HostFileUpsert) SetGroup(v string) *HostFileUpsert
SetGroup sets the "group" field.
func (*HostFileUpsert) SetHash ¶ added in v0.0.5
func (u *HostFileUpsert) SetHash(v string) *HostFileUpsert
SetHash sets the "hash" field.
func (*HostFileUpsert) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostFileUpsert) SetLastModifiedAt(v time.Time) *HostFileUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostFileUpsert) SetOwner ¶ added in v0.0.5
func (u *HostFileUpsert) SetOwner(v string) *HostFileUpsert
SetOwner sets the "owner" field.
func (*HostFileUpsert) SetPath ¶ added in v0.0.5
func (u *HostFileUpsert) SetPath(v string) *HostFileUpsert
SetPath sets the "path" field.
func (*HostFileUpsert) SetPermissions ¶ added in v0.0.5
func (u *HostFileUpsert) SetPermissions(v string) *HostFileUpsert
SetPermissions sets the "permissions" field.
func (*HostFileUpsert) SetSize ¶ added in v0.0.5
func (u *HostFileUpsert) SetSize(v int) *HostFileUpsert
SetSize sets the "size" field.
func (*HostFileUpsert) UpdateContent ¶ added in v0.0.5
func (u *HostFileUpsert) UpdateContent() *HostFileUpsert
UpdateContent sets the "content" field to the value that was provided on create.
func (*HostFileUpsert) UpdateGroup ¶ added in v0.0.5
func (u *HostFileUpsert) UpdateGroup() *HostFileUpsert
UpdateGroup sets the "group" field to the value that was provided on create.
func (*HostFileUpsert) UpdateHash ¶ added in v0.0.5
func (u *HostFileUpsert) UpdateHash() *HostFileUpsert
UpdateHash sets the "hash" field to the value that was provided on create.
func (*HostFileUpsert) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostFileUpsert) UpdateLastModifiedAt() *HostFileUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostFileUpsert) UpdateOwner ¶ added in v0.0.5
func (u *HostFileUpsert) UpdateOwner() *HostFileUpsert
UpdateOwner sets the "owner" field to the value that was provided on create.
func (*HostFileUpsert) UpdatePath ¶ added in v0.0.5
func (u *HostFileUpsert) UpdatePath() *HostFileUpsert
UpdatePath sets the "path" field to the value that was provided on create.
func (*HostFileUpsert) UpdatePermissions ¶ added in v0.0.5
func (u *HostFileUpsert) UpdatePermissions() *HostFileUpsert
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*HostFileUpsert) UpdateSize ¶ added in v0.0.5
func (u *HostFileUpsert) UpdateSize() *HostFileUpsert
UpdateSize sets the "size" field to the value that was provided on create.
type HostFileUpsertBulk ¶ added in v0.0.5
type HostFileUpsertBulk struct {
// contains filtered or unexported fields
}
HostFileUpsertBulk is the builder for "upsert"-ing a bulk of HostFile nodes.
func (*HostFileUpsertBulk) AddSize ¶ added in v0.0.5
func (u *HostFileUpsertBulk) AddSize(v int) *HostFileUpsertBulk
AddSize adds v to the "size" field.
func (*HostFileUpsertBulk) ClearContent ¶ added in v0.0.5
func (u *HostFileUpsertBulk) ClearContent() *HostFileUpsertBulk
ClearContent clears the value of the "content" field.
func (*HostFileUpsertBulk) ClearGroup ¶ added in v0.0.5
func (u *HostFileUpsertBulk) ClearGroup() *HostFileUpsertBulk
ClearGroup clears the value of the "group" field.
func (*HostFileUpsertBulk) ClearHash ¶ added in v0.0.5
func (u *HostFileUpsertBulk) ClearHash() *HostFileUpsertBulk
ClearHash clears the value of the "hash" field.
func (*HostFileUpsertBulk) ClearOwner ¶ added in v0.0.5
func (u *HostFileUpsertBulk) ClearOwner() *HostFileUpsertBulk
ClearOwner clears the value of the "owner" field.
func (*HostFileUpsertBulk) ClearPermissions ¶ added in v0.0.5
func (u *HostFileUpsertBulk) ClearPermissions() *HostFileUpsertBulk
ClearPermissions clears the value of the "permissions" field.
func (*HostFileUpsertBulk) DoNothing ¶ added in v0.0.5
func (u *HostFileUpsertBulk) DoNothing() *HostFileUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*HostFileUpsertBulk) Exec ¶ added in v0.0.5
func (u *HostFileUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HostFileUpsertBulk) ExecX ¶ added in v0.0.5
func (u *HostFileUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostFileUpsertBulk) Ignore ¶ added in v0.0.5
func (u *HostFileUpsertBulk) Ignore() *HostFileUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HostFile.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*HostFileUpsertBulk) SetContent ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetContent(v []byte) *HostFileUpsertBulk
SetContent sets the "content" field.
func (*HostFileUpsertBulk) SetGroup ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetGroup(v string) *HostFileUpsertBulk
SetGroup sets the "group" field.
func (*HostFileUpsertBulk) SetHash ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetHash(v string) *HostFileUpsertBulk
SetHash sets the "hash" field.
func (*HostFileUpsertBulk) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetLastModifiedAt(v time.Time) *HostFileUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostFileUpsertBulk) SetOwner ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetOwner(v string) *HostFileUpsertBulk
SetOwner sets the "owner" field.
func (*HostFileUpsertBulk) SetPath ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetPath(v string) *HostFileUpsertBulk
SetPath sets the "path" field.
func (*HostFileUpsertBulk) SetPermissions ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetPermissions(v string) *HostFileUpsertBulk
SetPermissions sets the "permissions" field.
func (*HostFileUpsertBulk) SetSize ¶ added in v0.0.5
func (u *HostFileUpsertBulk) SetSize(v int) *HostFileUpsertBulk
SetSize sets the "size" field.
func (*HostFileUpsertBulk) Update ¶ added in v0.0.5
func (u *HostFileUpsertBulk) Update(set func(*HostFileUpsert)) *HostFileUpsertBulk
Update allows overriding fields `UPDATE` values. See the HostFileCreateBulk.OnConflict documentation for more info.
func (*HostFileUpsertBulk) UpdateContent ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdateContent() *HostFileUpsertBulk
UpdateContent sets the "content" field to the value that was provided on create.
func (*HostFileUpsertBulk) UpdateGroup ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdateGroup() *HostFileUpsertBulk
UpdateGroup sets the "group" field to the value that was provided on create.
func (*HostFileUpsertBulk) UpdateHash ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdateHash() *HostFileUpsertBulk
UpdateHash sets the "hash" field to the value that was provided on create.
func (*HostFileUpsertBulk) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdateLastModifiedAt() *HostFileUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostFileUpsertBulk) UpdateNewValues ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdateNewValues() *HostFileUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HostFile.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*HostFileUpsertBulk) UpdateOwner ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdateOwner() *HostFileUpsertBulk
UpdateOwner sets the "owner" field to the value that was provided on create.
func (*HostFileUpsertBulk) UpdatePath ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdatePath() *HostFileUpsertBulk
UpdatePath sets the "path" field to the value that was provided on create.
func (*HostFileUpsertBulk) UpdatePermissions ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdatePermissions() *HostFileUpsertBulk
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*HostFileUpsertBulk) UpdateSize ¶ added in v0.0.5
func (u *HostFileUpsertBulk) UpdateSize() *HostFileUpsertBulk
UpdateSize sets the "size" field to the value that was provided on create.
type HostFileUpsertOne ¶ added in v0.0.5
type HostFileUpsertOne struct {
// contains filtered or unexported fields
}
HostFileUpsertOne is the builder for "upsert"-ing
one HostFile node.
func (*HostFileUpsertOne) AddSize ¶ added in v0.0.5
func (u *HostFileUpsertOne) AddSize(v int) *HostFileUpsertOne
AddSize adds v to the "size" field.
func (*HostFileUpsertOne) ClearContent ¶ added in v0.0.5
func (u *HostFileUpsertOne) ClearContent() *HostFileUpsertOne
ClearContent clears the value of the "content" field.
func (*HostFileUpsertOne) ClearGroup ¶ added in v0.0.5
func (u *HostFileUpsertOne) ClearGroup() *HostFileUpsertOne
ClearGroup clears the value of the "group" field.
func (*HostFileUpsertOne) ClearHash ¶ added in v0.0.5
func (u *HostFileUpsertOne) ClearHash() *HostFileUpsertOne
ClearHash clears the value of the "hash" field.
func (*HostFileUpsertOne) ClearOwner ¶ added in v0.0.5
func (u *HostFileUpsertOne) ClearOwner() *HostFileUpsertOne
ClearOwner clears the value of the "owner" field.
func (*HostFileUpsertOne) ClearPermissions ¶ added in v0.0.5
func (u *HostFileUpsertOne) ClearPermissions() *HostFileUpsertOne
ClearPermissions clears the value of the "permissions" field.
func (*HostFileUpsertOne) DoNothing ¶ added in v0.0.5
func (u *HostFileUpsertOne) DoNothing() *HostFileUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*HostFileUpsertOne) Exec ¶ added in v0.0.5
func (u *HostFileUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*HostFileUpsertOne) ExecX ¶ added in v0.0.5
func (u *HostFileUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostFileUpsertOne) ID ¶ added in v0.0.5
func (u *HostFileUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*HostFileUpsertOne) IDX ¶ added in v0.0.5
func (u *HostFileUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*HostFileUpsertOne) Ignore ¶ added in v0.0.5
func (u *HostFileUpsertOne) Ignore() *HostFileUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HostFile.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*HostFileUpsertOne) SetContent ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetContent(v []byte) *HostFileUpsertOne
SetContent sets the "content" field.
func (*HostFileUpsertOne) SetGroup ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetGroup(v string) *HostFileUpsertOne
SetGroup sets the "group" field.
func (*HostFileUpsertOne) SetHash ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetHash(v string) *HostFileUpsertOne
SetHash sets the "hash" field.
func (*HostFileUpsertOne) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetLastModifiedAt(v time.Time) *HostFileUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostFileUpsertOne) SetOwner ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetOwner(v string) *HostFileUpsertOne
SetOwner sets the "owner" field.
func (*HostFileUpsertOne) SetPath ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetPath(v string) *HostFileUpsertOne
SetPath sets the "path" field.
func (*HostFileUpsertOne) SetPermissions ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetPermissions(v string) *HostFileUpsertOne
SetPermissions sets the "permissions" field.
func (*HostFileUpsertOne) SetSize ¶ added in v0.0.5
func (u *HostFileUpsertOne) SetSize(v int) *HostFileUpsertOne
SetSize sets the "size" field.
func (*HostFileUpsertOne) Update ¶ added in v0.0.5
func (u *HostFileUpsertOne) Update(set func(*HostFileUpsert)) *HostFileUpsertOne
Update allows overriding fields `UPDATE` values. See the HostFileCreate.OnConflict documentation for more info.
func (*HostFileUpsertOne) UpdateContent ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdateContent() *HostFileUpsertOne
UpdateContent sets the "content" field to the value that was provided on create.
func (*HostFileUpsertOne) UpdateGroup ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdateGroup() *HostFileUpsertOne
UpdateGroup sets the "group" field to the value that was provided on create.
func (*HostFileUpsertOne) UpdateHash ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdateHash() *HostFileUpsertOne
UpdateHash sets the "hash" field to the value that was provided on create.
func (*HostFileUpsertOne) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdateLastModifiedAt() *HostFileUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostFileUpsertOne) UpdateNewValues ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdateNewValues() *HostFileUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HostFile.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*HostFileUpsertOne) UpdateOwner ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdateOwner() *HostFileUpsertOne
UpdateOwner sets the "owner" field to the value that was provided on create.
func (*HostFileUpsertOne) UpdatePath ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdatePath() *HostFileUpsertOne
UpdatePath sets the "path" field to the value that was provided on create.
func (*HostFileUpsertOne) UpdatePermissions ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdatePermissions() *HostFileUpsertOne
UpdatePermissions sets the "permissions" field to the value that was provided on create.
func (*HostFileUpsertOne) UpdateSize ¶ added in v0.0.5
func (u *HostFileUpsertOne) UpdateSize() *HostFileUpsertOne
UpdateSize sets the "size" field to the value that was provided on create.
type HostFileWhereInput ¶ added in v0.0.5
type HostFileWhereInput struct { Predicates []predicate.HostFile `json:"-"` Not *HostFileWhereInput `json:"not,omitempty"` Or []*HostFileWhereInput `json:"or,omitempty"` And []*HostFileWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "path" field predicates. Path *string `json:"path,omitempty"` PathNEQ *string `json:"pathNEQ,omitempty"` PathIn []string `json:"pathIn,omitempty"` PathNotIn []string `json:"pathNotIn,omitempty"` PathGT *string `json:"pathGT,omitempty"` PathGTE *string `json:"pathGTE,omitempty"` PathLT *string `json:"pathLT,omitempty"` PathLTE *string `json:"pathLTE,omitempty"` PathContains *string `json:"pathContains,omitempty"` PathHasPrefix *string `json:"pathHasPrefix,omitempty"` PathHasSuffix *string `json:"pathHasSuffix,omitempty"` PathEqualFold *string `json:"pathEqualFold,omitempty"` PathContainsFold *string `json:"pathContainsFold,omitempty"` // "owner" field predicates. Owner *string `json:"owner,omitempty"` OwnerNEQ *string `json:"ownerNEQ,omitempty"` OwnerIn []string `json:"ownerIn,omitempty"` OwnerNotIn []string `json:"ownerNotIn,omitempty"` OwnerGT *string `json:"ownerGT,omitempty"` OwnerGTE *string `json:"ownerGTE,omitempty"` OwnerLT *string `json:"ownerLT,omitempty"` OwnerLTE *string `json:"ownerLTE,omitempty"` OwnerContains *string `json:"ownerContains,omitempty"` OwnerHasPrefix *string `json:"ownerHasPrefix,omitempty"` OwnerHasSuffix *string `json:"ownerHasSuffix,omitempty"` OwnerIsNil bool `json:"ownerIsNil,omitempty"` OwnerNotNil bool `json:"ownerNotNil,omitempty"` OwnerEqualFold *string `json:"ownerEqualFold,omitempty"` OwnerContainsFold *string `json:"ownerContainsFold,omitempty"` // "group" field predicates. Group *string `json:"group,omitempty"` GroupNEQ *string `json:"groupNEQ,omitempty"` GroupIn []string `json:"groupIn,omitempty"` GroupNotIn []string `json:"groupNotIn,omitempty"` GroupGT *string `json:"groupGT,omitempty"` GroupGTE *string `json:"groupGTE,omitempty"` GroupLT *string `json:"groupLT,omitempty"` GroupLTE *string `json:"groupLTE,omitempty"` GroupContains *string `json:"groupContains,omitempty"` GroupHasPrefix *string `json:"groupHasPrefix,omitempty"` GroupHasSuffix *string `json:"groupHasSuffix,omitempty"` GroupIsNil bool `json:"groupIsNil,omitempty"` GroupNotNil bool `json:"groupNotNil,omitempty"` GroupEqualFold *string `json:"groupEqualFold,omitempty"` GroupContainsFold *string `json:"groupContainsFold,omitempty"` // "permissions" field predicates. Permissions *string `json:"permissions,omitempty"` PermissionsNEQ *string `json:"permissionsNEQ,omitempty"` PermissionsIn []string `json:"permissionsIn,omitempty"` PermissionsNotIn []string `json:"permissionsNotIn,omitempty"` PermissionsGT *string `json:"permissionsGT,omitempty"` PermissionsGTE *string `json:"permissionsGTE,omitempty"` PermissionsLT *string `json:"permissionsLT,omitempty"` PermissionsLTE *string `json:"permissionsLTE,omitempty"` PermissionsContains *string `json:"permissionsContains,omitempty"` PermissionsHasPrefix *string `json:"permissionsHasPrefix,omitempty"` PermissionsHasSuffix *string `json:"permissionsHasSuffix,omitempty"` PermissionsIsNil bool `json:"permissionsIsNil,omitempty"` PermissionsNotNil bool `json:"permissionsNotNil,omitempty"` PermissionsEqualFold *string `json:"permissionsEqualFold,omitempty"` PermissionsContainsFold *string `json:"permissionsContainsFold,omitempty"` // "size" field predicates. Size *int `json:"size,omitempty"` SizeNEQ *int `json:"sizeNEQ,omitempty"` SizeIn []int `json:"sizeIn,omitempty"` SizeNotIn []int `json:"sizeNotIn,omitempty"` SizeGT *int `json:"sizeGT,omitempty"` SizeGTE *int `json:"sizeGTE,omitempty"` SizeLT *int `json:"sizeLT,omitempty"` SizeLTE *int `json:"sizeLTE,omitempty"` // "hash" field predicates. Hash *string `json:"hash,omitempty"` HashNEQ *string `json:"hashNEQ,omitempty"` HashIn []string `json:"hashIn,omitempty"` HashNotIn []string `json:"hashNotIn,omitempty"` HashGT *string `json:"hashGT,omitempty"` HashGTE *string `json:"hashGTE,omitempty"` HashLT *string `json:"hashLT,omitempty"` HashLTE *string `json:"hashLTE,omitempty"` HashContains *string `json:"hashContains,omitempty"` HashHasPrefix *string `json:"hashHasPrefix,omitempty"` HashHasSuffix *string `json:"hashHasSuffix,omitempty"` HashIsNil bool `json:"hashIsNil,omitempty"` HashNotNil bool `json:"hashNotNil,omitempty"` HashEqualFold *string `json:"hashEqualFold,omitempty"` HashContainsFold *string `json:"hashContainsFold,omitempty"` // "host" edge predicates. HasHost *bool `json:"hasHost,omitempty"` HasHostWith []*HostWhereInput `json:"hasHostWith,omitempty"` // "task" edge predicates. HasTask *bool `json:"hasTask,omitempty"` HasTaskWith []*TaskWhereInput `json:"hasTaskWith,omitempty"` }
HostFileWhereInput represents a where input for filtering HostFile queries.
func (*HostFileWhereInput) AddPredicates ¶ added in v0.0.5
func (i *HostFileWhereInput) AddPredicates(predicates ...predicate.HostFile)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*HostFileWhereInput) Filter ¶ added in v0.0.5
func (i *HostFileWhereInput) Filter(q *HostFileQuery) (*HostFileQuery, error)
Filter applies the HostFileWhereInput filter on the HostFileQuery builder.
type HostFiles ¶ added in v0.0.5
type HostFiles []*HostFile
HostFiles is a parsable slice of HostFile.
type HostGroupBy ¶
type HostGroupBy struct {
// contains filtered or unexported fields
}
HostGroupBy is the group-by builder for Host entities.
func (*HostGroupBy) Aggregate ¶
func (hgb *HostGroupBy) Aggregate(fns ...AggregateFunc) *HostGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HostGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HostGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HostGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HostGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HostGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HostGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HostGroupBy) Scan ¶
func (hgb *HostGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HostGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HostMutation ¶
type HostMutation struct {
// contains filtered or unexported fields
}
HostMutation represents an operation that mutates the Host nodes in the graph.
func (*HostMutation) AddBeaconIDs ¶
func (m *HostMutation) AddBeaconIDs(ids ...int)
AddBeaconIDs adds the "beacons" edge to the Beacon entity by ids.
func (*HostMutation) AddField ¶
func (m *HostMutation) 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 (*HostMutation) AddFileIDs ¶ added in v0.0.5
func (m *HostMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the HostFile entity by ids.
func (*HostMutation) AddProcessIDs ¶ added in v0.0.5
func (m *HostMutation) AddProcessIDs(ids ...int)
AddProcessIDs adds the "processes" edge to the HostProcess entity by ids.
func (*HostMutation) AddTagIDs ¶
func (m *HostMutation) AddTagIDs(ids ...int)
AddTagIDs adds the "tags" edge to the Tag entity by ids.
func (*HostMutation) AddedEdges ¶
func (m *HostMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HostMutation) AddedField ¶
func (m *HostMutation) 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 (*HostMutation) AddedFields ¶
func (m *HostMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HostMutation) AddedIDs ¶
func (m *HostMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HostMutation) BeaconsCleared ¶
func (m *HostMutation) BeaconsCleared() bool
BeaconsCleared reports if the "beacons" edge to the Beacon entity was cleared.
func (*HostMutation) BeaconsIDs ¶
func (m *HostMutation) BeaconsIDs() (ids []int)
BeaconsIDs returns the "beacons" edge IDs in the mutation.
func (*HostMutation) ClearBeacons ¶
func (m *HostMutation) ClearBeacons()
ClearBeacons clears the "beacons" edge to the Beacon entity.
func (*HostMutation) ClearEdge ¶
func (m *HostMutation) 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 (*HostMutation) ClearField ¶
func (m *HostMutation) 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 (*HostMutation) ClearFiles ¶ added in v0.0.5
func (m *HostMutation) ClearFiles()
ClearFiles clears the "files" edge to the HostFile entity.
func (*HostMutation) ClearLastSeenAt ¶
func (m *HostMutation) ClearLastSeenAt()
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*HostMutation) ClearName ¶
func (m *HostMutation) ClearName()
ClearName clears the value of the "name" field.
func (*HostMutation) ClearPrimaryIP ¶
func (m *HostMutation) ClearPrimaryIP()
ClearPrimaryIP clears the value of the "primary_ip" field.
func (*HostMutation) ClearProcesses ¶ added in v0.0.5
func (m *HostMutation) ClearProcesses()
ClearProcesses clears the "processes" edge to the HostProcess entity.
func (*HostMutation) ClearTags ¶
func (m *HostMutation) ClearTags()
ClearTags clears the "tags" edge to the Tag entity.
func (*HostMutation) ClearedEdges ¶
func (m *HostMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HostMutation) ClearedFields ¶
func (m *HostMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HostMutation) Client ¶
func (m HostMutation) 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 (*HostMutation) CreatedAt ¶ added in v0.0.5
func (m *HostMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*HostMutation) EdgeCleared ¶
func (m *HostMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HostMutation) Field ¶
func (m *HostMutation) 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 (*HostMutation) FieldCleared ¶
func (m *HostMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HostMutation) Fields ¶
func (m *HostMutation) 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 (*HostMutation) FilesCleared ¶ added in v0.0.5
func (m *HostMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the HostFile entity was cleared.
func (*HostMutation) FilesIDs ¶ added in v0.0.5
func (m *HostMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*HostMutation) ID ¶
func (m *HostMutation) 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 (*HostMutation) IDs ¶
func (m *HostMutation) 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 (*HostMutation) Identifier ¶
func (m *HostMutation) Identifier() (r string, exists bool)
Identifier returns the value of the "identifier" field in the mutation.
func (*HostMutation) LastModifiedAt ¶ added in v0.0.5
func (m *HostMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*HostMutation) LastSeenAt ¶
func (m *HostMutation) LastSeenAt() (r time.Time, exists bool)
LastSeenAt returns the value of the "last_seen_at" field in the mutation.
func (*HostMutation) LastSeenAtCleared ¶
func (m *HostMutation) LastSeenAtCleared() bool
LastSeenAtCleared returns if the "last_seen_at" field was cleared in this mutation.
func (*HostMutation) Name ¶
func (m *HostMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*HostMutation) NameCleared ¶
func (m *HostMutation) NameCleared() bool
NameCleared returns if the "name" field was cleared in this mutation.
func (*HostMutation) OldCreatedAt ¶ added in v0.0.5
OldCreatedAt returns the old "created_at" field's value of the Host entity. If the Host 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 (*HostMutation) 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 (*HostMutation) OldIdentifier ¶
func (m *HostMutation) OldIdentifier(ctx context.Context) (v string, err error)
OldIdentifier returns the old "identifier" field's value of the Host entity. If the Host 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 (*HostMutation) OldLastModifiedAt ¶ added in v0.0.5
OldLastModifiedAt returns the old "last_modified_at" field's value of the Host entity. If the Host 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 (*HostMutation) OldLastSeenAt ¶
OldLastSeenAt returns the old "last_seen_at" field's value of the Host entity. If the Host 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 (*HostMutation) OldName ¶
func (m *HostMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Host entity. If the Host 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 (*HostMutation) OldPlatform ¶
func (m *HostMutation) OldPlatform(ctx context.Context) (v c2pb.Host_Platform, err error)
OldPlatform returns the old "platform" field's value of the Host entity. If the Host 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 (*HostMutation) OldPrimaryIP ¶
func (m *HostMutation) OldPrimaryIP(ctx context.Context) (v string, err error)
OldPrimaryIP returns the old "primary_ip" field's value of the Host entity. If the Host 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 (*HostMutation) Platform ¶
func (m *HostMutation) Platform() (r c2pb.Host_Platform, exists bool)
Platform returns the value of the "platform" field in the mutation.
func (*HostMutation) PrimaryIP ¶
func (m *HostMutation) PrimaryIP() (r string, exists bool)
PrimaryIP returns the value of the "primary_ip" field in the mutation.
func (*HostMutation) PrimaryIPCleared ¶
func (m *HostMutation) PrimaryIPCleared() bool
PrimaryIPCleared returns if the "primary_ip" field was cleared in this mutation.
func (*HostMutation) ProcessesCleared ¶ added in v0.0.5
func (m *HostMutation) ProcessesCleared() bool
ProcessesCleared reports if the "processes" edge to the HostProcess entity was cleared.
func (*HostMutation) ProcessesIDs ¶ added in v0.0.5
func (m *HostMutation) ProcessesIDs() (ids []int)
ProcessesIDs returns the "processes" edge IDs in the mutation.
func (*HostMutation) RemoveBeaconIDs ¶
func (m *HostMutation) RemoveBeaconIDs(ids ...int)
RemoveBeaconIDs removes the "beacons" edge to the Beacon entity by IDs.
func (*HostMutation) RemoveFileIDs ¶ added in v0.0.5
func (m *HostMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the HostFile entity by IDs.
func (*HostMutation) RemoveProcessIDs ¶ added in v0.0.5
func (m *HostMutation) RemoveProcessIDs(ids ...int)
RemoveProcessIDs removes the "processes" edge to the HostProcess entity by IDs.
func (*HostMutation) RemoveTagIDs ¶
func (m *HostMutation) RemoveTagIDs(ids ...int)
RemoveTagIDs removes the "tags" edge to the Tag entity by IDs.
func (*HostMutation) RemovedBeaconsIDs ¶
func (m *HostMutation) RemovedBeaconsIDs() (ids []int)
RemovedBeacons returns the removed IDs of the "beacons" edge to the Beacon entity.
func (*HostMutation) RemovedEdges ¶
func (m *HostMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HostMutation) RemovedFilesIDs ¶ added in v0.0.5
func (m *HostMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the HostFile entity.
func (*HostMutation) RemovedIDs ¶
func (m *HostMutation) 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 (*HostMutation) RemovedProcessesIDs ¶ added in v0.0.5
func (m *HostMutation) RemovedProcessesIDs() (ids []int)
RemovedProcesses returns the removed IDs of the "processes" edge to the HostProcess entity.
func (*HostMutation) RemovedTagsIDs ¶
func (m *HostMutation) RemovedTagsIDs() (ids []int)
RemovedTags returns the removed IDs of the "tags" edge to the Tag entity.
func (*HostMutation) ResetBeacons ¶
func (m *HostMutation) ResetBeacons()
ResetBeacons resets all changes to the "beacons" edge.
func (*HostMutation) ResetCreatedAt ¶ added in v0.0.5
func (m *HostMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*HostMutation) ResetEdge ¶
func (m *HostMutation) 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 (*HostMutation) ResetField ¶
func (m *HostMutation) 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 (*HostMutation) ResetFiles ¶ added in v0.0.5
func (m *HostMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*HostMutation) ResetIdentifier ¶
func (m *HostMutation) ResetIdentifier()
ResetIdentifier resets all changes to the "identifier" field.
func (*HostMutation) ResetLastModifiedAt ¶ added in v0.0.5
func (m *HostMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*HostMutation) ResetLastSeenAt ¶
func (m *HostMutation) ResetLastSeenAt()
ResetLastSeenAt resets all changes to the "last_seen_at" field.
func (*HostMutation) ResetName ¶
func (m *HostMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*HostMutation) ResetPlatform ¶
func (m *HostMutation) ResetPlatform()
ResetPlatform resets all changes to the "platform" field.
func (*HostMutation) ResetPrimaryIP ¶
func (m *HostMutation) ResetPrimaryIP()
ResetPrimaryIP resets all changes to the "primary_ip" field.
func (*HostMutation) ResetProcesses ¶ added in v0.0.5
func (m *HostMutation) ResetProcesses()
ResetProcesses resets all changes to the "processes" edge.
func (*HostMutation) ResetTags ¶
func (m *HostMutation) ResetTags()
ResetTags resets all changes to the "tags" edge.
func (*HostMutation) SetCreatedAt ¶ added in v0.0.5
func (m *HostMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*HostMutation) SetField ¶
func (m *HostMutation) 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 (*HostMutation) SetIdentifier ¶
func (m *HostMutation) SetIdentifier(s string)
SetIdentifier sets the "identifier" field.
func (*HostMutation) SetLastModifiedAt ¶ added in v0.0.5
func (m *HostMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostMutation) SetLastSeenAt ¶
func (m *HostMutation) SetLastSeenAt(t time.Time)
SetLastSeenAt sets the "last_seen_at" field.
func (*HostMutation) SetName ¶
func (m *HostMutation) SetName(s string)
SetName sets the "name" field.
func (*HostMutation) SetOp ¶
func (m *HostMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*HostMutation) SetPlatform ¶
func (m *HostMutation) SetPlatform(cp c2pb.Host_Platform)
SetPlatform sets the "platform" field.
func (*HostMutation) SetPrimaryIP ¶
func (m *HostMutation) SetPrimaryIP(s string)
SetPrimaryIP sets the "primary_ip" field.
func (*HostMutation) TagsCleared ¶
func (m *HostMutation) TagsCleared() bool
TagsCleared reports if the "tags" edge to the Tag entity was cleared.
func (*HostMutation) TagsIDs ¶
func (m *HostMutation) TagsIDs() (ids []int)
TagsIDs returns the "tags" edge IDs in the mutation.
func (HostMutation) Tx ¶
func (m HostMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HostMutation) Type ¶
func (m *HostMutation) Type() string
Type returns the node type of this mutation (Host).
func (*HostMutation) Where ¶
func (m *HostMutation) Where(ps ...predicate.Host)
Where appends a list predicates to the HostMutation builder.
func (*HostMutation) WhereP ¶
func (m *HostMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HostMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type HostOrder ¶
type HostOrder struct { Direction OrderDirection `json:"direction"` Field *HostOrderField `json:"field"` }
HostOrder defines the ordering of Host.
type HostOrderField ¶
type HostOrderField struct { // Value extracts the ordering value from the given Host. Value func(*Host) (ent.Value, error) // contains filtered or unexported fields }
HostOrderField defines the ordering field of Host.
func (HostOrderField) MarshalGQL ¶
func (f HostOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (HostOrderField) String ¶
func (f HostOrderField) String() string
String implement fmt.Stringer interface.
func (*HostOrderField) UnmarshalGQL ¶
func (f *HostOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type HostPaginateOption ¶
type HostPaginateOption func(*hostPager) error
HostPaginateOption enables pagination customization.
func WithHostFilter ¶
func WithHostFilter(filter func(*HostQuery) (*HostQuery, error)) HostPaginateOption
WithHostFilter configures pagination filter.
func WithHostOrder ¶
func WithHostOrder(order *HostOrder) HostPaginateOption
WithHostOrder configures pagination ordering.
type HostProcess ¶ added in v0.0.5
type HostProcess struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // ID of the process. Pid uint64 `json:"pid,omitempty"` // ID of the parent process. Ppid uint64 `json:"ppid,omitempty"` // The name of the process. Name string `json:"name,omitempty"` // The user the process is running as. Principal string `json:"principal,omitempty"` // The path to the process executable. Path string `json:"path,omitempty"` // The command used to execute the process. Cmd string `json:"cmd,omitempty"` // The environment variables set for the process. Env string `json:"env,omitempty"` // The current working directory for the process. Cwd string `json:"cwd,omitempty"` // Current process status. Status epb.Process_Status `json:"status,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the HostProcessQuery when eager-loading is set. Edges HostProcessEdges `json:"edges"` // contains filtered or unexported fields }
HostProcess is the model entity for the HostProcess schema.
func (*HostProcess) Host ¶ added in v0.0.5
func (hp *HostProcess) Host(ctx context.Context) (*Host, error)
func (*HostProcess) IsNode ¶ added in v0.0.5
func (n *HostProcess) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*HostProcess) QueryHost ¶ added in v0.0.5
func (hp *HostProcess) QueryHost() *HostQuery
QueryHost queries the "host" edge of the HostProcess entity.
func (*HostProcess) QueryTask ¶ added in v0.0.5
func (hp *HostProcess) QueryTask() *TaskQuery
QueryTask queries the "task" edge of the HostProcess entity.
func (*HostProcess) String ¶ added in v0.0.5
func (hp *HostProcess) String() string
String implements the fmt.Stringer.
func (*HostProcess) Task ¶ added in v0.0.5
func (hp *HostProcess) Task(ctx context.Context) (*Task, error)
func (*HostProcess) ToEdge ¶ added in v0.0.5
func (hp *HostProcess) ToEdge(order *HostProcessOrder) *HostProcessEdge
ToEdge converts HostProcess into HostProcessEdge.
func (*HostProcess) Unwrap ¶ added in v0.0.5
func (hp *HostProcess) Unwrap() *HostProcess
Unwrap unwraps the HostProcess 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 (*HostProcess) Update ¶ added in v0.0.5
func (hp *HostProcess) Update() *HostProcessUpdateOne
Update returns a builder for updating this HostProcess. Note that you need to call HostProcess.Unwrap() before calling this method if this HostProcess was returned from a transaction, and the transaction was committed or rolled back.
type HostProcessClient ¶ added in v0.0.5
type HostProcessClient struct {
// contains filtered or unexported fields
}
HostProcessClient is a client for the HostProcess schema.
func NewHostProcessClient ¶ added in v0.0.5
func NewHostProcessClient(c config) *HostProcessClient
NewHostProcessClient returns a client for the HostProcess from the given config.
func (*HostProcessClient) Create ¶ added in v0.0.5
func (c *HostProcessClient) Create() *HostProcessCreate
Create returns a builder for creating a HostProcess entity.
func (*HostProcessClient) CreateBulk ¶ added in v0.0.5
func (c *HostProcessClient) CreateBulk(builders ...*HostProcessCreate) *HostProcessCreateBulk
CreateBulk returns a builder for creating a bulk of HostProcess entities.
func (*HostProcessClient) Delete ¶ added in v0.0.5
func (c *HostProcessClient) Delete() *HostProcessDelete
Delete returns a delete builder for HostProcess.
func (*HostProcessClient) DeleteOne ¶ added in v0.0.5
func (c *HostProcessClient) DeleteOne(hp *HostProcess) *HostProcessDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*HostProcessClient) DeleteOneID ¶ added in v0.0.5
func (c *HostProcessClient) DeleteOneID(id int) *HostProcessDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*HostProcessClient) Get ¶ added in v0.0.5
func (c *HostProcessClient) Get(ctx context.Context, id int) (*HostProcess, error)
Get returns a HostProcess entity by its id.
func (*HostProcessClient) GetX ¶ added in v0.0.5
func (c *HostProcessClient) GetX(ctx context.Context, id int) *HostProcess
GetX is like Get, but panics if an error occurs.
func (*HostProcessClient) Hooks ¶ added in v0.0.5
func (c *HostProcessClient) Hooks() []Hook
Hooks returns the client hooks.
func (*HostProcessClient) Intercept ¶ added in v0.0.5
func (c *HostProcessClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `hostprocess.Intercept(f(g(h())))`.
func (*HostProcessClient) Interceptors ¶ added in v0.0.5
func (c *HostProcessClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*HostProcessClient) MapCreateBulk ¶ added in v0.0.5
func (c *HostProcessClient) MapCreateBulk(slice any, setFunc func(*HostProcessCreate, int)) *HostProcessCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*HostProcessClient) Query ¶ added in v0.0.5
func (c *HostProcessClient) Query() *HostProcessQuery
Query returns a query builder for HostProcess.
func (*HostProcessClient) QueryHost ¶ added in v0.0.5
func (c *HostProcessClient) QueryHost(hp *HostProcess) *HostQuery
QueryHost queries the host edge of a HostProcess.
func (*HostProcessClient) QueryTask ¶ added in v0.0.5
func (c *HostProcessClient) QueryTask(hp *HostProcess) *TaskQuery
QueryTask queries the task edge of a HostProcess.
func (*HostProcessClient) Update ¶ added in v0.0.5
func (c *HostProcessClient) Update() *HostProcessUpdate
Update returns an update builder for HostProcess.
func (*HostProcessClient) UpdateOne ¶ added in v0.0.5
func (c *HostProcessClient) UpdateOne(hp *HostProcess) *HostProcessUpdateOne
UpdateOne returns an update builder for the given entity.
func (*HostProcessClient) UpdateOneID ¶ added in v0.0.5
func (c *HostProcessClient) UpdateOneID(id int) *HostProcessUpdateOne
UpdateOneID returns an update builder for the given id.
func (*HostProcessClient) Use ¶ added in v0.0.5
func (c *HostProcessClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `hostprocess.Hooks(f(g(h())))`.
type HostProcessConnection ¶ added in v0.0.5
type HostProcessConnection struct { Edges []*HostProcessEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
HostProcessConnection is the connection containing edges to HostProcess.
type HostProcessCreate ¶ added in v0.0.5
type HostProcessCreate struct {
// contains filtered or unexported fields
}
HostProcessCreate is the builder for creating a HostProcess entity.
func (*HostProcessCreate) Exec ¶ added in v0.0.5
func (hpc *HostProcessCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*HostProcessCreate) ExecX ¶ added in v0.0.5
func (hpc *HostProcessCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessCreate) Mutation ¶ added in v0.0.5
func (hpc *HostProcessCreate) Mutation() *HostProcessMutation
Mutation returns the HostProcessMutation object of the builder.
func (*HostProcessCreate) OnConflict ¶ added in v0.0.5
func (hpc *HostProcessCreate) OnConflict(opts ...sql.ConflictOption) *HostProcessUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HostProcess.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.HostProcessUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*HostProcessCreate) OnConflictColumns ¶ added in v0.0.5
func (hpc *HostProcessCreate) OnConflictColumns(columns ...string) *HostProcessUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HostProcess.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*HostProcessCreate) Save ¶ added in v0.0.5
func (hpc *HostProcessCreate) Save(ctx context.Context) (*HostProcess, error)
Save creates the HostProcess in the database.
func (*HostProcessCreate) SaveX ¶ added in v0.0.5
func (hpc *HostProcessCreate) SaveX(ctx context.Context) *HostProcess
SaveX calls Save and panics if Save returns an error.
func (*HostProcessCreate) SetCmd ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetCmd(s string) *HostProcessCreate
SetCmd sets the "cmd" field.
func (*HostProcessCreate) SetCreatedAt ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetCreatedAt(t time.Time) *HostProcessCreate
SetCreatedAt sets the "created_at" field.
func (*HostProcessCreate) SetCwd ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetCwd(s string) *HostProcessCreate
SetCwd sets the "cwd" field.
func (*HostProcessCreate) SetEnv ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetEnv(s string) *HostProcessCreate
SetEnv sets the "env" field.
func (*HostProcessCreate) SetHost ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetHost(h *Host) *HostProcessCreate
SetHost sets the "host" edge to the Host entity.
func (*HostProcessCreate) SetHostID ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetHostID(id int) *HostProcessCreate
SetHostID sets the "host" edge to the Host entity by ID.
func (*HostProcessCreate) SetLastModifiedAt ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetLastModifiedAt(t time.Time) *HostProcessCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostProcessCreate) SetName ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetName(s string) *HostProcessCreate
SetName sets the "name" field.
func (*HostProcessCreate) SetNillableCmd ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetNillableCmd(s *string) *HostProcessCreate
SetNillableCmd sets the "cmd" field if the given value is not nil.
func (*HostProcessCreate) SetNillableCreatedAt ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetNillableCreatedAt(t *time.Time) *HostProcessCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*HostProcessCreate) SetNillableCwd ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetNillableCwd(s *string) *HostProcessCreate
SetNillableCwd sets the "cwd" field if the given value is not nil.
func (*HostProcessCreate) SetNillableEnv ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetNillableEnv(s *string) *HostProcessCreate
SetNillableEnv sets the "env" field if the given value is not nil.
func (*HostProcessCreate) SetNillableLastModifiedAt ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetNillableLastModifiedAt(t *time.Time) *HostProcessCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*HostProcessCreate) SetNillablePath ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetNillablePath(s *string) *HostProcessCreate
SetNillablePath sets the "path" field if the given value is not nil.
func (*HostProcessCreate) SetPath ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetPath(s string) *HostProcessCreate
SetPath sets the "path" field.
func (*HostProcessCreate) SetPid ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetPid(u uint64) *HostProcessCreate
SetPid sets the "pid" field.
func (*HostProcessCreate) SetPpid ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetPpid(u uint64) *HostProcessCreate
SetPpid sets the "ppid" field.
func (*HostProcessCreate) SetPrincipal ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetPrincipal(s string) *HostProcessCreate
SetPrincipal sets the "principal" field.
func (*HostProcessCreate) SetStatus ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetStatus(es epb.Process_Status) *HostProcessCreate
SetStatus sets the "status" field.
func (*HostProcessCreate) SetTask ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetTask(t *Task) *HostProcessCreate
SetTask sets the "task" edge to the Task entity.
func (*HostProcessCreate) SetTaskID ¶ added in v0.0.5
func (hpc *HostProcessCreate) SetTaskID(id int) *HostProcessCreate
SetTaskID sets the "task" edge to the Task entity by ID.
type HostProcessCreateBulk ¶ added in v0.0.5
type HostProcessCreateBulk struct {
// contains filtered or unexported fields
}
HostProcessCreateBulk is the builder for creating many HostProcess entities in bulk.
func (*HostProcessCreateBulk) Exec ¶ added in v0.0.5
func (hpcb *HostProcessCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HostProcessCreateBulk) ExecX ¶ added in v0.0.5
func (hpcb *HostProcessCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessCreateBulk) OnConflict ¶ added in v0.0.5
func (hpcb *HostProcessCreateBulk) OnConflict(opts ...sql.ConflictOption) *HostProcessUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.HostProcess.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.HostProcessUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*HostProcessCreateBulk) OnConflictColumns ¶ added in v0.0.5
func (hpcb *HostProcessCreateBulk) OnConflictColumns(columns ...string) *HostProcessUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.HostProcess.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*HostProcessCreateBulk) Save ¶ added in v0.0.5
func (hpcb *HostProcessCreateBulk) Save(ctx context.Context) ([]*HostProcess, error)
Save creates the HostProcess entities in the database.
func (*HostProcessCreateBulk) SaveX ¶ added in v0.0.5
func (hpcb *HostProcessCreateBulk) SaveX(ctx context.Context) []*HostProcess
SaveX is like Save, but panics if an error occurs.
type HostProcessDelete ¶ added in v0.0.5
type HostProcessDelete struct {
// contains filtered or unexported fields
}
HostProcessDelete is the builder for deleting a HostProcess entity.
func (*HostProcessDelete) Exec ¶ added in v0.0.5
func (hpd *HostProcessDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*HostProcessDelete) ExecX ¶ added in v0.0.5
func (hpd *HostProcessDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessDelete) Where ¶ added in v0.0.5
func (hpd *HostProcessDelete) Where(ps ...predicate.HostProcess) *HostProcessDelete
Where appends a list predicates to the HostProcessDelete builder.
type HostProcessDeleteOne ¶ added in v0.0.5
type HostProcessDeleteOne struct {
// contains filtered or unexported fields
}
HostProcessDeleteOne is the builder for deleting a single HostProcess entity.
func (*HostProcessDeleteOne) Exec ¶ added in v0.0.5
func (hpdo *HostProcessDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*HostProcessDeleteOne) ExecX ¶ added in v0.0.5
func (hpdo *HostProcessDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessDeleteOne) Where ¶ added in v0.0.5
func (hpdo *HostProcessDeleteOne) Where(ps ...predicate.HostProcess) *HostProcessDeleteOne
Where appends a list predicates to the HostProcessDelete builder.
type HostProcessEdge ¶ added in v0.0.5
type HostProcessEdge struct { Node *HostProcess `json:"node"` Cursor Cursor `json:"cursor"` }
HostProcessEdge is the edge representation of HostProcess.
type HostProcessEdges ¶ added in v0.0.5
type HostProcessEdges struct { // Host the process was reported on. Host *Host `json:"host,omitempty"` // Task that reported this process. Task *Task `json:"task,omitempty"` // contains filtered or unexported fields }
HostProcessEdges holds the relations/edges for other nodes in the graph.
func (HostProcessEdges) HostOrErr ¶ added in v0.0.5
func (e HostProcessEdges) HostOrErr() (*Host, error)
HostOrErr returns the Host value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (HostProcessEdges) TaskOrErr ¶ added in v0.0.5
func (e HostProcessEdges) TaskOrErr() (*Task, error)
TaskOrErr returns the Task value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type HostProcessGroupBy ¶ added in v0.0.5
type HostProcessGroupBy struct {
// contains filtered or unexported fields
}
HostProcessGroupBy is the group-by builder for HostProcess entities.
func (*HostProcessGroupBy) Aggregate ¶ added in v0.0.5
func (hpgb *HostProcessGroupBy) Aggregate(fns ...AggregateFunc) *HostProcessGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*HostProcessGroupBy) Bool ¶ added in v0.0.5
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HostProcessGroupBy) BoolX ¶ added in v0.0.5
BoolX is like Bool, but panics if an error occurs.
func (*HostProcessGroupBy) Bools ¶ added in v0.0.5
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HostProcessGroupBy) BoolsX ¶ added in v0.0.5
BoolsX is like Bools, but panics if an error occurs.
func (*HostProcessGroupBy) Float64 ¶ added in v0.0.5
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HostProcessGroupBy) Float64X ¶ added in v0.0.5
Float64X is like Float64, but panics if an error occurs.
func (*HostProcessGroupBy) Float64s ¶ added in v0.0.5
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HostProcessGroupBy) Float64sX ¶ added in v0.0.5
Float64sX is like Float64s, but panics if an error occurs.
func (*HostProcessGroupBy) Int ¶ added in v0.0.5
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HostProcessGroupBy) Ints ¶ added in v0.0.5
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HostProcessGroupBy) IntsX ¶ added in v0.0.5
IntsX is like Ints, but panics if an error occurs.
func (*HostProcessGroupBy) Scan ¶ added in v0.0.5
func (hpgb *HostProcessGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HostProcessGroupBy) ScanX ¶ added in v0.0.5
ScanX is like Scan, but panics if an error occurs.
func (*HostProcessGroupBy) String ¶ added in v0.0.5
String returns a single string from a selector. It is only allowed when selecting one field.
func (*HostProcessGroupBy) StringX ¶ added in v0.0.5
StringX is like String, but panics if an error occurs.
type HostProcessMutation ¶ added in v0.0.5
type HostProcessMutation struct {
// contains filtered or unexported fields
}
HostProcessMutation represents an operation that mutates the HostProcess nodes in the graph.
func (*HostProcessMutation) AddField ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) AddPid ¶ added in v0.0.5
func (m *HostProcessMutation) AddPid(u int64)
AddPid adds u to the "pid" field.
func (*HostProcessMutation) AddPpid ¶ added in v0.0.5
func (m *HostProcessMutation) AddPpid(u int64)
AddPpid adds u to the "ppid" field.
func (*HostProcessMutation) AddedEdges ¶ added in v0.0.5
func (m *HostProcessMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*HostProcessMutation) AddedField ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) AddedFields ¶ added in v0.0.5
func (m *HostProcessMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*HostProcessMutation) AddedIDs ¶ added in v0.0.5
func (m *HostProcessMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*HostProcessMutation) AddedPid ¶ added in v0.0.5
func (m *HostProcessMutation) AddedPid() (r int64, exists bool)
AddedPid returns the value that was added to the "pid" field in this mutation.
func (*HostProcessMutation) AddedPpid ¶ added in v0.0.5
func (m *HostProcessMutation) AddedPpid() (r int64, exists bool)
AddedPpid returns the value that was added to the "ppid" field in this mutation.
func (*HostProcessMutation) ClearCmd ¶ added in v0.0.5
func (m *HostProcessMutation) ClearCmd()
ClearCmd clears the value of the "cmd" field.
func (*HostProcessMutation) ClearCwd ¶ added in v0.0.5
func (m *HostProcessMutation) ClearCwd()
ClearCwd clears the value of the "cwd" field.
func (*HostProcessMutation) ClearEdge ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) ClearEnv ¶ added in v0.0.5
func (m *HostProcessMutation) ClearEnv()
ClearEnv clears the value of the "env" field.
func (*HostProcessMutation) ClearField ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) ClearHost ¶ added in v0.0.5
func (m *HostProcessMutation) ClearHost()
ClearHost clears the "host" edge to the Host entity.
func (*HostProcessMutation) ClearPath ¶ added in v0.0.5
func (m *HostProcessMutation) ClearPath()
ClearPath clears the value of the "path" field.
func (*HostProcessMutation) ClearTask ¶ added in v0.0.5
func (m *HostProcessMutation) ClearTask()
ClearTask clears the "task" edge to the Task entity.
func (*HostProcessMutation) ClearedEdges ¶ added in v0.0.5
func (m *HostProcessMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*HostProcessMutation) ClearedFields ¶ added in v0.0.5
func (m *HostProcessMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (HostProcessMutation) Client ¶ added in v0.0.5
func (m HostProcessMutation) 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 (*HostProcessMutation) Cmd ¶ added in v0.0.5
func (m *HostProcessMutation) Cmd() (r string, exists bool)
Cmd returns the value of the "cmd" field in the mutation.
func (*HostProcessMutation) CmdCleared ¶ added in v0.0.5
func (m *HostProcessMutation) CmdCleared() bool
CmdCleared returns if the "cmd" field was cleared in this mutation.
func (*HostProcessMutation) CreatedAt ¶ added in v0.0.5
func (m *HostProcessMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*HostProcessMutation) Cwd ¶ added in v0.0.5
func (m *HostProcessMutation) Cwd() (r string, exists bool)
Cwd returns the value of the "cwd" field in the mutation.
func (*HostProcessMutation) CwdCleared ¶ added in v0.0.5
func (m *HostProcessMutation) CwdCleared() bool
CwdCleared returns if the "cwd" field was cleared in this mutation.
func (*HostProcessMutation) EdgeCleared ¶ added in v0.0.5
func (m *HostProcessMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*HostProcessMutation) Env ¶ added in v0.0.5
func (m *HostProcessMutation) Env() (r string, exists bool)
Env returns the value of the "env" field in the mutation.
func (*HostProcessMutation) EnvCleared ¶ added in v0.0.5
func (m *HostProcessMutation) EnvCleared() bool
EnvCleared returns if the "env" field was cleared in this mutation.
func (*HostProcessMutation) Field ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) FieldCleared ¶ added in v0.0.5
func (m *HostProcessMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*HostProcessMutation) Fields ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) HostCleared ¶ added in v0.0.5
func (m *HostProcessMutation) HostCleared() bool
HostCleared reports if the "host" edge to the Host entity was cleared.
func (*HostProcessMutation) HostID ¶ added in v0.0.5
func (m *HostProcessMutation) HostID() (id int, exists bool)
HostID returns the "host" edge ID in the mutation.
func (*HostProcessMutation) HostIDs ¶ added in v0.0.5
func (m *HostProcessMutation) HostIDs() (ids []int)
HostIDs returns the "host" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use HostID instead. It exists only for internal usage by the builders.
func (*HostProcessMutation) ID ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) IDs ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) LastModifiedAt ¶ added in v0.0.5
func (m *HostProcessMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*HostProcessMutation) Name ¶ added in v0.0.5
func (m *HostProcessMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*HostProcessMutation) OldCmd ¶ added in v0.0.5
func (m *HostProcessMutation) OldCmd(ctx context.Context) (v string, err error)
OldCmd returns the old "cmd" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldCreatedAt ¶ added in v0.0.5
OldCreatedAt returns the old "created_at" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldCwd ¶ added in v0.0.5
func (m *HostProcessMutation) OldCwd(ctx context.Context) (v string, err error)
OldCwd returns the old "cwd" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldEnv ¶ added in v0.0.5
func (m *HostProcessMutation) OldEnv(ctx context.Context) (v string, err error)
OldEnv returns the old "env" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldField ¶ added in v0.0.5
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 (*HostProcessMutation) OldLastModifiedAt ¶ added in v0.0.5
OldLastModifiedAt returns the old "last_modified_at" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldName ¶ added in v0.0.5
func (m *HostProcessMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldPath ¶ added in v0.0.5
func (m *HostProcessMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldPid ¶ added in v0.0.5
func (m *HostProcessMutation) OldPid(ctx context.Context) (v uint64, err error)
OldPid returns the old "pid" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldPpid ¶ added in v0.0.5
func (m *HostProcessMutation) OldPpid(ctx context.Context) (v uint64, err error)
OldPpid returns the old "ppid" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldPrincipal ¶ added in v0.0.5
func (m *HostProcessMutation) OldPrincipal(ctx context.Context) (v string, err error)
OldPrincipal returns the old "principal" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) OldStatus ¶ added in v0.0.5
func (m *HostProcessMutation) OldStatus(ctx context.Context) (v epb.Process_Status, err error)
OldStatus returns the old "status" field's value of the HostProcess entity. If the HostProcess 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 (*HostProcessMutation) Op ¶ added in v0.0.5
func (m *HostProcessMutation) Op() Op
Op returns the operation name.
func (*HostProcessMutation) Path ¶ added in v0.0.5
func (m *HostProcessMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*HostProcessMutation) PathCleared ¶ added in v0.0.5
func (m *HostProcessMutation) PathCleared() bool
PathCleared returns if the "path" field was cleared in this mutation.
func (*HostProcessMutation) Pid ¶ added in v0.0.5
func (m *HostProcessMutation) Pid() (r uint64, exists bool)
Pid returns the value of the "pid" field in the mutation.
func (*HostProcessMutation) Ppid ¶ added in v0.0.5
func (m *HostProcessMutation) Ppid() (r uint64, exists bool)
Ppid returns the value of the "ppid" field in the mutation.
func (*HostProcessMutation) Principal ¶ added in v0.0.5
func (m *HostProcessMutation) Principal() (r string, exists bool)
Principal returns the value of the "principal" field in the mutation.
func (*HostProcessMutation) RemovedEdges ¶ added in v0.0.5
func (m *HostProcessMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*HostProcessMutation) RemovedIDs ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) ResetCmd ¶ added in v0.0.5
func (m *HostProcessMutation) ResetCmd()
ResetCmd resets all changes to the "cmd" field.
func (*HostProcessMutation) ResetCreatedAt ¶ added in v0.0.5
func (m *HostProcessMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*HostProcessMutation) ResetCwd ¶ added in v0.0.5
func (m *HostProcessMutation) ResetCwd()
ResetCwd resets all changes to the "cwd" field.
func (*HostProcessMutation) ResetEdge ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) ResetEnv ¶ added in v0.0.5
func (m *HostProcessMutation) ResetEnv()
ResetEnv resets all changes to the "env" field.
func (*HostProcessMutation) ResetField ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) ResetHost ¶ added in v0.0.5
func (m *HostProcessMutation) ResetHost()
ResetHost resets all changes to the "host" edge.
func (*HostProcessMutation) ResetLastModifiedAt ¶ added in v0.0.5
func (m *HostProcessMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*HostProcessMutation) ResetName ¶ added in v0.0.5
func (m *HostProcessMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*HostProcessMutation) ResetPath ¶ added in v0.0.5
func (m *HostProcessMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*HostProcessMutation) ResetPid ¶ added in v0.0.5
func (m *HostProcessMutation) ResetPid()
ResetPid resets all changes to the "pid" field.
func (*HostProcessMutation) ResetPpid ¶ added in v0.0.5
func (m *HostProcessMutation) ResetPpid()
ResetPpid resets all changes to the "ppid" field.
func (*HostProcessMutation) ResetPrincipal ¶ added in v0.0.5
func (m *HostProcessMutation) ResetPrincipal()
ResetPrincipal resets all changes to the "principal" field.
func (*HostProcessMutation) ResetStatus ¶ added in v0.0.5
func (m *HostProcessMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*HostProcessMutation) ResetTask ¶ added in v0.0.5
func (m *HostProcessMutation) ResetTask()
ResetTask resets all changes to the "task" edge.
func (*HostProcessMutation) SetCmd ¶ added in v0.0.5
func (m *HostProcessMutation) SetCmd(s string)
SetCmd sets the "cmd" field.
func (*HostProcessMutation) SetCreatedAt ¶ added in v0.0.5
func (m *HostProcessMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*HostProcessMutation) SetCwd ¶ added in v0.0.5
func (m *HostProcessMutation) SetCwd(s string)
SetCwd sets the "cwd" field.
func (*HostProcessMutation) SetEnv ¶ added in v0.0.5
func (m *HostProcessMutation) SetEnv(s string)
SetEnv sets the "env" field.
func (*HostProcessMutation) SetField ¶ added in v0.0.5
func (m *HostProcessMutation) 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 (*HostProcessMutation) SetHostID ¶ added in v0.0.5
func (m *HostProcessMutation) SetHostID(id int)
SetHostID sets the "host" edge to the Host entity by id.
func (*HostProcessMutation) SetLastModifiedAt ¶ added in v0.0.5
func (m *HostProcessMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostProcessMutation) SetName ¶ added in v0.0.5
func (m *HostProcessMutation) SetName(s string)
SetName sets the "name" field.
func (*HostProcessMutation) SetOp ¶ added in v0.0.5
func (m *HostProcessMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*HostProcessMutation) SetPath ¶ added in v0.0.5
func (m *HostProcessMutation) SetPath(s string)
SetPath sets the "path" field.
func (*HostProcessMutation) SetPid ¶ added in v0.0.5
func (m *HostProcessMutation) SetPid(u uint64)
SetPid sets the "pid" field.
func (*HostProcessMutation) SetPpid ¶ added in v0.0.5
func (m *HostProcessMutation) SetPpid(u uint64)
SetPpid sets the "ppid" field.
func (*HostProcessMutation) SetPrincipal ¶ added in v0.0.5
func (m *HostProcessMutation) SetPrincipal(s string)
SetPrincipal sets the "principal" field.
func (*HostProcessMutation) SetStatus ¶ added in v0.0.5
func (m *HostProcessMutation) SetStatus(es epb.Process_Status)
SetStatus sets the "status" field.
func (*HostProcessMutation) SetTaskID ¶ added in v0.0.5
func (m *HostProcessMutation) SetTaskID(id int)
SetTaskID sets the "task" edge to the Task entity by id.
func (*HostProcessMutation) Status ¶ added in v0.0.5
func (m *HostProcessMutation) Status() (r epb.Process_Status, exists bool)
Status returns the value of the "status" field in the mutation.
func (*HostProcessMutation) TaskCleared ¶ added in v0.0.5
func (m *HostProcessMutation) TaskCleared() bool
TaskCleared reports if the "task" edge to the Task entity was cleared.
func (*HostProcessMutation) TaskID ¶ added in v0.0.5
func (m *HostProcessMutation) TaskID() (id int, exists bool)
TaskID returns the "task" edge ID in the mutation.
func (*HostProcessMutation) TaskIDs ¶ added in v0.0.5
func (m *HostProcessMutation) TaskIDs() (ids []int)
TaskIDs returns the "task" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TaskID instead. It exists only for internal usage by the builders.
func (HostProcessMutation) Tx ¶ added in v0.0.5
func (m HostProcessMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*HostProcessMutation) Type ¶ added in v0.0.5
func (m *HostProcessMutation) Type() string
Type returns the node type of this mutation (HostProcess).
func (*HostProcessMutation) Where ¶ added in v0.0.5
func (m *HostProcessMutation) Where(ps ...predicate.HostProcess)
Where appends a list predicates to the HostProcessMutation builder.
func (*HostProcessMutation) WhereP ¶ added in v0.0.5
func (m *HostProcessMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the HostProcessMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type HostProcessOrder ¶ added in v0.0.5
type HostProcessOrder struct { Direction OrderDirection `json:"direction"` Field *HostProcessOrderField `json:"field"` }
HostProcessOrder defines the ordering of HostProcess.
type HostProcessOrderField ¶ added in v0.0.5
type HostProcessOrderField struct { // Value extracts the ordering value from the given HostProcess. Value func(*HostProcess) (ent.Value, error) // contains filtered or unexported fields }
HostProcessOrderField defines the ordering field of HostProcess.
func (HostProcessOrderField) MarshalGQL ¶ added in v0.0.5
func (f HostProcessOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (HostProcessOrderField) String ¶ added in v0.0.5
func (f HostProcessOrderField) String() string
String implement fmt.Stringer interface.
func (*HostProcessOrderField) UnmarshalGQL ¶ added in v0.0.5
func (f *HostProcessOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type HostProcessPaginateOption ¶ added in v0.0.5
type HostProcessPaginateOption func(*hostprocessPager) error
HostProcessPaginateOption enables pagination customization.
func WithHostProcessFilter ¶ added in v0.0.5
func WithHostProcessFilter(filter func(*HostProcessQuery) (*HostProcessQuery, error)) HostProcessPaginateOption
WithHostProcessFilter configures pagination filter.
func WithHostProcessOrder ¶ added in v0.0.5
func WithHostProcessOrder(order *HostProcessOrder) HostProcessPaginateOption
WithHostProcessOrder configures pagination ordering.
type HostProcessQuery ¶ added in v0.0.5
type HostProcessQuery struct {
// contains filtered or unexported fields
}
HostProcessQuery is the builder for querying HostProcess entities.
func (*HostProcessQuery) Aggregate ¶ added in v0.0.5
func (hpq *HostProcessQuery) Aggregate(fns ...AggregateFunc) *HostProcessSelect
Aggregate returns a HostProcessSelect configured with the given aggregations.
func (*HostProcessQuery) All ¶ added in v0.0.5
func (hpq *HostProcessQuery) All(ctx context.Context) ([]*HostProcess, error)
All executes the query and returns a list of HostProcesses.
func (*HostProcessQuery) AllX ¶ added in v0.0.5
func (hpq *HostProcessQuery) AllX(ctx context.Context) []*HostProcess
AllX is like All, but panics if an error occurs.
func (*HostProcessQuery) Clone ¶ added in v0.0.5
func (hpq *HostProcessQuery) Clone() *HostProcessQuery
Clone returns a duplicate of the HostProcessQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HostProcessQuery) CollectFields ¶ added in v0.0.5
func (hp *HostProcessQuery) CollectFields(ctx context.Context, satisfies ...string) (*HostProcessQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*HostProcessQuery) Count ¶ added in v0.0.5
func (hpq *HostProcessQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*HostProcessQuery) CountX ¶ added in v0.0.5
func (hpq *HostProcessQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*HostProcessQuery) Exist ¶ added in v0.0.5
func (hpq *HostProcessQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*HostProcessQuery) ExistX ¶ added in v0.0.5
func (hpq *HostProcessQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*HostProcessQuery) First ¶ added in v0.0.5
func (hpq *HostProcessQuery) First(ctx context.Context) (*HostProcess, error)
First returns the first HostProcess entity from the query. Returns a *NotFoundError when no HostProcess was found.
func (*HostProcessQuery) FirstID ¶ added in v0.0.5
func (hpq *HostProcessQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first HostProcess ID from the query. Returns a *NotFoundError when no HostProcess ID was found.
func (*HostProcessQuery) FirstIDX ¶ added in v0.0.5
func (hpq *HostProcessQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*HostProcessQuery) FirstX ¶ added in v0.0.5
func (hpq *HostProcessQuery) FirstX(ctx context.Context) *HostProcess
FirstX is like First, but panics if an error occurs.
func (*HostProcessQuery) GroupBy ¶ added in v0.0.5
func (hpq *HostProcessQuery) GroupBy(field string, fields ...string) *HostProcessGroupBy
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.HostProcess.Query(). GroupBy(hostprocess.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HostProcessQuery) IDs ¶ added in v0.0.5
func (hpq *HostProcessQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of HostProcess IDs.
func (*HostProcessQuery) IDsX ¶ added in v0.0.5
func (hpq *HostProcessQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*HostProcessQuery) Limit ¶ added in v0.0.5
func (hpq *HostProcessQuery) Limit(limit int) *HostProcessQuery
Limit the number of records to be returned by this query.
func (*HostProcessQuery) Offset ¶ added in v0.0.5
func (hpq *HostProcessQuery) Offset(offset int) *HostProcessQuery
Offset to start from.
func (*HostProcessQuery) Only ¶ added in v0.0.5
func (hpq *HostProcessQuery) Only(ctx context.Context) (*HostProcess, error)
Only returns a single HostProcess entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one HostProcess entity is found. Returns a *NotFoundError when no HostProcess entities are found.
func (*HostProcessQuery) OnlyID ¶ added in v0.0.5
func (hpq *HostProcessQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only HostProcess ID in the query. Returns a *NotSingularError when more than one HostProcess ID is found. Returns a *NotFoundError when no entities are found.
func (*HostProcessQuery) OnlyIDX ¶ added in v0.0.5
func (hpq *HostProcessQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*HostProcessQuery) OnlyX ¶ added in v0.0.5
func (hpq *HostProcessQuery) OnlyX(ctx context.Context) *HostProcess
OnlyX is like Only, but panics if an error occurs.
func (*HostProcessQuery) Order ¶ added in v0.0.5
func (hpq *HostProcessQuery) Order(o ...hostprocess.OrderOption) *HostProcessQuery
Order specifies how the records should be ordered.
func (*HostProcessQuery) Paginate ¶ added in v0.0.5
func (hp *HostProcessQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HostProcessPaginateOption, ) (*HostProcessConnection, error)
Paginate executes the query and returns a relay based cursor connection to HostProcess.
func (*HostProcessQuery) QueryHost ¶ added in v0.0.5
func (hpq *HostProcessQuery) QueryHost() *HostQuery
QueryHost chains the current query on the "host" edge.
func (*HostProcessQuery) QueryTask ¶ added in v0.0.5
func (hpq *HostProcessQuery) QueryTask() *TaskQuery
QueryTask chains the current query on the "task" edge.
func (*HostProcessQuery) Select ¶ added in v0.0.5
func (hpq *HostProcessQuery) Select(fields ...string) *HostProcessSelect
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.HostProcess.Query(). Select(hostprocess.FieldCreatedAt). Scan(ctx, &v)
func (*HostProcessQuery) Unique ¶ added in v0.0.5
func (hpq *HostProcessQuery) Unique(unique bool) *HostProcessQuery
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 (*HostProcessQuery) Where ¶ added in v0.0.5
func (hpq *HostProcessQuery) Where(ps ...predicate.HostProcess) *HostProcessQuery
Where adds a new predicate for the HostProcessQuery builder.
func (*HostProcessQuery) WithHost ¶ added in v0.0.5
func (hpq *HostProcessQuery) WithHost(opts ...func(*HostQuery)) *HostProcessQuery
WithHost tells the query-builder to eager-load the nodes that are connected to the "host" edge. The optional arguments are used to configure the query builder of the edge.
func (*HostProcessQuery) WithTask ¶ added in v0.0.5
func (hpq *HostProcessQuery) WithTask(opts ...func(*TaskQuery)) *HostProcessQuery
WithTask tells the query-builder to eager-load the nodes that are connected to the "task" edge. The optional arguments are used to configure the query builder of the edge.
type HostProcessSelect ¶ added in v0.0.5
type HostProcessSelect struct { *HostProcessQuery // contains filtered or unexported fields }
HostProcessSelect is the builder for selecting fields of HostProcess entities.
func (*HostProcessSelect) Aggregate ¶ added in v0.0.5
func (hps *HostProcessSelect) Aggregate(fns ...AggregateFunc) *HostProcessSelect
Aggregate adds the given aggregation functions to the selector query.
func (*HostProcessSelect) Bool ¶ added in v0.0.5
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HostProcessSelect) BoolX ¶ added in v0.0.5
BoolX is like Bool, but panics if an error occurs.
func (*HostProcessSelect) Bools ¶ added in v0.0.5
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HostProcessSelect) BoolsX ¶ added in v0.0.5
BoolsX is like Bools, but panics if an error occurs.
func (*HostProcessSelect) Float64 ¶ added in v0.0.5
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HostProcessSelect) Float64X ¶ added in v0.0.5
Float64X is like Float64, but panics if an error occurs.
func (*HostProcessSelect) Float64s ¶ added in v0.0.5
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HostProcessSelect) Float64sX ¶ added in v0.0.5
Float64sX is like Float64s, but panics if an error occurs.
func (*HostProcessSelect) Int ¶ added in v0.0.5
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HostProcessSelect) Ints ¶ added in v0.0.5
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HostProcessSelect) IntsX ¶ added in v0.0.5
IntsX is like Ints, but panics if an error occurs.
func (*HostProcessSelect) Scan ¶ added in v0.0.5
func (hps *HostProcessSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HostProcessSelect) ScanX ¶ added in v0.0.5
ScanX is like Scan, but panics if an error occurs.
func (*HostProcessSelect) String ¶ added in v0.0.5
String returns a single string from a selector. It is only allowed when selecting one field.
func (*HostProcessSelect) StringX ¶ added in v0.0.5
StringX is like String, but panics if an error occurs.
type HostProcessUpdate ¶ added in v0.0.5
type HostProcessUpdate struct {
// contains filtered or unexported fields
}
HostProcessUpdate is the builder for updating HostProcess entities.
func (*HostProcessUpdate) AddPid ¶ added in v0.0.5
func (hpu *HostProcessUpdate) AddPid(u int64) *HostProcessUpdate
AddPid adds u to the "pid" field.
func (*HostProcessUpdate) AddPpid ¶ added in v0.0.5
func (hpu *HostProcessUpdate) AddPpid(u int64) *HostProcessUpdate
AddPpid adds u to the "ppid" field.
func (*HostProcessUpdate) ClearCmd ¶ added in v0.0.5
func (hpu *HostProcessUpdate) ClearCmd() *HostProcessUpdate
ClearCmd clears the value of the "cmd" field.
func (*HostProcessUpdate) ClearCwd ¶ added in v0.0.5
func (hpu *HostProcessUpdate) ClearCwd() *HostProcessUpdate
ClearCwd clears the value of the "cwd" field.
func (*HostProcessUpdate) ClearEnv ¶ added in v0.0.5
func (hpu *HostProcessUpdate) ClearEnv() *HostProcessUpdate
ClearEnv clears the value of the "env" field.
func (*HostProcessUpdate) ClearHost ¶ added in v0.0.5
func (hpu *HostProcessUpdate) ClearHost() *HostProcessUpdate
ClearHost clears the "host" edge to the Host entity.
func (*HostProcessUpdate) ClearPath ¶ added in v0.0.5
func (hpu *HostProcessUpdate) ClearPath() *HostProcessUpdate
ClearPath clears the value of the "path" field.
func (*HostProcessUpdate) ClearTask ¶ added in v0.0.5
func (hpu *HostProcessUpdate) ClearTask() *HostProcessUpdate
ClearTask clears the "task" edge to the Task entity.
func (*HostProcessUpdate) Exec ¶ added in v0.0.5
func (hpu *HostProcessUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HostProcessUpdate) ExecX ¶ added in v0.0.5
func (hpu *HostProcessUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessUpdate) Mutation ¶ added in v0.0.5
func (hpu *HostProcessUpdate) Mutation() *HostProcessMutation
Mutation returns the HostProcessMutation object of the builder.
func (*HostProcessUpdate) Save ¶ added in v0.0.5
func (hpu *HostProcessUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HostProcessUpdate) SaveX ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HostProcessUpdate) SetCmd ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetCmd(s string) *HostProcessUpdate
SetCmd sets the "cmd" field.
func (*HostProcessUpdate) SetCwd ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetCwd(s string) *HostProcessUpdate
SetCwd sets the "cwd" field.
func (*HostProcessUpdate) SetEnv ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetEnv(s string) *HostProcessUpdate
SetEnv sets the "env" field.
func (*HostProcessUpdate) SetHost ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetHost(h *Host) *HostProcessUpdate
SetHost sets the "host" edge to the Host entity.
func (*HostProcessUpdate) SetHostID ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetHostID(id int) *HostProcessUpdate
SetHostID sets the "host" edge to the Host entity by ID.
func (*HostProcessUpdate) SetLastModifiedAt ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetLastModifiedAt(t time.Time) *HostProcessUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostProcessUpdate) SetName ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetName(s string) *HostProcessUpdate
SetName sets the "name" field.
func (*HostProcessUpdate) SetNillableCmd ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetNillableCmd(s *string) *HostProcessUpdate
SetNillableCmd sets the "cmd" field if the given value is not nil.
func (*HostProcessUpdate) SetNillableCwd ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetNillableCwd(s *string) *HostProcessUpdate
SetNillableCwd sets the "cwd" field if the given value is not nil.
func (*HostProcessUpdate) SetNillableEnv ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetNillableEnv(s *string) *HostProcessUpdate
SetNillableEnv sets the "env" field if the given value is not nil.
func (*HostProcessUpdate) SetNillablePath ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetNillablePath(s *string) *HostProcessUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*HostProcessUpdate) SetPath ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetPath(s string) *HostProcessUpdate
SetPath sets the "path" field.
func (*HostProcessUpdate) SetPid ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetPid(u uint64) *HostProcessUpdate
SetPid sets the "pid" field.
func (*HostProcessUpdate) SetPpid ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetPpid(u uint64) *HostProcessUpdate
SetPpid sets the "ppid" field.
func (*HostProcessUpdate) SetPrincipal ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetPrincipal(s string) *HostProcessUpdate
SetPrincipal sets the "principal" field.
func (*HostProcessUpdate) SetStatus ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetStatus(es epb.Process_Status) *HostProcessUpdate
SetStatus sets the "status" field.
func (*HostProcessUpdate) SetTask ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetTask(t *Task) *HostProcessUpdate
SetTask sets the "task" edge to the Task entity.
func (*HostProcessUpdate) SetTaskID ¶ added in v0.0.5
func (hpu *HostProcessUpdate) SetTaskID(id int) *HostProcessUpdate
SetTaskID sets the "task" edge to the Task entity by ID.
func (*HostProcessUpdate) Where ¶ added in v0.0.5
func (hpu *HostProcessUpdate) Where(ps ...predicate.HostProcess) *HostProcessUpdate
Where appends a list predicates to the HostProcessUpdate builder.
type HostProcessUpdateOne ¶ added in v0.0.5
type HostProcessUpdateOne struct {
// contains filtered or unexported fields
}
HostProcessUpdateOne is the builder for updating a single HostProcess entity.
func (*HostProcessUpdateOne) AddPid ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) AddPid(u int64) *HostProcessUpdateOne
AddPid adds u to the "pid" field.
func (*HostProcessUpdateOne) AddPpid ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) AddPpid(u int64) *HostProcessUpdateOne
AddPpid adds u to the "ppid" field.
func (*HostProcessUpdateOne) ClearCmd ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) ClearCmd() *HostProcessUpdateOne
ClearCmd clears the value of the "cmd" field.
func (*HostProcessUpdateOne) ClearCwd ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) ClearCwd() *HostProcessUpdateOne
ClearCwd clears the value of the "cwd" field.
func (*HostProcessUpdateOne) ClearEnv ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) ClearEnv() *HostProcessUpdateOne
ClearEnv clears the value of the "env" field.
func (*HostProcessUpdateOne) ClearHost ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) ClearHost() *HostProcessUpdateOne
ClearHost clears the "host" edge to the Host entity.
func (*HostProcessUpdateOne) ClearPath ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) ClearPath() *HostProcessUpdateOne
ClearPath clears the value of the "path" field.
func (*HostProcessUpdateOne) ClearTask ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) ClearTask() *HostProcessUpdateOne
ClearTask clears the "task" edge to the Task entity.
func (*HostProcessUpdateOne) Exec ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HostProcessUpdateOne) ExecX ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessUpdateOne) Mutation ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) Mutation() *HostProcessMutation
Mutation returns the HostProcessMutation object of the builder.
func (*HostProcessUpdateOne) Save ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) Save(ctx context.Context) (*HostProcess, error)
Save executes the query and returns the updated HostProcess entity.
func (*HostProcessUpdateOne) SaveX ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SaveX(ctx context.Context) *HostProcess
SaveX is like Save, but panics if an error occurs.
func (*HostProcessUpdateOne) Select ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) Select(field string, fields ...string) *HostProcessUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HostProcessUpdateOne) SetCmd ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetCmd(s string) *HostProcessUpdateOne
SetCmd sets the "cmd" field.
func (*HostProcessUpdateOne) SetCwd ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetCwd(s string) *HostProcessUpdateOne
SetCwd sets the "cwd" field.
func (*HostProcessUpdateOne) SetEnv ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetEnv(s string) *HostProcessUpdateOne
SetEnv sets the "env" field.
func (*HostProcessUpdateOne) SetHost ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetHost(h *Host) *HostProcessUpdateOne
SetHost sets the "host" edge to the Host entity.
func (*HostProcessUpdateOne) SetHostID ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetHostID(id int) *HostProcessUpdateOne
SetHostID sets the "host" edge to the Host entity by ID.
func (*HostProcessUpdateOne) SetLastModifiedAt ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetLastModifiedAt(t time.Time) *HostProcessUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostProcessUpdateOne) SetName ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetName(s string) *HostProcessUpdateOne
SetName sets the "name" field.
func (*HostProcessUpdateOne) SetNillableCmd ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetNillableCmd(s *string) *HostProcessUpdateOne
SetNillableCmd sets the "cmd" field if the given value is not nil.
func (*HostProcessUpdateOne) SetNillableCwd ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetNillableCwd(s *string) *HostProcessUpdateOne
SetNillableCwd sets the "cwd" field if the given value is not nil.
func (*HostProcessUpdateOne) SetNillableEnv ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetNillableEnv(s *string) *HostProcessUpdateOne
SetNillableEnv sets the "env" field if the given value is not nil.
func (*HostProcessUpdateOne) SetNillablePath ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetNillablePath(s *string) *HostProcessUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*HostProcessUpdateOne) SetPath ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetPath(s string) *HostProcessUpdateOne
SetPath sets the "path" field.
func (*HostProcessUpdateOne) SetPid ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetPid(u uint64) *HostProcessUpdateOne
SetPid sets the "pid" field.
func (*HostProcessUpdateOne) SetPpid ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetPpid(u uint64) *HostProcessUpdateOne
SetPpid sets the "ppid" field.
func (*HostProcessUpdateOne) SetPrincipal ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetPrincipal(s string) *HostProcessUpdateOne
SetPrincipal sets the "principal" field.
func (*HostProcessUpdateOne) SetStatus ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetStatus(es epb.Process_Status) *HostProcessUpdateOne
SetStatus sets the "status" field.
func (*HostProcessUpdateOne) SetTask ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetTask(t *Task) *HostProcessUpdateOne
SetTask sets the "task" edge to the Task entity.
func (*HostProcessUpdateOne) SetTaskID ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) SetTaskID(id int) *HostProcessUpdateOne
SetTaskID sets the "task" edge to the Task entity by ID.
func (*HostProcessUpdateOne) Where ¶ added in v0.0.5
func (hpuo *HostProcessUpdateOne) Where(ps ...predicate.HostProcess) *HostProcessUpdateOne
Where appends a list predicates to the HostProcessUpdate builder.
type HostProcessUpsert ¶ added in v0.0.5
HostProcessUpsert is the "OnConflict" setter.
func (*HostProcessUpsert) AddPid ¶ added in v0.0.5
func (u *HostProcessUpsert) AddPid(v uint64) *HostProcessUpsert
AddPid adds v to the "pid" field.
func (*HostProcessUpsert) AddPpid ¶ added in v0.0.5
func (u *HostProcessUpsert) AddPpid(v uint64) *HostProcessUpsert
AddPpid adds v to the "ppid" field.
func (*HostProcessUpsert) ClearCmd ¶ added in v0.0.5
func (u *HostProcessUpsert) ClearCmd() *HostProcessUpsert
ClearCmd clears the value of the "cmd" field.
func (*HostProcessUpsert) ClearCwd ¶ added in v0.0.5
func (u *HostProcessUpsert) ClearCwd() *HostProcessUpsert
ClearCwd clears the value of the "cwd" field.
func (*HostProcessUpsert) ClearEnv ¶ added in v0.0.5
func (u *HostProcessUpsert) ClearEnv() *HostProcessUpsert
ClearEnv clears the value of the "env" field.
func (*HostProcessUpsert) ClearPath ¶ added in v0.0.5
func (u *HostProcessUpsert) ClearPath() *HostProcessUpsert
ClearPath clears the value of the "path" field.
func (*HostProcessUpsert) SetCmd ¶ added in v0.0.5
func (u *HostProcessUpsert) SetCmd(v string) *HostProcessUpsert
SetCmd sets the "cmd" field.
func (*HostProcessUpsert) SetCwd ¶ added in v0.0.5
func (u *HostProcessUpsert) SetCwd(v string) *HostProcessUpsert
SetCwd sets the "cwd" field.
func (*HostProcessUpsert) SetEnv ¶ added in v0.0.5
func (u *HostProcessUpsert) SetEnv(v string) *HostProcessUpsert
SetEnv sets the "env" field.
func (*HostProcessUpsert) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostProcessUpsert) SetLastModifiedAt(v time.Time) *HostProcessUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostProcessUpsert) SetName ¶ added in v0.0.5
func (u *HostProcessUpsert) SetName(v string) *HostProcessUpsert
SetName sets the "name" field.
func (*HostProcessUpsert) SetPath ¶ added in v0.0.5
func (u *HostProcessUpsert) SetPath(v string) *HostProcessUpsert
SetPath sets the "path" field.
func (*HostProcessUpsert) SetPid ¶ added in v0.0.5
func (u *HostProcessUpsert) SetPid(v uint64) *HostProcessUpsert
SetPid sets the "pid" field.
func (*HostProcessUpsert) SetPpid ¶ added in v0.0.5
func (u *HostProcessUpsert) SetPpid(v uint64) *HostProcessUpsert
SetPpid sets the "ppid" field.
func (*HostProcessUpsert) SetPrincipal ¶ added in v0.0.5
func (u *HostProcessUpsert) SetPrincipal(v string) *HostProcessUpsert
SetPrincipal sets the "principal" field.
func (*HostProcessUpsert) SetStatus ¶ added in v0.0.5
func (u *HostProcessUpsert) SetStatus(v epb.Process_Status) *HostProcessUpsert
SetStatus sets the "status" field.
func (*HostProcessUpsert) UpdateCmd ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdateCmd() *HostProcessUpsert
UpdateCmd sets the "cmd" field to the value that was provided on create.
func (*HostProcessUpsert) UpdateCwd ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdateCwd() *HostProcessUpsert
UpdateCwd sets the "cwd" field to the value that was provided on create.
func (*HostProcessUpsert) UpdateEnv ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdateEnv() *HostProcessUpsert
UpdateEnv sets the "env" field to the value that was provided on create.
func (*HostProcessUpsert) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdateLastModifiedAt() *HostProcessUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostProcessUpsert) UpdateName ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdateName() *HostProcessUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*HostProcessUpsert) UpdatePath ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdatePath() *HostProcessUpsert
UpdatePath sets the "path" field to the value that was provided on create.
func (*HostProcessUpsert) UpdatePid ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdatePid() *HostProcessUpsert
UpdatePid sets the "pid" field to the value that was provided on create.
func (*HostProcessUpsert) UpdatePpid ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdatePpid() *HostProcessUpsert
UpdatePpid sets the "ppid" field to the value that was provided on create.
func (*HostProcessUpsert) UpdatePrincipal ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdatePrincipal() *HostProcessUpsert
UpdatePrincipal sets the "principal" field to the value that was provided on create.
func (*HostProcessUpsert) UpdateStatus ¶ added in v0.0.5
func (u *HostProcessUpsert) UpdateStatus() *HostProcessUpsert
UpdateStatus sets the "status" field to the value that was provided on create.
type HostProcessUpsertBulk ¶ added in v0.0.5
type HostProcessUpsertBulk struct {
// contains filtered or unexported fields
}
HostProcessUpsertBulk is the builder for "upsert"-ing a bulk of HostProcess nodes.
func (*HostProcessUpsertBulk) AddPid ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) AddPid(v uint64) *HostProcessUpsertBulk
AddPid adds v to the "pid" field.
func (*HostProcessUpsertBulk) AddPpid ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) AddPpid(v uint64) *HostProcessUpsertBulk
AddPpid adds v to the "ppid" field.
func (*HostProcessUpsertBulk) ClearCmd ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) ClearCmd() *HostProcessUpsertBulk
ClearCmd clears the value of the "cmd" field.
func (*HostProcessUpsertBulk) ClearCwd ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) ClearCwd() *HostProcessUpsertBulk
ClearCwd clears the value of the "cwd" field.
func (*HostProcessUpsertBulk) ClearEnv ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) ClearEnv() *HostProcessUpsertBulk
ClearEnv clears the value of the "env" field.
func (*HostProcessUpsertBulk) ClearPath ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) ClearPath() *HostProcessUpsertBulk
ClearPath clears the value of the "path" field.
func (*HostProcessUpsertBulk) DoNothing ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) DoNothing() *HostProcessUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*HostProcessUpsertBulk) Exec ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HostProcessUpsertBulk) ExecX ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessUpsertBulk) Ignore ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) Ignore() *HostProcessUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HostProcess.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*HostProcessUpsertBulk) SetCmd ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetCmd(v string) *HostProcessUpsertBulk
SetCmd sets the "cmd" field.
func (*HostProcessUpsertBulk) SetCwd ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetCwd(v string) *HostProcessUpsertBulk
SetCwd sets the "cwd" field.
func (*HostProcessUpsertBulk) SetEnv ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetEnv(v string) *HostProcessUpsertBulk
SetEnv sets the "env" field.
func (*HostProcessUpsertBulk) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetLastModifiedAt(v time.Time) *HostProcessUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostProcessUpsertBulk) SetName ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetName(v string) *HostProcessUpsertBulk
SetName sets the "name" field.
func (*HostProcessUpsertBulk) SetPath ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetPath(v string) *HostProcessUpsertBulk
SetPath sets the "path" field.
func (*HostProcessUpsertBulk) SetPid ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetPid(v uint64) *HostProcessUpsertBulk
SetPid sets the "pid" field.
func (*HostProcessUpsertBulk) SetPpid ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetPpid(v uint64) *HostProcessUpsertBulk
SetPpid sets the "ppid" field.
func (*HostProcessUpsertBulk) SetPrincipal ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetPrincipal(v string) *HostProcessUpsertBulk
SetPrincipal sets the "principal" field.
func (*HostProcessUpsertBulk) SetStatus ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) SetStatus(v epb.Process_Status) *HostProcessUpsertBulk
SetStatus sets the "status" field.
func (*HostProcessUpsertBulk) Update ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) Update(set func(*HostProcessUpsert)) *HostProcessUpsertBulk
Update allows overriding fields `UPDATE` values. See the HostProcessCreateBulk.OnConflict documentation for more info.
func (*HostProcessUpsertBulk) UpdateCmd ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdateCmd() *HostProcessUpsertBulk
UpdateCmd sets the "cmd" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdateCwd ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdateCwd() *HostProcessUpsertBulk
UpdateCwd sets the "cwd" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdateEnv ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdateEnv() *HostProcessUpsertBulk
UpdateEnv sets the "env" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdateLastModifiedAt() *HostProcessUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdateName ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdateName() *HostProcessUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdateNewValues ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdateNewValues() *HostProcessUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HostProcess.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*HostProcessUpsertBulk) UpdatePath ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdatePath() *HostProcessUpsertBulk
UpdatePath sets the "path" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdatePid ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdatePid() *HostProcessUpsertBulk
UpdatePid sets the "pid" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdatePpid ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdatePpid() *HostProcessUpsertBulk
UpdatePpid sets the "ppid" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdatePrincipal ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdatePrincipal() *HostProcessUpsertBulk
UpdatePrincipal sets the "principal" field to the value that was provided on create.
func (*HostProcessUpsertBulk) UpdateStatus ¶ added in v0.0.5
func (u *HostProcessUpsertBulk) UpdateStatus() *HostProcessUpsertBulk
UpdateStatus sets the "status" field to the value that was provided on create.
type HostProcessUpsertOne ¶ added in v0.0.5
type HostProcessUpsertOne struct {
// contains filtered or unexported fields
}
HostProcessUpsertOne is the builder for "upsert"-ing
one HostProcess node.
func (*HostProcessUpsertOne) AddPid ¶ added in v0.0.5
func (u *HostProcessUpsertOne) AddPid(v uint64) *HostProcessUpsertOne
AddPid adds v to the "pid" field.
func (*HostProcessUpsertOne) AddPpid ¶ added in v0.0.5
func (u *HostProcessUpsertOne) AddPpid(v uint64) *HostProcessUpsertOne
AddPpid adds v to the "ppid" field.
func (*HostProcessUpsertOne) ClearCmd ¶ added in v0.0.5
func (u *HostProcessUpsertOne) ClearCmd() *HostProcessUpsertOne
ClearCmd clears the value of the "cmd" field.
func (*HostProcessUpsertOne) ClearCwd ¶ added in v0.0.5
func (u *HostProcessUpsertOne) ClearCwd() *HostProcessUpsertOne
ClearCwd clears the value of the "cwd" field.
func (*HostProcessUpsertOne) ClearEnv ¶ added in v0.0.5
func (u *HostProcessUpsertOne) ClearEnv() *HostProcessUpsertOne
ClearEnv clears the value of the "env" field.
func (*HostProcessUpsertOne) ClearPath ¶ added in v0.0.5
func (u *HostProcessUpsertOne) ClearPath() *HostProcessUpsertOne
ClearPath clears the value of the "path" field.
func (*HostProcessUpsertOne) DoNothing ¶ added in v0.0.5
func (u *HostProcessUpsertOne) DoNothing() *HostProcessUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*HostProcessUpsertOne) Exec ¶ added in v0.0.5
func (u *HostProcessUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*HostProcessUpsertOne) ExecX ¶ added in v0.0.5
func (u *HostProcessUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostProcessUpsertOne) ID ¶ added in v0.0.5
func (u *HostProcessUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*HostProcessUpsertOne) IDX ¶ added in v0.0.5
func (u *HostProcessUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*HostProcessUpsertOne) Ignore ¶ added in v0.0.5
func (u *HostProcessUpsertOne) Ignore() *HostProcessUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.HostProcess.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*HostProcessUpsertOne) SetCmd ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetCmd(v string) *HostProcessUpsertOne
SetCmd sets the "cmd" field.
func (*HostProcessUpsertOne) SetCwd ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetCwd(v string) *HostProcessUpsertOne
SetCwd sets the "cwd" field.
func (*HostProcessUpsertOne) SetEnv ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetEnv(v string) *HostProcessUpsertOne
SetEnv sets the "env" field.
func (*HostProcessUpsertOne) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetLastModifiedAt(v time.Time) *HostProcessUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostProcessUpsertOne) SetName ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetName(v string) *HostProcessUpsertOne
SetName sets the "name" field.
func (*HostProcessUpsertOne) SetPath ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetPath(v string) *HostProcessUpsertOne
SetPath sets the "path" field.
func (*HostProcessUpsertOne) SetPid ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetPid(v uint64) *HostProcessUpsertOne
SetPid sets the "pid" field.
func (*HostProcessUpsertOne) SetPpid ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetPpid(v uint64) *HostProcessUpsertOne
SetPpid sets the "ppid" field.
func (*HostProcessUpsertOne) SetPrincipal ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetPrincipal(v string) *HostProcessUpsertOne
SetPrincipal sets the "principal" field.
func (*HostProcessUpsertOne) SetStatus ¶ added in v0.0.5
func (u *HostProcessUpsertOne) SetStatus(v epb.Process_Status) *HostProcessUpsertOne
SetStatus sets the "status" field.
func (*HostProcessUpsertOne) Update ¶ added in v0.0.5
func (u *HostProcessUpsertOne) Update(set func(*HostProcessUpsert)) *HostProcessUpsertOne
Update allows overriding fields `UPDATE` values. See the HostProcessCreate.OnConflict documentation for more info.
func (*HostProcessUpsertOne) UpdateCmd ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdateCmd() *HostProcessUpsertOne
UpdateCmd sets the "cmd" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdateCwd ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdateCwd() *HostProcessUpsertOne
UpdateCwd sets the "cwd" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdateEnv ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdateEnv() *HostProcessUpsertOne
UpdateEnv sets the "env" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdateLastModifiedAt() *HostProcessUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdateName ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdateName() *HostProcessUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdateNewValues ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdateNewValues() *HostProcessUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.HostProcess.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*HostProcessUpsertOne) UpdatePath ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdatePath() *HostProcessUpsertOne
UpdatePath sets the "path" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdatePid ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdatePid() *HostProcessUpsertOne
UpdatePid sets the "pid" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdatePpid ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdatePpid() *HostProcessUpsertOne
UpdatePpid sets the "ppid" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdatePrincipal ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdatePrincipal() *HostProcessUpsertOne
UpdatePrincipal sets the "principal" field to the value that was provided on create.
func (*HostProcessUpsertOne) UpdateStatus ¶ added in v0.0.5
func (u *HostProcessUpsertOne) UpdateStatus() *HostProcessUpsertOne
UpdateStatus sets the "status" field to the value that was provided on create.
type HostProcessWhereInput ¶ added in v0.0.5
type HostProcessWhereInput struct { Predicates []predicate.HostProcess `json:"-"` Not *HostProcessWhereInput `json:"not,omitempty"` Or []*HostProcessWhereInput `json:"or,omitempty"` And []*HostProcessWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "pid" field predicates. Pid *uint64 `json:"pid,omitempty"` PidNEQ *uint64 `json:"pidNEQ,omitempty"` PidIn []uint64 `json:"pidIn,omitempty"` PidNotIn []uint64 `json:"pidNotIn,omitempty"` PidGT *uint64 `json:"pidGT,omitempty"` PidGTE *uint64 `json:"pidGTE,omitempty"` PidLT *uint64 `json:"pidLT,omitempty"` PidLTE *uint64 `json:"pidLTE,omitempty"` // "ppid" field predicates. Ppid *uint64 `json:"ppid,omitempty"` PpidNEQ *uint64 `json:"ppidNEQ,omitempty"` PpidIn []uint64 `json:"ppidIn,omitempty"` PpidNotIn []uint64 `json:"ppidNotIn,omitempty"` PpidGT *uint64 `json:"ppidGT,omitempty"` PpidGTE *uint64 `json:"ppidGTE,omitempty"` PpidLT *uint64 `json:"ppidLT,omitempty"` PpidLTE *uint64 `json:"ppidLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "principal" field predicates. Principal *string `json:"principal,omitempty"` PrincipalNEQ *string `json:"principalNEQ,omitempty"` PrincipalIn []string `json:"principalIn,omitempty"` PrincipalNotIn []string `json:"principalNotIn,omitempty"` PrincipalGT *string `json:"principalGT,omitempty"` PrincipalGTE *string `json:"principalGTE,omitempty"` PrincipalLT *string `json:"principalLT,omitempty"` PrincipalLTE *string `json:"principalLTE,omitempty"` PrincipalContains *string `json:"principalContains,omitempty"` PrincipalHasPrefix *string `json:"principalHasPrefix,omitempty"` PrincipalHasSuffix *string `json:"principalHasSuffix,omitempty"` PrincipalEqualFold *string `json:"principalEqualFold,omitempty"` PrincipalContainsFold *string `json:"principalContainsFold,omitempty"` // "path" field predicates. Path *string `json:"path,omitempty"` PathNEQ *string `json:"pathNEQ,omitempty"` PathIn []string `json:"pathIn,omitempty"` PathNotIn []string `json:"pathNotIn,omitempty"` PathGT *string `json:"pathGT,omitempty"` PathGTE *string `json:"pathGTE,omitempty"` PathLT *string `json:"pathLT,omitempty"` PathLTE *string `json:"pathLTE,omitempty"` PathContains *string `json:"pathContains,omitempty"` PathHasPrefix *string `json:"pathHasPrefix,omitempty"` PathHasSuffix *string `json:"pathHasSuffix,omitempty"` PathIsNil bool `json:"pathIsNil,omitempty"` PathNotNil bool `json:"pathNotNil,omitempty"` PathEqualFold *string `json:"pathEqualFold,omitempty"` PathContainsFold *string `json:"pathContainsFold,omitempty"` // "cmd" field predicates. Cmd *string `json:"cmd,omitempty"` CmdNEQ *string `json:"cmdNEQ,omitempty"` CmdIn []string `json:"cmdIn,omitempty"` CmdNotIn []string `json:"cmdNotIn,omitempty"` CmdGT *string `json:"cmdGT,omitempty"` CmdGTE *string `json:"cmdGTE,omitempty"` CmdLT *string `json:"cmdLT,omitempty"` CmdLTE *string `json:"cmdLTE,omitempty"` CmdContains *string `json:"cmdContains,omitempty"` CmdHasPrefix *string `json:"cmdHasPrefix,omitempty"` CmdHasSuffix *string `json:"cmdHasSuffix,omitempty"` CmdIsNil bool `json:"cmdIsNil,omitempty"` CmdNotNil bool `json:"cmdNotNil,omitempty"` CmdEqualFold *string `json:"cmdEqualFold,omitempty"` CmdContainsFold *string `json:"cmdContainsFold,omitempty"` // "env" field predicates. Env *string `json:"env,omitempty"` EnvNEQ *string `json:"envNEQ,omitempty"` EnvIn []string `json:"envIn,omitempty"` EnvNotIn []string `json:"envNotIn,omitempty"` EnvGT *string `json:"envGT,omitempty"` EnvGTE *string `json:"envGTE,omitempty"` EnvLT *string `json:"envLT,omitempty"` EnvLTE *string `json:"envLTE,omitempty"` EnvContains *string `json:"envContains,omitempty"` EnvHasPrefix *string `json:"envHasPrefix,omitempty"` EnvHasSuffix *string `json:"envHasSuffix,omitempty"` EnvIsNil bool `json:"envIsNil,omitempty"` EnvNotNil bool `json:"envNotNil,omitempty"` EnvEqualFold *string `json:"envEqualFold,omitempty"` EnvContainsFold *string `json:"envContainsFold,omitempty"` // "cwd" field predicates. Cwd *string `json:"cwd,omitempty"` CwdNEQ *string `json:"cwdNEQ,omitempty"` CwdIn []string `json:"cwdIn,omitempty"` CwdNotIn []string `json:"cwdNotIn,omitempty"` CwdGT *string `json:"cwdGT,omitempty"` CwdGTE *string `json:"cwdGTE,omitempty"` CwdLT *string `json:"cwdLT,omitempty"` CwdLTE *string `json:"cwdLTE,omitempty"` CwdContains *string `json:"cwdContains,omitempty"` CwdHasPrefix *string `json:"cwdHasPrefix,omitempty"` CwdHasSuffix *string `json:"cwdHasSuffix,omitempty"` CwdIsNil bool `json:"cwdIsNil,omitempty"` CwdNotNil bool `json:"cwdNotNil,omitempty"` CwdEqualFold *string `json:"cwdEqualFold,omitempty"` CwdContainsFold *string `json:"cwdContainsFold,omitempty"` // "status" field predicates. Status *epb.Process_Status `json:"status,omitempty"` StatusNEQ *epb.Process_Status `json:"statusNEQ,omitempty"` StatusIn []epb.Process_Status `json:"statusIn,omitempty"` StatusNotIn []epb.Process_Status `json:"statusNotIn,omitempty"` // "host" edge predicates. HasHost *bool `json:"hasHost,omitempty"` HasHostWith []*HostWhereInput `json:"hasHostWith,omitempty"` // "task" edge predicates. HasTask *bool `json:"hasTask,omitempty"` HasTaskWith []*TaskWhereInput `json:"hasTaskWith,omitempty"` }
HostProcessWhereInput represents a where input for filtering HostProcess queries.
func (*HostProcessWhereInput) AddPredicates ¶ added in v0.0.5
func (i *HostProcessWhereInput) AddPredicates(predicates ...predicate.HostProcess)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*HostProcessWhereInput) Filter ¶ added in v0.0.5
func (i *HostProcessWhereInput) Filter(q *HostProcessQuery) (*HostProcessQuery, error)
Filter applies the HostProcessWhereInput filter on the HostProcessQuery builder.
func (*HostProcessWhereInput) P ¶ added in v0.0.5
func (i *HostProcessWhereInput) P() (predicate.HostProcess, error)
P returns a predicate for filtering hostprocesses. An error is returned if the input is empty or invalid.
type HostProcesses ¶ added in v0.0.5
type HostProcesses []*HostProcess
HostProcesses is a parsable slice of HostProcess.
type HostQuery ¶
type HostQuery struct {
// contains filtered or unexported fields
}
HostQuery is the builder for querying Host entities.
func (*HostQuery) Aggregate ¶
func (hq *HostQuery) Aggregate(fns ...AggregateFunc) *HostSelect
Aggregate returns a HostSelect configured with the given aggregations.
func (*HostQuery) Clone ¶
Clone returns a duplicate of the HostQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*HostQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*HostQuery) First ¶
First returns the first Host entity from the query. Returns a *NotFoundError when no Host was found.
func (*HostQuery) FirstID ¶
FirstID returns the first Host ID from the query. Returns a *NotFoundError when no Host ID was found.
func (*HostQuery) GroupBy ¶
func (hq *HostQuery) GroupBy(field string, fields ...string) *HostGroupBy
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.Host.Query(). GroupBy(host.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*HostQuery) Only ¶
Only returns a single Host entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Host entity is found. Returns a *NotFoundError when no Host entities are found.
func (*HostQuery) OnlyID ¶
OnlyID is like Only, but returns the only Host ID in the query. Returns a *NotSingularError when more than one Host ID is found. Returns a *NotFoundError when no entities are found.
func (*HostQuery) Order ¶
func (hq *HostQuery) Order(o ...host.OrderOption) *HostQuery
Order specifies how the records should be ordered.
func (*HostQuery) Paginate ¶
func (h *HostQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...HostPaginateOption, ) (*HostConnection, error)
Paginate executes the query and returns a relay based cursor connection to Host.
func (*HostQuery) QueryBeacons ¶
func (hq *HostQuery) QueryBeacons() *BeaconQuery
QueryBeacons chains the current query on the "beacons" edge.
func (*HostQuery) QueryFiles ¶ added in v0.0.5
func (hq *HostQuery) QueryFiles() *HostFileQuery
QueryFiles chains the current query on the "files" edge.
func (*HostQuery) QueryProcesses ¶ added in v0.0.5
func (hq *HostQuery) QueryProcesses() *HostProcessQuery
QueryProcesses chains the current query on the "processes" edge.
func (*HostQuery) Select ¶
func (hq *HostQuery) Select(fields ...string) *HostSelect
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.Host.Query(). Select(host.FieldCreatedAt). Scan(ctx, &v)
func (*HostQuery) Unique ¶
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 (*HostQuery) WithBeacons ¶
func (hq *HostQuery) WithBeacons(opts ...func(*BeaconQuery)) *HostQuery
WithBeacons tells the query-builder to eager-load the nodes that are connected to the "beacons" edge. The optional arguments are used to configure the query builder of the edge.
func (*HostQuery) WithFiles ¶ added in v0.0.5
func (hq *HostQuery) WithFiles(opts ...func(*HostFileQuery)) *HostQuery
WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.
func (*HostQuery) WithNamedBeacons ¶
func (hq *HostQuery) WithNamedBeacons(name string, opts ...func(*BeaconQuery)) *HostQuery
WithNamedBeacons tells the query-builder to eager-load the nodes that are connected to the "beacons" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*HostQuery) WithNamedFiles ¶ added in v0.0.5
func (hq *HostQuery) WithNamedFiles(name string, opts ...func(*HostFileQuery)) *HostQuery
WithNamedFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*HostQuery) WithNamedProcesses ¶ added in v0.0.5
func (hq *HostQuery) WithNamedProcesses(name string, opts ...func(*HostProcessQuery)) *HostQuery
WithNamedProcesses tells the query-builder to eager-load the nodes that are connected to the "processes" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*HostQuery) WithNamedTags ¶
WithNamedTags tells the query-builder to eager-load the nodes that are connected to the "tags" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*HostQuery) WithProcesses ¶ added in v0.0.5
func (hq *HostQuery) WithProcesses(opts ...func(*HostProcessQuery)) *HostQuery
WithProcesses tells the query-builder to eager-load the nodes that are connected to the "processes" edge. The optional arguments are used to configure the query builder of the edge.
type HostSelect ¶
type HostSelect struct { *HostQuery // contains filtered or unexported fields }
HostSelect is the builder for selecting fields of Host entities.
func (*HostSelect) Aggregate ¶
func (hs *HostSelect) Aggregate(fns ...AggregateFunc) *HostSelect
Aggregate adds the given aggregation functions to the selector query.
func (*HostSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*HostSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*HostSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*HostSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*HostSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*HostSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*HostSelect) Scan ¶
func (hs *HostSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*HostSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type HostUpdate ¶
type HostUpdate struct {
// contains filtered or unexported fields
}
HostUpdate is the builder for updating Host entities.
func (*HostUpdate) AddBeaconIDs ¶
func (hu *HostUpdate) AddBeaconIDs(ids ...int) *HostUpdate
AddBeaconIDs adds the "beacons" edge to the Beacon entity by IDs.
func (*HostUpdate) AddBeacons ¶
func (hu *HostUpdate) AddBeacons(b ...*Beacon) *HostUpdate
AddBeacons adds the "beacons" edges to the Beacon entity.
func (*HostUpdate) AddFileIDs ¶ added in v0.0.5
func (hu *HostUpdate) AddFileIDs(ids ...int) *HostUpdate
AddFileIDs adds the "files" edge to the HostFile entity by IDs.
func (*HostUpdate) AddFiles ¶ added in v0.0.5
func (hu *HostUpdate) AddFiles(h ...*HostFile) *HostUpdate
AddFiles adds the "files" edges to the HostFile entity.
func (*HostUpdate) AddProcessIDs ¶ added in v0.0.5
func (hu *HostUpdate) AddProcessIDs(ids ...int) *HostUpdate
AddProcessIDs adds the "processes" edge to the HostProcess entity by IDs.
func (*HostUpdate) AddProcesses ¶ added in v0.0.5
func (hu *HostUpdate) AddProcesses(h ...*HostProcess) *HostUpdate
AddProcesses adds the "processes" edges to the HostProcess entity.
func (*HostUpdate) AddTagIDs ¶
func (hu *HostUpdate) AddTagIDs(ids ...int) *HostUpdate
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*HostUpdate) AddTags ¶
func (hu *HostUpdate) AddTags(t ...*Tag) *HostUpdate
AddTags adds the "tags" edges to the Tag entity.
func (*HostUpdate) ClearBeacons ¶
func (hu *HostUpdate) ClearBeacons() *HostUpdate
ClearBeacons clears all "beacons" edges to the Beacon entity.
func (*HostUpdate) ClearFiles ¶ added in v0.0.5
func (hu *HostUpdate) ClearFiles() *HostUpdate
ClearFiles clears all "files" edges to the HostFile entity.
func (*HostUpdate) ClearLastSeenAt ¶
func (hu *HostUpdate) ClearLastSeenAt() *HostUpdate
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*HostUpdate) ClearName ¶
func (hu *HostUpdate) ClearName() *HostUpdate
ClearName clears the value of the "name" field.
func (*HostUpdate) ClearPrimaryIP ¶
func (hu *HostUpdate) ClearPrimaryIP() *HostUpdate
ClearPrimaryIP clears the value of the "primary_ip" field.
func (*HostUpdate) ClearProcesses ¶ added in v0.0.5
func (hu *HostUpdate) ClearProcesses() *HostUpdate
ClearProcesses clears all "processes" edges to the HostProcess entity.
func (*HostUpdate) ClearTags ¶
func (hu *HostUpdate) ClearTags() *HostUpdate
ClearTags clears all "tags" edges to the Tag entity.
func (*HostUpdate) Exec ¶
func (hu *HostUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*HostUpdate) ExecX ¶
func (hu *HostUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostUpdate) Mutation ¶
func (hu *HostUpdate) Mutation() *HostMutation
Mutation returns the HostMutation object of the builder.
func (*HostUpdate) RemoveBeaconIDs ¶
func (hu *HostUpdate) RemoveBeaconIDs(ids ...int) *HostUpdate
RemoveBeaconIDs removes the "beacons" edge to Beacon entities by IDs.
func (*HostUpdate) RemoveBeacons ¶
func (hu *HostUpdate) RemoveBeacons(b ...*Beacon) *HostUpdate
RemoveBeacons removes "beacons" edges to Beacon entities.
func (*HostUpdate) RemoveFileIDs ¶ added in v0.0.5
func (hu *HostUpdate) RemoveFileIDs(ids ...int) *HostUpdate
RemoveFileIDs removes the "files" edge to HostFile entities by IDs.
func (*HostUpdate) RemoveFiles ¶ added in v0.0.5
func (hu *HostUpdate) RemoveFiles(h ...*HostFile) *HostUpdate
RemoveFiles removes "files" edges to HostFile entities.
func (*HostUpdate) RemoveProcessIDs ¶ added in v0.0.5
func (hu *HostUpdate) RemoveProcessIDs(ids ...int) *HostUpdate
RemoveProcessIDs removes the "processes" edge to HostProcess entities by IDs.
func (*HostUpdate) RemoveProcesses ¶ added in v0.0.5
func (hu *HostUpdate) RemoveProcesses(h ...*HostProcess) *HostUpdate
RemoveProcesses removes "processes" edges to HostProcess entities.
func (*HostUpdate) RemoveTagIDs ¶
func (hu *HostUpdate) RemoveTagIDs(ids ...int) *HostUpdate
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*HostUpdate) RemoveTags ¶
func (hu *HostUpdate) RemoveTags(t ...*Tag) *HostUpdate
RemoveTags removes "tags" edges to Tag entities.
func (*HostUpdate) Save ¶
func (hu *HostUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*HostUpdate) SaveX ¶
func (hu *HostUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*HostUpdate) SetIdentifier ¶
func (hu *HostUpdate) SetIdentifier(s string) *HostUpdate
SetIdentifier sets the "identifier" field.
func (*HostUpdate) SetInput ¶
func (c *HostUpdate) SetInput(i UpdateHostInput) *HostUpdate
SetInput applies the change-set in the UpdateHostInput on the HostUpdate builder.
func (*HostUpdate) SetLastModifiedAt ¶ added in v0.0.5
func (hu *HostUpdate) SetLastModifiedAt(t time.Time) *HostUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostUpdate) SetLastSeenAt ¶
func (hu *HostUpdate) SetLastSeenAt(t time.Time) *HostUpdate
SetLastSeenAt sets the "last_seen_at" field.
func (*HostUpdate) SetName ¶
func (hu *HostUpdate) SetName(s string) *HostUpdate
SetName sets the "name" field.
func (*HostUpdate) SetNillableLastSeenAt ¶
func (hu *HostUpdate) SetNillableLastSeenAt(t *time.Time) *HostUpdate
SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.
func (*HostUpdate) SetNillableName ¶
func (hu *HostUpdate) SetNillableName(s *string) *HostUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*HostUpdate) SetNillablePrimaryIP ¶
func (hu *HostUpdate) SetNillablePrimaryIP(s *string) *HostUpdate
SetNillablePrimaryIP sets the "primary_ip" field if the given value is not nil.
func (*HostUpdate) SetPlatform ¶
func (hu *HostUpdate) SetPlatform(cp c2pb.Host_Platform) *HostUpdate
SetPlatform sets the "platform" field.
func (*HostUpdate) SetPrimaryIP ¶
func (hu *HostUpdate) SetPrimaryIP(s string) *HostUpdate
SetPrimaryIP sets the "primary_ip" field.
func (*HostUpdate) Where ¶
func (hu *HostUpdate) Where(ps ...predicate.Host) *HostUpdate
Where appends a list predicates to the HostUpdate builder.
type HostUpdateOne ¶
type HostUpdateOne struct {
// contains filtered or unexported fields
}
HostUpdateOne is the builder for updating a single Host entity.
func (*HostUpdateOne) AddBeaconIDs ¶
func (huo *HostUpdateOne) AddBeaconIDs(ids ...int) *HostUpdateOne
AddBeaconIDs adds the "beacons" edge to the Beacon entity by IDs.
func (*HostUpdateOne) AddBeacons ¶
func (huo *HostUpdateOne) AddBeacons(b ...*Beacon) *HostUpdateOne
AddBeacons adds the "beacons" edges to the Beacon entity.
func (*HostUpdateOne) AddFileIDs ¶ added in v0.0.5
func (huo *HostUpdateOne) AddFileIDs(ids ...int) *HostUpdateOne
AddFileIDs adds the "files" edge to the HostFile entity by IDs.
func (*HostUpdateOne) AddFiles ¶ added in v0.0.5
func (huo *HostUpdateOne) AddFiles(h ...*HostFile) *HostUpdateOne
AddFiles adds the "files" edges to the HostFile entity.
func (*HostUpdateOne) AddProcessIDs ¶ added in v0.0.5
func (huo *HostUpdateOne) AddProcessIDs(ids ...int) *HostUpdateOne
AddProcessIDs adds the "processes" edge to the HostProcess entity by IDs.
func (*HostUpdateOne) AddProcesses ¶ added in v0.0.5
func (huo *HostUpdateOne) AddProcesses(h ...*HostProcess) *HostUpdateOne
AddProcesses adds the "processes" edges to the HostProcess entity.
func (*HostUpdateOne) AddTagIDs ¶
func (huo *HostUpdateOne) AddTagIDs(ids ...int) *HostUpdateOne
AddTagIDs adds the "tags" edge to the Tag entity by IDs.
func (*HostUpdateOne) AddTags ¶
func (huo *HostUpdateOne) AddTags(t ...*Tag) *HostUpdateOne
AddTags adds the "tags" edges to the Tag entity.
func (*HostUpdateOne) ClearBeacons ¶
func (huo *HostUpdateOne) ClearBeacons() *HostUpdateOne
ClearBeacons clears all "beacons" edges to the Beacon entity.
func (*HostUpdateOne) ClearFiles ¶ added in v0.0.5
func (huo *HostUpdateOne) ClearFiles() *HostUpdateOne
ClearFiles clears all "files" edges to the HostFile entity.
func (*HostUpdateOne) ClearLastSeenAt ¶
func (huo *HostUpdateOne) ClearLastSeenAt() *HostUpdateOne
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*HostUpdateOne) ClearName ¶
func (huo *HostUpdateOne) ClearName() *HostUpdateOne
ClearName clears the value of the "name" field.
func (*HostUpdateOne) ClearPrimaryIP ¶
func (huo *HostUpdateOne) ClearPrimaryIP() *HostUpdateOne
ClearPrimaryIP clears the value of the "primary_ip" field.
func (*HostUpdateOne) ClearProcesses ¶ added in v0.0.5
func (huo *HostUpdateOne) ClearProcesses() *HostUpdateOne
ClearProcesses clears all "processes" edges to the HostProcess entity.
func (*HostUpdateOne) ClearTags ¶
func (huo *HostUpdateOne) ClearTags() *HostUpdateOne
ClearTags clears all "tags" edges to the Tag entity.
func (*HostUpdateOne) Exec ¶
func (huo *HostUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*HostUpdateOne) ExecX ¶
func (huo *HostUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostUpdateOne) Mutation ¶
func (huo *HostUpdateOne) Mutation() *HostMutation
Mutation returns the HostMutation object of the builder.
func (*HostUpdateOne) RemoveBeaconIDs ¶
func (huo *HostUpdateOne) RemoveBeaconIDs(ids ...int) *HostUpdateOne
RemoveBeaconIDs removes the "beacons" edge to Beacon entities by IDs.
func (*HostUpdateOne) RemoveBeacons ¶
func (huo *HostUpdateOne) RemoveBeacons(b ...*Beacon) *HostUpdateOne
RemoveBeacons removes "beacons" edges to Beacon entities.
func (*HostUpdateOne) RemoveFileIDs ¶ added in v0.0.5
func (huo *HostUpdateOne) RemoveFileIDs(ids ...int) *HostUpdateOne
RemoveFileIDs removes the "files" edge to HostFile entities by IDs.
func (*HostUpdateOne) RemoveFiles ¶ added in v0.0.5
func (huo *HostUpdateOne) RemoveFiles(h ...*HostFile) *HostUpdateOne
RemoveFiles removes "files" edges to HostFile entities.
func (*HostUpdateOne) RemoveProcessIDs ¶ added in v0.0.5
func (huo *HostUpdateOne) RemoveProcessIDs(ids ...int) *HostUpdateOne
RemoveProcessIDs removes the "processes" edge to HostProcess entities by IDs.
func (*HostUpdateOne) RemoveProcesses ¶ added in v0.0.5
func (huo *HostUpdateOne) RemoveProcesses(h ...*HostProcess) *HostUpdateOne
RemoveProcesses removes "processes" edges to HostProcess entities.
func (*HostUpdateOne) RemoveTagIDs ¶
func (huo *HostUpdateOne) RemoveTagIDs(ids ...int) *HostUpdateOne
RemoveTagIDs removes the "tags" edge to Tag entities by IDs.
func (*HostUpdateOne) RemoveTags ¶
func (huo *HostUpdateOne) RemoveTags(t ...*Tag) *HostUpdateOne
RemoveTags removes "tags" edges to Tag entities.
func (*HostUpdateOne) Save ¶
func (huo *HostUpdateOne) Save(ctx context.Context) (*Host, error)
Save executes the query and returns the updated Host entity.
func (*HostUpdateOne) SaveX ¶
func (huo *HostUpdateOne) SaveX(ctx context.Context) *Host
SaveX is like Save, but panics if an error occurs.
func (*HostUpdateOne) Select ¶
func (huo *HostUpdateOne) Select(field string, fields ...string) *HostUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*HostUpdateOne) SetIdentifier ¶
func (huo *HostUpdateOne) SetIdentifier(s string) *HostUpdateOne
SetIdentifier sets the "identifier" field.
func (*HostUpdateOne) SetInput ¶
func (c *HostUpdateOne) SetInput(i UpdateHostInput) *HostUpdateOne
SetInput applies the change-set in the UpdateHostInput on the HostUpdateOne builder.
func (*HostUpdateOne) SetLastModifiedAt ¶ added in v0.0.5
func (huo *HostUpdateOne) SetLastModifiedAt(t time.Time) *HostUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostUpdateOne) SetLastSeenAt ¶
func (huo *HostUpdateOne) SetLastSeenAt(t time.Time) *HostUpdateOne
SetLastSeenAt sets the "last_seen_at" field.
func (*HostUpdateOne) SetName ¶
func (huo *HostUpdateOne) SetName(s string) *HostUpdateOne
SetName sets the "name" field.
func (*HostUpdateOne) SetNillableLastSeenAt ¶
func (huo *HostUpdateOne) SetNillableLastSeenAt(t *time.Time) *HostUpdateOne
SetNillableLastSeenAt sets the "last_seen_at" field if the given value is not nil.
func (*HostUpdateOne) SetNillableName ¶
func (huo *HostUpdateOne) SetNillableName(s *string) *HostUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*HostUpdateOne) SetNillablePrimaryIP ¶
func (huo *HostUpdateOne) SetNillablePrimaryIP(s *string) *HostUpdateOne
SetNillablePrimaryIP sets the "primary_ip" field if the given value is not nil.
func (*HostUpdateOne) SetPlatform ¶
func (huo *HostUpdateOne) SetPlatform(cp c2pb.Host_Platform) *HostUpdateOne
SetPlatform sets the "platform" field.
func (*HostUpdateOne) SetPrimaryIP ¶
func (huo *HostUpdateOne) SetPrimaryIP(s string) *HostUpdateOne
SetPrimaryIP sets the "primary_ip" field.
func (*HostUpdateOne) Where ¶
func (huo *HostUpdateOne) Where(ps ...predicate.Host) *HostUpdateOne
Where appends a list predicates to the HostUpdate builder.
type HostUpsert ¶
HostUpsert is the "OnConflict" setter.
func (*HostUpsert) ClearLastSeenAt ¶
func (u *HostUpsert) ClearLastSeenAt() *HostUpsert
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*HostUpsert) ClearName ¶
func (u *HostUpsert) ClearName() *HostUpsert
ClearName clears the value of the "name" field.
func (*HostUpsert) ClearPrimaryIP ¶
func (u *HostUpsert) ClearPrimaryIP() *HostUpsert
ClearPrimaryIP clears the value of the "primary_ip" field.
func (*HostUpsert) SetIdentifier ¶
func (u *HostUpsert) SetIdentifier(v string) *HostUpsert
SetIdentifier sets the "identifier" field.
func (*HostUpsert) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostUpsert) SetLastModifiedAt(v time.Time) *HostUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostUpsert) SetLastSeenAt ¶
func (u *HostUpsert) SetLastSeenAt(v time.Time) *HostUpsert
SetLastSeenAt sets the "last_seen_at" field.
func (*HostUpsert) SetName ¶
func (u *HostUpsert) SetName(v string) *HostUpsert
SetName sets the "name" field.
func (*HostUpsert) SetPlatform ¶
func (u *HostUpsert) SetPlatform(v c2pb.Host_Platform) *HostUpsert
SetPlatform sets the "platform" field.
func (*HostUpsert) SetPrimaryIP ¶
func (u *HostUpsert) SetPrimaryIP(v string) *HostUpsert
SetPrimaryIP sets the "primary_ip" field.
func (*HostUpsert) UpdateIdentifier ¶
func (u *HostUpsert) UpdateIdentifier() *HostUpsert
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*HostUpsert) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostUpsert) UpdateLastModifiedAt() *HostUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostUpsert) UpdateLastSeenAt ¶
func (u *HostUpsert) UpdateLastSeenAt() *HostUpsert
UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.
func (*HostUpsert) UpdateName ¶
func (u *HostUpsert) UpdateName() *HostUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*HostUpsert) UpdatePlatform ¶
func (u *HostUpsert) UpdatePlatform() *HostUpsert
UpdatePlatform sets the "platform" field to the value that was provided on create.
func (*HostUpsert) UpdatePrimaryIP ¶
func (u *HostUpsert) UpdatePrimaryIP() *HostUpsert
UpdatePrimaryIP sets the "primary_ip" field to the value that was provided on create.
type HostUpsertBulk ¶
type HostUpsertBulk struct {
// contains filtered or unexported fields
}
HostUpsertBulk is the builder for "upsert"-ing a bulk of Host nodes.
func (*HostUpsertBulk) ClearLastSeenAt ¶
func (u *HostUpsertBulk) ClearLastSeenAt() *HostUpsertBulk
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*HostUpsertBulk) ClearName ¶
func (u *HostUpsertBulk) ClearName() *HostUpsertBulk
ClearName clears the value of the "name" field.
func (*HostUpsertBulk) ClearPrimaryIP ¶
func (u *HostUpsertBulk) ClearPrimaryIP() *HostUpsertBulk
ClearPrimaryIP clears the value of the "primary_ip" field.
func (*HostUpsertBulk) DoNothing ¶
func (u *HostUpsertBulk) DoNothing() *HostUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*HostUpsertBulk) Exec ¶
func (u *HostUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*HostUpsertBulk) ExecX ¶
func (u *HostUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostUpsertBulk) Ignore ¶
func (u *HostUpsertBulk) Ignore() *HostUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Host.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*HostUpsertBulk) SetIdentifier ¶
func (u *HostUpsertBulk) SetIdentifier(v string) *HostUpsertBulk
SetIdentifier sets the "identifier" field.
func (*HostUpsertBulk) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostUpsertBulk) SetLastModifiedAt(v time.Time) *HostUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostUpsertBulk) SetLastSeenAt ¶
func (u *HostUpsertBulk) SetLastSeenAt(v time.Time) *HostUpsertBulk
SetLastSeenAt sets the "last_seen_at" field.
func (*HostUpsertBulk) SetName ¶
func (u *HostUpsertBulk) SetName(v string) *HostUpsertBulk
SetName sets the "name" field.
func (*HostUpsertBulk) SetPlatform ¶
func (u *HostUpsertBulk) SetPlatform(v c2pb.Host_Platform) *HostUpsertBulk
SetPlatform sets the "platform" field.
func (*HostUpsertBulk) SetPrimaryIP ¶
func (u *HostUpsertBulk) SetPrimaryIP(v string) *HostUpsertBulk
SetPrimaryIP sets the "primary_ip" field.
func (*HostUpsertBulk) Update ¶
func (u *HostUpsertBulk) Update(set func(*HostUpsert)) *HostUpsertBulk
Update allows overriding fields `UPDATE` values. See the HostCreateBulk.OnConflict documentation for more info.
func (*HostUpsertBulk) UpdateIdentifier ¶
func (u *HostUpsertBulk) UpdateIdentifier() *HostUpsertBulk
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*HostUpsertBulk) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostUpsertBulk) UpdateLastModifiedAt() *HostUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostUpsertBulk) UpdateLastSeenAt ¶
func (u *HostUpsertBulk) UpdateLastSeenAt() *HostUpsertBulk
UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.
func (*HostUpsertBulk) UpdateName ¶
func (u *HostUpsertBulk) UpdateName() *HostUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*HostUpsertBulk) UpdateNewValues ¶
func (u *HostUpsertBulk) UpdateNewValues() *HostUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Host.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*HostUpsertBulk) UpdatePlatform ¶
func (u *HostUpsertBulk) UpdatePlatform() *HostUpsertBulk
UpdatePlatform sets the "platform" field to the value that was provided on create.
func (*HostUpsertBulk) UpdatePrimaryIP ¶
func (u *HostUpsertBulk) UpdatePrimaryIP() *HostUpsertBulk
UpdatePrimaryIP sets the "primary_ip" field to the value that was provided on create.
type HostUpsertOne ¶
type HostUpsertOne struct {
// contains filtered or unexported fields
}
HostUpsertOne is the builder for "upsert"-ing
one Host node.
func (*HostUpsertOne) ClearLastSeenAt ¶
func (u *HostUpsertOne) ClearLastSeenAt() *HostUpsertOne
ClearLastSeenAt clears the value of the "last_seen_at" field.
func (*HostUpsertOne) ClearName ¶
func (u *HostUpsertOne) ClearName() *HostUpsertOne
ClearName clears the value of the "name" field.
func (*HostUpsertOne) ClearPrimaryIP ¶
func (u *HostUpsertOne) ClearPrimaryIP() *HostUpsertOne
ClearPrimaryIP clears the value of the "primary_ip" field.
func (*HostUpsertOne) DoNothing ¶
func (u *HostUpsertOne) DoNothing() *HostUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*HostUpsertOne) Exec ¶
func (u *HostUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*HostUpsertOne) ExecX ¶
func (u *HostUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*HostUpsertOne) ID ¶
func (u *HostUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*HostUpsertOne) IDX ¶
func (u *HostUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*HostUpsertOne) Ignore ¶
func (u *HostUpsertOne) Ignore() *HostUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Host.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*HostUpsertOne) SetIdentifier ¶
func (u *HostUpsertOne) SetIdentifier(v string) *HostUpsertOne
SetIdentifier sets the "identifier" field.
func (*HostUpsertOne) SetLastModifiedAt ¶ added in v0.0.5
func (u *HostUpsertOne) SetLastModifiedAt(v time.Time) *HostUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*HostUpsertOne) SetLastSeenAt ¶
func (u *HostUpsertOne) SetLastSeenAt(v time.Time) *HostUpsertOne
SetLastSeenAt sets the "last_seen_at" field.
func (*HostUpsertOne) SetName ¶
func (u *HostUpsertOne) SetName(v string) *HostUpsertOne
SetName sets the "name" field.
func (*HostUpsertOne) SetPlatform ¶
func (u *HostUpsertOne) SetPlatform(v c2pb.Host_Platform) *HostUpsertOne
SetPlatform sets the "platform" field.
func (*HostUpsertOne) SetPrimaryIP ¶
func (u *HostUpsertOne) SetPrimaryIP(v string) *HostUpsertOne
SetPrimaryIP sets the "primary_ip" field.
func (*HostUpsertOne) Update ¶
func (u *HostUpsertOne) Update(set func(*HostUpsert)) *HostUpsertOne
Update allows overriding fields `UPDATE` values. See the HostCreate.OnConflict documentation for more info.
func (*HostUpsertOne) UpdateIdentifier ¶
func (u *HostUpsertOne) UpdateIdentifier() *HostUpsertOne
UpdateIdentifier sets the "identifier" field to the value that was provided on create.
func (*HostUpsertOne) UpdateLastModifiedAt ¶ added in v0.0.5
func (u *HostUpsertOne) UpdateLastModifiedAt() *HostUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*HostUpsertOne) UpdateLastSeenAt ¶
func (u *HostUpsertOne) UpdateLastSeenAt() *HostUpsertOne
UpdateLastSeenAt sets the "last_seen_at" field to the value that was provided on create.
func (*HostUpsertOne) UpdateName ¶
func (u *HostUpsertOne) UpdateName() *HostUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*HostUpsertOne) UpdateNewValues ¶
func (u *HostUpsertOne) UpdateNewValues() *HostUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Host.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*HostUpsertOne) UpdatePlatform ¶
func (u *HostUpsertOne) UpdatePlatform() *HostUpsertOne
UpdatePlatform sets the "platform" field to the value that was provided on create.
func (*HostUpsertOne) UpdatePrimaryIP ¶
func (u *HostUpsertOne) UpdatePrimaryIP() *HostUpsertOne
UpdatePrimaryIP sets the "primary_ip" field to the value that was provided on create.
type HostWhereInput ¶
type HostWhereInput struct { Predicates []predicate.Host `json:"-"` Not *HostWhereInput `json:"not,omitempty"` Or []*HostWhereInput `json:"or,omitempty"` And []*HostWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "identifier" field predicates. Identifier *string `json:"identifier,omitempty"` IdentifierNEQ *string `json:"identifierNEQ,omitempty"` IdentifierIn []string `json:"identifierIn,omitempty"` IdentifierNotIn []string `json:"identifierNotIn,omitempty"` IdentifierGT *string `json:"identifierGT,omitempty"` IdentifierGTE *string `json:"identifierGTE,omitempty"` IdentifierLT *string `json:"identifierLT,omitempty"` IdentifierLTE *string `json:"identifierLTE,omitempty"` IdentifierContains *string `json:"identifierContains,omitempty"` IdentifierHasPrefix *string `json:"identifierHasPrefix,omitempty"` IdentifierHasSuffix *string `json:"identifierHasSuffix,omitempty"` IdentifierEqualFold *string `json:"identifierEqualFold,omitempty"` IdentifierContainsFold *string `json:"identifierContainsFold,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameIsNil bool `json:"nameIsNil,omitempty"` NameNotNil bool `json:"nameNotNil,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "primary_ip" field predicates. PrimaryIP *string `json:"primaryIP,omitempty"` PrimaryIPNEQ *string `json:"primaryIPNEQ,omitempty"` PrimaryIPIn []string `json:"primaryIPIn,omitempty"` PrimaryIPNotIn []string `json:"primaryIPNotIn,omitempty"` PrimaryIPGT *string `json:"primaryIPGT,omitempty"` PrimaryIPGTE *string `json:"primaryIPGTE,omitempty"` PrimaryIPLT *string `json:"primaryIPLT,omitempty"` PrimaryIPLTE *string `json:"primaryIPLTE,omitempty"` PrimaryIPContains *string `json:"primaryIPContains,omitempty"` PrimaryIPHasPrefix *string `json:"primaryIPHasPrefix,omitempty"` PrimaryIPHasSuffix *string `json:"primaryIPHasSuffix,omitempty"` PrimaryIPIsNil bool `json:"primaryIPIsNil,omitempty"` PrimaryIPNotNil bool `json:"primaryIPNotNil,omitempty"` PrimaryIPEqualFold *string `json:"primaryIPEqualFold,omitempty"` PrimaryIPContainsFold *string `json:"primaryIPContainsFold,omitempty"` // "platform" field predicates. Platform *c2pb.Host_Platform `json:"platform,omitempty"` PlatformNEQ *c2pb.Host_Platform `json:"platformNEQ,omitempty"` PlatformIn []c2pb.Host_Platform `json:"platformIn,omitempty"` PlatformNotIn []c2pb.Host_Platform `json:"platformNotIn,omitempty"` // "last_seen_at" field predicates. LastSeenAt *time.Time `json:"lastSeenAt,omitempty"` LastSeenAtNEQ *time.Time `json:"lastSeenAtNEQ,omitempty"` LastSeenAtIn []time.Time `json:"lastSeenAtIn,omitempty"` LastSeenAtNotIn []time.Time `json:"lastSeenAtNotIn,omitempty"` LastSeenAtGT *time.Time `json:"lastSeenAtGT,omitempty"` LastSeenAtGTE *time.Time `json:"lastSeenAtGTE,omitempty"` LastSeenAtLT *time.Time `json:"lastSeenAtLT,omitempty"` LastSeenAtLTE *time.Time `json:"lastSeenAtLTE,omitempty"` LastSeenAtIsNil bool `json:"lastSeenAtIsNil,omitempty"` LastSeenAtNotNil bool `json:"lastSeenAtNotNil,omitempty"` // "tags" edge predicates. HasTags *bool `json:"hasTags,omitempty"` HasTagsWith []*TagWhereInput `json:"hasTagsWith,omitempty"` // "beacons" edge predicates. HasBeacons *bool `json:"hasBeacons,omitempty"` HasBeaconsWith []*BeaconWhereInput `json:"hasBeaconsWith,omitempty"` // "files" edge predicates. HasFiles *bool `json:"hasFiles,omitempty"` HasFilesWith []*HostFileWhereInput `json:"hasFilesWith,omitempty"` // "processes" edge predicates. HasProcesses *bool `json:"hasProcesses,omitempty"` HasProcessesWith []*HostProcessWhereInput `json:"hasProcessesWith,omitempty"` }
HostWhereInput represents a where input for filtering Host queries.
func (*HostWhereInput) AddPredicates ¶
func (i *HostWhereInput) AddPredicates(predicates ...predicate.Host)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
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 NodeOption ¶
type NodeOption func(*nodeOptions)
NodeOption allows configuring the Noder execution using functional options.
func WithFixedNodeType ¶
func WithFixedNodeType(t string) NodeOption
WithFixedNodeType sets the Type of the node to a fixed value.
func WithNodeType ¶
WithNodeType sets the node Type resolver function (i.e. the table to query). If was not provided, the table will be derived from the universal-id configuration as described in: https://entgo.io/docs/migrate/#universal-ids.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
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 Quest ¶
type Quest struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // Name of the quest Name string `json:"name,omitempty"` // Value of parameters that were specified for the quest (as a JSON string). Parameters string `json:"parameters,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the QuestQuery when eager-loading is set. Edges QuestEdges `json:"edges"` // contains filtered or unexported fields }
Quest is the model entity for the Quest schema.
func (*Quest) IsNode ¶
func (n *Quest) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Quest) NamedTasks ¶
NamedTasks returns the Tasks named value or an error if the edge was not loaded in eager-loading with this name.
func (*Quest) QueryBundle ¶
QueryBundle queries the "bundle" edge of the Quest entity.
func (*Quest) QueryCreator ¶
QueryCreator queries the "creator" edge of the Quest entity.
func (*Quest) QueryTasks ¶
QueryTasks queries the "tasks" edge of the Quest entity.
func (*Quest) ToEdge ¶
func (q *Quest) ToEdge(order *QuestOrder) *QuestEdge
ToEdge converts Quest into QuestEdge.
func (*Quest) Unwrap ¶
Unwrap unwraps the Quest 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 (*Quest) Update ¶
func (q *Quest) Update() *QuestUpdateOne
Update returns a builder for updating this Quest. Note that you need to call Quest.Unwrap() before calling this method if this Quest was returned from a transaction, and the transaction was committed or rolled back.
type QuestClient ¶
type QuestClient struct {
// contains filtered or unexported fields
}
QuestClient is a client for the Quest schema.
func NewQuestClient ¶
func NewQuestClient(c config) *QuestClient
NewQuestClient returns a client for the Quest from the given config.
func (*QuestClient) Create ¶
func (c *QuestClient) Create() *QuestCreate
Create returns a builder for creating a Quest entity.
func (*QuestClient) CreateBulk ¶
func (c *QuestClient) CreateBulk(builders ...*QuestCreate) *QuestCreateBulk
CreateBulk returns a builder for creating a bulk of Quest entities.
func (*QuestClient) Delete ¶
func (c *QuestClient) Delete() *QuestDelete
Delete returns a delete builder for Quest.
func (*QuestClient) DeleteOne ¶
func (c *QuestClient) DeleteOne(q *Quest) *QuestDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*QuestClient) DeleteOneID ¶
func (c *QuestClient) DeleteOneID(id int) *QuestDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*QuestClient) GetX ¶
func (c *QuestClient) GetX(ctx context.Context, id int) *Quest
GetX is like Get, but panics if an error occurs.
func (*QuestClient) Intercept ¶
func (c *QuestClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `quest.Intercept(f(g(h())))`.
func (*QuestClient) Interceptors ¶
func (c *QuestClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*QuestClient) MapCreateBulk ¶
func (c *QuestClient) MapCreateBulk(slice any, setFunc func(*QuestCreate, int)) *QuestCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*QuestClient) Query ¶
func (c *QuestClient) Query() *QuestQuery
Query returns a query builder for Quest.
func (*QuestClient) QueryBundle ¶
func (c *QuestClient) QueryBundle(q *Quest) *FileQuery
QueryBundle queries the bundle edge of a Quest.
func (*QuestClient) QueryCreator ¶
func (c *QuestClient) QueryCreator(q *Quest) *UserQuery
QueryCreator queries the creator edge of a Quest.
func (*QuestClient) QueryTasks ¶
func (c *QuestClient) QueryTasks(q *Quest) *TaskQuery
QueryTasks queries the tasks edge of a Quest.
func (*QuestClient) QueryTome ¶
func (c *QuestClient) QueryTome(q *Quest) *TomeQuery
QueryTome queries the tome edge of a Quest.
func (*QuestClient) Update ¶
func (c *QuestClient) Update() *QuestUpdate
Update returns an update builder for Quest.
func (*QuestClient) UpdateOne ¶
func (c *QuestClient) UpdateOne(q *Quest) *QuestUpdateOne
UpdateOne returns an update builder for the given entity.
func (*QuestClient) UpdateOneID ¶
func (c *QuestClient) UpdateOneID(id int) *QuestUpdateOne
UpdateOneID returns an update builder for the given id.
func (*QuestClient) Use ¶
func (c *QuestClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `quest.Hooks(f(g(h())))`.
type QuestConnection ¶
type QuestConnection struct { Edges []*QuestEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
QuestConnection is the connection containing edges to Quest.
type QuestCreate ¶
type QuestCreate struct {
// contains filtered or unexported fields
}
QuestCreate is the builder for creating a Quest entity.
func (*QuestCreate) AddTaskIDs ¶
func (qc *QuestCreate) AddTaskIDs(ids ...int) *QuestCreate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*QuestCreate) AddTasks ¶
func (qc *QuestCreate) AddTasks(t ...*Task) *QuestCreate
AddTasks adds the "tasks" edges to the Task entity.
func (*QuestCreate) Exec ¶
func (qc *QuestCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestCreate) ExecX ¶
func (qc *QuestCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestCreate) Mutation ¶
func (qc *QuestCreate) Mutation() *QuestMutation
Mutation returns the QuestMutation object of the builder.
func (*QuestCreate) OnConflict ¶
func (qc *QuestCreate) OnConflict(opts ...sql.ConflictOption) *QuestUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Quest.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.QuestUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*QuestCreate) OnConflictColumns ¶
func (qc *QuestCreate) OnConflictColumns(columns ...string) *QuestUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Quest.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*QuestCreate) Save ¶
func (qc *QuestCreate) Save(ctx context.Context) (*Quest, error)
Save creates the Quest in the database.
func (*QuestCreate) SaveX ¶
func (qc *QuestCreate) SaveX(ctx context.Context) *Quest
SaveX calls Save and panics if Save returns an error.
func (*QuestCreate) SetBundle ¶
func (qc *QuestCreate) SetBundle(f *File) *QuestCreate
SetBundle sets the "bundle" edge to the File entity.
func (*QuestCreate) SetBundleID ¶
func (qc *QuestCreate) SetBundleID(id int) *QuestCreate
SetBundleID sets the "bundle" edge to the File entity by ID.
func (*QuestCreate) SetCreatedAt ¶
func (qc *QuestCreate) SetCreatedAt(t time.Time) *QuestCreate
SetCreatedAt sets the "created_at" field.
func (*QuestCreate) SetCreator ¶
func (qc *QuestCreate) SetCreator(u *User) *QuestCreate
SetCreator sets the "creator" edge to the User entity.
func (*QuestCreate) SetCreatorID ¶
func (qc *QuestCreate) SetCreatorID(id int) *QuestCreate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*QuestCreate) SetInput ¶
func (c *QuestCreate) SetInput(i CreateQuestInput) *QuestCreate
SetInput applies the change-set in the CreateQuestInput on the QuestCreate builder.
func (*QuestCreate) SetLastModifiedAt ¶
func (qc *QuestCreate) SetLastModifiedAt(t time.Time) *QuestCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*QuestCreate) SetName ¶
func (qc *QuestCreate) SetName(s string) *QuestCreate
SetName sets the "name" field.
func (*QuestCreate) SetNillableBundleID ¶
func (qc *QuestCreate) SetNillableBundleID(id *int) *QuestCreate
SetNillableBundleID sets the "bundle" edge to the File entity by ID if the given value is not nil.
func (*QuestCreate) SetNillableCreatedAt ¶
func (qc *QuestCreate) SetNillableCreatedAt(t *time.Time) *QuestCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*QuestCreate) SetNillableCreatorID ¶
func (qc *QuestCreate) SetNillableCreatorID(id *int) *QuestCreate
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*QuestCreate) SetNillableLastModifiedAt ¶
func (qc *QuestCreate) SetNillableLastModifiedAt(t *time.Time) *QuestCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*QuestCreate) SetNillableParameters ¶
func (qc *QuestCreate) SetNillableParameters(s *string) *QuestCreate
SetNillableParameters sets the "parameters" field if the given value is not nil.
func (*QuestCreate) SetParameters ¶
func (qc *QuestCreate) SetParameters(s string) *QuestCreate
SetParameters sets the "parameters" field.
func (*QuestCreate) SetTome ¶
func (qc *QuestCreate) SetTome(t *Tome) *QuestCreate
SetTome sets the "tome" edge to the Tome entity.
func (*QuestCreate) SetTomeID ¶
func (qc *QuestCreate) SetTomeID(id int) *QuestCreate
SetTomeID sets the "tome" edge to the Tome entity by ID.
type QuestCreateBulk ¶
type QuestCreateBulk struct {
// contains filtered or unexported fields
}
QuestCreateBulk is the builder for creating many Quest entities in bulk.
func (*QuestCreateBulk) Exec ¶
func (qcb *QuestCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestCreateBulk) ExecX ¶
func (qcb *QuestCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestCreateBulk) OnConflict ¶
func (qcb *QuestCreateBulk) OnConflict(opts ...sql.ConflictOption) *QuestUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Quest.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.QuestUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*QuestCreateBulk) OnConflictColumns ¶
func (qcb *QuestCreateBulk) OnConflictColumns(columns ...string) *QuestUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Quest.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type QuestDelete ¶
type QuestDelete struct {
// contains filtered or unexported fields
}
QuestDelete is the builder for deleting a Quest entity.
func (*QuestDelete) Exec ¶
func (qd *QuestDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*QuestDelete) ExecX ¶
func (qd *QuestDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*QuestDelete) Where ¶
func (qd *QuestDelete) Where(ps ...predicate.Quest) *QuestDelete
Where appends a list predicates to the QuestDelete builder.
type QuestDeleteOne ¶
type QuestDeleteOne struct {
// contains filtered or unexported fields
}
QuestDeleteOne is the builder for deleting a single Quest entity.
func (*QuestDeleteOne) Exec ¶
func (qdo *QuestDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*QuestDeleteOne) ExecX ¶
func (qdo *QuestDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestDeleteOne) Where ¶
func (qdo *QuestDeleteOne) Where(ps ...predicate.Quest) *QuestDeleteOne
Where appends a list predicates to the QuestDelete builder.
type QuestEdges ¶
type QuestEdges struct { // Tome that this quest will be executing Tome *Tome `json:"tome,omitempty"` // Bundle file that the executing tome depends on (if any) Bundle *File `json:"bundle,omitempty"` // Tasks tracking the status and output of individual tome execution on targets Tasks []*Task `json:"tasks,omitempty"` // User that created the quest if available. Creator *User `json:"creator,omitempty"` // contains filtered or unexported fields }
QuestEdges holds the relations/edges for other nodes in the graph.
func (QuestEdges) BundleOrErr ¶
func (e QuestEdges) BundleOrErr() (*File, error)
BundleOrErr returns the Bundle value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (QuestEdges) CreatorOrErr ¶
func (e QuestEdges) CreatorOrErr() (*User, error)
CreatorOrErr returns the Creator value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (QuestEdges) TasksOrErr ¶
func (e QuestEdges) TasksOrErr() ([]*Task, error)
TasksOrErr returns the Tasks value or an error if the edge was not loaded in eager-loading.
func (QuestEdges) TomeOrErr ¶
func (e QuestEdges) TomeOrErr() (*Tome, error)
TomeOrErr returns the Tome value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type QuestGroupBy ¶
type QuestGroupBy struct {
// contains filtered or unexported fields
}
QuestGroupBy is the group-by builder for Quest entities.
func (*QuestGroupBy) Aggregate ¶
func (qgb *QuestGroupBy) Aggregate(fns ...AggregateFunc) *QuestGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*QuestGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QuestGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QuestGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QuestGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QuestGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QuestGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QuestGroupBy) Scan ¶
func (qgb *QuestGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*QuestGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QuestMutation ¶
type QuestMutation struct {
// contains filtered or unexported fields
}
QuestMutation represents an operation that mutates the Quest nodes in the graph.
func (*QuestMutation) AddField ¶
func (m *QuestMutation) 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 (*QuestMutation) AddTaskIDs ¶
func (m *QuestMutation) AddTaskIDs(ids ...int)
AddTaskIDs adds the "tasks" edge to the Task entity by ids.
func (*QuestMutation) AddedEdges ¶
func (m *QuestMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*QuestMutation) AddedField ¶
func (m *QuestMutation) 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 (*QuestMutation) AddedFields ¶
func (m *QuestMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*QuestMutation) AddedIDs ¶
func (m *QuestMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*QuestMutation) BundleCleared ¶
func (m *QuestMutation) BundleCleared() bool
BundleCleared reports if the "bundle" edge to the File entity was cleared.
func (*QuestMutation) BundleID ¶
func (m *QuestMutation) BundleID() (id int, exists bool)
BundleID returns the "bundle" edge ID in the mutation.
func (*QuestMutation) BundleIDs ¶
func (m *QuestMutation) BundleIDs() (ids []int)
BundleIDs returns the "bundle" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BundleID instead. It exists only for internal usage by the builders.
func (*QuestMutation) ClearBundle ¶
func (m *QuestMutation) ClearBundle()
ClearBundle clears the "bundle" edge to the File entity.
func (*QuestMutation) ClearCreator ¶
func (m *QuestMutation) ClearCreator()
ClearCreator clears the "creator" edge to the User entity.
func (*QuestMutation) ClearEdge ¶
func (m *QuestMutation) 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 (*QuestMutation) ClearField ¶
func (m *QuestMutation) 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 (*QuestMutation) ClearParameters ¶
func (m *QuestMutation) ClearParameters()
ClearParameters clears the value of the "parameters" field.
func (*QuestMutation) ClearTasks ¶
func (m *QuestMutation) ClearTasks()
ClearTasks clears the "tasks" edge to the Task entity.
func (*QuestMutation) ClearTome ¶
func (m *QuestMutation) ClearTome()
ClearTome clears the "tome" edge to the Tome entity.
func (*QuestMutation) ClearedEdges ¶
func (m *QuestMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*QuestMutation) ClearedFields ¶
func (m *QuestMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (QuestMutation) Client ¶
func (m QuestMutation) 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 (*QuestMutation) CreatedAt ¶
func (m *QuestMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*QuestMutation) CreatorCleared ¶
func (m *QuestMutation) CreatorCleared() bool
CreatorCleared reports if the "creator" edge to the User entity was cleared.
func (*QuestMutation) CreatorID ¶
func (m *QuestMutation) CreatorID() (id int, exists bool)
CreatorID returns the "creator" edge ID in the mutation.
func (*QuestMutation) CreatorIDs ¶
func (m *QuestMutation) CreatorIDs() (ids []int)
CreatorIDs returns the "creator" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CreatorID instead. It exists only for internal usage by the builders.
func (*QuestMutation) EdgeCleared ¶
func (m *QuestMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*QuestMutation) Field ¶
func (m *QuestMutation) 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 (*QuestMutation) FieldCleared ¶
func (m *QuestMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*QuestMutation) Fields ¶
func (m *QuestMutation) 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 (*QuestMutation) ID ¶
func (m *QuestMutation) 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 (*QuestMutation) IDs ¶
func (m *QuestMutation) 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 (*QuestMutation) LastModifiedAt ¶
func (m *QuestMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*QuestMutation) Name ¶
func (m *QuestMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*QuestMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Quest entity. If the Quest 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 (*QuestMutation) 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 (*QuestMutation) OldLastModifiedAt ¶
OldLastModifiedAt returns the old "last_modified_at" field's value of the Quest entity. If the Quest 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 (*QuestMutation) OldName ¶
func (m *QuestMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Quest entity. If the Quest 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 (*QuestMutation) OldParameters ¶
func (m *QuestMutation) OldParameters(ctx context.Context) (v string, err error)
OldParameters returns the old "parameters" field's value of the Quest entity. If the Quest 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 (*QuestMutation) Parameters ¶
func (m *QuestMutation) Parameters() (r string, exists bool)
Parameters returns the value of the "parameters" field in the mutation.
func (*QuestMutation) ParametersCleared ¶
func (m *QuestMutation) ParametersCleared() bool
ParametersCleared returns if the "parameters" field was cleared in this mutation.
func (*QuestMutation) RemoveTaskIDs ¶
func (m *QuestMutation) RemoveTaskIDs(ids ...int)
RemoveTaskIDs removes the "tasks" edge to the Task entity by IDs.
func (*QuestMutation) RemovedEdges ¶
func (m *QuestMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*QuestMutation) RemovedIDs ¶
func (m *QuestMutation) 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 (*QuestMutation) RemovedTasksIDs ¶
func (m *QuestMutation) RemovedTasksIDs() (ids []int)
RemovedTasks returns the removed IDs of the "tasks" edge to the Task entity.
func (*QuestMutation) ResetBundle ¶
func (m *QuestMutation) ResetBundle()
ResetBundle resets all changes to the "bundle" edge.
func (*QuestMutation) ResetCreatedAt ¶
func (m *QuestMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*QuestMutation) ResetCreator ¶
func (m *QuestMutation) ResetCreator()
ResetCreator resets all changes to the "creator" edge.
func (*QuestMutation) ResetEdge ¶
func (m *QuestMutation) 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 (*QuestMutation) ResetField ¶
func (m *QuestMutation) 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 (*QuestMutation) ResetLastModifiedAt ¶
func (m *QuestMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*QuestMutation) ResetName ¶
func (m *QuestMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*QuestMutation) ResetParameters ¶
func (m *QuestMutation) ResetParameters()
ResetParameters resets all changes to the "parameters" field.
func (*QuestMutation) ResetTasks ¶
func (m *QuestMutation) ResetTasks()
ResetTasks resets all changes to the "tasks" edge.
func (*QuestMutation) ResetTome ¶
func (m *QuestMutation) ResetTome()
ResetTome resets all changes to the "tome" edge.
func (*QuestMutation) SetBundleID ¶
func (m *QuestMutation) SetBundleID(id int)
SetBundleID sets the "bundle" edge to the File entity by id.
func (*QuestMutation) SetCreatedAt ¶
func (m *QuestMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*QuestMutation) SetCreatorID ¶
func (m *QuestMutation) SetCreatorID(id int)
SetCreatorID sets the "creator" edge to the User entity by id.
func (*QuestMutation) SetField ¶
func (m *QuestMutation) 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 (*QuestMutation) SetLastModifiedAt ¶
func (m *QuestMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*QuestMutation) SetName ¶
func (m *QuestMutation) SetName(s string)
SetName sets the "name" field.
func (*QuestMutation) SetOp ¶
func (m *QuestMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*QuestMutation) SetParameters ¶
func (m *QuestMutation) SetParameters(s string)
SetParameters sets the "parameters" field.
func (*QuestMutation) SetTomeID ¶
func (m *QuestMutation) SetTomeID(id int)
SetTomeID sets the "tome" edge to the Tome entity by id.
func (*QuestMutation) TasksCleared ¶
func (m *QuestMutation) TasksCleared() bool
TasksCleared reports if the "tasks" edge to the Task entity was cleared.
func (*QuestMutation) TasksIDs ¶
func (m *QuestMutation) TasksIDs() (ids []int)
TasksIDs returns the "tasks" edge IDs in the mutation.
func (*QuestMutation) TomeCleared ¶
func (m *QuestMutation) TomeCleared() bool
TomeCleared reports if the "tome" edge to the Tome entity was cleared.
func (*QuestMutation) TomeID ¶
func (m *QuestMutation) TomeID() (id int, exists bool)
TomeID returns the "tome" edge ID in the mutation.
func (*QuestMutation) TomeIDs ¶
func (m *QuestMutation) TomeIDs() (ids []int)
TomeIDs returns the "tome" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use TomeID instead. It exists only for internal usage by the builders.
func (QuestMutation) Tx ¶
func (m QuestMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*QuestMutation) Type ¶
func (m *QuestMutation) Type() string
Type returns the node type of this mutation (Quest).
func (*QuestMutation) Where ¶
func (m *QuestMutation) Where(ps ...predicate.Quest)
Where appends a list predicates to the QuestMutation builder.
func (*QuestMutation) WhereP ¶
func (m *QuestMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the QuestMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type QuestOrder ¶
type QuestOrder struct { Direction OrderDirection `json:"direction"` Field *QuestOrderField `json:"field"` }
QuestOrder defines the ordering of Quest.
type QuestOrderField ¶
type QuestOrderField struct { // Value extracts the ordering value from the given Quest. Value func(*Quest) (ent.Value, error) // contains filtered or unexported fields }
QuestOrderField defines the ordering field of Quest.
func (QuestOrderField) MarshalGQL ¶
func (f QuestOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (QuestOrderField) String ¶
func (f QuestOrderField) String() string
String implement fmt.Stringer interface.
func (*QuestOrderField) UnmarshalGQL ¶
func (f *QuestOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type QuestPaginateOption ¶
type QuestPaginateOption func(*questPager) error
QuestPaginateOption enables pagination customization.
func WithQuestFilter ¶
func WithQuestFilter(filter func(*QuestQuery) (*QuestQuery, error)) QuestPaginateOption
WithQuestFilter configures pagination filter.
func WithQuestOrder ¶
func WithQuestOrder(order *QuestOrder) QuestPaginateOption
WithQuestOrder configures pagination ordering.
type QuestQuery ¶
type QuestQuery struct {
// contains filtered or unexported fields
}
QuestQuery is the builder for querying Quest entities.
func (*QuestQuery) Aggregate ¶
func (qq *QuestQuery) Aggregate(fns ...AggregateFunc) *QuestSelect
Aggregate returns a QuestSelect configured with the given aggregations.
func (*QuestQuery) All ¶
func (qq *QuestQuery) All(ctx context.Context) ([]*Quest, error)
All executes the query and returns a list of Quests.
func (*QuestQuery) AllX ¶
func (qq *QuestQuery) AllX(ctx context.Context) []*Quest
AllX is like All, but panics if an error occurs.
func (*QuestQuery) Clone ¶
func (qq *QuestQuery) Clone() *QuestQuery
Clone returns a duplicate of the QuestQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*QuestQuery) CollectFields ¶
func (q *QuestQuery) CollectFields(ctx context.Context, satisfies ...string) (*QuestQuery, error)
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*QuestQuery) Count ¶
func (qq *QuestQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*QuestQuery) CountX ¶
func (qq *QuestQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*QuestQuery) Exist ¶
func (qq *QuestQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*QuestQuery) ExistX ¶
func (qq *QuestQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*QuestQuery) First ¶
func (qq *QuestQuery) First(ctx context.Context) (*Quest, error)
First returns the first Quest entity from the query. Returns a *NotFoundError when no Quest was found.
func (*QuestQuery) FirstID ¶
func (qq *QuestQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Quest ID from the query. Returns a *NotFoundError when no Quest ID was found.
func (*QuestQuery) FirstIDX ¶
func (qq *QuestQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*QuestQuery) FirstX ¶
func (qq *QuestQuery) FirstX(ctx context.Context) *Quest
FirstX is like First, but panics if an error occurs.
func (*QuestQuery) GroupBy ¶
func (qq *QuestQuery) GroupBy(field string, fields ...string) *QuestGroupBy
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.Quest.Query(). GroupBy(quest.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*QuestQuery) IDs ¶
func (qq *QuestQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Quest IDs.
func (*QuestQuery) IDsX ¶
func (qq *QuestQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*QuestQuery) Limit ¶
func (qq *QuestQuery) Limit(limit int) *QuestQuery
Limit the number of records to be returned by this query.
func (*QuestQuery) Offset ¶
func (qq *QuestQuery) Offset(offset int) *QuestQuery
Offset to start from.
func (*QuestQuery) Only ¶
func (qq *QuestQuery) Only(ctx context.Context) (*Quest, error)
Only returns a single Quest entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Quest entity is found. Returns a *NotFoundError when no Quest entities are found.
func (*QuestQuery) OnlyID ¶
func (qq *QuestQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Quest ID in the query. Returns a *NotSingularError when more than one Quest ID is found. Returns a *NotFoundError when no entities are found.
func (*QuestQuery) OnlyIDX ¶
func (qq *QuestQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*QuestQuery) OnlyX ¶
func (qq *QuestQuery) OnlyX(ctx context.Context) *Quest
OnlyX is like Only, but panics if an error occurs.
func (*QuestQuery) Order ¶
func (qq *QuestQuery) Order(o ...quest.OrderOption) *QuestQuery
Order specifies how the records should be ordered.
func (*QuestQuery) Paginate ¶
func (q *QuestQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...QuestPaginateOption, ) (*QuestConnection, error)
Paginate executes the query and returns a relay based cursor connection to Quest.
func (*QuestQuery) QueryBundle ¶
func (qq *QuestQuery) QueryBundle() *FileQuery
QueryBundle chains the current query on the "bundle" edge.
func (*QuestQuery) QueryCreator ¶
func (qq *QuestQuery) QueryCreator() *UserQuery
QueryCreator chains the current query on the "creator" edge.
func (*QuestQuery) QueryTasks ¶
func (qq *QuestQuery) QueryTasks() *TaskQuery
QueryTasks chains the current query on the "tasks" edge.
func (*QuestQuery) QueryTome ¶
func (qq *QuestQuery) QueryTome() *TomeQuery
QueryTome chains the current query on the "tome" edge.
func (*QuestQuery) Select ¶
func (qq *QuestQuery) Select(fields ...string) *QuestSelect
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.Quest.Query(). Select(quest.FieldCreatedAt). Scan(ctx, &v)
func (*QuestQuery) Unique ¶
func (qq *QuestQuery) Unique(unique bool) *QuestQuery
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 (*QuestQuery) Where ¶
func (qq *QuestQuery) Where(ps ...predicate.Quest) *QuestQuery
Where adds a new predicate for the QuestQuery builder.
func (*QuestQuery) WithBundle ¶
func (qq *QuestQuery) WithBundle(opts ...func(*FileQuery)) *QuestQuery
WithBundle tells the query-builder to eager-load the nodes that are connected to the "bundle" edge. The optional arguments are used to configure the query builder of the edge.
func (*QuestQuery) WithCreator ¶
func (qq *QuestQuery) WithCreator(opts ...func(*UserQuery)) *QuestQuery
WithCreator tells the query-builder to eager-load the nodes that are connected to the "creator" edge. The optional arguments are used to configure the query builder of the edge.
func (*QuestQuery) WithNamedTasks ¶
func (qq *QuestQuery) WithNamedTasks(name string, opts ...func(*TaskQuery)) *QuestQuery
WithNamedTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*QuestQuery) WithTasks ¶
func (qq *QuestQuery) WithTasks(opts ...func(*TaskQuery)) *QuestQuery
WithTasks tells the query-builder to eager-load the nodes that are connected to the "tasks" edge. The optional arguments are used to configure the query builder of the edge.
func (*QuestQuery) WithTome ¶
func (qq *QuestQuery) WithTome(opts ...func(*TomeQuery)) *QuestQuery
WithTome tells the query-builder to eager-load the nodes that are connected to the "tome" edge. The optional arguments are used to configure the query builder of the edge.
type QuestSelect ¶
type QuestSelect struct { *QuestQuery // contains filtered or unexported fields }
QuestSelect is the builder for selecting fields of Quest entities.
func (*QuestSelect) Aggregate ¶
func (qs *QuestSelect) Aggregate(fns ...AggregateFunc) *QuestSelect
Aggregate adds the given aggregation functions to the selector query.
func (*QuestSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*QuestSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*QuestSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*QuestSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*QuestSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*QuestSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*QuestSelect) Scan ¶
func (qs *QuestSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*QuestSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type QuestUpdate ¶
type QuestUpdate struct {
// contains filtered or unexported fields
}
QuestUpdate is the builder for updating Quest entities.
func (*QuestUpdate) AddTaskIDs ¶
func (qu *QuestUpdate) AddTaskIDs(ids ...int) *QuestUpdate
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*QuestUpdate) AddTasks ¶
func (qu *QuestUpdate) AddTasks(t ...*Task) *QuestUpdate
AddTasks adds the "tasks" edges to the Task entity.
func (*QuestUpdate) ClearBundle ¶
func (qu *QuestUpdate) ClearBundle() *QuestUpdate
ClearBundle clears the "bundle" edge to the File entity.
func (*QuestUpdate) ClearCreator ¶
func (qu *QuestUpdate) ClearCreator() *QuestUpdate
ClearCreator clears the "creator" edge to the User entity.
func (*QuestUpdate) ClearParameters ¶
func (qu *QuestUpdate) ClearParameters() *QuestUpdate
ClearParameters clears the value of the "parameters" field.
func (*QuestUpdate) ClearTasks ¶
func (qu *QuestUpdate) ClearTasks() *QuestUpdate
ClearTasks clears all "tasks" edges to the Task entity.
func (*QuestUpdate) ClearTome ¶
func (qu *QuestUpdate) ClearTome() *QuestUpdate
ClearTome clears the "tome" edge to the Tome entity.
func (*QuestUpdate) Exec ¶
func (qu *QuestUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestUpdate) ExecX ¶
func (qu *QuestUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestUpdate) Mutation ¶
func (qu *QuestUpdate) Mutation() *QuestMutation
Mutation returns the QuestMutation object of the builder.
func (*QuestUpdate) RemoveTaskIDs ¶
func (qu *QuestUpdate) RemoveTaskIDs(ids ...int) *QuestUpdate
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*QuestUpdate) RemoveTasks ¶
func (qu *QuestUpdate) RemoveTasks(t ...*Task) *QuestUpdate
RemoveTasks removes "tasks" edges to Task entities.
func (*QuestUpdate) Save ¶
func (qu *QuestUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*QuestUpdate) SaveX ¶
func (qu *QuestUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*QuestUpdate) SetBundle ¶
func (qu *QuestUpdate) SetBundle(f *File) *QuestUpdate
SetBundle sets the "bundle" edge to the File entity.
func (*QuestUpdate) SetBundleID ¶
func (qu *QuestUpdate) SetBundleID(id int) *QuestUpdate
SetBundleID sets the "bundle" edge to the File entity by ID.
func (*QuestUpdate) SetCreator ¶
func (qu *QuestUpdate) SetCreator(u *User) *QuestUpdate
SetCreator sets the "creator" edge to the User entity.
func (*QuestUpdate) SetCreatorID ¶
func (qu *QuestUpdate) SetCreatorID(id int) *QuestUpdate
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*QuestUpdate) SetLastModifiedAt ¶
func (qu *QuestUpdate) SetLastModifiedAt(t time.Time) *QuestUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*QuestUpdate) SetName ¶
func (qu *QuestUpdate) SetName(s string) *QuestUpdate
SetName sets the "name" field.
func (*QuestUpdate) SetNillableBundleID ¶
func (qu *QuestUpdate) SetNillableBundleID(id *int) *QuestUpdate
SetNillableBundleID sets the "bundle" edge to the File entity by ID if the given value is not nil.
func (*QuestUpdate) SetNillableCreatorID ¶
func (qu *QuestUpdate) SetNillableCreatorID(id *int) *QuestUpdate
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*QuestUpdate) SetNillableParameters ¶
func (qu *QuestUpdate) SetNillableParameters(s *string) *QuestUpdate
SetNillableParameters sets the "parameters" field if the given value is not nil.
func (*QuestUpdate) SetParameters ¶
func (qu *QuestUpdate) SetParameters(s string) *QuestUpdate
SetParameters sets the "parameters" field.
func (*QuestUpdate) SetTome ¶
func (qu *QuestUpdate) SetTome(t *Tome) *QuestUpdate
SetTome sets the "tome" edge to the Tome entity.
func (*QuestUpdate) SetTomeID ¶
func (qu *QuestUpdate) SetTomeID(id int) *QuestUpdate
SetTomeID sets the "tome" edge to the Tome entity by ID.
func (*QuestUpdate) Where ¶
func (qu *QuestUpdate) Where(ps ...predicate.Quest) *QuestUpdate
Where appends a list predicates to the QuestUpdate builder.
type QuestUpdateOne ¶
type QuestUpdateOne struct {
// contains filtered or unexported fields
}
QuestUpdateOne is the builder for updating a single Quest entity.
func (*QuestUpdateOne) AddTaskIDs ¶
func (quo *QuestUpdateOne) AddTaskIDs(ids ...int) *QuestUpdateOne
AddTaskIDs adds the "tasks" edge to the Task entity by IDs.
func (*QuestUpdateOne) AddTasks ¶
func (quo *QuestUpdateOne) AddTasks(t ...*Task) *QuestUpdateOne
AddTasks adds the "tasks" edges to the Task entity.
func (*QuestUpdateOne) ClearBundle ¶
func (quo *QuestUpdateOne) ClearBundle() *QuestUpdateOne
ClearBundle clears the "bundle" edge to the File entity.
func (*QuestUpdateOne) ClearCreator ¶
func (quo *QuestUpdateOne) ClearCreator() *QuestUpdateOne
ClearCreator clears the "creator" edge to the User entity.
func (*QuestUpdateOne) ClearParameters ¶
func (quo *QuestUpdateOne) ClearParameters() *QuestUpdateOne
ClearParameters clears the value of the "parameters" field.
func (*QuestUpdateOne) ClearTasks ¶
func (quo *QuestUpdateOne) ClearTasks() *QuestUpdateOne
ClearTasks clears all "tasks" edges to the Task entity.
func (*QuestUpdateOne) ClearTome ¶
func (quo *QuestUpdateOne) ClearTome() *QuestUpdateOne
ClearTome clears the "tome" edge to the Tome entity.
func (*QuestUpdateOne) Exec ¶
func (quo *QuestUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*QuestUpdateOne) ExecX ¶
func (quo *QuestUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestUpdateOne) Mutation ¶
func (quo *QuestUpdateOne) Mutation() *QuestMutation
Mutation returns the QuestMutation object of the builder.
func (*QuestUpdateOne) RemoveTaskIDs ¶
func (quo *QuestUpdateOne) RemoveTaskIDs(ids ...int) *QuestUpdateOne
RemoveTaskIDs removes the "tasks" edge to Task entities by IDs.
func (*QuestUpdateOne) RemoveTasks ¶
func (quo *QuestUpdateOne) RemoveTasks(t ...*Task) *QuestUpdateOne
RemoveTasks removes "tasks" edges to Task entities.
func (*QuestUpdateOne) Save ¶
func (quo *QuestUpdateOne) Save(ctx context.Context) (*Quest, error)
Save executes the query and returns the updated Quest entity.
func (*QuestUpdateOne) SaveX ¶
func (quo *QuestUpdateOne) SaveX(ctx context.Context) *Quest
SaveX is like Save, but panics if an error occurs.
func (*QuestUpdateOne) Select ¶
func (quo *QuestUpdateOne) Select(field string, fields ...string) *QuestUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*QuestUpdateOne) SetBundle ¶
func (quo *QuestUpdateOne) SetBundle(f *File) *QuestUpdateOne
SetBundle sets the "bundle" edge to the File entity.
func (*QuestUpdateOne) SetBundleID ¶
func (quo *QuestUpdateOne) SetBundleID(id int) *QuestUpdateOne
SetBundleID sets the "bundle" edge to the File entity by ID.
func (*QuestUpdateOne) SetCreator ¶
func (quo *QuestUpdateOne) SetCreator(u *User) *QuestUpdateOne
SetCreator sets the "creator" edge to the User entity.
func (*QuestUpdateOne) SetCreatorID ¶
func (quo *QuestUpdateOne) SetCreatorID(id int) *QuestUpdateOne
SetCreatorID sets the "creator" edge to the User entity by ID.
func (*QuestUpdateOne) SetLastModifiedAt ¶
func (quo *QuestUpdateOne) SetLastModifiedAt(t time.Time) *QuestUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*QuestUpdateOne) SetName ¶
func (quo *QuestUpdateOne) SetName(s string) *QuestUpdateOne
SetName sets the "name" field.
func (*QuestUpdateOne) SetNillableBundleID ¶
func (quo *QuestUpdateOne) SetNillableBundleID(id *int) *QuestUpdateOne
SetNillableBundleID sets the "bundle" edge to the File entity by ID if the given value is not nil.
func (*QuestUpdateOne) SetNillableCreatorID ¶
func (quo *QuestUpdateOne) SetNillableCreatorID(id *int) *QuestUpdateOne
SetNillableCreatorID sets the "creator" edge to the User entity by ID if the given value is not nil.
func (*QuestUpdateOne) SetNillableParameters ¶
func (quo *QuestUpdateOne) SetNillableParameters(s *string) *QuestUpdateOne
SetNillableParameters sets the "parameters" field if the given value is not nil.
func (*QuestUpdateOne) SetParameters ¶
func (quo *QuestUpdateOne) SetParameters(s string) *QuestUpdateOne
SetParameters sets the "parameters" field.
func (*QuestUpdateOne) SetTome ¶
func (quo *QuestUpdateOne) SetTome(t *Tome) *QuestUpdateOne
SetTome sets the "tome" edge to the Tome entity.
func (*QuestUpdateOne) SetTomeID ¶
func (quo *QuestUpdateOne) SetTomeID(id int) *QuestUpdateOne
SetTomeID sets the "tome" edge to the Tome entity by ID.
func (*QuestUpdateOne) Where ¶
func (quo *QuestUpdateOne) Where(ps ...predicate.Quest) *QuestUpdateOne
Where appends a list predicates to the QuestUpdate builder.
type QuestUpsert ¶
QuestUpsert is the "OnConflict" setter.
func (*QuestUpsert) ClearParameters ¶
func (u *QuestUpsert) ClearParameters() *QuestUpsert
ClearParameters clears the value of the "parameters" field.
func (*QuestUpsert) SetLastModifiedAt ¶
func (u *QuestUpsert) SetLastModifiedAt(v time.Time) *QuestUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*QuestUpsert) SetName ¶
func (u *QuestUpsert) SetName(v string) *QuestUpsert
SetName sets the "name" field.
func (*QuestUpsert) SetParameters ¶
func (u *QuestUpsert) SetParameters(v string) *QuestUpsert
SetParameters sets the "parameters" field.
func (*QuestUpsert) UpdateLastModifiedAt ¶
func (u *QuestUpsert) UpdateLastModifiedAt() *QuestUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*QuestUpsert) UpdateName ¶
func (u *QuestUpsert) UpdateName() *QuestUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*QuestUpsert) UpdateParameters ¶
func (u *QuestUpsert) UpdateParameters() *QuestUpsert
UpdateParameters sets the "parameters" field to the value that was provided on create.
type QuestUpsertBulk ¶
type QuestUpsertBulk struct {
// contains filtered or unexported fields
}
QuestUpsertBulk is the builder for "upsert"-ing a bulk of Quest nodes.
func (*QuestUpsertBulk) ClearParameters ¶
func (u *QuestUpsertBulk) ClearParameters() *QuestUpsertBulk
ClearParameters clears the value of the "parameters" field.
func (*QuestUpsertBulk) DoNothing ¶
func (u *QuestUpsertBulk) DoNothing() *QuestUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*QuestUpsertBulk) Exec ¶
func (u *QuestUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestUpsertBulk) ExecX ¶
func (u *QuestUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestUpsertBulk) Ignore ¶
func (u *QuestUpsertBulk) Ignore() *QuestUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Quest.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*QuestUpsertBulk) SetLastModifiedAt ¶
func (u *QuestUpsertBulk) SetLastModifiedAt(v time.Time) *QuestUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*QuestUpsertBulk) SetName ¶
func (u *QuestUpsertBulk) SetName(v string) *QuestUpsertBulk
SetName sets the "name" field.
func (*QuestUpsertBulk) SetParameters ¶
func (u *QuestUpsertBulk) SetParameters(v string) *QuestUpsertBulk
SetParameters sets the "parameters" field.
func (*QuestUpsertBulk) Update ¶
func (u *QuestUpsertBulk) Update(set func(*QuestUpsert)) *QuestUpsertBulk
Update allows overriding fields `UPDATE` values. See the QuestCreateBulk.OnConflict documentation for more info.
func (*QuestUpsertBulk) UpdateLastModifiedAt ¶
func (u *QuestUpsertBulk) UpdateLastModifiedAt() *QuestUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*QuestUpsertBulk) UpdateName ¶
func (u *QuestUpsertBulk) UpdateName() *QuestUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*QuestUpsertBulk) UpdateNewValues ¶
func (u *QuestUpsertBulk) UpdateNewValues() *QuestUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Quest.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*QuestUpsertBulk) UpdateParameters ¶
func (u *QuestUpsertBulk) UpdateParameters() *QuestUpsertBulk
UpdateParameters sets the "parameters" field to the value that was provided on create.
type QuestUpsertOne ¶
type QuestUpsertOne struct {
// contains filtered or unexported fields
}
QuestUpsertOne is the builder for "upsert"-ing
one Quest node.
func (*QuestUpsertOne) ClearParameters ¶
func (u *QuestUpsertOne) ClearParameters() *QuestUpsertOne
ClearParameters clears the value of the "parameters" field.
func (*QuestUpsertOne) DoNothing ¶
func (u *QuestUpsertOne) DoNothing() *QuestUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*QuestUpsertOne) Exec ¶
func (u *QuestUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*QuestUpsertOne) ExecX ¶
func (u *QuestUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*QuestUpsertOne) ID ¶
func (u *QuestUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*QuestUpsertOne) IDX ¶
func (u *QuestUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*QuestUpsertOne) Ignore ¶
func (u *QuestUpsertOne) Ignore() *QuestUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Quest.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*QuestUpsertOne) SetLastModifiedAt ¶
func (u *QuestUpsertOne) SetLastModifiedAt(v time.Time) *QuestUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*QuestUpsertOne) SetName ¶
func (u *QuestUpsertOne) SetName(v string) *QuestUpsertOne
SetName sets the "name" field.
func (*QuestUpsertOne) SetParameters ¶
func (u *QuestUpsertOne) SetParameters(v string) *QuestUpsertOne
SetParameters sets the "parameters" field.
func (*QuestUpsertOne) Update ¶
func (u *QuestUpsertOne) Update(set func(*QuestUpsert)) *QuestUpsertOne
Update allows overriding fields `UPDATE` values. See the QuestCreate.OnConflict documentation for more info.
func (*QuestUpsertOne) UpdateLastModifiedAt ¶
func (u *QuestUpsertOne) UpdateLastModifiedAt() *QuestUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*QuestUpsertOne) UpdateName ¶
func (u *QuestUpsertOne) UpdateName() *QuestUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*QuestUpsertOne) UpdateNewValues ¶
func (u *QuestUpsertOne) UpdateNewValues() *QuestUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Quest.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*QuestUpsertOne) UpdateParameters ¶
func (u *QuestUpsertOne) UpdateParameters() *QuestUpsertOne
UpdateParameters sets the "parameters" field to the value that was provided on create.
type QuestWhereInput ¶
type QuestWhereInput struct { Predicates []predicate.Quest `json:"-"` Not *QuestWhereInput `json:"not,omitempty"` Or []*QuestWhereInput `json:"or,omitempty"` And []*QuestWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "parameters" field predicates. Parameters *string `json:"parameters,omitempty"` ParametersNEQ *string `json:"parametersNEQ,omitempty"` ParametersIn []string `json:"parametersIn,omitempty"` ParametersNotIn []string `json:"parametersNotIn,omitempty"` ParametersGT *string `json:"parametersGT,omitempty"` ParametersGTE *string `json:"parametersGTE,omitempty"` ParametersLT *string `json:"parametersLT,omitempty"` ParametersLTE *string `json:"parametersLTE,omitempty"` ParametersContains *string `json:"parametersContains,omitempty"` ParametersHasPrefix *string `json:"parametersHasPrefix,omitempty"` ParametersHasSuffix *string `json:"parametersHasSuffix,omitempty"` ParametersIsNil bool `json:"parametersIsNil,omitempty"` ParametersNotNil bool `json:"parametersNotNil,omitempty"` ParametersEqualFold *string `json:"parametersEqualFold,omitempty"` ParametersContainsFold *string `json:"parametersContainsFold,omitempty"` // "tome" edge predicates. HasTome *bool `json:"hasTome,omitempty"` HasTomeWith []*TomeWhereInput `json:"hasTomeWith,omitempty"` // "bundle" edge predicates. HasBundle *bool `json:"hasBundle,omitempty"` HasBundleWith []*FileWhereInput `json:"hasBundleWith,omitempty"` // "tasks" edge predicates. HasTasks *bool `json:"hasTasks,omitempty"` HasTasksWith []*TaskWhereInput `json:"hasTasksWith,omitempty"` // "creator" edge predicates. HasCreator *bool `json:"hasCreator,omitempty"` HasCreatorWith []*UserWhereInput `json:"hasCreatorWith,omitempty"` }
QuestWhereInput represents a where input for filtering Quest queries.
func (*QuestWhereInput) AddPredicates ¶
func (i *QuestWhereInput) AddPredicates(predicates ...predicate.Quest)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
func (*QuestWhereInput) Filter ¶
func (i *QuestWhereInput) Filter(q *QuestQuery) (*QuestQuery, error)
Filter applies the QuestWhereInput filter on the QuestQuery builder.
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 Tag ¶
type Tag struct { // ID of the ent. ID int `json:"id,omitempty"` // Name of the tag Name string `json:"name,omitempty"` // Describes the type of tag this is Kind tag.Kind `json:"kind,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TagQuery when eager-loading is set. Edges TagEdges `json:"edges"` // contains filtered or unexported fields }
Tag is the model entity for the Tag schema.
func (*Tag) NamedHosts ¶
NamedHosts returns the Hosts named value or an error if the edge was not loaded in eager-loading with this name.
func (*Tag) QueryHosts ¶
QueryHosts queries the "hosts" edge of the Tag entity.
func (*Tag) Unwrap ¶
Unwrap unwraps the Tag 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 (*Tag) Update ¶
func (t *Tag) Update() *TagUpdateOne
Update returns a builder for updating this Tag. Note that you need to call Tag.Unwrap() before calling this method if this Tag was returned from a transaction, and the transaction was committed or rolled back.
type TagClient ¶
type TagClient struct {
// contains filtered or unexported fields
}
TagClient is a client for the Tag schema.
func NewTagClient ¶
func NewTagClient(c config) *TagClient
NewTagClient returns a client for the Tag from the given config.
func (*TagClient) CreateBulk ¶
func (c *TagClient) CreateBulk(builders ...*TagCreate) *TagCreateBulk
CreateBulk returns a builder for creating a bulk of Tag entities.
func (*TagClient) DeleteOne ¶
func (c *TagClient) DeleteOne(t *Tag) *TagDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TagClient) DeleteOneID ¶
func (c *TagClient) DeleteOneID(id int) *TagDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TagClient) Intercept ¶
func (c *TagClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tag.Intercept(f(g(h())))`.
func (*TagClient) Interceptors ¶
func (c *TagClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TagClient) MapCreateBulk ¶
func (c *TagClient) MapCreateBulk(slice any, setFunc func(*TagCreate, int)) *TagCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TagClient) QueryHosts ¶
QueryHosts queries the hosts edge of a Tag.
func (*TagClient) UpdateOne ¶
func (c *TagClient) UpdateOne(t *Tag) *TagUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TagClient) UpdateOneID ¶
func (c *TagClient) UpdateOneID(id int) *TagUpdateOne
UpdateOneID returns an update builder for the given id.
type TagConnection ¶
type TagConnection struct { Edges []*TagEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
TagConnection is the connection containing edges to Tag.
type TagCreate ¶
type TagCreate struct {
// contains filtered or unexported fields
}
TagCreate is the builder for creating a Tag entity.
func (*TagCreate) AddHostIDs ¶
AddHostIDs adds the "hosts" edge to the Host entity by IDs.
func (*TagCreate) Mutation ¶
func (tc *TagCreate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagCreate) OnConflict ¶
func (tc *TagCreate) OnConflict(opts ...sql.ConflictOption) *TagUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetName(v+v). }). Exec(ctx)
func (*TagCreate) OnConflictColumns ¶
func (tc *TagCreate) OnConflictColumns(columns ...string) *TagUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TagCreate) SetInput ¶
func (c *TagCreate) SetInput(i CreateTagInput) *TagCreate
SetInput applies the change-set in the CreateTagInput on the TagCreate builder.
type TagCreateBulk ¶
type TagCreateBulk struct {
// contains filtered or unexported fields
}
TagCreateBulk is the builder for creating many Tag entities in bulk.
func (*TagCreateBulk) Exec ¶
func (tcb *TagCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagCreateBulk) ExecX ¶
func (tcb *TagCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagCreateBulk) OnConflict ¶
func (tcb *TagCreateBulk) OnConflict(opts ...sql.ConflictOption) *TagUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tag.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TagUpsert) { SetName(v+v). }). Exec(ctx)
func (*TagCreateBulk) OnConflictColumns ¶
func (tcb *TagCreateBulk) OnConflictColumns(columns ...string) *TagUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TagDelete ¶
type TagDelete struct {
// contains filtered or unexported fields
}
TagDelete is the builder for deleting a Tag entity.
func (*TagDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type TagDeleteOne ¶
type TagDeleteOne struct {
// contains filtered or unexported fields
}
TagDeleteOne is the builder for deleting a single Tag entity.
func (*TagDeleteOne) Exec ¶
func (tdo *TagDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TagDeleteOne) ExecX ¶
func (tdo *TagDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagDeleteOne) Where ¶
func (tdo *TagDeleteOne) Where(ps ...predicate.Tag) *TagDeleteOne
Where appends a list predicates to the TagDelete builder.
type TagEdges ¶
type TagEdges struct { // Hosts holds the value of the hosts edge. Hosts []*Host `json:"hosts,omitempty"` // contains filtered or unexported fields }
TagEdges holds the relations/edges for other nodes in the graph.
func (TagEdges) HostsOrErr ¶
HostsOrErr returns the Hosts value or an error if the edge was not loaded in eager-loading.
type TagGroupBy ¶
type TagGroupBy struct {
// contains filtered or unexported fields
}
TagGroupBy is the group-by builder for Tag entities.
func (*TagGroupBy) Aggregate ¶
func (tgb *TagGroupBy) Aggregate(fns ...AggregateFunc) *TagGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TagGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagGroupBy) Scan ¶
func (tgb *TagGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TagGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagMutation ¶
type TagMutation struct {
// contains filtered or unexported fields
}
TagMutation represents an operation that mutates the Tag nodes in the graph.
func (*TagMutation) AddField ¶
func (m *TagMutation) 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 (*TagMutation) AddHostIDs ¶
func (m *TagMutation) AddHostIDs(ids ...int)
AddHostIDs adds the "hosts" edge to the Host entity by ids.
func (*TagMutation) AddedEdges ¶
func (m *TagMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TagMutation) AddedField ¶
func (m *TagMutation) 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 (*TagMutation) AddedFields ¶
func (m *TagMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TagMutation) AddedIDs ¶
func (m *TagMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TagMutation) ClearEdge ¶
func (m *TagMutation) 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 (*TagMutation) ClearField ¶
func (m *TagMutation) 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 (*TagMutation) ClearHosts ¶
func (m *TagMutation) ClearHosts()
ClearHosts clears the "hosts" edge to the Host entity.
func (*TagMutation) ClearedEdges ¶
func (m *TagMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TagMutation) ClearedFields ¶
func (m *TagMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TagMutation) Client ¶
func (m TagMutation) 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 (*TagMutation) EdgeCleared ¶
func (m *TagMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TagMutation) Field ¶
func (m *TagMutation) 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 (*TagMutation) FieldCleared ¶
func (m *TagMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TagMutation) Fields ¶
func (m *TagMutation) 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 (*TagMutation) HostsCleared ¶
func (m *TagMutation) HostsCleared() bool
HostsCleared reports if the "hosts" edge to the Host entity was cleared.
func (*TagMutation) HostsIDs ¶
func (m *TagMutation) HostsIDs() (ids []int)
HostsIDs returns the "hosts" edge IDs in the mutation.
func (*TagMutation) ID ¶
func (m *TagMutation) 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 (*TagMutation) IDs ¶
func (m *TagMutation) 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 (*TagMutation) Kind ¶
func (m *TagMutation) Kind() (r tag.Kind, exists bool)
Kind returns the value of the "kind" field in the mutation.
func (*TagMutation) Name ¶
func (m *TagMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TagMutation) 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 (*TagMutation) OldKind ¶
OldKind returns the old "kind" field's value of the Tag entity. If the Tag 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 (*TagMutation) OldName ¶
func (m *TagMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Tag entity. If the Tag 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 (*TagMutation) RemoveHostIDs ¶
func (m *TagMutation) RemoveHostIDs(ids ...int)
RemoveHostIDs removes the "hosts" edge to the Host entity by IDs.
func (*TagMutation) RemovedEdges ¶
func (m *TagMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TagMutation) RemovedHostsIDs ¶
func (m *TagMutation) RemovedHostsIDs() (ids []int)
RemovedHosts returns the removed IDs of the "hosts" edge to the Host entity.
func (*TagMutation) RemovedIDs ¶
func (m *TagMutation) 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 (*TagMutation) ResetEdge ¶
func (m *TagMutation) 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 (*TagMutation) ResetField ¶
func (m *TagMutation) 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 (*TagMutation) ResetHosts ¶
func (m *TagMutation) ResetHosts()
ResetHosts resets all changes to the "hosts" edge.
func (*TagMutation) ResetKind ¶
func (m *TagMutation) ResetKind()
ResetKind resets all changes to the "kind" field.
func (*TagMutation) ResetName ¶
func (m *TagMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TagMutation) SetField ¶
func (m *TagMutation) 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 (*TagMutation) SetKind ¶
func (m *TagMutation) SetKind(t tag.Kind)
SetKind sets the "kind" field.
func (*TagMutation) SetName ¶
func (m *TagMutation) SetName(s string)
SetName sets the "name" field.
func (*TagMutation) SetOp ¶
func (m *TagMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (TagMutation) Tx ¶
func (m TagMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TagMutation) Type ¶
func (m *TagMutation) Type() string
Type returns the node type of this mutation (Tag).
func (*TagMutation) Where ¶
func (m *TagMutation) Where(ps ...predicate.Tag)
Where appends a list predicates to the TagMutation builder.
func (*TagMutation) WhereP ¶
func (m *TagMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TagMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TagOrder ¶
type TagOrder struct { Direction OrderDirection `json:"direction"` Field *TagOrderField `json:"field"` }
TagOrder defines the ordering of Tag.
type TagOrderField ¶
type TagOrderField struct { // Value extracts the ordering value from the given Tag. Value func(*Tag) (ent.Value, error) // contains filtered or unexported fields }
TagOrderField defines the ordering field of Tag.
func (TagOrderField) MarshalGQL ¶
func (f TagOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (TagOrderField) String ¶
func (f TagOrderField) String() string
String implement fmt.Stringer interface.
func (*TagOrderField) UnmarshalGQL ¶
func (f *TagOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type TagPaginateOption ¶
type TagPaginateOption func(*tagPager) error
TagPaginateOption enables pagination customization.
func WithTagFilter ¶
func WithTagFilter(filter func(*TagQuery) (*TagQuery, error)) TagPaginateOption
WithTagFilter configures pagination filter.
func WithTagOrder ¶
func WithTagOrder(order *TagOrder) TagPaginateOption
WithTagOrder configures pagination ordering.
type TagQuery ¶
type TagQuery struct {
// contains filtered or unexported fields
}
TagQuery is the builder for querying Tag entities.
func (*TagQuery) Aggregate ¶
func (tq *TagQuery) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate returns a TagSelect configured with the given aggregations.
func (*TagQuery) Clone ¶
Clone returns a duplicate of the TagQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TagQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*TagQuery) First ¶
First returns the first Tag entity from the query. Returns a *NotFoundError when no Tag was found.
func (*TagQuery) FirstID ¶
FirstID returns the first Tag ID from the query. Returns a *NotFoundError when no Tag ID was found.
func (*TagQuery) GroupBy ¶
func (tq *TagQuery) GroupBy(field string, fields ...string) *TagGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.Tag.Query(). GroupBy(tag.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TagQuery) Only ¶
Only returns a single Tag entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tag entity is found. Returns a *NotFoundError when no Tag entities are found.
func (*TagQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tag ID in the query. Returns a *NotSingularError when more than one Tag ID is found. Returns a *NotFoundError when no entities are found.
func (*TagQuery) Order ¶
func (tq *TagQuery) Order(o ...tag.OrderOption) *TagQuery
Order specifies how the records should be ordered.
func (*TagQuery) Paginate ¶
func (t *TagQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...TagPaginateOption, ) (*TagConnection, error)
Paginate executes the query and returns a relay based cursor connection to Tag.
func (*TagQuery) QueryHosts ¶
QueryHosts chains the current query on the "hosts" edge.
func (*TagQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Tag.Query(). Select(tag.FieldName). Scan(ctx, &v)
func (*TagQuery) Unique ¶
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 (*TagQuery) WithHosts ¶
WithHosts tells the query-builder to eager-load the nodes that are connected to the "hosts" edge. The optional arguments are used to configure the query builder of the edge.
func (*TagQuery) WithNamedHosts ¶
WithNamedHosts tells the query-builder to eager-load the nodes that are connected to the "hosts" edge with the given name. The optional arguments are used to configure the query builder of the edge.
type TagSelect ¶
type TagSelect struct { *TagQuery // contains filtered or unexported fields }
TagSelect is the builder for selecting fields of Tag entities.
func (*TagSelect) Aggregate ¶
func (ts *TagSelect) Aggregate(fns ...AggregateFunc) *TagSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TagSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TagSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TagSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TagSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TagSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TagSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TagUpdate ¶
type TagUpdate struct {
// contains filtered or unexported fields
}
TagUpdate is the builder for updating Tag entities.
func (*TagUpdate) AddHostIDs ¶
AddHostIDs adds the "hosts" edge to the Host entity by IDs.
func (*TagUpdate) ClearHosts ¶
ClearHosts clears all "hosts" edges to the Host entity.
func (*TagUpdate) Mutation ¶
func (tu *TagUpdate) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdate) RemoveHostIDs ¶
RemoveHostIDs removes the "hosts" edge to Host entities by IDs.
func (*TagUpdate) RemoveHosts ¶
RemoveHosts removes "hosts" edges to Host entities.
func (*TagUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*TagUpdate) SetInput ¶
func (c *TagUpdate) SetInput(i UpdateTagInput) *TagUpdate
SetInput applies the change-set in the UpdateTagInput on the TagUpdate builder.
type TagUpdateOne ¶
type TagUpdateOne struct {
// contains filtered or unexported fields
}
TagUpdateOne is the builder for updating a single Tag entity.
func (*TagUpdateOne) AddHostIDs ¶
func (tuo *TagUpdateOne) AddHostIDs(ids ...int) *TagUpdateOne
AddHostIDs adds the "hosts" edge to the Host entity by IDs.
func (*TagUpdateOne) AddHosts ¶
func (tuo *TagUpdateOne) AddHosts(h ...*Host) *TagUpdateOne
AddHosts adds the "hosts" edges to the Host entity.
func (*TagUpdateOne) ClearHosts ¶
func (tuo *TagUpdateOne) ClearHosts() *TagUpdateOne
ClearHosts clears all "hosts" edges to the Host entity.
func (*TagUpdateOne) Exec ¶
func (tuo *TagUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TagUpdateOne) ExecX ¶
func (tuo *TagUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpdateOne) Mutation ¶
func (tuo *TagUpdateOne) Mutation() *TagMutation
Mutation returns the TagMutation object of the builder.
func (*TagUpdateOne) RemoveHostIDs ¶
func (tuo *TagUpdateOne) RemoveHostIDs(ids ...int) *TagUpdateOne
RemoveHostIDs removes the "hosts" edge to Host entities by IDs.
func (*TagUpdateOne) RemoveHosts ¶
func (tuo *TagUpdateOne) RemoveHosts(h ...*Host) *TagUpdateOne
RemoveHosts removes "hosts" edges to Host entities.
func (*TagUpdateOne) Save ¶
func (tuo *TagUpdateOne) Save(ctx context.Context) (*Tag, error)
Save executes the query and returns the updated Tag entity.
func (*TagUpdateOne) SaveX ¶
func (tuo *TagUpdateOne) SaveX(ctx context.Context) *Tag
SaveX is like Save, but panics if an error occurs.
func (*TagUpdateOne) Select ¶
func (tuo *TagUpdateOne) Select(field string, fields ...string) *TagUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TagUpdateOne) SetInput ¶
func (c *TagUpdateOne) SetInput(i UpdateTagInput) *TagUpdateOne
SetInput applies the change-set in the UpdateTagInput on the TagUpdateOne builder.
func (*TagUpdateOne) SetKind ¶
func (tuo *TagUpdateOne) SetKind(t tag.Kind) *TagUpdateOne
SetKind sets the "kind" field.
func (*TagUpdateOne) SetName ¶
func (tuo *TagUpdateOne) SetName(s string) *TagUpdateOne
SetName sets the "name" field.
func (*TagUpdateOne) Where ¶
func (tuo *TagUpdateOne) Where(ps ...predicate.Tag) *TagUpdateOne
Where appends a list predicates to the TagUpdate builder.
type TagUpsert ¶
TagUpsert is the "OnConflict" setter.
func (*TagUpsert) UpdateKind ¶
UpdateKind sets the "kind" field to the value that was provided on create.
func (*TagUpsert) UpdateName ¶
UpdateName sets the "name" field to the value that was provided on create.
type TagUpsertBulk ¶
type TagUpsertBulk struct {
// contains filtered or unexported fields
}
TagUpsertBulk is the builder for "upsert"-ing a bulk of Tag nodes.
func (*TagUpsertBulk) DoNothing ¶
func (u *TagUpsertBulk) DoNothing() *TagUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertBulk) Exec ¶
func (u *TagUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertBulk) ExecX ¶
func (u *TagUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertBulk) Ignore ¶
func (u *TagUpsertBulk) Ignore() *TagUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertBulk) SetKind ¶
func (u *TagUpsertBulk) SetKind(v tag.Kind) *TagUpsertBulk
SetKind sets the "kind" field.
func (*TagUpsertBulk) SetName ¶
func (u *TagUpsertBulk) SetName(v string) *TagUpsertBulk
SetName sets the "name" field.
func (*TagUpsertBulk) Update ¶
func (u *TagUpsertBulk) Update(set func(*TagUpsert)) *TagUpsertBulk
Update allows overriding fields `UPDATE` values. See the TagCreateBulk.OnConflict documentation for more info.
func (*TagUpsertBulk) UpdateKind ¶
func (u *TagUpsertBulk) UpdateKind() *TagUpsertBulk
UpdateKind sets the "kind" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateName ¶
func (u *TagUpsertBulk) UpdateName() *TagUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsertBulk) UpdateNewValues ¶
func (u *TagUpsertBulk) UpdateNewValues() *TagUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type TagUpsertOne ¶
type TagUpsertOne struct {
// contains filtered or unexported fields
}
TagUpsertOne is the builder for "upsert"-ing
one Tag node.
func (*TagUpsertOne) DoNothing ¶
func (u *TagUpsertOne) DoNothing() *TagUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TagUpsertOne) Exec ¶
func (u *TagUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TagUpsertOne) ExecX ¶
func (u *TagUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TagUpsertOne) ID ¶
func (u *TagUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TagUpsertOne) IDX ¶
func (u *TagUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TagUpsertOne) Ignore ¶
func (u *TagUpsertOne) Ignore() *TagUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tag.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TagUpsertOne) SetKind ¶
func (u *TagUpsertOne) SetKind(v tag.Kind) *TagUpsertOne
SetKind sets the "kind" field.
func (*TagUpsertOne) SetName ¶
func (u *TagUpsertOne) SetName(v string) *TagUpsertOne
SetName sets the "name" field.
func (*TagUpsertOne) Update ¶
func (u *TagUpsertOne) Update(set func(*TagUpsert)) *TagUpsertOne
Update allows overriding fields `UPDATE` values. See the TagCreate.OnConflict documentation for more info.
func (*TagUpsertOne) UpdateKind ¶
func (u *TagUpsertOne) UpdateKind() *TagUpsertOne
UpdateKind sets the "kind" field to the value that was provided on create.
func (*TagUpsertOne) UpdateName ¶
func (u *TagUpsertOne) UpdateName() *TagUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TagUpsertOne) UpdateNewValues ¶
func (u *TagUpsertOne) UpdateNewValues() *TagUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tag.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
type TagWhereInput ¶
type TagWhereInput struct { Predicates []predicate.Tag `json:"-"` Not *TagWhereInput `json:"not,omitempty"` Or []*TagWhereInput `json:"or,omitempty"` And []*TagWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "kind" field predicates. Kind *tag.Kind `json:"kind,omitempty"` KindNEQ *tag.Kind `json:"kindNEQ,omitempty"` KindIn []tag.Kind `json:"kindIn,omitempty"` KindNotIn []tag.Kind `json:"kindNotIn,omitempty"` // "hosts" edge predicates. HasHosts *bool `json:"hasHosts,omitempty"` HasHostsWith []*HostWhereInput `json:"hasHostsWith,omitempty"` }
TagWhereInput represents a where input for filtering Tag queries.
func (*TagWhereInput) AddPredicates ¶
func (i *TagWhereInput) AddPredicates(predicates ...predicate.Tag)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type Task ¶
type Task struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // Timestamp of when the task was claimed, null if not yet claimed ClaimedAt time.Time `json:"claimed_at,omitempty"` // Timestamp of when execution of the task started, null if not yet started ExecStartedAt time.Time `json:"exec_started_at,omitempty"` // Timestamp of when execution of the task finished, null if not yet finished ExecFinishedAt time.Time `json:"exec_finished_at,omitempty"` // Output from executing the task Output string `json:"output,omitempty"` // The size of the output in bytes OutputSize int `json:"output_size,omitempty"` // Error, if any, produced while executing the Task Error string `json:"error,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TaskQuery when eager-loading is set. Edges TaskEdges `json:"edges"` // contains filtered or unexported fields }
Task is the model entity for the Task schema.
func (*Task) IsNode ¶
func (n *Task) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Task) NamedReportedFiles ¶ added in v0.0.5
NamedReportedFiles returns the ReportedFiles named value or an error if the edge was not loaded in eager-loading with this name.
func (*Task) NamedReportedProcesses ¶ added in v0.0.5
func (t *Task) NamedReportedProcesses(name string) ([]*HostProcess, error)
NamedReportedProcesses returns the ReportedProcesses named value or an error if the edge was not loaded in eager-loading with this name.
func (*Task) QueryBeacon ¶
func (t *Task) QueryBeacon() *BeaconQuery
QueryBeacon queries the "beacon" edge of the Task entity.
func (*Task) QueryQuest ¶
func (t *Task) QueryQuest() *QuestQuery
QueryQuest queries the "quest" edge of the Task entity.
func (*Task) QueryReportedFiles ¶ added in v0.0.5
func (t *Task) QueryReportedFiles() *HostFileQuery
QueryReportedFiles queries the "reported_files" edge of the Task entity.
func (*Task) QueryReportedProcesses ¶ added in v0.0.5
func (t *Task) QueryReportedProcesses() *HostProcessQuery
QueryReportedProcesses queries the "reported_processes" edge of the Task entity.
func (*Task) ReportedFiles ¶ added in v0.0.5
func (*Task) ReportedProcesses ¶ added in v0.0.5
func (t *Task) ReportedProcesses(ctx context.Context) (result []*HostProcess, err error)
func (*Task) Unwrap ¶
Unwrap unwraps the Task 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 (*Task) Update ¶
func (t *Task) Update() *TaskUpdateOne
Update returns a builder for updating this Task. Note that you need to call Task.Unwrap() before calling this method if this Task was returned from a transaction, and the transaction was committed or rolled back.
type TaskClient ¶
type TaskClient struct {
// contains filtered or unexported fields
}
TaskClient is a client for the Task schema.
func NewTaskClient ¶
func NewTaskClient(c config) *TaskClient
NewTaskClient returns a client for the Task from the given config.
func (*TaskClient) Create ¶
func (c *TaskClient) Create() *TaskCreate
Create returns a builder for creating a Task entity.
func (*TaskClient) CreateBulk ¶
func (c *TaskClient) CreateBulk(builders ...*TaskCreate) *TaskCreateBulk
CreateBulk returns a builder for creating a bulk of Task entities.
func (*TaskClient) Delete ¶
func (c *TaskClient) Delete() *TaskDelete
Delete returns a delete builder for Task.
func (*TaskClient) DeleteOne ¶
func (c *TaskClient) DeleteOne(t *Task) *TaskDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TaskClient) DeleteOneID ¶
func (c *TaskClient) DeleteOneID(id int) *TaskDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TaskClient) GetX ¶
func (c *TaskClient) GetX(ctx context.Context, id int) *Task
GetX is like Get, but panics if an error occurs.
func (*TaskClient) Intercept ¶
func (c *TaskClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `task.Intercept(f(g(h())))`.
func (*TaskClient) Interceptors ¶
func (c *TaskClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TaskClient) MapCreateBulk ¶
func (c *TaskClient) MapCreateBulk(slice any, setFunc func(*TaskCreate, int)) *TaskCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TaskClient) Query ¶
func (c *TaskClient) Query() *TaskQuery
Query returns a query builder for Task.
func (*TaskClient) QueryBeacon ¶
func (c *TaskClient) QueryBeacon(t *Task) *BeaconQuery
QueryBeacon queries the beacon edge of a Task.
func (*TaskClient) QueryQuest ¶
func (c *TaskClient) QueryQuest(t *Task) *QuestQuery
QueryQuest queries the quest edge of a Task.
func (*TaskClient) QueryReportedFiles ¶ added in v0.0.5
func (c *TaskClient) QueryReportedFiles(t *Task) *HostFileQuery
QueryReportedFiles queries the reported_files edge of a Task.
func (*TaskClient) QueryReportedProcesses ¶ added in v0.0.5
func (c *TaskClient) QueryReportedProcesses(t *Task) *HostProcessQuery
QueryReportedProcesses queries the reported_processes edge of a Task.
func (*TaskClient) Update ¶
func (c *TaskClient) Update() *TaskUpdate
Update returns an update builder for Task.
func (*TaskClient) UpdateOne ¶
func (c *TaskClient) UpdateOne(t *Task) *TaskUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TaskClient) UpdateOneID ¶
func (c *TaskClient) UpdateOneID(id int) *TaskUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TaskClient) Use ¶
func (c *TaskClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `task.Hooks(f(g(h())))`.
type TaskConnection ¶
type TaskConnection struct { Edges []*TaskEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
TaskConnection is the connection containing edges to Task.
type TaskCreate ¶
type TaskCreate struct {
// contains filtered or unexported fields
}
TaskCreate is the builder for creating a Task entity.
func (*TaskCreate) AddReportedFileIDs ¶ added in v0.0.5
func (tc *TaskCreate) AddReportedFileIDs(ids ...int) *TaskCreate
AddReportedFileIDs adds the "reported_files" edge to the HostFile entity by IDs.
func (*TaskCreate) AddReportedFiles ¶ added in v0.0.5
func (tc *TaskCreate) AddReportedFiles(h ...*HostFile) *TaskCreate
AddReportedFiles adds the "reported_files" edges to the HostFile entity.
func (*TaskCreate) AddReportedProcessIDs ¶ added in v0.0.5
func (tc *TaskCreate) AddReportedProcessIDs(ids ...int) *TaskCreate
AddReportedProcessIDs adds the "reported_processes" edge to the HostProcess entity by IDs.
func (*TaskCreate) AddReportedProcesses ¶ added in v0.0.5
func (tc *TaskCreate) AddReportedProcesses(h ...*HostProcess) *TaskCreate
AddReportedProcesses adds the "reported_processes" edges to the HostProcess entity.
func (*TaskCreate) Exec ¶
func (tc *TaskCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreate) ExecX ¶
func (tc *TaskCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreate) Mutation ¶
func (tc *TaskCreate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskCreate) OnConflict ¶
func (tc *TaskCreate) OnConflict(opts ...sql.ConflictOption) *TaskUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Task.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TaskUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TaskCreate) OnConflictColumns ¶
func (tc *TaskCreate) OnConflictColumns(columns ...string) *TaskUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TaskCreate) Save ¶
func (tc *TaskCreate) Save(ctx context.Context) (*Task, error)
Save creates the Task in the database.
func (*TaskCreate) SaveX ¶
func (tc *TaskCreate) SaveX(ctx context.Context) *Task
SaveX calls Save and panics if Save returns an error.
func (*TaskCreate) SetBeacon ¶
func (tc *TaskCreate) SetBeacon(b *Beacon) *TaskCreate
SetBeacon sets the "beacon" edge to the Beacon entity.
func (*TaskCreate) SetBeaconID ¶
func (tc *TaskCreate) SetBeaconID(id int) *TaskCreate
SetBeaconID sets the "beacon" edge to the Beacon entity by ID.
func (*TaskCreate) SetClaimedAt ¶
func (tc *TaskCreate) SetClaimedAt(t time.Time) *TaskCreate
SetClaimedAt sets the "claimed_at" field.
func (*TaskCreate) SetCreatedAt ¶
func (tc *TaskCreate) SetCreatedAt(t time.Time) *TaskCreate
SetCreatedAt sets the "created_at" field.
func (*TaskCreate) SetError ¶
func (tc *TaskCreate) SetError(s string) *TaskCreate
SetError sets the "error" field.
func (*TaskCreate) SetExecFinishedAt ¶
func (tc *TaskCreate) SetExecFinishedAt(t time.Time) *TaskCreate
SetExecFinishedAt sets the "exec_finished_at" field.
func (*TaskCreate) SetExecStartedAt ¶
func (tc *TaskCreate) SetExecStartedAt(t time.Time) *TaskCreate
SetExecStartedAt sets the "exec_started_at" field.
func (*TaskCreate) SetLastModifiedAt ¶
func (tc *TaskCreate) SetLastModifiedAt(t time.Time) *TaskCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*TaskCreate) SetNillableClaimedAt ¶
func (tc *TaskCreate) SetNillableClaimedAt(t *time.Time) *TaskCreate
SetNillableClaimedAt sets the "claimed_at" field if the given value is not nil.
func (*TaskCreate) SetNillableCreatedAt ¶
func (tc *TaskCreate) SetNillableCreatedAt(t *time.Time) *TaskCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TaskCreate) SetNillableError ¶
func (tc *TaskCreate) SetNillableError(s *string) *TaskCreate
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskCreate) SetNillableExecFinishedAt ¶
func (tc *TaskCreate) SetNillableExecFinishedAt(t *time.Time) *TaskCreate
SetNillableExecFinishedAt sets the "exec_finished_at" field if the given value is not nil.
func (*TaskCreate) SetNillableExecStartedAt ¶
func (tc *TaskCreate) SetNillableExecStartedAt(t *time.Time) *TaskCreate
SetNillableExecStartedAt sets the "exec_started_at" field if the given value is not nil.
func (*TaskCreate) SetNillableLastModifiedAt ¶
func (tc *TaskCreate) SetNillableLastModifiedAt(t *time.Time) *TaskCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*TaskCreate) SetNillableOutput ¶
func (tc *TaskCreate) SetNillableOutput(s *string) *TaskCreate
SetNillableOutput sets the "output" field if the given value is not nil.
func (*TaskCreate) SetNillableOutputSize ¶ added in v0.0.5
func (tc *TaskCreate) SetNillableOutputSize(i *int) *TaskCreate
SetNillableOutputSize sets the "output_size" field if the given value is not nil.
func (*TaskCreate) SetOutput ¶
func (tc *TaskCreate) SetOutput(s string) *TaskCreate
SetOutput sets the "output" field.
func (*TaskCreate) SetOutputSize ¶ added in v0.0.5
func (tc *TaskCreate) SetOutputSize(i int) *TaskCreate
SetOutputSize sets the "output_size" field.
func (*TaskCreate) SetQuest ¶
func (tc *TaskCreate) SetQuest(q *Quest) *TaskCreate
SetQuest sets the "quest" edge to the Quest entity.
func (*TaskCreate) SetQuestID ¶
func (tc *TaskCreate) SetQuestID(id int) *TaskCreate
SetQuestID sets the "quest" edge to the Quest entity by ID.
type TaskCreateBulk ¶
type TaskCreateBulk struct {
// contains filtered or unexported fields
}
TaskCreateBulk is the builder for creating many Task entities in bulk.
func (*TaskCreateBulk) Exec ¶
func (tcb *TaskCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskCreateBulk) ExecX ¶
func (tcb *TaskCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskCreateBulk) OnConflict ¶
func (tcb *TaskCreateBulk) OnConflict(opts ...sql.ConflictOption) *TaskUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Task.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TaskUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TaskCreateBulk) OnConflictColumns ¶
func (tcb *TaskCreateBulk) OnConflictColumns(columns ...string) *TaskUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TaskDelete ¶
type TaskDelete struct {
// contains filtered or unexported fields
}
TaskDelete is the builder for deleting a Task entity.
func (*TaskDelete) Exec ¶
func (td *TaskDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TaskDelete) ExecX ¶
func (td *TaskDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TaskDelete) Where ¶
func (td *TaskDelete) Where(ps ...predicate.Task) *TaskDelete
Where appends a list predicates to the TaskDelete builder.
type TaskDeleteOne ¶
type TaskDeleteOne struct {
// contains filtered or unexported fields
}
TaskDeleteOne is the builder for deleting a single Task entity.
func (*TaskDeleteOne) Exec ¶
func (tdo *TaskDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TaskDeleteOne) ExecX ¶
func (tdo *TaskDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskDeleteOne) Where ¶
func (tdo *TaskDeleteOne) Where(ps ...predicate.Task) *TaskDeleteOne
Where appends a list predicates to the TaskDelete builder.
type TaskEdges ¶
type TaskEdges struct { // Quest holds the value of the quest edge. Quest *Quest `json:"quest,omitempty"` // Beacon holds the value of the beacon edge. Beacon *Beacon `json:"beacon,omitempty"` // Files that have been reported by this task. ReportedFiles []*HostFile `json:"reported_files,omitempty"` // Processes that have been reported by this task. ReportedProcesses []*HostProcess `json:"reported_processes,omitempty"` // contains filtered or unexported fields }
TaskEdges holds the relations/edges for other nodes in the graph.
func (TaskEdges) BeaconOrErr ¶
BeaconOrErr returns the Beacon value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TaskEdges) QuestOrErr ¶
QuestOrErr returns the Quest value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (TaskEdges) ReportedFilesOrErr ¶ added in v0.0.5
ReportedFilesOrErr returns the ReportedFiles value or an error if the edge was not loaded in eager-loading.
func (TaskEdges) ReportedProcessesOrErr ¶ added in v0.0.5
func (e TaskEdges) ReportedProcessesOrErr() ([]*HostProcess, error)
ReportedProcessesOrErr returns the ReportedProcesses value or an error if the edge was not loaded in eager-loading.
type TaskGroupBy ¶
type TaskGroupBy struct {
// contains filtered or unexported fields
}
TaskGroupBy is the group-by builder for Task entities.
func (*TaskGroupBy) Aggregate ¶
func (tgb *TaskGroupBy) Aggregate(fns ...AggregateFunc) *TaskGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TaskGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskGroupBy) Scan ¶
func (tgb *TaskGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TaskGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TaskMutation ¶
type TaskMutation struct {
// contains filtered or unexported fields
}
TaskMutation represents an operation that mutates the Task nodes in the graph.
func (*TaskMutation) AddField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddOutputSize ¶ added in v0.0.5
func (m *TaskMutation) AddOutputSize(i int)
AddOutputSize adds i to the "output_size" field.
func (*TaskMutation) AddReportedFileIDs ¶ added in v0.0.5
func (m *TaskMutation) AddReportedFileIDs(ids ...int)
AddReportedFileIDs adds the "reported_files" edge to the HostFile entity by ids.
func (*TaskMutation) AddReportedProcessIDs ¶ added in v0.0.5
func (m *TaskMutation) AddReportedProcessIDs(ids ...int)
AddReportedProcessIDs adds the "reported_processes" edge to the HostProcess entity by ids.
func (*TaskMutation) AddedEdges ¶
func (m *TaskMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TaskMutation) AddedField ¶
func (m *TaskMutation) 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 (*TaskMutation) AddedFields ¶
func (m *TaskMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TaskMutation) AddedIDs ¶
func (m *TaskMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TaskMutation) AddedOutputSize ¶ added in v0.0.5
func (m *TaskMutation) AddedOutputSize() (r int, exists bool)
AddedOutputSize returns the value that was added to the "output_size" field in this mutation.
func (*TaskMutation) BeaconCleared ¶
func (m *TaskMutation) BeaconCleared() bool
BeaconCleared reports if the "beacon" edge to the Beacon entity was cleared.
func (*TaskMutation) BeaconID ¶
func (m *TaskMutation) BeaconID() (id int, exists bool)
BeaconID returns the "beacon" edge ID in the mutation.
func (*TaskMutation) BeaconIDs ¶
func (m *TaskMutation) BeaconIDs() (ids []int)
BeaconIDs returns the "beacon" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use BeaconID instead. It exists only for internal usage by the builders.
func (*TaskMutation) ClaimedAt ¶
func (m *TaskMutation) ClaimedAt() (r time.Time, exists bool)
ClaimedAt returns the value of the "claimed_at" field in the mutation.
func (*TaskMutation) ClaimedAtCleared ¶
func (m *TaskMutation) ClaimedAtCleared() bool
ClaimedAtCleared returns if the "claimed_at" field was cleared in this mutation.
func (*TaskMutation) ClearBeacon ¶
func (m *TaskMutation) ClearBeacon()
ClearBeacon clears the "beacon" edge to the Beacon entity.
func (*TaskMutation) ClearClaimedAt ¶
func (m *TaskMutation) ClearClaimedAt()
ClearClaimedAt clears the value of the "claimed_at" field.
func (*TaskMutation) ClearEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearError ¶
func (m *TaskMutation) ClearError()
ClearError clears the value of the "error" field.
func (*TaskMutation) ClearExecFinishedAt ¶
func (m *TaskMutation) ClearExecFinishedAt()
ClearExecFinishedAt clears the value of the "exec_finished_at" field.
func (*TaskMutation) ClearExecStartedAt ¶
func (m *TaskMutation) ClearExecStartedAt()
ClearExecStartedAt clears the value of the "exec_started_at" field.
func (*TaskMutation) ClearField ¶
func (m *TaskMutation) 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 (*TaskMutation) ClearOutput ¶
func (m *TaskMutation) ClearOutput()
ClearOutput clears the value of the "output" field.
func (*TaskMutation) ClearQuest ¶
func (m *TaskMutation) ClearQuest()
ClearQuest clears the "quest" edge to the Quest entity.
func (*TaskMutation) ClearReportedFiles ¶ added in v0.0.5
func (m *TaskMutation) ClearReportedFiles()
ClearReportedFiles clears the "reported_files" edge to the HostFile entity.
func (*TaskMutation) ClearReportedProcesses ¶ added in v0.0.5
func (m *TaskMutation) ClearReportedProcesses()
ClearReportedProcesses clears the "reported_processes" edge to the HostProcess entity.
func (*TaskMutation) ClearedEdges ¶
func (m *TaskMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TaskMutation) ClearedFields ¶
func (m *TaskMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TaskMutation) Client ¶
func (m TaskMutation) 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 (*TaskMutation) CreatedAt ¶
func (m *TaskMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TaskMutation) EdgeCleared ¶
func (m *TaskMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TaskMutation) Error ¶
func (m *TaskMutation) Error() (r string, exists bool)
Error returns the value of the "error" field in the mutation.
func (*TaskMutation) ErrorCleared ¶
func (m *TaskMutation) ErrorCleared() bool
ErrorCleared returns if the "error" field was cleared in this mutation.
func (*TaskMutation) ExecFinishedAt ¶
func (m *TaskMutation) ExecFinishedAt() (r time.Time, exists bool)
ExecFinishedAt returns the value of the "exec_finished_at" field in the mutation.
func (*TaskMutation) ExecFinishedAtCleared ¶
func (m *TaskMutation) ExecFinishedAtCleared() bool
ExecFinishedAtCleared returns if the "exec_finished_at" field was cleared in this mutation.
func (*TaskMutation) ExecStartedAt ¶
func (m *TaskMutation) ExecStartedAt() (r time.Time, exists bool)
ExecStartedAt returns the value of the "exec_started_at" field in the mutation.
func (*TaskMutation) ExecStartedAtCleared ¶
func (m *TaskMutation) ExecStartedAtCleared() bool
ExecStartedAtCleared returns if the "exec_started_at" field was cleared in this mutation.
func (*TaskMutation) Field ¶
func (m *TaskMutation) 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 (*TaskMutation) FieldCleared ¶
func (m *TaskMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TaskMutation) Fields ¶
func (m *TaskMutation) 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 (*TaskMutation) ID ¶
func (m *TaskMutation) 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 (*TaskMutation) IDs ¶
func (m *TaskMutation) 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 (*TaskMutation) LastModifiedAt ¶
func (m *TaskMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*TaskMutation) OldClaimedAt ¶
OldClaimedAt returns the old "claimed_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldError ¶
func (m *TaskMutation) OldError(ctx context.Context) (v string, err error)
OldError returns the old "error" field's value of the Task entity. If the Task 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 (*TaskMutation) OldExecFinishedAt ¶
OldExecFinishedAt returns the old "exec_finished_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldExecStartedAt ¶
OldExecStartedAt returns the old "exec_started_at" field's value of the Task entity. If the Task 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 (*TaskMutation) 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 (*TaskMutation) OldLastModifiedAt ¶
OldLastModifiedAt returns the old "last_modified_at" field's value of the Task entity. If the Task 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 (*TaskMutation) OldOutput ¶
func (m *TaskMutation) OldOutput(ctx context.Context) (v string, err error)
OldOutput returns the old "output" field's value of the Task entity. If the Task 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 (*TaskMutation) OldOutputSize ¶ added in v0.0.5
func (m *TaskMutation) OldOutputSize(ctx context.Context) (v int, err error)
OldOutputSize returns the old "output_size" field's value of the Task entity. If the Task 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 (*TaskMutation) Output ¶
func (m *TaskMutation) Output() (r string, exists bool)
Output returns the value of the "output" field in the mutation.
func (*TaskMutation) OutputCleared ¶
func (m *TaskMutation) OutputCleared() bool
OutputCleared returns if the "output" field was cleared in this mutation.
func (*TaskMutation) OutputSize ¶ added in v0.0.5
func (m *TaskMutation) OutputSize() (r int, exists bool)
OutputSize returns the value of the "output_size" field in the mutation.
func (*TaskMutation) QuestCleared ¶
func (m *TaskMutation) QuestCleared() bool
QuestCleared reports if the "quest" edge to the Quest entity was cleared.
func (*TaskMutation) QuestID ¶
func (m *TaskMutation) QuestID() (id int, exists bool)
QuestID returns the "quest" edge ID in the mutation.
func (*TaskMutation) QuestIDs ¶
func (m *TaskMutation) QuestIDs() (ids []int)
QuestIDs returns the "quest" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use QuestID instead. It exists only for internal usage by the builders.
func (*TaskMutation) RemoveReportedFileIDs ¶ added in v0.0.5
func (m *TaskMutation) RemoveReportedFileIDs(ids ...int)
RemoveReportedFileIDs removes the "reported_files" edge to the HostFile entity by IDs.
func (*TaskMutation) RemoveReportedProcessIDs ¶ added in v0.0.5
func (m *TaskMutation) RemoveReportedProcessIDs(ids ...int)
RemoveReportedProcessIDs removes the "reported_processes" edge to the HostProcess entity by IDs.
func (*TaskMutation) RemovedEdges ¶
func (m *TaskMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TaskMutation) RemovedIDs ¶
func (m *TaskMutation) 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 (*TaskMutation) RemovedReportedFilesIDs ¶ added in v0.0.5
func (m *TaskMutation) RemovedReportedFilesIDs() (ids []int)
RemovedReportedFiles returns the removed IDs of the "reported_files" edge to the HostFile entity.
func (*TaskMutation) RemovedReportedProcessesIDs ¶ added in v0.0.5
func (m *TaskMutation) RemovedReportedProcessesIDs() (ids []int)
RemovedReportedProcesses returns the removed IDs of the "reported_processes" edge to the HostProcess entity.
func (*TaskMutation) ReportedFilesCleared ¶ added in v0.0.5
func (m *TaskMutation) ReportedFilesCleared() bool
ReportedFilesCleared reports if the "reported_files" edge to the HostFile entity was cleared.
func (*TaskMutation) ReportedFilesIDs ¶ added in v0.0.5
func (m *TaskMutation) ReportedFilesIDs() (ids []int)
ReportedFilesIDs returns the "reported_files" edge IDs in the mutation.
func (*TaskMutation) ReportedProcessesCleared ¶ added in v0.0.5
func (m *TaskMutation) ReportedProcessesCleared() bool
ReportedProcessesCleared reports if the "reported_processes" edge to the HostProcess entity was cleared.
func (*TaskMutation) ReportedProcessesIDs ¶ added in v0.0.5
func (m *TaskMutation) ReportedProcessesIDs() (ids []int)
ReportedProcessesIDs returns the "reported_processes" edge IDs in the mutation.
func (*TaskMutation) ResetBeacon ¶
func (m *TaskMutation) ResetBeacon()
ResetBeacon resets all changes to the "beacon" edge.
func (*TaskMutation) ResetClaimedAt ¶
func (m *TaskMutation) ResetClaimedAt()
ResetClaimedAt resets all changes to the "claimed_at" field.
func (*TaskMutation) ResetCreatedAt ¶
func (m *TaskMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TaskMutation) ResetEdge ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetError ¶
func (m *TaskMutation) ResetError()
ResetError resets all changes to the "error" field.
func (*TaskMutation) ResetExecFinishedAt ¶
func (m *TaskMutation) ResetExecFinishedAt()
ResetExecFinishedAt resets all changes to the "exec_finished_at" field.
func (*TaskMutation) ResetExecStartedAt ¶
func (m *TaskMutation) ResetExecStartedAt()
ResetExecStartedAt resets all changes to the "exec_started_at" field.
func (*TaskMutation) ResetField ¶
func (m *TaskMutation) 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 (*TaskMutation) ResetLastModifiedAt ¶
func (m *TaskMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*TaskMutation) ResetOutput ¶
func (m *TaskMutation) ResetOutput()
ResetOutput resets all changes to the "output" field.
func (*TaskMutation) ResetOutputSize ¶ added in v0.0.5
func (m *TaskMutation) ResetOutputSize()
ResetOutputSize resets all changes to the "output_size" field.
func (*TaskMutation) ResetQuest ¶
func (m *TaskMutation) ResetQuest()
ResetQuest resets all changes to the "quest" edge.
func (*TaskMutation) ResetReportedFiles ¶ added in v0.0.5
func (m *TaskMutation) ResetReportedFiles()
ResetReportedFiles resets all changes to the "reported_files" edge.
func (*TaskMutation) ResetReportedProcesses ¶ added in v0.0.5
func (m *TaskMutation) ResetReportedProcesses()
ResetReportedProcesses resets all changes to the "reported_processes" edge.
func (*TaskMutation) SetBeaconID ¶
func (m *TaskMutation) SetBeaconID(id int)
SetBeaconID sets the "beacon" edge to the Beacon entity by id.
func (*TaskMutation) SetClaimedAt ¶
func (m *TaskMutation) SetClaimedAt(t time.Time)
SetClaimedAt sets the "claimed_at" field.
func (*TaskMutation) SetCreatedAt ¶
func (m *TaskMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TaskMutation) SetError ¶
func (m *TaskMutation) SetError(s string)
SetError sets the "error" field.
func (*TaskMutation) SetExecFinishedAt ¶
func (m *TaskMutation) SetExecFinishedAt(t time.Time)
SetExecFinishedAt sets the "exec_finished_at" field.
func (*TaskMutation) SetExecStartedAt ¶
func (m *TaskMutation) SetExecStartedAt(t time.Time)
SetExecStartedAt sets the "exec_started_at" field.
func (*TaskMutation) SetField ¶
func (m *TaskMutation) 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 (*TaskMutation) SetLastModifiedAt ¶
func (m *TaskMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*TaskMutation) SetOp ¶
func (m *TaskMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TaskMutation) SetOutput ¶
func (m *TaskMutation) SetOutput(s string)
SetOutput sets the "output" field.
func (*TaskMutation) SetOutputSize ¶ added in v0.0.5
func (m *TaskMutation) SetOutputSize(i int)
SetOutputSize sets the "output_size" field.
func (*TaskMutation) SetQuestID ¶
func (m *TaskMutation) SetQuestID(id int)
SetQuestID sets the "quest" edge to the Quest entity by id.
func (TaskMutation) Tx ¶
func (m TaskMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TaskMutation) Type ¶
func (m *TaskMutation) Type() string
Type returns the node type of this mutation (Task).
func (*TaskMutation) Where ¶
func (m *TaskMutation) Where(ps ...predicate.Task)
Where appends a list predicates to the TaskMutation builder.
func (*TaskMutation) WhereP ¶
func (m *TaskMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TaskMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TaskOrder ¶
type TaskOrder struct { Direction OrderDirection `json:"direction"` Field *TaskOrderField `json:"field"` }
TaskOrder defines the ordering of Task.
type TaskOrderField ¶
type TaskOrderField struct { // Value extracts the ordering value from the given Task. Value func(*Task) (ent.Value, error) // contains filtered or unexported fields }
TaskOrderField defines the ordering field of Task.
func (TaskOrderField) MarshalGQL ¶
func (f TaskOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (TaskOrderField) String ¶
func (f TaskOrderField) String() string
String implement fmt.Stringer interface.
func (*TaskOrderField) UnmarshalGQL ¶
func (f *TaskOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type TaskPaginateOption ¶
type TaskPaginateOption func(*taskPager) error
TaskPaginateOption enables pagination customization.
func WithTaskFilter ¶
func WithTaskFilter(filter func(*TaskQuery) (*TaskQuery, error)) TaskPaginateOption
WithTaskFilter configures pagination filter.
func WithTaskOrder ¶
func WithTaskOrder(order []*TaskOrder) TaskPaginateOption
WithTaskOrder configures pagination ordering.
type TaskQuery ¶
type TaskQuery struct {
// contains filtered or unexported fields
}
TaskQuery is the builder for querying Task entities.
func (*TaskQuery) Aggregate ¶
func (tq *TaskQuery) Aggregate(fns ...AggregateFunc) *TaskSelect
Aggregate returns a TaskSelect configured with the given aggregations.
func (*TaskQuery) Clone ¶
Clone returns a duplicate of the TaskQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TaskQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*TaskQuery) First ¶
First returns the first Task entity from the query. Returns a *NotFoundError when no Task was found.
func (*TaskQuery) FirstID ¶
FirstID returns the first Task ID from the query. Returns a *NotFoundError when no Task ID was found.
func (*TaskQuery) GroupBy ¶
func (tq *TaskQuery) GroupBy(field string, fields ...string) *TaskGroupBy
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.Task.Query(). GroupBy(task.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TaskQuery) Only ¶
Only returns a single Task entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Task entity is found. Returns a *NotFoundError when no Task entities are found.
func (*TaskQuery) OnlyID ¶
OnlyID is like Only, but returns the only Task ID in the query. Returns a *NotSingularError when more than one Task ID is found. Returns a *NotFoundError when no entities are found.
func (*TaskQuery) Order ¶
func (tq *TaskQuery) Order(o ...task.OrderOption) *TaskQuery
Order specifies how the records should be ordered.
func (*TaskQuery) Paginate ¶
func (t *TaskQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...TaskPaginateOption, ) (*TaskConnection, error)
Paginate executes the query and returns a relay based cursor connection to Task.
func (*TaskQuery) QueryBeacon ¶
func (tq *TaskQuery) QueryBeacon() *BeaconQuery
QueryBeacon chains the current query on the "beacon" edge.
func (*TaskQuery) QueryQuest ¶
func (tq *TaskQuery) QueryQuest() *QuestQuery
QueryQuest chains the current query on the "quest" edge.
func (*TaskQuery) QueryReportedFiles ¶ added in v0.0.5
func (tq *TaskQuery) QueryReportedFiles() *HostFileQuery
QueryReportedFiles chains the current query on the "reported_files" edge.
func (*TaskQuery) QueryReportedProcesses ¶ added in v0.0.5
func (tq *TaskQuery) QueryReportedProcesses() *HostProcessQuery
QueryReportedProcesses chains the current query on the "reported_processes" edge.
func (*TaskQuery) Select ¶
func (tq *TaskQuery) Select(fields ...string) *TaskSelect
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.Task.Query(). Select(task.FieldCreatedAt). Scan(ctx, &v)
func (*TaskQuery) Unique ¶
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 (*TaskQuery) WithBeacon ¶
func (tq *TaskQuery) WithBeacon(opts ...func(*BeaconQuery)) *TaskQuery
WithBeacon tells the query-builder to eager-load the nodes that are connected to the "beacon" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithNamedReportedFiles ¶ added in v0.0.5
func (tq *TaskQuery) WithNamedReportedFiles(name string, opts ...func(*HostFileQuery)) *TaskQuery
WithNamedReportedFiles tells the query-builder to eager-load the nodes that are connected to the "reported_files" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithNamedReportedProcesses ¶ added in v0.0.5
func (tq *TaskQuery) WithNamedReportedProcesses(name string, opts ...func(*HostProcessQuery)) *TaskQuery
WithNamedReportedProcesses tells the query-builder to eager-load the nodes that are connected to the "reported_processes" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithQuest ¶
func (tq *TaskQuery) WithQuest(opts ...func(*QuestQuery)) *TaskQuery
WithQuest tells the query-builder to eager-load the nodes that are connected to the "quest" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithReportedFiles ¶ added in v0.0.5
func (tq *TaskQuery) WithReportedFiles(opts ...func(*HostFileQuery)) *TaskQuery
WithReportedFiles tells the query-builder to eager-load the nodes that are connected to the "reported_files" edge. The optional arguments are used to configure the query builder of the edge.
func (*TaskQuery) WithReportedProcesses ¶ added in v0.0.5
func (tq *TaskQuery) WithReportedProcesses(opts ...func(*HostProcessQuery)) *TaskQuery
WithReportedProcesses tells the query-builder to eager-load the nodes that are connected to the "reported_processes" edge. The optional arguments are used to configure the query builder of the edge.
type TaskSelect ¶
type TaskSelect struct { *TaskQuery // contains filtered or unexported fields }
TaskSelect is the builder for selecting fields of Task entities.
func (*TaskSelect) Aggregate ¶
func (ts *TaskSelect) Aggregate(fns ...AggregateFunc) *TaskSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TaskSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TaskSelect) Scan ¶
func (ts *TaskSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TaskSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TaskUpdate ¶
type TaskUpdate struct {
// contains filtered or unexported fields
}
TaskUpdate is the builder for updating Task entities.
func (*TaskUpdate) AddOutputSize ¶ added in v0.0.5
func (tu *TaskUpdate) AddOutputSize(i int) *TaskUpdate
AddOutputSize adds i to the "output_size" field.
func (*TaskUpdate) AddReportedFileIDs ¶ added in v0.0.5
func (tu *TaskUpdate) AddReportedFileIDs(ids ...int) *TaskUpdate
AddReportedFileIDs adds the "reported_files" edge to the HostFile entity by IDs.
func (*TaskUpdate) AddReportedFiles ¶ added in v0.0.5
func (tu *TaskUpdate) AddReportedFiles(h ...*HostFile) *TaskUpdate
AddReportedFiles adds the "reported_files" edges to the HostFile entity.
func (*TaskUpdate) AddReportedProcessIDs ¶ added in v0.0.5
func (tu *TaskUpdate) AddReportedProcessIDs(ids ...int) *TaskUpdate
AddReportedProcessIDs adds the "reported_processes" edge to the HostProcess entity by IDs.
func (*TaskUpdate) AddReportedProcesses ¶ added in v0.0.5
func (tu *TaskUpdate) AddReportedProcesses(h ...*HostProcess) *TaskUpdate
AddReportedProcesses adds the "reported_processes" edges to the HostProcess entity.
func (*TaskUpdate) ClearBeacon ¶
func (tu *TaskUpdate) ClearBeacon() *TaskUpdate
ClearBeacon clears the "beacon" edge to the Beacon entity.
func (*TaskUpdate) ClearClaimedAt ¶
func (tu *TaskUpdate) ClearClaimedAt() *TaskUpdate
ClearClaimedAt clears the value of the "claimed_at" field.
func (*TaskUpdate) ClearError ¶
func (tu *TaskUpdate) ClearError() *TaskUpdate
ClearError clears the value of the "error" field.
func (*TaskUpdate) ClearExecFinishedAt ¶
func (tu *TaskUpdate) ClearExecFinishedAt() *TaskUpdate
ClearExecFinishedAt clears the value of the "exec_finished_at" field.
func (*TaskUpdate) ClearExecStartedAt ¶
func (tu *TaskUpdate) ClearExecStartedAt() *TaskUpdate
ClearExecStartedAt clears the value of the "exec_started_at" field.
func (*TaskUpdate) ClearOutput ¶
func (tu *TaskUpdate) ClearOutput() *TaskUpdate
ClearOutput clears the value of the "output" field.
func (*TaskUpdate) ClearQuest ¶
func (tu *TaskUpdate) ClearQuest() *TaskUpdate
ClearQuest clears the "quest" edge to the Quest entity.
func (*TaskUpdate) ClearReportedFiles ¶ added in v0.0.5
func (tu *TaskUpdate) ClearReportedFiles() *TaskUpdate
ClearReportedFiles clears all "reported_files" edges to the HostFile entity.
func (*TaskUpdate) ClearReportedProcesses ¶ added in v0.0.5
func (tu *TaskUpdate) ClearReportedProcesses() *TaskUpdate
ClearReportedProcesses clears all "reported_processes" edges to the HostProcess entity.
func (*TaskUpdate) Exec ¶
func (tu *TaskUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpdate) ExecX ¶
func (tu *TaskUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdate) Mutation ¶
func (tu *TaskUpdate) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdate) RemoveReportedFileIDs ¶ added in v0.0.5
func (tu *TaskUpdate) RemoveReportedFileIDs(ids ...int) *TaskUpdate
RemoveReportedFileIDs removes the "reported_files" edge to HostFile entities by IDs.
func (*TaskUpdate) RemoveReportedFiles ¶ added in v0.0.5
func (tu *TaskUpdate) RemoveReportedFiles(h ...*HostFile) *TaskUpdate
RemoveReportedFiles removes "reported_files" edges to HostFile entities.
func (*TaskUpdate) RemoveReportedProcessIDs ¶ added in v0.0.5
func (tu *TaskUpdate) RemoveReportedProcessIDs(ids ...int) *TaskUpdate
RemoveReportedProcessIDs removes the "reported_processes" edge to HostProcess entities by IDs.
func (*TaskUpdate) RemoveReportedProcesses ¶ added in v0.0.5
func (tu *TaskUpdate) RemoveReportedProcesses(h ...*HostProcess) *TaskUpdate
RemoveReportedProcesses removes "reported_processes" edges to HostProcess entities.
func (*TaskUpdate) Save ¶
func (tu *TaskUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TaskUpdate) SaveX ¶
func (tu *TaskUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdate) SetBeacon ¶
func (tu *TaskUpdate) SetBeacon(b *Beacon) *TaskUpdate
SetBeacon sets the "beacon" edge to the Beacon entity.
func (*TaskUpdate) SetBeaconID ¶
func (tu *TaskUpdate) SetBeaconID(id int) *TaskUpdate
SetBeaconID sets the "beacon" edge to the Beacon entity by ID.
func (*TaskUpdate) SetClaimedAt ¶
func (tu *TaskUpdate) SetClaimedAt(t time.Time) *TaskUpdate
SetClaimedAt sets the "claimed_at" field.
func (*TaskUpdate) SetError ¶
func (tu *TaskUpdate) SetError(s string) *TaskUpdate
SetError sets the "error" field.
func (*TaskUpdate) SetExecFinishedAt ¶
func (tu *TaskUpdate) SetExecFinishedAt(t time.Time) *TaskUpdate
SetExecFinishedAt sets the "exec_finished_at" field.
func (*TaskUpdate) SetExecStartedAt ¶
func (tu *TaskUpdate) SetExecStartedAt(t time.Time) *TaskUpdate
SetExecStartedAt sets the "exec_started_at" field.
func (*TaskUpdate) SetLastModifiedAt ¶
func (tu *TaskUpdate) SetLastModifiedAt(t time.Time) *TaskUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*TaskUpdate) SetNillableClaimedAt ¶
func (tu *TaskUpdate) SetNillableClaimedAt(t *time.Time) *TaskUpdate
SetNillableClaimedAt sets the "claimed_at" field if the given value is not nil.
func (*TaskUpdate) SetNillableError ¶
func (tu *TaskUpdate) SetNillableError(s *string) *TaskUpdate
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskUpdate) SetNillableExecFinishedAt ¶
func (tu *TaskUpdate) SetNillableExecFinishedAt(t *time.Time) *TaskUpdate
SetNillableExecFinishedAt sets the "exec_finished_at" field if the given value is not nil.
func (*TaskUpdate) SetNillableExecStartedAt ¶
func (tu *TaskUpdate) SetNillableExecStartedAt(t *time.Time) *TaskUpdate
SetNillableExecStartedAt sets the "exec_started_at" field if the given value is not nil.
func (*TaskUpdate) SetNillableOutput ¶
func (tu *TaskUpdate) SetNillableOutput(s *string) *TaskUpdate
SetNillableOutput sets the "output" field if the given value is not nil.
func (*TaskUpdate) SetNillableOutputSize ¶ added in v0.0.5
func (tu *TaskUpdate) SetNillableOutputSize(i *int) *TaskUpdate
SetNillableOutputSize sets the "output_size" field if the given value is not nil.
func (*TaskUpdate) SetOutput ¶
func (tu *TaskUpdate) SetOutput(s string) *TaskUpdate
SetOutput sets the "output" field.
func (*TaskUpdate) SetOutputSize ¶ added in v0.0.5
func (tu *TaskUpdate) SetOutputSize(i int) *TaskUpdate
SetOutputSize sets the "output_size" field.
func (*TaskUpdate) SetQuest ¶
func (tu *TaskUpdate) SetQuest(q *Quest) *TaskUpdate
SetQuest sets the "quest" edge to the Quest entity.
func (*TaskUpdate) SetQuestID ¶
func (tu *TaskUpdate) SetQuestID(id int) *TaskUpdate
SetQuestID sets the "quest" edge to the Quest entity by ID.
func (*TaskUpdate) Where ¶
func (tu *TaskUpdate) Where(ps ...predicate.Task) *TaskUpdate
Where appends a list predicates to the TaskUpdate builder.
type TaskUpdateOne ¶
type TaskUpdateOne struct {
// contains filtered or unexported fields
}
TaskUpdateOne is the builder for updating a single Task entity.
func (*TaskUpdateOne) AddOutputSize ¶ added in v0.0.5
func (tuo *TaskUpdateOne) AddOutputSize(i int) *TaskUpdateOne
AddOutputSize adds i to the "output_size" field.
func (*TaskUpdateOne) AddReportedFileIDs ¶ added in v0.0.5
func (tuo *TaskUpdateOne) AddReportedFileIDs(ids ...int) *TaskUpdateOne
AddReportedFileIDs adds the "reported_files" edge to the HostFile entity by IDs.
func (*TaskUpdateOne) AddReportedFiles ¶ added in v0.0.5
func (tuo *TaskUpdateOne) AddReportedFiles(h ...*HostFile) *TaskUpdateOne
AddReportedFiles adds the "reported_files" edges to the HostFile entity.
func (*TaskUpdateOne) AddReportedProcessIDs ¶ added in v0.0.5
func (tuo *TaskUpdateOne) AddReportedProcessIDs(ids ...int) *TaskUpdateOne
AddReportedProcessIDs adds the "reported_processes" edge to the HostProcess entity by IDs.
func (*TaskUpdateOne) AddReportedProcesses ¶ added in v0.0.5
func (tuo *TaskUpdateOne) AddReportedProcesses(h ...*HostProcess) *TaskUpdateOne
AddReportedProcesses adds the "reported_processes" edges to the HostProcess entity.
func (*TaskUpdateOne) ClearBeacon ¶
func (tuo *TaskUpdateOne) ClearBeacon() *TaskUpdateOne
ClearBeacon clears the "beacon" edge to the Beacon entity.
func (*TaskUpdateOne) ClearClaimedAt ¶
func (tuo *TaskUpdateOne) ClearClaimedAt() *TaskUpdateOne
ClearClaimedAt clears the value of the "claimed_at" field.
func (*TaskUpdateOne) ClearError ¶
func (tuo *TaskUpdateOne) ClearError() *TaskUpdateOne
ClearError clears the value of the "error" field.
func (*TaskUpdateOne) ClearExecFinishedAt ¶
func (tuo *TaskUpdateOne) ClearExecFinishedAt() *TaskUpdateOne
ClearExecFinishedAt clears the value of the "exec_finished_at" field.
func (*TaskUpdateOne) ClearExecStartedAt ¶
func (tuo *TaskUpdateOne) ClearExecStartedAt() *TaskUpdateOne
ClearExecStartedAt clears the value of the "exec_started_at" field.
func (*TaskUpdateOne) ClearOutput ¶
func (tuo *TaskUpdateOne) ClearOutput() *TaskUpdateOne
ClearOutput clears the value of the "output" field.
func (*TaskUpdateOne) ClearQuest ¶
func (tuo *TaskUpdateOne) ClearQuest() *TaskUpdateOne
ClearQuest clears the "quest" edge to the Quest entity.
func (*TaskUpdateOne) ClearReportedFiles ¶ added in v0.0.5
func (tuo *TaskUpdateOne) ClearReportedFiles() *TaskUpdateOne
ClearReportedFiles clears all "reported_files" edges to the HostFile entity.
func (*TaskUpdateOne) ClearReportedProcesses ¶ added in v0.0.5
func (tuo *TaskUpdateOne) ClearReportedProcesses() *TaskUpdateOne
ClearReportedProcesses clears all "reported_processes" edges to the HostProcess entity.
func (*TaskUpdateOne) Exec ¶
func (tuo *TaskUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TaskUpdateOne) ExecX ¶
func (tuo *TaskUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpdateOne) Mutation ¶
func (tuo *TaskUpdateOne) Mutation() *TaskMutation
Mutation returns the TaskMutation object of the builder.
func (*TaskUpdateOne) RemoveReportedFileIDs ¶ added in v0.0.5
func (tuo *TaskUpdateOne) RemoveReportedFileIDs(ids ...int) *TaskUpdateOne
RemoveReportedFileIDs removes the "reported_files" edge to HostFile entities by IDs.
func (*TaskUpdateOne) RemoveReportedFiles ¶ added in v0.0.5
func (tuo *TaskUpdateOne) RemoveReportedFiles(h ...*HostFile) *TaskUpdateOne
RemoveReportedFiles removes "reported_files" edges to HostFile entities.
func (*TaskUpdateOne) RemoveReportedProcessIDs ¶ added in v0.0.5
func (tuo *TaskUpdateOne) RemoveReportedProcessIDs(ids ...int) *TaskUpdateOne
RemoveReportedProcessIDs removes the "reported_processes" edge to HostProcess entities by IDs.
func (*TaskUpdateOne) RemoveReportedProcesses ¶ added in v0.0.5
func (tuo *TaskUpdateOne) RemoveReportedProcesses(h ...*HostProcess) *TaskUpdateOne
RemoveReportedProcesses removes "reported_processes" edges to HostProcess entities.
func (*TaskUpdateOne) Save ¶
func (tuo *TaskUpdateOne) Save(ctx context.Context) (*Task, error)
Save executes the query and returns the updated Task entity.
func (*TaskUpdateOne) SaveX ¶
func (tuo *TaskUpdateOne) SaveX(ctx context.Context) *Task
SaveX is like Save, but panics if an error occurs.
func (*TaskUpdateOne) Select ¶
func (tuo *TaskUpdateOne) Select(field string, fields ...string) *TaskUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TaskUpdateOne) SetBeacon ¶
func (tuo *TaskUpdateOne) SetBeacon(b *Beacon) *TaskUpdateOne
SetBeacon sets the "beacon" edge to the Beacon entity.
func (*TaskUpdateOne) SetBeaconID ¶
func (tuo *TaskUpdateOne) SetBeaconID(id int) *TaskUpdateOne
SetBeaconID sets the "beacon" edge to the Beacon entity by ID.
func (*TaskUpdateOne) SetClaimedAt ¶
func (tuo *TaskUpdateOne) SetClaimedAt(t time.Time) *TaskUpdateOne
SetClaimedAt sets the "claimed_at" field.
func (*TaskUpdateOne) SetError ¶
func (tuo *TaskUpdateOne) SetError(s string) *TaskUpdateOne
SetError sets the "error" field.
func (*TaskUpdateOne) SetExecFinishedAt ¶
func (tuo *TaskUpdateOne) SetExecFinishedAt(t time.Time) *TaskUpdateOne
SetExecFinishedAt sets the "exec_finished_at" field.
func (*TaskUpdateOne) SetExecStartedAt ¶
func (tuo *TaskUpdateOne) SetExecStartedAt(t time.Time) *TaskUpdateOne
SetExecStartedAt sets the "exec_started_at" field.
func (*TaskUpdateOne) SetLastModifiedAt ¶
func (tuo *TaskUpdateOne) SetLastModifiedAt(t time.Time) *TaskUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*TaskUpdateOne) SetNillableClaimedAt ¶
func (tuo *TaskUpdateOne) SetNillableClaimedAt(t *time.Time) *TaskUpdateOne
SetNillableClaimedAt sets the "claimed_at" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableError ¶
func (tuo *TaskUpdateOne) SetNillableError(s *string) *TaskUpdateOne
SetNillableError sets the "error" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableExecFinishedAt ¶
func (tuo *TaskUpdateOne) SetNillableExecFinishedAt(t *time.Time) *TaskUpdateOne
SetNillableExecFinishedAt sets the "exec_finished_at" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableExecStartedAt ¶
func (tuo *TaskUpdateOne) SetNillableExecStartedAt(t *time.Time) *TaskUpdateOne
SetNillableExecStartedAt sets the "exec_started_at" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableOutput ¶
func (tuo *TaskUpdateOne) SetNillableOutput(s *string) *TaskUpdateOne
SetNillableOutput sets the "output" field if the given value is not nil.
func (*TaskUpdateOne) SetNillableOutputSize ¶ added in v0.0.5
func (tuo *TaskUpdateOne) SetNillableOutputSize(i *int) *TaskUpdateOne
SetNillableOutputSize sets the "output_size" field if the given value is not nil.
func (*TaskUpdateOne) SetOutput ¶
func (tuo *TaskUpdateOne) SetOutput(s string) *TaskUpdateOne
SetOutput sets the "output" field.
func (*TaskUpdateOne) SetOutputSize ¶ added in v0.0.5
func (tuo *TaskUpdateOne) SetOutputSize(i int) *TaskUpdateOne
SetOutputSize sets the "output_size" field.
func (*TaskUpdateOne) SetQuest ¶
func (tuo *TaskUpdateOne) SetQuest(q *Quest) *TaskUpdateOne
SetQuest sets the "quest" edge to the Quest entity.
func (*TaskUpdateOne) SetQuestID ¶
func (tuo *TaskUpdateOne) SetQuestID(id int) *TaskUpdateOne
SetQuestID sets the "quest" edge to the Quest entity by ID.
func (*TaskUpdateOne) Where ¶
func (tuo *TaskUpdateOne) Where(ps ...predicate.Task) *TaskUpdateOne
Where appends a list predicates to the TaskUpdate builder.
type TaskUpsert ¶
TaskUpsert is the "OnConflict" setter.
func (*TaskUpsert) AddOutputSize ¶ added in v0.0.5
func (u *TaskUpsert) AddOutputSize(v int) *TaskUpsert
AddOutputSize adds v to the "output_size" field.
func (*TaskUpsert) ClearClaimedAt ¶
func (u *TaskUpsert) ClearClaimedAt() *TaskUpsert
ClearClaimedAt clears the value of the "claimed_at" field.
func (*TaskUpsert) ClearError ¶
func (u *TaskUpsert) ClearError() *TaskUpsert
ClearError clears the value of the "error" field.
func (*TaskUpsert) ClearExecFinishedAt ¶
func (u *TaskUpsert) ClearExecFinishedAt() *TaskUpsert
ClearExecFinishedAt clears the value of the "exec_finished_at" field.
func (*TaskUpsert) ClearExecStartedAt ¶
func (u *TaskUpsert) ClearExecStartedAt() *TaskUpsert
ClearExecStartedAt clears the value of the "exec_started_at" field.
func (*TaskUpsert) ClearOutput ¶
func (u *TaskUpsert) ClearOutput() *TaskUpsert
ClearOutput clears the value of the "output" field.
func (*TaskUpsert) SetClaimedAt ¶
func (u *TaskUpsert) SetClaimedAt(v time.Time) *TaskUpsert
SetClaimedAt sets the "claimed_at" field.
func (*TaskUpsert) SetError ¶
func (u *TaskUpsert) SetError(v string) *TaskUpsert
SetError sets the "error" field.
func (*TaskUpsert) SetExecFinishedAt ¶
func (u *TaskUpsert) SetExecFinishedAt(v time.Time) *TaskUpsert
SetExecFinishedAt sets the "exec_finished_at" field.
func (*TaskUpsert) SetExecStartedAt ¶
func (u *TaskUpsert) SetExecStartedAt(v time.Time) *TaskUpsert
SetExecStartedAt sets the "exec_started_at" field.
func (*TaskUpsert) SetLastModifiedAt ¶
func (u *TaskUpsert) SetLastModifiedAt(v time.Time) *TaskUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*TaskUpsert) SetOutput ¶
func (u *TaskUpsert) SetOutput(v string) *TaskUpsert
SetOutput sets the "output" field.
func (*TaskUpsert) SetOutputSize ¶ added in v0.0.5
func (u *TaskUpsert) SetOutputSize(v int) *TaskUpsert
SetOutputSize sets the "output_size" field.
func (*TaskUpsert) UpdateClaimedAt ¶
func (u *TaskUpsert) UpdateClaimedAt() *TaskUpsert
UpdateClaimedAt sets the "claimed_at" field to the value that was provided on create.
func (*TaskUpsert) UpdateError ¶
func (u *TaskUpsert) UpdateError() *TaskUpsert
UpdateError sets the "error" field to the value that was provided on create.
func (*TaskUpsert) UpdateExecFinishedAt ¶
func (u *TaskUpsert) UpdateExecFinishedAt() *TaskUpsert
UpdateExecFinishedAt sets the "exec_finished_at" field to the value that was provided on create.
func (*TaskUpsert) UpdateExecStartedAt ¶
func (u *TaskUpsert) UpdateExecStartedAt() *TaskUpsert
UpdateExecStartedAt sets the "exec_started_at" field to the value that was provided on create.
func (*TaskUpsert) UpdateLastModifiedAt ¶
func (u *TaskUpsert) UpdateLastModifiedAt() *TaskUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*TaskUpsert) UpdateOutput ¶
func (u *TaskUpsert) UpdateOutput() *TaskUpsert
UpdateOutput sets the "output" field to the value that was provided on create.
func (*TaskUpsert) UpdateOutputSize ¶ added in v0.0.5
func (u *TaskUpsert) UpdateOutputSize() *TaskUpsert
UpdateOutputSize sets the "output_size" field to the value that was provided on create.
type TaskUpsertBulk ¶
type TaskUpsertBulk struct {
// contains filtered or unexported fields
}
TaskUpsertBulk is the builder for "upsert"-ing a bulk of Task nodes.
func (*TaskUpsertBulk) AddOutputSize ¶ added in v0.0.5
func (u *TaskUpsertBulk) AddOutputSize(v int) *TaskUpsertBulk
AddOutputSize adds v to the "output_size" field.
func (*TaskUpsertBulk) ClearClaimedAt ¶
func (u *TaskUpsertBulk) ClearClaimedAt() *TaskUpsertBulk
ClearClaimedAt clears the value of the "claimed_at" field.
func (*TaskUpsertBulk) ClearError ¶
func (u *TaskUpsertBulk) ClearError() *TaskUpsertBulk
ClearError clears the value of the "error" field.
func (*TaskUpsertBulk) ClearExecFinishedAt ¶
func (u *TaskUpsertBulk) ClearExecFinishedAt() *TaskUpsertBulk
ClearExecFinishedAt clears the value of the "exec_finished_at" field.
func (*TaskUpsertBulk) ClearExecStartedAt ¶
func (u *TaskUpsertBulk) ClearExecStartedAt() *TaskUpsertBulk
ClearExecStartedAt clears the value of the "exec_started_at" field.
func (*TaskUpsertBulk) ClearOutput ¶
func (u *TaskUpsertBulk) ClearOutput() *TaskUpsertBulk
ClearOutput clears the value of the "output" field.
func (*TaskUpsertBulk) DoNothing ¶
func (u *TaskUpsertBulk) DoNothing() *TaskUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TaskUpsertBulk) Exec ¶
func (u *TaskUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpsertBulk) ExecX ¶
func (u *TaskUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpsertBulk) Ignore ¶
func (u *TaskUpsertBulk) Ignore() *TaskUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TaskUpsertBulk) SetClaimedAt ¶
func (u *TaskUpsertBulk) SetClaimedAt(v time.Time) *TaskUpsertBulk
SetClaimedAt sets the "claimed_at" field.
func (*TaskUpsertBulk) SetError ¶
func (u *TaskUpsertBulk) SetError(v string) *TaskUpsertBulk
SetError sets the "error" field.
func (*TaskUpsertBulk) SetExecFinishedAt ¶
func (u *TaskUpsertBulk) SetExecFinishedAt(v time.Time) *TaskUpsertBulk
SetExecFinishedAt sets the "exec_finished_at" field.
func (*TaskUpsertBulk) SetExecStartedAt ¶
func (u *TaskUpsertBulk) SetExecStartedAt(v time.Time) *TaskUpsertBulk
SetExecStartedAt sets the "exec_started_at" field.
func (*TaskUpsertBulk) SetLastModifiedAt ¶
func (u *TaskUpsertBulk) SetLastModifiedAt(v time.Time) *TaskUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*TaskUpsertBulk) SetOutput ¶
func (u *TaskUpsertBulk) SetOutput(v string) *TaskUpsertBulk
SetOutput sets the "output" field.
func (*TaskUpsertBulk) SetOutputSize ¶ added in v0.0.5
func (u *TaskUpsertBulk) SetOutputSize(v int) *TaskUpsertBulk
SetOutputSize sets the "output_size" field.
func (*TaskUpsertBulk) Update ¶
func (u *TaskUpsertBulk) Update(set func(*TaskUpsert)) *TaskUpsertBulk
Update allows overriding fields `UPDATE` values. See the TaskCreateBulk.OnConflict documentation for more info.
func (*TaskUpsertBulk) UpdateClaimedAt ¶
func (u *TaskUpsertBulk) UpdateClaimedAt() *TaskUpsertBulk
UpdateClaimedAt sets the "claimed_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateError ¶
func (u *TaskUpsertBulk) UpdateError() *TaskUpsertBulk
UpdateError sets the "error" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateExecFinishedAt ¶
func (u *TaskUpsertBulk) UpdateExecFinishedAt() *TaskUpsertBulk
UpdateExecFinishedAt sets the "exec_finished_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateExecStartedAt ¶
func (u *TaskUpsertBulk) UpdateExecStartedAt() *TaskUpsertBulk
UpdateExecStartedAt sets the "exec_started_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateLastModifiedAt ¶
func (u *TaskUpsertBulk) UpdateLastModifiedAt() *TaskUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateNewValues ¶
func (u *TaskUpsertBulk) UpdateNewValues() *TaskUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Task.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TaskUpsertBulk) UpdateOutput ¶
func (u *TaskUpsertBulk) UpdateOutput() *TaskUpsertBulk
UpdateOutput sets the "output" field to the value that was provided on create.
func (*TaskUpsertBulk) UpdateOutputSize ¶ added in v0.0.5
func (u *TaskUpsertBulk) UpdateOutputSize() *TaskUpsertBulk
UpdateOutputSize sets the "output_size" field to the value that was provided on create.
type TaskUpsertOne ¶
type TaskUpsertOne struct {
// contains filtered or unexported fields
}
TaskUpsertOne is the builder for "upsert"-ing
one Task node.
func (*TaskUpsertOne) AddOutputSize ¶ added in v0.0.5
func (u *TaskUpsertOne) AddOutputSize(v int) *TaskUpsertOne
AddOutputSize adds v to the "output_size" field.
func (*TaskUpsertOne) ClearClaimedAt ¶
func (u *TaskUpsertOne) ClearClaimedAt() *TaskUpsertOne
ClearClaimedAt clears the value of the "claimed_at" field.
func (*TaskUpsertOne) ClearError ¶
func (u *TaskUpsertOne) ClearError() *TaskUpsertOne
ClearError clears the value of the "error" field.
func (*TaskUpsertOne) ClearExecFinishedAt ¶
func (u *TaskUpsertOne) ClearExecFinishedAt() *TaskUpsertOne
ClearExecFinishedAt clears the value of the "exec_finished_at" field.
func (*TaskUpsertOne) ClearExecStartedAt ¶
func (u *TaskUpsertOne) ClearExecStartedAt() *TaskUpsertOne
ClearExecStartedAt clears the value of the "exec_started_at" field.
func (*TaskUpsertOne) ClearOutput ¶
func (u *TaskUpsertOne) ClearOutput() *TaskUpsertOne
ClearOutput clears the value of the "output" field.
func (*TaskUpsertOne) DoNothing ¶
func (u *TaskUpsertOne) DoNothing() *TaskUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TaskUpsertOne) Exec ¶
func (u *TaskUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TaskUpsertOne) ExecX ¶
func (u *TaskUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TaskUpsertOne) ID ¶
func (u *TaskUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TaskUpsertOne) IDX ¶
func (u *TaskUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TaskUpsertOne) Ignore ¶
func (u *TaskUpsertOne) Ignore() *TaskUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Task.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TaskUpsertOne) SetClaimedAt ¶
func (u *TaskUpsertOne) SetClaimedAt(v time.Time) *TaskUpsertOne
SetClaimedAt sets the "claimed_at" field.
func (*TaskUpsertOne) SetError ¶
func (u *TaskUpsertOne) SetError(v string) *TaskUpsertOne
SetError sets the "error" field.
func (*TaskUpsertOne) SetExecFinishedAt ¶
func (u *TaskUpsertOne) SetExecFinishedAt(v time.Time) *TaskUpsertOne
SetExecFinishedAt sets the "exec_finished_at" field.
func (*TaskUpsertOne) SetExecStartedAt ¶
func (u *TaskUpsertOne) SetExecStartedAt(v time.Time) *TaskUpsertOne
SetExecStartedAt sets the "exec_started_at" field.
func (*TaskUpsertOne) SetLastModifiedAt ¶
func (u *TaskUpsertOne) SetLastModifiedAt(v time.Time) *TaskUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*TaskUpsertOne) SetOutput ¶
func (u *TaskUpsertOne) SetOutput(v string) *TaskUpsertOne
SetOutput sets the "output" field.
func (*TaskUpsertOne) SetOutputSize ¶ added in v0.0.5
func (u *TaskUpsertOne) SetOutputSize(v int) *TaskUpsertOne
SetOutputSize sets the "output_size" field.
func (*TaskUpsertOne) Update ¶
func (u *TaskUpsertOne) Update(set func(*TaskUpsert)) *TaskUpsertOne
Update allows overriding fields `UPDATE` values. See the TaskCreate.OnConflict documentation for more info.
func (*TaskUpsertOne) UpdateClaimedAt ¶
func (u *TaskUpsertOne) UpdateClaimedAt() *TaskUpsertOne
UpdateClaimedAt sets the "claimed_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateError ¶
func (u *TaskUpsertOne) UpdateError() *TaskUpsertOne
UpdateError sets the "error" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateExecFinishedAt ¶
func (u *TaskUpsertOne) UpdateExecFinishedAt() *TaskUpsertOne
UpdateExecFinishedAt sets the "exec_finished_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateExecStartedAt ¶
func (u *TaskUpsertOne) UpdateExecStartedAt() *TaskUpsertOne
UpdateExecStartedAt sets the "exec_started_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateLastModifiedAt ¶
func (u *TaskUpsertOne) UpdateLastModifiedAt() *TaskUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateNewValues ¶
func (u *TaskUpsertOne) UpdateNewValues() *TaskUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Task.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TaskUpsertOne) UpdateOutput ¶
func (u *TaskUpsertOne) UpdateOutput() *TaskUpsertOne
UpdateOutput sets the "output" field to the value that was provided on create.
func (*TaskUpsertOne) UpdateOutputSize ¶ added in v0.0.5
func (u *TaskUpsertOne) UpdateOutputSize() *TaskUpsertOne
UpdateOutputSize sets the "output_size" field to the value that was provided on create.
type TaskWhereInput ¶
type TaskWhereInput struct { Predicates []predicate.Task `json:"-"` Not *TaskWhereInput `json:"not,omitempty"` Or []*TaskWhereInput `json:"or,omitempty"` And []*TaskWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "claimed_at" field predicates. ClaimedAt *time.Time `json:"claimedAt,omitempty"` ClaimedAtNEQ *time.Time `json:"claimedAtNEQ,omitempty"` ClaimedAtIn []time.Time `json:"claimedAtIn,omitempty"` ClaimedAtNotIn []time.Time `json:"claimedAtNotIn,omitempty"` ClaimedAtGT *time.Time `json:"claimedAtGT,omitempty"` ClaimedAtGTE *time.Time `json:"claimedAtGTE,omitempty"` ClaimedAtLT *time.Time `json:"claimedAtLT,omitempty"` ClaimedAtLTE *time.Time `json:"claimedAtLTE,omitempty"` ClaimedAtIsNil bool `json:"claimedAtIsNil,omitempty"` ClaimedAtNotNil bool `json:"claimedAtNotNil,omitempty"` // "exec_started_at" field predicates. ExecStartedAt *time.Time `json:"execStartedAt,omitempty"` ExecStartedAtNEQ *time.Time `json:"execStartedAtNEQ,omitempty"` ExecStartedAtIn []time.Time `json:"execStartedAtIn,omitempty"` ExecStartedAtNotIn []time.Time `json:"execStartedAtNotIn,omitempty"` ExecStartedAtGT *time.Time `json:"execStartedAtGT,omitempty"` ExecStartedAtGTE *time.Time `json:"execStartedAtGTE,omitempty"` ExecStartedAtLT *time.Time `json:"execStartedAtLT,omitempty"` ExecStartedAtLTE *time.Time `json:"execStartedAtLTE,omitempty"` ExecStartedAtIsNil bool `json:"execStartedAtIsNil,omitempty"` ExecStartedAtNotNil bool `json:"execStartedAtNotNil,omitempty"` // "exec_finished_at" field predicates. ExecFinishedAt *time.Time `json:"execFinishedAt,omitempty"` ExecFinishedAtNEQ *time.Time `json:"execFinishedAtNEQ,omitempty"` ExecFinishedAtIn []time.Time `json:"execFinishedAtIn,omitempty"` ExecFinishedAtNotIn []time.Time `json:"execFinishedAtNotIn,omitempty"` ExecFinishedAtGT *time.Time `json:"execFinishedAtGT,omitempty"` ExecFinishedAtGTE *time.Time `json:"execFinishedAtGTE,omitempty"` ExecFinishedAtLT *time.Time `json:"execFinishedAtLT,omitempty"` ExecFinishedAtLTE *time.Time `json:"execFinishedAtLTE,omitempty"` ExecFinishedAtIsNil bool `json:"execFinishedAtIsNil,omitempty"` ExecFinishedAtNotNil bool `json:"execFinishedAtNotNil,omitempty"` // "output" field predicates. Output *string `json:"output,omitempty"` OutputNEQ *string `json:"outputNEQ,omitempty"` OutputIn []string `json:"outputIn,omitempty"` OutputNotIn []string `json:"outputNotIn,omitempty"` OutputGT *string `json:"outputGT,omitempty"` OutputGTE *string `json:"outputGTE,omitempty"` OutputLT *string `json:"outputLT,omitempty"` OutputLTE *string `json:"outputLTE,omitempty"` OutputContains *string `json:"outputContains,omitempty"` OutputHasPrefix *string `json:"outputHasPrefix,omitempty"` OutputHasSuffix *string `json:"outputHasSuffix,omitempty"` OutputIsNil bool `json:"outputIsNil,omitempty"` OutputNotNil bool `json:"outputNotNil,omitempty"` OutputEqualFold *string `json:"outputEqualFold,omitempty"` OutputContainsFold *string `json:"outputContainsFold,omitempty"` // "output_size" field predicates. OutputSize *int `json:"outputSize,omitempty"` OutputSizeNEQ *int `json:"outputSizeNEQ,omitempty"` OutputSizeIn []int `json:"outputSizeIn,omitempty"` OutputSizeNotIn []int `json:"outputSizeNotIn,omitempty"` OutputSizeGT *int `json:"outputSizeGT,omitempty"` OutputSizeGTE *int `json:"outputSizeGTE,omitempty"` OutputSizeLT *int `json:"outputSizeLT,omitempty"` OutputSizeLTE *int `json:"outputSizeLTE,omitempty"` // "error" field predicates. Error *string `json:"error,omitempty"` ErrorNEQ *string `json:"errorNEQ,omitempty"` ErrorIn []string `json:"errorIn,omitempty"` ErrorNotIn []string `json:"errorNotIn,omitempty"` ErrorGT *string `json:"errorGT,omitempty"` ErrorGTE *string `json:"errorGTE,omitempty"` ErrorLT *string `json:"errorLT,omitempty"` ErrorLTE *string `json:"errorLTE,omitempty"` ErrorContains *string `json:"errorContains,omitempty"` ErrorHasPrefix *string `json:"errorHasPrefix,omitempty"` ErrorHasSuffix *string `json:"errorHasSuffix,omitempty"` ErrorIsNil bool `json:"errorIsNil,omitempty"` ErrorNotNil bool `json:"errorNotNil,omitempty"` ErrorEqualFold *string `json:"errorEqualFold,omitempty"` ErrorContainsFold *string `json:"errorContainsFold,omitempty"` // "quest" edge predicates. HasQuest *bool `json:"hasQuest,omitempty"` HasQuestWith []*QuestWhereInput `json:"hasQuestWith,omitempty"` // "beacon" edge predicates. HasBeacon *bool `json:"hasBeacon,omitempty"` HasBeaconWith []*BeaconWhereInput `json:"hasBeaconWith,omitempty"` // "reported_files" edge predicates. HasReportedFiles *bool `json:"hasReportedFiles,omitempty"` HasReportedFilesWith []*HostFileWhereInput `json:"hasReportedFilesWith,omitempty"` // "reported_processes" edge predicates. HasReportedProcesses *bool `json:"hasReportedProcesses,omitempty"` HasReportedProcessesWith []*HostProcessWhereInput `json:"hasReportedProcessesWith,omitempty"` }
TaskWhereInput represents a where input for filtering Task queries.
func (*TaskWhereInput) AddPredicates ¶
func (i *TaskWhereInput) AddPredicates(predicates ...predicate.Task)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type Tome ¶
type Tome struct { // ID of the ent. ID int `json:"id,omitempty"` // Timestamp of when this ent was created CreatedAt time.Time `json:"created_at,omitempty"` // Timestamp of when this ent was last updated LastModifiedAt time.Time `json:"last_modified_at,omitempty"` // Name of the tome Name string `json:"name,omitempty"` // Information about the tome Description string `json:"description,omitempty"` // Name of the author who created the tome. Author string `json:"author,omitempty"` // Information about the tomes support model. SupportModel tome.SupportModel `json:"support_model,omitempty"` // MITRE ATT&CK tactic provided by the tome. Tactic tome.Tactic `json:"tactic,omitempty"` // JSON string describing what parameters are used with the tome. Requires a list of JSON objects, one for each parameter. ParamDefs string `json:"param_defs,omitempty"` // A SHA3 digest of the eldritch field Hash string `json:"hash,omitempty"` // Eldritch script that will be executed when the tome is run Eldritch string `json:"eldritch,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the TomeQuery when eager-loading is set. Edges TomeEdges `json:"edges"` // contains filtered or unexported fields }
Tome is the model entity for the Tome schema.
func (*Tome) IsNode ¶
func (n *Tome) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*Tome) NamedFiles ¶
NamedFiles returns the Files named value or an error if the edge was not loaded in eager-loading with this name.
func (*Tome) QueryFiles ¶
QueryFiles queries the "files" edge of the Tome entity.
func (*Tome) QueryUploader ¶ added in v0.0.5
QueryUploader queries the "uploader" edge of the Tome entity.
func (*Tome) Unwrap ¶
Unwrap unwraps the Tome 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 (*Tome) Update ¶
func (t *Tome) Update() *TomeUpdateOne
Update returns a builder for updating this Tome. Note that you need to call Tome.Unwrap() before calling this method if this Tome was returned from a transaction, and the transaction was committed or rolled back.
type TomeClient ¶
type TomeClient struct {
// contains filtered or unexported fields
}
TomeClient is a client for the Tome schema.
func NewTomeClient ¶
func NewTomeClient(c config) *TomeClient
NewTomeClient returns a client for the Tome from the given config.
func (*TomeClient) Create ¶
func (c *TomeClient) Create() *TomeCreate
Create returns a builder for creating a Tome entity.
func (*TomeClient) CreateBulk ¶
func (c *TomeClient) CreateBulk(builders ...*TomeCreate) *TomeCreateBulk
CreateBulk returns a builder for creating a bulk of Tome entities.
func (*TomeClient) Delete ¶
func (c *TomeClient) Delete() *TomeDelete
Delete returns a delete builder for Tome.
func (*TomeClient) DeleteOne ¶
func (c *TomeClient) DeleteOne(t *Tome) *TomeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*TomeClient) DeleteOneID ¶
func (c *TomeClient) DeleteOneID(id int) *TomeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*TomeClient) GetX ¶
func (c *TomeClient) GetX(ctx context.Context, id int) *Tome
GetX is like Get, but panics if an error occurs.
func (*TomeClient) Intercept ¶
func (c *TomeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `tome.Intercept(f(g(h())))`.
func (*TomeClient) Interceptors ¶
func (c *TomeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*TomeClient) MapCreateBulk ¶
func (c *TomeClient) MapCreateBulk(slice any, setFunc func(*TomeCreate, int)) *TomeCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*TomeClient) Query ¶
func (c *TomeClient) Query() *TomeQuery
Query returns a query builder for Tome.
func (*TomeClient) QueryFiles ¶
func (c *TomeClient) QueryFiles(t *Tome) *FileQuery
QueryFiles queries the files edge of a Tome.
func (*TomeClient) QueryUploader ¶ added in v0.0.5
func (c *TomeClient) QueryUploader(t *Tome) *UserQuery
QueryUploader queries the uploader edge of a Tome.
func (*TomeClient) Update ¶
func (c *TomeClient) Update() *TomeUpdate
Update returns an update builder for Tome.
func (*TomeClient) UpdateOne ¶
func (c *TomeClient) UpdateOne(t *Tome) *TomeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*TomeClient) UpdateOneID ¶
func (c *TomeClient) UpdateOneID(id int) *TomeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*TomeClient) Use ¶
func (c *TomeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `tome.Hooks(f(g(h())))`.
type TomeConnection ¶
type TomeConnection struct { Edges []*TomeEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
TomeConnection is the connection containing edges to Tome.
type TomeCreate ¶
type TomeCreate struct {
// contains filtered or unexported fields
}
TomeCreate is the builder for creating a Tome entity.
func (*TomeCreate) AddFileIDs ¶
func (tc *TomeCreate) AddFileIDs(ids ...int) *TomeCreate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*TomeCreate) AddFiles ¶
func (tc *TomeCreate) AddFiles(f ...*File) *TomeCreate
AddFiles adds the "files" edges to the File entity.
func (*TomeCreate) Exec ¶
func (tc *TomeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*TomeCreate) ExecX ¶
func (tc *TomeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TomeCreate) Mutation ¶
func (tc *TomeCreate) Mutation() *TomeMutation
Mutation returns the TomeMutation object of the builder.
func (*TomeCreate) OnConflict ¶
func (tc *TomeCreate) OnConflict(opts ...sql.ConflictOption) *TomeUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tome.Create(). SetCreatedAt(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TomeUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TomeCreate) OnConflictColumns ¶
func (tc *TomeCreate) OnConflictColumns(columns ...string) *TomeUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tome.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
func (*TomeCreate) Save ¶
func (tc *TomeCreate) Save(ctx context.Context) (*Tome, error)
Save creates the Tome in the database.
func (*TomeCreate) SaveX ¶
func (tc *TomeCreate) SaveX(ctx context.Context) *Tome
SaveX calls Save and panics if Save returns an error.
func (*TomeCreate) SetAuthor ¶ added in v0.0.5
func (tc *TomeCreate) SetAuthor(s string) *TomeCreate
SetAuthor sets the "author" field.
func (*TomeCreate) SetCreatedAt ¶
func (tc *TomeCreate) SetCreatedAt(t time.Time) *TomeCreate
SetCreatedAt sets the "created_at" field.
func (*TomeCreate) SetDescription ¶
func (tc *TomeCreate) SetDescription(s string) *TomeCreate
SetDescription sets the "description" field.
func (*TomeCreate) SetEldritch ¶
func (tc *TomeCreate) SetEldritch(s string) *TomeCreate
SetEldritch sets the "eldritch" field.
func (*TomeCreate) SetHash ¶
func (tc *TomeCreate) SetHash(s string) *TomeCreate
SetHash sets the "hash" field.
func (*TomeCreate) SetInput ¶
func (c *TomeCreate) SetInput(i CreateTomeInput) *TomeCreate
SetInput applies the change-set in the CreateTomeInput on the TomeCreate builder.
func (*TomeCreate) SetLastModifiedAt ¶
func (tc *TomeCreate) SetLastModifiedAt(t time.Time) *TomeCreate
SetLastModifiedAt sets the "last_modified_at" field.
func (*TomeCreate) SetName ¶
func (tc *TomeCreate) SetName(s string) *TomeCreate
SetName sets the "name" field.
func (*TomeCreate) SetNillableCreatedAt ¶
func (tc *TomeCreate) SetNillableCreatedAt(t *time.Time) *TomeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*TomeCreate) SetNillableLastModifiedAt ¶
func (tc *TomeCreate) SetNillableLastModifiedAt(t *time.Time) *TomeCreate
SetNillableLastModifiedAt sets the "last_modified_at" field if the given value is not nil.
func (*TomeCreate) SetNillableParamDefs ¶
func (tc *TomeCreate) SetNillableParamDefs(s *string) *TomeCreate
SetNillableParamDefs sets the "param_defs" field if the given value is not nil.
func (*TomeCreate) SetNillableSupportModel ¶ added in v0.0.5
func (tc *TomeCreate) SetNillableSupportModel(tm *tome.SupportModel) *TomeCreate
SetNillableSupportModel sets the "support_model" field if the given value is not nil.
func (*TomeCreate) SetNillableTactic ¶ added in v0.0.5
func (tc *TomeCreate) SetNillableTactic(t *tome.Tactic) *TomeCreate
SetNillableTactic sets the "tactic" field if the given value is not nil.
func (*TomeCreate) SetNillableUploaderID ¶ added in v0.0.5
func (tc *TomeCreate) SetNillableUploaderID(id *int) *TomeCreate
SetNillableUploaderID sets the "uploader" edge to the User entity by ID if the given value is not nil.
func (*TomeCreate) SetParamDefs ¶
func (tc *TomeCreate) SetParamDefs(s string) *TomeCreate
SetParamDefs sets the "param_defs" field.
func (*TomeCreate) SetSupportModel ¶ added in v0.0.5
func (tc *TomeCreate) SetSupportModel(tm tome.SupportModel) *TomeCreate
SetSupportModel sets the "support_model" field.
func (*TomeCreate) SetTactic ¶ added in v0.0.5
func (tc *TomeCreate) SetTactic(t tome.Tactic) *TomeCreate
SetTactic sets the "tactic" field.
func (*TomeCreate) SetUploader ¶ added in v0.0.5
func (tc *TomeCreate) SetUploader(u *User) *TomeCreate
SetUploader sets the "uploader" edge to the User entity.
func (*TomeCreate) SetUploaderID ¶ added in v0.0.5
func (tc *TomeCreate) SetUploaderID(id int) *TomeCreate
SetUploaderID sets the "uploader" edge to the User entity by ID.
type TomeCreateBulk ¶
type TomeCreateBulk struct {
// contains filtered or unexported fields
}
TomeCreateBulk is the builder for creating many Tome entities in bulk.
func (*TomeCreateBulk) Exec ¶
func (tcb *TomeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TomeCreateBulk) ExecX ¶
func (tcb *TomeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TomeCreateBulk) OnConflict ¶
func (tcb *TomeCreateBulk) OnConflict(opts ...sql.ConflictOption) *TomeUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.Tome.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.TomeUpsert) { SetCreatedAt(v+v). }). Exec(ctx)
func (*TomeCreateBulk) OnConflictColumns ¶
func (tcb *TomeCreateBulk) OnConflictColumns(columns ...string) *TomeUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.Tome.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
type TomeDelete ¶
type TomeDelete struct {
// contains filtered or unexported fields
}
TomeDelete is the builder for deleting a Tome entity.
func (*TomeDelete) Exec ¶
func (td *TomeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*TomeDelete) ExecX ¶
func (td *TomeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*TomeDelete) Where ¶
func (td *TomeDelete) Where(ps ...predicate.Tome) *TomeDelete
Where appends a list predicates to the TomeDelete builder.
type TomeDeleteOne ¶
type TomeDeleteOne struct {
// contains filtered or unexported fields
}
TomeDeleteOne is the builder for deleting a single Tome entity.
func (*TomeDeleteOne) Exec ¶
func (tdo *TomeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*TomeDeleteOne) ExecX ¶
func (tdo *TomeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TomeDeleteOne) Where ¶
func (tdo *TomeDeleteOne) Where(ps ...predicate.Tome) *TomeDeleteOne
Where appends a list predicates to the TomeDelete builder.
type TomeEdges ¶
type TomeEdges struct { // Any files required for tome execution that will be bundled and provided to the agent for download Files []*File `json:"files,omitempty"` // User who uploaded the tome (may be null). Uploader *User `json:"uploader,omitempty"` // contains filtered or unexported fields }
TomeEdges holds the relations/edges for other nodes in the graph.
func (TomeEdges) FilesOrErr ¶
FilesOrErr returns the Files value or an error if the edge was not loaded in eager-loading.
func (TomeEdges) UploaderOrErr ¶ added in v0.0.5
UploaderOrErr returns the Uploader value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type TomeGroupBy ¶
type TomeGroupBy struct {
// contains filtered or unexported fields
}
TomeGroupBy is the group-by builder for Tome entities.
func (*TomeGroupBy) Aggregate ¶
func (tgb *TomeGroupBy) Aggregate(fns ...AggregateFunc) *TomeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*TomeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TomeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TomeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TomeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TomeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TomeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TomeGroupBy) Scan ¶
func (tgb *TomeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TomeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TomeMutation ¶
type TomeMutation struct {
// contains filtered or unexported fields
}
TomeMutation represents an operation that mutates the Tome nodes in the graph.
func (*TomeMutation) AddField ¶
func (m *TomeMutation) 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 (*TomeMutation) AddFileIDs ¶
func (m *TomeMutation) AddFileIDs(ids ...int)
AddFileIDs adds the "files" edge to the File entity by ids.
func (*TomeMutation) AddedEdges ¶
func (m *TomeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*TomeMutation) AddedField ¶
func (m *TomeMutation) 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 (*TomeMutation) AddedFields ¶
func (m *TomeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*TomeMutation) AddedIDs ¶
func (m *TomeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*TomeMutation) Author ¶ added in v0.0.5
func (m *TomeMutation) Author() (r string, exists bool)
Author returns the value of the "author" field in the mutation.
func (*TomeMutation) ClearEdge ¶
func (m *TomeMutation) 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 (*TomeMutation) ClearField ¶
func (m *TomeMutation) 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 (*TomeMutation) ClearFiles ¶
func (m *TomeMutation) ClearFiles()
ClearFiles clears the "files" edge to the File entity.
func (*TomeMutation) ClearParamDefs ¶
func (m *TomeMutation) ClearParamDefs()
ClearParamDefs clears the value of the "param_defs" field.
func (*TomeMutation) ClearUploader ¶ added in v0.0.5
func (m *TomeMutation) ClearUploader()
ClearUploader clears the "uploader" edge to the User entity.
func (*TomeMutation) ClearedEdges ¶
func (m *TomeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*TomeMutation) ClearedFields ¶
func (m *TomeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (TomeMutation) Client ¶
func (m TomeMutation) 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 (*TomeMutation) CreatedAt ¶
func (m *TomeMutation) CreatedAt() (r time.Time, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*TomeMutation) Description ¶
func (m *TomeMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*TomeMutation) EdgeCleared ¶
func (m *TomeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*TomeMutation) Eldritch ¶
func (m *TomeMutation) Eldritch() (r string, exists bool)
Eldritch returns the value of the "eldritch" field in the mutation.
func (*TomeMutation) Field ¶
func (m *TomeMutation) 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 (*TomeMutation) FieldCleared ¶
func (m *TomeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*TomeMutation) Fields ¶
func (m *TomeMutation) 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 (*TomeMutation) FilesCleared ¶
func (m *TomeMutation) FilesCleared() bool
FilesCleared reports if the "files" edge to the File entity was cleared.
func (*TomeMutation) FilesIDs ¶
func (m *TomeMutation) FilesIDs() (ids []int)
FilesIDs returns the "files" edge IDs in the mutation.
func (*TomeMutation) Hash ¶
func (m *TomeMutation) Hash() (r string, exists bool)
Hash returns the value of the "hash" field in the mutation.
func (*TomeMutation) ID ¶
func (m *TomeMutation) 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 (*TomeMutation) IDs ¶
func (m *TomeMutation) 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 (*TomeMutation) LastModifiedAt ¶
func (m *TomeMutation) LastModifiedAt() (r time.Time, exists bool)
LastModifiedAt returns the value of the "last_modified_at" field in the mutation.
func (*TomeMutation) Name ¶
func (m *TomeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*TomeMutation) OldAuthor ¶ added in v0.0.5
func (m *TomeMutation) OldAuthor(ctx context.Context) (v string, err error)
OldAuthor returns the old "author" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldCreatedAt ¶
OldCreatedAt returns the old "created_at" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldDescription ¶
func (m *TomeMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldEldritch ¶
func (m *TomeMutation) OldEldritch(ctx context.Context) (v string, err error)
OldEldritch returns the old "eldritch" field's value of the Tome entity. If the Tome 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 (*TomeMutation) 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 (*TomeMutation) OldHash ¶
func (m *TomeMutation) OldHash(ctx context.Context) (v string, err error)
OldHash returns the old "hash" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldLastModifiedAt ¶
OldLastModifiedAt returns the old "last_modified_at" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldName ¶
func (m *TomeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldParamDefs ¶
func (m *TomeMutation) OldParamDefs(ctx context.Context) (v string, err error)
OldParamDefs returns the old "param_defs" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldSupportModel ¶ added in v0.0.5
func (m *TomeMutation) OldSupportModel(ctx context.Context) (v tome.SupportModel, err error)
OldSupportModel returns the old "support_model" field's value of the Tome entity. If the Tome 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 (*TomeMutation) OldTactic ¶ added in v0.0.5
OldTactic returns the old "tactic" field's value of the Tome entity. If the Tome 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 (*TomeMutation) ParamDefs ¶
func (m *TomeMutation) ParamDefs() (r string, exists bool)
ParamDefs returns the value of the "param_defs" field in the mutation.
func (*TomeMutation) ParamDefsCleared ¶
func (m *TomeMutation) ParamDefsCleared() bool
ParamDefsCleared returns if the "param_defs" field was cleared in this mutation.
func (*TomeMutation) RemoveFileIDs ¶
func (m *TomeMutation) RemoveFileIDs(ids ...int)
RemoveFileIDs removes the "files" edge to the File entity by IDs.
func (*TomeMutation) RemovedEdges ¶
func (m *TomeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*TomeMutation) RemovedFilesIDs ¶
func (m *TomeMutation) RemovedFilesIDs() (ids []int)
RemovedFiles returns the removed IDs of the "files" edge to the File entity.
func (*TomeMutation) RemovedIDs ¶
func (m *TomeMutation) 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 (*TomeMutation) ResetAuthor ¶ added in v0.0.5
func (m *TomeMutation) ResetAuthor()
ResetAuthor resets all changes to the "author" field.
func (*TomeMutation) ResetCreatedAt ¶
func (m *TomeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*TomeMutation) ResetDescription ¶
func (m *TomeMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*TomeMutation) ResetEdge ¶
func (m *TomeMutation) 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 (*TomeMutation) ResetEldritch ¶
func (m *TomeMutation) ResetEldritch()
ResetEldritch resets all changes to the "eldritch" field.
func (*TomeMutation) ResetField ¶
func (m *TomeMutation) 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 (*TomeMutation) ResetFiles ¶
func (m *TomeMutation) ResetFiles()
ResetFiles resets all changes to the "files" edge.
func (*TomeMutation) ResetHash ¶
func (m *TomeMutation) ResetHash()
ResetHash resets all changes to the "hash" field.
func (*TomeMutation) ResetLastModifiedAt ¶
func (m *TomeMutation) ResetLastModifiedAt()
ResetLastModifiedAt resets all changes to the "last_modified_at" field.
func (*TomeMutation) ResetName ¶
func (m *TomeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*TomeMutation) ResetParamDefs ¶
func (m *TomeMutation) ResetParamDefs()
ResetParamDefs resets all changes to the "param_defs" field.
func (*TomeMutation) ResetSupportModel ¶ added in v0.0.5
func (m *TomeMutation) ResetSupportModel()
ResetSupportModel resets all changes to the "support_model" field.
func (*TomeMutation) ResetTactic ¶ added in v0.0.5
func (m *TomeMutation) ResetTactic()
ResetTactic resets all changes to the "tactic" field.
func (*TomeMutation) ResetUploader ¶ added in v0.0.5
func (m *TomeMutation) ResetUploader()
ResetUploader resets all changes to the "uploader" edge.
func (*TomeMutation) SetAuthor ¶ added in v0.0.5
func (m *TomeMutation) SetAuthor(s string)
SetAuthor sets the "author" field.
func (*TomeMutation) SetCreatedAt ¶
func (m *TomeMutation) SetCreatedAt(t time.Time)
SetCreatedAt sets the "created_at" field.
func (*TomeMutation) SetDescription ¶
func (m *TomeMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*TomeMutation) SetEldritch ¶
func (m *TomeMutation) SetEldritch(s string)
SetEldritch sets the "eldritch" field.
func (*TomeMutation) SetField ¶
func (m *TomeMutation) 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 (*TomeMutation) SetHash ¶
func (m *TomeMutation) SetHash(s string)
SetHash sets the "hash" field.
func (*TomeMutation) SetLastModifiedAt ¶
func (m *TomeMutation) SetLastModifiedAt(t time.Time)
SetLastModifiedAt sets the "last_modified_at" field.
func (*TomeMutation) SetName ¶
func (m *TomeMutation) SetName(s string)
SetName sets the "name" field.
func (*TomeMutation) SetOp ¶
func (m *TomeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*TomeMutation) SetParamDefs ¶
func (m *TomeMutation) SetParamDefs(s string)
SetParamDefs sets the "param_defs" field.
func (*TomeMutation) SetSupportModel ¶ added in v0.0.5
func (m *TomeMutation) SetSupportModel(tm tome.SupportModel)
SetSupportModel sets the "support_model" field.
func (*TomeMutation) SetTactic ¶ added in v0.0.5
func (m *TomeMutation) SetTactic(t tome.Tactic)
SetTactic sets the "tactic" field.
func (*TomeMutation) SetUploaderID ¶ added in v0.0.5
func (m *TomeMutation) SetUploaderID(id int)
SetUploaderID sets the "uploader" edge to the User entity by id.
func (*TomeMutation) SupportModel ¶ added in v0.0.5
func (m *TomeMutation) SupportModel() (r tome.SupportModel, exists bool)
SupportModel returns the value of the "support_model" field in the mutation.
func (*TomeMutation) Tactic ¶ added in v0.0.5
func (m *TomeMutation) Tactic() (r tome.Tactic, exists bool)
Tactic returns the value of the "tactic" field in the mutation.
func (TomeMutation) Tx ¶
func (m TomeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*TomeMutation) Type ¶
func (m *TomeMutation) Type() string
Type returns the node type of this mutation (Tome).
func (*TomeMutation) UploaderCleared ¶ added in v0.0.5
func (m *TomeMutation) UploaderCleared() bool
UploaderCleared reports if the "uploader" edge to the User entity was cleared.
func (*TomeMutation) UploaderID ¶ added in v0.0.5
func (m *TomeMutation) UploaderID() (id int, exists bool)
UploaderID returns the "uploader" edge ID in the mutation.
func (*TomeMutation) UploaderIDs ¶ added in v0.0.5
func (m *TomeMutation) UploaderIDs() (ids []int)
UploaderIDs returns the "uploader" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UploaderID instead. It exists only for internal usage by the builders.
func (*TomeMutation) Where ¶
func (m *TomeMutation) Where(ps ...predicate.Tome)
Where appends a list predicates to the TomeMutation builder.
func (*TomeMutation) WhereP ¶
func (m *TomeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the TomeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type TomeOrder ¶
type TomeOrder struct { Direction OrderDirection `json:"direction"` Field *TomeOrderField `json:"field"` }
TomeOrder defines the ordering of Tome.
type TomeOrderField ¶
type TomeOrderField struct { // Value extracts the ordering value from the given Tome. Value func(*Tome) (ent.Value, error) // contains filtered or unexported fields }
TomeOrderField defines the ordering field of Tome.
func (TomeOrderField) MarshalGQL ¶
func (f TomeOrderField) MarshalGQL(w io.Writer)
MarshalGQL implements graphql.Marshaler interface.
func (TomeOrderField) String ¶
func (f TomeOrderField) String() string
String implement fmt.Stringer interface.
func (*TomeOrderField) UnmarshalGQL ¶
func (f *TomeOrderField) UnmarshalGQL(v interface{}) error
UnmarshalGQL implements graphql.Unmarshaler interface.
type TomePaginateOption ¶
type TomePaginateOption func(*tomePager) error
TomePaginateOption enables pagination customization.
func WithTomeFilter ¶
func WithTomeFilter(filter func(*TomeQuery) (*TomeQuery, error)) TomePaginateOption
WithTomeFilter configures pagination filter.
func WithTomeOrder ¶
func WithTomeOrder(order *TomeOrder) TomePaginateOption
WithTomeOrder configures pagination ordering.
type TomeQuery ¶
type TomeQuery struct {
// contains filtered or unexported fields
}
TomeQuery is the builder for querying Tome entities.
func (*TomeQuery) Aggregate ¶
func (tq *TomeQuery) Aggregate(fns ...AggregateFunc) *TomeSelect
Aggregate returns a TomeSelect configured with the given aggregations.
func (*TomeQuery) Clone ¶
Clone returns a duplicate of the TomeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*TomeQuery) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
func (*TomeQuery) First ¶
First returns the first Tome entity from the query. Returns a *NotFoundError when no Tome was found.
func (*TomeQuery) FirstID ¶
FirstID returns the first Tome ID from the query. Returns a *NotFoundError when no Tome ID was found.
func (*TomeQuery) GroupBy ¶
func (tq *TomeQuery) GroupBy(field string, fields ...string) *TomeGroupBy
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.Tome.Query(). GroupBy(tome.FieldCreatedAt). Aggregate(ent.Count()). Scan(ctx, &v)
func (*TomeQuery) Only ¶
Only returns a single Tome entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Tome entity is found. Returns a *NotFoundError when no Tome entities are found.
func (*TomeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Tome ID in the query. Returns a *NotSingularError when more than one Tome ID is found. Returns a *NotFoundError when no entities are found.
func (*TomeQuery) Order ¶
func (tq *TomeQuery) Order(o ...tome.OrderOption) *TomeQuery
Order specifies how the records should be ordered.
func (*TomeQuery) Paginate ¶
func (t *TomeQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...TomePaginateOption, ) (*TomeConnection, error)
Paginate executes the query and returns a relay based cursor connection to Tome.
func (*TomeQuery) QueryFiles ¶
QueryFiles chains the current query on the "files" edge.
func (*TomeQuery) QueryUploader ¶ added in v0.0.5
QueryUploader chains the current query on the "uploader" edge.
func (*TomeQuery) Select ¶
func (tq *TomeQuery) Select(fields ...string) *TomeSelect
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.Tome.Query(). Select(tome.FieldCreatedAt). Scan(ctx, &v)
func (*TomeQuery) Unique ¶
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 (*TomeQuery) WithFiles ¶
WithFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge. The optional arguments are used to configure the query builder of the edge.
func (*TomeQuery) WithNamedFiles ¶
WithNamedFiles tells the query-builder to eager-load the nodes that are connected to the "files" edge with the given name. The optional arguments are used to configure the query builder of the edge.
func (*TomeQuery) WithUploader ¶ added in v0.0.5
WithUploader tells the query-builder to eager-load the nodes that are connected to the "uploader" edge. The optional arguments are used to configure the query builder of the edge.
type TomeSelect ¶
type TomeSelect struct { *TomeQuery // contains filtered or unexported fields }
TomeSelect is the builder for selecting fields of Tome entities.
func (*TomeSelect) Aggregate ¶
func (ts *TomeSelect) Aggregate(fns ...AggregateFunc) *TomeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*TomeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*TomeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*TomeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*TomeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*TomeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*TomeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*TomeSelect) Scan ¶
func (ts *TomeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*TomeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type TomeUpdate ¶
type TomeUpdate struct {
// contains filtered or unexported fields
}
TomeUpdate is the builder for updating Tome entities.
func (*TomeUpdate) AddFileIDs ¶
func (tu *TomeUpdate) AddFileIDs(ids ...int) *TomeUpdate
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*TomeUpdate) AddFiles ¶
func (tu *TomeUpdate) AddFiles(f ...*File) *TomeUpdate
AddFiles adds the "files" edges to the File entity.
func (*TomeUpdate) ClearFiles ¶
func (tu *TomeUpdate) ClearFiles() *TomeUpdate
ClearFiles clears all "files" edges to the File entity.
func (*TomeUpdate) ClearParamDefs ¶
func (tu *TomeUpdate) ClearParamDefs() *TomeUpdate
ClearParamDefs clears the value of the "param_defs" field.
func (*TomeUpdate) ClearUploader ¶ added in v0.0.5
func (tu *TomeUpdate) ClearUploader() *TomeUpdate
ClearUploader clears the "uploader" edge to the User entity.
func (*TomeUpdate) Exec ¶
func (tu *TomeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*TomeUpdate) ExecX ¶
func (tu *TomeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TomeUpdate) Mutation ¶
func (tu *TomeUpdate) Mutation() *TomeMutation
Mutation returns the TomeMutation object of the builder.
func (*TomeUpdate) RemoveFileIDs ¶
func (tu *TomeUpdate) RemoveFileIDs(ids ...int) *TomeUpdate
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*TomeUpdate) RemoveFiles ¶
func (tu *TomeUpdate) RemoveFiles(f ...*File) *TomeUpdate
RemoveFiles removes "files" edges to File entities.
func (*TomeUpdate) Save ¶
func (tu *TomeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*TomeUpdate) SaveX ¶
func (tu *TomeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*TomeUpdate) SetAuthor ¶ added in v0.0.5
func (tu *TomeUpdate) SetAuthor(s string) *TomeUpdate
SetAuthor sets the "author" field.
func (*TomeUpdate) SetDescription ¶
func (tu *TomeUpdate) SetDescription(s string) *TomeUpdate
SetDescription sets the "description" field.
func (*TomeUpdate) SetEldritch ¶
func (tu *TomeUpdate) SetEldritch(s string) *TomeUpdate
SetEldritch sets the "eldritch" field.
func (*TomeUpdate) SetHash ¶
func (tu *TomeUpdate) SetHash(s string) *TomeUpdate
SetHash sets the "hash" field.
func (*TomeUpdate) SetInput ¶ added in v0.0.5
func (c *TomeUpdate) SetInput(i UpdateTomeInput) *TomeUpdate
SetInput applies the change-set in the UpdateTomeInput on the TomeUpdate builder.
func (*TomeUpdate) SetLastModifiedAt ¶
func (tu *TomeUpdate) SetLastModifiedAt(t time.Time) *TomeUpdate
SetLastModifiedAt sets the "last_modified_at" field.
func (*TomeUpdate) SetName ¶
func (tu *TomeUpdate) SetName(s string) *TomeUpdate
SetName sets the "name" field.
func (*TomeUpdate) SetNillableParamDefs ¶
func (tu *TomeUpdate) SetNillableParamDefs(s *string) *TomeUpdate
SetNillableParamDefs sets the "param_defs" field if the given value is not nil.
func (*TomeUpdate) SetNillableSupportModel ¶ added in v0.0.5
func (tu *TomeUpdate) SetNillableSupportModel(tm *tome.SupportModel) *TomeUpdate
SetNillableSupportModel sets the "support_model" field if the given value is not nil.
func (*TomeUpdate) SetNillableTactic ¶ added in v0.0.5
func (tu *TomeUpdate) SetNillableTactic(t *tome.Tactic) *TomeUpdate
SetNillableTactic sets the "tactic" field if the given value is not nil.
func (*TomeUpdate) SetNillableUploaderID ¶ added in v0.0.5
func (tu *TomeUpdate) SetNillableUploaderID(id *int) *TomeUpdate
SetNillableUploaderID sets the "uploader" edge to the User entity by ID if the given value is not nil.
func (*TomeUpdate) SetParamDefs ¶
func (tu *TomeUpdate) SetParamDefs(s string) *TomeUpdate
SetParamDefs sets the "param_defs" field.
func (*TomeUpdate) SetSupportModel ¶ added in v0.0.5
func (tu *TomeUpdate) SetSupportModel(tm tome.SupportModel) *TomeUpdate
SetSupportModel sets the "support_model" field.
func (*TomeUpdate) SetTactic ¶ added in v0.0.5
func (tu *TomeUpdate) SetTactic(t tome.Tactic) *TomeUpdate
SetTactic sets the "tactic" field.
func (*TomeUpdate) SetUploader ¶ added in v0.0.5
func (tu *TomeUpdate) SetUploader(u *User) *TomeUpdate
SetUploader sets the "uploader" edge to the User entity.
func (*TomeUpdate) SetUploaderID ¶ added in v0.0.5
func (tu *TomeUpdate) SetUploaderID(id int) *TomeUpdate
SetUploaderID sets the "uploader" edge to the User entity by ID.
func (*TomeUpdate) Where ¶
func (tu *TomeUpdate) Where(ps ...predicate.Tome) *TomeUpdate
Where appends a list predicates to the TomeUpdate builder.
type TomeUpdateOne ¶
type TomeUpdateOne struct {
// contains filtered or unexported fields
}
TomeUpdateOne is the builder for updating a single Tome entity.
func (*TomeUpdateOne) AddFileIDs ¶
func (tuo *TomeUpdateOne) AddFileIDs(ids ...int) *TomeUpdateOne
AddFileIDs adds the "files" edge to the File entity by IDs.
func (*TomeUpdateOne) AddFiles ¶
func (tuo *TomeUpdateOne) AddFiles(f ...*File) *TomeUpdateOne
AddFiles adds the "files" edges to the File entity.
func (*TomeUpdateOne) ClearFiles ¶
func (tuo *TomeUpdateOne) ClearFiles() *TomeUpdateOne
ClearFiles clears all "files" edges to the File entity.
func (*TomeUpdateOne) ClearParamDefs ¶
func (tuo *TomeUpdateOne) ClearParamDefs() *TomeUpdateOne
ClearParamDefs clears the value of the "param_defs" field.
func (*TomeUpdateOne) ClearUploader ¶ added in v0.0.5
func (tuo *TomeUpdateOne) ClearUploader() *TomeUpdateOne
ClearUploader clears the "uploader" edge to the User entity.
func (*TomeUpdateOne) Exec ¶
func (tuo *TomeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*TomeUpdateOne) ExecX ¶
func (tuo *TomeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TomeUpdateOne) Mutation ¶
func (tuo *TomeUpdateOne) Mutation() *TomeMutation
Mutation returns the TomeMutation object of the builder.
func (*TomeUpdateOne) RemoveFileIDs ¶
func (tuo *TomeUpdateOne) RemoveFileIDs(ids ...int) *TomeUpdateOne
RemoveFileIDs removes the "files" edge to File entities by IDs.
func (*TomeUpdateOne) RemoveFiles ¶
func (tuo *TomeUpdateOne) RemoveFiles(f ...*File) *TomeUpdateOne
RemoveFiles removes "files" edges to File entities.
func (*TomeUpdateOne) Save ¶
func (tuo *TomeUpdateOne) Save(ctx context.Context) (*Tome, error)
Save executes the query and returns the updated Tome entity.
func (*TomeUpdateOne) SaveX ¶
func (tuo *TomeUpdateOne) SaveX(ctx context.Context) *Tome
SaveX is like Save, but panics if an error occurs.
func (*TomeUpdateOne) Select ¶
func (tuo *TomeUpdateOne) Select(field string, fields ...string) *TomeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*TomeUpdateOne) SetAuthor ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetAuthor(s string) *TomeUpdateOne
SetAuthor sets the "author" field.
func (*TomeUpdateOne) SetDescription ¶
func (tuo *TomeUpdateOne) SetDescription(s string) *TomeUpdateOne
SetDescription sets the "description" field.
func (*TomeUpdateOne) SetEldritch ¶
func (tuo *TomeUpdateOne) SetEldritch(s string) *TomeUpdateOne
SetEldritch sets the "eldritch" field.
func (*TomeUpdateOne) SetHash ¶
func (tuo *TomeUpdateOne) SetHash(s string) *TomeUpdateOne
SetHash sets the "hash" field.
func (*TomeUpdateOne) SetInput ¶ added in v0.0.5
func (c *TomeUpdateOne) SetInput(i UpdateTomeInput) *TomeUpdateOne
SetInput applies the change-set in the UpdateTomeInput on the TomeUpdateOne builder.
func (*TomeUpdateOne) SetLastModifiedAt ¶
func (tuo *TomeUpdateOne) SetLastModifiedAt(t time.Time) *TomeUpdateOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*TomeUpdateOne) SetName ¶
func (tuo *TomeUpdateOne) SetName(s string) *TomeUpdateOne
SetName sets the "name" field.
func (*TomeUpdateOne) SetNillableParamDefs ¶
func (tuo *TomeUpdateOne) SetNillableParamDefs(s *string) *TomeUpdateOne
SetNillableParamDefs sets the "param_defs" field if the given value is not nil.
func (*TomeUpdateOne) SetNillableSupportModel ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetNillableSupportModel(tm *tome.SupportModel) *TomeUpdateOne
SetNillableSupportModel sets the "support_model" field if the given value is not nil.
func (*TomeUpdateOne) SetNillableTactic ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetNillableTactic(t *tome.Tactic) *TomeUpdateOne
SetNillableTactic sets the "tactic" field if the given value is not nil.
func (*TomeUpdateOne) SetNillableUploaderID ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetNillableUploaderID(id *int) *TomeUpdateOne
SetNillableUploaderID sets the "uploader" edge to the User entity by ID if the given value is not nil.
func (*TomeUpdateOne) SetParamDefs ¶
func (tuo *TomeUpdateOne) SetParamDefs(s string) *TomeUpdateOne
SetParamDefs sets the "param_defs" field.
func (*TomeUpdateOne) SetSupportModel ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetSupportModel(tm tome.SupportModel) *TomeUpdateOne
SetSupportModel sets the "support_model" field.
func (*TomeUpdateOne) SetTactic ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetTactic(t tome.Tactic) *TomeUpdateOne
SetTactic sets the "tactic" field.
func (*TomeUpdateOne) SetUploader ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetUploader(u *User) *TomeUpdateOne
SetUploader sets the "uploader" edge to the User entity.
func (*TomeUpdateOne) SetUploaderID ¶ added in v0.0.5
func (tuo *TomeUpdateOne) SetUploaderID(id int) *TomeUpdateOne
SetUploaderID sets the "uploader" edge to the User entity by ID.
func (*TomeUpdateOne) Where ¶
func (tuo *TomeUpdateOne) Where(ps ...predicate.Tome) *TomeUpdateOne
Where appends a list predicates to the TomeUpdate builder.
type TomeUpsert ¶
TomeUpsert is the "OnConflict" setter.
func (*TomeUpsert) ClearParamDefs ¶
func (u *TomeUpsert) ClearParamDefs() *TomeUpsert
ClearParamDefs clears the value of the "param_defs" field.
func (*TomeUpsert) SetAuthor ¶ added in v0.0.5
func (u *TomeUpsert) SetAuthor(v string) *TomeUpsert
SetAuthor sets the "author" field.
func (*TomeUpsert) SetDescription ¶
func (u *TomeUpsert) SetDescription(v string) *TomeUpsert
SetDescription sets the "description" field.
func (*TomeUpsert) SetEldritch ¶
func (u *TomeUpsert) SetEldritch(v string) *TomeUpsert
SetEldritch sets the "eldritch" field.
func (*TomeUpsert) SetHash ¶
func (u *TomeUpsert) SetHash(v string) *TomeUpsert
SetHash sets the "hash" field.
func (*TomeUpsert) SetLastModifiedAt ¶
func (u *TomeUpsert) SetLastModifiedAt(v time.Time) *TomeUpsert
SetLastModifiedAt sets the "last_modified_at" field.
func (*TomeUpsert) SetName ¶
func (u *TomeUpsert) SetName(v string) *TomeUpsert
SetName sets the "name" field.
func (*TomeUpsert) SetParamDefs ¶
func (u *TomeUpsert) SetParamDefs(v string) *TomeUpsert
SetParamDefs sets the "param_defs" field.
func (*TomeUpsert) SetSupportModel ¶ added in v0.0.5
func (u *TomeUpsert) SetSupportModel(v tome.SupportModel) *TomeUpsert
SetSupportModel sets the "support_model" field.
func (*TomeUpsert) SetTactic ¶ added in v0.0.5
func (u *TomeUpsert) SetTactic(v tome.Tactic) *TomeUpsert
SetTactic sets the "tactic" field.
func (*TomeUpsert) UpdateAuthor ¶ added in v0.0.5
func (u *TomeUpsert) UpdateAuthor() *TomeUpsert
UpdateAuthor sets the "author" field to the value that was provided on create.
func (*TomeUpsert) UpdateDescription ¶
func (u *TomeUpsert) UpdateDescription() *TomeUpsert
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TomeUpsert) UpdateEldritch ¶
func (u *TomeUpsert) UpdateEldritch() *TomeUpsert
UpdateEldritch sets the "eldritch" field to the value that was provided on create.
func (*TomeUpsert) UpdateHash ¶
func (u *TomeUpsert) UpdateHash() *TomeUpsert
UpdateHash sets the "hash" field to the value that was provided on create.
func (*TomeUpsert) UpdateLastModifiedAt ¶
func (u *TomeUpsert) UpdateLastModifiedAt() *TomeUpsert
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*TomeUpsert) UpdateName ¶
func (u *TomeUpsert) UpdateName() *TomeUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*TomeUpsert) UpdateParamDefs ¶
func (u *TomeUpsert) UpdateParamDefs() *TomeUpsert
UpdateParamDefs sets the "param_defs" field to the value that was provided on create.
func (*TomeUpsert) UpdateSupportModel ¶ added in v0.0.5
func (u *TomeUpsert) UpdateSupportModel() *TomeUpsert
UpdateSupportModel sets the "support_model" field to the value that was provided on create.
func (*TomeUpsert) UpdateTactic ¶ added in v0.0.5
func (u *TomeUpsert) UpdateTactic() *TomeUpsert
UpdateTactic sets the "tactic" field to the value that was provided on create.
type TomeUpsertBulk ¶
type TomeUpsertBulk struct {
// contains filtered or unexported fields
}
TomeUpsertBulk is the builder for "upsert"-ing a bulk of Tome nodes.
func (*TomeUpsertBulk) ClearParamDefs ¶
func (u *TomeUpsertBulk) ClearParamDefs() *TomeUpsertBulk
ClearParamDefs clears the value of the "param_defs" field.
func (*TomeUpsertBulk) DoNothing ¶
func (u *TomeUpsertBulk) DoNothing() *TomeUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TomeUpsertBulk) Exec ¶
func (u *TomeUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*TomeUpsertBulk) ExecX ¶
func (u *TomeUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TomeUpsertBulk) Ignore ¶
func (u *TomeUpsertBulk) Ignore() *TomeUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tome.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TomeUpsertBulk) SetAuthor ¶ added in v0.0.5
func (u *TomeUpsertBulk) SetAuthor(v string) *TomeUpsertBulk
SetAuthor sets the "author" field.
func (*TomeUpsertBulk) SetDescription ¶
func (u *TomeUpsertBulk) SetDescription(v string) *TomeUpsertBulk
SetDescription sets the "description" field.
func (*TomeUpsertBulk) SetEldritch ¶
func (u *TomeUpsertBulk) SetEldritch(v string) *TomeUpsertBulk
SetEldritch sets the "eldritch" field.
func (*TomeUpsertBulk) SetHash ¶
func (u *TomeUpsertBulk) SetHash(v string) *TomeUpsertBulk
SetHash sets the "hash" field.
func (*TomeUpsertBulk) SetLastModifiedAt ¶
func (u *TomeUpsertBulk) SetLastModifiedAt(v time.Time) *TomeUpsertBulk
SetLastModifiedAt sets the "last_modified_at" field.
func (*TomeUpsertBulk) SetName ¶
func (u *TomeUpsertBulk) SetName(v string) *TomeUpsertBulk
SetName sets the "name" field.
func (*TomeUpsertBulk) SetParamDefs ¶
func (u *TomeUpsertBulk) SetParamDefs(v string) *TomeUpsertBulk
SetParamDefs sets the "param_defs" field.
func (*TomeUpsertBulk) SetSupportModel ¶ added in v0.0.5
func (u *TomeUpsertBulk) SetSupportModel(v tome.SupportModel) *TomeUpsertBulk
SetSupportModel sets the "support_model" field.
func (*TomeUpsertBulk) SetTactic ¶ added in v0.0.5
func (u *TomeUpsertBulk) SetTactic(v tome.Tactic) *TomeUpsertBulk
SetTactic sets the "tactic" field.
func (*TomeUpsertBulk) Update ¶
func (u *TomeUpsertBulk) Update(set func(*TomeUpsert)) *TomeUpsertBulk
Update allows overriding fields `UPDATE` values. See the TomeCreateBulk.OnConflict documentation for more info.
func (*TomeUpsertBulk) UpdateAuthor ¶ added in v0.0.5
func (u *TomeUpsertBulk) UpdateAuthor() *TomeUpsertBulk
UpdateAuthor sets the "author" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateDescription ¶
func (u *TomeUpsertBulk) UpdateDescription() *TomeUpsertBulk
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateEldritch ¶
func (u *TomeUpsertBulk) UpdateEldritch() *TomeUpsertBulk
UpdateEldritch sets the "eldritch" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateHash ¶
func (u *TomeUpsertBulk) UpdateHash() *TomeUpsertBulk
UpdateHash sets the "hash" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateLastModifiedAt ¶
func (u *TomeUpsertBulk) UpdateLastModifiedAt() *TomeUpsertBulk
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateName ¶
func (u *TomeUpsertBulk) UpdateName() *TomeUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateNewValues ¶
func (u *TomeUpsertBulk) UpdateNewValues() *TomeUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tome.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TomeUpsertBulk) UpdateParamDefs ¶
func (u *TomeUpsertBulk) UpdateParamDefs() *TomeUpsertBulk
UpdateParamDefs sets the "param_defs" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateSupportModel ¶ added in v0.0.5
func (u *TomeUpsertBulk) UpdateSupportModel() *TomeUpsertBulk
UpdateSupportModel sets the "support_model" field to the value that was provided on create.
func (*TomeUpsertBulk) UpdateTactic ¶ added in v0.0.5
func (u *TomeUpsertBulk) UpdateTactic() *TomeUpsertBulk
UpdateTactic sets the "tactic" field to the value that was provided on create.
type TomeUpsertOne ¶
type TomeUpsertOne struct {
// contains filtered or unexported fields
}
TomeUpsertOne is the builder for "upsert"-ing
one Tome node.
func (*TomeUpsertOne) ClearParamDefs ¶
func (u *TomeUpsertOne) ClearParamDefs() *TomeUpsertOne
ClearParamDefs clears the value of the "param_defs" field.
func (*TomeUpsertOne) DoNothing ¶
func (u *TomeUpsertOne) DoNothing() *TomeUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*TomeUpsertOne) Exec ¶
func (u *TomeUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*TomeUpsertOne) ExecX ¶
func (u *TomeUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*TomeUpsertOne) ID ¶
func (u *TomeUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*TomeUpsertOne) IDX ¶
func (u *TomeUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*TomeUpsertOne) Ignore ¶
func (u *TomeUpsertOne) Ignore() *TomeUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.Tome.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*TomeUpsertOne) SetAuthor ¶ added in v0.0.5
func (u *TomeUpsertOne) SetAuthor(v string) *TomeUpsertOne
SetAuthor sets the "author" field.
func (*TomeUpsertOne) SetDescription ¶
func (u *TomeUpsertOne) SetDescription(v string) *TomeUpsertOne
SetDescription sets the "description" field.
func (*TomeUpsertOne) SetEldritch ¶
func (u *TomeUpsertOne) SetEldritch(v string) *TomeUpsertOne
SetEldritch sets the "eldritch" field.
func (*TomeUpsertOne) SetHash ¶
func (u *TomeUpsertOne) SetHash(v string) *TomeUpsertOne
SetHash sets the "hash" field.
func (*TomeUpsertOne) SetLastModifiedAt ¶
func (u *TomeUpsertOne) SetLastModifiedAt(v time.Time) *TomeUpsertOne
SetLastModifiedAt sets the "last_modified_at" field.
func (*TomeUpsertOne) SetName ¶
func (u *TomeUpsertOne) SetName(v string) *TomeUpsertOne
SetName sets the "name" field.
func (*TomeUpsertOne) SetParamDefs ¶
func (u *TomeUpsertOne) SetParamDefs(v string) *TomeUpsertOne
SetParamDefs sets the "param_defs" field.
func (*TomeUpsertOne) SetSupportModel ¶ added in v0.0.5
func (u *TomeUpsertOne) SetSupportModel(v tome.SupportModel) *TomeUpsertOne
SetSupportModel sets the "support_model" field.
func (*TomeUpsertOne) SetTactic ¶ added in v0.0.5
func (u *TomeUpsertOne) SetTactic(v tome.Tactic) *TomeUpsertOne
SetTactic sets the "tactic" field.
func (*TomeUpsertOne) Update ¶
func (u *TomeUpsertOne) Update(set func(*TomeUpsert)) *TomeUpsertOne
Update allows overriding fields `UPDATE` values. See the TomeCreate.OnConflict documentation for more info.
func (*TomeUpsertOne) UpdateAuthor ¶ added in v0.0.5
func (u *TomeUpsertOne) UpdateAuthor() *TomeUpsertOne
UpdateAuthor sets the "author" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateDescription ¶
func (u *TomeUpsertOne) UpdateDescription() *TomeUpsertOne
UpdateDescription sets the "description" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateEldritch ¶
func (u *TomeUpsertOne) UpdateEldritch() *TomeUpsertOne
UpdateEldritch sets the "eldritch" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateHash ¶
func (u *TomeUpsertOne) UpdateHash() *TomeUpsertOne
UpdateHash sets the "hash" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateLastModifiedAt ¶
func (u *TomeUpsertOne) UpdateLastModifiedAt() *TomeUpsertOne
UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateName ¶
func (u *TomeUpsertOne) UpdateName() *TomeUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateNewValues ¶
func (u *TomeUpsertOne) UpdateNewValues() *TomeUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.Tome.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*TomeUpsertOne) UpdateParamDefs ¶
func (u *TomeUpsertOne) UpdateParamDefs() *TomeUpsertOne
UpdateParamDefs sets the "param_defs" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateSupportModel ¶ added in v0.0.5
func (u *TomeUpsertOne) UpdateSupportModel() *TomeUpsertOne
UpdateSupportModel sets the "support_model" field to the value that was provided on create.
func (*TomeUpsertOne) UpdateTactic ¶ added in v0.0.5
func (u *TomeUpsertOne) UpdateTactic() *TomeUpsertOne
UpdateTactic sets the "tactic" field to the value that was provided on create.
type TomeWhereInput ¶
type TomeWhereInput struct { Predicates []predicate.Tome `json:"-"` Not *TomeWhereInput `json:"not,omitempty"` Or []*TomeWhereInput `json:"or,omitempty"` And []*TomeWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "created_at" field predicates. CreatedAt *time.Time `json:"createdAt,omitempty"` CreatedAtNEQ *time.Time `json:"createdAtNEQ,omitempty"` CreatedAtIn []time.Time `json:"createdAtIn,omitempty"` CreatedAtNotIn []time.Time `json:"createdAtNotIn,omitempty"` CreatedAtGT *time.Time `json:"createdAtGT,omitempty"` CreatedAtGTE *time.Time `json:"createdAtGTE,omitempty"` CreatedAtLT *time.Time `json:"createdAtLT,omitempty"` CreatedAtLTE *time.Time `json:"createdAtLTE,omitempty"` // "last_modified_at" field predicates. LastModifiedAt *time.Time `json:"lastModifiedAt,omitempty"` LastModifiedAtNEQ *time.Time `json:"lastModifiedAtNEQ,omitempty"` LastModifiedAtIn []time.Time `json:"lastModifiedAtIn,omitempty"` LastModifiedAtNotIn []time.Time `json:"lastModifiedAtNotIn,omitempty"` LastModifiedAtGT *time.Time `json:"lastModifiedAtGT,omitempty"` LastModifiedAtGTE *time.Time `json:"lastModifiedAtGTE,omitempty"` LastModifiedAtLT *time.Time `json:"lastModifiedAtLT,omitempty"` LastModifiedAtLTE *time.Time `json:"lastModifiedAtLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "description" field predicates. Description *string `json:"description,omitempty"` DescriptionNEQ *string `json:"descriptionNEQ,omitempty"` DescriptionIn []string `json:"descriptionIn,omitempty"` DescriptionNotIn []string `json:"descriptionNotIn,omitempty"` DescriptionGT *string `json:"descriptionGT,omitempty"` DescriptionGTE *string `json:"descriptionGTE,omitempty"` DescriptionLT *string `json:"descriptionLT,omitempty"` DescriptionLTE *string `json:"descriptionLTE,omitempty"` DescriptionContains *string `json:"descriptionContains,omitempty"` DescriptionHasPrefix *string `json:"descriptionHasPrefix,omitempty"` DescriptionHasSuffix *string `json:"descriptionHasSuffix,omitempty"` DescriptionEqualFold *string `json:"descriptionEqualFold,omitempty"` DescriptionContainsFold *string `json:"descriptionContainsFold,omitempty"` // "author" field predicates. Author *string `json:"author,omitempty"` AuthorNEQ *string `json:"authorNEQ,omitempty"` AuthorIn []string `json:"authorIn,omitempty"` AuthorNotIn []string `json:"authorNotIn,omitempty"` AuthorGT *string `json:"authorGT,omitempty"` AuthorGTE *string `json:"authorGTE,omitempty"` AuthorLT *string `json:"authorLT,omitempty"` AuthorLTE *string `json:"authorLTE,omitempty"` AuthorContains *string `json:"authorContains,omitempty"` AuthorHasPrefix *string `json:"authorHasPrefix,omitempty"` AuthorHasSuffix *string `json:"authorHasSuffix,omitempty"` AuthorEqualFold *string `json:"authorEqualFold,omitempty"` AuthorContainsFold *string `json:"authorContainsFold,omitempty"` // "support_model" field predicates. SupportModel *tome.SupportModel `json:"supportModel,omitempty"` SupportModelNEQ *tome.SupportModel `json:"supportModelNEQ,omitempty"` SupportModelIn []tome.SupportModel `json:"supportModelIn,omitempty"` SupportModelNotIn []tome.SupportModel `json:"supportModelNotIn,omitempty"` // "tactic" field predicates. Tactic *tome.Tactic `json:"tactic,omitempty"` TacticNEQ *tome.Tactic `json:"tacticNEQ,omitempty"` TacticIn []tome.Tactic `json:"tacticIn,omitempty"` TacticNotIn []tome.Tactic `json:"tacticNotIn,omitempty"` // "param_defs" field predicates. ParamDefs *string `json:"paramDefs,omitempty"` ParamDefsNEQ *string `json:"paramDefsNEQ,omitempty"` ParamDefsIn []string `json:"paramDefsIn,omitempty"` ParamDefsNotIn []string `json:"paramDefsNotIn,omitempty"` ParamDefsGT *string `json:"paramDefsGT,omitempty"` ParamDefsGTE *string `json:"paramDefsGTE,omitempty"` ParamDefsLT *string `json:"paramDefsLT,omitempty"` ParamDefsLTE *string `json:"paramDefsLTE,omitempty"` ParamDefsContains *string `json:"paramDefsContains,omitempty"` ParamDefsHasPrefix *string `json:"paramDefsHasPrefix,omitempty"` ParamDefsHasSuffix *string `json:"paramDefsHasSuffix,omitempty"` ParamDefsIsNil bool `json:"paramDefsIsNil,omitempty"` ParamDefsNotNil bool `json:"paramDefsNotNil,omitempty"` ParamDefsEqualFold *string `json:"paramDefsEqualFold,omitempty"` ParamDefsContainsFold *string `json:"paramDefsContainsFold,omitempty"` // "eldritch" field predicates. Eldritch *string `json:"eldritch,omitempty"` EldritchNEQ *string `json:"eldritchNEQ,omitempty"` EldritchIn []string `json:"eldritchIn,omitempty"` EldritchNotIn []string `json:"eldritchNotIn,omitempty"` EldritchGT *string `json:"eldritchGT,omitempty"` EldritchGTE *string `json:"eldritchGTE,omitempty"` EldritchLT *string `json:"eldritchLT,omitempty"` EldritchLTE *string `json:"eldritchLTE,omitempty"` EldritchContains *string `json:"eldritchContains,omitempty"` EldritchHasPrefix *string `json:"eldritchHasPrefix,omitempty"` EldritchHasSuffix *string `json:"eldritchHasSuffix,omitempty"` EldritchEqualFold *string `json:"eldritchEqualFold,omitempty"` EldritchContainsFold *string `json:"eldritchContainsFold,omitempty"` // "files" edge predicates. HasFiles *bool `json:"hasFiles,omitempty"` HasFilesWith []*FileWhereInput `json:"hasFilesWith,omitempty"` // "uploader" edge predicates. HasUploader *bool `json:"hasUploader,omitempty"` HasUploaderWith []*UserWhereInput `json:"hasUploaderWith,omitempty"` }
TomeWhereInput represents a where input for filtering Tome queries.
func (*TomeWhereInput) AddPredicates ¶
func (i *TomeWhereInput) AddPredicates(predicates ...predicate.Tome)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Beacon is the client for interacting with the Beacon builders. Beacon *BeaconClient // File is the client for interacting with the File builders. File *FileClient // Host is the client for interacting with the Host builders. Host *HostClient // HostFile is the client for interacting with the HostFile builders. HostFile *HostFileClient // HostProcess is the client for interacting with the HostProcess builders. HostProcess *HostProcessClient // Quest is the client for interacting with the Quest builders. Quest *QuestClient // Tag is the client for interacting with the Tag builders. Tag *TagClient // Task is the client for interacting with the Task builders. Task *TaskClient // Tome is the client for interacting with the Tome builders. Tome *TomeClient // 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 UpdateBeaconInput ¶
UpdateBeaconInput represents a mutation input for updating beacons.
func (*UpdateBeaconInput) Mutate ¶
func (i *UpdateBeaconInput) Mutate(m *BeaconMutation)
Mutate applies the UpdateBeaconInput on the BeaconMutation builder.
type UpdateHostInput ¶
type UpdateHostInput struct { LastModifiedAt *time.Time ClearName bool Name *string ClearTags bool AddTagIDs []int RemoveTagIDs []int ClearBeacons bool AddBeaconIDs []int RemoveBeaconIDs []int ClearFiles bool AddFileIDs []int RemoveFileIDs []int ClearProcesses bool AddProcessIDs []int RemoveProcessIDs []int }
UpdateHostInput represents a mutation input for updating hosts.
func (*UpdateHostInput) Mutate ¶
func (i *UpdateHostInput) Mutate(m *HostMutation)
Mutate applies the UpdateHostInput on the HostMutation builder.
type UpdateTagInput ¶
type UpdateTagInput struct { Name *string Kind *tag.Kind ClearHosts bool AddHostIDs []int RemoveHostIDs []int }
UpdateTagInput represents a mutation input for updating tags.
func (*UpdateTagInput) Mutate ¶
func (i *UpdateTagInput) Mutate(m *TagMutation)
Mutate applies the UpdateTagInput on the TagMutation builder.
type UpdateTomeInput ¶ added in v0.0.5
type UpdateTomeInput struct { LastModifiedAt *time.Time Name *string Description *string Author *string SupportModel *tome.SupportModel Tactic *tome.Tactic ClearParamDefs bool ParamDefs *string Eldritch *string ClearFiles bool AddFileIDs []int RemoveFileIDs []int }
UpdateTomeInput represents a mutation input for updating tomes.
func (*UpdateTomeInput) Mutate ¶ added in v0.0.5
func (i *UpdateTomeInput) Mutate(m *TomeMutation)
Mutate applies the UpdateTomeInput on the TomeMutation builder.
type UpdateUserInput ¶
type UpdateUserInput struct { Name *string PhotoURL *string IsActivated *bool IsAdmin *bool ClearTomes bool AddTomeIDs []int RemoveTomeIDs []int }
UpdateUserInput represents a mutation input for updating users.
func (*UpdateUserInput) Mutate ¶
func (i *UpdateUserInput) Mutate(m *UserMutation)
Mutate applies the UpdateUserInput on the UserMutation builder.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // The name displayed for the user Name string `json:"name,omitempty"` // OAuth Subject ID of the user OauthID string `json:"-"` // URL to the user's profile photo. PhotoURL string `json:"photo_url,omitempty"` // The session token currently authenticating the user SessionToken string `json:"-"` // True if the user is active and able to authenticate IsActivated bool `json:"is_activated,omitempty"` // True if the user is an Admin IsAdmin bool `json:"is_admin,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the UserQuery when eager-loading is set. Edges UserEdges `json:"edges"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) IsNode ¶
func (n *User) IsNode()
IsNode implements the Node interface check for GQLGen.
func (*User) NamedTomes ¶ added in v0.0.5
NamedTomes returns the Tomes named value or an error if the edge was not loaded in eager-loading with this name.
func (*User) QueryTomes ¶ added in v0.0.5
QueryTomes queries the "tomes" edge of the User entity.
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) MapCreateBulk ¶
func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) QueryTomes ¶ added in v0.0.5
func (c *UserClient) QueryTomes(u *User) *TomeQuery
QueryTomes queries the tomes edge of a 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 UserConnection ¶
type UserConnection struct { Edges []*UserEdge `json:"edges"` PageInfo PageInfo `json:"pageInfo"` TotalCount int `json:"totalCount"` }
UserConnection is the connection containing edges to User.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) AddTomeIDs ¶ added in v0.0.5
func (uc *UserCreate) AddTomeIDs(ids ...int) *UserCreate
AddTomeIDs adds the "tomes" edge to the Tome entity by IDs.
func (*UserCreate) AddTomes ¶ added in v0.0.5
func (uc *UserCreate) AddTomes(t ...*Tome) *UserCreate
AddTomes adds the "tomes" edges to the Tome 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) OnConflict ¶
func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.Create(). SetName(v). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetName(v+v). }). Exec(ctx)
func (*UserCreate) OnConflictColumns ¶
func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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) SetIsActivated ¶
func (uc *UserCreate) SetIsActivated(b bool) *UserCreate
SetIsActivated sets the "is_activated" field.
func (*UserCreate) SetIsAdmin ¶
func (uc *UserCreate) SetIsAdmin(b bool) *UserCreate
SetIsAdmin sets the "is_admin" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableIsActivated ¶
func (uc *UserCreate) SetNillableIsActivated(b *bool) *UserCreate
SetNillableIsActivated sets the "is_activated" field if the given value is not nil.
func (*UserCreate) SetNillableIsAdmin ¶
func (uc *UserCreate) SetNillableIsAdmin(b *bool) *UserCreate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserCreate) SetNillableSessionToken ¶
func (uc *UserCreate) SetNillableSessionToken(s *string) *UserCreate
SetNillableSessionToken sets the "session_token" field if the given value is not nil.
func (*UserCreate) SetOauthID ¶
func (uc *UserCreate) SetOauthID(s string) *UserCreate
SetOauthID sets the "oauth_id" field.
func (*UserCreate) SetPhotoURL ¶
func (uc *UserCreate) SetPhotoURL(s string) *UserCreate
SetPhotoURL sets the "photo_url" field.
func (*UserCreate) SetSessionToken ¶
func (uc *UserCreate) SetSessionToken(s string) *UserCreate
SetSessionToken sets the "session_token" 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.
func (*UserCreateBulk) OnConflict ¶
func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk
OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:
client.User.CreateBulk(builders...). OnConflict( // Update the row with the new values // the was proposed for insertion. sql.ResolveWithNewValues(), ). // Override some of the fields with custom // update values. Update(func(u *ent.UserUpsert) { SetName(v+v). }). Exec(ctx)
func (*UserCreateBulk) OnConflictColumns ¶
func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk
OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ConflictColumns(columns...)). Exec(ctx)
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 UserEdges ¶ added in v0.0.5
type UserEdges struct { // Tomes uploaded by the user. Tomes []*Tome `json:"tomes,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) TomesOrErr ¶ added in v0.0.5
TomesOrErr returns the Tomes value or an error if the edge was not loaded in eager-loading.
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) 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) AddTomeIDs ¶ added in v0.0.5
func (m *UserMutation) AddTomeIDs(ids ...int)
AddTomeIDs adds the "tomes" edge to the Tome entity by ids.
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) ClearTomes ¶ added in v0.0.5
func (m *UserMutation) ClearTomes()
ClearTomes clears the "tomes" edge to the Tome entity.
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) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id 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) IsActivated ¶
func (m *UserMutation) IsActivated() (r bool, exists bool)
IsActivated returns the value of the "is_activated" field in the mutation.
func (*UserMutation) IsAdmin ¶
func (m *UserMutation) IsAdmin() (r bool, exists bool)
IsAdmin returns the value of the "is_admin" field in the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OauthID ¶
func (m *UserMutation) OauthID() (r string, exists bool)
OauthID returns the value of the "oauth_id" field in the mutation.
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) OldIsActivated ¶
func (m *UserMutation) OldIsActivated(ctx context.Context) (v bool, err error)
OldIsActivated returns the old "is_activated" 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) OldIsAdmin ¶
func (m *UserMutation) OldIsAdmin(ctx context.Context) (v bool, err error)
OldIsAdmin returns the old "is_admin" 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) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" 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) OldOauthID ¶
func (m *UserMutation) OldOauthID(ctx context.Context) (v string, err error)
OldOauthID returns the old "oauth_id" 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) OldPhotoURL ¶
func (m *UserMutation) OldPhotoURL(ctx context.Context) (v string, err error)
OldPhotoURL returns the old "photo_url" 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) OldSessionToken ¶
func (m *UserMutation) OldSessionToken(ctx context.Context) (v string, err error)
OldSessionToken returns the old "session_token" 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) PhotoURL ¶
func (m *UserMutation) PhotoURL() (r string, exists bool)
PhotoURL returns the value of the "photo_url" field in the mutation.
func (*UserMutation) RemoveTomeIDs ¶ added in v0.0.5
func (m *UserMutation) RemoveTomeIDs(ids ...int)
RemoveTomeIDs removes the "tomes" edge to the Tome entity by IDs.
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) RemovedTomesIDs ¶ added in v0.0.5
func (m *UserMutation) RemovedTomesIDs() (ids []int)
RemovedTomes returns the removed IDs of the "tomes" edge to the Tome entity.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetIsActivated ¶
func (m *UserMutation) ResetIsActivated()
ResetIsActivated resets all changes to the "is_activated" field.
func (*UserMutation) ResetIsAdmin ¶
func (m *UserMutation) ResetIsAdmin()
ResetIsAdmin resets all changes to the "is_admin" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetOauthID ¶
func (m *UserMutation) ResetOauthID()
ResetOauthID resets all changes to the "oauth_id" field.
func (*UserMutation) ResetPhotoURL ¶
func (m *UserMutation) ResetPhotoURL()
ResetPhotoURL resets all changes to the "photo_url" field.
func (*UserMutation) ResetSessionToken ¶
func (m *UserMutation) ResetSessionToken()
ResetSessionToken resets all changes to the "session_token" field.
func (*UserMutation) ResetTomes ¶ added in v0.0.5
func (m *UserMutation) ResetTomes()
ResetTomes resets all changes to the "tomes" edge.
func (*UserMutation) SessionToken ¶
func (m *UserMutation) SessionToken() (r string, exists bool)
SessionToken returns the value of the "session_token" field in the mutation.
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) SetIsActivated ¶
func (m *UserMutation) SetIsActivated(b bool)
SetIsActivated sets the "is_activated" field.
func (*UserMutation) SetIsAdmin ¶
func (m *UserMutation) SetIsAdmin(b bool)
SetIsAdmin sets the "is_admin" field.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOauthID ¶
func (m *UserMutation) SetOauthID(s string)
SetOauthID sets the "oauth_id" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPhotoURL ¶
func (m *UserMutation) SetPhotoURL(s string)
SetPhotoURL sets the "photo_url" field.
func (*UserMutation) SetSessionToken ¶
func (m *UserMutation) SetSessionToken(s string)
SetSessionToken sets the "session_token" field.
func (*UserMutation) TomesCleared ¶ added in v0.0.5
func (m *UserMutation) TomesCleared() bool
TomesCleared reports if the "tomes" edge to the Tome entity was cleared.
func (*UserMutation) TomesIDs ¶ added in v0.0.5
func (m *UserMutation) TomesIDs() (ids []int)
TomesIDs returns the "tomes" edge IDs in the mutation.
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) 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 UserOrder ¶
type UserOrder struct { Direction OrderDirection `json:"direction"` Field *UserOrderField `json:"field"` }
UserOrder defines the ordering of User.
type UserOrderField ¶
type UserOrderField struct { // Value extracts the ordering value from the given User. Value func(*User) (ent.Value, error) // contains filtered or unexported fields }
UserOrderField defines the ordering field of User.
type UserPaginateOption ¶
type UserPaginateOption func(*userPager) error
UserPaginateOption enables pagination customization.
func WithUserFilter ¶
func WithUserFilter(filter func(*UserQuery) (*UserQuery, error)) UserPaginateOption
WithUserFilter configures pagination filter.
func WithUserOrder ¶
func WithUserOrder(order *UserOrder) UserPaginateOption
WithUserOrder configures pagination ordering.
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) CollectFields ¶
CollectFields tells the query-builder to eagerly load connected nodes by resolver context.
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 { Name string `json:"name,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldName). 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) Paginate ¶
func (u *UserQuery) Paginate( ctx context.Context, after *Cursor, first *int, before *Cursor, last *int, opts ...UserPaginateOption, ) (*UserConnection, error)
Paginate executes the query and returns a relay based cursor connection to User.
func (*UserQuery) QueryTomes ¶ added in v0.0.5
QueryTomes chains the current query on the "tomes" edge.
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 { Name string `json:"name,omitempty"` } client.User.Query(). Select(user.FieldName). Scan(ctx, &v)
func (*UserQuery) Unique ¶
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 (*UserQuery) WithNamedTomes ¶ added in v0.0.5
WithNamedTomes tells the query-builder to eager-load the nodes that are connected to the "tomes" edge with the given name. The optional arguments are used to configure the query builder of the edge.
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) AddTomeIDs ¶ added in v0.0.5
func (uu *UserUpdate) AddTomeIDs(ids ...int) *UserUpdate
AddTomeIDs adds the "tomes" edge to the Tome entity by IDs.
func (*UserUpdate) AddTomes ¶ added in v0.0.5
func (uu *UserUpdate) AddTomes(t ...*Tome) *UserUpdate
AddTomes adds the "tomes" edges to the Tome entity.
func (*UserUpdate) ClearTomes ¶ added in v0.0.5
func (uu *UserUpdate) ClearTomes() *UserUpdate
ClearTomes clears all "tomes" edges to the Tome entity.
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) RemoveTomeIDs ¶ added in v0.0.5
func (uu *UserUpdate) RemoveTomeIDs(ids ...int) *UserUpdate
RemoveTomeIDs removes the "tomes" edge to Tome entities by IDs.
func (*UserUpdate) RemoveTomes ¶ added in v0.0.5
func (uu *UserUpdate) RemoveTomes(t ...*Tome) *UserUpdate
RemoveTomes removes "tomes" edges to Tome entities.
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) SetInput ¶
func (c *UserUpdate) SetInput(i UpdateUserInput) *UserUpdate
SetInput applies the change-set in the UpdateUserInput on the UserUpdate builder.
func (*UserUpdate) SetIsActivated ¶
func (uu *UserUpdate) SetIsActivated(b bool) *UserUpdate
SetIsActivated sets the "is_activated" field.
func (*UserUpdate) SetIsAdmin ¶
func (uu *UserUpdate) SetIsAdmin(b bool) *UserUpdate
SetIsAdmin sets the "is_admin" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableIsActivated ¶
func (uu *UserUpdate) SetNillableIsActivated(b *bool) *UserUpdate
SetNillableIsActivated sets the "is_activated" field if the given value is not nil.
func (*UserUpdate) SetNillableIsAdmin ¶
func (uu *UserUpdate) SetNillableIsAdmin(b *bool) *UserUpdate
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserUpdate) SetNillableSessionToken ¶
func (uu *UserUpdate) SetNillableSessionToken(s *string) *UserUpdate
SetNillableSessionToken sets the "session_token" field if the given value is not nil.
func (*UserUpdate) SetPhotoURL ¶
func (uu *UserUpdate) SetPhotoURL(s string) *UserUpdate
SetPhotoURL sets the "photo_url" field.
func (*UserUpdate) SetSessionToken ¶
func (uu *UserUpdate) SetSessionToken(s string) *UserUpdate
SetSessionToken sets the "session_token" 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) AddTomeIDs ¶ added in v0.0.5
func (uuo *UserUpdateOne) AddTomeIDs(ids ...int) *UserUpdateOne
AddTomeIDs adds the "tomes" edge to the Tome entity by IDs.
func (*UserUpdateOne) AddTomes ¶ added in v0.0.5
func (uuo *UserUpdateOne) AddTomes(t ...*Tome) *UserUpdateOne
AddTomes adds the "tomes" edges to the Tome entity.
func (*UserUpdateOne) ClearTomes ¶ added in v0.0.5
func (uuo *UserUpdateOne) ClearTomes() *UserUpdateOne
ClearTomes clears all "tomes" edges to the Tome 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) RemoveTomeIDs ¶ added in v0.0.5
func (uuo *UserUpdateOne) RemoveTomeIDs(ids ...int) *UserUpdateOne
RemoveTomeIDs removes the "tomes" edge to Tome entities by IDs.
func (*UserUpdateOne) RemoveTomes ¶ added in v0.0.5
func (uuo *UserUpdateOne) RemoveTomes(t ...*Tome) *UserUpdateOne
RemoveTomes removes "tomes" edges to Tome entities.
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) SetInput ¶
func (c *UserUpdateOne) SetInput(i UpdateUserInput) *UserUpdateOne
SetInput applies the change-set in the UpdateUserInput on the UserUpdateOne builder.
func (*UserUpdateOne) SetIsActivated ¶
func (uuo *UserUpdateOne) SetIsActivated(b bool) *UserUpdateOne
SetIsActivated sets the "is_activated" field.
func (*UserUpdateOne) SetIsAdmin ¶
func (uuo *UserUpdateOne) SetIsAdmin(b bool) *UserUpdateOne
SetIsAdmin sets the "is_admin" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableIsActivated ¶
func (uuo *UserUpdateOne) SetNillableIsActivated(b *bool) *UserUpdateOne
SetNillableIsActivated sets the "is_activated" field if the given value is not nil.
func (*UserUpdateOne) SetNillableIsAdmin ¶
func (uuo *UserUpdateOne) SetNillableIsAdmin(b *bool) *UserUpdateOne
SetNillableIsAdmin sets the "is_admin" field if the given value is not nil.
func (*UserUpdateOne) SetNillableSessionToken ¶
func (uuo *UserUpdateOne) SetNillableSessionToken(s *string) *UserUpdateOne
SetNillableSessionToken sets the "session_token" field if the given value is not nil.
func (*UserUpdateOne) SetPhotoURL ¶
func (uuo *UserUpdateOne) SetPhotoURL(s string) *UserUpdateOne
SetPhotoURL sets the "photo_url" field.
func (*UserUpdateOne) SetSessionToken ¶
func (uuo *UserUpdateOne) SetSessionToken(s string) *UserUpdateOne
SetSessionToken sets the "session_token" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type UserUpsert ¶
UserUpsert is the "OnConflict" setter.
func (*UserUpsert) SetIsActivated ¶
func (u *UserUpsert) SetIsActivated(v bool) *UserUpsert
SetIsActivated sets the "is_activated" field.
func (*UserUpsert) SetIsAdmin ¶
func (u *UserUpsert) SetIsAdmin(v bool) *UserUpsert
SetIsAdmin sets the "is_admin" field.
func (*UserUpsert) SetName ¶
func (u *UserUpsert) SetName(v string) *UserUpsert
SetName sets the "name" field.
func (*UserUpsert) SetPhotoURL ¶
func (u *UserUpsert) SetPhotoURL(v string) *UserUpsert
SetPhotoURL sets the "photo_url" field.
func (*UserUpsert) SetSessionToken ¶
func (u *UserUpsert) SetSessionToken(v string) *UserUpsert
SetSessionToken sets the "session_token" field.
func (*UserUpsert) UpdateIsActivated ¶
func (u *UserUpsert) UpdateIsActivated() *UserUpsert
UpdateIsActivated sets the "is_activated" field to the value that was provided on create.
func (*UserUpsert) UpdateIsAdmin ¶
func (u *UserUpsert) UpdateIsAdmin() *UserUpsert
UpdateIsAdmin sets the "is_admin" field to the value that was provided on create.
func (*UserUpsert) UpdateName ¶
func (u *UserUpsert) UpdateName() *UserUpsert
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsert) UpdatePhotoURL ¶
func (u *UserUpsert) UpdatePhotoURL() *UserUpsert
UpdatePhotoURL sets the "photo_url" field to the value that was provided on create.
func (*UserUpsert) UpdateSessionToken ¶
func (u *UserUpsert) UpdateSessionToken() *UserUpsert
UpdateSessionToken sets the "session_token" field to the value that was provided on create.
type UserUpsertBulk ¶
type UserUpsertBulk struct {
// contains filtered or unexported fields
}
UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.
func (*UserUpsertBulk) DoNothing ¶
func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertBulk) Exec ¶
func (u *UserUpsertBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertBulk) ExecX ¶
func (u *UserUpsertBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertBulk) Ignore ¶
func (u *UserUpsertBulk) Ignore() *UserUpsertBulk
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertBulk) SetIsActivated ¶
func (u *UserUpsertBulk) SetIsActivated(v bool) *UserUpsertBulk
SetIsActivated sets the "is_activated" field.
func (*UserUpsertBulk) SetIsAdmin ¶
func (u *UserUpsertBulk) SetIsAdmin(v bool) *UserUpsertBulk
SetIsAdmin sets the "is_admin" field.
func (*UserUpsertBulk) SetName ¶
func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk
SetName sets the "name" field.
func (*UserUpsertBulk) SetPhotoURL ¶
func (u *UserUpsertBulk) SetPhotoURL(v string) *UserUpsertBulk
SetPhotoURL sets the "photo_url" field.
func (*UserUpsertBulk) SetSessionToken ¶
func (u *UserUpsertBulk) SetSessionToken(v string) *UserUpsertBulk
SetSessionToken sets the "session_token" field.
func (*UserUpsertBulk) Update ¶
func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk
Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.
func (*UserUpsertBulk) UpdateIsActivated ¶
func (u *UserUpsertBulk) UpdateIsActivated() *UserUpsertBulk
UpdateIsActivated sets the "is_activated" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateIsAdmin ¶
func (u *UserUpsertBulk) UpdateIsAdmin() *UserUpsertBulk
UpdateIsAdmin sets the "is_admin" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateName ¶
func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateNewValues ¶
func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertBulk) UpdatePhotoURL ¶
func (u *UserUpsertBulk) UpdatePhotoURL() *UserUpsertBulk
UpdatePhotoURL sets the "photo_url" field to the value that was provided on create.
func (*UserUpsertBulk) UpdateSessionToken ¶
func (u *UserUpsertBulk) UpdateSessionToken() *UserUpsertBulk
UpdateSessionToken sets the "session_token" field to the value that was provided on create.
type UserUpsertOne ¶
type UserUpsertOne struct {
// contains filtered or unexported fields
}
UserUpsertOne is the builder for "upsert"-ing
one User node.
func (*UserUpsertOne) DoNothing ¶
func (u *UserUpsertOne) DoNothing() *UserUpsertOne
DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.
func (*UserUpsertOne) Exec ¶
func (u *UserUpsertOne) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpsertOne) ExecX ¶
func (u *UserUpsertOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpsertOne) ID ¶
func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)
Exec executes the UPSERT query and returns the inserted/updated ID.
func (*UserUpsertOne) IDX ¶
func (u *UserUpsertOne) IDX(ctx context.Context) int
IDX is like ID, but panics if an error occurs.
func (*UserUpsertOne) Ignore ¶
func (u *UserUpsertOne) Ignore() *UserUpsertOne
Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:
client.User.Create(). OnConflict(sql.ResolveWithIgnore()). Exec(ctx)
func (*UserUpsertOne) SetIsActivated ¶
func (u *UserUpsertOne) SetIsActivated(v bool) *UserUpsertOne
SetIsActivated sets the "is_activated" field.
func (*UserUpsertOne) SetIsAdmin ¶
func (u *UserUpsertOne) SetIsAdmin(v bool) *UserUpsertOne
SetIsAdmin sets the "is_admin" field.
func (*UserUpsertOne) SetName ¶
func (u *UserUpsertOne) SetName(v string) *UserUpsertOne
SetName sets the "name" field.
func (*UserUpsertOne) SetPhotoURL ¶
func (u *UserUpsertOne) SetPhotoURL(v string) *UserUpsertOne
SetPhotoURL sets the "photo_url" field.
func (*UserUpsertOne) SetSessionToken ¶
func (u *UserUpsertOne) SetSessionToken(v string) *UserUpsertOne
SetSessionToken sets the "session_token" field.
func (*UserUpsertOne) Update ¶
func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne
Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.
func (*UserUpsertOne) UpdateIsActivated ¶
func (u *UserUpsertOne) UpdateIsActivated() *UserUpsertOne
UpdateIsActivated sets the "is_activated" field to the value that was provided on create.
func (*UserUpsertOne) UpdateIsAdmin ¶
func (u *UserUpsertOne) UpdateIsAdmin() *UserUpsertOne
UpdateIsAdmin sets the "is_admin" field to the value that was provided on create.
func (*UserUpsertOne) UpdateName ¶
func (u *UserUpsertOne) UpdateName() *UserUpsertOne
UpdateName sets the "name" field to the value that was provided on create.
func (*UserUpsertOne) UpdateNewValues ¶
func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne
UpdateNewValues updates the mutable fields using the new values that were set on create. Using this option is equivalent to using:
client.User.Create(). OnConflict( sql.ResolveWithNewValues(), ). Exec(ctx)
func (*UserUpsertOne) UpdatePhotoURL ¶
func (u *UserUpsertOne) UpdatePhotoURL() *UserUpsertOne
UpdatePhotoURL sets the "photo_url" field to the value that was provided on create.
func (*UserUpsertOne) UpdateSessionToken ¶
func (u *UserUpsertOne) UpdateSessionToken() *UserUpsertOne
UpdateSessionToken sets the "session_token" field to the value that was provided on create.
type UserWhereInput ¶
type UserWhereInput struct { Predicates []predicate.User `json:"-"` Not *UserWhereInput `json:"not,omitempty"` Or []*UserWhereInput `json:"or,omitempty"` And []*UserWhereInput `json:"and,omitempty"` // "id" field predicates. ID *int `json:"id,omitempty"` IDNEQ *int `json:"idNEQ,omitempty"` IDIn []int `json:"idIn,omitempty"` IDNotIn []int `json:"idNotIn,omitempty"` IDGT *int `json:"idGT,omitempty"` IDGTE *int `json:"idGTE,omitempty"` IDLT *int `json:"idLT,omitempty"` IDLTE *int `json:"idLTE,omitempty"` // "name" field predicates. Name *string `json:"name,omitempty"` NameNEQ *string `json:"nameNEQ,omitempty"` NameIn []string `json:"nameIn,omitempty"` NameNotIn []string `json:"nameNotIn,omitempty"` NameGT *string `json:"nameGT,omitempty"` NameGTE *string `json:"nameGTE,omitempty"` NameLT *string `json:"nameLT,omitempty"` NameLTE *string `json:"nameLTE,omitempty"` NameContains *string `json:"nameContains,omitempty"` NameHasPrefix *string `json:"nameHasPrefix,omitempty"` NameHasSuffix *string `json:"nameHasSuffix,omitempty"` NameEqualFold *string `json:"nameEqualFold,omitempty"` NameContainsFold *string `json:"nameContainsFold,omitempty"` // "oauth_id" field predicates. OauthID *string `json:"oauthID,omitempty"` OauthIDNEQ *string `json:"oauthIDNEQ,omitempty"` OauthIDIn []string `json:"oauthIDIn,omitempty"` OauthIDNotIn []string `json:"oauthIDNotIn,omitempty"` OauthIDGT *string `json:"oauthIDGT,omitempty"` OauthIDGTE *string `json:"oauthIDGTE,omitempty"` OauthIDLT *string `json:"oauthIDLT,omitempty"` OauthIDLTE *string `json:"oauthIDLTE,omitempty"` OauthIDContains *string `json:"oauthIDContains,omitempty"` OauthIDHasPrefix *string `json:"oauthIDHasPrefix,omitempty"` OauthIDHasSuffix *string `json:"oauthIDHasSuffix,omitempty"` OauthIDEqualFold *string `json:"oauthIDEqualFold,omitempty"` OauthIDContainsFold *string `json:"oauthIDContainsFold,omitempty"` // "photo_url" field predicates. PhotoURL *string `json:"photoURL,omitempty"` PhotoURLNEQ *string `json:"photoURLNEQ,omitempty"` PhotoURLIn []string `json:"photoURLIn,omitempty"` PhotoURLNotIn []string `json:"photoURLNotIn,omitempty"` PhotoURLGT *string `json:"photoURLGT,omitempty"` PhotoURLGTE *string `json:"photoURLGTE,omitempty"` PhotoURLLT *string `json:"photoURLLT,omitempty"` PhotoURLLTE *string `json:"photoURLLTE,omitempty"` PhotoURLContains *string `json:"photoURLContains,omitempty"` PhotoURLHasPrefix *string `json:"photoURLHasPrefix,omitempty"` PhotoURLHasSuffix *string `json:"photoURLHasSuffix,omitempty"` PhotoURLEqualFold *string `json:"photoURLEqualFold,omitempty"` PhotoURLContainsFold *string `json:"photoURLContainsFold,omitempty"` // "is_activated" field predicates. IsActivated *bool `json:"isActivated,omitempty"` IsActivatedNEQ *bool `json:"isActivatedNEQ,omitempty"` // "is_admin" field predicates. IsAdmin *bool `json:"isAdmin,omitempty"` IsAdminNEQ *bool `json:"isAdminNEQ,omitempty"` // "tomes" edge predicates. HasTomes *bool `json:"hasTomes,omitempty"` HasTomesWith []*TomeWhereInput `json:"hasTomesWith,omitempty"` }
UserWhereInput represents a where input for filtering User queries.
func (*UserWhereInput) AddPredicates ¶
func (i *UserWhereInput) AddPredicates(predicates ...predicate.User)
AddPredicates adds custom predicates to the where input to be used during the filtering phase.
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 ¶
- beacon.go
- beacon_create.go
- beacon_delete.go
- beacon_query.go
- beacon_update.go
- client.go
- ent.go
- file.go
- file_create.go
- file_delete.go
- file_query.go
- file_update.go
- generate.go
- gql_collection.go
- gql_edge.go
- gql_mutation_input.go
- gql_node.go
- gql_pagination.go
- gql_transaction.go
- gql_where_input.go
- host.go
- host_create.go
- host_delete.go
- host_query.go
- host_update.go
- hostfile.go
- hostfile_create.go
- hostfile_delete.go
- hostfile_query.go
- hostfile_update.go
- hostprocess.go
- hostprocess_create.go
- hostprocess_delete.go
- hostprocess_query.go
- hostprocess_update.go
- mutation.go
- quest.go
- quest_create.go
- quest_delete.go
- quest_query.go
- quest_update.go
- runtime.go
- tag.go
- tag_create.go
- tag_delete.go
- tag_query.go
- tag_update.go
- task.go
- task_create.go
- task_delete.go
- task_query.go
- task_update.go
- tome.go
- tome_create.go
- tome_delete.go
- tome_query.go
- tome_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go