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
- type AggregateFunc
- type Client
- func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)
- func (c *Client) Close() error
- func (c *Client) Debug() *Client
- func (c *Client) Intercept(interceptors ...Interceptor)
- func (c *Client) Mutate(ctx context.Context, m Mutation) (Value, error)
- func (c *Client) Tx(ctx context.Context) (*Tx, error)
- func (c *Client) Use(hooks ...Hook)
- type CommitFunc
- type CommitHook
- type Committer
- type ConstraintError
- type Daemon
- type DaemonClient
- func (c *DaemonClient) Create() *DaemonCreate
- func (c *DaemonClient) CreateBulk(builders ...*DaemonCreate) *DaemonCreateBulk
- func (c *DaemonClient) Delete() *DaemonDelete
- func (c *DaemonClient) DeleteOne(d *Daemon) *DaemonDeleteOne
- func (c *DaemonClient) DeleteOneID(id int) *DaemonDeleteOne
- func (c *DaemonClient) Get(ctx context.Context, id int) (*Daemon, error)
- func (c *DaemonClient) GetX(ctx context.Context, id int) *Daemon
- func (c *DaemonClient) Hooks() []Hook
- func (c *DaemonClient) Intercept(interceptors ...Interceptor)
- func (c *DaemonClient) Interceptors() []Interceptor
- func (c *DaemonClient) MapCreateBulk(slice any, setFunc func(*DaemonCreate, int)) *DaemonCreateBulk
- func (c *DaemonClient) Query() *DaemonQuery
- func (c *DaemonClient) QueryUser(d *Daemon) *UserQuery
- func (c *DaemonClient) Update() *DaemonUpdate
- func (c *DaemonClient) UpdateOne(d *Daemon) *DaemonUpdateOne
- func (c *DaemonClient) UpdateOneID(id int) *DaemonUpdateOne
- func (c *DaemonClient) Use(hooks ...Hook)
- type DaemonCreate
- func (dc *DaemonCreate) Exec(ctx context.Context) error
- func (dc *DaemonCreate) ExecX(ctx context.Context)
- func (dc *DaemonCreate) Mutation() *DaemonMutation
- func (dc *DaemonCreate) Save(ctx context.Context) (*Daemon, error)
- func (dc *DaemonCreate) SaveX(ctx context.Context) *Daemon
- func (dc *DaemonCreate) SetEnable(b bool) *DaemonCreate
- func (dc *DaemonCreate) SetNillableEnable(b *bool) *DaemonCreate
- func (dc *DaemonCreate) SetNillableUserID(id *int) *DaemonCreate
- func (dc *DaemonCreate) SetPath(s string) *DaemonCreate
- func (dc *DaemonCreate) SetUser(u *User) *DaemonCreate
- func (dc *DaemonCreate) SetUserID(id int) *DaemonCreate
- type DaemonCreateBulk
- type DaemonDelete
- type DaemonDeleteOne
- type DaemonEdges
- type DaemonGroupBy
- func (dgb *DaemonGroupBy) Aggregate(fns ...AggregateFunc) *DaemonGroupBy
- func (s *DaemonGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *DaemonGroupBy) BoolX(ctx context.Context) bool
- func (s *DaemonGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *DaemonGroupBy) BoolsX(ctx context.Context) []bool
- func (s *DaemonGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *DaemonGroupBy) Float64X(ctx context.Context) float64
- func (s *DaemonGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *DaemonGroupBy) Float64sX(ctx context.Context) []float64
- func (s *DaemonGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *DaemonGroupBy) IntX(ctx context.Context) int
- func (s *DaemonGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *DaemonGroupBy) IntsX(ctx context.Context) []int
- func (dgb *DaemonGroupBy) Scan(ctx context.Context, v any) error
- func (s *DaemonGroupBy) ScanX(ctx context.Context, v any)
- func (s *DaemonGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *DaemonGroupBy) StringX(ctx context.Context) string
- func (s *DaemonGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *DaemonGroupBy) StringsX(ctx context.Context) []string
- type DaemonMutation
- func (m *DaemonMutation) AddField(name string, value ent.Value) error
- func (m *DaemonMutation) AddedEdges() []string
- func (m *DaemonMutation) AddedField(name string) (ent.Value, bool)
- func (m *DaemonMutation) AddedFields() []string
- func (m *DaemonMutation) AddedIDs(name string) []ent.Value
- func (m *DaemonMutation) ClearEdge(name string) error
- func (m *DaemonMutation) ClearField(name string) error
- func (m *DaemonMutation) ClearUser()
- func (m *DaemonMutation) ClearedEdges() []string
- func (m *DaemonMutation) ClearedFields() []string
- func (m DaemonMutation) Client() *Client
- func (m *DaemonMutation) EdgeCleared(name string) bool
- func (m *DaemonMutation) Enable() (r bool, exists bool)
- func (m *DaemonMutation) Field(name string) (ent.Value, bool)
- func (m *DaemonMutation) FieldCleared(name string) bool
- func (m *DaemonMutation) Fields() []string
- func (m *DaemonMutation) ID() (id int, exists bool)
- func (m *DaemonMutation) IDs(ctx context.Context) ([]int, error)
- func (m *DaemonMutation) OldEnable(ctx context.Context) (v bool, err error)
- func (m *DaemonMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *DaemonMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *DaemonMutation) Op() Op
- func (m *DaemonMutation) Path() (r string, exists bool)
- func (m *DaemonMutation) RemovedEdges() []string
- func (m *DaemonMutation) RemovedIDs(name string) []ent.Value
- func (m *DaemonMutation) ResetEdge(name string) error
- func (m *DaemonMutation) ResetEnable()
- func (m *DaemonMutation) ResetField(name string) error
- func (m *DaemonMutation) ResetPath()
- func (m *DaemonMutation) ResetUser()
- func (m *DaemonMutation) SetEnable(b bool)
- func (m *DaemonMutation) SetField(name string, value ent.Value) error
- func (m *DaemonMutation) SetOp(op Op)
- func (m *DaemonMutation) SetPath(s string)
- func (m *DaemonMutation) SetUserID(id int)
- func (m DaemonMutation) Tx() (*Tx, error)
- func (m *DaemonMutation) Type() string
- func (m *DaemonMutation) UserCleared() bool
- func (m *DaemonMutation) UserID() (id int, exists bool)
- func (m *DaemonMutation) UserIDs() (ids []int)
- func (m *DaemonMutation) Where(ps ...predicate.Daemon)
- func (m *DaemonMutation) WhereP(ps ...func(*sql.Selector))
- type DaemonQuery
- func (dq *DaemonQuery) Aggregate(fns ...AggregateFunc) *DaemonSelect
- func (dq *DaemonQuery) All(ctx context.Context) ([]*Daemon, error)
- func (dq *DaemonQuery) AllX(ctx context.Context) []*Daemon
- func (dq *DaemonQuery) Clone() *DaemonQuery
- func (dq *DaemonQuery) Count(ctx context.Context) (int, error)
- func (dq *DaemonQuery) CountX(ctx context.Context) int
- func (dq *DaemonQuery) Exist(ctx context.Context) (bool, error)
- func (dq *DaemonQuery) ExistX(ctx context.Context) bool
- func (dq *DaemonQuery) First(ctx context.Context) (*Daemon, error)
- func (dq *DaemonQuery) FirstID(ctx context.Context) (id int, err error)
- func (dq *DaemonQuery) FirstIDX(ctx context.Context) int
- func (dq *DaemonQuery) FirstX(ctx context.Context) *Daemon
- func (dq *DaemonQuery) GroupBy(field string, fields ...string) *DaemonGroupBy
- func (dq *DaemonQuery) IDs(ctx context.Context) (ids []int, err error)
- func (dq *DaemonQuery) IDsX(ctx context.Context) []int
- func (dq *DaemonQuery) Limit(limit int) *DaemonQuery
- func (dq *DaemonQuery) Offset(offset int) *DaemonQuery
- func (dq *DaemonQuery) Only(ctx context.Context) (*Daemon, error)
- func (dq *DaemonQuery) OnlyID(ctx context.Context) (id int, err error)
- func (dq *DaemonQuery) OnlyIDX(ctx context.Context) int
- func (dq *DaemonQuery) OnlyX(ctx context.Context) *Daemon
- func (dq *DaemonQuery) Order(o ...daemon.OrderOption) *DaemonQuery
- func (dq *DaemonQuery) QueryUser() *UserQuery
- func (dq *DaemonQuery) Select(fields ...string) *DaemonSelect
- func (dq *DaemonQuery) Unique(unique bool) *DaemonQuery
- func (dq *DaemonQuery) Where(ps ...predicate.Daemon) *DaemonQuery
- func (dq *DaemonQuery) WithUser(opts ...func(*UserQuery)) *DaemonQuery
- type DaemonSelect
- func (ds *DaemonSelect) Aggregate(fns ...AggregateFunc) *DaemonSelect
- func (s *DaemonSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *DaemonSelect) BoolX(ctx context.Context) bool
- func (s *DaemonSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *DaemonSelect) BoolsX(ctx context.Context) []bool
- func (s *DaemonSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *DaemonSelect) Float64X(ctx context.Context) float64
- func (s *DaemonSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *DaemonSelect) Float64sX(ctx context.Context) []float64
- func (s *DaemonSelect) Int(ctx context.Context) (_ int, err error)
- func (s *DaemonSelect) IntX(ctx context.Context) int
- func (s *DaemonSelect) Ints(ctx context.Context) ([]int, error)
- func (s *DaemonSelect) IntsX(ctx context.Context) []int
- func (ds *DaemonSelect) Scan(ctx context.Context, v any) error
- func (s *DaemonSelect) ScanX(ctx context.Context, v any)
- func (s *DaemonSelect) String(ctx context.Context) (_ string, err error)
- func (s *DaemonSelect) StringX(ctx context.Context) string
- func (s *DaemonSelect) Strings(ctx context.Context) ([]string, error)
- func (s *DaemonSelect) StringsX(ctx context.Context) []string
- type DaemonUpdate
- func (du *DaemonUpdate) ClearUser() *DaemonUpdate
- func (du *DaemonUpdate) Exec(ctx context.Context) error
- func (du *DaemonUpdate) ExecX(ctx context.Context)
- func (du *DaemonUpdate) Mutation() *DaemonMutation
- func (du *DaemonUpdate) Save(ctx context.Context) (int, error)
- func (du *DaemonUpdate) SaveX(ctx context.Context) int
- func (du *DaemonUpdate) SetEnable(b bool) *DaemonUpdate
- func (du *DaemonUpdate) SetNillableEnable(b *bool) *DaemonUpdate
- func (du *DaemonUpdate) SetNillablePath(s *string) *DaemonUpdate
- func (du *DaemonUpdate) SetNillableUserID(id *int) *DaemonUpdate
- func (du *DaemonUpdate) SetPath(s string) *DaemonUpdate
- func (du *DaemonUpdate) SetUser(u *User) *DaemonUpdate
- func (du *DaemonUpdate) SetUserID(id int) *DaemonUpdate
- func (du *DaemonUpdate) Where(ps ...predicate.Daemon) *DaemonUpdate
- type DaemonUpdateOne
- func (duo *DaemonUpdateOne) ClearUser() *DaemonUpdateOne
- func (duo *DaemonUpdateOne) Exec(ctx context.Context) error
- func (duo *DaemonUpdateOne) ExecX(ctx context.Context)
- func (duo *DaemonUpdateOne) Mutation() *DaemonMutation
- func (duo *DaemonUpdateOne) Save(ctx context.Context) (*Daemon, error)
- func (duo *DaemonUpdateOne) SaveX(ctx context.Context) *Daemon
- func (duo *DaemonUpdateOne) Select(field string, fields ...string) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) SetEnable(b bool) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) SetNillableEnable(b *bool) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) SetNillablePath(s *string) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) SetNillableUserID(id *int) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) SetPath(s string) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) SetUser(u *User) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) SetUserID(id int) *DaemonUpdateOne
- func (duo *DaemonUpdateOne) Where(ps ...predicate.Daemon) *DaemonUpdateOne
- type Daemons
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type Node
- type NodeClient
- func (c *NodeClient) Create() *NodeCreate
- func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
- func (c *NodeClient) Delete() *NodeDelete
- func (c *NodeClient) DeleteOne(n *Node) *NodeDeleteOne
- func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
- func (c *NodeClient) Get(ctx context.Context, id int) (*Node, error)
- func (c *NodeClient) GetX(ctx context.Context, id int) *Node
- func (c *NodeClient) Hooks() []Hook
- func (c *NodeClient) Intercept(interceptors ...Interceptor)
- func (c *NodeClient) Interceptors() []Interceptor
- func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
- func (c *NodeClient) Query() *NodeQuery
- func (c *NodeClient) QuerySubscribe(n *Node) *SubscribeQuery
- func (c *NodeClient) Update() *NodeUpdate
- func (c *NodeClient) UpdateOne(n *Node) *NodeUpdateOne
- func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
- func (c *NodeClient) Use(hooks ...Hook)
- type NodeCreate
- func (nc *NodeCreate) Exec(ctx context.Context) error
- func (nc *NodeCreate) ExecX(ctx context.Context)
- func (nc *NodeCreate) Mutation() *NodeMutation
- func (nc *NodeCreate) Save(ctx context.Context) (*Node, error)
- func (nc *NodeCreate) SaveX(ctx context.Context) *Node
- func (nc *NodeCreate) SetGroup(s string) *NodeCreate
- func (nc *NodeCreate) SetName(s string) *NodeCreate
- func (nc *NodeCreate) SetNillableSubscribeID(id *int) *NodeCreate
- func (nc *NodeCreate) SetSubscribe(s *Subscribe) *NodeCreate
- func (nc *NodeCreate) SetSubscribeID(id int) *NodeCreate
- type NodeCreateBulk
- type NodeDelete
- type NodeDeleteOne
- type NodeEdges
- type NodeGroupBy
- func (ngb *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
- func (s *NodeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeGroupBy) BoolX(ctx context.Context) bool
- func (s *NodeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *NodeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeGroupBy) Float64X(ctx context.Context) float64
- func (s *NodeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *NodeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *NodeGroupBy) IntX(ctx context.Context) int
- func (s *NodeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *NodeGroupBy) IntsX(ctx context.Context) []int
- func (ngb *NodeGroupBy) Scan(ctx context.Context, v any) error
- func (s *NodeGroupBy) ScanX(ctx context.Context, v any)
- func (s *NodeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *NodeGroupBy) StringX(ctx context.Context) string
- func (s *NodeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *NodeGroupBy) StringsX(ctx context.Context) []string
- type NodeMutation
- func (m *NodeMutation) AddField(name string, value ent.Value) error
- func (m *NodeMutation) AddedEdges() []string
- func (m *NodeMutation) AddedField(name string) (ent.Value, bool)
- func (m *NodeMutation) AddedFields() []string
- func (m *NodeMutation) AddedIDs(name string) []ent.Value
- func (m *NodeMutation) ClearEdge(name string) error
- func (m *NodeMutation) ClearField(name string) error
- func (m *NodeMutation) ClearSubscribe()
- func (m *NodeMutation) ClearedEdges() []string
- func (m *NodeMutation) ClearedFields() []string
- func (m NodeMutation) Client() *Client
- func (m *NodeMutation) EdgeCleared(name string) bool
- func (m *NodeMutation) Field(name string) (ent.Value, bool)
- func (m *NodeMutation) FieldCleared(name string) bool
- func (m *NodeMutation) Fields() []string
- func (m *NodeMutation) Group() (r string, exists bool)
- func (m *NodeMutation) ID() (id int, exists bool)
- func (m *NodeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *NodeMutation) Name() (r string, exists bool)
- func (m *NodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NodeMutation) OldGroup(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NodeMutation) Op() Op
- func (m *NodeMutation) RemovedEdges() []string
- func (m *NodeMutation) RemovedIDs(name string) []ent.Value
- func (m *NodeMutation) ResetEdge(name string) error
- func (m *NodeMutation) ResetField(name string) error
- func (m *NodeMutation) ResetGroup()
- func (m *NodeMutation) ResetName()
- func (m *NodeMutation) ResetSubscribe()
- func (m *NodeMutation) SetField(name string, value ent.Value) error
- func (m *NodeMutation) SetGroup(s string)
- func (m *NodeMutation) SetName(s string)
- func (m *NodeMutation) SetOp(op Op)
- func (m *NodeMutation) SetSubscribeID(id int)
- func (m *NodeMutation) SubscribeCleared() bool
- func (m *NodeMutation) SubscribeID() (id int, exists bool)
- func (m *NodeMutation) SubscribeIDs() (ids []int)
- func (m NodeMutation) Tx() (*Tx, error)
- func (m *NodeMutation) Type() string
- func (m *NodeMutation) Where(ps ...predicate.Node)
- func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
- type NodeQuery
- func (nq *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (nq *NodeQuery) All(ctx context.Context) ([]*Node, error)
- func (nq *NodeQuery) AllX(ctx context.Context) []*Node
- func (nq *NodeQuery) Clone() *NodeQuery
- func (nq *NodeQuery) Count(ctx context.Context) (int, error)
- func (nq *NodeQuery) CountX(ctx context.Context) int
- func (nq *NodeQuery) Exist(ctx context.Context) (bool, error)
- func (nq *NodeQuery) ExistX(ctx context.Context) bool
- func (nq *NodeQuery) First(ctx context.Context) (*Node, error)
- func (nq *NodeQuery) FirstID(ctx context.Context) (id int, err error)
- func (nq *NodeQuery) FirstIDX(ctx context.Context) int
- func (nq *NodeQuery) FirstX(ctx context.Context) *Node
- func (nq *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
- func (nq *NodeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (nq *NodeQuery) IDsX(ctx context.Context) []int
- func (nq *NodeQuery) Limit(limit int) *NodeQuery
- func (nq *NodeQuery) Offset(offset int) *NodeQuery
- func (nq *NodeQuery) Only(ctx context.Context) (*Node, error)
- func (nq *NodeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (nq *NodeQuery) OnlyIDX(ctx context.Context) int
- func (nq *NodeQuery) OnlyX(ctx context.Context) *Node
- func (nq *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
- func (nq *NodeQuery) QuerySubscribe() *SubscribeQuery
- func (nq *NodeQuery) Select(fields ...string) *NodeSelect
- func (nq *NodeQuery) Unique(unique bool) *NodeQuery
- func (nq *NodeQuery) Where(ps ...predicate.Node) *NodeQuery
- func (nq *NodeQuery) WithSubscribe(opts ...func(*SubscribeQuery)) *NodeQuery
- type NodeSelect
- func (ns *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
- func (s *NodeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *NodeSelect) BoolX(ctx context.Context) bool
- func (s *NodeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *NodeSelect) BoolsX(ctx context.Context) []bool
- func (s *NodeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *NodeSelect) Float64X(ctx context.Context) float64
- func (s *NodeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *NodeSelect) Float64sX(ctx context.Context) []float64
- func (s *NodeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *NodeSelect) IntX(ctx context.Context) int
- func (s *NodeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *NodeSelect) IntsX(ctx context.Context) []int
- func (ns *NodeSelect) Scan(ctx context.Context, v any) error
- func (s *NodeSelect) ScanX(ctx context.Context, v any)
- func (s *NodeSelect) String(ctx context.Context) (_ string, err error)
- func (s *NodeSelect) StringX(ctx context.Context) string
- func (s *NodeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *NodeSelect) StringsX(ctx context.Context) []string
- type NodeUpdate
- func (nu *NodeUpdate) ClearSubscribe() *NodeUpdate
- func (nu *NodeUpdate) Exec(ctx context.Context) error
- func (nu *NodeUpdate) ExecX(ctx context.Context)
- func (nu *NodeUpdate) Mutation() *NodeMutation
- func (nu *NodeUpdate) Save(ctx context.Context) (int, error)
- func (nu *NodeUpdate) SaveX(ctx context.Context) int
- func (nu *NodeUpdate) SetGroup(s string) *NodeUpdate
- func (nu *NodeUpdate) SetName(s string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableGroup(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableName(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableSubscribeID(id *int) *NodeUpdate
- func (nu *NodeUpdate) SetSubscribe(s *Subscribe) *NodeUpdate
- func (nu *NodeUpdate) SetSubscribeID(id int) *NodeUpdate
- func (nu *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
- type NodeUpdateOne
- func (nuo *NodeUpdateOne) ClearSubscribe() *NodeUpdateOne
- func (nuo *NodeUpdateOne) Exec(ctx context.Context) error
- func (nuo *NodeUpdateOne) ExecX(ctx context.Context)
- func (nuo *NodeUpdateOne) Mutation() *NodeMutation
- func (nuo *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
- func (nuo *NodeUpdateOne) SaveX(ctx context.Context) *Node
- func (nuo *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetGroup(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetName(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableGroup(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableName(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableSubscribeID(id *int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetSubscribe(s *Subscribe) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetSubscribeID(id int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
- type Nodes
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Provider
- type ProviderClient
- func (c *ProviderClient) Create() *ProviderCreate
- func (c *ProviderClient) CreateBulk(builders ...*ProviderCreate) *ProviderCreateBulk
- func (c *ProviderClient) Delete() *ProviderDelete
- func (c *ProviderClient) DeleteOne(pr *Provider) *ProviderDeleteOne
- func (c *ProviderClient) DeleteOneID(id int) *ProviderDeleteOne
- func (c *ProviderClient) Get(ctx context.Context, id int) (*Provider, error)
- func (c *ProviderClient) GetX(ctx context.Context, id int) *Provider
- func (c *ProviderClient) Hooks() []Hook
- func (c *ProviderClient) Intercept(interceptors ...Interceptor)
- func (c *ProviderClient) Interceptors() []Interceptor
- func (c *ProviderClient) MapCreateBulk(slice any, setFunc func(*ProviderCreate, int)) *ProviderCreateBulk
- func (c *ProviderClient) Query() *ProviderQuery
- func (c *ProviderClient) QuerySubscribes(pr *Provider) *SubscribeQuery
- func (c *ProviderClient) QueryUser(pr *Provider) *UserQuery
- func (c *ProviderClient) Update() *ProviderUpdate
- func (c *ProviderClient) UpdateOne(pr *Provider) *ProviderUpdateOne
- func (c *ProviderClient) UpdateOneID(id int) *ProviderUpdateOne
- func (c *ProviderClient) Use(hooks ...Hook)
- type ProviderCreate
- func (pc *ProviderCreate) AddSubscribeIDs(ids ...int) *ProviderCreate
- func (pc *ProviderCreate) AddSubscribes(s ...*Subscribe) *ProviderCreate
- func (pc *ProviderCreate) Exec(ctx context.Context) error
- func (pc *ProviderCreate) ExecX(ctx context.Context)
- func (pc *ProviderCreate) Mutation() *ProviderMutation
- func (pc *ProviderCreate) Save(ctx context.Context) (*Provider, error)
- func (pc *ProviderCreate) SaveX(ctx context.Context) *Provider
- func (pc *ProviderCreate) SetName(s string) *ProviderCreate
- func (pc *ProviderCreate) SetNillableUserID(id *int) *ProviderCreate
- func (pc *ProviderCreate) SetPath(s string) *ProviderCreate
- func (pc *ProviderCreate) SetUser(u *User) *ProviderCreate
- func (pc *ProviderCreate) SetUserID(id int) *ProviderCreate
- func (pc *ProviderCreate) SetVersion(s string) *ProviderCreate
- type ProviderCreateBulk
- type ProviderDelete
- type ProviderDeleteOne
- type ProviderEdges
- type ProviderGroupBy
- func (pgb *ProviderGroupBy) Aggregate(fns ...AggregateFunc) *ProviderGroupBy
- func (s *ProviderGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProviderGroupBy) BoolX(ctx context.Context) bool
- func (s *ProviderGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ProviderGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ProviderGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProviderGroupBy) Float64X(ctx context.Context) float64
- func (s *ProviderGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProviderGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ProviderGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ProviderGroupBy) IntX(ctx context.Context) int
- func (s *ProviderGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ProviderGroupBy) IntsX(ctx context.Context) []int
- func (pgb *ProviderGroupBy) Scan(ctx context.Context, v any) error
- func (s *ProviderGroupBy) ScanX(ctx context.Context, v any)
- func (s *ProviderGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ProviderGroupBy) StringX(ctx context.Context) string
- func (s *ProviderGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ProviderGroupBy) StringsX(ctx context.Context) []string
- type ProviderMutation
- func (m *ProviderMutation) AddField(name string, value ent.Value) error
- func (m *ProviderMutation) AddSubscribeIDs(ids ...int)
- func (m *ProviderMutation) AddedEdges() []string
- func (m *ProviderMutation) AddedField(name string) (ent.Value, bool)
- func (m *ProviderMutation) AddedFields() []string
- func (m *ProviderMutation) AddedIDs(name string) []ent.Value
- func (m *ProviderMutation) ClearEdge(name string) error
- func (m *ProviderMutation) ClearField(name string) error
- func (m *ProviderMutation) ClearSubscribes()
- func (m *ProviderMutation) ClearUser()
- func (m *ProviderMutation) ClearedEdges() []string
- func (m *ProviderMutation) ClearedFields() []string
- func (m ProviderMutation) Client() *Client
- func (m *ProviderMutation) EdgeCleared(name string) bool
- func (m *ProviderMutation) Field(name string) (ent.Value, bool)
- func (m *ProviderMutation) FieldCleared(name string) bool
- func (m *ProviderMutation) Fields() []string
- func (m *ProviderMutation) ID() (id int, exists bool)
- func (m *ProviderMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ProviderMutation) Name() (r string, exists bool)
- func (m *ProviderMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ProviderMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) OldPath(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) OldVersion(ctx context.Context) (v string, err error)
- func (m *ProviderMutation) Op() Op
- func (m *ProviderMutation) Path() (r string, exists bool)
- func (m *ProviderMutation) RemoveSubscribeIDs(ids ...int)
- func (m *ProviderMutation) RemovedEdges() []string
- func (m *ProviderMutation) RemovedIDs(name string) []ent.Value
- func (m *ProviderMutation) RemovedSubscribesIDs() (ids []int)
- func (m *ProviderMutation) ResetEdge(name string) error
- func (m *ProviderMutation) ResetField(name string) error
- func (m *ProviderMutation) ResetName()
- func (m *ProviderMutation) ResetPath()
- func (m *ProviderMutation) ResetSubscribes()
- func (m *ProviderMutation) ResetUser()
- func (m *ProviderMutation) ResetVersion()
- func (m *ProviderMutation) SetField(name string, value ent.Value) error
- func (m *ProviderMutation) SetName(s string)
- func (m *ProviderMutation) SetOp(op Op)
- func (m *ProviderMutation) SetPath(s string)
- func (m *ProviderMutation) SetUserID(id int)
- func (m *ProviderMutation) SetVersion(s string)
- func (m *ProviderMutation) SubscribesCleared() bool
- func (m *ProviderMutation) SubscribesIDs() (ids []int)
- func (m ProviderMutation) Tx() (*Tx, error)
- func (m *ProviderMutation) Type() string
- func (m *ProviderMutation) UserCleared() bool
- func (m *ProviderMutation) UserID() (id int, exists bool)
- func (m *ProviderMutation) UserIDs() (ids []int)
- func (m *ProviderMutation) Version() (r string, exists bool)
- func (m *ProviderMutation) Where(ps ...predicate.Provider)
- func (m *ProviderMutation) WhereP(ps ...func(*sql.Selector))
- type ProviderQuery
- func (pq *ProviderQuery) Aggregate(fns ...AggregateFunc) *ProviderSelect
- func (pq *ProviderQuery) All(ctx context.Context) ([]*Provider, error)
- func (pq *ProviderQuery) AllX(ctx context.Context) []*Provider
- func (pq *ProviderQuery) Clone() *ProviderQuery
- func (pq *ProviderQuery) Count(ctx context.Context) (int, error)
- func (pq *ProviderQuery) CountX(ctx context.Context) int
- func (pq *ProviderQuery) Exist(ctx context.Context) (bool, error)
- func (pq *ProviderQuery) ExistX(ctx context.Context) bool
- func (pq *ProviderQuery) First(ctx context.Context) (*Provider, error)
- func (pq *ProviderQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *ProviderQuery) FirstIDX(ctx context.Context) int
- func (pq *ProviderQuery) FirstX(ctx context.Context) *Provider
- func (pq *ProviderQuery) GroupBy(field string, fields ...string) *ProviderGroupBy
- func (pq *ProviderQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *ProviderQuery) IDsX(ctx context.Context) []int
- func (pq *ProviderQuery) Limit(limit int) *ProviderQuery
- func (pq *ProviderQuery) Offset(offset int) *ProviderQuery
- func (pq *ProviderQuery) Only(ctx context.Context) (*Provider, error)
- func (pq *ProviderQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *ProviderQuery) OnlyIDX(ctx context.Context) int
- func (pq *ProviderQuery) OnlyX(ctx context.Context) *Provider
- func (pq *ProviderQuery) Order(o ...provider.OrderOption) *ProviderQuery
- func (pq *ProviderQuery) QuerySubscribes() *SubscribeQuery
- func (pq *ProviderQuery) QueryUser() *UserQuery
- func (pq *ProviderQuery) Select(fields ...string) *ProviderSelect
- func (pq *ProviderQuery) Unique(unique bool) *ProviderQuery
- func (pq *ProviderQuery) Where(ps ...predicate.Provider) *ProviderQuery
- func (pq *ProviderQuery) WithSubscribes(opts ...func(*SubscribeQuery)) *ProviderQuery
- func (pq *ProviderQuery) WithUser(opts ...func(*UserQuery)) *ProviderQuery
- type ProviderSelect
- func (ps *ProviderSelect) Aggregate(fns ...AggregateFunc) *ProviderSelect
- func (s *ProviderSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ProviderSelect) BoolX(ctx context.Context) bool
- func (s *ProviderSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ProviderSelect) BoolsX(ctx context.Context) []bool
- func (s *ProviderSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ProviderSelect) Float64X(ctx context.Context) float64
- func (s *ProviderSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ProviderSelect) Float64sX(ctx context.Context) []float64
- func (s *ProviderSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ProviderSelect) IntX(ctx context.Context) int
- func (s *ProviderSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ProviderSelect) IntsX(ctx context.Context) []int
- func (ps *ProviderSelect) Scan(ctx context.Context, v any) error
- func (s *ProviderSelect) ScanX(ctx context.Context, v any)
- func (s *ProviderSelect) String(ctx context.Context) (_ string, err error)
- func (s *ProviderSelect) StringX(ctx context.Context) string
- func (s *ProviderSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ProviderSelect) StringsX(ctx context.Context) []string
- type ProviderUpdate
- func (pu *ProviderUpdate) AddSubscribeIDs(ids ...int) *ProviderUpdate
- func (pu *ProviderUpdate) AddSubscribes(s ...*Subscribe) *ProviderUpdate
- func (pu *ProviderUpdate) ClearSubscribes() *ProviderUpdate
- func (pu *ProviderUpdate) ClearUser() *ProviderUpdate
- func (pu *ProviderUpdate) Exec(ctx context.Context) error
- func (pu *ProviderUpdate) ExecX(ctx context.Context)
- func (pu *ProviderUpdate) Mutation() *ProviderMutation
- func (pu *ProviderUpdate) RemoveSubscribeIDs(ids ...int) *ProviderUpdate
- func (pu *ProviderUpdate) RemoveSubscribes(s ...*Subscribe) *ProviderUpdate
- func (pu *ProviderUpdate) Save(ctx context.Context) (int, error)
- func (pu *ProviderUpdate) SaveX(ctx context.Context) int
- func (pu *ProviderUpdate) SetName(s string) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableName(s *string) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillablePath(s *string) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableUserID(id *int) *ProviderUpdate
- func (pu *ProviderUpdate) SetNillableVersion(s *string) *ProviderUpdate
- func (pu *ProviderUpdate) SetPath(s string) *ProviderUpdate
- func (pu *ProviderUpdate) SetUser(u *User) *ProviderUpdate
- func (pu *ProviderUpdate) SetUserID(id int) *ProviderUpdate
- func (pu *ProviderUpdate) SetVersion(s string) *ProviderUpdate
- func (pu *ProviderUpdate) Where(ps ...predicate.Provider) *ProviderUpdate
- type ProviderUpdateOne
- func (puo *ProviderUpdateOne) AddSubscribeIDs(ids ...int) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) AddSubscribes(s ...*Subscribe) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) ClearSubscribes() *ProviderUpdateOne
- func (puo *ProviderUpdateOne) ClearUser() *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Exec(ctx context.Context) error
- func (puo *ProviderUpdateOne) ExecX(ctx context.Context)
- func (puo *ProviderUpdateOne) Mutation() *ProviderMutation
- func (puo *ProviderUpdateOne) RemoveSubscribeIDs(ids ...int) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) RemoveSubscribes(s ...*Subscribe) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Save(ctx context.Context) (*Provider, error)
- func (puo *ProviderUpdateOne) SaveX(ctx context.Context) *Provider
- func (puo *ProviderUpdateOne) Select(field string, fields ...string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetName(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableName(s *string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillablePath(s *string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableUserID(id *int) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetNillableVersion(s *string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetPath(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetUser(u *User) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetUserID(id int) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) SetVersion(s string) *ProviderUpdateOne
- func (puo *ProviderUpdateOne) Where(ps ...predicate.Provider) *ProviderUpdateOne
- type Providers
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Subscribe
- func (s *Subscribe) QueryNodes() *NodeQuery
- func (s *Subscribe) QueryProvider() *ProviderQuery
- func (s *Subscribe) QueryUser() *UserQuery
- func (s *Subscribe) String() string
- func (s *Subscribe) Unwrap() *Subscribe
- func (s *Subscribe) Update() *SubscribeUpdateOne
- func (s *Subscribe) Value(name string) (ent.Value, error)
- type SubscribeClient
- func (c *SubscribeClient) Create() *SubscribeCreate
- func (c *SubscribeClient) CreateBulk(builders ...*SubscribeCreate) *SubscribeCreateBulk
- func (c *SubscribeClient) Delete() *SubscribeDelete
- func (c *SubscribeClient) DeleteOne(s *Subscribe) *SubscribeDeleteOne
- func (c *SubscribeClient) DeleteOneID(id int) *SubscribeDeleteOne
- func (c *SubscribeClient) Get(ctx context.Context, id int) (*Subscribe, error)
- func (c *SubscribeClient) GetX(ctx context.Context, id int) *Subscribe
- func (c *SubscribeClient) Hooks() []Hook
- func (c *SubscribeClient) Intercept(interceptors ...Interceptor)
- func (c *SubscribeClient) Interceptors() []Interceptor
- func (c *SubscribeClient) MapCreateBulk(slice any, setFunc func(*SubscribeCreate, int)) *SubscribeCreateBulk
- func (c *SubscribeClient) Query() *SubscribeQuery
- func (c *SubscribeClient) QueryNodes(s *Subscribe) *NodeQuery
- func (c *SubscribeClient) QueryProvider(s *Subscribe) *ProviderQuery
- func (c *SubscribeClient) QueryUser(s *Subscribe) *UserQuery
- func (c *SubscribeClient) Update() *SubscribeUpdate
- func (c *SubscribeClient) UpdateOne(s *Subscribe) *SubscribeUpdateOne
- func (c *SubscribeClient) UpdateOneID(id int) *SubscribeUpdateOne
- func (c *SubscribeClient) Use(hooks ...Hook)
- type SubscribeCreate
- func (sc *SubscribeCreate) AddNodeIDs(ids ...int) *SubscribeCreate
- func (sc *SubscribeCreate) AddNodes(n ...*Node) *SubscribeCreate
- func (sc *SubscribeCreate) Exec(ctx context.Context) error
- func (sc *SubscribeCreate) ExecX(ctx context.Context)
- func (sc *SubscribeCreate) Mutation() *SubscribeMutation
- func (sc *SubscribeCreate) Save(ctx context.Context) (*Subscribe, error)
- func (sc *SubscribeCreate) SaveX(ctx context.Context) *Subscribe
- func (sc *SubscribeCreate) SetConf(s string) *SubscribeCreate
- func (sc *SubscribeCreate) SetLink(s string) *SubscribeCreate
- func (sc *SubscribeCreate) SetName(s string) *SubscribeCreate
- func (sc *SubscribeCreate) SetNillableLink(s *string) *SubscribeCreate
- func (sc *SubscribeCreate) SetNillableProviderID(id *int) *SubscribeCreate
- func (sc *SubscribeCreate) SetNillableUserID(id *int) *SubscribeCreate
- func (sc *SubscribeCreate) SetProvider(p *Provider) *SubscribeCreate
- func (sc *SubscribeCreate) SetProviderID(id int) *SubscribeCreate
- func (sc *SubscribeCreate) SetUser(u *User) *SubscribeCreate
- func (sc *SubscribeCreate) SetUserID(id int) *SubscribeCreate
- type SubscribeCreateBulk
- type SubscribeDelete
- type SubscribeDeleteOne
- type SubscribeEdges
- type SubscribeGroupBy
- func (sgb *SubscribeGroupBy) Aggregate(fns ...AggregateFunc) *SubscribeGroupBy
- func (s *SubscribeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscribeGroupBy) BoolX(ctx context.Context) bool
- func (s *SubscribeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscribeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *SubscribeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscribeGroupBy) Float64X(ctx context.Context) float64
- func (s *SubscribeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscribeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *SubscribeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *SubscribeGroupBy) IntX(ctx context.Context) int
- func (s *SubscribeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *SubscribeGroupBy) IntsX(ctx context.Context) []int
- func (sgb *SubscribeGroupBy) Scan(ctx context.Context, v any) error
- func (s *SubscribeGroupBy) ScanX(ctx context.Context, v any)
- func (s *SubscribeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *SubscribeGroupBy) StringX(ctx context.Context) string
- func (s *SubscribeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *SubscribeGroupBy) StringsX(ctx context.Context) []string
- type SubscribeMutation
- func (m *SubscribeMutation) AddField(name string, value ent.Value) error
- func (m *SubscribeMutation) AddNodeIDs(ids ...int)
- func (m *SubscribeMutation) AddedEdges() []string
- func (m *SubscribeMutation) AddedField(name string) (ent.Value, bool)
- func (m *SubscribeMutation) AddedFields() []string
- func (m *SubscribeMutation) AddedIDs(name string) []ent.Value
- func (m *SubscribeMutation) ClearEdge(name string) error
- func (m *SubscribeMutation) ClearField(name string) error
- func (m *SubscribeMutation) ClearLink()
- func (m *SubscribeMutation) ClearNodes()
- func (m *SubscribeMutation) ClearProvider()
- func (m *SubscribeMutation) ClearUser()
- func (m *SubscribeMutation) ClearedEdges() []string
- func (m *SubscribeMutation) ClearedFields() []string
- func (m SubscribeMutation) Client() *Client
- func (m *SubscribeMutation) Conf() (r string, exists bool)
- func (m *SubscribeMutation) EdgeCleared(name string) bool
- func (m *SubscribeMutation) Field(name string) (ent.Value, bool)
- func (m *SubscribeMutation) FieldCleared(name string) bool
- func (m *SubscribeMutation) Fields() []string
- func (m *SubscribeMutation) ID() (id int, exists bool)
- func (m *SubscribeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *SubscribeMutation) Link() (r string, exists bool)
- func (m *SubscribeMutation) LinkCleared() bool
- func (m *SubscribeMutation) Name() (r string, exists bool)
- func (m *SubscribeMutation) NodesCleared() bool
- func (m *SubscribeMutation) NodesIDs() (ids []int)
- func (m *SubscribeMutation) OldConf(ctx context.Context) (v string, err error)
- func (m *SubscribeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *SubscribeMutation) OldLink(ctx context.Context) (v string, err error)
- func (m *SubscribeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *SubscribeMutation) Op() Op
- func (m *SubscribeMutation) ProviderCleared() bool
- func (m *SubscribeMutation) ProviderID() (id int, exists bool)
- func (m *SubscribeMutation) ProviderIDs() (ids []int)
- func (m *SubscribeMutation) RemoveNodeIDs(ids ...int)
- func (m *SubscribeMutation) RemovedEdges() []string
- func (m *SubscribeMutation) RemovedIDs(name string) []ent.Value
- func (m *SubscribeMutation) RemovedNodesIDs() (ids []int)
- func (m *SubscribeMutation) ResetConf()
- func (m *SubscribeMutation) ResetEdge(name string) error
- func (m *SubscribeMutation) ResetField(name string) error
- func (m *SubscribeMutation) ResetLink()
- func (m *SubscribeMutation) ResetName()
- func (m *SubscribeMutation) ResetNodes()
- func (m *SubscribeMutation) ResetProvider()
- func (m *SubscribeMutation) ResetUser()
- func (m *SubscribeMutation) SetConf(s string)
- func (m *SubscribeMutation) SetField(name string, value ent.Value) error
- func (m *SubscribeMutation) SetLink(s string)
- func (m *SubscribeMutation) SetName(s string)
- func (m *SubscribeMutation) SetOp(op Op)
- func (m *SubscribeMutation) SetProviderID(id int)
- func (m *SubscribeMutation) SetUserID(id int)
- func (m SubscribeMutation) Tx() (*Tx, error)
- func (m *SubscribeMutation) Type() string
- func (m *SubscribeMutation) UserCleared() bool
- func (m *SubscribeMutation) UserID() (id int, exists bool)
- func (m *SubscribeMutation) UserIDs() (ids []int)
- func (m *SubscribeMutation) Where(ps ...predicate.Subscribe)
- func (m *SubscribeMutation) WhereP(ps ...func(*sql.Selector))
- type SubscribeQuery
- func (sq *SubscribeQuery) Aggregate(fns ...AggregateFunc) *SubscribeSelect
- func (sq *SubscribeQuery) All(ctx context.Context) ([]*Subscribe, error)
- func (sq *SubscribeQuery) AllX(ctx context.Context) []*Subscribe
- func (sq *SubscribeQuery) Clone() *SubscribeQuery
- func (sq *SubscribeQuery) Count(ctx context.Context) (int, error)
- func (sq *SubscribeQuery) CountX(ctx context.Context) int
- func (sq *SubscribeQuery) Exist(ctx context.Context) (bool, error)
- func (sq *SubscribeQuery) ExistX(ctx context.Context) bool
- func (sq *SubscribeQuery) First(ctx context.Context) (*Subscribe, error)
- func (sq *SubscribeQuery) FirstID(ctx context.Context) (id int, err error)
- func (sq *SubscribeQuery) FirstIDX(ctx context.Context) int
- func (sq *SubscribeQuery) FirstX(ctx context.Context) *Subscribe
- func (sq *SubscribeQuery) GroupBy(field string, fields ...string) *SubscribeGroupBy
- func (sq *SubscribeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (sq *SubscribeQuery) IDsX(ctx context.Context) []int
- func (sq *SubscribeQuery) Limit(limit int) *SubscribeQuery
- func (sq *SubscribeQuery) Offset(offset int) *SubscribeQuery
- func (sq *SubscribeQuery) Only(ctx context.Context) (*Subscribe, error)
- func (sq *SubscribeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (sq *SubscribeQuery) OnlyIDX(ctx context.Context) int
- func (sq *SubscribeQuery) OnlyX(ctx context.Context) *Subscribe
- func (sq *SubscribeQuery) Order(o ...subscribe.OrderOption) *SubscribeQuery
- func (sq *SubscribeQuery) QueryNodes() *NodeQuery
- func (sq *SubscribeQuery) QueryProvider() *ProviderQuery
- func (sq *SubscribeQuery) QueryUser() *UserQuery
- func (sq *SubscribeQuery) Select(fields ...string) *SubscribeSelect
- func (sq *SubscribeQuery) Unique(unique bool) *SubscribeQuery
- func (sq *SubscribeQuery) Where(ps ...predicate.Subscribe) *SubscribeQuery
- func (sq *SubscribeQuery) WithNodes(opts ...func(*NodeQuery)) *SubscribeQuery
- func (sq *SubscribeQuery) WithProvider(opts ...func(*ProviderQuery)) *SubscribeQuery
- func (sq *SubscribeQuery) WithUser(opts ...func(*UserQuery)) *SubscribeQuery
- type SubscribeSelect
- func (ss *SubscribeSelect) Aggregate(fns ...AggregateFunc) *SubscribeSelect
- func (s *SubscribeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *SubscribeSelect) BoolX(ctx context.Context) bool
- func (s *SubscribeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *SubscribeSelect) BoolsX(ctx context.Context) []bool
- func (s *SubscribeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *SubscribeSelect) Float64X(ctx context.Context) float64
- func (s *SubscribeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *SubscribeSelect) Float64sX(ctx context.Context) []float64
- func (s *SubscribeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *SubscribeSelect) IntX(ctx context.Context) int
- func (s *SubscribeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *SubscribeSelect) IntsX(ctx context.Context) []int
- func (ss *SubscribeSelect) Scan(ctx context.Context, v any) error
- func (s *SubscribeSelect) ScanX(ctx context.Context, v any)
- func (s *SubscribeSelect) String(ctx context.Context) (_ string, err error)
- func (s *SubscribeSelect) StringX(ctx context.Context) string
- func (s *SubscribeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *SubscribeSelect) StringsX(ctx context.Context) []string
- type SubscribeUpdate
- func (su *SubscribeUpdate) AddNodeIDs(ids ...int) *SubscribeUpdate
- func (su *SubscribeUpdate) AddNodes(n ...*Node) *SubscribeUpdate
- func (su *SubscribeUpdate) ClearLink() *SubscribeUpdate
- func (su *SubscribeUpdate) ClearNodes() *SubscribeUpdate
- func (su *SubscribeUpdate) ClearProvider() *SubscribeUpdate
- func (su *SubscribeUpdate) ClearUser() *SubscribeUpdate
- func (su *SubscribeUpdate) Exec(ctx context.Context) error
- func (su *SubscribeUpdate) ExecX(ctx context.Context)
- func (su *SubscribeUpdate) Mutation() *SubscribeMutation
- func (su *SubscribeUpdate) RemoveNodeIDs(ids ...int) *SubscribeUpdate
- func (su *SubscribeUpdate) RemoveNodes(n ...*Node) *SubscribeUpdate
- func (su *SubscribeUpdate) Save(ctx context.Context) (int, error)
- func (su *SubscribeUpdate) SaveX(ctx context.Context) int
- func (su *SubscribeUpdate) SetConf(s string) *SubscribeUpdate
- func (su *SubscribeUpdate) SetLink(s string) *SubscribeUpdate
- func (su *SubscribeUpdate) SetName(s string) *SubscribeUpdate
- func (su *SubscribeUpdate) SetNillableConf(s *string) *SubscribeUpdate
- func (su *SubscribeUpdate) SetNillableLink(s *string) *SubscribeUpdate
- func (su *SubscribeUpdate) SetNillableName(s *string) *SubscribeUpdate
- func (su *SubscribeUpdate) SetNillableProviderID(id *int) *SubscribeUpdate
- func (su *SubscribeUpdate) SetNillableUserID(id *int) *SubscribeUpdate
- func (su *SubscribeUpdate) SetProvider(p *Provider) *SubscribeUpdate
- func (su *SubscribeUpdate) SetProviderID(id int) *SubscribeUpdate
- func (su *SubscribeUpdate) SetUser(u *User) *SubscribeUpdate
- func (su *SubscribeUpdate) SetUserID(id int) *SubscribeUpdate
- func (su *SubscribeUpdate) Where(ps ...predicate.Subscribe) *SubscribeUpdate
- type SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) AddNodeIDs(ids ...int) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) AddNodes(n ...*Node) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) ClearLink() *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) ClearNodes() *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) ClearProvider() *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) ClearUser() *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) Exec(ctx context.Context) error
- func (suo *SubscribeUpdateOne) ExecX(ctx context.Context)
- func (suo *SubscribeUpdateOne) Mutation() *SubscribeMutation
- func (suo *SubscribeUpdateOne) RemoveNodeIDs(ids ...int) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) RemoveNodes(n ...*Node) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) Save(ctx context.Context) (*Subscribe, error)
- func (suo *SubscribeUpdateOne) SaveX(ctx context.Context) *Subscribe
- func (suo *SubscribeUpdateOne) Select(field string, fields ...string) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetConf(s string) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetLink(s string) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetName(s string) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetNillableConf(s *string) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetNillableLink(s *string) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetNillableName(s *string) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetNillableProviderID(id *int) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetNillableUserID(id *int) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetProvider(p *Provider) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetProviderID(id int) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetUser(u *User) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) SetUserID(id int) *SubscribeUpdateOne
- func (suo *SubscribeUpdateOne) Where(ps ...predicate.Subscribe) *SubscribeUpdateOne
- type Subscribes
- type TraverseFunc
- type Traverser
- type Tx
- type User
- type UserClient
- func (c *UserClient) Create() *UserCreate
- func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
- func (c *UserClient) Delete() *UserDelete
- func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
- func (c *UserClient) DeleteOneID(id int) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id int) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id int) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) MapCreateBulk(slice any, setFunc func(*UserCreate, int)) *UserCreateBulk
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) QueryDaemon(u *User) *DaemonQuery
- func (c *UserClient) QueryProvider(u *User) *ProviderQuery
- func (c *UserClient) QuerySubscribe(u *User) *SubscribeQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id int) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetActive(b bool) *UserCreate
- func (uc *UserCreate) SetDaemon(d *Daemon) *UserCreate
- func (uc *UserCreate) SetDaemonID(id int) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableActive(b *bool) *UserCreate
- func (uc *UserCreate) SetNillableDaemonID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableProviderID(id *int) *UserCreate
- func (uc *UserCreate) SetNillableSubscribeID(id *int) *UserCreate
- func (uc *UserCreate) SetProvider(p *Provider) *UserCreate
- func (uc *UserCreate) SetProviderID(id int) *UserCreate
- func (uc *UserCreate) SetSubscribe(s *Subscribe) *UserCreate
- func (uc *UserCreate) SetSubscribeID(id int) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- 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) Active() (r bool, exists bool)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearDaemon()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearProvider()
- func (m *UserMutation) ClearSubscribe()
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) DaemonCleared() bool
- func (m *UserMutation) DaemonID() (id int, exists bool)
- func (m *UserMutation) DaemonIDs() (ids []int)
- 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) Name() (r string, exists bool)
- func (m *UserMutation) OldActive(ctx context.Context) (v bool, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) ProviderCleared() bool
- func (m *UserMutation) ProviderID() (id int, exists bool)
- func (m *UserMutation) ProviderIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetActive()
- func (m *UserMutation) ResetDaemon()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetProvider()
- func (m *UserMutation) ResetSubscribe()
- func (m *UserMutation) SetActive(b bool)
- func (m *UserMutation) SetDaemonID(id int)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetProviderID(id int)
- func (m *UserMutation) SetSubscribeID(id int)
- func (m *UserMutation) SubscribeCleared() bool
- func (m *UserMutation) SubscribeID() (id int, exists bool)
- func (m *UserMutation) SubscribeIDs() (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 UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryDaemon() *DaemonQuery
- func (uq *UserQuery) QueryProvider() *ProviderQuery
- func (uq *UserQuery) QuerySubscribe() *SubscribeQuery
- 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) WithDaemon(opts ...func(*DaemonQuery)) *UserQuery
- func (uq *UserQuery) WithProvider(opts ...func(*ProviderQuery)) *UserQuery
- func (uq *UserQuery) WithSubscribe(opts ...func(*SubscribeQuery)) *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) ClearDaemon() *UserUpdate
- func (uu *UserUpdate) ClearProvider() *UserUpdate
- func (uu *UserUpdate) ClearSubscribe() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetActive(b bool) *UserUpdate
- func (uu *UserUpdate) SetDaemon(d *Daemon) *UserUpdate
- func (uu *UserUpdate) SetDaemonID(id int) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableActive(b *bool) *UserUpdate
- func (uu *UserUpdate) SetNillableDaemonID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableProviderID(id *int) *UserUpdate
- func (uu *UserUpdate) SetNillableSubscribeID(id *int) *UserUpdate
- func (uu *UserUpdate) SetProvider(p *Provider) *UserUpdate
- func (uu *UserUpdate) SetProviderID(id int) *UserUpdate
- func (uu *UserUpdate) SetSubscribe(s *Subscribe) *UserUpdate
- func (uu *UserUpdate) SetSubscribeID(id int) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) ClearDaemon() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearProvider() *UserUpdateOne
- func (uuo *UserUpdateOne) ClearSubscribe() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetActive(b bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDaemon(d *Daemon) *UserUpdateOne
- func (uuo *UserUpdateOne) SetDaemonID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableActive(b *bool) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableDaemonID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableProviderID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableSubscribeID(id *int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProvider(p *Provider) *UserUpdateOne
- func (uuo *UserUpdateOne) SetProviderID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSubscribe(s *Subscribe) *UserUpdateOne
- func (uuo *UserUpdateOne) SetSubscribeID(id int) *UserUpdateOne
- func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
- type Users
- type ValidationError
- type Value
Constants ¶
const ( // Operation types. OpCreate = ent.OpCreate OpDelete = ent.OpDelete OpDeleteOne = ent.OpDeleteOne OpUpdate = ent.OpUpdate OpUpdateOne = ent.OpUpdateOne // Node types. TypeDaemon = "Daemon" TypeNode = "Node" TypeProvider = "Provider" TypeSubscribe = "Subscribe" TypeUser = "User" )
Variables ¶
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.
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 Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Daemon is the client for interacting with the Daemon builders. Daemon *DaemonClient // Node is the client for interacting with the Node builders. Node *NodeClient // Provider is the client for interacting with the Provider builders. Provider *ProviderClient // Subscribe is the client for interacting with the Subscribe builders. Subscribe *SubscribeClient // 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(). Daemon. Query(). Count(ctx)
func (*Client) Intercept ¶
func (c *Client) Intercept(interceptors ...Interceptor)
Intercept adds the query interceptors to all the entity clients. In order to add interceptors to a specific client, call: `client.Node.Intercept(...)`.
type CommitFunc ¶
The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.
type CommitHook ¶
CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:
hook := func(next ent.Committer) ent.Committer { return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Commit(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type ConstraintError ¶
type ConstraintError struct {
// contains filtered or unexported fields
}
ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.
func (ConstraintError) Error ¶
func (e ConstraintError) Error() string
Error implements the error interface.
func (*ConstraintError) Unwrap ¶
func (e *ConstraintError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
type Daemon ¶
type Daemon struct { // ID of the ent. ID int `json:"id,omitempty"` // Path holds the value of the "path" field. Path string `json:"path,omitempty"` // Enable holds the value of the "enable" field. Enable bool `json:"enable,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the DaemonQuery when eager-loading is set. Edges DaemonEdges `json:"edges"` // contains filtered or unexported fields }
Daemon is the model entity for the Daemon schema.
func (*Daemon) Unwrap ¶
Unwrap unwraps the Daemon 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 (*Daemon) Update ¶
func (d *Daemon) Update() *DaemonUpdateOne
Update returns a builder for updating this Daemon. Note that you need to call Daemon.Unwrap() before calling this method if this Daemon was returned from a transaction, and the transaction was committed or rolled back.
type DaemonClient ¶
type DaemonClient struct {
// contains filtered or unexported fields
}
DaemonClient is a client for the Daemon schema.
func NewDaemonClient ¶
func NewDaemonClient(c config) *DaemonClient
NewDaemonClient returns a client for the Daemon from the given config.
func (*DaemonClient) Create ¶
func (c *DaemonClient) Create() *DaemonCreate
Create returns a builder for creating a Daemon entity.
func (*DaemonClient) CreateBulk ¶
func (c *DaemonClient) CreateBulk(builders ...*DaemonCreate) *DaemonCreateBulk
CreateBulk returns a builder for creating a bulk of Daemon entities.
func (*DaemonClient) Delete ¶
func (c *DaemonClient) Delete() *DaemonDelete
Delete returns a delete builder for Daemon.
func (*DaemonClient) DeleteOne ¶
func (c *DaemonClient) DeleteOne(d *Daemon) *DaemonDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*DaemonClient) DeleteOneID ¶
func (c *DaemonClient) DeleteOneID(id int) *DaemonDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*DaemonClient) GetX ¶
func (c *DaemonClient) GetX(ctx context.Context, id int) *Daemon
GetX is like Get, but panics if an error occurs.
func (*DaemonClient) Intercept ¶
func (c *DaemonClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `daemon.Intercept(f(g(h())))`.
func (*DaemonClient) Interceptors ¶
func (c *DaemonClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*DaemonClient) MapCreateBulk ¶
func (c *DaemonClient) MapCreateBulk(slice any, setFunc func(*DaemonCreate, int)) *DaemonCreateBulk
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 (*DaemonClient) Query ¶
func (c *DaemonClient) Query() *DaemonQuery
Query returns a query builder for Daemon.
func (*DaemonClient) QueryUser ¶
func (c *DaemonClient) QueryUser(d *Daemon) *UserQuery
QueryUser queries the user edge of a Daemon.
func (*DaemonClient) Update ¶
func (c *DaemonClient) Update() *DaemonUpdate
Update returns an update builder for Daemon.
func (*DaemonClient) UpdateOne ¶
func (c *DaemonClient) UpdateOne(d *Daemon) *DaemonUpdateOne
UpdateOne returns an update builder for the given entity.
func (*DaemonClient) UpdateOneID ¶
func (c *DaemonClient) UpdateOneID(id int) *DaemonUpdateOne
UpdateOneID returns an update builder for the given id.
func (*DaemonClient) Use ¶
func (c *DaemonClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `daemon.Hooks(f(g(h())))`.
type DaemonCreate ¶
type DaemonCreate struct {
// contains filtered or unexported fields
}
DaemonCreate is the builder for creating a Daemon entity.
func (*DaemonCreate) Exec ¶
func (dc *DaemonCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*DaemonCreate) ExecX ¶
func (dc *DaemonCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DaemonCreate) Mutation ¶
func (dc *DaemonCreate) Mutation() *DaemonMutation
Mutation returns the DaemonMutation object of the builder.
func (*DaemonCreate) Save ¶
func (dc *DaemonCreate) Save(ctx context.Context) (*Daemon, error)
Save creates the Daemon in the database.
func (*DaemonCreate) SaveX ¶
func (dc *DaemonCreate) SaveX(ctx context.Context) *Daemon
SaveX calls Save and panics if Save returns an error.
func (*DaemonCreate) SetEnable ¶
func (dc *DaemonCreate) SetEnable(b bool) *DaemonCreate
SetEnable sets the "enable" field.
func (*DaemonCreate) SetNillableEnable ¶
func (dc *DaemonCreate) SetNillableEnable(b *bool) *DaemonCreate
SetNillableEnable sets the "enable" field if the given value is not nil.
func (*DaemonCreate) SetNillableUserID ¶
func (dc *DaemonCreate) SetNillableUserID(id *int) *DaemonCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*DaemonCreate) SetPath ¶
func (dc *DaemonCreate) SetPath(s string) *DaemonCreate
SetPath sets the "path" field.
func (*DaemonCreate) SetUser ¶
func (dc *DaemonCreate) SetUser(u *User) *DaemonCreate
SetUser sets the "user" edge to the User entity.
func (*DaemonCreate) SetUserID ¶
func (dc *DaemonCreate) SetUserID(id int) *DaemonCreate
SetUserID sets the "user" edge to the User entity by ID.
type DaemonCreateBulk ¶
type DaemonCreateBulk struct {
// contains filtered or unexported fields
}
DaemonCreateBulk is the builder for creating many Daemon entities in bulk.
func (*DaemonCreateBulk) Exec ¶
func (dcb *DaemonCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*DaemonCreateBulk) ExecX ¶
func (dcb *DaemonCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type DaemonDelete ¶
type DaemonDelete struct {
// contains filtered or unexported fields
}
DaemonDelete is the builder for deleting a Daemon entity.
func (*DaemonDelete) Exec ¶
func (dd *DaemonDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*DaemonDelete) ExecX ¶
func (dd *DaemonDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*DaemonDelete) Where ¶
func (dd *DaemonDelete) Where(ps ...predicate.Daemon) *DaemonDelete
Where appends a list predicates to the DaemonDelete builder.
type DaemonDeleteOne ¶
type DaemonDeleteOne struct {
// contains filtered or unexported fields
}
DaemonDeleteOne is the builder for deleting a single Daemon entity.
func (*DaemonDeleteOne) Exec ¶
func (ddo *DaemonDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*DaemonDeleteOne) ExecX ¶
func (ddo *DaemonDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DaemonDeleteOne) Where ¶
func (ddo *DaemonDeleteOne) Where(ps ...predicate.Daemon) *DaemonDeleteOne
Where appends a list predicates to the DaemonDelete builder.
type DaemonEdges ¶
type DaemonEdges struct { // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
DaemonEdges holds the relations/edges for other nodes in the graph.
func (DaemonEdges) UserOrErr ¶
func (e DaemonEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type DaemonGroupBy ¶
type DaemonGroupBy struct {
// contains filtered or unexported fields
}
DaemonGroupBy is the group-by builder for Daemon entities.
func (*DaemonGroupBy) Aggregate ¶
func (dgb *DaemonGroupBy) Aggregate(fns ...AggregateFunc) *DaemonGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*DaemonGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DaemonGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DaemonGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DaemonGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DaemonGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DaemonGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DaemonGroupBy) Scan ¶
func (dgb *DaemonGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DaemonGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DaemonMutation ¶
type DaemonMutation struct {
// contains filtered or unexported fields
}
DaemonMutation represents an operation that mutates the Daemon nodes in the graph.
func (*DaemonMutation) AddField ¶
func (m *DaemonMutation) 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 (*DaemonMutation) AddedEdges ¶
func (m *DaemonMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*DaemonMutation) AddedField ¶
func (m *DaemonMutation) 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 (*DaemonMutation) AddedFields ¶
func (m *DaemonMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*DaemonMutation) AddedIDs ¶
func (m *DaemonMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*DaemonMutation) ClearEdge ¶
func (m *DaemonMutation) 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 (*DaemonMutation) ClearField ¶
func (m *DaemonMutation) 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 (*DaemonMutation) ClearUser ¶
func (m *DaemonMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*DaemonMutation) ClearedEdges ¶
func (m *DaemonMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*DaemonMutation) ClearedFields ¶
func (m *DaemonMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (DaemonMutation) Client ¶
func (m DaemonMutation) 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 (*DaemonMutation) EdgeCleared ¶
func (m *DaemonMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*DaemonMutation) Enable ¶
func (m *DaemonMutation) Enable() (r bool, exists bool)
Enable returns the value of the "enable" field in the mutation.
func (*DaemonMutation) Field ¶
func (m *DaemonMutation) 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 (*DaemonMutation) FieldCleared ¶
func (m *DaemonMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*DaemonMutation) Fields ¶
func (m *DaemonMutation) 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 (*DaemonMutation) ID ¶
func (m *DaemonMutation) 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 (*DaemonMutation) IDs ¶
func (m *DaemonMutation) 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 (*DaemonMutation) OldEnable ¶
func (m *DaemonMutation) OldEnable(ctx context.Context) (v bool, err error)
OldEnable returns the old "enable" field's value of the Daemon entity. If the Daemon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DaemonMutation) 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 (*DaemonMutation) OldPath ¶
func (m *DaemonMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the Daemon entity. If the Daemon object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*DaemonMutation) Path ¶
func (m *DaemonMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*DaemonMutation) RemovedEdges ¶
func (m *DaemonMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*DaemonMutation) RemovedIDs ¶
func (m *DaemonMutation) 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 (*DaemonMutation) ResetEdge ¶
func (m *DaemonMutation) 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 (*DaemonMutation) ResetEnable ¶
func (m *DaemonMutation) ResetEnable()
ResetEnable resets all changes to the "enable" field.
func (*DaemonMutation) ResetField ¶
func (m *DaemonMutation) 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 (*DaemonMutation) ResetPath ¶
func (m *DaemonMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*DaemonMutation) ResetUser ¶
func (m *DaemonMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*DaemonMutation) SetEnable ¶
func (m *DaemonMutation) SetEnable(b bool)
SetEnable sets the "enable" field.
func (*DaemonMutation) SetField ¶
func (m *DaemonMutation) 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 (*DaemonMutation) SetOp ¶
func (m *DaemonMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*DaemonMutation) SetPath ¶
func (m *DaemonMutation) SetPath(s string)
SetPath sets the "path" field.
func (*DaemonMutation) SetUserID ¶
func (m *DaemonMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (DaemonMutation) Tx ¶
func (m DaemonMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*DaemonMutation) Type ¶
func (m *DaemonMutation) Type() string
Type returns the node type of this mutation (Daemon).
func (*DaemonMutation) UserCleared ¶
func (m *DaemonMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*DaemonMutation) UserID ¶
func (m *DaemonMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*DaemonMutation) UserIDs ¶
func (m *DaemonMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*DaemonMutation) Where ¶
func (m *DaemonMutation) Where(ps ...predicate.Daemon)
Where appends a list predicates to the DaemonMutation builder.
func (*DaemonMutation) WhereP ¶
func (m *DaemonMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the DaemonMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type DaemonQuery ¶
type DaemonQuery struct {
// contains filtered or unexported fields
}
DaemonQuery is the builder for querying Daemon entities.
func (*DaemonQuery) Aggregate ¶
func (dq *DaemonQuery) Aggregate(fns ...AggregateFunc) *DaemonSelect
Aggregate returns a DaemonSelect configured with the given aggregations.
func (*DaemonQuery) All ¶
func (dq *DaemonQuery) All(ctx context.Context) ([]*Daemon, error)
All executes the query and returns a list of Daemons.
func (*DaemonQuery) AllX ¶
func (dq *DaemonQuery) AllX(ctx context.Context) []*Daemon
AllX is like All, but panics if an error occurs.
func (*DaemonQuery) Clone ¶
func (dq *DaemonQuery) Clone() *DaemonQuery
Clone returns a duplicate of the DaemonQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*DaemonQuery) Count ¶
func (dq *DaemonQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*DaemonQuery) CountX ¶
func (dq *DaemonQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*DaemonQuery) Exist ¶
func (dq *DaemonQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*DaemonQuery) ExistX ¶
func (dq *DaemonQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*DaemonQuery) First ¶
func (dq *DaemonQuery) First(ctx context.Context) (*Daemon, error)
First returns the first Daemon entity from the query. Returns a *NotFoundError when no Daemon was found.
func (*DaemonQuery) FirstID ¶
func (dq *DaemonQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Daemon ID from the query. Returns a *NotFoundError when no Daemon ID was found.
func (*DaemonQuery) FirstIDX ¶
func (dq *DaemonQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*DaemonQuery) FirstX ¶
func (dq *DaemonQuery) FirstX(ctx context.Context) *Daemon
FirstX is like First, but panics if an error occurs.
func (*DaemonQuery) GroupBy ¶
func (dq *DaemonQuery) GroupBy(field string, fields ...string) *DaemonGroupBy
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 { Path string `json:"path,omitempty"` Count int `json:"count,omitempty"` } client.Daemon.Query(). GroupBy(daemon.FieldPath). Aggregate(ent.Count()). Scan(ctx, &v)
func (*DaemonQuery) IDs ¶
func (dq *DaemonQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Daemon IDs.
func (*DaemonQuery) IDsX ¶
func (dq *DaemonQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*DaemonQuery) Limit ¶
func (dq *DaemonQuery) Limit(limit int) *DaemonQuery
Limit the number of records to be returned by this query.
func (*DaemonQuery) Offset ¶
func (dq *DaemonQuery) Offset(offset int) *DaemonQuery
Offset to start from.
func (*DaemonQuery) Only ¶
func (dq *DaemonQuery) Only(ctx context.Context) (*Daemon, error)
Only returns a single Daemon entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Daemon entity is found. Returns a *NotFoundError when no Daemon entities are found.
func (*DaemonQuery) OnlyID ¶
func (dq *DaemonQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Daemon ID in the query. Returns a *NotSingularError when more than one Daemon ID is found. Returns a *NotFoundError when no entities are found.
func (*DaemonQuery) OnlyIDX ¶
func (dq *DaemonQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*DaemonQuery) OnlyX ¶
func (dq *DaemonQuery) OnlyX(ctx context.Context) *Daemon
OnlyX is like Only, but panics if an error occurs.
func (*DaemonQuery) Order ¶
func (dq *DaemonQuery) Order(o ...daemon.OrderOption) *DaemonQuery
Order specifies how the records should be ordered.
func (*DaemonQuery) QueryUser ¶
func (dq *DaemonQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*DaemonQuery) Select ¶
func (dq *DaemonQuery) Select(fields ...string) *DaemonSelect
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 { Path string `json:"path,omitempty"` } client.Daemon.Query(). Select(daemon.FieldPath). Scan(ctx, &v)
func (*DaemonQuery) Unique ¶
func (dq *DaemonQuery) Unique(unique bool) *DaemonQuery
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 (*DaemonQuery) Where ¶
func (dq *DaemonQuery) Where(ps ...predicate.Daemon) *DaemonQuery
Where adds a new predicate for the DaemonQuery builder.
func (*DaemonQuery) WithUser ¶
func (dq *DaemonQuery) WithUser(opts ...func(*UserQuery)) *DaemonQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type DaemonSelect ¶
type DaemonSelect struct { *DaemonQuery // contains filtered or unexported fields }
DaemonSelect is the builder for selecting fields of Daemon entities.
func (*DaemonSelect) Aggregate ¶
func (ds *DaemonSelect) Aggregate(fns ...AggregateFunc) *DaemonSelect
Aggregate adds the given aggregation functions to the selector query.
func (*DaemonSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*DaemonSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*DaemonSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*DaemonSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*DaemonSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*DaemonSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*DaemonSelect) Scan ¶
func (ds *DaemonSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*DaemonSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type DaemonUpdate ¶
type DaemonUpdate struct {
// contains filtered or unexported fields
}
DaemonUpdate is the builder for updating Daemon entities.
func (*DaemonUpdate) ClearUser ¶
func (du *DaemonUpdate) ClearUser() *DaemonUpdate
ClearUser clears the "user" edge to the User entity.
func (*DaemonUpdate) Exec ¶
func (du *DaemonUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*DaemonUpdate) ExecX ¶
func (du *DaemonUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DaemonUpdate) Mutation ¶
func (du *DaemonUpdate) Mutation() *DaemonMutation
Mutation returns the DaemonMutation object of the builder.
func (*DaemonUpdate) Save ¶
func (du *DaemonUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*DaemonUpdate) SaveX ¶
func (du *DaemonUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*DaemonUpdate) SetEnable ¶
func (du *DaemonUpdate) SetEnable(b bool) *DaemonUpdate
SetEnable sets the "enable" field.
func (*DaemonUpdate) SetNillableEnable ¶
func (du *DaemonUpdate) SetNillableEnable(b *bool) *DaemonUpdate
SetNillableEnable sets the "enable" field if the given value is not nil.
func (*DaemonUpdate) SetNillablePath ¶
func (du *DaemonUpdate) SetNillablePath(s *string) *DaemonUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*DaemonUpdate) SetNillableUserID ¶
func (du *DaemonUpdate) SetNillableUserID(id *int) *DaemonUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*DaemonUpdate) SetPath ¶
func (du *DaemonUpdate) SetPath(s string) *DaemonUpdate
SetPath sets the "path" field.
func (*DaemonUpdate) SetUser ¶
func (du *DaemonUpdate) SetUser(u *User) *DaemonUpdate
SetUser sets the "user" edge to the User entity.
func (*DaemonUpdate) SetUserID ¶
func (du *DaemonUpdate) SetUserID(id int) *DaemonUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*DaemonUpdate) Where ¶
func (du *DaemonUpdate) Where(ps ...predicate.Daemon) *DaemonUpdate
Where appends a list predicates to the DaemonUpdate builder.
type DaemonUpdateOne ¶
type DaemonUpdateOne struct {
// contains filtered or unexported fields
}
DaemonUpdateOne is the builder for updating a single Daemon entity.
func (*DaemonUpdateOne) ClearUser ¶
func (duo *DaemonUpdateOne) ClearUser() *DaemonUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*DaemonUpdateOne) Exec ¶
func (duo *DaemonUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*DaemonUpdateOne) ExecX ¶
func (duo *DaemonUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*DaemonUpdateOne) Mutation ¶
func (duo *DaemonUpdateOne) Mutation() *DaemonMutation
Mutation returns the DaemonMutation object of the builder.
func (*DaemonUpdateOne) Save ¶
func (duo *DaemonUpdateOne) Save(ctx context.Context) (*Daemon, error)
Save executes the query and returns the updated Daemon entity.
func (*DaemonUpdateOne) SaveX ¶
func (duo *DaemonUpdateOne) SaveX(ctx context.Context) *Daemon
SaveX is like Save, but panics if an error occurs.
func (*DaemonUpdateOne) Select ¶
func (duo *DaemonUpdateOne) Select(field string, fields ...string) *DaemonUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*DaemonUpdateOne) SetEnable ¶
func (duo *DaemonUpdateOne) SetEnable(b bool) *DaemonUpdateOne
SetEnable sets the "enable" field.
func (*DaemonUpdateOne) SetNillableEnable ¶
func (duo *DaemonUpdateOne) SetNillableEnable(b *bool) *DaemonUpdateOne
SetNillableEnable sets the "enable" field if the given value is not nil.
func (*DaemonUpdateOne) SetNillablePath ¶
func (duo *DaemonUpdateOne) SetNillablePath(s *string) *DaemonUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*DaemonUpdateOne) SetNillableUserID ¶
func (duo *DaemonUpdateOne) SetNillableUserID(id *int) *DaemonUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*DaemonUpdateOne) SetPath ¶
func (duo *DaemonUpdateOne) SetPath(s string) *DaemonUpdateOne
SetPath sets the "path" field.
func (*DaemonUpdateOne) SetUser ¶
func (duo *DaemonUpdateOne) SetUser(u *User) *DaemonUpdateOne
SetUser sets the "user" edge to the User entity.
func (*DaemonUpdateOne) SetUserID ¶
func (duo *DaemonUpdateOne) SetUserID(id int) *DaemonUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*DaemonUpdateOne) Where ¶
func (duo *DaemonUpdateOne) Where(ps ...predicate.Daemon) *DaemonUpdateOne
Where appends a list predicates to the DaemonUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type Node ¶
type Node struct { // ID of the ent. ID int `json:"id,omitempty"` // Group holds the value of the "group" field. Group string `json:"group,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the NodeQuery when eager-loading is set. Edges NodeEdges `json:"edges"` // contains filtered or unexported fields }
Node is the model entity for the Node schema.
func (*Node) QuerySubscribe ¶
func (n *Node) QuerySubscribe() *SubscribeQuery
QuerySubscribe queries the "subscribe" edge of the Node entity.
func (*Node) Unwrap ¶
Unwrap unwraps the Node 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 (*Node) Update ¶
func (n *Node) Update() *NodeUpdateOne
Update returns a builder for updating this Node. Note that you need to call Node.Unwrap() before calling this method if this Node was returned from a transaction, and the transaction was committed or rolled back.
type NodeClient ¶
type NodeClient struct {
// contains filtered or unexported fields
}
NodeClient is a client for the Node schema.
func NewNodeClient ¶
func NewNodeClient(c config) *NodeClient
NewNodeClient returns a client for the Node from the given config.
func (*NodeClient) Create ¶
func (c *NodeClient) Create() *NodeCreate
Create returns a builder for creating a Node entity.
func (*NodeClient) CreateBulk ¶
func (c *NodeClient) CreateBulk(builders ...*NodeCreate) *NodeCreateBulk
CreateBulk returns a builder for creating a bulk of Node entities.
func (*NodeClient) Delete ¶
func (c *NodeClient) Delete() *NodeDelete
Delete returns a delete builder for Node.
func (*NodeClient) DeleteOne ¶
func (c *NodeClient) DeleteOne(n *Node) *NodeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*NodeClient) DeleteOneID ¶
func (c *NodeClient) DeleteOneID(id int) *NodeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*NodeClient) GetX ¶
func (c *NodeClient) GetX(ctx context.Context, id int) *Node
GetX is like Get, but panics if an error occurs.
func (*NodeClient) Intercept ¶
func (c *NodeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `node.Intercept(f(g(h())))`.
func (*NodeClient) Interceptors ¶
func (c *NodeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*NodeClient) MapCreateBulk ¶
func (c *NodeClient) MapCreateBulk(slice any, setFunc func(*NodeCreate, int)) *NodeCreateBulk
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 (*NodeClient) Query ¶
func (c *NodeClient) Query() *NodeQuery
Query returns a query builder for Node.
func (*NodeClient) QuerySubscribe ¶
func (c *NodeClient) QuerySubscribe(n *Node) *SubscribeQuery
QuerySubscribe queries the subscribe edge of a Node.
func (*NodeClient) Update ¶
func (c *NodeClient) Update() *NodeUpdate
Update returns an update builder for Node.
func (*NodeClient) UpdateOne ¶
func (c *NodeClient) UpdateOne(n *Node) *NodeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*NodeClient) UpdateOneID ¶
func (c *NodeClient) UpdateOneID(id int) *NodeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*NodeClient) Use ¶
func (c *NodeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `node.Hooks(f(g(h())))`.
type NodeCreate ¶
type NodeCreate struct {
// contains filtered or unexported fields
}
NodeCreate is the builder for creating a Node entity.
func (*NodeCreate) Exec ¶
func (nc *NodeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreate) ExecX ¶
func (nc *NodeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeCreate) Mutation ¶
func (nc *NodeCreate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeCreate) Save ¶
func (nc *NodeCreate) Save(ctx context.Context) (*Node, error)
Save creates the Node in the database.
func (*NodeCreate) SaveX ¶
func (nc *NodeCreate) SaveX(ctx context.Context) *Node
SaveX calls Save and panics if Save returns an error.
func (*NodeCreate) SetGroup ¶
func (nc *NodeCreate) SetGroup(s string) *NodeCreate
SetGroup sets the "group" field.
func (*NodeCreate) SetName ¶
func (nc *NodeCreate) SetName(s string) *NodeCreate
SetName sets the "name" field.
func (*NodeCreate) SetNillableSubscribeID ¶
func (nc *NodeCreate) SetNillableSubscribeID(id *int) *NodeCreate
SetNillableSubscribeID sets the "subscribe" edge to the Subscribe entity by ID if the given value is not nil.
func (*NodeCreate) SetSubscribe ¶
func (nc *NodeCreate) SetSubscribe(s *Subscribe) *NodeCreate
SetSubscribe sets the "subscribe" edge to the Subscribe entity.
func (*NodeCreate) SetSubscribeID ¶
func (nc *NodeCreate) SetSubscribeID(id int) *NodeCreate
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by ID.
type NodeCreateBulk ¶
type NodeCreateBulk struct {
// contains filtered or unexported fields
}
NodeCreateBulk is the builder for creating many Node entities in bulk.
func (*NodeCreateBulk) Exec ¶
func (ncb *NodeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeCreateBulk) ExecX ¶
func (ncb *NodeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type NodeDelete ¶
type NodeDelete struct {
// contains filtered or unexported fields
}
NodeDelete is the builder for deleting a Node entity.
func (*NodeDelete) Exec ¶
func (nd *NodeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*NodeDelete) ExecX ¶
func (nd *NodeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*NodeDelete) Where ¶
func (nd *NodeDelete) Where(ps ...predicate.Node) *NodeDelete
Where appends a list predicates to the NodeDelete builder.
type NodeDeleteOne ¶
type NodeDeleteOne struct {
// contains filtered or unexported fields
}
NodeDeleteOne is the builder for deleting a single Node entity.
func (*NodeDeleteOne) Exec ¶
func (ndo *NodeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*NodeDeleteOne) ExecX ¶
func (ndo *NodeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeDeleteOne) Where ¶
func (ndo *NodeDeleteOne) Where(ps ...predicate.Node) *NodeDeleteOne
Where appends a list predicates to the NodeDelete builder.
type NodeEdges ¶
type NodeEdges struct { // Subscribe holds the value of the subscribe edge. Subscribe *Subscribe `json:"subscribe,omitempty"` // contains filtered or unexported fields }
NodeEdges holds the relations/edges for other nodes in the graph.
func (NodeEdges) SubscribeOrErr ¶
SubscribeOrErr returns the Subscribe value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type NodeGroupBy ¶
type NodeGroupBy struct {
// contains filtered or unexported fields
}
NodeGroupBy is the group-by builder for Node entities.
func (*NodeGroupBy) Aggregate ¶
func (ngb *NodeGroupBy) Aggregate(fns ...AggregateFunc) *NodeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*NodeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeGroupBy) Scan ¶
func (ngb *NodeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeMutation ¶
type NodeMutation struct {
// contains filtered or unexported fields
}
NodeMutation represents an operation that mutates the Node nodes in the graph.
func (*NodeMutation) AddField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddedEdges ¶
func (m *NodeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*NodeMutation) AddedField ¶
func (m *NodeMutation) 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 (*NodeMutation) AddedFields ¶
func (m *NodeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*NodeMutation) AddedIDs ¶
func (m *NodeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*NodeMutation) ClearEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearField ¶
func (m *NodeMutation) 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 (*NodeMutation) ClearSubscribe ¶
func (m *NodeMutation) ClearSubscribe()
ClearSubscribe clears the "subscribe" edge to the Subscribe entity.
func (*NodeMutation) ClearedEdges ¶
func (m *NodeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*NodeMutation) ClearedFields ¶
func (m *NodeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (NodeMutation) Client ¶
func (m NodeMutation) 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 (*NodeMutation) EdgeCleared ¶
func (m *NodeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*NodeMutation) Field ¶
func (m *NodeMutation) 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 (*NodeMutation) FieldCleared ¶
func (m *NodeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*NodeMutation) Fields ¶
func (m *NodeMutation) 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 (*NodeMutation) Group ¶
func (m *NodeMutation) Group() (r string, exists bool)
Group returns the value of the "group" field in the mutation.
func (*NodeMutation) ID ¶
func (m *NodeMutation) 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 (*NodeMutation) IDs ¶
func (m *NodeMutation) 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 (*NodeMutation) Name ¶
func (m *NodeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*NodeMutation) 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 (*NodeMutation) OldGroup ¶
func (m *NodeMutation) OldGroup(ctx context.Context) (v string, err error)
OldGroup returns the old "group" field's value of the Node entity. If the Node object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NodeMutation) OldName ¶
func (m *NodeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Node entity. If the Node object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*NodeMutation) RemovedEdges ¶
func (m *NodeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*NodeMutation) RemovedIDs ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetEdge ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetField ¶
func (m *NodeMutation) 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 (*NodeMutation) ResetGroup ¶
func (m *NodeMutation) ResetGroup()
ResetGroup resets all changes to the "group" field.
func (*NodeMutation) ResetName ¶
func (m *NodeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NodeMutation) ResetSubscribe ¶
func (m *NodeMutation) ResetSubscribe()
ResetSubscribe resets all changes to the "subscribe" edge.
func (*NodeMutation) SetField ¶
func (m *NodeMutation) 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 (*NodeMutation) SetGroup ¶
func (m *NodeMutation) SetGroup(s string)
SetGroup sets the "group" field.
func (*NodeMutation) SetName ¶
func (m *NodeMutation) SetName(s string)
SetName sets the "name" field.
func (*NodeMutation) SetOp ¶
func (m *NodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NodeMutation) SetSubscribeID ¶
func (m *NodeMutation) SetSubscribeID(id int)
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by id.
func (*NodeMutation) SubscribeCleared ¶
func (m *NodeMutation) SubscribeCleared() bool
SubscribeCleared reports if the "subscribe" edge to the Subscribe entity was cleared.
func (*NodeMutation) SubscribeID ¶
func (m *NodeMutation) SubscribeID() (id int, exists bool)
SubscribeID returns the "subscribe" edge ID in the mutation.
func (*NodeMutation) SubscribeIDs ¶
func (m *NodeMutation) SubscribeIDs() (ids []int)
SubscribeIDs returns the "subscribe" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubscribeID instead. It exists only for internal usage by the builders.
func (NodeMutation) Tx ¶
func (m NodeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*NodeMutation) Type ¶
func (m *NodeMutation) Type() string
Type returns the node type of this mutation (Node).
func (*NodeMutation) Where ¶
func (m *NodeMutation) Where(ps ...predicate.Node)
Where appends a list predicates to the NodeMutation builder.
func (*NodeMutation) WhereP ¶
func (m *NodeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the NodeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type NodeQuery ¶
type NodeQuery struct {
// contains filtered or unexported fields
}
NodeQuery is the builder for querying Node entities.
func (*NodeQuery) Aggregate ¶
func (nq *NodeQuery) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate returns a NodeSelect configured with the given aggregations.
func (*NodeQuery) Clone ¶
Clone returns a duplicate of the NodeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*NodeQuery) First ¶
First returns the first Node entity from the query. Returns a *NotFoundError when no Node was found.
func (*NodeQuery) FirstID ¶
FirstID returns the first Node ID from the query. Returns a *NotFoundError when no Node ID was found.
func (*NodeQuery) GroupBy ¶
func (nq *NodeQuery) GroupBy(field string, fields ...string) *NodeGroupBy
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 { Group string `json:"group,omitempty"` Count int `json:"count,omitempty"` } client.Node.Query(). GroupBy(node.FieldGroup). Aggregate(ent.Count()). Scan(ctx, &v)
func (*NodeQuery) Only ¶
Only returns a single Node entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Node entity is found. Returns a *NotFoundError when no Node entities are found.
func (*NodeQuery) OnlyID ¶
OnlyID is like Only, but returns the only Node ID in the query. Returns a *NotSingularError when more than one Node ID is found. Returns a *NotFoundError when no entities are found.
func (*NodeQuery) Order ¶
func (nq *NodeQuery) Order(o ...node.OrderOption) *NodeQuery
Order specifies how the records should be ordered.
func (*NodeQuery) QuerySubscribe ¶
func (nq *NodeQuery) QuerySubscribe() *SubscribeQuery
QuerySubscribe chains the current query on the "subscribe" edge.
func (*NodeQuery) Select ¶
func (nq *NodeQuery) Select(fields ...string) *NodeSelect
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 { Group string `json:"group,omitempty"` } client.Node.Query(). Select(node.FieldGroup). Scan(ctx, &v)
func (*NodeQuery) 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 (*NodeQuery) WithSubscribe ¶
func (nq *NodeQuery) WithSubscribe(opts ...func(*SubscribeQuery)) *NodeQuery
WithSubscribe tells the query-builder to eager-load the nodes that are connected to the "subscribe" edge. The optional arguments are used to configure the query builder of the edge.
type NodeSelect ¶
type NodeSelect struct { *NodeQuery // contains filtered or unexported fields }
NodeSelect is the builder for selecting fields of Node entities.
func (*NodeSelect) Aggregate ¶
func (ns *NodeSelect) Aggregate(fns ...AggregateFunc) *NodeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*NodeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*NodeSelect) Scan ¶
func (ns *NodeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*NodeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type NodeUpdate ¶
type NodeUpdate struct {
// contains filtered or unexported fields
}
NodeUpdate is the builder for updating Node entities.
func (*NodeUpdate) ClearSubscribe ¶
func (nu *NodeUpdate) ClearSubscribe() *NodeUpdate
ClearSubscribe clears the "subscribe" edge to the Subscribe entity.
func (*NodeUpdate) Exec ¶
func (nu *NodeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*NodeUpdate) ExecX ¶
func (nu *NodeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdate) Mutation ¶
func (nu *NodeUpdate) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdate) Save ¶
func (nu *NodeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*NodeUpdate) SaveX ¶
func (nu *NodeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdate) SetGroup ¶
func (nu *NodeUpdate) SetGroup(s string) *NodeUpdate
SetGroup sets the "group" field.
func (*NodeUpdate) SetName ¶
func (nu *NodeUpdate) SetName(s string) *NodeUpdate
SetName sets the "name" field.
func (*NodeUpdate) SetNillableGroup ¶
func (nu *NodeUpdate) SetNillableGroup(s *string) *NodeUpdate
SetNillableGroup sets the "group" field if the given value is not nil.
func (*NodeUpdate) SetNillableName ¶
func (nu *NodeUpdate) SetNillableName(s *string) *NodeUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*NodeUpdate) SetNillableSubscribeID ¶
func (nu *NodeUpdate) SetNillableSubscribeID(id *int) *NodeUpdate
SetNillableSubscribeID sets the "subscribe" edge to the Subscribe entity by ID if the given value is not nil.
func (*NodeUpdate) SetSubscribe ¶
func (nu *NodeUpdate) SetSubscribe(s *Subscribe) *NodeUpdate
SetSubscribe sets the "subscribe" edge to the Subscribe entity.
func (*NodeUpdate) SetSubscribeID ¶
func (nu *NodeUpdate) SetSubscribeID(id int) *NodeUpdate
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by ID.
func (*NodeUpdate) Where ¶
func (nu *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
Where appends a list predicates to the NodeUpdate builder.
type NodeUpdateOne ¶
type NodeUpdateOne struct {
// contains filtered or unexported fields
}
NodeUpdateOne is the builder for updating a single Node entity.
func (*NodeUpdateOne) ClearSubscribe ¶
func (nuo *NodeUpdateOne) ClearSubscribe() *NodeUpdateOne
ClearSubscribe clears the "subscribe" edge to the Subscribe entity.
func (*NodeUpdateOne) Exec ¶
func (nuo *NodeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*NodeUpdateOne) ExecX ¶
func (nuo *NodeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*NodeUpdateOne) Mutation ¶
func (nuo *NodeUpdateOne) Mutation() *NodeMutation
Mutation returns the NodeMutation object of the builder.
func (*NodeUpdateOne) Save ¶
func (nuo *NodeUpdateOne) Save(ctx context.Context) (*Node, error)
Save executes the query and returns the updated Node entity.
func (*NodeUpdateOne) SaveX ¶
func (nuo *NodeUpdateOne) SaveX(ctx context.Context) *Node
SaveX is like Save, but panics if an error occurs.
func (*NodeUpdateOne) Select ¶
func (nuo *NodeUpdateOne) Select(field string, fields ...string) *NodeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*NodeUpdateOne) SetGroup ¶
func (nuo *NodeUpdateOne) SetGroup(s string) *NodeUpdateOne
SetGroup sets the "group" field.
func (*NodeUpdateOne) SetName ¶
func (nuo *NodeUpdateOne) SetName(s string) *NodeUpdateOne
SetName sets the "name" field.
func (*NodeUpdateOne) SetNillableGroup ¶
func (nuo *NodeUpdateOne) SetNillableGroup(s *string) *NodeUpdateOne
SetNillableGroup sets the "group" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableName ¶
func (nuo *NodeUpdateOne) SetNillableName(s *string) *NodeUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableSubscribeID ¶
func (nuo *NodeUpdateOne) SetNillableSubscribeID(id *int) *NodeUpdateOne
SetNillableSubscribeID sets the "subscribe" edge to the Subscribe entity by ID if the given value is not nil.
func (*NodeUpdateOne) SetSubscribe ¶
func (nuo *NodeUpdateOne) SetSubscribe(s *Subscribe) *NodeUpdateOne
SetSubscribe sets the "subscribe" edge to the Subscribe entity.
func (*NodeUpdateOne) SetSubscribeID ¶
func (nuo *NodeUpdateOne) SetSubscribeID(id int) *NodeUpdateOne
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by ID.
func (*NodeUpdateOne) Where ¶
func (nuo *NodeUpdateOne) Where(ps ...predicate.Node) *NodeUpdateOne
Where appends a list predicates to the NodeUpdate builder.
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 Provider ¶
type Provider struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Version holds the value of the "version" field. Version string `json:"version,omitempty"` // Path holds the value of the "path" field. Path string `json:"path,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ProviderQuery when eager-loading is set. Edges ProviderEdges `json:"edges"` // contains filtered or unexported fields }
Provider is the model entity for the Provider schema.
func (*Provider) QuerySubscribes ¶
func (pr *Provider) QuerySubscribes() *SubscribeQuery
QuerySubscribes queries the "subscribes" edge of the Provider entity.
func (*Provider) Unwrap ¶
Unwrap unwraps the Provider 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 (*Provider) Update ¶
func (pr *Provider) Update() *ProviderUpdateOne
Update returns a builder for updating this Provider. Note that you need to call Provider.Unwrap() before calling this method if this Provider was returned from a transaction, and the transaction was committed or rolled back.
type ProviderClient ¶
type ProviderClient struct {
// contains filtered or unexported fields
}
ProviderClient is a client for the Provider schema.
func NewProviderClient ¶
func NewProviderClient(c config) *ProviderClient
NewProviderClient returns a client for the Provider from the given config.
func (*ProviderClient) Create ¶
func (c *ProviderClient) Create() *ProviderCreate
Create returns a builder for creating a Provider entity.
func (*ProviderClient) CreateBulk ¶
func (c *ProviderClient) CreateBulk(builders ...*ProviderCreate) *ProviderCreateBulk
CreateBulk returns a builder for creating a bulk of Provider entities.
func (*ProviderClient) Delete ¶
func (c *ProviderClient) Delete() *ProviderDelete
Delete returns a delete builder for Provider.
func (*ProviderClient) DeleteOne ¶
func (c *ProviderClient) DeleteOne(pr *Provider) *ProviderDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ProviderClient) DeleteOneID ¶
func (c *ProviderClient) DeleteOneID(id int) *ProviderDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ProviderClient) GetX ¶
func (c *ProviderClient) GetX(ctx context.Context, id int) *Provider
GetX is like Get, but panics if an error occurs.
func (*ProviderClient) Hooks ¶
func (c *ProviderClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ProviderClient) Intercept ¶
func (c *ProviderClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `provider.Intercept(f(g(h())))`.
func (*ProviderClient) Interceptors ¶
func (c *ProviderClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ProviderClient) MapCreateBulk ¶
func (c *ProviderClient) MapCreateBulk(slice any, setFunc func(*ProviderCreate, int)) *ProviderCreateBulk
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 (*ProviderClient) Query ¶
func (c *ProviderClient) Query() *ProviderQuery
Query returns a query builder for Provider.
func (*ProviderClient) QuerySubscribes ¶
func (c *ProviderClient) QuerySubscribes(pr *Provider) *SubscribeQuery
QuerySubscribes queries the subscribes edge of a Provider.
func (*ProviderClient) QueryUser ¶
func (c *ProviderClient) QueryUser(pr *Provider) *UserQuery
QueryUser queries the user edge of a Provider.
func (*ProviderClient) Update ¶
func (c *ProviderClient) Update() *ProviderUpdate
Update returns an update builder for Provider.
func (*ProviderClient) UpdateOne ¶
func (c *ProviderClient) UpdateOne(pr *Provider) *ProviderUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ProviderClient) UpdateOneID ¶
func (c *ProviderClient) UpdateOneID(id int) *ProviderUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ProviderClient) Use ¶
func (c *ProviderClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `provider.Hooks(f(g(h())))`.
type ProviderCreate ¶
type ProviderCreate struct {
// contains filtered or unexported fields
}
ProviderCreate is the builder for creating a Provider entity.
func (*ProviderCreate) AddSubscribeIDs ¶
func (pc *ProviderCreate) AddSubscribeIDs(ids ...int) *ProviderCreate
AddSubscribeIDs adds the "subscribes" edge to the Subscribe entity by IDs.
func (*ProviderCreate) AddSubscribes ¶
func (pc *ProviderCreate) AddSubscribes(s ...*Subscribe) *ProviderCreate
AddSubscribes adds the "subscribes" edges to the Subscribe entity.
func (*ProviderCreate) Exec ¶
func (pc *ProviderCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderCreate) ExecX ¶
func (pc *ProviderCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderCreate) Mutation ¶
func (pc *ProviderCreate) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderCreate) Save ¶
func (pc *ProviderCreate) Save(ctx context.Context) (*Provider, error)
Save creates the Provider in the database.
func (*ProviderCreate) SaveX ¶
func (pc *ProviderCreate) SaveX(ctx context.Context) *Provider
SaveX calls Save and panics if Save returns an error.
func (*ProviderCreate) SetName ¶
func (pc *ProviderCreate) SetName(s string) *ProviderCreate
SetName sets the "name" field.
func (*ProviderCreate) SetNillableUserID ¶
func (pc *ProviderCreate) SetNillableUserID(id *int) *ProviderCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ProviderCreate) SetPath ¶
func (pc *ProviderCreate) SetPath(s string) *ProviderCreate
SetPath sets the "path" field.
func (*ProviderCreate) SetUser ¶
func (pc *ProviderCreate) SetUser(u *User) *ProviderCreate
SetUser sets the "user" edge to the User entity.
func (*ProviderCreate) SetUserID ¶
func (pc *ProviderCreate) SetUserID(id int) *ProviderCreate
SetUserID sets the "user" edge to the User entity by ID.
func (*ProviderCreate) SetVersion ¶
func (pc *ProviderCreate) SetVersion(s string) *ProviderCreate
SetVersion sets the "version" field.
type ProviderCreateBulk ¶
type ProviderCreateBulk struct {
// contains filtered or unexported fields
}
ProviderCreateBulk is the builder for creating many Provider entities in bulk.
func (*ProviderCreateBulk) Exec ¶
func (pcb *ProviderCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderCreateBulk) ExecX ¶
func (pcb *ProviderCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ProviderDelete ¶
type ProviderDelete struct {
// contains filtered or unexported fields
}
ProviderDelete is the builder for deleting a Provider entity.
func (*ProviderDelete) Exec ¶
func (pd *ProviderDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ProviderDelete) ExecX ¶
func (pd *ProviderDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ProviderDelete) Where ¶
func (pd *ProviderDelete) Where(ps ...predicate.Provider) *ProviderDelete
Where appends a list predicates to the ProviderDelete builder.
type ProviderDeleteOne ¶
type ProviderDeleteOne struct {
// contains filtered or unexported fields
}
ProviderDeleteOne is the builder for deleting a single Provider entity.
func (*ProviderDeleteOne) Exec ¶
func (pdo *ProviderDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ProviderDeleteOne) ExecX ¶
func (pdo *ProviderDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderDeleteOne) Where ¶
func (pdo *ProviderDeleteOne) Where(ps ...predicate.Provider) *ProviderDeleteOne
Where appends a list predicates to the ProviderDelete builder.
type ProviderEdges ¶
type ProviderEdges struct { // Subscribes holds the value of the subscribes edge. Subscribes []*Subscribe `json:"subscribes,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // contains filtered or unexported fields }
ProviderEdges holds the relations/edges for other nodes in the graph.
func (ProviderEdges) SubscribesOrErr ¶
func (e ProviderEdges) SubscribesOrErr() ([]*Subscribe, error)
SubscribesOrErr returns the Subscribes value or an error if the edge was not loaded in eager-loading.
func (ProviderEdges) UserOrErr ¶
func (e ProviderEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type ProviderGroupBy ¶
type ProviderGroupBy struct {
// contains filtered or unexported fields
}
ProviderGroupBy is the group-by builder for Provider entities.
func (*ProviderGroupBy) Aggregate ¶
func (pgb *ProviderGroupBy) Aggregate(fns ...AggregateFunc) *ProviderGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ProviderGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProviderGroupBy) Scan ¶
func (pgb *ProviderGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProviderGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProviderMutation ¶
type ProviderMutation struct {
// contains filtered or unexported fields
}
ProviderMutation represents an operation that mutates the Provider nodes in the graph.
func (*ProviderMutation) AddField ¶
func (m *ProviderMutation) 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 (*ProviderMutation) AddSubscribeIDs ¶
func (m *ProviderMutation) AddSubscribeIDs(ids ...int)
AddSubscribeIDs adds the "subscribes" edge to the Subscribe entity by ids.
func (*ProviderMutation) AddedEdges ¶
func (m *ProviderMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ProviderMutation) AddedField ¶
func (m *ProviderMutation) 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 (*ProviderMutation) AddedFields ¶
func (m *ProviderMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ProviderMutation) AddedIDs ¶
func (m *ProviderMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ProviderMutation) ClearEdge ¶
func (m *ProviderMutation) 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 (*ProviderMutation) ClearField ¶
func (m *ProviderMutation) 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 (*ProviderMutation) ClearSubscribes ¶
func (m *ProviderMutation) ClearSubscribes()
ClearSubscribes clears the "subscribes" edge to the Subscribe entity.
func (*ProviderMutation) ClearUser ¶
func (m *ProviderMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*ProviderMutation) ClearedEdges ¶
func (m *ProviderMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ProviderMutation) ClearedFields ¶
func (m *ProviderMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ProviderMutation) Client ¶
func (m ProviderMutation) 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 (*ProviderMutation) EdgeCleared ¶
func (m *ProviderMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ProviderMutation) Field ¶
func (m *ProviderMutation) 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 (*ProviderMutation) FieldCleared ¶
func (m *ProviderMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ProviderMutation) Fields ¶
func (m *ProviderMutation) 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 (*ProviderMutation) ID ¶
func (m *ProviderMutation) 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 (*ProviderMutation) IDs ¶
func (m *ProviderMutation) 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 (*ProviderMutation) Name ¶
func (m *ProviderMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ProviderMutation) 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 (*ProviderMutation) OldName ¶
func (m *ProviderMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProviderMutation) OldPath ¶
func (m *ProviderMutation) OldPath(ctx context.Context) (v string, err error)
OldPath returns the old "path" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProviderMutation) OldVersion ¶
func (m *ProviderMutation) OldVersion(ctx context.Context) (v string, err error)
OldVersion returns the old "version" field's value of the Provider entity. If the Provider object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*ProviderMutation) Path ¶
func (m *ProviderMutation) Path() (r string, exists bool)
Path returns the value of the "path" field in the mutation.
func (*ProviderMutation) RemoveSubscribeIDs ¶
func (m *ProviderMutation) RemoveSubscribeIDs(ids ...int)
RemoveSubscribeIDs removes the "subscribes" edge to the Subscribe entity by IDs.
func (*ProviderMutation) RemovedEdges ¶
func (m *ProviderMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ProviderMutation) RemovedIDs ¶
func (m *ProviderMutation) 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 (*ProviderMutation) RemovedSubscribesIDs ¶
func (m *ProviderMutation) RemovedSubscribesIDs() (ids []int)
RemovedSubscribes returns the removed IDs of the "subscribes" edge to the Subscribe entity.
func (*ProviderMutation) ResetEdge ¶
func (m *ProviderMutation) 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 (*ProviderMutation) ResetField ¶
func (m *ProviderMutation) 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 (*ProviderMutation) ResetName ¶
func (m *ProviderMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ProviderMutation) ResetPath ¶
func (m *ProviderMutation) ResetPath()
ResetPath resets all changes to the "path" field.
func (*ProviderMutation) ResetSubscribes ¶
func (m *ProviderMutation) ResetSubscribes()
ResetSubscribes resets all changes to the "subscribes" edge.
func (*ProviderMutation) ResetUser ¶
func (m *ProviderMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*ProviderMutation) ResetVersion ¶
func (m *ProviderMutation) ResetVersion()
ResetVersion resets all changes to the "version" field.
func (*ProviderMutation) SetField ¶
func (m *ProviderMutation) 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 (*ProviderMutation) SetName ¶
func (m *ProviderMutation) SetName(s string)
SetName sets the "name" field.
func (*ProviderMutation) SetOp ¶
func (m *ProviderMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ProviderMutation) SetPath ¶
func (m *ProviderMutation) SetPath(s string)
SetPath sets the "path" field.
func (*ProviderMutation) SetUserID ¶
func (m *ProviderMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (*ProviderMutation) SetVersion ¶
func (m *ProviderMutation) SetVersion(s string)
SetVersion sets the "version" field.
func (*ProviderMutation) SubscribesCleared ¶
func (m *ProviderMutation) SubscribesCleared() bool
SubscribesCleared reports if the "subscribes" edge to the Subscribe entity was cleared.
func (*ProviderMutation) SubscribesIDs ¶
func (m *ProviderMutation) SubscribesIDs() (ids []int)
SubscribesIDs returns the "subscribes" edge IDs in the mutation.
func (ProviderMutation) Tx ¶
func (m ProviderMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ProviderMutation) Type ¶
func (m *ProviderMutation) Type() string
Type returns the node type of this mutation (Provider).
func (*ProviderMutation) UserCleared ¶
func (m *ProviderMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*ProviderMutation) UserID ¶
func (m *ProviderMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*ProviderMutation) UserIDs ¶
func (m *ProviderMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*ProviderMutation) Version ¶
func (m *ProviderMutation) Version() (r string, exists bool)
Version returns the value of the "version" field in the mutation.
func (*ProviderMutation) Where ¶
func (m *ProviderMutation) Where(ps ...predicate.Provider)
Where appends a list predicates to the ProviderMutation builder.
func (*ProviderMutation) WhereP ¶
func (m *ProviderMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ProviderMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ProviderQuery ¶
type ProviderQuery struct {
// contains filtered or unexported fields
}
ProviderQuery is the builder for querying Provider entities.
func (*ProviderQuery) Aggregate ¶
func (pq *ProviderQuery) Aggregate(fns ...AggregateFunc) *ProviderSelect
Aggregate returns a ProviderSelect configured with the given aggregations.
func (*ProviderQuery) All ¶
func (pq *ProviderQuery) All(ctx context.Context) ([]*Provider, error)
All executes the query and returns a list of Providers.
func (*ProviderQuery) AllX ¶
func (pq *ProviderQuery) AllX(ctx context.Context) []*Provider
AllX is like All, but panics if an error occurs.
func (*ProviderQuery) Clone ¶
func (pq *ProviderQuery) Clone() *ProviderQuery
Clone returns a duplicate of the ProviderQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ProviderQuery) Count ¶
func (pq *ProviderQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ProviderQuery) CountX ¶
func (pq *ProviderQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ProviderQuery) Exist ¶
func (pq *ProviderQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ProviderQuery) ExistX ¶
func (pq *ProviderQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ProviderQuery) First ¶
func (pq *ProviderQuery) First(ctx context.Context) (*Provider, error)
First returns the first Provider entity from the query. Returns a *NotFoundError when no Provider was found.
func (*ProviderQuery) FirstID ¶
func (pq *ProviderQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Provider ID from the query. Returns a *NotFoundError when no Provider ID was found.
func (*ProviderQuery) FirstIDX ¶
func (pq *ProviderQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ProviderQuery) FirstX ¶
func (pq *ProviderQuery) FirstX(ctx context.Context) *Provider
FirstX is like First, but panics if an error occurs.
func (*ProviderQuery) GroupBy ¶
func (pq *ProviderQuery) GroupBy(field string, fields ...string) *ProviderGroupBy
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.Provider.Query(). GroupBy(provider.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ProviderQuery) IDs ¶
func (pq *ProviderQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Provider IDs.
func (*ProviderQuery) IDsX ¶
func (pq *ProviderQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ProviderQuery) Limit ¶
func (pq *ProviderQuery) Limit(limit int) *ProviderQuery
Limit the number of records to be returned by this query.
func (*ProviderQuery) Offset ¶
func (pq *ProviderQuery) Offset(offset int) *ProviderQuery
Offset to start from.
func (*ProviderQuery) Only ¶
func (pq *ProviderQuery) Only(ctx context.Context) (*Provider, error)
Only returns a single Provider entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Provider entity is found. Returns a *NotFoundError when no Provider entities are found.
func (*ProviderQuery) OnlyID ¶
func (pq *ProviderQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Provider ID in the query. Returns a *NotSingularError when more than one Provider ID is found. Returns a *NotFoundError when no entities are found.
func (*ProviderQuery) OnlyIDX ¶
func (pq *ProviderQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ProviderQuery) OnlyX ¶
func (pq *ProviderQuery) OnlyX(ctx context.Context) *Provider
OnlyX is like Only, but panics if an error occurs.
func (*ProviderQuery) Order ¶
func (pq *ProviderQuery) Order(o ...provider.OrderOption) *ProviderQuery
Order specifies how the records should be ordered.
func (*ProviderQuery) QuerySubscribes ¶
func (pq *ProviderQuery) QuerySubscribes() *SubscribeQuery
QuerySubscribes chains the current query on the "subscribes" edge.
func (*ProviderQuery) QueryUser ¶
func (pq *ProviderQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*ProviderQuery) Select ¶
func (pq *ProviderQuery) Select(fields ...string) *ProviderSelect
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.Provider.Query(). Select(provider.FieldName). Scan(ctx, &v)
func (*ProviderQuery) Unique ¶
func (pq *ProviderQuery) Unique(unique bool) *ProviderQuery
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 (*ProviderQuery) Where ¶
func (pq *ProviderQuery) Where(ps ...predicate.Provider) *ProviderQuery
Where adds a new predicate for the ProviderQuery builder.
func (*ProviderQuery) WithSubscribes ¶
func (pq *ProviderQuery) WithSubscribes(opts ...func(*SubscribeQuery)) *ProviderQuery
WithSubscribes tells the query-builder to eager-load the nodes that are connected to the "subscribes" edge. The optional arguments are used to configure the query builder of the edge.
func (*ProviderQuery) WithUser ¶
func (pq *ProviderQuery) WithUser(opts ...func(*UserQuery)) *ProviderQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type ProviderSelect ¶
type ProviderSelect struct { *ProviderQuery // contains filtered or unexported fields }
ProviderSelect is the builder for selecting fields of Provider entities.
func (*ProviderSelect) Aggregate ¶
func (ps *ProviderSelect) Aggregate(fns ...AggregateFunc) *ProviderSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ProviderSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ProviderSelect) Scan ¶
func (ps *ProviderSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ProviderSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ProviderUpdate ¶
type ProviderUpdate struct {
// contains filtered or unexported fields
}
ProviderUpdate is the builder for updating Provider entities.
func (*ProviderUpdate) AddSubscribeIDs ¶
func (pu *ProviderUpdate) AddSubscribeIDs(ids ...int) *ProviderUpdate
AddSubscribeIDs adds the "subscribes" edge to the Subscribe entity by IDs.
func (*ProviderUpdate) AddSubscribes ¶
func (pu *ProviderUpdate) AddSubscribes(s ...*Subscribe) *ProviderUpdate
AddSubscribes adds the "subscribes" edges to the Subscribe entity.
func (*ProviderUpdate) ClearSubscribes ¶
func (pu *ProviderUpdate) ClearSubscribes() *ProviderUpdate
ClearSubscribes clears all "subscribes" edges to the Subscribe entity.
func (*ProviderUpdate) ClearUser ¶
func (pu *ProviderUpdate) ClearUser() *ProviderUpdate
ClearUser clears the "user" edge to the User entity.
func (*ProviderUpdate) Exec ¶
func (pu *ProviderUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ProviderUpdate) ExecX ¶
func (pu *ProviderUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpdate) Mutation ¶
func (pu *ProviderUpdate) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderUpdate) RemoveSubscribeIDs ¶
func (pu *ProviderUpdate) RemoveSubscribeIDs(ids ...int) *ProviderUpdate
RemoveSubscribeIDs removes the "subscribes" edge to Subscribe entities by IDs.
func (*ProviderUpdate) RemoveSubscribes ¶
func (pu *ProviderUpdate) RemoveSubscribes(s ...*Subscribe) *ProviderUpdate
RemoveSubscribes removes "subscribes" edges to Subscribe entities.
func (*ProviderUpdate) Save ¶
func (pu *ProviderUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ProviderUpdate) SaveX ¶
func (pu *ProviderUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ProviderUpdate) SetName ¶
func (pu *ProviderUpdate) SetName(s string) *ProviderUpdate
SetName sets the "name" field.
func (*ProviderUpdate) SetNillableName ¶
func (pu *ProviderUpdate) SetNillableName(s *string) *ProviderUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ProviderUpdate) SetNillablePath ¶
func (pu *ProviderUpdate) SetNillablePath(s *string) *ProviderUpdate
SetNillablePath sets the "path" field if the given value is not nil.
func (*ProviderUpdate) SetNillableUserID ¶
func (pu *ProviderUpdate) SetNillableUserID(id *int) *ProviderUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ProviderUpdate) SetNillableVersion ¶
func (pu *ProviderUpdate) SetNillableVersion(s *string) *ProviderUpdate
SetNillableVersion sets the "version" field if the given value is not nil.
func (*ProviderUpdate) SetPath ¶
func (pu *ProviderUpdate) SetPath(s string) *ProviderUpdate
SetPath sets the "path" field.
func (*ProviderUpdate) SetUser ¶
func (pu *ProviderUpdate) SetUser(u *User) *ProviderUpdate
SetUser sets the "user" edge to the User entity.
func (*ProviderUpdate) SetUserID ¶
func (pu *ProviderUpdate) SetUserID(id int) *ProviderUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*ProviderUpdate) SetVersion ¶
func (pu *ProviderUpdate) SetVersion(s string) *ProviderUpdate
SetVersion sets the "version" field.
func (*ProviderUpdate) Where ¶
func (pu *ProviderUpdate) Where(ps ...predicate.Provider) *ProviderUpdate
Where appends a list predicates to the ProviderUpdate builder.
type ProviderUpdateOne ¶
type ProviderUpdateOne struct {
// contains filtered or unexported fields
}
ProviderUpdateOne is the builder for updating a single Provider entity.
func (*ProviderUpdateOne) AddSubscribeIDs ¶
func (puo *ProviderUpdateOne) AddSubscribeIDs(ids ...int) *ProviderUpdateOne
AddSubscribeIDs adds the "subscribes" edge to the Subscribe entity by IDs.
func (*ProviderUpdateOne) AddSubscribes ¶
func (puo *ProviderUpdateOne) AddSubscribes(s ...*Subscribe) *ProviderUpdateOne
AddSubscribes adds the "subscribes" edges to the Subscribe entity.
func (*ProviderUpdateOne) ClearSubscribes ¶
func (puo *ProviderUpdateOne) ClearSubscribes() *ProviderUpdateOne
ClearSubscribes clears all "subscribes" edges to the Subscribe entity.
func (*ProviderUpdateOne) ClearUser ¶
func (puo *ProviderUpdateOne) ClearUser() *ProviderUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*ProviderUpdateOne) Exec ¶
func (puo *ProviderUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ProviderUpdateOne) ExecX ¶
func (puo *ProviderUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ProviderUpdateOne) Mutation ¶
func (puo *ProviderUpdateOne) Mutation() *ProviderMutation
Mutation returns the ProviderMutation object of the builder.
func (*ProviderUpdateOne) RemoveSubscribeIDs ¶
func (puo *ProviderUpdateOne) RemoveSubscribeIDs(ids ...int) *ProviderUpdateOne
RemoveSubscribeIDs removes the "subscribes" edge to Subscribe entities by IDs.
func (*ProviderUpdateOne) RemoveSubscribes ¶
func (puo *ProviderUpdateOne) RemoveSubscribes(s ...*Subscribe) *ProviderUpdateOne
RemoveSubscribes removes "subscribes" edges to Subscribe entities.
func (*ProviderUpdateOne) Save ¶
func (puo *ProviderUpdateOne) Save(ctx context.Context) (*Provider, error)
Save executes the query and returns the updated Provider entity.
func (*ProviderUpdateOne) SaveX ¶
func (puo *ProviderUpdateOne) SaveX(ctx context.Context) *Provider
SaveX is like Save, but panics if an error occurs.
func (*ProviderUpdateOne) Select ¶
func (puo *ProviderUpdateOne) Select(field string, fields ...string) *ProviderUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ProviderUpdateOne) SetName ¶
func (puo *ProviderUpdateOne) SetName(s string) *ProviderUpdateOne
SetName sets the "name" field.
func (*ProviderUpdateOne) SetNillableName ¶
func (puo *ProviderUpdateOne) SetNillableName(s *string) *ProviderUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ProviderUpdateOne) SetNillablePath ¶
func (puo *ProviderUpdateOne) SetNillablePath(s *string) *ProviderUpdateOne
SetNillablePath sets the "path" field if the given value is not nil.
func (*ProviderUpdateOne) SetNillableUserID ¶
func (puo *ProviderUpdateOne) SetNillableUserID(id *int) *ProviderUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*ProviderUpdateOne) SetNillableVersion ¶
func (puo *ProviderUpdateOne) SetNillableVersion(s *string) *ProviderUpdateOne
SetNillableVersion sets the "version" field if the given value is not nil.
func (*ProviderUpdateOne) SetPath ¶
func (puo *ProviderUpdateOne) SetPath(s string) *ProviderUpdateOne
SetPath sets the "path" field.
func (*ProviderUpdateOne) SetUser ¶
func (puo *ProviderUpdateOne) SetUser(u *User) *ProviderUpdateOne
SetUser sets the "user" edge to the User entity.
func (*ProviderUpdateOne) SetUserID ¶
func (puo *ProviderUpdateOne) SetUserID(id int) *ProviderUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*ProviderUpdateOne) SetVersion ¶
func (puo *ProviderUpdateOne) SetVersion(s string) *ProviderUpdateOne
SetVersion sets the "version" field.
func (*ProviderUpdateOne) Where ¶
func (puo *ProviderUpdateOne) Where(ps ...predicate.Provider) *ProviderUpdateOne
Where appends a list predicates to the ProviderUpdate builder.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type RollbackFunc ¶
The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.
type RollbackHook ¶
type RollbackHook func(Rollbacker) Rollbacker
RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:
hook := func(next ent.Rollbacker) ent.Rollbacker { return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error { // Do some stuff before. if err := next.Rollback(ctx, tx); err != nil { return err } // Do some stuff after. return nil }) }
type Rollbacker ¶
Rollbacker is the interface that wraps the Rollback method.
type Subscribe ¶
type Subscribe struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Link holds the value of the "link" field. Link string `json:"link,omitempty"` // Conf holds the value of the "conf" field. Conf string `json:"conf,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the SubscribeQuery when eager-loading is set. Edges SubscribeEdges `json:"edges"` // contains filtered or unexported fields }
Subscribe is the model entity for the Subscribe schema.
func (*Subscribe) QueryNodes ¶
QueryNodes queries the "nodes" edge of the Subscribe entity.
func (*Subscribe) QueryProvider ¶
func (s *Subscribe) QueryProvider() *ProviderQuery
QueryProvider queries the "provider" edge of the Subscribe entity.
func (*Subscribe) Unwrap ¶
Unwrap unwraps the Subscribe 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 (*Subscribe) Update ¶
func (s *Subscribe) Update() *SubscribeUpdateOne
Update returns a builder for updating this Subscribe. Note that you need to call Subscribe.Unwrap() before calling this method if this Subscribe was returned from a transaction, and the transaction was committed or rolled back.
type SubscribeClient ¶
type SubscribeClient struct {
// contains filtered or unexported fields
}
SubscribeClient is a client for the Subscribe schema.
func NewSubscribeClient ¶
func NewSubscribeClient(c config) *SubscribeClient
NewSubscribeClient returns a client for the Subscribe from the given config.
func (*SubscribeClient) Create ¶
func (c *SubscribeClient) Create() *SubscribeCreate
Create returns a builder for creating a Subscribe entity.
func (*SubscribeClient) CreateBulk ¶
func (c *SubscribeClient) CreateBulk(builders ...*SubscribeCreate) *SubscribeCreateBulk
CreateBulk returns a builder for creating a bulk of Subscribe entities.
func (*SubscribeClient) Delete ¶
func (c *SubscribeClient) Delete() *SubscribeDelete
Delete returns a delete builder for Subscribe.
func (*SubscribeClient) DeleteOne ¶
func (c *SubscribeClient) DeleteOne(s *Subscribe) *SubscribeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*SubscribeClient) DeleteOneID ¶
func (c *SubscribeClient) DeleteOneID(id int) *SubscribeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*SubscribeClient) GetX ¶
func (c *SubscribeClient) GetX(ctx context.Context, id int) *Subscribe
GetX is like Get, but panics if an error occurs.
func (*SubscribeClient) Hooks ¶
func (c *SubscribeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*SubscribeClient) Intercept ¶
func (c *SubscribeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `subscribe.Intercept(f(g(h())))`.
func (*SubscribeClient) Interceptors ¶
func (c *SubscribeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*SubscribeClient) MapCreateBulk ¶
func (c *SubscribeClient) MapCreateBulk(slice any, setFunc func(*SubscribeCreate, int)) *SubscribeCreateBulk
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 (*SubscribeClient) Query ¶
func (c *SubscribeClient) Query() *SubscribeQuery
Query returns a query builder for Subscribe.
func (*SubscribeClient) QueryNodes ¶
func (c *SubscribeClient) QueryNodes(s *Subscribe) *NodeQuery
QueryNodes queries the nodes edge of a Subscribe.
func (*SubscribeClient) QueryProvider ¶
func (c *SubscribeClient) QueryProvider(s *Subscribe) *ProviderQuery
QueryProvider queries the provider edge of a Subscribe.
func (*SubscribeClient) QueryUser ¶
func (c *SubscribeClient) QueryUser(s *Subscribe) *UserQuery
QueryUser queries the user edge of a Subscribe.
func (*SubscribeClient) Update ¶
func (c *SubscribeClient) Update() *SubscribeUpdate
Update returns an update builder for Subscribe.
func (*SubscribeClient) UpdateOne ¶
func (c *SubscribeClient) UpdateOne(s *Subscribe) *SubscribeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*SubscribeClient) UpdateOneID ¶
func (c *SubscribeClient) UpdateOneID(id int) *SubscribeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*SubscribeClient) Use ¶
func (c *SubscribeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `subscribe.Hooks(f(g(h())))`.
type SubscribeCreate ¶
type SubscribeCreate struct {
// contains filtered or unexported fields
}
SubscribeCreate is the builder for creating a Subscribe entity.
func (*SubscribeCreate) AddNodeIDs ¶
func (sc *SubscribeCreate) AddNodeIDs(ids ...int) *SubscribeCreate
AddNodeIDs adds the "nodes" edge to the Node entity by IDs.
func (*SubscribeCreate) AddNodes ¶
func (sc *SubscribeCreate) AddNodes(n ...*Node) *SubscribeCreate
AddNodes adds the "nodes" edges to the Node entity.
func (*SubscribeCreate) Exec ¶
func (sc *SubscribeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscribeCreate) ExecX ¶
func (sc *SubscribeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscribeCreate) Mutation ¶
func (sc *SubscribeCreate) Mutation() *SubscribeMutation
Mutation returns the SubscribeMutation object of the builder.
func (*SubscribeCreate) Save ¶
func (sc *SubscribeCreate) Save(ctx context.Context) (*Subscribe, error)
Save creates the Subscribe in the database.
func (*SubscribeCreate) SaveX ¶
func (sc *SubscribeCreate) SaveX(ctx context.Context) *Subscribe
SaveX calls Save and panics if Save returns an error.
func (*SubscribeCreate) SetConf ¶
func (sc *SubscribeCreate) SetConf(s string) *SubscribeCreate
SetConf sets the "conf" field.
func (*SubscribeCreate) SetLink ¶
func (sc *SubscribeCreate) SetLink(s string) *SubscribeCreate
SetLink sets the "link" field.
func (*SubscribeCreate) SetName ¶
func (sc *SubscribeCreate) SetName(s string) *SubscribeCreate
SetName sets the "name" field.
func (*SubscribeCreate) SetNillableLink ¶
func (sc *SubscribeCreate) SetNillableLink(s *string) *SubscribeCreate
SetNillableLink sets the "link" field if the given value is not nil.
func (*SubscribeCreate) SetNillableProviderID ¶
func (sc *SubscribeCreate) SetNillableProviderID(id *int) *SubscribeCreate
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*SubscribeCreate) SetNillableUserID ¶
func (sc *SubscribeCreate) SetNillableUserID(id *int) *SubscribeCreate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*SubscribeCreate) SetProvider ¶
func (sc *SubscribeCreate) SetProvider(p *Provider) *SubscribeCreate
SetProvider sets the "provider" edge to the Provider entity.
func (*SubscribeCreate) SetProviderID ¶
func (sc *SubscribeCreate) SetProviderID(id int) *SubscribeCreate
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*SubscribeCreate) SetUser ¶
func (sc *SubscribeCreate) SetUser(u *User) *SubscribeCreate
SetUser sets the "user" edge to the User entity.
func (*SubscribeCreate) SetUserID ¶
func (sc *SubscribeCreate) SetUserID(id int) *SubscribeCreate
SetUserID sets the "user" edge to the User entity by ID.
type SubscribeCreateBulk ¶
type SubscribeCreateBulk struct {
// contains filtered or unexported fields
}
SubscribeCreateBulk is the builder for creating many Subscribe entities in bulk.
func (*SubscribeCreateBulk) Exec ¶
func (scb *SubscribeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscribeCreateBulk) ExecX ¶
func (scb *SubscribeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type SubscribeDelete ¶
type SubscribeDelete struct {
// contains filtered or unexported fields
}
SubscribeDelete is the builder for deleting a Subscribe entity.
func (*SubscribeDelete) Exec ¶
func (sd *SubscribeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*SubscribeDelete) ExecX ¶
func (sd *SubscribeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*SubscribeDelete) Where ¶
func (sd *SubscribeDelete) Where(ps ...predicate.Subscribe) *SubscribeDelete
Where appends a list predicates to the SubscribeDelete builder.
type SubscribeDeleteOne ¶
type SubscribeDeleteOne struct {
// contains filtered or unexported fields
}
SubscribeDeleteOne is the builder for deleting a single Subscribe entity.
func (*SubscribeDeleteOne) Exec ¶
func (sdo *SubscribeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*SubscribeDeleteOne) ExecX ¶
func (sdo *SubscribeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscribeDeleteOne) Where ¶
func (sdo *SubscribeDeleteOne) Where(ps ...predicate.Subscribe) *SubscribeDeleteOne
Where appends a list predicates to the SubscribeDelete builder.
type SubscribeEdges ¶
type SubscribeEdges struct { // Provider holds the value of the provider edge. Provider *Provider `json:"provider,omitempty"` // User holds the value of the user edge. User *User `json:"user,omitempty"` // Nodes holds the value of the nodes edge. Nodes []*Node `json:"nodes,omitempty"` // contains filtered or unexported fields }
SubscribeEdges holds the relations/edges for other nodes in the graph.
func (SubscribeEdges) NodesOrErr ¶
func (e SubscribeEdges) NodesOrErr() ([]*Node, error)
NodesOrErr returns the Nodes value or an error if the edge was not loaded in eager-loading.
func (SubscribeEdges) ProviderOrErr ¶
func (e SubscribeEdges) ProviderOrErr() (*Provider, error)
ProviderOrErr returns the Provider value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (SubscribeEdges) UserOrErr ¶
func (e SubscribeEdges) UserOrErr() (*User, error)
UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
type SubscribeGroupBy ¶
type SubscribeGroupBy struct {
// contains filtered or unexported fields
}
SubscribeGroupBy is the group-by builder for Subscribe entities.
func (*SubscribeGroupBy) Aggregate ¶
func (sgb *SubscribeGroupBy) Aggregate(fns ...AggregateFunc) *SubscribeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*SubscribeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscribeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscribeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscribeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscribeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscribeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscribeGroupBy) Scan ¶
func (sgb *SubscribeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SubscribeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscribeMutation ¶
type SubscribeMutation struct {
// contains filtered or unexported fields
}
SubscribeMutation represents an operation that mutates the Subscribe nodes in the graph.
func (*SubscribeMutation) AddField ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) AddNodeIDs ¶
func (m *SubscribeMutation) AddNodeIDs(ids ...int)
AddNodeIDs adds the "nodes" edge to the Node entity by ids.
func (*SubscribeMutation) AddedEdges ¶
func (m *SubscribeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*SubscribeMutation) AddedField ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) AddedFields ¶
func (m *SubscribeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*SubscribeMutation) AddedIDs ¶
func (m *SubscribeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*SubscribeMutation) ClearEdge ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) ClearField ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) ClearLink ¶
func (m *SubscribeMutation) ClearLink()
ClearLink clears the value of the "link" field.
func (*SubscribeMutation) ClearNodes ¶
func (m *SubscribeMutation) ClearNodes()
ClearNodes clears the "nodes" edge to the Node entity.
func (*SubscribeMutation) ClearProvider ¶
func (m *SubscribeMutation) ClearProvider()
ClearProvider clears the "provider" edge to the Provider entity.
func (*SubscribeMutation) ClearUser ¶
func (m *SubscribeMutation) ClearUser()
ClearUser clears the "user" edge to the User entity.
func (*SubscribeMutation) ClearedEdges ¶
func (m *SubscribeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*SubscribeMutation) ClearedFields ¶
func (m *SubscribeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (SubscribeMutation) Client ¶
func (m SubscribeMutation) 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 (*SubscribeMutation) Conf ¶
func (m *SubscribeMutation) Conf() (r string, exists bool)
Conf returns the value of the "conf" field in the mutation.
func (*SubscribeMutation) EdgeCleared ¶
func (m *SubscribeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*SubscribeMutation) Field ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) FieldCleared ¶
func (m *SubscribeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*SubscribeMutation) Fields ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) ID ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) IDs ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) Link ¶
func (m *SubscribeMutation) Link() (r string, exists bool)
Link returns the value of the "link" field in the mutation.
func (*SubscribeMutation) LinkCleared ¶
func (m *SubscribeMutation) LinkCleared() bool
LinkCleared returns if the "link" field was cleared in this mutation.
func (*SubscribeMutation) Name ¶
func (m *SubscribeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*SubscribeMutation) NodesCleared ¶
func (m *SubscribeMutation) NodesCleared() bool
NodesCleared reports if the "nodes" edge to the Node entity was cleared.
func (*SubscribeMutation) NodesIDs ¶
func (m *SubscribeMutation) NodesIDs() (ids []int)
NodesIDs returns the "nodes" edge IDs in the mutation.
func (*SubscribeMutation) OldConf ¶
func (m *SubscribeMutation) OldConf(ctx context.Context) (v string, err error)
OldConf returns the old "conf" field's value of the Subscribe entity. If the Subscribe object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscribeMutation) 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 (*SubscribeMutation) OldLink ¶
func (m *SubscribeMutation) OldLink(ctx context.Context) (v string, err error)
OldLink returns the old "link" field's value of the Subscribe entity. If the Subscribe object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscribeMutation) OldName ¶
func (m *SubscribeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Subscribe entity. If the Subscribe object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*SubscribeMutation) ProviderCleared ¶
func (m *SubscribeMutation) ProviderCleared() bool
ProviderCleared reports if the "provider" edge to the Provider entity was cleared.
func (*SubscribeMutation) ProviderID ¶
func (m *SubscribeMutation) ProviderID() (id int, exists bool)
ProviderID returns the "provider" edge ID in the mutation.
func (*SubscribeMutation) ProviderIDs ¶
func (m *SubscribeMutation) ProviderIDs() (ids []int)
ProviderIDs returns the "provider" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProviderID instead. It exists only for internal usage by the builders.
func (*SubscribeMutation) RemoveNodeIDs ¶
func (m *SubscribeMutation) RemoveNodeIDs(ids ...int)
RemoveNodeIDs removes the "nodes" edge to the Node entity by IDs.
func (*SubscribeMutation) RemovedEdges ¶
func (m *SubscribeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*SubscribeMutation) RemovedIDs ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) RemovedNodesIDs ¶
func (m *SubscribeMutation) RemovedNodesIDs() (ids []int)
RemovedNodes returns the removed IDs of the "nodes" edge to the Node entity.
func (*SubscribeMutation) ResetConf ¶
func (m *SubscribeMutation) ResetConf()
ResetConf resets all changes to the "conf" field.
func (*SubscribeMutation) ResetEdge ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) ResetField ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) ResetLink ¶
func (m *SubscribeMutation) ResetLink()
ResetLink resets all changes to the "link" field.
func (*SubscribeMutation) ResetName ¶
func (m *SubscribeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*SubscribeMutation) ResetNodes ¶
func (m *SubscribeMutation) ResetNodes()
ResetNodes resets all changes to the "nodes" edge.
func (*SubscribeMutation) ResetProvider ¶
func (m *SubscribeMutation) ResetProvider()
ResetProvider resets all changes to the "provider" edge.
func (*SubscribeMutation) ResetUser ¶
func (m *SubscribeMutation) ResetUser()
ResetUser resets all changes to the "user" edge.
func (*SubscribeMutation) SetConf ¶
func (m *SubscribeMutation) SetConf(s string)
SetConf sets the "conf" field.
func (*SubscribeMutation) SetField ¶
func (m *SubscribeMutation) 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 (*SubscribeMutation) SetLink ¶
func (m *SubscribeMutation) SetLink(s string)
SetLink sets the "link" field.
func (*SubscribeMutation) SetName ¶
func (m *SubscribeMutation) SetName(s string)
SetName sets the "name" field.
func (*SubscribeMutation) SetOp ¶
func (m *SubscribeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*SubscribeMutation) SetProviderID ¶
func (m *SubscribeMutation) SetProviderID(id int)
SetProviderID sets the "provider" edge to the Provider entity by id.
func (*SubscribeMutation) SetUserID ¶
func (m *SubscribeMutation) SetUserID(id int)
SetUserID sets the "user" edge to the User entity by id.
func (SubscribeMutation) Tx ¶
func (m SubscribeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*SubscribeMutation) Type ¶
func (m *SubscribeMutation) Type() string
Type returns the node type of this mutation (Subscribe).
func (*SubscribeMutation) UserCleared ¶
func (m *SubscribeMutation) UserCleared() bool
UserCleared reports if the "user" edge to the User entity was cleared.
func (*SubscribeMutation) UserID ¶
func (m *SubscribeMutation) UserID() (id int, exists bool)
UserID returns the "user" edge ID in the mutation.
func (*SubscribeMutation) UserIDs ¶
func (m *SubscribeMutation) UserIDs() (ids []int)
UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.
func (*SubscribeMutation) Where ¶
func (m *SubscribeMutation) Where(ps ...predicate.Subscribe)
Where appends a list predicates to the SubscribeMutation builder.
func (*SubscribeMutation) WhereP ¶
func (m *SubscribeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the SubscribeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type SubscribeQuery ¶
type SubscribeQuery struct {
// contains filtered or unexported fields
}
SubscribeQuery is the builder for querying Subscribe entities.
func (*SubscribeQuery) Aggregate ¶
func (sq *SubscribeQuery) Aggregate(fns ...AggregateFunc) *SubscribeSelect
Aggregate returns a SubscribeSelect configured with the given aggregations.
func (*SubscribeQuery) All ¶
func (sq *SubscribeQuery) All(ctx context.Context) ([]*Subscribe, error)
All executes the query and returns a list of Subscribes.
func (*SubscribeQuery) AllX ¶
func (sq *SubscribeQuery) AllX(ctx context.Context) []*Subscribe
AllX is like All, but panics if an error occurs.
func (*SubscribeQuery) Clone ¶
func (sq *SubscribeQuery) Clone() *SubscribeQuery
Clone returns a duplicate of the SubscribeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*SubscribeQuery) Count ¶
func (sq *SubscribeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*SubscribeQuery) CountX ¶
func (sq *SubscribeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*SubscribeQuery) Exist ¶
func (sq *SubscribeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*SubscribeQuery) ExistX ¶
func (sq *SubscribeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*SubscribeQuery) First ¶
func (sq *SubscribeQuery) First(ctx context.Context) (*Subscribe, error)
First returns the first Subscribe entity from the query. Returns a *NotFoundError when no Subscribe was found.
func (*SubscribeQuery) FirstID ¶
func (sq *SubscribeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Subscribe ID from the query. Returns a *NotFoundError when no Subscribe ID was found.
func (*SubscribeQuery) FirstIDX ¶
func (sq *SubscribeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*SubscribeQuery) FirstX ¶
func (sq *SubscribeQuery) FirstX(ctx context.Context) *Subscribe
FirstX is like First, but panics if an error occurs.
func (*SubscribeQuery) GroupBy ¶
func (sq *SubscribeQuery) GroupBy(field string, fields ...string) *SubscribeGroupBy
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.Subscribe.Query(). GroupBy(subscribe.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*SubscribeQuery) IDs ¶
func (sq *SubscribeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Subscribe IDs.
func (*SubscribeQuery) IDsX ¶
func (sq *SubscribeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*SubscribeQuery) Limit ¶
func (sq *SubscribeQuery) Limit(limit int) *SubscribeQuery
Limit the number of records to be returned by this query.
func (*SubscribeQuery) Offset ¶
func (sq *SubscribeQuery) Offset(offset int) *SubscribeQuery
Offset to start from.
func (*SubscribeQuery) Only ¶
func (sq *SubscribeQuery) Only(ctx context.Context) (*Subscribe, error)
Only returns a single Subscribe entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Subscribe entity is found. Returns a *NotFoundError when no Subscribe entities are found.
func (*SubscribeQuery) OnlyID ¶
func (sq *SubscribeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Subscribe ID in the query. Returns a *NotSingularError when more than one Subscribe ID is found. Returns a *NotFoundError when no entities are found.
func (*SubscribeQuery) OnlyIDX ¶
func (sq *SubscribeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*SubscribeQuery) OnlyX ¶
func (sq *SubscribeQuery) OnlyX(ctx context.Context) *Subscribe
OnlyX is like Only, but panics if an error occurs.
func (*SubscribeQuery) Order ¶
func (sq *SubscribeQuery) Order(o ...subscribe.OrderOption) *SubscribeQuery
Order specifies how the records should be ordered.
func (*SubscribeQuery) QueryNodes ¶
func (sq *SubscribeQuery) QueryNodes() *NodeQuery
QueryNodes chains the current query on the "nodes" edge.
func (*SubscribeQuery) QueryProvider ¶
func (sq *SubscribeQuery) QueryProvider() *ProviderQuery
QueryProvider chains the current query on the "provider" edge.
func (*SubscribeQuery) QueryUser ¶
func (sq *SubscribeQuery) QueryUser() *UserQuery
QueryUser chains the current query on the "user" edge.
func (*SubscribeQuery) Select ¶
func (sq *SubscribeQuery) Select(fields ...string) *SubscribeSelect
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.Subscribe.Query(). Select(subscribe.FieldName). Scan(ctx, &v)
func (*SubscribeQuery) Unique ¶
func (sq *SubscribeQuery) Unique(unique bool) *SubscribeQuery
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 (*SubscribeQuery) Where ¶
func (sq *SubscribeQuery) Where(ps ...predicate.Subscribe) *SubscribeQuery
Where adds a new predicate for the SubscribeQuery builder.
func (*SubscribeQuery) WithNodes ¶
func (sq *SubscribeQuery) WithNodes(opts ...func(*NodeQuery)) *SubscribeQuery
WithNodes tells the query-builder to eager-load the nodes that are connected to the "nodes" edge. The optional arguments are used to configure the query builder of the edge.
func (*SubscribeQuery) WithProvider ¶
func (sq *SubscribeQuery) WithProvider(opts ...func(*ProviderQuery)) *SubscribeQuery
WithProvider tells the query-builder to eager-load the nodes that are connected to the "provider" edge. The optional arguments are used to configure the query builder of the edge.
func (*SubscribeQuery) WithUser ¶
func (sq *SubscribeQuery) WithUser(opts ...func(*UserQuery)) *SubscribeQuery
WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.
type SubscribeSelect ¶
type SubscribeSelect struct { *SubscribeQuery // contains filtered or unexported fields }
SubscribeSelect is the builder for selecting fields of Subscribe entities.
func (*SubscribeSelect) Aggregate ¶
func (ss *SubscribeSelect) Aggregate(fns ...AggregateFunc) *SubscribeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*SubscribeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*SubscribeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*SubscribeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*SubscribeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*SubscribeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*SubscribeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*SubscribeSelect) Scan ¶
func (ss *SubscribeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*SubscribeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type SubscribeUpdate ¶
type SubscribeUpdate struct {
// contains filtered or unexported fields
}
SubscribeUpdate is the builder for updating Subscribe entities.
func (*SubscribeUpdate) AddNodeIDs ¶
func (su *SubscribeUpdate) AddNodeIDs(ids ...int) *SubscribeUpdate
AddNodeIDs adds the "nodes" edge to the Node entity by IDs.
func (*SubscribeUpdate) AddNodes ¶
func (su *SubscribeUpdate) AddNodes(n ...*Node) *SubscribeUpdate
AddNodes adds the "nodes" edges to the Node entity.
func (*SubscribeUpdate) ClearLink ¶
func (su *SubscribeUpdate) ClearLink() *SubscribeUpdate
ClearLink clears the value of the "link" field.
func (*SubscribeUpdate) ClearNodes ¶
func (su *SubscribeUpdate) ClearNodes() *SubscribeUpdate
ClearNodes clears all "nodes" edges to the Node entity.
func (*SubscribeUpdate) ClearProvider ¶
func (su *SubscribeUpdate) ClearProvider() *SubscribeUpdate
ClearProvider clears the "provider" edge to the Provider entity.
func (*SubscribeUpdate) ClearUser ¶
func (su *SubscribeUpdate) ClearUser() *SubscribeUpdate
ClearUser clears the "user" edge to the User entity.
func (*SubscribeUpdate) Exec ¶
func (su *SubscribeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*SubscribeUpdate) ExecX ¶
func (su *SubscribeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscribeUpdate) Mutation ¶
func (su *SubscribeUpdate) Mutation() *SubscribeMutation
Mutation returns the SubscribeMutation object of the builder.
func (*SubscribeUpdate) RemoveNodeIDs ¶
func (su *SubscribeUpdate) RemoveNodeIDs(ids ...int) *SubscribeUpdate
RemoveNodeIDs removes the "nodes" edge to Node entities by IDs.
func (*SubscribeUpdate) RemoveNodes ¶
func (su *SubscribeUpdate) RemoveNodes(n ...*Node) *SubscribeUpdate
RemoveNodes removes "nodes" edges to Node entities.
func (*SubscribeUpdate) Save ¶
func (su *SubscribeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*SubscribeUpdate) SaveX ¶
func (su *SubscribeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*SubscribeUpdate) SetConf ¶
func (su *SubscribeUpdate) SetConf(s string) *SubscribeUpdate
SetConf sets the "conf" field.
func (*SubscribeUpdate) SetLink ¶
func (su *SubscribeUpdate) SetLink(s string) *SubscribeUpdate
SetLink sets the "link" field.
func (*SubscribeUpdate) SetName ¶
func (su *SubscribeUpdate) SetName(s string) *SubscribeUpdate
SetName sets the "name" field.
func (*SubscribeUpdate) SetNillableConf ¶
func (su *SubscribeUpdate) SetNillableConf(s *string) *SubscribeUpdate
SetNillableConf sets the "conf" field if the given value is not nil.
func (*SubscribeUpdate) SetNillableLink ¶
func (su *SubscribeUpdate) SetNillableLink(s *string) *SubscribeUpdate
SetNillableLink sets the "link" field if the given value is not nil.
func (*SubscribeUpdate) SetNillableName ¶
func (su *SubscribeUpdate) SetNillableName(s *string) *SubscribeUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*SubscribeUpdate) SetNillableProviderID ¶
func (su *SubscribeUpdate) SetNillableProviderID(id *int) *SubscribeUpdate
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*SubscribeUpdate) SetNillableUserID ¶
func (su *SubscribeUpdate) SetNillableUserID(id *int) *SubscribeUpdate
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*SubscribeUpdate) SetProvider ¶
func (su *SubscribeUpdate) SetProvider(p *Provider) *SubscribeUpdate
SetProvider sets the "provider" edge to the Provider entity.
func (*SubscribeUpdate) SetProviderID ¶
func (su *SubscribeUpdate) SetProviderID(id int) *SubscribeUpdate
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*SubscribeUpdate) SetUser ¶
func (su *SubscribeUpdate) SetUser(u *User) *SubscribeUpdate
SetUser sets the "user" edge to the User entity.
func (*SubscribeUpdate) SetUserID ¶
func (su *SubscribeUpdate) SetUserID(id int) *SubscribeUpdate
SetUserID sets the "user" edge to the User entity by ID.
func (*SubscribeUpdate) Where ¶
func (su *SubscribeUpdate) Where(ps ...predicate.Subscribe) *SubscribeUpdate
Where appends a list predicates to the SubscribeUpdate builder.
type SubscribeUpdateOne ¶
type SubscribeUpdateOne struct {
// contains filtered or unexported fields
}
SubscribeUpdateOne is the builder for updating a single Subscribe entity.
func (*SubscribeUpdateOne) AddNodeIDs ¶
func (suo *SubscribeUpdateOne) AddNodeIDs(ids ...int) *SubscribeUpdateOne
AddNodeIDs adds the "nodes" edge to the Node entity by IDs.
func (*SubscribeUpdateOne) AddNodes ¶
func (suo *SubscribeUpdateOne) AddNodes(n ...*Node) *SubscribeUpdateOne
AddNodes adds the "nodes" edges to the Node entity.
func (*SubscribeUpdateOne) ClearLink ¶
func (suo *SubscribeUpdateOne) ClearLink() *SubscribeUpdateOne
ClearLink clears the value of the "link" field.
func (*SubscribeUpdateOne) ClearNodes ¶
func (suo *SubscribeUpdateOne) ClearNodes() *SubscribeUpdateOne
ClearNodes clears all "nodes" edges to the Node entity.
func (*SubscribeUpdateOne) ClearProvider ¶
func (suo *SubscribeUpdateOne) ClearProvider() *SubscribeUpdateOne
ClearProvider clears the "provider" edge to the Provider entity.
func (*SubscribeUpdateOne) ClearUser ¶
func (suo *SubscribeUpdateOne) ClearUser() *SubscribeUpdateOne
ClearUser clears the "user" edge to the User entity.
func (*SubscribeUpdateOne) Exec ¶
func (suo *SubscribeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*SubscribeUpdateOne) ExecX ¶
func (suo *SubscribeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*SubscribeUpdateOne) Mutation ¶
func (suo *SubscribeUpdateOne) Mutation() *SubscribeMutation
Mutation returns the SubscribeMutation object of the builder.
func (*SubscribeUpdateOne) RemoveNodeIDs ¶
func (suo *SubscribeUpdateOne) RemoveNodeIDs(ids ...int) *SubscribeUpdateOne
RemoveNodeIDs removes the "nodes" edge to Node entities by IDs.
func (*SubscribeUpdateOne) RemoveNodes ¶
func (suo *SubscribeUpdateOne) RemoveNodes(n ...*Node) *SubscribeUpdateOne
RemoveNodes removes "nodes" edges to Node entities.
func (*SubscribeUpdateOne) Save ¶
func (suo *SubscribeUpdateOne) Save(ctx context.Context) (*Subscribe, error)
Save executes the query and returns the updated Subscribe entity.
func (*SubscribeUpdateOne) SaveX ¶
func (suo *SubscribeUpdateOne) SaveX(ctx context.Context) *Subscribe
SaveX is like Save, but panics if an error occurs.
func (*SubscribeUpdateOne) Select ¶
func (suo *SubscribeUpdateOne) Select(field string, fields ...string) *SubscribeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*SubscribeUpdateOne) SetConf ¶
func (suo *SubscribeUpdateOne) SetConf(s string) *SubscribeUpdateOne
SetConf sets the "conf" field.
func (*SubscribeUpdateOne) SetLink ¶
func (suo *SubscribeUpdateOne) SetLink(s string) *SubscribeUpdateOne
SetLink sets the "link" field.
func (*SubscribeUpdateOne) SetName ¶
func (suo *SubscribeUpdateOne) SetName(s string) *SubscribeUpdateOne
SetName sets the "name" field.
func (*SubscribeUpdateOne) SetNillableConf ¶
func (suo *SubscribeUpdateOne) SetNillableConf(s *string) *SubscribeUpdateOne
SetNillableConf sets the "conf" field if the given value is not nil.
func (*SubscribeUpdateOne) SetNillableLink ¶
func (suo *SubscribeUpdateOne) SetNillableLink(s *string) *SubscribeUpdateOne
SetNillableLink sets the "link" field if the given value is not nil.
func (*SubscribeUpdateOne) SetNillableName ¶
func (suo *SubscribeUpdateOne) SetNillableName(s *string) *SubscribeUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*SubscribeUpdateOne) SetNillableProviderID ¶
func (suo *SubscribeUpdateOne) SetNillableProviderID(id *int) *SubscribeUpdateOne
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*SubscribeUpdateOne) SetNillableUserID ¶
func (suo *SubscribeUpdateOne) SetNillableUserID(id *int) *SubscribeUpdateOne
SetNillableUserID sets the "user" edge to the User entity by ID if the given value is not nil.
func (*SubscribeUpdateOne) SetProvider ¶
func (suo *SubscribeUpdateOne) SetProvider(p *Provider) *SubscribeUpdateOne
SetProvider sets the "provider" edge to the Provider entity.
func (*SubscribeUpdateOne) SetProviderID ¶
func (suo *SubscribeUpdateOne) SetProviderID(id int) *SubscribeUpdateOne
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*SubscribeUpdateOne) SetUser ¶
func (suo *SubscribeUpdateOne) SetUser(u *User) *SubscribeUpdateOne
SetUser sets the "user" edge to the User entity.
func (*SubscribeUpdateOne) SetUserID ¶
func (suo *SubscribeUpdateOne) SetUserID(id int) *SubscribeUpdateOne
SetUserID sets the "user" edge to the User entity by ID.
func (*SubscribeUpdateOne) Where ¶
func (suo *SubscribeUpdateOne) Where(ps ...predicate.Subscribe) *SubscribeUpdateOne
Where appends a list predicates to the SubscribeUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Daemon is the client for interacting with the Daemon builders. Daemon *DaemonClient // Node is the client for interacting with the Node builders. Node *NodeClient // Provider is the client for interacting with the Provider builders. Provider *ProviderClient // Subscribe is the client for interacting with the Subscribe builders. Subscribe *SubscribeClient // User is the client for interacting with the User builders. User *UserClient // contains filtered or unexported fields }
Tx is a transactional client that is created by calling Client.Tx().
func TxFromContext ¶
TxFromContext returns a Tx stored inside a context, or nil if there isn't one.
func (*Tx) OnRollback ¶
func (tx *Tx) OnRollback(f RollbackHook)
OnRollback adds a hook to call on rollback.
type User ¶
type User struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Active holds the value of the "active" field. Active bool `json:"active,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) QueryDaemon ¶
func (u *User) QueryDaemon() *DaemonQuery
QueryDaemon queries the "daemon" edge of the User entity.
func (*User) QueryProvider ¶
func (u *User) QueryProvider() *ProviderQuery
QueryProvider queries the "provider" edge of the User entity.
func (*User) QuerySubscribe ¶
func (u *User) QuerySubscribe() *SubscribeQuery
QuerySubscribe queries the "subscribe" 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) QueryDaemon ¶
func (c *UserClient) QueryDaemon(u *User) *DaemonQuery
QueryDaemon queries the daemon edge of a User.
func (*UserClient) QueryProvider ¶
func (c *UserClient) QueryProvider(u *User) *ProviderQuery
QueryProvider queries the provider edge of a User.
func (*UserClient) QuerySubscribe ¶
func (c *UserClient) QuerySubscribe(u *User) *SubscribeQuery
QuerySubscribe queries the subscribe 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 UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetActive ¶
func (uc *UserCreate) SetActive(b bool) *UserCreate
SetActive sets the "active" field.
func (*UserCreate) SetDaemon ¶
func (uc *UserCreate) SetDaemon(d *Daemon) *UserCreate
SetDaemon sets the "daemon" edge to the Daemon entity.
func (*UserCreate) SetDaemonID ¶
func (uc *UserCreate) SetDaemonID(id int) *UserCreate
SetDaemonID sets the "daemon" edge to the Daemon entity by ID.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableActive ¶
func (uc *UserCreate) SetNillableActive(b *bool) *UserCreate
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserCreate) SetNillableDaemonID ¶
func (uc *UserCreate) SetNillableDaemonID(id *int) *UserCreate
SetNillableDaemonID sets the "daemon" edge to the Daemon entity by ID if the given value is not nil.
func (*UserCreate) SetNillableProviderID ¶
func (uc *UserCreate) SetNillableProviderID(id *int) *UserCreate
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*UserCreate) SetNillableSubscribeID ¶
func (uc *UserCreate) SetNillableSubscribeID(id *int) *UserCreate
SetNillableSubscribeID sets the "subscribe" edge to the Subscribe entity by ID if the given value is not nil.
func (*UserCreate) SetProvider ¶
func (uc *UserCreate) SetProvider(p *Provider) *UserCreate
SetProvider sets the "provider" edge to the Provider entity.
func (*UserCreate) SetProviderID ¶
func (uc *UserCreate) SetProviderID(id int) *UserCreate
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*UserCreate) SetSubscribe ¶
func (uc *UserCreate) SetSubscribe(s *Subscribe) *UserCreate
SetSubscribe sets the "subscribe" edge to the Subscribe entity.
func (*UserCreate) SetSubscribeID ¶
func (uc *UserCreate) SetSubscribeID(id int) *UserCreate
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by ID.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Provider holds the value of the provider edge. Provider *Provider `json:"provider,omitempty"` // Subscribe holds the value of the subscribe edge. Subscribe *Subscribe `json:"subscribe,omitempty"` // Daemon holds the value of the daemon edge. Daemon *Daemon `json:"daemon,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) DaemonOrErr ¶
DaemonOrErr returns the Daemon value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) ProviderOrErr ¶
ProviderOrErr returns the Provider value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
func (UserEdges) SubscribeOrErr ¶
SubscribeOrErr returns the Subscribe value or an error if the edge was not loaded in eager-loading, or loaded but was not found.
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) Active ¶
func (m *UserMutation) Active() (r bool, exists bool)
Active returns the value of the "active" field in the mutation.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearDaemon ¶
func (m *UserMutation) ClearDaemon()
ClearDaemon clears the "daemon" edge to the Daemon entity.
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) ClearProvider ¶
func (m *UserMutation) ClearProvider()
ClearProvider clears the "provider" edge to the Provider entity.
func (*UserMutation) ClearSubscribe ¶
func (m *UserMutation) ClearSubscribe()
ClearSubscribe clears the "subscribe" edge to the Subscribe 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) DaemonCleared ¶
func (m *UserMutation) DaemonCleared() bool
DaemonCleared reports if the "daemon" edge to the Daemon entity was cleared.
func (*UserMutation) DaemonID ¶
func (m *UserMutation) DaemonID() (id int, exists bool)
DaemonID returns the "daemon" edge ID in the mutation.
func (*UserMutation) DaemonIDs ¶
func (m *UserMutation) DaemonIDs() (ids []int)
DaemonIDs returns the "daemon" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DaemonID instead. It exists only for internal usage by the builders.
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) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldActive ¶
func (m *UserMutation) OldActive(ctx context.Context) (v bool, err error)
OldActive returns the old "active" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) 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) ProviderCleared ¶
func (m *UserMutation) ProviderCleared() bool
ProviderCleared reports if the "provider" edge to the Provider entity was cleared.
func (*UserMutation) ProviderID ¶
func (m *UserMutation) ProviderID() (id int, exists bool)
ProviderID returns the "provider" edge ID in the mutation.
func (*UserMutation) ProviderIDs ¶
func (m *UserMutation) ProviderIDs() (ids []int)
ProviderIDs returns the "provider" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ProviderID instead. It exists only for internal usage by the builders.
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) ResetActive ¶
func (m *UserMutation) ResetActive()
ResetActive resets all changes to the "active" field.
func (*UserMutation) ResetDaemon ¶
func (m *UserMutation) ResetDaemon()
ResetDaemon resets all changes to the "daemon" edge.
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) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetProvider ¶
func (m *UserMutation) ResetProvider()
ResetProvider resets all changes to the "provider" edge.
func (*UserMutation) ResetSubscribe ¶
func (m *UserMutation) ResetSubscribe()
ResetSubscribe resets all changes to the "subscribe" edge.
func (*UserMutation) SetActive ¶
func (m *UserMutation) SetActive(b bool)
SetActive sets the "active" field.
func (*UserMutation) SetDaemonID ¶
func (m *UserMutation) SetDaemonID(id int)
SetDaemonID sets the "daemon" edge to the Daemon entity by id.
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) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetProviderID ¶
func (m *UserMutation) SetProviderID(id int)
SetProviderID sets the "provider" edge to the Provider entity by id.
func (*UserMutation) SetSubscribeID ¶
func (m *UserMutation) SetSubscribeID(id int)
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by id.
func (*UserMutation) SubscribeCleared ¶
func (m *UserMutation) SubscribeCleared() bool
SubscribeCleared reports if the "subscribe" edge to the Subscribe entity was cleared.
func (*UserMutation) SubscribeID ¶
func (m *UserMutation) SubscribeID() (id int, exists bool)
SubscribeID returns the "subscribe" edge ID in the mutation.
func (*UserMutation) SubscribeIDs ¶
func (m *UserMutation) SubscribeIDs() (ids []int)
SubscribeIDs returns the "subscribe" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use SubscribeID instead. It exists only for internal usage by the builders.
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 UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { 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) QueryDaemon ¶
func (uq *UserQuery) QueryDaemon() *DaemonQuery
QueryDaemon chains the current query on the "daemon" edge.
func (*UserQuery) QueryProvider ¶
func (uq *UserQuery) QueryProvider() *ProviderQuery
QueryProvider chains the current query on the "provider" edge.
func (*UserQuery) QuerySubscribe ¶
func (uq *UserQuery) QuerySubscribe() *SubscribeQuery
QuerySubscribe chains the current query on the "subscribe" 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) WithDaemon ¶
func (uq *UserQuery) WithDaemon(opts ...func(*DaemonQuery)) *UserQuery
WithDaemon tells the query-builder to eager-load the nodes that are connected to the "daemon" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithProvider ¶
func (uq *UserQuery) WithProvider(opts ...func(*ProviderQuery)) *UserQuery
WithProvider tells the query-builder to eager-load the nodes that are connected to the "provider" edge. The optional arguments are used to configure the query builder of the edge.
func (*UserQuery) WithSubscribe ¶
func (uq *UserQuery) WithSubscribe(opts ...func(*SubscribeQuery)) *UserQuery
WithSubscribe tells the query-builder to eager-load the nodes that are connected to the "subscribe" edge. 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) ClearDaemon ¶
func (uu *UserUpdate) ClearDaemon() *UserUpdate
ClearDaemon clears the "daemon" edge to the Daemon entity.
func (*UserUpdate) ClearProvider ¶
func (uu *UserUpdate) ClearProvider() *UserUpdate
ClearProvider clears the "provider" edge to the Provider entity.
func (*UserUpdate) ClearSubscribe ¶
func (uu *UserUpdate) ClearSubscribe() *UserUpdate
ClearSubscribe clears the "subscribe" edge to the Subscribe 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) 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) SetActive ¶
func (uu *UserUpdate) SetActive(b bool) *UserUpdate
SetActive sets the "active" field.
func (*UserUpdate) SetDaemon ¶
func (uu *UserUpdate) SetDaemon(d *Daemon) *UserUpdate
SetDaemon sets the "daemon" edge to the Daemon entity.
func (*UserUpdate) SetDaemonID ¶
func (uu *UserUpdate) SetDaemonID(id int) *UserUpdate
SetDaemonID sets the "daemon" edge to the Daemon entity by ID.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableActive ¶
func (uu *UserUpdate) SetNillableActive(b *bool) *UserUpdate
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserUpdate) SetNillableDaemonID ¶
func (uu *UserUpdate) SetNillableDaemonID(id *int) *UserUpdate
SetNillableDaemonID sets the "daemon" edge to the Daemon entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableName ¶
func (uu *UserUpdate) SetNillableName(s *string) *UserUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdate) SetNillableProviderID ¶
func (uu *UserUpdate) SetNillableProviderID(id *int) *UserUpdate
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*UserUpdate) SetNillableSubscribeID ¶
func (uu *UserUpdate) SetNillableSubscribeID(id *int) *UserUpdate
SetNillableSubscribeID sets the "subscribe" edge to the Subscribe entity by ID if the given value is not nil.
func (*UserUpdate) SetProvider ¶
func (uu *UserUpdate) SetProvider(p *Provider) *UserUpdate
SetProvider sets the "provider" edge to the Provider entity.
func (*UserUpdate) SetProviderID ¶
func (uu *UserUpdate) SetProviderID(id int) *UserUpdate
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*UserUpdate) SetSubscribe ¶
func (uu *UserUpdate) SetSubscribe(s *Subscribe) *UserUpdate
SetSubscribe sets the "subscribe" edge to the Subscribe entity.
func (*UserUpdate) SetSubscribeID ¶
func (uu *UserUpdate) SetSubscribeID(id int) *UserUpdate
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by ID.
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) ClearDaemon ¶
func (uuo *UserUpdateOne) ClearDaemon() *UserUpdateOne
ClearDaemon clears the "daemon" edge to the Daemon entity.
func (*UserUpdateOne) ClearProvider ¶
func (uuo *UserUpdateOne) ClearProvider() *UserUpdateOne
ClearProvider clears the "provider" edge to the Provider entity.
func (*UserUpdateOne) ClearSubscribe ¶
func (uuo *UserUpdateOne) ClearSubscribe() *UserUpdateOne
ClearSubscribe clears the "subscribe" edge to the Subscribe entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetActive ¶
func (uuo *UserUpdateOne) SetActive(b bool) *UserUpdateOne
SetActive sets the "active" field.
func (*UserUpdateOne) SetDaemon ¶
func (uuo *UserUpdateOne) SetDaemon(d *Daemon) *UserUpdateOne
SetDaemon sets the "daemon" edge to the Daemon entity.
func (*UserUpdateOne) SetDaemonID ¶
func (uuo *UserUpdateOne) SetDaemonID(id int) *UserUpdateOne
SetDaemonID sets the "daemon" edge to the Daemon entity by ID.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableActive ¶
func (uuo *UserUpdateOne) SetNillableActive(b *bool) *UserUpdateOne
SetNillableActive sets the "active" field if the given value is not nil.
func (*UserUpdateOne) SetNillableDaemonID ¶
func (uuo *UserUpdateOne) SetNillableDaemonID(id *int) *UserUpdateOne
SetNillableDaemonID sets the "daemon" edge to the Daemon entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableName ¶
func (uuo *UserUpdateOne) SetNillableName(s *string) *UserUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*UserUpdateOne) SetNillableProviderID ¶
func (uuo *UserUpdateOne) SetNillableProviderID(id *int) *UserUpdateOne
SetNillableProviderID sets the "provider" edge to the Provider entity by ID if the given value is not nil.
func (*UserUpdateOne) SetNillableSubscribeID ¶
func (uuo *UserUpdateOne) SetNillableSubscribeID(id *int) *UserUpdateOne
SetNillableSubscribeID sets the "subscribe" edge to the Subscribe entity by ID if the given value is not nil.
func (*UserUpdateOne) SetProvider ¶
func (uuo *UserUpdateOne) SetProvider(p *Provider) *UserUpdateOne
SetProvider sets the "provider" edge to the Provider entity.
func (*UserUpdateOne) SetProviderID ¶
func (uuo *UserUpdateOne) SetProviderID(id int) *UserUpdateOne
SetProviderID sets the "provider" edge to the Provider entity by ID.
func (*UserUpdateOne) SetSubscribe ¶
func (uuo *UserUpdateOne) SetSubscribe(s *Subscribe) *UserUpdateOne
SetSubscribe sets the "subscribe" edge to the Subscribe entity.
func (*UserUpdateOne) SetSubscribeID ¶
func (uuo *UserUpdateOne) SetSubscribeID(id int) *UserUpdateOne
SetSubscribeID sets the "subscribe" edge to the Subscribe entity by ID.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files ¶
- client.go
- daemon.go
- daemon_create.go
- daemon_delete.go
- daemon_query.go
- daemon_update.go
- ent.go
- generate.go
- mutation.go
- node.go
- node_create.go
- node_delete.go
- node_query.go
- node_update.go
- provider.go
- provider_create.go
- provider_delete.go
- provider_query.go
- provider_update.go
- runtime.go
- subscribe.go
- subscribe_create.go
- subscribe_delete.go
- subscribe_query.go
- subscribe_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go