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 Container
- func (c *Container) QueryJobs() *JobQuery
- func (c *Container) QueryMounts() *MountQuery
- func (c *Container) QueryNode() *NodeQuery
- func (c *Container) QueryOwner() *UserQuery
- func (c *Container) QueryPorts() *PortQuery
- func (c *Container) String() string
- func (c *Container) Unwrap() *Container
- func (c *Container) Update() *ContainerUpdateOne
- func (c *Container) Value(name string) (ent.Value, error)
- type ContainerClient
- func (c *ContainerClient) Create() *ContainerCreate
- func (c *ContainerClient) CreateBulk(builders ...*ContainerCreate) *ContainerCreateBulk
- func (c *ContainerClient) Delete() *ContainerDelete
- func (c *ContainerClient) DeleteOne(co *Container) *ContainerDeleteOne
- func (c *ContainerClient) DeleteOneID(id int) *ContainerDeleteOne
- func (c *ContainerClient) Get(ctx context.Context, id int) (*Container, error)
- func (c *ContainerClient) GetX(ctx context.Context, id int) *Container
- func (c *ContainerClient) Hooks() []Hook
- func (c *ContainerClient) Intercept(interceptors ...Interceptor)
- func (c *ContainerClient) Interceptors() []Interceptor
- func (c *ContainerClient) MapCreateBulk(slice any, setFunc func(*ContainerCreate, int)) *ContainerCreateBulk
- func (c *ContainerClient) Query() *ContainerQuery
- func (c *ContainerClient) QueryJobs(co *Container) *JobQuery
- func (c *ContainerClient) QueryMounts(co *Container) *MountQuery
- func (c *ContainerClient) QueryNode(co *Container) *NodeQuery
- func (c *ContainerClient) QueryOwner(co *Container) *UserQuery
- func (c *ContainerClient) QueryPorts(co *Container) *PortQuery
- func (c *ContainerClient) Update() *ContainerUpdate
- func (c *ContainerClient) UpdateOne(co *Container) *ContainerUpdateOne
- func (c *ContainerClient) UpdateOneID(id int) *ContainerUpdateOne
- func (c *ContainerClient) Use(hooks ...Hook)
- type ContainerCreate
- func (cc *ContainerCreate) AddJobIDs(ids ...int) *ContainerCreate
- func (cc *ContainerCreate) AddJobs(j ...*Job) *ContainerCreate
- func (cc *ContainerCreate) AddMountIDs(ids ...int) *ContainerCreate
- func (cc *ContainerCreate) AddMounts(m ...*Mount) *ContainerCreate
- func (cc *ContainerCreate) AddNode(n ...*Node) *ContainerCreate
- func (cc *ContainerCreate) AddNodeIDs(ids ...int) *ContainerCreate
- func (cc *ContainerCreate) AddOwner(u ...*User) *ContainerCreate
- func (cc *ContainerCreate) AddOwnerIDs(ids ...int) *ContainerCreate
- func (cc *ContainerCreate) AddPortIDs(ids ...int) *ContainerCreate
- func (cc *ContainerCreate) AddPorts(p ...*Port) *ContainerCreate
- func (cc *ContainerCreate) Exec(ctx context.Context) error
- func (cc *ContainerCreate) ExecX(ctx context.Context)
- func (cc *ContainerCreate) Mutation() *ContainerMutation
- func (cc *ContainerCreate) Save(ctx context.Context) (*Container, error)
- func (cc *ContainerCreate) SaveX(ctx context.Context) *Container
- func (cc *ContainerCreate) SetCPU(i int64) *ContainerCreate
- func (cc *ContainerCreate) SetCid(s string) *ContainerCreate
- func (cc *ContainerCreate) SetCreatedAt(i int64) *ContainerCreate
- func (cc *ContainerCreate) SetImage(s string) *ContainerCreate
- func (cc *ContainerCreate) SetMemory(i int64) *ContainerCreate
- func (cc *ContainerCreate) SetName(s string) *ContainerCreate
- func (cc *ContainerCreate) SetNillableCreatedAt(i *int64) *ContainerCreate
- func (cc *ContainerCreate) SetNillableUpdatedAt(i *int64) *ContainerCreate
- func (cc *ContainerCreate) SetUpdatedAt(i int64) *ContainerCreate
- type ContainerCreateBulk
- type ContainerDelete
- type ContainerDeleteOne
- type ContainerEdges
- type ContainerGroupBy
- func (cgb *ContainerGroupBy) Aggregate(fns ...AggregateFunc) *ContainerGroupBy
- func (s *ContainerGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContainerGroupBy) BoolX(ctx context.Context) bool
- func (s *ContainerGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ContainerGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ContainerGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContainerGroupBy) Float64X(ctx context.Context) float64
- func (s *ContainerGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContainerGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ContainerGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ContainerGroupBy) IntX(ctx context.Context) int
- func (s *ContainerGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ContainerGroupBy) IntsX(ctx context.Context) []int
- func (cgb *ContainerGroupBy) Scan(ctx context.Context, v any) error
- func (s *ContainerGroupBy) ScanX(ctx context.Context, v any)
- func (s *ContainerGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ContainerGroupBy) StringX(ctx context.Context) string
- func (s *ContainerGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ContainerGroupBy) StringsX(ctx context.Context) []string
- type ContainerMutation
- func (m *ContainerMutation) AddCPU(i int64)
- func (m *ContainerMutation) AddCreatedAt(i int64)
- func (m *ContainerMutation) AddField(name string, value ent.Value) error
- func (m *ContainerMutation) AddJobIDs(ids ...int)
- func (m *ContainerMutation) AddMemory(i int64)
- func (m *ContainerMutation) AddMountIDs(ids ...int)
- func (m *ContainerMutation) AddNodeIDs(ids ...int)
- func (m *ContainerMutation) AddOwnerIDs(ids ...int)
- func (m *ContainerMutation) AddPortIDs(ids ...int)
- func (m *ContainerMutation) AddUpdatedAt(i int64)
- func (m *ContainerMutation) AddedCPU() (r int64, exists bool)
- func (m *ContainerMutation) AddedCreatedAt() (r int64, exists bool)
- func (m *ContainerMutation) AddedEdges() []string
- func (m *ContainerMutation) AddedField(name string) (ent.Value, bool)
- func (m *ContainerMutation) AddedFields() []string
- func (m *ContainerMutation) AddedIDs(name string) []ent.Value
- func (m *ContainerMutation) AddedMemory() (r int64, exists bool)
- func (m *ContainerMutation) AddedUpdatedAt() (r int64, exists bool)
- func (m *ContainerMutation) CPU() (r int64, exists bool)
- func (m *ContainerMutation) Cid() (r string, exists bool)
- func (m *ContainerMutation) ClearEdge(name string) error
- func (m *ContainerMutation) ClearField(name string) error
- func (m *ContainerMutation) ClearJobs()
- func (m *ContainerMutation) ClearMounts()
- func (m *ContainerMutation) ClearNode()
- func (m *ContainerMutation) ClearOwner()
- func (m *ContainerMutation) ClearPorts()
- func (m *ContainerMutation) ClearedEdges() []string
- func (m *ContainerMutation) ClearedFields() []string
- func (m ContainerMutation) Client() *Client
- func (m *ContainerMutation) CreatedAt() (r int64, exists bool)
- func (m *ContainerMutation) EdgeCleared(name string) bool
- func (m *ContainerMutation) Field(name string) (ent.Value, bool)
- func (m *ContainerMutation) FieldCleared(name string) bool
- func (m *ContainerMutation) Fields() []string
- func (m *ContainerMutation) ID() (id int, exists bool)
- func (m *ContainerMutation) IDs(ctx context.Context) ([]int, error)
- func (m *ContainerMutation) Image() (r string, exists bool)
- func (m *ContainerMutation) JobsCleared() bool
- func (m *ContainerMutation) JobsIDs() (ids []int)
- func (m *ContainerMutation) Memory() (r int64, exists bool)
- func (m *ContainerMutation) MountsCleared() bool
- func (m *ContainerMutation) MountsIDs() (ids []int)
- func (m *ContainerMutation) Name() (r string, exists bool)
- func (m *ContainerMutation) NodeCleared() bool
- func (m *ContainerMutation) NodeIDs() (ids []int)
- func (m *ContainerMutation) OldCPU(ctx context.Context) (v int64, err error)
- func (m *ContainerMutation) OldCid(ctx context.Context) (v string, err error)
- func (m *ContainerMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
- func (m *ContainerMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ContainerMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *ContainerMutation) OldMemory(ctx context.Context) (v int64, err error)
- func (m *ContainerMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ContainerMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
- func (m *ContainerMutation) Op() Op
- func (m *ContainerMutation) OwnerCleared() bool
- func (m *ContainerMutation) OwnerIDs() (ids []int)
- func (m *ContainerMutation) PortsCleared() bool
- func (m *ContainerMutation) PortsIDs() (ids []int)
- func (m *ContainerMutation) RemoveJobIDs(ids ...int)
- func (m *ContainerMutation) RemoveMountIDs(ids ...int)
- func (m *ContainerMutation) RemoveNodeIDs(ids ...int)
- func (m *ContainerMutation) RemoveOwnerIDs(ids ...int)
- func (m *ContainerMutation) RemovePortIDs(ids ...int)
- func (m *ContainerMutation) RemovedEdges() []string
- func (m *ContainerMutation) RemovedIDs(name string) []ent.Value
- func (m *ContainerMutation) RemovedJobsIDs() (ids []int)
- func (m *ContainerMutation) RemovedMountsIDs() (ids []int)
- func (m *ContainerMutation) RemovedNodeIDs() (ids []int)
- func (m *ContainerMutation) RemovedOwnerIDs() (ids []int)
- func (m *ContainerMutation) RemovedPortsIDs() (ids []int)
- func (m *ContainerMutation) ResetCPU()
- func (m *ContainerMutation) ResetCid()
- func (m *ContainerMutation) ResetCreatedAt()
- func (m *ContainerMutation) ResetEdge(name string) error
- func (m *ContainerMutation) ResetField(name string) error
- func (m *ContainerMutation) ResetImage()
- func (m *ContainerMutation) ResetJobs()
- func (m *ContainerMutation) ResetMemory()
- func (m *ContainerMutation) ResetMounts()
- func (m *ContainerMutation) ResetName()
- func (m *ContainerMutation) ResetNode()
- func (m *ContainerMutation) ResetOwner()
- func (m *ContainerMutation) ResetPorts()
- func (m *ContainerMutation) ResetUpdatedAt()
- func (m *ContainerMutation) SetCPU(i int64)
- func (m *ContainerMutation) SetCid(s string)
- func (m *ContainerMutation) SetCreatedAt(i int64)
- func (m *ContainerMutation) SetField(name string, value ent.Value) error
- func (m *ContainerMutation) SetImage(s string)
- func (m *ContainerMutation) SetMemory(i int64)
- func (m *ContainerMutation) SetName(s string)
- func (m *ContainerMutation) SetOp(op Op)
- func (m *ContainerMutation) SetUpdatedAt(i int64)
- func (m ContainerMutation) Tx() (*Tx, error)
- func (m *ContainerMutation) Type() string
- func (m *ContainerMutation) UpdatedAt() (r int64, exists bool)
- func (m *ContainerMutation) Where(ps ...predicate.Container)
- func (m *ContainerMutation) WhereP(ps ...func(*sql.Selector))
- type ContainerQuery
- func (cq *ContainerQuery) Aggregate(fns ...AggregateFunc) *ContainerSelect
- func (cq *ContainerQuery) All(ctx context.Context) ([]*Container, error)
- func (cq *ContainerQuery) AllX(ctx context.Context) []*Container
- func (cq *ContainerQuery) Clone() *ContainerQuery
- func (cq *ContainerQuery) Count(ctx context.Context) (int, error)
- func (cq *ContainerQuery) CountX(ctx context.Context) int
- func (cq *ContainerQuery) Exist(ctx context.Context) (bool, error)
- func (cq *ContainerQuery) ExistX(ctx context.Context) bool
- func (cq *ContainerQuery) First(ctx context.Context) (*Container, error)
- func (cq *ContainerQuery) FirstID(ctx context.Context) (id int, err error)
- func (cq *ContainerQuery) FirstIDX(ctx context.Context) int
- func (cq *ContainerQuery) FirstX(ctx context.Context) *Container
- func (cq *ContainerQuery) GroupBy(field string, fields ...string) *ContainerGroupBy
- func (cq *ContainerQuery) IDs(ctx context.Context) (ids []int, err error)
- func (cq *ContainerQuery) IDsX(ctx context.Context) []int
- func (cq *ContainerQuery) Limit(limit int) *ContainerQuery
- func (cq *ContainerQuery) Offset(offset int) *ContainerQuery
- func (cq *ContainerQuery) Only(ctx context.Context) (*Container, error)
- func (cq *ContainerQuery) OnlyID(ctx context.Context) (id int, err error)
- func (cq *ContainerQuery) OnlyIDX(ctx context.Context) int
- func (cq *ContainerQuery) OnlyX(ctx context.Context) *Container
- func (cq *ContainerQuery) Order(o ...container.OrderOption) *ContainerQuery
- func (cq *ContainerQuery) QueryJobs() *JobQuery
- func (cq *ContainerQuery) QueryMounts() *MountQuery
- func (cq *ContainerQuery) QueryNode() *NodeQuery
- func (cq *ContainerQuery) QueryOwner() *UserQuery
- func (cq *ContainerQuery) QueryPorts() *PortQuery
- func (cq *ContainerQuery) Select(fields ...string) *ContainerSelect
- func (cq *ContainerQuery) Unique(unique bool) *ContainerQuery
- func (cq *ContainerQuery) Where(ps ...predicate.Container) *ContainerQuery
- func (cq *ContainerQuery) WithJobs(opts ...func(*JobQuery)) *ContainerQuery
- func (cq *ContainerQuery) WithMounts(opts ...func(*MountQuery)) *ContainerQuery
- func (cq *ContainerQuery) WithNode(opts ...func(*NodeQuery)) *ContainerQuery
- func (cq *ContainerQuery) WithOwner(opts ...func(*UserQuery)) *ContainerQuery
- func (cq *ContainerQuery) WithPorts(opts ...func(*PortQuery)) *ContainerQuery
- type ContainerSelect
- func (cs *ContainerSelect) Aggregate(fns ...AggregateFunc) *ContainerSelect
- func (s *ContainerSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ContainerSelect) BoolX(ctx context.Context) bool
- func (s *ContainerSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ContainerSelect) BoolsX(ctx context.Context) []bool
- func (s *ContainerSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ContainerSelect) Float64X(ctx context.Context) float64
- func (s *ContainerSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ContainerSelect) Float64sX(ctx context.Context) []float64
- func (s *ContainerSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ContainerSelect) IntX(ctx context.Context) int
- func (s *ContainerSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ContainerSelect) IntsX(ctx context.Context) []int
- func (cs *ContainerSelect) Scan(ctx context.Context, v any) error
- func (s *ContainerSelect) ScanX(ctx context.Context, v any)
- func (s *ContainerSelect) String(ctx context.Context) (_ string, err error)
- func (s *ContainerSelect) StringX(ctx context.Context) string
- func (s *ContainerSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ContainerSelect) StringsX(ctx context.Context) []string
- type ContainerUpdate
- func (cu *ContainerUpdate) AddCPU(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) AddCreatedAt(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) AddJobIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) AddJobs(j ...*Job) *ContainerUpdate
- func (cu *ContainerUpdate) AddMemory(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) AddMountIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) AddMounts(m ...*Mount) *ContainerUpdate
- func (cu *ContainerUpdate) AddNode(n ...*Node) *ContainerUpdate
- func (cu *ContainerUpdate) AddNodeIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) AddOwner(u ...*User) *ContainerUpdate
- func (cu *ContainerUpdate) AddOwnerIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) AddPortIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) AddPorts(p ...*Port) *ContainerUpdate
- func (cu *ContainerUpdate) AddUpdatedAt(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) ClearJobs() *ContainerUpdate
- func (cu *ContainerUpdate) ClearMounts() *ContainerUpdate
- func (cu *ContainerUpdate) ClearNode() *ContainerUpdate
- func (cu *ContainerUpdate) ClearOwner() *ContainerUpdate
- func (cu *ContainerUpdate) ClearPorts() *ContainerUpdate
- func (cu *ContainerUpdate) Exec(ctx context.Context) error
- func (cu *ContainerUpdate) ExecX(ctx context.Context)
- func (cu *ContainerUpdate) Mutation() *ContainerMutation
- func (cu *ContainerUpdate) RemoveJobIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) RemoveJobs(j ...*Job) *ContainerUpdate
- func (cu *ContainerUpdate) RemoveMountIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) RemoveMounts(m ...*Mount) *ContainerUpdate
- func (cu *ContainerUpdate) RemoveNode(n ...*Node) *ContainerUpdate
- func (cu *ContainerUpdate) RemoveNodeIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) RemoveOwner(u ...*User) *ContainerUpdate
- func (cu *ContainerUpdate) RemoveOwnerIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) RemovePortIDs(ids ...int) *ContainerUpdate
- func (cu *ContainerUpdate) RemovePorts(p ...*Port) *ContainerUpdate
- func (cu *ContainerUpdate) Save(ctx context.Context) (int, error)
- func (cu *ContainerUpdate) SaveX(ctx context.Context) int
- func (cu *ContainerUpdate) SetCPU(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) SetCid(s string) *ContainerUpdate
- func (cu *ContainerUpdate) SetCreatedAt(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) SetImage(s string) *ContainerUpdate
- func (cu *ContainerUpdate) SetMemory(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) SetName(s string) *ContainerUpdate
- func (cu *ContainerUpdate) SetNillableCPU(i *int64) *ContainerUpdate
- func (cu *ContainerUpdate) SetNillableCid(s *string) *ContainerUpdate
- func (cu *ContainerUpdate) SetNillableCreatedAt(i *int64) *ContainerUpdate
- func (cu *ContainerUpdate) SetNillableImage(s *string) *ContainerUpdate
- func (cu *ContainerUpdate) SetNillableMemory(i *int64) *ContainerUpdate
- func (cu *ContainerUpdate) SetNillableName(s *string) *ContainerUpdate
- func (cu *ContainerUpdate) SetUpdatedAt(i int64) *ContainerUpdate
- func (cu *ContainerUpdate) Where(ps ...predicate.Container) *ContainerUpdate
- type ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddCPU(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddCreatedAt(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddJobIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddJobs(j ...*Job) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddMemory(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddMountIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddMounts(m ...*Mount) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddNode(n ...*Node) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddNodeIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddOwner(u ...*User) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddOwnerIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddPortIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddPorts(p ...*Port) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) AddUpdatedAt(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) ClearJobs() *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) ClearMounts() *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) ClearNode() *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) ClearOwner() *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) ClearPorts() *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) Exec(ctx context.Context) error
- func (cuo *ContainerUpdateOne) ExecX(ctx context.Context)
- func (cuo *ContainerUpdateOne) Mutation() *ContainerMutation
- func (cuo *ContainerUpdateOne) RemoveJobIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemoveJobs(j ...*Job) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemoveMountIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemoveMounts(m ...*Mount) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemoveNode(n ...*Node) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemoveNodeIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemoveOwner(u ...*User) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemoveOwnerIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemovePortIDs(ids ...int) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) RemovePorts(p ...*Port) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) Save(ctx context.Context) (*Container, error)
- func (cuo *ContainerUpdateOne) SaveX(ctx context.Context) *Container
- func (cuo *ContainerUpdateOne) Select(field string, fields ...string) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetCPU(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetCid(s string) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetCreatedAt(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetImage(s string) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetMemory(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetName(s string) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetNillableCPU(i *int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetNillableCid(s *string) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetNillableCreatedAt(i *int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetNillableImage(s *string) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetNillableMemory(i *int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetNillableName(s *string) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) SetUpdatedAt(i int64) *ContainerUpdateOne
- func (cuo *ContainerUpdateOne) Where(ps ...predicate.Container) *ContainerUpdateOne
- type Containers
- type Hook
- type InterceptFunc
- type Interceptor
- type Job
- type JobClient
- func (c *JobClient) Create() *JobCreate
- func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk
- func (c *JobClient) Delete() *JobDelete
- func (c *JobClient) DeleteOne(j *Job) *JobDeleteOne
- func (c *JobClient) DeleteOneID(id int) *JobDeleteOne
- func (c *JobClient) Get(ctx context.Context, id int) (*Job, error)
- func (c *JobClient) GetX(ctx context.Context, id int) *Job
- func (c *JobClient) Hooks() []Hook
- func (c *JobClient) Intercept(interceptors ...Interceptor)
- func (c *JobClient) Interceptors() []Interceptor
- func (c *JobClient) MapCreateBulk(slice any, setFunc func(*JobCreate, int)) *JobCreateBulk
- func (c *JobClient) Query() *JobQuery
- func (c *JobClient) QueryOwner(j *Job) *ContainerQuery
- func (c *JobClient) Update() *JobUpdate
- func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne
- func (c *JobClient) UpdateOneID(id int) *JobUpdateOne
- func (c *JobClient) Use(hooks ...Hook)
- type JobCreate
- func (jc *JobCreate) AddOwner(c ...*Container) *JobCreate
- func (jc *JobCreate) AddOwnerIDs(ids ...int) *JobCreate
- func (jc *JobCreate) Exec(ctx context.Context) error
- func (jc *JobCreate) ExecX(ctx context.Context)
- func (jc *JobCreate) Mutation() *JobMutation
- func (jc *JobCreate) Save(ctx context.Context) (*Job, error)
- func (jc *JobCreate) SaveX(ctx context.Context) *Job
- func (jc *JobCreate) SetCreatedAt(i int64) *JobCreate
- func (jc *JobCreate) SetDescription(s string) *JobCreate
- func (jc *JobCreate) SetJobType(i int) *JobCreate
- func (jc *JobCreate) SetName(s string) *JobCreate
- func (jc *JobCreate) SetNillableCreatedAt(i *int64) *JobCreate
- func (jc *JobCreate) SetNillableUpdatedAt(i *int64) *JobCreate
- func (jc *JobCreate) SetUpdatedAt(i int64) *JobCreate
- type JobCreateBulk
- type JobDelete
- type JobDeleteOne
- type JobEdges
- type JobGroupBy
- func (jgb *JobGroupBy) Aggregate(fns ...AggregateFunc) *JobGroupBy
- func (s *JobGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *JobGroupBy) BoolX(ctx context.Context) bool
- func (s *JobGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *JobGroupBy) BoolsX(ctx context.Context) []bool
- func (s *JobGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *JobGroupBy) Float64X(ctx context.Context) float64
- func (s *JobGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *JobGroupBy) Float64sX(ctx context.Context) []float64
- func (s *JobGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *JobGroupBy) IntX(ctx context.Context) int
- func (s *JobGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *JobGroupBy) IntsX(ctx context.Context) []int
- func (jgb *JobGroupBy) Scan(ctx context.Context, v any) error
- func (s *JobGroupBy) ScanX(ctx context.Context, v any)
- func (s *JobGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *JobGroupBy) StringX(ctx context.Context) string
- func (s *JobGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *JobGroupBy) StringsX(ctx context.Context) []string
- type JobMutation
- func (m *JobMutation) AddCreatedAt(i int64)
- func (m *JobMutation) AddField(name string, value ent.Value) error
- func (m *JobMutation) AddJobType(i int)
- func (m *JobMutation) AddOwnerIDs(ids ...int)
- func (m *JobMutation) AddUpdatedAt(i int64)
- func (m *JobMutation) AddedCreatedAt() (r int64, exists bool)
- func (m *JobMutation) AddedEdges() []string
- func (m *JobMutation) AddedField(name string) (ent.Value, bool)
- func (m *JobMutation) AddedFields() []string
- func (m *JobMutation) AddedIDs(name string) []ent.Value
- func (m *JobMutation) AddedJobType() (r int, exists bool)
- func (m *JobMutation) AddedUpdatedAt() (r int64, exists bool)
- func (m *JobMutation) ClearEdge(name string) error
- func (m *JobMutation) ClearField(name string) error
- func (m *JobMutation) ClearOwner()
- func (m *JobMutation) ClearedEdges() []string
- func (m *JobMutation) ClearedFields() []string
- func (m JobMutation) Client() *Client
- func (m *JobMutation) CreatedAt() (r int64, exists bool)
- func (m *JobMutation) Description() (r string, exists bool)
- func (m *JobMutation) EdgeCleared(name string) bool
- func (m *JobMutation) Field(name string) (ent.Value, bool)
- func (m *JobMutation) FieldCleared(name string) bool
- func (m *JobMutation) Fields() []string
- func (m *JobMutation) ID() (id int, exists bool)
- func (m *JobMutation) IDs(ctx context.Context) ([]int, error)
- func (m *JobMutation) JobType() (r int, exists bool)
- func (m *JobMutation) Name() (r string, exists bool)
- func (m *JobMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
- func (m *JobMutation) OldDescription(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *JobMutation) OldJobType(ctx context.Context) (v int, err error)
- func (m *JobMutation) OldName(ctx context.Context) (v string, err error)
- func (m *JobMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
- func (m *JobMutation) Op() Op
- func (m *JobMutation) OwnerCleared() bool
- func (m *JobMutation) OwnerIDs() (ids []int)
- func (m *JobMutation) RemoveOwnerIDs(ids ...int)
- func (m *JobMutation) RemovedEdges() []string
- func (m *JobMutation) RemovedIDs(name string) []ent.Value
- func (m *JobMutation) RemovedOwnerIDs() (ids []int)
- func (m *JobMutation) ResetCreatedAt()
- func (m *JobMutation) ResetDescription()
- func (m *JobMutation) ResetEdge(name string) error
- func (m *JobMutation) ResetField(name string) error
- func (m *JobMutation) ResetJobType()
- func (m *JobMutation) ResetName()
- func (m *JobMutation) ResetOwner()
- func (m *JobMutation) ResetUpdatedAt()
- func (m *JobMutation) SetCreatedAt(i int64)
- func (m *JobMutation) SetDescription(s string)
- func (m *JobMutation) SetField(name string, value ent.Value) error
- func (m *JobMutation) SetJobType(i int)
- func (m *JobMutation) SetName(s string)
- func (m *JobMutation) SetOp(op Op)
- func (m *JobMutation) SetUpdatedAt(i int64)
- func (m JobMutation) Tx() (*Tx, error)
- func (m *JobMutation) Type() string
- func (m *JobMutation) UpdatedAt() (r int64, exists bool)
- func (m *JobMutation) Where(ps ...predicate.Job)
- func (m *JobMutation) WhereP(ps ...func(*sql.Selector))
- type JobQuery
- func (jq *JobQuery) Aggregate(fns ...AggregateFunc) *JobSelect
- func (jq *JobQuery) All(ctx context.Context) ([]*Job, error)
- func (jq *JobQuery) AllX(ctx context.Context) []*Job
- func (jq *JobQuery) Clone() *JobQuery
- func (jq *JobQuery) Count(ctx context.Context) (int, error)
- func (jq *JobQuery) CountX(ctx context.Context) int
- func (jq *JobQuery) Exist(ctx context.Context) (bool, error)
- func (jq *JobQuery) ExistX(ctx context.Context) bool
- func (jq *JobQuery) First(ctx context.Context) (*Job, error)
- func (jq *JobQuery) FirstID(ctx context.Context) (id int, err error)
- func (jq *JobQuery) FirstIDX(ctx context.Context) int
- func (jq *JobQuery) FirstX(ctx context.Context) *Job
- func (jq *JobQuery) GroupBy(field string, fields ...string) *JobGroupBy
- func (jq *JobQuery) IDs(ctx context.Context) (ids []int, err error)
- func (jq *JobQuery) IDsX(ctx context.Context) []int
- func (jq *JobQuery) Limit(limit int) *JobQuery
- func (jq *JobQuery) Offset(offset int) *JobQuery
- func (jq *JobQuery) Only(ctx context.Context) (*Job, error)
- func (jq *JobQuery) OnlyID(ctx context.Context) (id int, err error)
- func (jq *JobQuery) OnlyIDX(ctx context.Context) int
- func (jq *JobQuery) OnlyX(ctx context.Context) *Job
- func (jq *JobQuery) Order(o ...job.OrderOption) *JobQuery
- func (jq *JobQuery) QueryOwner() *ContainerQuery
- func (jq *JobQuery) Select(fields ...string) *JobSelect
- func (jq *JobQuery) Unique(unique bool) *JobQuery
- func (jq *JobQuery) Where(ps ...predicate.Job) *JobQuery
- func (jq *JobQuery) WithOwner(opts ...func(*ContainerQuery)) *JobQuery
- type JobSelect
- func (js *JobSelect) Aggregate(fns ...AggregateFunc) *JobSelect
- func (s *JobSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *JobSelect) BoolX(ctx context.Context) bool
- func (s *JobSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *JobSelect) BoolsX(ctx context.Context) []bool
- func (s *JobSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *JobSelect) Float64X(ctx context.Context) float64
- func (s *JobSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *JobSelect) Float64sX(ctx context.Context) []float64
- func (s *JobSelect) Int(ctx context.Context) (_ int, err error)
- func (s *JobSelect) IntX(ctx context.Context) int
- func (s *JobSelect) Ints(ctx context.Context) ([]int, error)
- func (s *JobSelect) IntsX(ctx context.Context) []int
- func (js *JobSelect) Scan(ctx context.Context, v any) error
- func (s *JobSelect) ScanX(ctx context.Context, v any)
- func (s *JobSelect) String(ctx context.Context) (_ string, err error)
- func (s *JobSelect) StringX(ctx context.Context) string
- func (s *JobSelect) Strings(ctx context.Context) ([]string, error)
- func (s *JobSelect) StringsX(ctx context.Context) []string
- type JobUpdate
- func (ju *JobUpdate) AddCreatedAt(i int64) *JobUpdate
- func (ju *JobUpdate) AddJobType(i int) *JobUpdate
- func (ju *JobUpdate) AddOwner(c ...*Container) *JobUpdate
- func (ju *JobUpdate) AddOwnerIDs(ids ...int) *JobUpdate
- func (ju *JobUpdate) AddUpdatedAt(i int64) *JobUpdate
- func (ju *JobUpdate) ClearOwner() *JobUpdate
- func (ju *JobUpdate) Exec(ctx context.Context) error
- func (ju *JobUpdate) ExecX(ctx context.Context)
- func (ju *JobUpdate) Mutation() *JobMutation
- func (ju *JobUpdate) RemoveOwner(c ...*Container) *JobUpdate
- func (ju *JobUpdate) RemoveOwnerIDs(ids ...int) *JobUpdate
- func (ju *JobUpdate) Save(ctx context.Context) (int, error)
- func (ju *JobUpdate) SaveX(ctx context.Context) int
- func (ju *JobUpdate) SetCreatedAt(i int64) *JobUpdate
- func (ju *JobUpdate) SetDescription(s string) *JobUpdate
- func (ju *JobUpdate) SetJobType(i int) *JobUpdate
- func (ju *JobUpdate) SetName(s string) *JobUpdate
- func (ju *JobUpdate) SetNillableCreatedAt(i *int64) *JobUpdate
- func (ju *JobUpdate) SetNillableDescription(s *string) *JobUpdate
- func (ju *JobUpdate) SetNillableJobType(i *int) *JobUpdate
- func (ju *JobUpdate) SetNillableName(s *string) *JobUpdate
- func (ju *JobUpdate) SetUpdatedAt(i int64) *JobUpdate
- func (ju *JobUpdate) Where(ps ...predicate.Job) *JobUpdate
- type JobUpdateOne
- func (juo *JobUpdateOne) AddCreatedAt(i int64) *JobUpdateOne
- func (juo *JobUpdateOne) AddJobType(i int) *JobUpdateOne
- func (juo *JobUpdateOne) AddOwner(c ...*Container) *JobUpdateOne
- func (juo *JobUpdateOne) AddOwnerIDs(ids ...int) *JobUpdateOne
- func (juo *JobUpdateOne) AddUpdatedAt(i int64) *JobUpdateOne
- func (juo *JobUpdateOne) ClearOwner() *JobUpdateOne
- func (juo *JobUpdateOne) Exec(ctx context.Context) error
- func (juo *JobUpdateOne) ExecX(ctx context.Context)
- func (juo *JobUpdateOne) Mutation() *JobMutation
- func (juo *JobUpdateOne) RemoveOwner(c ...*Container) *JobUpdateOne
- func (juo *JobUpdateOne) RemoveOwnerIDs(ids ...int) *JobUpdateOne
- func (juo *JobUpdateOne) Save(ctx context.Context) (*Job, error)
- func (juo *JobUpdateOne) SaveX(ctx context.Context) *Job
- func (juo *JobUpdateOne) Select(field string, fields ...string) *JobUpdateOne
- func (juo *JobUpdateOne) SetCreatedAt(i int64) *JobUpdateOne
- func (juo *JobUpdateOne) SetDescription(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetJobType(i int) *JobUpdateOne
- func (juo *JobUpdateOne) SetName(s string) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableCreatedAt(i *int64) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableDescription(s *string) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableJobType(i *int) *JobUpdateOne
- func (juo *JobUpdateOne) SetNillableName(s *string) *JobUpdateOne
- func (juo *JobUpdateOne) SetUpdatedAt(i int64) *JobUpdateOne
- func (juo *JobUpdateOne) Where(ps ...predicate.Job) *JobUpdateOne
- type Jobs
- type Mount
- type MountClient
- func (c *MountClient) Create() *MountCreate
- func (c *MountClient) CreateBulk(builders ...*MountCreate) *MountCreateBulk
- func (c *MountClient) Delete() *MountDelete
- func (c *MountClient) DeleteOne(m *Mount) *MountDeleteOne
- func (c *MountClient) DeleteOneID(id int) *MountDeleteOne
- func (c *MountClient) Get(ctx context.Context, id int) (*Mount, error)
- func (c *MountClient) GetX(ctx context.Context, id int) *Mount
- func (c *MountClient) Hooks() []Hook
- func (c *MountClient) Intercept(interceptors ...Interceptor)
- func (c *MountClient) Interceptors() []Interceptor
- func (c *MountClient) MapCreateBulk(slice any, setFunc func(*MountCreate, int)) *MountCreateBulk
- func (c *MountClient) Query() *MountQuery
- func (c *MountClient) QueryOwner(m *Mount) *ContainerQuery
- func (c *MountClient) Update() *MountUpdate
- func (c *MountClient) UpdateOne(m *Mount) *MountUpdateOne
- func (c *MountClient) UpdateOneID(id int) *MountUpdateOne
- func (c *MountClient) Use(hooks ...Hook)
- type MountCreate
- func (mc *MountCreate) AddOwner(c ...*Container) *MountCreate
- func (mc *MountCreate) AddOwnerIDs(ids ...int) *MountCreate
- func (mc *MountCreate) Exec(ctx context.Context) error
- func (mc *MountCreate) ExecX(ctx context.Context)
- func (mc *MountCreate) Mutation() *MountMutation
- func (mc *MountCreate) Save(ctx context.Context) (*Mount, error)
- func (mc *MountCreate) SaveX(ctx context.Context) *Mount
- func (mc *MountCreate) SetBind(s string) *MountCreate
- func (mc *MountCreate) SetCreatedAt(i int64) *MountCreate
- func (mc *MountCreate) SetHost(s string) *MountCreate
- func (mc *MountCreate) SetIsDir(b bool) *MountCreate
- func (mc *MountCreate) SetNillableCreatedAt(i *int64) *MountCreate
- func (mc *MountCreate) SetNillableUpdatedAt(i *int64) *MountCreate
- func (mc *MountCreate) SetUpdatedAt(i int64) *MountCreate
- type MountCreateBulk
- type MountDelete
- type MountDeleteOne
- type MountEdges
- type MountGroupBy
- func (mgb *MountGroupBy) Aggregate(fns ...AggregateFunc) *MountGroupBy
- func (s *MountGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *MountGroupBy) BoolX(ctx context.Context) bool
- func (s *MountGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *MountGroupBy) BoolsX(ctx context.Context) []bool
- func (s *MountGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *MountGroupBy) Float64X(ctx context.Context) float64
- func (s *MountGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *MountGroupBy) Float64sX(ctx context.Context) []float64
- func (s *MountGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *MountGroupBy) IntX(ctx context.Context) int
- func (s *MountGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *MountGroupBy) IntsX(ctx context.Context) []int
- func (mgb *MountGroupBy) Scan(ctx context.Context, v any) error
- func (s *MountGroupBy) ScanX(ctx context.Context, v any)
- func (s *MountGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *MountGroupBy) StringX(ctx context.Context) string
- func (s *MountGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *MountGroupBy) StringsX(ctx context.Context) []string
- type MountMutation
- func (m *MountMutation) AddCreatedAt(i int64)
- func (m *MountMutation) AddField(name string, value ent.Value) error
- func (m *MountMutation) AddOwnerIDs(ids ...int)
- func (m *MountMutation) AddUpdatedAt(i int64)
- func (m *MountMutation) AddedCreatedAt() (r int64, exists bool)
- func (m *MountMutation) AddedEdges() []string
- func (m *MountMutation) AddedField(name string) (ent.Value, bool)
- func (m *MountMutation) AddedFields() []string
- func (m *MountMutation) AddedIDs(name string) []ent.Value
- func (m *MountMutation) AddedUpdatedAt() (r int64, exists bool)
- func (m *MountMutation) Bind() (r string, exists bool)
- func (m *MountMutation) ClearEdge(name string) error
- func (m *MountMutation) ClearField(name string) error
- func (m *MountMutation) ClearOwner()
- func (m *MountMutation) ClearedEdges() []string
- func (m *MountMutation) ClearedFields() []string
- func (m MountMutation) Client() *Client
- func (m *MountMutation) CreatedAt() (r int64, exists bool)
- func (m *MountMutation) EdgeCleared(name string) bool
- func (m *MountMutation) Field(name string) (ent.Value, bool)
- func (m *MountMutation) FieldCleared(name string) bool
- func (m *MountMutation) Fields() []string
- func (m *MountMutation) Host() (r string, exists bool)
- func (m *MountMutation) ID() (id int, exists bool)
- func (m *MountMutation) IDs(ctx context.Context) ([]int, error)
- func (m *MountMutation) IsDir() (r bool, exists bool)
- func (m *MountMutation) OldBind(ctx context.Context) (v string, err error)
- func (m *MountMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
- func (m *MountMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *MountMutation) OldHost(ctx context.Context) (v string, err error)
- func (m *MountMutation) OldIsDir(ctx context.Context) (v bool, err error)
- func (m *MountMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
- func (m *MountMutation) Op() Op
- func (m *MountMutation) OwnerCleared() bool
- func (m *MountMutation) OwnerIDs() (ids []int)
- func (m *MountMutation) RemoveOwnerIDs(ids ...int)
- func (m *MountMutation) RemovedEdges() []string
- func (m *MountMutation) RemovedIDs(name string) []ent.Value
- func (m *MountMutation) RemovedOwnerIDs() (ids []int)
- func (m *MountMutation) ResetBind()
- func (m *MountMutation) ResetCreatedAt()
- func (m *MountMutation) ResetEdge(name string) error
- func (m *MountMutation) ResetField(name string) error
- func (m *MountMutation) ResetHost()
- func (m *MountMutation) ResetIsDir()
- func (m *MountMutation) ResetOwner()
- func (m *MountMutation) ResetUpdatedAt()
- func (m *MountMutation) SetBind(s string)
- func (m *MountMutation) SetCreatedAt(i int64)
- func (m *MountMutation) SetField(name string, value ent.Value) error
- func (m *MountMutation) SetHost(s string)
- func (m *MountMutation) SetIsDir(b bool)
- func (m *MountMutation) SetOp(op Op)
- func (m *MountMutation) SetUpdatedAt(i int64)
- func (m MountMutation) Tx() (*Tx, error)
- func (m *MountMutation) Type() string
- func (m *MountMutation) UpdatedAt() (r int64, exists bool)
- func (m *MountMutation) Where(ps ...predicate.Mount)
- func (m *MountMutation) WhereP(ps ...func(*sql.Selector))
- type MountQuery
- func (mq *MountQuery) Aggregate(fns ...AggregateFunc) *MountSelect
- func (mq *MountQuery) All(ctx context.Context) ([]*Mount, error)
- func (mq *MountQuery) AllX(ctx context.Context) []*Mount
- func (mq *MountQuery) Clone() *MountQuery
- func (mq *MountQuery) Count(ctx context.Context) (int, error)
- func (mq *MountQuery) CountX(ctx context.Context) int
- func (mq *MountQuery) Exist(ctx context.Context) (bool, error)
- func (mq *MountQuery) ExistX(ctx context.Context) bool
- func (mq *MountQuery) First(ctx context.Context) (*Mount, error)
- func (mq *MountQuery) FirstID(ctx context.Context) (id int, err error)
- func (mq *MountQuery) FirstIDX(ctx context.Context) int
- func (mq *MountQuery) FirstX(ctx context.Context) *Mount
- func (mq *MountQuery) GroupBy(field string, fields ...string) *MountGroupBy
- func (mq *MountQuery) IDs(ctx context.Context) (ids []int, err error)
- func (mq *MountQuery) IDsX(ctx context.Context) []int
- func (mq *MountQuery) Limit(limit int) *MountQuery
- func (mq *MountQuery) Offset(offset int) *MountQuery
- func (mq *MountQuery) Only(ctx context.Context) (*Mount, error)
- func (mq *MountQuery) OnlyID(ctx context.Context) (id int, err error)
- func (mq *MountQuery) OnlyIDX(ctx context.Context) int
- func (mq *MountQuery) OnlyX(ctx context.Context) *Mount
- func (mq *MountQuery) Order(o ...mount.OrderOption) *MountQuery
- func (mq *MountQuery) QueryOwner() *ContainerQuery
- func (mq *MountQuery) Select(fields ...string) *MountSelect
- func (mq *MountQuery) Unique(unique bool) *MountQuery
- func (mq *MountQuery) Where(ps ...predicate.Mount) *MountQuery
- func (mq *MountQuery) WithOwner(opts ...func(*ContainerQuery)) *MountQuery
- type MountSelect
- func (ms *MountSelect) Aggregate(fns ...AggregateFunc) *MountSelect
- func (s *MountSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *MountSelect) BoolX(ctx context.Context) bool
- func (s *MountSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *MountSelect) BoolsX(ctx context.Context) []bool
- func (s *MountSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *MountSelect) Float64X(ctx context.Context) float64
- func (s *MountSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *MountSelect) Float64sX(ctx context.Context) []float64
- func (s *MountSelect) Int(ctx context.Context) (_ int, err error)
- func (s *MountSelect) IntX(ctx context.Context) int
- func (s *MountSelect) Ints(ctx context.Context) ([]int, error)
- func (s *MountSelect) IntsX(ctx context.Context) []int
- func (ms *MountSelect) Scan(ctx context.Context, v any) error
- func (s *MountSelect) ScanX(ctx context.Context, v any)
- func (s *MountSelect) String(ctx context.Context) (_ string, err error)
- func (s *MountSelect) StringX(ctx context.Context) string
- func (s *MountSelect) Strings(ctx context.Context) ([]string, error)
- func (s *MountSelect) StringsX(ctx context.Context) []string
- type MountUpdate
- func (mu *MountUpdate) AddCreatedAt(i int64) *MountUpdate
- func (mu *MountUpdate) AddOwner(c ...*Container) *MountUpdate
- func (mu *MountUpdate) AddOwnerIDs(ids ...int) *MountUpdate
- func (mu *MountUpdate) AddUpdatedAt(i int64) *MountUpdate
- func (mu *MountUpdate) ClearOwner() *MountUpdate
- func (mu *MountUpdate) Exec(ctx context.Context) error
- func (mu *MountUpdate) ExecX(ctx context.Context)
- func (mu *MountUpdate) Mutation() *MountMutation
- func (mu *MountUpdate) RemoveOwner(c ...*Container) *MountUpdate
- func (mu *MountUpdate) RemoveOwnerIDs(ids ...int) *MountUpdate
- func (mu *MountUpdate) Save(ctx context.Context) (int, error)
- func (mu *MountUpdate) SaveX(ctx context.Context) int
- func (mu *MountUpdate) SetBind(s string) *MountUpdate
- func (mu *MountUpdate) SetCreatedAt(i int64) *MountUpdate
- func (mu *MountUpdate) SetHost(s string) *MountUpdate
- func (mu *MountUpdate) SetIsDir(b bool) *MountUpdate
- func (mu *MountUpdate) SetNillableBind(s *string) *MountUpdate
- func (mu *MountUpdate) SetNillableCreatedAt(i *int64) *MountUpdate
- func (mu *MountUpdate) SetNillableHost(s *string) *MountUpdate
- func (mu *MountUpdate) SetNillableIsDir(b *bool) *MountUpdate
- func (mu *MountUpdate) SetUpdatedAt(i int64) *MountUpdate
- func (mu *MountUpdate) Where(ps ...predicate.Mount) *MountUpdate
- type MountUpdateOne
- func (muo *MountUpdateOne) AddCreatedAt(i int64) *MountUpdateOne
- func (muo *MountUpdateOne) AddOwner(c ...*Container) *MountUpdateOne
- func (muo *MountUpdateOne) AddOwnerIDs(ids ...int) *MountUpdateOne
- func (muo *MountUpdateOne) AddUpdatedAt(i int64) *MountUpdateOne
- func (muo *MountUpdateOne) ClearOwner() *MountUpdateOne
- func (muo *MountUpdateOne) Exec(ctx context.Context) error
- func (muo *MountUpdateOne) ExecX(ctx context.Context)
- func (muo *MountUpdateOne) Mutation() *MountMutation
- func (muo *MountUpdateOne) RemoveOwner(c ...*Container) *MountUpdateOne
- func (muo *MountUpdateOne) RemoveOwnerIDs(ids ...int) *MountUpdateOne
- func (muo *MountUpdateOne) Save(ctx context.Context) (*Mount, error)
- func (muo *MountUpdateOne) SaveX(ctx context.Context) *Mount
- func (muo *MountUpdateOne) Select(field string, fields ...string) *MountUpdateOne
- func (muo *MountUpdateOne) SetBind(s string) *MountUpdateOne
- func (muo *MountUpdateOne) SetCreatedAt(i int64) *MountUpdateOne
- func (muo *MountUpdateOne) SetHost(s string) *MountUpdateOne
- func (muo *MountUpdateOne) SetIsDir(b bool) *MountUpdateOne
- func (muo *MountUpdateOne) SetNillableBind(s *string) *MountUpdateOne
- func (muo *MountUpdateOne) SetNillableCreatedAt(i *int64) *MountUpdateOne
- func (muo *MountUpdateOne) SetNillableHost(s *string) *MountUpdateOne
- func (muo *MountUpdateOne) SetNillableIsDir(b *bool) *MountUpdateOne
- func (muo *MountUpdateOne) SetUpdatedAt(i int64) *MountUpdateOne
- func (muo *MountUpdateOne) Where(ps ...predicate.Mount) *MountUpdateOne
- type Mounts
- 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) QueryContainers(n *Node) *ContainerQuery
- 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) AddContainerIDs(ids ...int) *NodeCreate
- func (nc *NodeCreate) AddContainers(c ...*Container) *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) SetAddress(s string) *NodeCreate
- func (nc *NodeCreate) SetCreatedAt(i int64) *NodeCreate
- func (nc *NodeCreate) SetName(s string) *NodeCreate
- func (nc *NodeCreate) SetNillableCreatedAt(i *int64) *NodeCreate
- func (nc *NodeCreate) SetNillableUID(s *string) *NodeCreate
- func (nc *NodeCreate) SetNillableUpdatedAt(i *int64) *NodeCreate
- func (nc *NodeCreate) SetNote(s string) *NodeCreate
- func (nc *NodeCreate) SetUID(s string) *NodeCreate
- func (nc *NodeCreate) SetUpdatedAt(i int64) *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) AddContainerIDs(ids ...int)
- func (m *NodeMutation) AddCreatedAt(i int64)
- func (m *NodeMutation) AddField(name string, value ent.Value) error
- func (m *NodeMutation) AddUpdatedAt(i int64)
- func (m *NodeMutation) AddedCreatedAt() (r int64, exists bool)
- 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) AddedUpdatedAt() (r int64, exists bool)
- func (m *NodeMutation) Address() (r string, exists bool)
- func (m *NodeMutation) ClearContainers()
- func (m *NodeMutation) ClearEdge(name string) error
- func (m *NodeMutation) ClearField(name string) error
- func (m *NodeMutation) ClearedEdges() []string
- func (m *NodeMutation) ClearedFields() []string
- func (m NodeMutation) Client() *Client
- func (m *NodeMutation) ContainersCleared() bool
- func (m *NodeMutation) ContainersIDs() (ids []int)
- func (m *NodeMutation) CreatedAt() (r int64, exists bool)
- 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) 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) Note() (r string, exists bool)
- func (m *NodeMutation) OldAddress(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
- func (m *NodeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *NodeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldNote(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldUID(ctx context.Context) (v string, err error)
- func (m *NodeMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
- func (m *NodeMutation) Op() Op
- func (m *NodeMutation) RemoveContainerIDs(ids ...int)
- func (m *NodeMutation) RemovedContainersIDs() (ids []int)
- func (m *NodeMutation) RemovedEdges() []string
- func (m *NodeMutation) RemovedIDs(name string) []ent.Value
- func (m *NodeMutation) ResetAddress()
- func (m *NodeMutation) ResetContainers()
- func (m *NodeMutation) ResetCreatedAt()
- func (m *NodeMutation) ResetEdge(name string) error
- func (m *NodeMutation) ResetField(name string) error
- func (m *NodeMutation) ResetName()
- func (m *NodeMutation) ResetNote()
- func (m *NodeMutation) ResetUID()
- func (m *NodeMutation) ResetUpdatedAt()
- func (m *NodeMutation) SetAddress(s string)
- func (m *NodeMutation) SetCreatedAt(i int64)
- func (m *NodeMutation) SetField(name string, value ent.Value) error
- func (m *NodeMutation) SetName(s string)
- func (m *NodeMutation) SetNote(s string)
- func (m *NodeMutation) SetOp(op Op)
- func (m *NodeMutation) SetUID(s string)
- func (m *NodeMutation) SetUpdatedAt(i int64)
- func (m NodeMutation) Tx() (*Tx, error)
- func (m *NodeMutation) Type() string
- func (m *NodeMutation) UID() (r string, exists bool)
- func (m *NodeMutation) UpdatedAt() (r int64, exists bool)
- 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) QueryContainers() *ContainerQuery
- 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) WithContainers(opts ...func(*ContainerQuery)) *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) AddContainerIDs(ids ...int) *NodeUpdate
- func (nu *NodeUpdate) AddContainers(c ...*Container) *NodeUpdate
- func (nu *NodeUpdate) AddCreatedAt(i int64) *NodeUpdate
- func (nu *NodeUpdate) AddUpdatedAt(i int64) *NodeUpdate
- func (nu *NodeUpdate) ClearContainers() *NodeUpdate
- func (nu *NodeUpdate) Exec(ctx context.Context) error
- func (nu *NodeUpdate) ExecX(ctx context.Context)
- func (nu *NodeUpdate) Mutation() *NodeMutation
- func (nu *NodeUpdate) RemoveContainerIDs(ids ...int) *NodeUpdate
- func (nu *NodeUpdate) RemoveContainers(c ...*Container) *NodeUpdate
- func (nu *NodeUpdate) Save(ctx context.Context) (int, error)
- func (nu *NodeUpdate) SaveX(ctx context.Context) int
- func (nu *NodeUpdate) SetAddress(s string) *NodeUpdate
- func (nu *NodeUpdate) SetCreatedAt(i int64) *NodeUpdate
- func (nu *NodeUpdate) SetName(s string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableAddress(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableCreatedAt(i *int64) *NodeUpdate
- func (nu *NodeUpdate) SetNillableName(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableNote(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNillableUID(s *string) *NodeUpdate
- func (nu *NodeUpdate) SetNote(s string) *NodeUpdate
- func (nu *NodeUpdate) SetUID(s string) *NodeUpdate
- func (nu *NodeUpdate) SetUpdatedAt(i int64) *NodeUpdate
- func (nu *NodeUpdate) Where(ps ...predicate.Node) *NodeUpdate
- type NodeUpdateOne
- func (nuo *NodeUpdateOne) AddContainerIDs(ids ...int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) AddContainers(c ...*Container) *NodeUpdateOne
- func (nuo *NodeUpdateOne) AddCreatedAt(i int64) *NodeUpdateOne
- func (nuo *NodeUpdateOne) AddUpdatedAt(i int64) *NodeUpdateOne
- func (nuo *NodeUpdateOne) ClearContainers() *NodeUpdateOne
- func (nuo *NodeUpdateOne) Exec(ctx context.Context) error
- func (nuo *NodeUpdateOne) ExecX(ctx context.Context)
- func (nuo *NodeUpdateOne) Mutation() *NodeMutation
- func (nuo *NodeUpdateOne) RemoveContainerIDs(ids ...int) *NodeUpdateOne
- func (nuo *NodeUpdateOne) RemoveContainers(c ...*Container) *NodeUpdateOne
- 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) SetAddress(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetCreatedAt(i int64) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetName(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableAddress(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableCreatedAt(i *int64) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableName(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableNote(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNillableUID(s *string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetNote(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetUID(s string) *NodeUpdateOne
- func (nuo *NodeUpdateOne) SetUpdatedAt(i int64) *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 Port
- type PortClient
- func (c *PortClient) Create() *PortCreate
- func (c *PortClient) CreateBulk(builders ...*PortCreate) *PortCreateBulk
- func (c *PortClient) Delete() *PortDelete
- func (c *PortClient) DeleteOne(po *Port) *PortDeleteOne
- func (c *PortClient) DeleteOneID(id int) *PortDeleteOne
- func (c *PortClient) Get(ctx context.Context, id int) (*Port, error)
- func (c *PortClient) GetX(ctx context.Context, id int) *Port
- func (c *PortClient) Hooks() []Hook
- func (c *PortClient) Intercept(interceptors ...Interceptor)
- func (c *PortClient) Interceptors() []Interceptor
- func (c *PortClient) MapCreateBulk(slice any, setFunc func(*PortCreate, int)) *PortCreateBulk
- func (c *PortClient) Query() *PortQuery
- func (c *PortClient) QueryOwner(po *Port) *ContainerQuery
- func (c *PortClient) Update() *PortUpdate
- func (c *PortClient) UpdateOne(po *Port) *PortUpdateOne
- func (c *PortClient) UpdateOneID(id int) *PortUpdateOne
- func (c *PortClient) Use(hooks ...Hook)
- type PortCreate
- func (pc *PortCreate) AddOwner(c ...*Container) *PortCreate
- func (pc *PortCreate) AddOwnerIDs(ids ...int) *PortCreate
- func (pc *PortCreate) Exec(ctx context.Context) error
- func (pc *PortCreate) ExecX(ctx context.Context)
- func (pc *PortCreate) Mutation() *PortMutation
- func (pc *PortCreate) Save(ctx context.Context) (*Port, error)
- func (pc *PortCreate) SaveX(ctx context.Context) *Port
- func (pc *PortCreate) SetBind(i int) *PortCreate
- func (pc *PortCreate) SetCreatedAt(i int64) *PortCreate
- func (pc *PortCreate) SetHost(i int) *PortCreate
- func (pc *PortCreate) SetNillableCreatedAt(i *int64) *PortCreate
- func (pc *PortCreate) SetNillableUpdatedAt(i *int64) *PortCreate
- func (pc *PortCreate) SetProtocol(i int) *PortCreate
- func (pc *PortCreate) SetUpdatedAt(i int64) *PortCreate
- type PortCreateBulk
- type PortDelete
- type PortDeleteOne
- type PortEdges
- type PortGroupBy
- func (pgb *PortGroupBy) Aggregate(fns ...AggregateFunc) *PortGroupBy
- func (s *PortGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *PortGroupBy) BoolX(ctx context.Context) bool
- func (s *PortGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *PortGroupBy) BoolsX(ctx context.Context) []bool
- func (s *PortGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *PortGroupBy) Float64X(ctx context.Context) float64
- func (s *PortGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *PortGroupBy) Float64sX(ctx context.Context) []float64
- func (s *PortGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *PortGroupBy) IntX(ctx context.Context) int
- func (s *PortGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *PortGroupBy) IntsX(ctx context.Context) []int
- func (pgb *PortGroupBy) Scan(ctx context.Context, v any) error
- func (s *PortGroupBy) ScanX(ctx context.Context, v any)
- func (s *PortGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *PortGroupBy) StringX(ctx context.Context) string
- func (s *PortGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *PortGroupBy) StringsX(ctx context.Context) []string
- type PortMutation
- func (m *PortMutation) AddBind(i int)
- func (m *PortMutation) AddCreatedAt(i int64)
- func (m *PortMutation) AddField(name string, value ent.Value) error
- func (m *PortMutation) AddHost(i int)
- func (m *PortMutation) AddOwnerIDs(ids ...int)
- func (m *PortMutation) AddProtocol(i int)
- func (m *PortMutation) AddUpdatedAt(i int64)
- func (m *PortMutation) AddedBind() (r int, exists bool)
- func (m *PortMutation) AddedCreatedAt() (r int64, exists bool)
- func (m *PortMutation) AddedEdges() []string
- func (m *PortMutation) AddedField(name string) (ent.Value, bool)
- func (m *PortMutation) AddedFields() []string
- func (m *PortMutation) AddedHost() (r int, exists bool)
- func (m *PortMutation) AddedIDs(name string) []ent.Value
- func (m *PortMutation) AddedProtocol() (r int, exists bool)
- func (m *PortMutation) AddedUpdatedAt() (r int64, exists bool)
- func (m *PortMutation) Bind() (r int, exists bool)
- func (m *PortMutation) ClearEdge(name string) error
- func (m *PortMutation) ClearField(name string) error
- func (m *PortMutation) ClearOwner()
- func (m *PortMutation) ClearedEdges() []string
- func (m *PortMutation) ClearedFields() []string
- func (m PortMutation) Client() *Client
- func (m *PortMutation) CreatedAt() (r int64, exists bool)
- func (m *PortMutation) EdgeCleared(name string) bool
- func (m *PortMutation) Field(name string) (ent.Value, bool)
- func (m *PortMutation) FieldCleared(name string) bool
- func (m *PortMutation) Fields() []string
- func (m *PortMutation) Host() (r int, exists bool)
- func (m *PortMutation) ID() (id int, exists bool)
- func (m *PortMutation) IDs(ctx context.Context) ([]int, error)
- func (m *PortMutation) OldBind(ctx context.Context) (v int, err error)
- func (m *PortMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
- func (m *PortMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *PortMutation) OldHost(ctx context.Context) (v int, err error)
- func (m *PortMutation) OldProtocol(ctx context.Context) (v int, err error)
- func (m *PortMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
- func (m *PortMutation) Op() Op
- func (m *PortMutation) OwnerCleared() bool
- func (m *PortMutation) OwnerIDs() (ids []int)
- func (m *PortMutation) Protocol() (r int, exists bool)
- func (m *PortMutation) RemoveOwnerIDs(ids ...int)
- func (m *PortMutation) RemovedEdges() []string
- func (m *PortMutation) RemovedIDs(name string) []ent.Value
- func (m *PortMutation) RemovedOwnerIDs() (ids []int)
- func (m *PortMutation) ResetBind()
- func (m *PortMutation) ResetCreatedAt()
- func (m *PortMutation) ResetEdge(name string) error
- func (m *PortMutation) ResetField(name string) error
- func (m *PortMutation) ResetHost()
- func (m *PortMutation) ResetOwner()
- func (m *PortMutation) ResetProtocol()
- func (m *PortMutation) ResetUpdatedAt()
- func (m *PortMutation) SetBind(i int)
- func (m *PortMutation) SetCreatedAt(i int64)
- func (m *PortMutation) SetField(name string, value ent.Value) error
- func (m *PortMutation) SetHost(i int)
- func (m *PortMutation) SetOp(op Op)
- func (m *PortMutation) SetProtocol(i int)
- func (m *PortMutation) SetUpdatedAt(i int64)
- func (m PortMutation) Tx() (*Tx, error)
- func (m *PortMutation) Type() string
- func (m *PortMutation) UpdatedAt() (r int64, exists bool)
- func (m *PortMutation) Where(ps ...predicate.Port)
- func (m *PortMutation) WhereP(ps ...func(*sql.Selector))
- type PortQuery
- func (pq *PortQuery) Aggregate(fns ...AggregateFunc) *PortSelect
- func (pq *PortQuery) All(ctx context.Context) ([]*Port, error)
- func (pq *PortQuery) AllX(ctx context.Context) []*Port
- func (pq *PortQuery) Clone() *PortQuery
- func (pq *PortQuery) Count(ctx context.Context) (int, error)
- func (pq *PortQuery) CountX(ctx context.Context) int
- func (pq *PortQuery) Exist(ctx context.Context) (bool, error)
- func (pq *PortQuery) ExistX(ctx context.Context) bool
- func (pq *PortQuery) First(ctx context.Context) (*Port, error)
- func (pq *PortQuery) FirstID(ctx context.Context) (id int, err error)
- func (pq *PortQuery) FirstIDX(ctx context.Context) int
- func (pq *PortQuery) FirstX(ctx context.Context) *Port
- func (pq *PortQuery) GroupBy(field string, fields ...string) *PortGroupBy
- func (pq *PortQuery) IDs(ctx context.Context) (ids []int, err error)
- func (pq *PortQuery) IDsX(ctx context.Context) []int
- func (pq *PortQuery) Limit(limit int) *PortQuery
- func (pq *PortQuery) Offset(offset int) *PortQuery
- func (pq *PortQuery) Only(ctx context.Context) (*Port, error)
- func (pq *PortQuery) OnlyID(ctx context.Context) (id int, err error)
- func (pq *PortQuery) OnlyIDX(ctx context.Context) int
- func (pq *PortQuery) OnlyX(ctx context.Context) *Port
- func (pq *PortQuery) Order(o ...port.OrderOption) *PortQuery
- func (pq *PortQuery) QueryOwner() *ContainerQuery
- func (pq *PortQuery) Select(fields ...string) *PortSelect
- func (pq *PortQuery) Unique(unique bool) *PortQuery
- func (pq *PortQuery) Where(ps ...predicate.Port) *PortQuery
- func (pq *PortQuery) WithOwner(opts ...func(*ContainerQuery)) *PortQuery
- type PortSelect
- func (ps *PortSelect) Aggregate(fns ...AggregateFunc) *PortSelect
- func (s *PortSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *PortSelect) BoolX(ctx context.Context) bool
- func (s *PortSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *PortSelect) BoolsX(ctx context.Context) []bool
- func (s *PortSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *PortSelect) Float64X(ctx context.Context) float64
- func (s *PortSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *PortSelect) Float64sX(ctx context.Context) []float64
- func (s *PortSelect) Int(ctx context.Context) (_ int, err error)
- func (s *PortSelect) IntX(ctx context.Context) int
- func (s *PortSelect) Ints(ctx context.Context) ([]int, error)
- func (s *PortSelect) IntsX(ctx context.Context) []int
- func (ps *PortSelect) Scan(ctx context.Context, v any) error
- func (s *PortSelect) ScanX(ctx context.Context, v any)
- func (s *PortSelect) String(ctx context.Context) (_ string, err error)
- func (s *PortSelect) StringX(ctx context.Context) string
- func (s *PortSelect) Strings(ctx context.Context) ([]string, error)
- func (s *PortSelect) StringsX(ctx context.Context) []string
- type PortUpdate
- func (pu *PortUpdate) AddBind(i int) *PortUpdate
- func (pu *PortUpdate) AddCreatedAt(i int64) *PortUpdate
- func (pu *PortUpdate) AddHost(i int) *PortUpdate
- func (pu *PortUpdate) AddOwner(c ...*Container) *PortUpdate
- func (pu *PortUpdate) AddOwnerIDs(ids ...int) *PortUpdate
- func (pu *PortUpdate) AddProtocol(i int) *PortUpdate
- func (pu *PortUpdate) AddUpdatedAt(i int64) *PortUpdate
- func (pu *PortUpdate) ClearOwner() *PortUpdate
- func (pu *PortUpdate) Exec(ctx context.Context) error
- func (pu *PortUpdate) ExecX(ctx context.Context)
- func (pu *PortUpdate) Mutation() *PortMutation
- func (pu *PortUpdate) RemoveOwner(c ...*Container) *PortUpdate
- func (pu *PortUpdate) RemoveOwnerIDs(ids ...int) *PortUpdate
- func (pu *PortUpdate) Save(ctx context.Context) (int, error)
- func (pu *PortUpdate) SaveX(ctx context.Context) int
- func (pu *PortUpdate) SetBind(i int) *PortUpdate
- func (pu *PortUpdate) SetCreatedAt(i int64) *PortUpdate
- func (pu *PortUpdate) SetHost(i int) *PortUpdate
- func (pu *PortUpdate) SetNillableBind(i *int) *PortUpdate
- func (pu *PortUpdate) SetNillableCreatedAt(i *int64) *PortUpdate
- func (pu *PortUpdate) SetNillableHost(i *int) *PortUpdate
- func (pu *PortUpdate) SetNillableProtocol(i *int) *PortUpdate
- func (pu *PortUpdate) SetProtocol(i int) *PortUpdate
- func (pu *PortUpdate) SetUpdatedAt(i int64) *PortUpdate
- func (pu *PortUpdate) Where(ps ...predicate.Port) *PortUpdate
- type PortUpdateOne
- func (puo *PortUpdateOne) AddBind(i int) *PortUpdateOne
- func (puo *PortUpdateOne) AddCreatedAt(i int64) *PortUpdateOne
- func (puo *PortUpdateOne) AddHost(i int) *PortUpdateOne
- func (puo *PortUpdateOne) AddOwner(c ...*Container) *PortUpdateOne
- func (puo *PortUpdateOne) AddOwnerIDs(ids ...int) *PortUpdateOne
- func (puo *PortUpdateOne) AddProtocol(i int) *PortUpdateOne
- func (puo *PortUpdateOne) AddUpdatedAt(i int64) *PortUpdateOne
- func (puo *PortUpdateOne) ClearOwner() *PortUpdateOne
- func (puo *PortUpdateOne) Exec(ctx context.Context) error
- func (puo *PortUpdateOne) ExecX(ctx context.Context)
- func (puo *PortUpdateOne) Mutation() *PortMutation
- func (puo *PortUpdateOne) RemoveOwner(c ...*Container) *PortUpdateOne
- func (puo *PortUpdateOne) RemoveOwnerIDs(ids ...int) *PortUpdateOne
- func (puo *PortUpdateOne) Save(ctx context.Context) (*Port, error)
- func (puo *PortUpdateOne) SaveX(ctx context.Context) *Port
- func (puo *PortUpdateOne) Select(field string, fields ...string) *PortUpdateOne
- func (puo *PortUpdateOne) SetBind(i int) *PortUpdateOne
- func (puo *PortUpdateOne) SetCreatedAt(i int64) *PortUpdateOne
- func (puo *PortUpdateOne) SetHost(i int) *PortUpdateOne
- func (puo *PortUpdateOne) SetNillableBind(i *int) *PortUpdateOne
- func (puo *PortUpdateOne) SetNillableCreatedAt(i *int64) *PortUpdateOne
- func (puo *PortUpdateOne) SetNillableHost(i *int) *PortUpdateOne
- func (puo *PortUpdateOne) SetNillableProtocol(i *int) *PortUpdateOne
- func (puo *PortUpdateOne) SetProtocol(i int) *PortUpdateOne
- func (puo *PortUpdateOne) SetUpdatedAt(i int64) *PortUpdateOne
- func (puo *PortUpdateOne) Where(ps ...predicate.Port) *PortUpdateOne
- type Ports
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- 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) QueryContainers(u *User) *ContainerQuery
- 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) AddContainerIDs(ids ...int) *UserCreate
- func (uc *UserCreate) AddContainers(c ...*Container) *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) SetCreatedAt(i int64) *UserCreate
- func (uc *UserCreate) SetEmail(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreatedAt(i *int64) *UserCreate
- func (uc *UserCreate) SetNillableUID(s *string) *UserCreate
- func (uc *UserCreate) SetNillableUpdatedAt(i *int64) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetUID(s string) *UserCreate
- func (uc *UserCreate) SetUpdatedAt(i int64) *UserCreate
- func (uc *UserCreate) SetUsername(s string) *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) AddContainerIDs(ids ...int)
- func (m *UserMutation) AddCreatedAt(i int64)
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddUpdatedAt(i int64)
- func (m *UserMutation) AddedCreatedAt() (r int64, exists bool)
- 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) AddedUpdatedAt() (r int64, exists bool)
- func (m *UserMutation) ClearContainers()
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) ContainersCleared() bool
- func (m *UserMutation) ContainersIDs() (ids []int)
- func (m *UserMutation) CreatedAt() (r int64, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Email() (r string, exists bool)
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id int, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]int, error)
- func (m *UserMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
- func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUID(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
- func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemoveContainerIDs(ids ...int)
- func (m *UserMutation) RemovedContainersIDs() (ids []int)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetContainers()
- func (m *UserMutation) ResetCreatedAt()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetEmail()
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetUID()
- func (m *UserMutation) ResetUpdatedAt()
- func (m *UserMutation) ResetUsername()
- func (m *UserMutation) SetCreatedAt(i int64)
- func (m *UserMutation) SetEmail(s string)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetUID(s string)
- func (m *UserMutation) SetUpdatedAt(i int64)
- func (m *UserMutation) SetUsername(s string)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) UID() (r string, exists bool)
- func (m *UserMutation) UpdatedAt() (r int64, exists bool)
- func (m *UserMutation) Username() (r string, exists bool)
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) int
- func (uq *UserQuery) FirstX(ctx context.Context) *User
- func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
- func (uq *UserQuery) IDs(ctx context.Context) (ids []int, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []int
- func (uq *UserQuery) Limit(limit int) *UserQuery
- func (uq *UserQuery) Offset(offset int) *UserQuery
- func (uq *UserQuery) Only(ctx context.Context) (*User, error)
- func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) int
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) QueryContainers() *ContainerQuery
- 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) WithContainers(opts ...func(*ContainerQuery)) *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) AddContainerIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) AddContainers(c ...*Container) *UserUpdate
- func (uu *UserUpdate) AddCreatedAt(i int64) *UserUpdate
- func (uu *UserUpdate) AddUpdatedAt(i int64) *UserUpdate
- func (uu *UserUpdate) ClearContainers() *UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) RemoveContainerIDs(ids ...int) *UserUpdate
- func (uu *UserUpdate) RemoveContainers(c ...*Container) *UserUpdate
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCreatedAt(i int64) *UserUpdate
- func (uu *UserUpdate) SetEmail(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableCreatedAt(i *int64) *UserUpdate
- func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUID(s *string) *UserUpdate
- func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetUID(s string) *UserUpdate
- func (uu *UserUpdate) SetUpdatedAt(i int64) *UserUpdate
- func (uu *UserUpdate) SetUsername(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) AddContainerIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) AddContainers(c ...*Container) *UserUpdateOne
- func (uuo *UserUpdateOne) AddCreatedAt(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) AddUpdatedAt(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) ClearContainers() *UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) RemoveContainerIDs(ids ...int) *UserUpdateOne
- func (uuo *UserUpdateOne) RemoveContainers(c ...*Container) *UserUpdateOne
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreatedAt(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreatedAt(i *int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUID(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUID(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUpdatedAt(i int64) *UserUpdateOne
- func (uuo *UserUpdateOne) SetUsername(s string) *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. TypeContainer = "Container" TypeJob = "Job" TypeMount = "Mount" TypeNode = "Node" TypePort = "Port" 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 // Container is the client for interacting with the Container builders. Container *ContainerClient // Job is the client for interacting with the Job builders. Job *JobClient // Mount is the client for interacting with the Mount builders. Mount *MountClient // Node is the client for interacting with the Node builders. Node *NodeClient // Port is the client for interacting with the Port builders. Port *PortClient // 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(). Container. 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 Container ¶
type Container struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Cid holds the value of the "cid" field. Cid string `json:"cid,omitempty"` // Image holds the value of the "image" field. Image string `json:"image,omitempty"` // CPU holds the value of the "cpu" field. CPU int64 `json:"cpu,omitempty"` // Memory holds the value of the "memory" field. Memory int64 `json:"memory,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt int64 `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt int64 `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the ContainerQuery when eager-loading is set. Edges ContainerEdges `json:"edges"` // contains filtered or unexported fields }
container info table
func (*Container) QueryMounts ¶
func (c *Container) QueryMounts() *MountQuery
QueryMounts queries the "mounts" edge of the Container entity.
func (*Container) QueryOwner ¶
QueryOwner queries the "owner" edge of the Container entity.
func (*Container) QueryPorts ¶
QueryPorts queries the "ports" edge of the Container entity.
func (*Container) Unwrap ¶
Unwrap unwraps the Container 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 (*Container) Update ¶
func (c *Container) Update() *ContainerUpdateOne
Update returns a builder for updating this Container. Note that you need to call Container.Unwrap() before calling this method if this Container was returned from a transaction, and the transaction was committed or rolled back.
type ContainerClient ¶
type ContainerClient struct {
// contains filtered or unexported fields
}
ContainerClient is a client for the Container schema.
func NewContainerClient ¶
func NewContainerClient(c config) *ContainerClient
NewContainerClient returns a client for the Container from the given config.
func (*ContainerClient) Create ¶
func (c *ContainerClient) Create() *ContainerCreate
Create returns a builder for creating a Container entity.
func (*ContainerClient) CreateBulk ¶
func (c *ContainerClient) CreateBulk(builders ...*ContainerCreate) *ContainerCreateBulk
CreateBulk returns a builder for creating a bulk of Container entities.
func (*ContainerClient) Delete ¶
func (c *ContainerClient) Delete() *ContainerDelete
Delete returns a delete builder for Container.
func (*ContainerClient) DeleteOne ¶
func (c *ContainerClient) DeleteOne(co *Container) *ContainerDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ContainerClient) DeleteOneID ¶
func (c *ContainerClient) DeleteOneID(id int) *ContainerDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ContainerClient) GetX ¶
func (c *ContainerClient) GetX(ctx context.Context, id int) *Container
GetX is like Get, but panics if an error occurs.
func (*ContainerClient) Hooks ¶
func (c *ContainerClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ContainerClient) Intercept ¶
func (c *ContainerClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `container.Intercept(f(g(h())))`.
func (*ContainerClient) Interceptors ¶
func (c *ContainerClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ContainerClient) MapCreateBulk ¶
func (c *ContainerClient) MapCreateBulk(slice any, setFunc func(*ContainerCreate, int)) *ContainerCreateBulk
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 (*ContainerClient) Query ¶
func (c *ContainerClient) Query() *ContainerQuery
Query returns a query builder for Container.
func (*ContainerClient) QueryJobs ¶
func (c *ContainerClient) QueryJobs(co *Container) *JobQuery
QueryJobs queries the jobs edge of a Container.
func (*ContainerClient) QueryMounts ¶
func (c *ContainerClient) QueryMounts(co *Container) *MountQuery
QueryMounts queries the mounts edge of a Container.
func (*ContainerClient) QueryNode ¶
func (c *ContainerClient) QueryNode(co *Container) *NodeQuery
QueryNode queries the node edge of a Container.
func (*ContainerClient) QueryOwner ¶
func (c *ContainerClient) QueryOwner(co *Container) *UserQuery
QueryOwner queries the owner edge of a Container.
func (*ContainerClient) QueryPorts ¶
func (c *ContainerClient) QueryPorts(co *Container) *PortQuery
QueryPorts queries the ports edge of a Container.
func (*ContainerClient) Update ¶
func (c *ContainerClient) Update() *ContainerUpdate
Update returns an update builder for Container.
func (*ContainerClient) UpdateOne ¶
func (c *ContainerClient) UpdateOne(co *Container) *ContainerUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ContainerClient) UpdateOneID ¶
func (c *ContainerClient) UpdateOneID(id int) *ContainerUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ContainerClient) Use ¶
func (c *ContainerClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `container.Hooks(f(g(h())))`.
type ContainerCreate ¶
type ContainerCreate struct {
// contains filtered or unexported fields
}
ContainerCreate is the builder for creating a Container entity.
func (*ContainerCreate) AddJobIDs ¶
func (cc *ContainerCreate) AddJobIDs(ids ...int) *ContainerCreate
AddJobIDs adds the "jobs" edge to the Job entity by IDs.
func (*ContainerCreate) AddJobs ¶
func (cc *ContainerCreate) AddJobs(j ...*Job) *ContainerCreate
AddJobs adds the "jobs" edges to the Job entity.
func (*ContainerCreate) AddMountIDs ¶
func (cc *ContainerCreate) AddMountIDs(ids ...int) *ContainerCreate
AddMountIDs adds the "mounts" edge to the Mount entity by IDs.
func (*ContainerCreate) AddMounts ¶
func (cc *ContainerCreate) AddMounts(m ...*Mount) *ContainerCreate
AddMounts adds the "mounts" edges to the Mount entity.
func (*ContainerCreate) AddNode ¶
func (cc *ContainerCreate) AddNode(n ...*Node) *ContainerCreate
AddNode adds the "node" edges to the Node entity.
func (*ContainerCreate) AddNodeIDs ¶
func (cc *ContainerCreate) AddNodeIDs(ids ...int) *ContainerCreate
AddNodeIDs adds the "node" edge to the Node entity by IDs.
func (*ContainerCreate) AddOwner ¶
func (cc *ContainerCreate) AddOwner(u ...*User) *ContainerCreate
AddOwner adds the "owner" edges to the User entity.
func (*ContainerCreate) AddOwnerIDs ¶
func (cc *ContainerCreate) AddOwnerIDs(ids ...int) *ContainerCreate
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*ContainerCreate) AddPortIDs ¶
func (cc *ContainerCreate) AddPortIDs(ids ...int) *ContainerCreate
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*ContainerCreate) AddPorts ¶
func (cc *ContainerCreate) AddPorts(p ...*Port) *ContainerCreate
AddPorts adds the "ports" edges to the Port entity.
func (*ContainerCreate) Exec ¶
func (cc *ContainerCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContainerCreate) ExecX ¶
func (cc *ContainerCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContainerCreate) Mutation ¶
func (cc *ContainerCreate) Mutation() *ContainerMutation
Mutation returns the ContainerMutation object of the builder.
func (*ContainerCreate) Save ¶
func (cc *ContainerCreate) Save(ctx context.Context) (*Container, error)
Save creates the Container in the database.
func (*ContainerCreate) SaveX ¶
func (cc *ContainerCreate) SaveX(ctx context.Context) *Container
SaveX calls Save and panics if Save returns an error.
func (*ContainerCreate) SetCPU ¶
func (cc *ContainerCreate) SetCPU(i int64) *ContainerCreate
SetCPU sets the "cpu" field.
func (*ContainerCreate) SetCid ¶
func (cc *ContainerCreate) SetCid(s string) *ContainerCreate
SetCid sets the "cid" field.
func (*ContainerCreate) SetCreatedAt ¶
func (cc *ContainerCreate) SetCreatedAt(i int64) *ContainerCreate
SetCreatedAt sets the "created_at" field.
func (*ContainerCreate) SetImage ¶
func (cc *ContainerCreate) SetImage(s string) *ContainerCreate
SetImage sets the "image" field.
func (*ContainerCreate) SetMemory ¶
func (cc *ContainerCreate) SetMemory(i int64) *ContainerCreate
SetMemory sets the "memory" field.
func (*ContainerCreate) SetName ¶
func (cc *ContainerCreate) SetName(s string) *ContainerCreate
SetName sets the "name" field.
func (*ContainerCreate) SetNillableCreatedAt ¶
func (cc *ContainerCreate) SetNillableCreatedAt(i *int64) *ContainerCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ContainerCreate) SetNillableUpdatedAt ¶
func (cc *ContainerCreate) SetNillableUpdatedAt(i *int64) *ContainerCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*ContainerCreate) SetUpdatedAt ¶
func (cc *ContainerCreate) SetUpdatedAt(i int64) *ContainerCreate
SetUpdatedAt sets the "updated_at" field.
type ContainerCreateBulk ¶
type ContainerCreateBulk struct {
// contains filtered or unexported fields
}
ContainerCreateBulk is the builder for creating many Container entities in bulk.
func (*ContainerCreateBulk) Exec ¶
func (ccb *ContainerCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ContainerCreateBulk) ExecX ¶
func (ccb *ContainerCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type ContainerDelete ¶
type ContainerDelete struct {
// contains filtered or unexported fields
}
ContainerDelete is the builder for deleting a Container entity.
func (*ContainerDelete) Exec ¶
func (cd *ContainerDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ContainerDelete) ExecX ¶
func (cd *ContainerDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ContainerDelete) Where ¶
func (cd *ContainerDelete) Where(ps ...predicate.Container) *ContainerDelete
Where appends a list predicates to the ContainerDelete builder.
type ContainerDeleteOne ¶
type ContainerDeleteOne struct {
// contains filtered or unexported fields
}
ContainerDeleteOne is the builder for deleting a single Container entity.
func (*ContainerDeleteOne) Exec ¶
func (cdo *ContainerDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ContainerDeleteOne) ExecX ¶
func (cdo *ContainerDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContainerDeleteOne) Where ¶
func (cdo *ContainerDeleteOne) Where(ps ...predicate.Container) *ContainerDeleteOne
Where appends a list predicates to the ContainerDelete builder.
type ContainerEdges ¶
type ContainerEdges struct { // Owner holds the value of the owner edge. Owner []*User `json:"owner,omitempty"` // Node holds the value of the node edge. Node []*Node `json:"node,omitempty"` // Mounts holds the value of the mounts edge. Mounts []*Mount `json:"mounts,omitempty"` // Ports holds the value of the ports edge. Ports []*Port `json:"ports,omitempty"` // Jobs holds the value of the jobs edge. Jobs []*Job `json:"jobs,omitempty"` // contains filtered or unexported fields }
ContainerEdges holds the relations/edges for other nodes in the graph.
func (ContainerEdges) JobsOrErr ¶
func (e ContainerEdges) JobsOrErr() ([]*Job, error)
JobsOrErr returns the Jobs value or an error if the edge was not loaded in eager-loading.
func (ContainerEdges) MountsOrErr ¶
func (e ContainerEdges) MountsOrErr() ([]*Mount, error)
MountsOrErr returns the Mounts value or an error if the edge was not loaded in eager-loading.
func (ContainerEdges) NodeOrErr ¶
func (e ContainerEdges) NodeOrErr() ([]*Node, error)
NodeOrErr returns the Node value or an error if the edge was not loaded in eager-loading.
func (ContainerEdges) OwnerOrErr ¶
func (e ContainerEdges) OwnerOrErr() ([]*User, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading.
func (ContainerEdges) PortsOrErr ¶
func (e ContainerEdges) PortsOrErr() ([]*Port, error)
PortsOrErr returns the Ports value or an error if the edge was not loaded in eager-loading.
type ContainerGroupBy ¶
type ContainerGroupBy struct {
// contains filtered or unexported fields
}
ContainerGroupBy is the group-by builder for Container entities.
func (*ContainerGroupBy) Aggregate ¶
func (cgb *ContainerGroupBy) Aggregate(fns ...AggregateFunc) *ContainerGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ContainerGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContainerGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContainerGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContainerGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContainerGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContainerGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContainerGroupBy) Scan ¶
func (cgb *ContainerGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContainerGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContainerMutation ¶
type ContainerMutation struct {
// contains filtered or unexported fields
}
ContainerMutation represents an operation that mutates the Container nodes in the graph.
func (*ContainerMutation) AddCPU ¶
func (m *ContainerMutation) AddCPU(i int64)
AddCPU adds i to the "cpu" field.
func (*ContainerMutation) AddCreatedAt ¶
func (m *ContainerMutation) AddCreatedAt(i int64)
AddCreatedAt adds i to the "created_at" field.
func (*ContainerMutation) AddField ¶
func (m *ContainerMutation) 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 (*ContainerMutation) AddJobIDs ¶
func (m *ContainerMutation) AddJobIDs(ids ...int)
AddJobIDs adds the "jobs" edge to the Job entity by ids.
func (*ContainerMutation) AddMemory ¶
func (m *ContainerMutation) AddMemory(i int64)
AddMemory adds i to the "memory" field.
func (*ContainerMutation) AddMountIDs ¶
func (m *ContainerMutation) AddMountIDs(ids ...int)
AddMountIDs adds the "mounts" edge to the Mount entity by ids.
func (*ContainerMutation) AddNodeIDs ¶
func (m *ContainerMutation) AddNodeIDs(ids ...int)
AddNodeIDs adds the "node" edge to the Node entity by ids.
func (*ContainerMutation) AddOwnerIDs ¶
func (m *ContainerMutation) AddOwnerIDs(ids ...int)
AddOwnerIDs adds the "owner" edge to the User entity by ids.
func (*ContainerMutation) AddPortIDs ¶
func (m *ContainerMutation) AddPortIDs(ids ...int)
AddPortIDs adds the "ports" edge to the Port entity by ids.
func (*ContainerMutation) AddUpdatedAt ¶
func (m *ContainerMutation) AddUpdatedAt(i int64)
AddUpdatedAt adds i to the "updated_at" field.
func (*ContainerMutation) AddedCPU ¶
func (m *ContainerMutation) AddedCPU() (r int64, exists bool)
AddedCPU returns the value that was added to the "cpu" field in this mutation.
func (*ContainerMutation) AddedCreatedAt ¶
func (m *ContainerMutation) AddedCreatedAt() (r int64, exists bool)
AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.
func (*ContainerMutation) AddedEdges ¶
func (m *ContainerMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ContainerMutation) AddedField ¶
func (m *ContainerMutation) 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 (*ContainerMutation) AddedFields ¶
func (m *ContainerMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ContainerMutation) AddedIDs ¶
func (m *ContainerMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ContainerMutation) AddedMemory ¶
func (m *ContainerMutation) AddedMemory() (r int64, exists bool)
AddedMemory returns the value that was added to the "memory" field in this mutation.
func (*ContainerMutation) AddedUpdatedAt ¶
func (m *ContainerMutation) AddedUpdatedAt() (r int64, exists bool)
AddedUpdatedAt returns the value that was added to the "updated_at" field in this mutation.
func (*ContainerMutation) CPU ¶
func (m *ContainerMutation) CPU() (r int64, exists bool)
CPU returns the value of the "cpu" field in the mutation.
func (*ContainerMutation) Cid ¶
func (m *ContainerMutation) Cid() (r string, exists bool)
Cid returns the value of the "cid" field in the mutation.
func (*ContainerMutation) ClearEdge ¶
func (m *ContainerMutation) 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 (*ContainerMutation) ClearField ¶
func (m *ContainerMutation) 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 (*ContainerMutation) ClearJobs ¶
func (m *ContainerMutation) ClearJobs()
ClearJobs clears the "jobs" edge to the Job entity.
func (*ContainerMutation) ClearMounts ¶
func (m *ContainerMutation) ClearMounts()
ClearMounts clears the "mounts" edge to the Mount entity.
func (*ContainerMutation) ClearNode ¶
func (m *ContainerMutation) ClearNode()
ClearNode clears the "node" edge to the Node entity.
func (*ContainerMutation) ClearOwner ¶
func (m *ContainerMutation) ClearOwner()
ClearOwner clears the "owner" edge to the User entity.
func (*ContainerMutation) ClearPorts ¶
func (m *ContainerMutation) ClearPorts()
ClearPorts clears the "ports" edge to the Port entity.
func (*ContainerMutation) ClearedEdges ¶
func (m *ContainerMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ContainerMutation) ClearedFields ¶
func (m *ContainerMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ContainerMutation) Client ¶
func (m ContainerMutation) 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 (*ContainerMutation) CreatedAt ¶
func (m *ContainerMutation) CreatedAt() (r int64, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*ContainerMutation) EdgeCleared ¶
func (m *ContainerMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ContainerMutation) Field ¶
func (m *ContainerMutation) 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 (*ContainerMutation) FieldCleared ¶
func (m *ContainerMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ContainerMutation) Fields ¶
func (m *ContainerMutation) 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 (*ContainerMutation) ID ¶
func (m *ContainerMutation) 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 (*ContainerMutation) IDs ¶
func (m *ContainerMutation) 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 (*ContainerMutation) Image ¶
func (m *ContainerMutation) Image() (r string, exists bool)
Image returns the value of the "image" field in the mutation.
func (*ContainerMutation) JobsCleared ¶
func (m *ContainerMutation) JobsCleared() bool
JobsCleared reports if the "jobs" edge to the Job entity was cleared.
func (*ContainerMutation) JobsIDs ¶
func (m *ContainerMutation) JobsIDs() (ids []int)
JobsIDs returns the "jobs" edge IDs in the mutation.
func (*ContainerMutation) Memory ¶
func (m *ContainerMutation) Memory() (r int64, exists bool)
Memory returns the value of the "memory" field in the mutation.
func (*ContainerMutation) MountsCleared ¶
func (m *ContainerMutation) MountsCleared() bool
MountsCleared reports if the "mounts" edge to the Mount entity was cleared.
func (*ContainerMutation) MountsIDs ¶
func (m *ContainerMutation) MountsIDs() (ids []int)
MountsIDs returns the "mounts" edge IDs in the mutation.
func (*ContainerMutation) Name ¶
func (m *ContainerMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ContainerMutation) NodeCleared ¶
func (m *ContainerMutation) NodeCleared() bool
NodeCleared reports if the "node" edge to the Node entity was cleared.
func (*ContainerMutation) NodeIDs ¶
func (m *ContainerMutation) NodeIDs() (ids []int)
NodeIDs returns the "node" edge IDs in the mutation.
func (*ContainerMutation) OldCPU ¶
func (m *ContainerMutation) OldCPU(ctx context.Context) (v int64, err error)
OldCPU returns the old "cpu" field's value of the Container entity. If the Container 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 (*ContainerMutation) OldCid ¶
func (m *ContainerMutation) OldCid(ctx context.Context) (v string, err error)
OldCid returns the old "cid" field's value of the Container entity. If the Container 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 (*ContainerMutation) OldCreatedAt ¶
func (m *ContainerMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
OldCreatedAt returns the old "created_at" field's value of the Container entity. If the Container 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 (*ContainerMutation) 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 (*ContainerMutation) OldImage ¶
func (m *ContainerMutation) OldImage(ctx context.Context) (v string, err error)
OldImage returns the old "image" field's value of the Container entity. If the Container 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 (*ContainerMutation) OldMemory ¶
func (m *ContainerMutation) OldMemory(ctx context.Context) (v int64, err error)
OldMemory returns the old "memory" field's value of the Container entity. If the Container 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 (*ContainerMutation) OldName ¶
func (m *ContainerMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Container entity. If the Container 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 (*ContainerMutation) OldUpdatedAt ¶
func (m *ContainerMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
OldUpdatedAt returns the old "updated_at" field's value of the Container entity. If the Container 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 (*ContainerMutation) OwnerCleared ¶
func (m *ContainerMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the User entity was cleared.
func (*ContainerMutation) OwnerIDs ¶
func (m *ContainerMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation.
func (*ContainerMutation) PortsCleared ¶
func (m *ContainerMutation) PortsCleared() bool
PortsCleared reports if the "ports" edge to the Port entity was cleared.
func (*ContainerMutation) PortsIDs ¶
func (m *ContainerMutation) PortsIDs() (ids []int)
PortsIDs returns the "ports" edge IDs in the mutation.
func (*ContainerMutation) RemoveJobIDs ¶
func (m *ContainerMutation) RemoveJobIDs(ids ...int)
RemoveJobIDs removes the "jobs" edge to the Job entity by IDs.
func (*ContainerMutation) RemoveMountIDs ¶
func (m *ContainerMutation) RemoveMountIDs(ids ...int)
RemoveMountIDs removes the "mounts" edge to the Mount entity by IDs.
func (*ContainerMutation) RemoveNodeIDs ¶
func (m *ContainerMutation) RemoveNodeIDs(ids ...int)
RemoveNodeIDs removes the "node" edge to the Node entity by IDs.
func (*ContainerMutation) RemoveOwnerIDs ¶
func (m *ContainerMutation) RemoveOwnerIDs(ids ...int)
RemoveOwnerIDs removes the "owner" edge to the User entity by IDs.
func (*ContainerMutation) RemovePortIDs ¶
func (m *ContainerMutation) RemovePortIDs(ids ...int)
RemovePortIDs removes the "ports" edge to the Port entity by IDs.
func (*ContainerMutation) RemovedEdges ¶
func (m *ContainerMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ContainerMutation) RemovedIDs ¶
func (m *ContainerMutation) 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 (*ContainerMutation) RemovedJobsIDs ¶
func (m *ContainerMutation) RemovedJobsIDs() (ids []int)
RemovedJobs returns the removed IDs of the "jobs" edge to the Job entity.
func (*ContainerMutation) RemovedMountsIDs ¶
func (m *ContainerMutation) RemovedMountsIDs() (ids []int)
RemovedMounts returns the removed IDs of the "mounts" edge to the Mount entity.
func (*ContainerMutation) RemovedNodeIDs ¶
func (m *ContainerMutation) RemovedNodeIDs() (ids []int)
RemovedNode returns the removed IDs of the "node" edge to the Node entity.
func (*ContainerMutation) RemovedOwnerIDs ¶
func (m *ContainerMutation) RemovedOwnerIDs() (ids []int)
RemovedOwner returns the removed IDs of the "owner" edge to the User entity.
func (*ContainerMutation) RemovedPortsIDs ¶
func (m *ContainerMutation) RemovedPortsIDs() (ids []int)
RemovedPorts returns the removed IDs of the "ports" edge to the Port entity.
func (*ContainerMutation) ResetCPU ¶
func (m *ContainerMutation) ResetCPU()
ResetCPU resets all changes to the "cpu" field.
func (*ContainerMutation) ResetCid ¶
func (m *ContainerMutation) ResetCid()
ResetCid resets all changes to the "cid" field.
func (*ContainerMutation) ResetCreatedAt ¶
func (m *ContainerMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*ContainerMutation) ResetEdge ¶
func (m *ContainerMutation) 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 (*ContainerMutation) ResetField ¶
func (m *ContainerMutation) 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 (*ContainerMutation) ResetImage ¶
func (m *ContainerMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*ContainerMutation) ResetJobs ¶
func (m *ContainerMutation) ResetJobs()
ResetJobs resets all changes to the "jobs" edge.
func (*ContainerMutation) ResetMemory ¶
func (m *ContainerMutation) ResetMemory()
ResetMemory resets all changes to the "memory" field.
func (*ContainerMutation) ResetMounts ¶
func (m *ContainerMutation) ResetMounts()
ResetMounts resets all changes to the "mounts" edge.
func (*ContainerMutation) ResetName ¶
func (m *ContainerMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ContainerMutation) ResetNode ¶
func (m *ContainerMutation) ResetNode()
ResetNode resets all changes to the "node" edge.
func (*ContainerMutation) ResetOwner ¶
func (m *ContainerMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*ContainerMutation) ResetPorts ¶
func (m *ContainerMutation) ResetPorts()
ResetPorts resets all changes to the "ports" edge.
func (*ContainerMutation) ResetUpdatedAt ¶
func (m *ContainerMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*ContainerMutation) SetCPU ¶
func (m *ContainerMutation) SetCPU(i int64)
SetCPU sets the "cpu" field.
func (*ContainerMutation) SetCid ¶
func (m *ContainerMutation) SetCid(s string)
SetCid sets the "cid" field.
func (*ContainerMutation) SetCreatedAt ¶
func (m *ContainerMutation) SetCreatedAt(i int64)
SetCreatedAt sets the "created_at" field.
func (*ContainerMutation) SetField ¶
func (m *ContainerMutation) 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 (*ContainerMutation) SetImage ¶
func (m *ContainerMutation) SetImage(s string)
SetImage sets the "image" field.
func (*ContainerMutation) SetMemory ¶
func (m *ContainerMutation) SetMemory(i int64)
SetMemory sets the "memory" field.
func (*ContainerMutation) SetName ¶
func (m *ContainerMutation) SetName(s string)
SetName sets the "name" field.
func (*ContainerMutation) SetOp ¶
func (m *ContainerMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ContainerMutation) SetUpdatedAt ¶
func (m *ContainerMutation) SetUpdatedAt(i int64)
SetUpdatedAt sets the "updated_at" field.
func (ContainerMutation) Tx ¶
func (m ContainerMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ContainerMutation) Type ¶
func (m *ContainerMutation) Type() string
Type returns the node type of this mutation (Container).
func (*ContainerMutation) UpdatedAt ¶
func (m *ContainerMutation) UpdatedAt() (r int64, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*ContainerMutation) Where ¶
func (m *ContainerMutation) Where(ps ...predicate.Container)
Where appends a list predicates to the ContainerMutation builder.
func (*ContainerMutation) WhereP ¶
func (m *ContainerMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ContainerMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ContainerQuery ¶
type ContainerQuery struct {
// contains filtered or unexported fields
}
ContainerQuery is the builder for querying Container entities.
func (*ContainerQuery) Aggregate ¶
func (cq *ContainerQuery) Aggregate(fns ...AggregateFunc) *ContainerSelect
Aggregate returns a ContainerSelect configured with the given aggregations.
func (*ContainerQuery) All ¶
func (cq *ContainerQuery) All(ctx context.Context) ([]*Container, error)
All executes the query and returns a list of Containers.
func (*ContainerQuery) AllX ¶
func (cq *ContainerQuery) AllX(ctx context.Context) []*Container
AllX is like All, but panics if an error occurs.
func (*ContainerQuery) Clone ¶
func (cq *ContainerQuery) Clone() *ContainerQuery
Clone returns a duplicate of the ContainerQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ContainerQuery) Count ¶
func (cq *ContainerQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ContainerQuery) CountX ¶
func (cq *ContainerQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ContainerQuery) Exist ¶
func (cq *ContainerQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ContainerQuery) ExistX ¶
func (cq *ContainerQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ContainerQuery) First ¶
func (cq *ContainerQuery) First(ctx context.Context) (*Container, error)
First returns the first Container entity from the query. Returns a *NotFoundError when no Container was found.
func (*ContainerQuery) FirstID ¶
func (cq *ContainerQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Container ID from the query. Returns a *NotFoundError when no Container ID was found.
func (*ContainerQuery) FirstIDX ¶
func (cq *ContainerQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*ContainerQuery) FirstX ¶
func (cq *ContainerQuery) FirstX(ctx context.Context) *Container
FirstX is like First, but panics if an error occurs.
func (*ContainerQuery) GroupBy ¶
func (cq *ContainerQuery) GroupBy(field string, fields ...string) *ContainerGroupBy
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.Container.Query(). GroupBy(container.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ContainerQuery) IDs ¶
func (cq *ContainerQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Container IDs.
func (*ContainerQuery) IDsX ¶
func (cq *ContainerQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*ContainerQuery) Limit ¶
func (cq *ContainerQuery) Limit(limit int) *ContainerQuery
Limit the number of records to be returned by this query.
func (*ContainerQuery) Offset ¶
func (cq *ContainerQuery) Offset(offset int) *ContainerQuery
Offset to start from.
func (*ContainerQuery) Only ¶
func (cq *ContainerQuery) Only(ctx context.Context) (*Container, error)
Only returns a single Container entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Container entity is found. Returns a *NotFoundError when no Container entities are found.
func (*ContainerQuery) OnlyID ¶
func (cq *ContainerQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Container ID in the query. Returns a *NotSingularError when more than one Container ID is found. Returns a *NotFoundError when no entities are found.
func (*ContainerQuery) OnlyIDX ¶
func (cq *ContainerQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ContainerQuery) OnlyX ¶
func (cq *ContainerQuery) OnlyX(ctx context.Context) *Container
OnlyX is like Only, but panics if an error occurs.
func (*ContainerQuery) Order ¶
func (cq *ContainerQuery) Order(o ...container.OrderOption) *ContainerQuery
Order specifies how the records should be ordered.
func (*ContainerQuery) QueryJobs ¶
func (cq *ContainerQuery) QueryJobs() *JobQuery
QueryJobs chains the current query on the "jobs" edge.
func (*ContainerQuery) QueryMounts ¶
func (cq *ContainerQuery) QueryMounts() *MountQuery
QueryMounts chains the current query on the "mounts" edge.
func (*ContainerQuery) QueryNode ¶
func (cq *ContainerQuery) QueryNode() *NodeQuery
QueryNode chains the current query on the "node" edge.
func (*ContainerQuery) QueryOwner ¶
func (cq *ContainerQuery) QueryOwner() *UserQuery
QueryOwner chains the current query on the "owner" edge.
func (*ContainerQuery) QueryPorts ¶
func (cq *ContainerQuery) QueryPorts() *PortQuery
QueryPorts chains the current query on the "ports" edge.
func (*ContainerQuery) Select ¶
func (cq *ContainerQuery) Select(fields ...string) *ContainerSelect
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.Container.Query(). Select(container.FieldName). Scan(ctx, &v)
func (*ContainerQuery) Unique ¶
func (cq *ContainerQuery) Unique(unique bool) *ContainerQuery
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 (*ContainerQuery) Where ¶
func (cq *ContainerQuery) Where(ps ...predicate.Container) *ContainerQuery
Where adds a new predicate for the ContainerQuery builder.
func (*ContainerQuery) WithJobs ¶
func (cq *ContainerQuery) WithJobs(opts ...func(*JobQuery)) *ContainerQuery
WithJobs tells the query-builder to eager-load the nodes that are connected to the "jobs" edge. The optional arguments are used to configure the query builder of the edge.
func (*ContainerQuery) WithMounts ¶
func (cq *ContainerQuery) WithMounts(opts ...func(*MountQuery)) *ContainerQuery
WithMounts tells the query-builder to eager-load the nodes that are connected to the "mounts" edge. The optional arguments are used to configure the query builder of the edge.
func (*ContainerQuery) WithNode ¶
func (cq *ContainerQuery) WithNode(opts ...func(*NodeQuery)) *ContainerQuery
WithNode tells the query-builder to eager-load the nodes that are connected to the "node" edge. The optional arguments are used to configure the query builder of the edge.
func (*ContainerQuery) WithOwner ¶
func (cq *ContainerQuery) WithOwner(opts ...func(*UserQuery)) *ContainerQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
func (*ContainerQuery) WithPorts ¶
func (cq *ContainerQuery) WithPorts(opts ...func(*PortQuery)) *ContainerQuery
WithPorts tells the query-builder to eager-load the nodes that are connected to the "ports" edge. The optional arguments are used to configure the query builder of the edge.
type ContainerSelect ¶
type ContainerSelect struct { *ContainerQuery // contains filtered or unexported fields }
ContainerSelect is the builder for selecting fields of Container entities.
func (*ContainerSelect) Aggregate ¶
func (cs *ContainerSelect) Aggregate(fns ...AggregateFunc) *ContainerSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ContainerSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ContainerSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ContainerSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ContainerSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ContainerSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ContainerSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ContainerSelect) Scan ¶
func (cs *ContainerSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ContainerSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ContainerUpdate ¶
type ContainerUpdate struct {
// contains filtered or unexported fields
}
ContainerUpdate is the builder for updating Container entities.
func (*ContainerUpdate) AddCPU ¶
func (cu *ContainerUpdate) AddCPU(i int64) *ContainerUpdate
AddCPU adds i to the "cpu" field.
func (*ContainerUpdate) AddCreatedAt ¶
func (cu *ContainerUpdate) AddCreatedAt(i int64) *ContainerUpdate
AddCreatedAt adds i to the "created_at" field.
func (*ContainerUpdate) AddJobIDs ¶
func (cu *ContainerUpdate) AddJobIDs(ids ...int) *ContainerUpdate
AddJobIDs adds the "jobs" edge to the Job entity by IDs.
func (*ContainerUpdate) AddJobs ¶
func (cu *ContainerUpdate) AddJobs(j ...*Job) *ContainerUpdate
AddJobs adds the "jobs" edges to the Job entity.
func (*ContainerUpdate) AddMemory ¶
func (cu *ContainerUpdate) AddMemory(i int64) *ContainerUpdate
AddMemory adds i to the "memory" field.
func (*ContainerUpdate) AddMountIDs ¶
func (cu *ContainerUpdate) AddMountIDs(ids ...int) *ContainerUpdate
AddMountIDs adds the "mounts" edge to the Mount entity by IDs.
func (*ContainerUpdate) AddMounts ¶
func (cu *ContainerUpdate) AddMounts(m ...*Mount) *ContainerUpdate
AddMounts adds the "mounts" edges to the Mount entity.
func (*ContainerUpdate) AddNode ¶
func (cu *ContainerUpdate) AddNode(n ...*Node) *ContainerUpdate
AddNode adds the "node" edges to the Node entity.
func (*ContainerUpdate) AddNodeIDs ¶
func (cu *ContainerUpdate) AddNodeIDs(ids ...int) *ContainerUpdate
AddNodeIDs adds the "node" edge to the Node entity by IDs.
func (*ContainerUpdate) AddOwner ¶
func (cu *ContainerUpdate) AddOwner(u ...*User) *ContainerUpdate
AddOwner adds the "owner" edges to the User entity.
func (*ContainerUpdate) AddOwnerIDs ¶
func (cu *ContainerUpdate) AddOwnerIDs(ids ...int) *ContainerUpdate
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*ContainerUpdate) AddPortIDs ¶
func (cu *ContainerUpdate) AddPortIDs(ids ...int) *ContainerUpdate
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*ContainerUpdate) AddPorts ¶
func (cu *ContainerUpdate) AddPorts(p ...*Port) *ContainerUpdate
AddPorts adds the "ports" edges to the Port entity.
func (*ContainerUpdate) AddUpdatedAt ¶
func (cu *ContainerUpdate) AddUpdatedAt(i int64) *ContainerUpdate
AddUpdatedAt adds i to the "updated_at" field.
func (*ContainerUpdate) ClearJobs ¶
func (cu *ContainerUpdate) ClearJobs() *ContainerUpdate
ClearJobs clears all "jobs" edges to the Job entity.
func (*ContainerUpdate) ClearMounts ¶
func (cu *ContainerUpdate) ClearMounts() *ContainerUpdate
ClearMounts clears all "mounts" edges to the Mount entity.
func (*ContainerUpdate) ClearNode ¶
func (cu *ContainerUpdate) ClearNode() *ContainerUpdate
ClearNode clears all "node" edges to the Node entity.
func (*ContainerUpdate) ClearOwner ¶
func (cu *ContainerUpdate) ClearOwner() *ContainerUpdate
ClearOwner clears all "owner" edges to the User entity.
func (*ContainerUpdate) ClearPorts ¶
func (cu *ContainerUpdate) ClearPorts() *ContainerUpdate
ClearPorts clears all "ports" edges to the Port entity.
func (*ContainerUpdate) Exec ¶
func (cu *ContainerUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ContainerUpdate) ExecX ¶
func (cu *ContainerUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContainerUpdate) Mutation ¶
func (cu *ContainerUpdate) Mutation() *ContainerMutation
Mutation returns the ContainerMutation object of the builder.
func (*ContainerUpdate) RemoveJobIDs ¶
func (cu *ContainerUpdate) RemoveJobIDs(ids ...int) *ContainerUpdate
RemoveJobIDs removes the "jobs" edge to Job entities by IDs.
func (*ContainerUpdate) RemoveJobs ¶
func (cu *ContainerUpdate) RemoveJobs(j ...*Job) *ContainerUpdate
RemoveJobs removes "jobs" edges to Job entities.
func (*ContainerUpdate) RemoveMountIDs ¶
func (cu *ContainerUpdate) RemoveMountIDs(ids ...int) *ContainerUpdate
RemoveMountIDs removes the "mounts" edge to Mount entities by IDs.
func (*ContainerUpdate) RemoveMounts ¶
func (cu *ContainerUpdate) RemoveMounts(m ...*Mount) *ContainerUpdate
RemoveMounts removes "mounts" edges to Mount entities.
func (*ContainerUpdate) RemoveNode ¶
func (cu *ContainerUpdate) RemoveNode(n ...*Node) *ContainerUpdate
RemoveNode removes "node" edges to Node entities.
func (*ContainerUpdate) RemoveNodeIDs ¶
func (cu *ContainerUpdate) RemoveNodeIDs(ids ...int) *ContainerUpdate
RemoveNodeIDs removes the "node" edge to Node entities by IDs.
func (*ContainerUpdate) RemoveOwner ¶
func (cu *ContainerUpdate) RemoveOwner(u ...*User) *ContainerUpdate
RemoveOwner removes "owner" edges to User entities.
func (*ContainerUpdate) RemoveOwnerIDs ¶
func (cu *ContainerUpdate) RemoveOwnerIDs(ids ...int) *ContainerUpdate
RemoveOwnerIDs removes the "owner" edge to User entities by IDs.
func (*ContainerUpdate) RemovePortIDs ¶
func (cu *ContainerUpdate) RemovePortIDs(ids ...int) *ContainerUpdate
RemovePortIDs removes the "ports" edge to Port entities by IDs.
func (*ContainerUpdate) RemovePorts ¶
func (cu *ContainerUpdate) RemovePorts(p ...*Port) *ContainerUpdate
RemovePorts removes "ports" edges to Port entities.
func (*ContainerUpdate) Save ¶
func (cu *ContainerUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ContainerUpdate) SaveX ¶
func (cu *ContainerUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ContainerUpdate) SetCPU ¶
func (cu *ContainerUpdate) SetCPU(i int64) *ContainerUpdate
SetCPU sets the "cpu" field.
func (*ContainerUpdate) SetCid ¶
func (cu *ContainerUpdate) SetCid(s string) *ContainerUpdate
SetCid sets the "cid" field.
func (*ContainerUpdate) SetCreatedAt ¶
func (cu *ContainerUpdate) SetCreatedAt(i int64) *ContainerUpdate
SetCreatedAt sets the "created_at" field.
func (*ContainerUpdate) SetImage ¶
func (cu *ContainerUpdate) SetImage(s string) *ContainerUpdate
SetImage sets the "image" field.
func (*ContainerUpdate) SetMemory ¶
func (cu *ContainerUpdate) SetMemory(i int64) *ContainerUpdate
SetMemory sets the "memory" field.
func (*ContainerUpdate) SetName ¶
func (cu *ContainerUpdate) SetName(s string) *ContainerUpdate
SetName sets the "name" field.
func (*ContainerUpdate) SetNillableCPU ¶
func (cu *ContainerUpdate) SetNillableCPU(i *int64) *ContainerUpdate
SetNillableCPU sets the "cpu" field if the given value is not nil.
func (*ContainerUpdate) SetNillableCid ¶
func (cu *ContainerUpdate) SetNillableCid(s *string) *ContainerUpdate
SetNillableCid sets the "cid" field if the given value is not nil.
func (*ContainerUpdate) SetNillableCreatedAt ¶
func (cu *ContainerUpdate) SetNillableCreatedAt(i *int64) *ContainerUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ContainerUpdate) SetNillableImage ¶
func (cu *ContainerUpdate) SetNillableImage(s *string) *ContainerUpdate
SetNillableImage sets the "image" field if the given value is not nil.
func (*ContainerUpdate) SetNillableMemory ¶
func (cu *ContainerUpdate) SetNillableMemory(i *int64) *ContainerUpdate
SetNillableMemory sets the "memory" field if the given value is not nil.
func (*ContainerUpdate) SetNillableName ¶
func (cu *ContainerUpdate) SetNillableName(s *string) *ContainerUpdate
SetNillableName sets the "name" field if the given value is not nil.
func (*ContainerUpdate) SetUpdatedAt ¶
func (cu *ContainerUpdate) SetUpdatedAt(i int64) *ContainerUpdate
SetUpdatedAt sets the "updated_at" field.
func (*ContainerUpdate) Where ¶
func (cu *ContainerUpdate) Where(ps ...predicate.Container) *ContainerUpdate
Where appends a list predicates to the ContainerUpdate builder.
type ContainerUpdateOne ¶
type ContainerUpdateOne struct {
// contains filtered or unexported fields
}
ContainerUpdateOne is the builder for updating a single Container entity.
func (*ContainerUpdateOne) AddCPU ¶
func (cuo *ContainerUpdateOne) AddCPU(i int64) *ContainerUpdateOne
AddCPU adds i to the "cpu" field.
func (*ContainerUpdateOne) AddCreatedAt ¶
func (cuo *ContainerUpdateOne) AddCreatedAt(i int64) *ContainerUpdateOne
AddCreatedAt adds i to the "created_at" field.
func (*ContainerUpdateOne) AddJobIDs ¶
func (cuo *ContainerUpdateOne) AddJobIDs(ids ...int) *ContainerUpdateOne
AddJobIDs adds the "jobs" edge to the Job entity by IDs.
func (*ContainerUpdateOne) AddJobs ¶
func (cuo *ContainerUpdateOne) AddJobs(j ...*Job) *ContainerUpdateOne
AddJobs adds the "jobs" edges to the Job entity.
func (*ContainerUpdateOne) AddMemory ¶
func (cuo *ContainerUpdateOne) AddMemory(i int64) *ContainerUpdateOne
AddMemory adds i to the "memory" field.
func (*ContainerUpdateOne) AddMountIDs ¶
func (cuo *ContainerUpdateOne) AddMountIDs(ids ...int) *ContainerUpdateOne
AddMountIDs adds the "mounts" edge to the Mount entity by IDs.
func (*ContainerUpdateOne) AddMounts ¶
func (cuo *ContainerUpdateOne) AddMounts(m ...*Mount) *ContainerUpdateOne
AddMounts adds the "mounts" edges to the Mount entity.
func (*ContainerUpdateOne) AddNode ¶
func (cuo *ContainerUpdateOne) AddNode(n ...*Node) *ContainerUpdateOne
AddNode adds the "node" edges to the Node entity.
func (*ContainerUpdateOne) AddNodeIDs ¶
func (cuo *ContainerUpdateOne) AddNodeIDs(ids ...int) *ContainerUpdateOne
AddNodeIDs adds the "node" edge to the Node entity by IDs.
func (*ContainerUpdateOne) AddOwner ¶
func (cuo *ContainerUpdateOne) AddOwner(u ...*User) *ContainerUpdateOne
AddOwner adds the "owner" edges to the User entity.
func (*ContainerUpdateOne) AddOwnerIDs ¶
func (cuo *ContainerUpdateOne) AddOwnerIDs(ids ...int) *ContainerUpdateOne
AddOwnerIDs adds the "owner" edge to the User entity by IDs.
func (*ContainerUpdateOne) AddPortIDs ¶
func (cuo *ContainerUpdateOne) AddPortIDs(ids ...int) *ContainerUpdateOne
AddPortIDs adds the "ports" edge to the Port entity by IDs.
func (*ContainerUpdateOne) AddPorts ¶
func (cuo *ContainerUpdateOne) AddPorts(p ...*Port) *ContainerUpdateOne
AddPorts adds the "ports" edges to the Port entity.
func (*ContainerUpdateOne) AddUpdatedAt ¶
func (cuo *ContainerUpdateOne) AddUpdatedAt(i int64) *ContainerUpdateOne
AddUpdatedAt adds i to the "updated_at" field.
func (*ContainerUpdateOne) ClearJobs ¶
func (cuo *ContainerUpdateOne) ClearJobs() *ContainerUpdateOne
ClearJobs clears all "jobs" edges to the Job entity.
func (*ContainerUpdateOne) ClearMounts ¶
func (cuo *ContainerUpdateOne) ClearMounts() *ContainerUpdateOne
ClearMounts clears all "mounts" edges to the Mount entity.
func (*ContainerUpdateOne) ClearNode ¶
func (cuo *ContainerUpdateOne) ClearNode() *ContainerUpdateOne
ClearNode clears all "node" edges to the Node entity.
func (*ContainerUpdateOne) ClearOwner ¶
func (cuo *ContainerUpdateOne) ClearOwner() *ContainerUpdateOne
ClearOwner clears all "owner" edges to the User entity.
func (*ContainerUpdateOne) ClearPorts ¶
func (cuo *ContainerUpdateOne) ClearPorts() *ContainerUpdateOne
ClearPorts clears all "ports" edges to the Port entity.
func (*ContainerUpdateOne) Exec ¶
func (cuo *ContainerUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ContainerUpdateOne) ExecX ¶
func (cuo *ContainerUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ContainerUpdateOne) Mutation ¶
func (cuo *ContainerUpdateOne) Mutation() *ContainerMutation
Mutation returns the ContainerMutation object of the builder.
func (*ContainerUpdateOne) RemoveJobIDs ¶
func (cuo *ContainerUpdateOne) RemoveJobIDs(ids ...int) *ContainerUpdateOne
RemoveJobIDs removes the "jobs" edge to Job entities by IDs.
func (*ContainerUpdateOne) RemoveJobs ¶
func (cuo *ContainerUpdateOne) RemoveJobs(j ...*Job) *ContainerUpdateOne
RemoveJobs removes "jobs" edges to Job entities.
func (*ContainerUpdateOne) RemoveMountIDs ¶
func (cuo *ContainerUpdateOne) RemoveMountIDs(ids ...int) *ContainerUpdateOne
RemoveMountIDs removes the "mounts" edge to Mount entities by IDs.
func (*ContainerUpdateOne) RemoveMounts ¶
func (cuo *ContainerUpdateOne) RemoveMounts(m ...*Mount) *ContainerUpdateOne
RemoveMounts removes "mounts" edges to Mount entities.
func (*ContainerUpdateOne) RemoveNode ¶
func (cuo *ContainerUpdateOne) RemoveNode(n ...*Node) *ContainerUpdateOne
RemoveNode removes "node" edges to Node entities.
func (*ContainerUpdateOne) RemoveNodeIDs ¶
func (cuo *ContainerUpdateOne) RemoveNodeIDs(ids ...int) *ContainerUpdateOne
RemoveNodeIDs removes the "node" edge to Node entities by IDs.
func (*ContainerUpdateOne) RemoveOwner ¶
func (cuo *ContainerUpdateOne) RemoveOwner(u ...*User) *ContainerUpdateOne
RemoveOwner removes "owner" edges to User entities.
func (*ContainerUpdateOne) RemoveOwnerIDs ¶
func (cuo *ContainerUpdateOne) RemoveOwnerIDs(ids ...int) *ContainerUpdateOne
RemoveOwnerIDs removes the "owner" edge to User entities by IDs.
func (*ContainerUpdateOne) RemovePortIDs ¶
func (cuo *ContainerUpdateOne) RemovePortIDs(ids ...int) *ContainerUpdateOne
RemovePortIDs removes the "ports" edge to Port entities by IDs.
func (*ContainerUpdateOne) RemovePorts ¶
func (cuo *ContainerUpdateOne) RemovePorts(p ...*Port) *ContainerUpdateOne
RemovePorts removes "ports" edges to Port entities.
func (*ContainerUpdateOne) Save ¶
func (cuo *ContainerUpdateOne) Save(ctx context.Context) (*Container, error)
Save executes the query and returns the updated Container entity.
func (*ContainerUpdateOne) SaveX ¶
func (cuo *ContainerUpdateOne) SaveX(ctx context.Context) *Container
SaveX is like Save, but panics if an error occurs.
func (*ContainerUpdateOne) Select ¶
func (cuo *ContainerUpdateOne) Select(field string, fields ...string) *ContainerUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ContainerUpdateOne) SetCPU ¶
func (cuo *ContainerUpdateOne) SetCPU(i int64) *ContainerUpdateOne
SetCPU sets the "cpu" field.
func (*ContainerUpdateOne) SetCid ¶
func (cuo *ContainerUpdateOne) SetCid(s string) *ContainerUpdateOne
SetCid sets the "cid" field.
func (*ContainerUpdateOne) SetCreatedAt ¶
func (cuo *ContainerUpdateOne) SetCreatedAt(i int64) *ContainerUpdateOne
SetCreatedAt sets the "created_at" field.
func (*ContainerUpdateOne) SetImage ¶
func (cuo *ContainerUpdateOne) SetImage(s string) *ContainerUpdateOne
SetImage sets the "image" field.
func (*ContainerUpdateOne) SetMemory ¶
func (cuo *ContainerUpdateOne) SetMemory(i int64) *ContainerUpdateOne
SetMemory sets the "memory" field.
func (*ContainerUpdateOne) SetName ¶
func (cuo *ContainerUpdateOne) SetName(s string) *ContainerUpdateOne
SetName sets the "name" field.
func (*ContainerUpdateOne) SetNillableCPU ¶
func (cuo *ContainerUpdateOne) SetNillableCPU(i *int64) *ContainerUpdateOne
SetNillableCPU sets the "cpu" field if the given value is not nil.
func (*ContainerUpdateOne) SetNillableCid ¶
func (cuo *ContainerUpdateOne) SetNillableCid(s *string) *ContainerUpdateOne
SetNillableCid sets the "cid" field if the given value is not nil.
func (*ContainerUpdateOne) SetNillableCreatedAt ¶
func (cuo *ContainerUpdateOne) SetNillableCreatedAt(i *int64) *ContainerUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*ContainerUpdateOne) SetNillableImage ¶
func (cuo *ContainerUpdateOne) SetNillableImage(s *string) *ContainerUpdateOne
SetNillableImage sets the "image" field if the given value is not nil.
func (*ContainerUpdateOne) SetNillableMemory ¶
func (cuo *ContainerUpdateOne) SetNillableMemory(i *int64) *ContainerUpdateOne
SetNillableMemory sets the "memory" field if the given value is not nil.
func (*ContainerUpdateOne) SetNillableName ¶
func (cuo *ContainerUpdateOne) SetNillableName(s *string) *ContainerUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*ContainerUpdateOne) SetUpdatedAt ¶
func (cuo *ContainerUpdateOne) SetUpdatedAt(i int64) *ContainerUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*ContainerUpdateOne) Where ¶
func (cuo *ContainerUpdateOne) Where(ps ...predicate.Container) *ContainerUpdateOne
Where appends a list predicates to the ContainerUpdate 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 Job ¶
type Job struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Description holds the value of the "description" field. Description string `json:"description,omitempty"` // JobType holds the value of the "job_type" field. JobType int `json:"job_type,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt int64 `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt int64 `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the JobQuery when eager-loading is set. Edges JobEdges `json:"edges"` // contains filtered or unexported fields }
container cron job tables
func (*Job) QueryOwner ¶
func (j *Job) QueryOwner() *ContainerQuery
QueryOwner queries the "owner" edge of the Job entity.
func (*Job) Unwrap ¶
Unwrap unwraps the Job 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 (*Job) Update ¶
func (j *Job) Update() *JobUpdateOne
Update returns a builder for updating this Job. Note that you need to call Job.Unwrap() before calling this method if this Job was returned from a transaction, and the transaction was committed or rolled back.
type JobClient ¶
type JobClient struct {
// contains filtered or unexported fields
}
JobClient is a client for the Job schema.
func NewJobClient ¶
func NewJobClient(c config) *JobClient
NewJobClient returns a client for the Job from the given config.
func (*JobClient) CreateBulk ¶
func (c *JobClient) CreateBulk(builders ...*JobCreate) *JobCreateBulk
CreateBulk returns a builder for creating a bulk of Job entities.
func (*JobClient) DeleteOne ¶
func (c *JobClient) DeleteOne(j *Job) *JobDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*JobClient) DeleteOneID ¶
func (c *JobClient) DeleteOneID(id int) *JobDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*JobClient) Intercept ¶
func (c *JobClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `job.Intercept(f(g(h())))`.
func (*JobClient) Interceptors ¶
func (c *JobClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*JobClient) MapCreateBulk ¶
func (c *JobClient) MapCreateBulk(slice any, setFunc func(*JobCreate, int)) *JobCreateBulk
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 (*JobClient) QueryOwner ¶
func (c *JobClient) QueryOwner(j *Job) *ContainerQuery
QueryOwner queries the owner edge of a Job.
func (*JobClient) UpdateOne ¶
func (c *JobClient) UpdateOne(j *Job) *JobUpdateOne
UpdateOne returns an update builder for the given entity.
func (*JobClient) UpdateOneID ¶
func (c *JobClient) UpdateOneID(id int) *JobUpdateOne
UpdateOneID returns an update builder for the given id.
type JobCreate ¶
type JobCreate struct {
// contains filtered or unexported fields
}
JobCreate is the builder for creating a Job entity.
func (*JobCreate) AddOwnerIDs ¶
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*JobCreate) Mutation ¶
func (jc *JobCreate) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobCreate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*JobCreate) SetDescription ¶
SetDescription sets the "description" field.
func (*JobCreate) SetJobType ¶
SetJobType sets the "job_type" field.
func (*JobCreate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*JobCreate) SetNillableUpdatedAt ¶
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*JobCreate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type JobCreateBulk ¶
type JobCreateBulk struct {
// contains filtered or unexported fields
}
JobCreateBulk is the builder for creating many Job entities in bulk.
func (*JobCreateBulk) Exec ¶
func (jcb *JobCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*JobCreateBulk) ExecX ¶
func (jcb *JobCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type JobDelete ¶
type JobDelete struct {
// contains filtered or unexported fields
}
JobDelete is the builder for deleting a Job entity.
func (*JobDelete) Exec ¶
Exec executes the deletion query and returns how many vertices were deleted.
type JobDeleteOne ¶
type JobDeleteOne struct {
// contains filtered or unexported fields
}
JobDeleteOne is the builder for deleting a single Job entity.
func (*JobDeleteOne) Exec ¶
func (jdo *JobDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*JobDeleteOne) ExecX ¶
func (jdo *JobDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JobDeleteOne) Where ¶
func (jdo *JobDeleteOne) Where(ps ...predicate.Job) *JobDeleteOne
Where appends a list predicates to the JobDelete builder.
type JobEdges ¶
type JobEdges struct { // Owner holds the value of the owner edge. Owner []*Container `json:"owner,omitempty"` // contains filtered or unexported fields }
JobEdges holds the relations/edges for other nodes in the graph.
func (JobEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading.
type JobGroupBy ¶
type JobGroupBy struct {
// contains filtered or unexported fields
}
JobGroupBy is the group-by builder for Job entities.
func (*JobGroupBy) Aggregate ¶
func (jgb *JobGroupBy) Aggregate(fns ...AggregateFunc) *JobGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*JobGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*JobGroupBy) Scan ¶
func (jgb *JobGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*JobGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JobMutation ¶
type JobMutation struct {
// contains filtered or unexported fields
}
JobMutation represents an operation that mutates the Job nodes in the graph.
func (*JobMutation) AddCreatedAt ¶
func (m *JobMutation) AddCreatedAt(i int64)
AddCreatedAt adds i to the "created_at" field.
func (*JobMutation) AddField ¶
func (m *JobMutation) 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 (*JobMutation) AddJobType ¶
func (m *JobMutation) AddJobType(i int)
AddJobType adds i to the "job_type" field.
func (*JobMutation) AddOwnerIDs ¶
func (m *JobMutation) AddOwnerIDs(ids ...int)
AddOwnerIDs adds the "owner" edge to the Container entity by ids.
func (*JobMutation) AddUpdatedAt ¶
func (m *JobMutation) AddUpdatedAt(i int64)
AddUpdatedAt adds i to the "updated_at" field.
func (*JobMutation) AddedCreatedAt ¶
func (m *JobMutation) AddedCreatedAt() (r int64, exists bool)
AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.
func (*JobMutation) AddedEdges ¶
func (m *JobMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*JobMutation) AddedField ¶
func (m *JobMutation) 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 (*JobMutation) AddedFields ¶
func (m *JobMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*JobMutation) AddedIDs ¶
func (m *JobMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*JobMutation) AddedJobType ¶
func (m *JobMutation) AddedJobType() (r int, exists bool)
AddedJobType returns the value that was added to the "job_type" field in this mutation.
func (*JobMutation) AddedUpdatedAt ¶
func (m *JobMutation) AddedUpdatedAt() (r int64, exists bool)
AddedUpdatedAt returns the value that was added to the "updated_at" field in this mutation.
func (*JobMutation) ClearEdge ¶
func (m *JobMutation) 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 (*JobMutation) ClearField ¶
func (m *JobMutation) 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 (*JobMutation) ClearOwner ¶
func (m *JobMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Container entity.
func (*JobMutation) ClearedEdges ¶
func (m *JobMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*JobMutation) ClearedFields ¶
func (m *JobMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (JobMutation) Client ¶
func (m JobMutation) 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 (*JobMutation) CreatedAt ¶
func (m *JobMutation) CreatedAt() (r int64, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*JobMutation) Description ¶
func (m *JobMutation) Description() (r string, exists bool)
Description returns the value of the "description" field in the mutation.
func (*JobMutation) EdgeCleared ¶
func (m *JobMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*JobMutation) Field ¶
func (m *JobMutation) 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 (*JobMutation) FieldCleared ¶
func (m *JobMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*JobMutation) Fields ¶
func (m *JobMutation) 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 (*JobMutation) ID ¶
func (m *JobMutation) 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 (*JobMutation) IDs ¶
func (m *JobMutation) 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 (*JobMutation) JobType ¶
func (m *JobMutation) JobType() (r int, exists bool)
JobType returns the value of the "job_type" field in the mutation.
func (*JobMutation) Name ¶
func (m *JobMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*JobMutation) OldCreatedAt ¶
func (m *JobMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
OldCreatedAt returns the old "created_at" field's value of the Job entity. If the Job 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 (*JobMutation) OldDescription ¶
func (m *JobMutation) OldDescription(ctx context.Context) (v string, err error)
OldDescription returns the old "description" field's value of the Job entity. If the Job 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 (*JobMutation) 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 (*JobMutation) OldJobType ¶
func (m *JobMutation) OldJobType(ctx context.Context) (v int, err error)
OldJobType returns the old "job_type" field's value of the Job entity. If the Job 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 (*JobMutation) OldName ¶
func (m *JobMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Job entity. If the Job 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 (*JobMutation) OldUpdatedAt ¶
func (m *JobMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
OldUpdatedAt returns the old "updated_at" field's value of the Job entity. If the Job 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 (*JobMutation) OwnerCleared ¶
func (m *JobMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Container entity was cleared.
func (*JobMutation) OwnerIDs ¶
func (m *JobMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation.
func (*JobMutation) RemoveOwnerIDs ¶
func (m *JobMutation) RemoveOwnerIDs(ids ...int)
RemoveOwnerIDs removes the "owner" edge to the Container entity by IDs.
func (*JobMutation) RemovedEdges ¶
func (m *JobMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*JobMutation) RemovedIDs ¶
func (m *JobMutation) 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 (*JobMutation) RemovedOwnerIDs ¶
func (m *JobMutation) RemovedOwnerIDs() (ids []int)
RemovedOwner returns the removed IDs of the "owner" edge to the Container entity.
func (*JobMutation) ResetCreatedAt ¶
func (m *JobMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*JobMutation) ResetDescription ¶
func (m *JobMutation) ResetDescription()
ResetDescription resets all changes to the "description" field.
func (*JobMutation) ResetEdge ¶
func (m *JobMutation) 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 (*JobMutation) ResetField ¶
func (m *JobMutation) 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 (*JobMutation) ResetJobType ¶
func (m *JobMutation) ResetJobType()
ResetJobType resets all changes to the "job_type" field.
func (*JobMutation) ResetName ¶
func (m *JobMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*JobMutation) ResetOwner ¶
func (m *JobMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*JobMutation) ResetUpdatedAt ¶
func (m *JobMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*JobMutation) SetCreatedAt ¶
func (m *JobMutation) SetCreatedAt(i int64)
SetCreatedAt sets the "created_at" field.
func (*JobMutation) SetDescription ¶
func (m *JobMutation) SetDescription(s string)
SetDescription sets the "description" field.
func (*JobMutation) SetField ¶
func (m *JobMutation) 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 (*JobMutation) SetJobType ¶
func (m *JobMutation) SetJobType(i int)
SetJobType sets the "job_type" field.
func (*JobMutation) SetName ¶
func (m *JobMutation) SetName(s string)
SetName sets the "name" field.
func (*JobMutation) SetOp ¶
func (m *JobMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*JobMutation) SetUpdatedAt ¶
func (m *JobMutation) SetUpdatedAt(i int64)
SetUpdatedAt sets the "updated_at" field.
func (JobMutation) Tx ¶
func (m JobMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*JobMutation) Type ¶
func (m *JobMutation) Type() string
Type returns the node type of this mutation (Job).
func (*JobMutation) UpdatedAt ¶
func (m *JobMutation) UpdatedAt() (r int64, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*JobMutation) Where ¶
func (m *JobMutation) Where(ps ...predicate.Job)
Where appends a list predicates to the JobMutation builder.
func (*JobMutation) WhereP ¶
func (m *JobMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the JobMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type JobQuery ¶
type JobQuery struct {
// contains filtered or unexported fields
}
JobQuery is the builder for querying Job entities.
func (*JobQuery) Aggregate ¶
func (jq *JobQuery) Aggregate(fns ...AggregateFunc) *JobSelect
Aggregate returns a JobSelect configured with the given aggregations.
func (*JobQuery) Clone ¶
Clone returns a duplicate of the JobQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*JobQuery) First ¶
First returns the first Job entity from the query. Returns a *NotFoundError when no Job was found.
func (*JobQuery) FirstID ¶
FirstID returns the first Job ID from the query. Returns a *NotFoundError when no Job ID was found.
func (*JobQuery) GroupBy ¶
func (jq *JobQuery) GroupBy(field string, fields ...string) *JobGroupBy
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.Job.Query(). GroupBy(job.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*JobQuery) Only ¶
Only returns a single Job entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Job entity is found. Returns a *NotFoundError when no Job entities are found.
func (*JobQuery) OnlyID ¶
OnlyID is like Only, but returns the only Job ID in the query. Returns a *NotSingularError when more than one Job ID is found. Returns a *NotFoundError when no entities are found.
func (*JobQuery) Order ¶
func (jq *JobQuery) Order(o ...job.OrderOption) *JobQuery
Order specifies how the records should be ordered.
func (*JobQuery) QueryOwner ¶
func (jq *JobQuery) QueryOwner() *ContainerQuery
QueryOwner chains the current query on the "owner" edge.
func (*JobQuery) Select ¶
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { Name string `json:"name,omitempty"` } client.Job.Query(). Select(job.FieldName). Scan(ctx, &v)
func (*JobQuery) 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 (*JobQuery) WithOwner ¶
func (jq *JobQuery) WithOwner(opts ...func(*ContainerQuery)) *JobQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type JobSelect ¶
type JobSelect struct { *JobQuery // contains filtered or unexported fields }
JobSelect is the builder for selecting fields of Job entities.
func (*JobSelect) Aggregate ¶
func (js *JobSelect) Aggregate(fns ...AggregateFunc) *JobSelect
Aggregate adds the given aggregation functions to the selector query.
func (*JobSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*JobSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*JobSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*JobSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*JobSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*JobSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*JobSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type JobUpdate ¶
type JobUpdate struct {
// contains filtered or unexported fields
}
JobUpdate is the builder for updating Job entities.
func (*JobUpdate) AddCreatedAt ¶
AddCreatedAt adds i to the "created_at" field.
func (*JobUpdate) AddJobType ¶
AddJobType adds i to the "job_type" field.
func (*JobUpdate) AddOwnerIDs ¶
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*JobUpdate) AddUpdatedAt ¶
AddUpdatedAt adds i to the "updated_at" field.
func (*JobUpdate) ClearOwner ¶
ClearOwner clears all "owner" edges to the Container entity.
func (*JobUpdate) Mutation ¶
func (ju *JobUpdate) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobUpdate) RemoveOwner ¶
RemoveOwner removes "owner" edges to Container entities.
func (*JobUpdate) RemoveOwnerIDs ¶
RemoveOwnerIDs removes the "owner" edge to Container entities by IDs.
func (*JobUpdate) Save ¶
Save executes the query and returns the number of nodes affected by the update operation.
func (*JobUpdate) SetCreatedAt ¶
SetCreatedAt sets the "created_at" field.
func (*JobUpdate) SetDescription ¶
SetDescription sets the "description" field.
func (*JobUpdate) SetJobType ¶
SetJobType sets the "job_type" field.
func (*JobUpdate) SetNillableCreatedAt ¶
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*JobUpdate) SetNillableDescription ¶
SetNillableDescription sets the "description" field if the given value is not nil.
func (*JobUpdate) SetNillableJobType ¶
SetNillableJobType sets the "job_type" field if the given value is not nil.
func (*JobUpdate) SetNillableName ¶
SetNillableName sets the "name" field if the given value is not nil.
func (*JobUpdate) SetUpdatedAt ¶
SetUpdatedAt sets the "updated_at" field.
type JobUpdateOne ¶
type JobUpdateOne struct {
// contains filtered or unexported fields
}
JobUpdateOne is the builder for updating a single Job entity.
func (*JobUpdateOne) AddCreatedAt ¶
func (juo *JobUpdateOne) AddCreatedAt(i int64) *JobUpdateOne
AddCreatedAt adds i to the "created_at" field.
func (*JobUpdateOne) AddJobType ¶
func (juo *JobUpdateOne) AddJobType(i int) *JobUpdateOne
AddJobType adds i to the "job_type" field.
func (*JobUpdateOne) AddOwner ¶
func (juo *JobUpdateOne) AddOwner(c ...*Container) *JobUpdateOne
AddOwner adds the "owner" edges to the Container entity.
func (*JobUpdateOne) AddOwnerIDs ¶
func (juo *JobUpdateOne) AddOwnerIDs(ids ...int) *JobUpdateOne
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*JobUpdateOne) AddUpdatedAt ¶
func (juo *JobUpdateOne) AddUpdatedAt(i int64) *JobUpdateOne
AddUpdatedAt adds i to the "updated_at" field.
func (*JobUpdateOne) ClearOwner ¶
func (juo *JobUpdateOne) ClearOwner() *JobUpdateOne
ClearOwner clears all "owner" edges to the Container entity.
func (*JobUpdateOne) Exec ¶
func (juo *JobUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*JobUpdateOne) ExecX ¶
func (juo *JobUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*JobUpdateOne) Mutation ¶
func (juo *JobUpdateOne) Mutation() *JobMutation
Mutation returns the JobMutation object of the builder.
func (*JobUpdateOne) RemoveOwner ¶
func (juo *JobUpdateOne) RemoveOwner(c ...*Container) *JobUpdateOne
RemoveOwner removes "owner" edges to Container entities.
func (*JobUpdateOne) RemoveOwnerIDs ¶
func (juo *JobUpdateOne) RemoveOwnerIDs(ids ...int) *JobUpdateOne
RemoveOwnerIDs removes the "owner" edge to Container entities by IDs.
func (*JobUpdateOne) Save ¶
func (juo *JobUpdateOne) Save(ctx context.Context) (*Job, error)
Save executes the query and returns the updated Job entity.
func (*JobUpdateOne) SaveX ¶
func (juo *JobUpdateOne) SaveX(ctx context.Context) *Job
SaveX is like Save, but panics if an error occurs.
func (*JobUpdateOne) Select ¶
func (juo *JobUpdateOne) Select(field string, fields ...string) *JobUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*JobUpdateOne) SetCreatedAt ¶
func (juo *JobUpdateOne) SetCreatedAt(i int64) *JobUpdateOne
SetCreatedAt sets the "created_at" field.
func (*JobUpdateOne) SetDescription ¶
func (juo *JobUpdateOne) SetDescription(s string) *JobUpdateOne
SetDescription sets the "description" field.
func (*JobUpdateOne) SetJobType ¶
func (juo *JobUpdateOne) SetJobType(i int) *JobUpdateOne
SetJobType sets the "job_type" field.
func (*JobUpdateOne) SetName ¶
func (juo *JobUpdateOne) SetName(s string) *JobUpdateOne
SetName sets the "name" field.
func (*JobUpdateOne) SetNillableCreatedAt ¶
func (juo *JobUpdateOne) SetNillableCreatedAt(i *int64) *JobUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*JobUpdateOne) SetNillableDescription ¶
func (juo *JobUpdateOne) SetNillableDescription(s *string) *JobUpdateOne
SetNillableDescription sets the "description" field if the given value is not nil.
func (*JobUpdateOne) SetNillableJobType ¶
func (juo *JobUpdateOne) SetNillableJobType(i *int) *JobUpdateOne
SetNillableJobType sets the "job_type" field if the given value is not nil.
func (*JobUpdateOne) SetNillableName ¶
func (juo *JobUpdateOne) SetNillableName(s *string) *JobUpdateOne
SetNillableName sets the "name" field if the given value is not nil.
func (*JobUpdateOne) SetUpdatedAt ¶
func (juo *JobUpdateOne) SetUpdatedAt(i int64) *JobUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*JobUpdateOne) Where ¶
func (juo *JobUpdateOne) Where(ps ...predicate.Job) *JobUpdateOne
Where appends a list predicates to the JobUpdate builder.
type Mount ¶
type Mount struct { // ID of the ent. ID int `json:"id,omitempty"` // Host holds the value of the "host" field. Host string `json:"host,omitempty"` // Bind holds the value of the "bind" field. Bind string `json:"bind,omitempty"` // IsDir holds the value of the "is_dir" field. IsDir bool `json:"is_dir,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt int64 `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt int64 `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the MountQuery when eager-loading is set. Edges MountEdges `json:"edges"` // contains filtered or unexported fields }
container mount record table
func (*Mount) QueryOwner ¶
func (m *Mount) QueryOwner() *ContainerQuery
QueryOwner queries the "owner" edge of the Mount entity.
func (*Mount) Unwrap ¶
Unwrap unwraps the Mount 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 (*Mount) Update ¶
func (m *Mount) Update() *MountUpdateOne
Update returns a builder for updating this Mount. Note that you need to call Mount.Unwrap() before calling this method if this Mount was returned from a transaction, and the transaction was committed or rolled back.
type MountClient ¶
type MountClient struct {
// contains filtered or unexported fields
}
MountClient is a client for the Mount schema.
func NewMountClient ¶
func NewMountClient(c config) *MountClient
NewMountClient returns a client for the Mount from the given config.
func (*MountClient) Create ¶
func (c *MountClient) Create() *MountCreate
Create returns a builder for creating a Mount entity.
func (*MountClient) CreateBulk ¶
func (c *MountClient) CreateBulk(builders ...*MountCreate) *MountCreateBulk
CreateBulk returns a builder for creating a bulk of Mount entities.
func (*MountClient) Delete ¶
func (c *MountClient) Delete() *MountDelete
Delete returns a delete builder for Mount.
func (*MountClient) DeleteOne ¶
func (c *MountClient) DeleteOne(m *Mount) *MountDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*MountClient) DeleteOneID ¶
func (c *MountClient) DeleteOneID(id int) *MountDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*MountClient) GetX ¶
func (c *MountClient) GetX(ctx context.Context, id int) *Mount
GetX is like Get, but panics if an error occurs.
func (*MountClient) Intercept ¶
func (c *MountClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `mount.Intercept(f(g(h())))`.
func (*MountClient) Interceptors ¶
func (c *MountClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*MountClient) MapCreateBulk ¶
func (c *MountClient) MapCreateBulk(slice any, setFunc func(*MountCreate, int)) *MountCreateBulk
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 (*MountClient) Query ¶
func (c *MountClient) Query() *MountQuery
Query returns a query builder for Mount.
func (*MountClient) QueryOwner ¶
func (c *MountClient) QueryOwner(m *Mount) *ContainerQuery
QueryOwner queries the owner edge of a Mount.
func (*MountClient) Update ¶
func (c *MountClient) Update() *MountUpdate
Update returns an update builder for Mount.
func (*MountClient) UpdateOne ¶
func (c *MountClient) UpdateOne(m *Mount) *MountUpdateOne
UpdateOne returns an update builder for the given entity.
func (*MountClient) UpdateOneID ¶
func (c *MountClient) UpdateOneID(id int) *MountUpdateOne
UpdateOneID returns an update builder for the given id.
func (*MountClient) Use ¶
func (c *MountClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `mount.Hooks(f(g(h())))`.
type MountCreate ¶
type MountCreate struct {
// contains filtered or unexported fields
}
MountCreate is the builder for creating a Mount entity.
func (*MountCreate) AddOwner ¶
func (mc *MountCreate) AddOwner(c ...*Container) *MountCreate
AddOwner adds the "owner" edges to the Container entity.
func (*MountCreate) AddOwnerIDs ¶
func (mc *MountCreate) AddOwnerIDs(ids ...int) *MountCreate
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*MountCreate) Exec ¶
func (mc *MountCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*MountCreate) ExecX ¶
func (mc *MountCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MountCreate) Mutation ¶
func (mc *MountCreate) Mutation() *MountMutation
Mutation returns the MountMutation object of the builder.
func (*MountCreate) Save ¶
func (mc *MountCreate) Save(ctx context.Context) (*Mount, error)
Save creates the Mount in the database.
func (*MountCreate) SaveX ¶
func (mc *MountCreate) SaveX(ctx context.Context) *Mount
SaveX calls Save and panics if Save returns an error.
func (*MountCreate) SetBind ¶
func (mc *MountCreate) SetBind(s string) *MountCreate
SetBind sets the "bind" field.
func (*MountCreate) SetCreatedAt ¶
func (mc *MountCreate) SetCreatedAt(i int64) *MountCreate
SetCreatedAt sets the "created_at" field.
func (*MountCreate) SetHost ¶
func (mc *MountCreate) SetHost(s string) *MountCreate
SetHost sets the "host" field.
func (*MountCreate) SetIsDir ¶
func (mc *MountCreate) SetIsDir(b bool) *MountCreate
SetIsDir sets the "is_dir" field.
func (*MountCreate) SetNillableCreatedAt ¶
func (mc *MountCreate) SetNillableCreatedAt(i *int64) *MountCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MountCreate) SetNillableUpdatedAt ¶
func (mc *MountCreate) SetNillableUpdatedAt(i *int64) *MountCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*MountCreate) SetUpdatedAt ¶
func (mc *MountCreate) SetUpdatedAt(i int64) *MountCreate
SetUpdatedAt sets the "updated_at" field.
type MountCreateBulk ¶
type MountCreateBulk struct {
// contains filtered or unexported fields
}
MountCreateBulk is the builder for creating many Mount entities in bulk.
func (*MountCreateBulk) Exec ¶
func (mcb *MountCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*MountCreateBulk) ExecX ¶
func (mcb *MountCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type MountDelete ¶
type MountDelete struct {
// contains filtered or unexported fields
}
MountDelete is the builder for deleting a Mount entity.
func (*MountDelete) Exec ¶
func (md *MountDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*MountDelete) ExecX ¶
func (md *MountDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*MountDelete) Where ¶
func (md *MountDelete) Where(ps ...predicate.Mount) *MountDelete
Where appends a list predicates to the MountDelete builder.
type MountDeleteOne ¶
type MountDeleteOne struct {
// contains filtered or unexported fields
}
MountDeleteOne is the builder for deleting a single Mount entity.
func (*MountDeleteOne) Exec ¶
func (mdo *MountDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*MountDeleteOne) ExecX ¶
func (mdo *MountDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MountDeleteOne) Where ¶
func (mdo *MountDeleteOne) Where(ps ...predicate.Mount) *MountDeleteOne
Where appends a list predicates to the MountDelete builder.
type MountEdges ¶
type MountEdges struct { // Owner holds the value of the owner edge. Owner []*Container `json:"owner,omitempty"` // contains filtered or unexported fields }
MountEdges holds the relations/edges for other nodes in the graph.
func (MountEdges) OwnerOrErr ¶
func (e MountEdges) OwnerOrErr() ([]*Container, error)
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading.
type MountGroupBy ¶
type MountGroupBy struct {
// contains filtered or unexported fields
}
MountGroupBy is the group-by builder for Mount entities.
func (*MountGroupBy) Aggregate ¶
func (mgb *MountGroupBy) Aggregate(fns ...AggregateFunc) *MountGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*MountGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MountGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MountGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MountGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MountGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MountGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MountGroupBy) Scan ¶
func (mgb *MountGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MountGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MountMutation ¶
type MountMutation struct {
// contains filtered or unexported fields
}
MountMutation represents an operation that mutates the Mount nodes in the graph.
func (*MountMutation) AddCreatedAt ¶
func (m *MountMutation) AddCreatedAt(i int64)
AddCreatedAt adds i to the "created_at" field.
func (*MountMutation) AddField ¶
func (m *MountMutation) 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 (*MountMutation) AddOwnerIDs ¶
func (m *MountMutation) AddOwnerIDs(ids ...int)
AddOwnerIDs adds the "owner" edge to the Container entity by ids.
func (*MountMutation) AddUpdatedAt ¶
func (m *MountMutation) AddUpdatedAt(i int64)
AddUpdatedAt adds i to the "updated_at" field.
func (*MountMutation) AddedCreatedAt ¶
func (m *MountMutation) AddedCreatedAt() (r int64, exists bool)
AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.
func (*MountMutation) AddedEdges ¶
func (m *MountMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*MountMutation) AddedField ¶
func (m *MountMutation) 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 (*MountMutation) AddedFields ¶
func (m *MountMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*MountMutation) AddedIDs ¶
func (m *MountMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*MountMutation) AddedUpdatedAt ¶
func (m *MountMutation) AddedUpdatedAt() (r int64, exists bool)
AddedUpdatedAt returns the value that was added to the "updated_at" field in this mutation.
func (*MountMutation) Bind ¶
func (m *MountMutation) Bind() (r string, exists bool)
Bind returns the value of the "bind" field in the mutation.
func (*MountMutation) ClearEdge ¶
func (m *MountMutation) 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 (*MountMutation) ClearField ¶
func (m *MountMutation) 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 (*MountMutation) ClearOwner ¶
func (m *MountMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Container entity.
func (*MountMutation) ClearedEdges ¶
func (m *MountMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*MountMutation) ClearedFields ¶
func (m *MountMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (MountMutation) Client ¶
func (m MountMutation) 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 (*MountMutation) CreatedAt ¶
func (m *MountMutation) CreatedAt() (r int64, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*MountMutation) EdgeCleared ¶
func (m *MountMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*MountMutation) Field ¶
func (m *MountMutation) 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 (*MountMutation) FieldCleared ¶
func (m *MountMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*MountMutation) Fields ¶
func (m *MountMutation) 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 (*MountMutation) Host ¶
func (m *MountMutation) Host() (r string, exists bool)
Host returns the value of the "host" field in the mutation.
func (*MountMutation) ID ¶
func (m *MountMutation) 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 (*MountMutation) IDs ¶
func (m *MountMutation) 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 (*MountMutation) IsDir ¶
func (m *MountMutation) IsDir() (r bool, exists bool)
IsDir returns the value of the "is_dir" field in the mutation.
func (*MountMutation) OldBind ¶
func (m *MountMutation) OldBind(ctx context.Context) (v string, err error)
OldBind returns the old "bind" field's value of the Mount entity. If the Mount 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 (*MountMutation) OldCreatedAt ¶
func (m *MountMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
OldCreatedAt returns the old "created_at" field's value of the Mount entity. If the Mount 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 (*MountMutation) 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 (*MountMutation) OldHost ¶
func (m *MountMutation) OldHost(ctx context.Context) (v string, err error)
OldHost returns the old "host" field's value of the Mount entity. If the Mount 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 (*MountMutation) OldIsDir ¶
func (m *MountMutation) OldIsDir(ctx context.Context) (v bool, err error)
OldIsDir returns the old "is_dir" field's value of the Mount entity. If the Mount 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 (*MountMutation) OldUpdatedAt ¶
func (m *MountMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
OldUpdatedAt returns the old "updated_at" field's value of the Mount entity. If the Mount 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 (*MountMutation) OwnerCleared ¶
func (m *MountMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Container entity was cleared.
func (*MountMutation) OwnerIDs ¶
func (m *MountMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation.
func (*MountMutation) RemoveOwnerIDs ¶
func (m *MountMutation) RemoveOwnerIDs(ids ...int)
RemoveOwnerIDs removes the "owner" edge to the Container entity by IDs.
func (*MountMutation) RemovedEdges ¶
func (m *MountMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*MountMutation) RemovedIDs ¶
func (m *MountMutation) 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 (*MountMutation) RemovedOwnerIDs ¶
func (m *MountMutation) RemovedOwnerIDs() (ids []int)
RemovedOwner returns the removed IDs of the "owner" edge to the Container entity.
func (*MountMutation) ResetBind ¶
func (m *MountMutation) ResetBind()
ResetBind resets all changes to the "bind" field.
func (*MountMutation) ResetCreatedAt ¶
func (m *MountMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*MountMutation) ResetEdge ¶
func (m *MountMutation) 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 (*MountMutation) ResetField ¶
func (m *MountMutation) 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 (*MountMutation) ResetHost ¶
func (m *MountMutation) ResetHost()
ResetHost resets all changes to the "host" field.
func (*MountMutation) ResetIsDir ¶
func (m *MountMutation) ResetIsDir()
ResetIsDir resets all changes to the "is_dir" field.
func (*MountMutation) ResetOwner ¶
func (m *MountMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*MountMutation) ResetUpdatedAt ¶
func (m *MountMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*MountMutation) SetBind ¶
func (m *MountMutation) SetBind(s string)
SetBind sets the "bind" field.
func (*MountMutation) SetCreatedAt ¶
func (m *MountMutation) SetCreatedAt(i int64)
SetCreatedAt sets the "created_at" field.
func (*MountMutation) SetField ¶
func (m *MountMutation) 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 (*MountMutation) SetHost ¶
func (m *MountMutation) SetHost(s string)
SetHost sets the "host" field.
func (*MountMutation) SetIsDir ¶
func (m *MountMutation) SetIsDir(b bool)
SetIsDir sets the "is_dir" field.
func (*MountMutation) SetOp ¶
func (m *MountMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*MountMutation) SetUpdatedAt ¶
func (m *MountMutation) SetUpdatedAt(i int64)
SetUpdatedAt sets the "updated_at" field.
func (MountMutation) Tx ¶
func (m MountMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*MountMutation) Type ¶
func (m *MountMutation) Type() string
Type returns the node type of this mutation (Mount).
func (*MountMutation) UpdatedAt ¶
func (m *MountMutation) UpdatedAt() (r int64, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*MountMutation) Where ¶
func (m *MountMutation) Where(ps ...predicate.Mount)
Where appends a list predicates to the MountMutation builder.
func (*MountMutation) WhereP ¶
func (m *MountMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the MountMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type MountQuery ¶
type MountQuery struct {
// contains filtered or unexported fields
}
MountQuery is the builder for querying Mount entities.
func (*MountQuery) Aggregate ¶
func (mq *MountQuery) Aggregate(fns ...AggregateFunc) *MountSelect
Aggregate returns a MountSelect configured with the given aggregations.
func (*MountQuery) All ¶
func (mq *MountQuery) All(ctx context.Context) ([]*Mount, error)
All executes the query and returns a list of Mounts.
func (*MountQuery) AllX ¶
func (mq *MountQuery) AllX(ctx context.Context) []*Mount
AllX is like All, but panics if an error occurs.
func (*MountQuery) Clone ¶
func (mq *MountQuery) Clone() *MountQuery
Clone returns a duplicate of the MountQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*MountQuery) Count ¶
func (mq *MountQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*MountQuery) CountX ¶
func (mq *MountQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*MountQuery) Exist ¶
func (mq *MountQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*MountQuery) ExistX ¶
func (mq *MountQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*MountQuery) First ¶
func (mq *MountQuery) First(ctx context.Context) (*Mount, error)
First returns the first Mount entity from the query. Returns a *NotFoundError when no Mount was found.
func (*MountQuery) FirstID ¶
func (mq *MountQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Mount ID from the query. Returns a *NotFoundError when no Mount ID was found.
func (*MountQuery) FirstIDX ¶
func (mq *MountQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*MountQuery) FirstX ¶
func (mq *MountQuery) FirstX(ctx context.Context) *Mount
FirstX is like First, but panics if an error occurs.
func (*MountQuery) GroupBy ¶
func (mq *MountQuery) GroupBy(field string, fields ...string) *MountGroupBy
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 { Host string `json:"host,omitempty"` Count int `json:"count,omitempty"` } client.Mount.Query(). GroupBy(mount.FieldHost). Aggregate(ent.Count()). Scan(ctx, &v)
func (*MountQuery) IDs ¶
func (mq *MountQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Mount IDs.
func (*MountQuery) IDsX ¶
func (mq *MountQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*MountQuery) Limit ¶
func (mq *MountQuery) Limit(limit int) *MountQuery
Limit the number of records to be returned by this query.
func (*MountQuery) Offset ¶
func (mq *MountQuery) Offset(offset int) *MountQuery
Offset to start from.
func (*MountQuery) Only ¶
func (mq *MountQuery) Only(ctx context.Context) (*Mount, error)
Only returns a single Mount entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Mount entity is found. Returns a *NotFoundError when no Mount entities are found.
func (*MountQuery) OnlyID ¶
func (mq *MountQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Mount ID in the query. Returns a *NotSingularError when more than one Mount ID is found. Returns a *NotFoundError when no entities are found.
func (*MountQuery) OnlyIDX ¶
func (mq *MountQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*MountQuery) OnlyX ¶
func (mq *MountQuery) OnlyX(ctx context.Context) *Mount
OnlyX is like Only, but panics if an error occurs.
func (*MountQuery) Order ¶
func (mq *MountQuery) Order(o ...mount.OrderOption) *MountQuery
Order specifies how the records should be ordered.
func (*MountQuery) QueryOwner ¶
func (mq *MountQuery) QueryOwner() *ContainerQuery
QueryOwner chains the current query on the "owner" edge.
func (*MountQuery) Select ¶
func (mq *MountQuery) Select(fields ...string) *MountSelect
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 { Host string `json:"host,omitempty"` } client.Mount.Query(). Select(mount.FieldHost). Scan(ctx, &v)
func (*MountQuery) Unique ¶
func (mq *MountQuery) Unique(unique bool) *MountQuery
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 (*MountQuery) Where ¶
func (mq *MountQuery) Where(ps ...predicate.Mount) *MountQuery
Where adds a new predicate for the MountQuery builder.
func (*MountQuery) WithOwner ¶
func (mq *MountQuery) WithOwner(opts ...func(*ContainerQuery)) *MountQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type MountSelect ¶
type MountSelect struct { *MountQuery // contains filtered or unexported fields }
MountSelect is the builder for selecting fields of Mount entities.
func (*MountSelect) Aggregate ¶
func (ms *MountSelect) Aggregate(fns ...AggregateFunc) *MountSelect
Aggregate adds the given aggregation functions to the selector query.
func (*MountSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*MountSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*MountSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*MountSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*MountSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*MountSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*MountSelect) Scan ¶
func (ms *MountSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*MountSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type MountUpdate ¶
type MountUpdate struct {
// contains filtered or unexported fields
}
MountUpdate is the builder for updating Mount entities.
func (*MountUpdate) AddCreatedAt ¶
func (mu *MountUpdate) AddCreatedAt(i int64) *MountUpdate
AddCreatedAt adds i to the "created_at" field.
func (*MountUpdate) AddOwner ¶
func (mu *MountUpdate) AddOwner(c ...*Container) *MountUpdate
AddOwner adds the "owner" edges to the Container entity.
func (*MountUpdate) AddOwnerIDs ¶
func (mu *MountUpdate) AddOwnerIDs(ids ...int) *MountUpdate
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*MountUpdate) AddUpdatedAt ¶
func (mu *MountUpdate) AddUpdatedAt(i int64) *MountUpdate
AddUpdatedAt adds i to the "updated_at" field.
func (*MountUpdate) ClearOwner ¶
func (mu *MountUpdate) ClearOwner() *MountUpdate
ClearOwner clears all "owner" edges to the Container entity.
func (*MountUpdate) Exec ¶
func (mu *MountUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*MountUpdate) ExecX ¶
func (mu *MountUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MountUpdate) Mutation ¶
func (mu *MountUpdate) Mutation() *MountMutation
Mutation returns the MountMutation object of the builder.
func (*MountUpdate) RemoveOwner ¶
func (mu *MountUpdate) RemoveOwner(c ...*Container) *MountUpdate
RemoveOwner removes "owner" edges to Container entities.
func (*MountUpdate) RemoveOwnerIDs ¶
func (mu *MountUpdate) RemoveOwnerIDs(ids ...int) *MountUpdate
RemoveOwnerIDs removes the "owner" edge to Container entities by IDs.
func (*MountUpdate) Save ¶
func (mu *MountUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*MountUpdate) SaveX ¶
func (mu *MountUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*MountUpdate) SetBind ¶
func (mu *MountUpdate) SetBind(s string) *MountUpdate
SetBind sets the "bind" field.
func (*MountUpdate) SetCreatedAt ¶
func (mu *MountUpdate) SetCreatedAt(i int64) *MountUpdate
SetCreatedAt sets the "created_at" field.
func (*MountUpdate) SetHost ¶
func (mu *MountUpdate) SetHost(s string) *MountUpdate
SetHost sets the "host" field.
func (*MountUpdate) SetIsDir ¶
func (mu *MountUpdate) SetIsDir(b bool) *MountUpdate
SetIsDir sets the "is_dir" field.
func (*MountUpdate) SetNillableBind ¶
func (mu *MountUpdate) SetNillableBind(s *string) *MountUpdate
SetNillableBind sets the "bind" field if the given value is not nil.
func (*MountUpdate) SetNillableCreatedAt ¶
func (mu *MountUpdate) SetNillableCreatedAt(i *int64) *MountUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MountUpdate) SetNillableHost ¶
func (mu *MountUpdate) SetNillableHost(s *string) *MountUpdate
SetNillableHost sets the "host" field if the given value is not nil.
func (*MountUpdate) SetNillableIsDir ¶
func (mu *MountUpdate) SetNillableIsDir(b *bool) *MountUpdate
SetNillableIsDir sets the "is_dir" field if the given value is not nil.
func (*MountUpdate) SetUpdatedAt ¶
func (mu *MountUpdate) SetUpdatedAt(i int64) *MountUpdate
SetUpdatedAt sets the "updated_at" field.
func (*MountUpdate) Where ¶
func (mu *MountUpdate) Where(ps ...predicate.Mount) *MountUpdate
Where appends a list predicates to the MountUpdate builder.
type MountUpdateOne ¶
type MountUpdateOne struct {
// contains filtered or unexported fields
}
MountUpdateOne is the builder for updating a single Mount entity.
func (*MountUpdateOne) AddCreatedAt ¶
func (muo *MountUpdateOne) AddCreatedAt(i int64) *MountUpdateOne
AddCreatedAt adds i to the "created_at" field.
func (*MountUpdateOne) AddOwner ¶
func (muo *MountUpdateOne) AddOwner(c ...*Container) *MountUpdateOne
AddOwner adds the "owner" edges to the Container entity.
func (*MountUpdateOne) AddOwnerIDs ¶
func (muo *MountUpdateOne) AddOwnerIDs(ids ...int) *MountUpdateOne
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*MountUpdateOne) AddUpdatedAt ¶
func (muo *MountUpdateOne) AddUpdatedAt(i int64) *MountUpdateOne
AddUpdatedAt adds i to the "updated_at" field.
func (*MountUpdateOne) ClearOwner ¶
func (muo *MountUpdateOne) ClearOwner() *MountUpdateOne
ClearOwner clears all "owner" edges to the Container entity.
func (*MountUpdateOne) Exec ¶
func (muo *MountUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*MountUpdateOne) ExecX ¶
func (muo *MountUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*MountUpdateOne) Mutation ¶
func (muo *MountUpdateOne) Mutation() *MountMutation
Mutation returns the MountMutation object of the builder.
func (*MountUpdateOne) RemoveOwner ¶
func (muo *MountUpdateOne) RemoveOwner(c ...*Container) *MountUpdateOne
RemoveOwner removes "owner" edges to Container entities.
func (*MountUpdateOne) RemoveOwnerIDs ¶
func (muo *MountUpdateOne) RemoveOwnerIDs(ids ...int) *MountUpdateOne
RemoveOwnerIDs removes the "owner" edge to Container entities by IDs.
func (*MountUpdateOne) Save ¶
func (muo *MountUpdateOne) Save(ctx context.Context) (*Mount, error)
Save executes the query and returns the updated Mount entity.
func (*MountUpdateOne) SaveX ¶
func (muo *MountUpdateOne) SaveX(ctx context.Context) *Mount
SaveX is like Save, but panics if an error occurs.
func (*MountUpdateOne) Select ¶
func (muo *MountUpdateOne) Select(field string, fields ...string) *MountUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*MountUpdateOne) SetBind ¶
func (muo *MountUpdateOne) SetBind(s string) *MountUpdateOne
SetBind sets the "bind" field.
func (*MountUpdateOne) SetCreatedAt ¶
func (muo *MountUpdateOne) SetCreatedAt(i int64) *MountUpdateOne
SetCreatedAt sets the "created_at" field.
func (*MountUpdateOne) SetHost ¶
func (muo *MountUpdateOne) SetHost(s string) *MountUpdateOne
SetHost sets the "host" field.
func (*MountUpdateOne) SetIsDir ¶
func (muo *MountUpdateOne) SetIsDir(b bool) *MountUpdateOne
SetIsDir sets the "is_dir" field.
func (*MountUpdateOne) SetNillableBind ¶
func (muo *MountUpdateOne) SetNillableBind(s *string) *MountUpdateOne
SetNillableBind sets the "bind" field if the given value is not nil.
func (*MountUpdateOne) SetNillableCreatedAt ¶
func (muo *MountUpdateOne) SetNillableCreatedAt(i *int64) *MountUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*MountUpdateOne) SetNillableHost ¶
func (muo *MountUpdateOne) SetNillableHost(s *string) *MountUpdateOne
SetNillableHost sets the "host" field if the given value is not nil.
func (*MountUpdateOne) SetNillableIsDir ¶
func (muo *MountUpdateOne) SetNillableIsDir(b *bool) *MountUpdateOne
SetNillableIsDir sets the "is_dir" field if the given value is not nil.
func (*MountUpdateOne) SetUpdatedAt ¶
func (muo *MountUpdateOne) SetUpdatedAt(i int64) *MountUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*MountUpdateOne) Where ¶
func (muo *MountUpdateOne) Where(ps ...predicate.Mount) *MountUpdateOne
Where appends a list predicates to the MountUpdate builder.
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"` // UID holds the value of the "uid" field. UID string `json:"uid,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Address holds the value of the "address" field. Address string `json:"address,omitempty"` // Note holds the value of the "note" field. Note string `json:"note,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt int64 `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt int64 `json:"updated_at,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 }
remote node info table
func (*Node) QueryContainers ¶
func (n *Node) QueryContainers() *ContainerQuery
QueryContainers queries the "containers" 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) QueryContainers ¶
func (c *NodeClient) QueryContainers(n *Node) *ContainerQuery
QueryContainers queries the containers 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) AddContainerIDs ¶
func (nc *NodeCreate) AddContainerIDs(ids ...int) *NodeCreate
AddContainerIDs adds the "containers" edge to the Container entity by IDs.
func (*NodeCreate) AddContainers ¶
func (nc *NodeCreate) AddContainers(c ...*Container) *NodeCreate
AddContainers adds the "containers" edges to the Container 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) SetAddress ¶
func (nc *NodeCreate) SetAddress(s string) *NodeCreate
SetAddress sets the "address" field.
func (*NodeCreate) SetCreatedAt ¶
func (nc *NodeCreate) SetCreatedAt(i int64) *NodeCreate
SetCreatedAt sets the "created_at" field.
func (*NodeCreate) SetName ¶
func (nc *NodeCreate) SetName(s string) *NodeCreate
SetName sets the "name" field.
func (*NodeCreate) SetNillableCreatedAt ¶
func (nc *NodeCreate) SetNillableCreatedAt(i *int64) *NodeCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*NodeCreate) SetNillableUID ¶
func (nc *NodeCreate) SetNillableUID(s *string) *NodeCreate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*NodeCreate) SetNillableUpdatedAt ¶
func (nc *NodeCreate) SetNillableUpdatedAt(i *int64) *NodeCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*NodeCreate) SetNote ¶
func (nc *NodeCreate) SetNote(s string) *NodeCreate
SetNote sets the "note" field.
func (*NodeCreate) SetUID ¶
func (nc *NodeCreate) SetUID(s string) *NodeCreate
SetUID sets the "uid" field.
func (*NodeCreate) SetUpdatedAt ¶
func (nc *NodeCreate) SetUpdatedAt(i int64) *NodeCreate
SetUpdatedAt sets the "updated_at" field.
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 { // Containers holds the value of the containers edge. Containers []*Container `json:"containers,omitempty"` // contains filtered or unexported fields }
NodeEdges holds the relations/edges for other nodes in the graph.
func (NodeEdges) ContainersOrErr ¶
ContainersOrErr returns the Containers value or an error if the edge was not loaded in eager-loading.
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) AddContainerIDs ¶
func (m *NodeMutation) AddContainerIDs(ids ...int)
AddContainerIDs adds the "containers" edge to the Container entity by ids.
func (*NodeMutation) AddCreatedAt ¶
func (m *NodeMutation) AddCreatedAt(i int64)
AddCreatedAt adds i to the "created_at" field.
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) AddUpdatedAt ¶
func (m *NodeMutation) AddUpdatedAt(i int64)
AddUpdatedAt adds i to the "updated_at" field.
func (*NodeMutation) AddedCreatedAt ¶
func (m *NodeMutation) AddedCreatedAt() (r int64, exists bool)
AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.
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) AddedUpdatedAt ¶
func (m *NodeMutation) AddedUpdatedAt() (r int64, exists bool)
AddedUpdatedAt returns the value that was added to the "updated_at" field in this mutation.
func (*NodeMutation) Address ¶
func (m *NodeMutation) Address() (r string, exists bool)
Address returns the value of the "address" field in the mutation.
func (*NodeMutation) ClearContainers ¶
func (m *NodeMutation) ClearContainers()
ClearContainers clears the "containers" edge to the Container entity.
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) 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) ContainersCleared ¶
func (m *NodeMutation) ContainersCleared() bool
ContainersCleared reports if the "containers" edge to the Container entity was cleared.
func (*NodeMutation) ContainersIDs ¶
func (m *NodeMutation) ContainersIDs() (ids []int)
ContainersIDs returns the "containers" edge IDs in the mutation.
func (*NodeMutation) CreatedAt ¶
func (m *NodeMutation) CreatedAt() (r int64, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
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) 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) Note ¶
func (m *NodeMutation) Note() (r string, exists bool)
Note returns the value of the "note" field in the mutation.
func (*NodeMutation) OldAddress ¶
func (m *NodeMutation) OldAddress(ctx context.Context) (v string, err error)
OldAddress returns the old "address" 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) OldCreatedAt ¶
func (m *NodeMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
OldCreatedAt returns the old "created_at" 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) 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) 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) OldNote ¶
func (m *NodeMutation) OldNote(ctx context.Context) (v string, err error)
OldNote returns the old "note" 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) OldUID ¶
func (m *NodeMutation) OldUID(ctx context.Context) (v string, err error)
OldUID returns the old "uid" 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) OldUpdatedAt ¶
func (m *NodeMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
OldUpdatedAt returns the old "updated_at" 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) RemoveContainerIDs ¶
func (m *NodeMutation) RemoveContainerIDs(ids ...int)
RemoveContainerIDs removes the "containers" edge to the Container entity by IDs.
func (*NodeMutation) RemovedContainersIDs ¶
func (m *NodeMutation) RemovedContainersIDs() (ids []int)
RemovedContainers returns the removed IDs of the "containers" edge to the Container entity.
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) ResetAddress ¶
func (m *NodeMutation) ResetAddress()
ResetAddress resets all changes to the "address" field.
func (*NodeMutation) ResetContainers ¶
func (m *NodeMutation) ResetContainers()
ResetContainers resets all changes to the "containers" edge.
func (*NodeMutation) ResetCreatedAt ¶
func (m *NodeMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
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) ResetName ¶
func (m *NodeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*NodeMutation) ResetNote ¶
func (m *NodeMutation) ResetNote()
ResetNote resets all changes to the "note" field.
func (*NodeMutation) ResetUID ¶
func (m *NodeMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*NodeMutation) ResetUpdatedAt ¶
func (m *NodeMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*NodeMutation) SetAddress ¶
func (m *NodeMutation) SetAddress(s string)
SetAddress sets the "address" field.
func (*NodeMutation) SetCreatedAt ¶
func (m *NodeMutation) SetCreatedAt(i int64)
SetCreatedAt sets the "created_at" field.
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) SetName ¶
func (m *NodeMutation) SetName(s string)
SetName sets the "name" field.
func (*NodeMutation) SetNote ¶
func (m *NodeMutation) SetNote(s string)
SetNote sets the "note" field.
func (*NodeMutation) SetOp ¶
func (m *NodeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*NodeMutation) SetUpdatedAt ¶
func (m *NodeMutation) SetUpdatedAt(i int64)
SetUpdatedAt sets the "updated_at" field.
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) UID ¶
func (m *NodeMutation) UID() (r string, exists bool)
UID returns the value of the "uid" field in the mutation.
func (*NodeMutation) UpdatedAt ¶
func (m *NodeMutation) UpdatedAt() (r int64, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
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 { UID string `json:"uid,omitempty"` Count int `json:"count,omitempty"` } client.Node.Query(). GroupBy(node.FieldUID). 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) QueryContainers ¶
func (nq *NodeQuery) QueryContainers() *ContainerQuery
QueryContainers chains the current query on the "containers" 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 { UID string `json:"uid,omitempty"` } client.Node.Query(). Select(node.FieldUID). 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) WithContainers ¶
func (nq *NodeQuery) WithContainers(opts ...func(*ContainerQuery)) *NodeQuery
WithContainers tells the query-builder to eager-load the nodes that are connected to the "containers" 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) AddContainerIDs ¶
func (nu *NodeUpdate) AddContainerIDs(ids ...int) *NodeUpdate
AddContainerIDs adds the "containers" edge to the Container entity by IDs.
func (*NodeUpdate) AddContainers ¶
func (nu *NodeUpdate) AddContainers(c ...*Container) *NodeUpdate
AddContainers adds the "containers" edges to the Container entity.
func (*NodeUpdate) AddCreatedAt ¶
func (nu *NodeUpdate) AddCreatedAt(i int64) *NodeUpdate
AddCreatedAt adds i to the "created_at" field.
func (*NodeUpdate) AddUpdatedAt ¶
func (nu *NodeUpdate) AddUpdatedAt(i int64) *NodeUpdate
AddUpdatedAt adds i to the "updated_at" field.
func (*NodeUpdate) ClearContainers ¶
func (nu *NodeUpdate) ClearContainers() *NodeUpdate
ClearContainers clears all "containers" edges to the Container 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) RemoveContainerIDs ¶
func (nu *NodeUpdate) RemoveContainerIDs(ids ...int) *NodeUpdate
RemoveContainerIDs removes the "containers" edge to Container entities by IDs.
func (*NodeUpdate) RemoveContainers ¶
func (nu *NodeUpdate) RemoveContainers(c ...*Container) *NodeUpdate
RemoveContainers removes "containers" edges to Container entities.
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) SetAddress ¶
func (nu *NodeUpdate) SetAddress(s string) *NodeUpdate
SetAddress sets the "address" field.
func (*NodeUpdate) SetCreatedAt ¶
func (nu *NodeUpdate) SetCreatedAt(i int64) *NodeUpdate
SetCreatedAt sets the "created_at" field.
func (*NodeUpdate) SetName ¶
func (nu *NodeUpdate) SetName(s string) *NodeUpdate
SetName sets the "name" field.
func (*NodeUpdate) SetNillableAddress ¶
func (nu *NodeUpdate) SetNillableAddress(s *string) *NodeUpdate
SetNillableAddress sets the "address" field if the given value is not nil.
func (*NodeUpdate) SetNillableCreatedAt ¶
func (nu *NodeUpdate) SetNillableCreatedAt(i *int64) *NodeUpdate
SetNillableCreatedAt sets the "created_at" 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) SetNillableNote ¶
func (nu *NodeUpdate) SetNillableNote(s *string) *NodeUpdate
SetNillableNote sets the "note" field if the given value is not nil.
func (*NodeUpdate) SetNillableUID ¶
func (nu *NodeUpdate) SetNillableUID(s *string) *NodeUpdate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*NodeUpdate) SetNote ¶
func (nu *NodeUpdate) SetNote(s string) *NodeUpdate
SetNote sets the "note" field.
func (*NodeUpdate) SetUID ¶
func (nu *NodeUpdate) SetUID(s string) *NodeUpdate
SetUID sets the "uid" field.
func (*NodeUpdate) SetUpdatedAt ¶
func (nu *NodeUpdate) SetUpdatedAt(i int64) *NodeUpdate
SetUpdatedAt sets the "updated_at" field.
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) AddContainerIDs ¶
func (nuo *NodeUpdateOne) AddContainerIDs(ids ...int) *NodeUpdateOne
AddContainerIDs adds the "containers" edge to the Container entity by IDs.
func (*NodeUpdateOne) AddContainers ¶
func (nuo *NodeUpdateOne) AddContainers(c ...*Container) *NodeUpdateOne
AddContainers adds the "containers" edges to the Container entity.
func (*NodeUpdateOne) AddCreatedAt ¶
func (nuo *NodeUpdateOne) AddCreatedAt(i int64) *NodeUpdateOne
AddCreatedAt adds i to the "created_at" field.
func (*NodeUpdateOne) AddUpdatedAt ¶
func (nuo *NodeUpdateOne) AddUpdatedAt(i int64) *NodeUpdateOne
AddUpdatedAt adds i to the "updated_at" field.
func (*NodeUpdateOne) ClearContainers ¶
func (nuo *NodeUpdateOne) ClearContainers() *NodeUpdateOne
ClearContainers clears all "containers" edges to the Container 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) RemoveContainerIDs ¶
func (nuo *NodeUpdateOne) RemoveContainerIDs(ids ...int) *NodeUpdateOne
RemoveContainerIDs removes the "containers" edge to Container entities by IDs.
func (*NodeUpdateOne) RemoveContainers ¶
func (nuo *NodeUpdateOne) RemoveContainers(c ...*Container) *NodeUpdateOne
RemoveContainers removes "containers" edges to Container entities.
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) SetAddress ¶
func (nuo *NodeUpdateOne) SetAddress(s string) *NodeUpdateOne
SetAddress sets the "address" field.
func (*NodeUpdateOne) SetCreatedAt ¶
func (nuo *NodeUpdateOne) SetCreatedAt(i int64) *NodeUpdateOne
SetCreatedAt sets the "created_at" field.
func (*NodeUpdateOne) SetName ¶
func (nuo *NodeUpdateOne) SetName(s string) *NodeUpdateOne
SetName sets the "name" field.
func (*NodeUpdateOne) SetNillableAddress ¶
func (nuo *NodeUpdateOne) SetNillableAddress(s *string) *NodeUpdateOne
SetNillableAddress sets the "address" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableCreatedAt ¶
func (nuo *NodeUpdateOne) SetNillableCreatedAt(i *int64) *NodeUpdateOne
SetNillableCreatedAt sets the "created_at" 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) SetNillableNote ¶
func (nuo *NodeUpdateOne) SetNillableNote(s *string) *NodeUpdateOne
SetNillableNote sets the "note" field if the given value is not nil.
func (*NodeUpdateOne) SetNillableUID ¶
func (nuo *NodeUpdateOne) SetNillableUID(s *string) *NodeUpdateOne
SetNillableUID sets the "uid" field if the given value is not nil.
func (*NodeUpdateOne) SetNote ¶
func (nuo *NodeUpdateOne) SetNote(s string) *NodeUpdateOne
SetNote sets the "note" field.
func (*NodeUpdateOne) SetUID ¶
func (nuo *NodeUpdateOne) SetUID(s string) *NodeUpdateOne
SetUID sets the "uid" field.
func (*NodeUpdateOne) SetUpdatedAt ¶
func (nuo *NodeUpdateOne) SetUpdatedAt(i int64) *NodeUpdateOne
SetUpdatedAt sets the "updated_at" field.
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 Port ¶
type Port struct { // ID of the ent. ID int `json:"id,omitempty"` // Host holds the value of the "host" field. Host int `json:"host,omitempty"` // bind port in container Bind int `json:"bind,omitempty"` // network protocol Protocol int `json:"protocol,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt int64 `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt int64 `json:"updated_at,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the PortQuery when eager-loading is set. Edges PortEdges `json:"edges"` // contains filtered or unexported fields }
container ports bind info table
func (*Port) QueryOwner ¶
func (po *Port) QueryOwner() *ContainerQuery
QueryOwner queries the "owner" edge of the Port entity.
func (*Port) Unwrap ¶
Unwrap unwraps the Port 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 (*Port) Update ¶
func (po *Port) Update() *PortUpdateOne
Update returns a builder for updating this Port. Note that you need to call Port.Unwrap() before calling this method if this Port was returned from a transaction, and the transaction was committed or rolled back.
type PortClient ¶
type PortClient struct {
// contains filtered or unexported fields
}
PortClient is a client for the Port schema.
func NewPortClient ¶
func NewPortClient(c config) *PortClient
NewPortClient returns a client for the Port from the given config.
func (*PortClient) Create ¶
func (c *PortClient) Create() *PortCreate
Create returns a builder for creating a Port entity.
func (*PortClient) CreateBulk ¶
func (c *PortClient) CreateBulk(builders ...*PortCreate) *PortCreateBulk
CreateBulk returns a builder for creating a bulk of Port entities.
func (*PortClient) Delete ¶
func (c *PortClient) Delete() *PortDelete
Delete returns a delete builder for Port.
func (*PortClient) DeleteOne ¶
func (c *PortClient) DeleteOne(po *Port) *PortDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*PortClient) DeleteOneID ¶
func (c *PortClient) DeleteOneID(id int) *PortDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*PortClient) GetX ¶
func (c *PortClient) GetX(ctx context.Context, id int) *Port
GetX is like Get, but panics if an error occurs.
func (*PortClient) Intercept ¶
func (c *PortClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `port.Intercept(f(g(h())))`.
func (*PortClient) Interceptors ¶
func (c *PortClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*PortClient) MapCreateBulk ¶
func (c *PortClient) MapCreateBulk(slice any, setFunc func(*PortCreate, int)) *PortCreateBulk
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 (*PortClient) Query ¶
func (c *PortClient) Query() *PortQuery
Query returns a query builder for Port.
func (*PortClient) QueryOwner ¶
func (c *PortClient) QueryOwner(po *Port) *ContainerQuery
QueryOwner queries the owner edge of a Port.
func (*PortClient) Update ¶
func (c *PortClient) Update() *PortUpdate
Update returns an update builder for Port.
func (*PortClient) UpdateOne ¶
func (c *PortClient) UpdateOne(po *Port) *PortUpdateOne
UpdateOne returns an update builder for the given entity.
func (*PortClient) UpdateOneID ¶
func (c *PortClient) UpdateOneID(id int) *PortUpdateOne
UpdateOneID returns an update builder for the given id.
func (*PortClient) Use ¶
func (c *PortClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `port.Hooks(f(g(h())))`.
type PortCreate ¶
type PortCreate struct {
// contains filtered or unexported fields
}
PortCreate is the builder for creating a Port entity.
func (*PortCreate) AddOwner ¶
func (pc *PortCreate) AddOwner(c ...*Container) *PortCreate
AddOwner adds the "owner" edges to the Container entity.
func (*PortCreate) AddOwnerIDs ¶
func (pc *PortCreate) AddOwnerIDs(ids ...int) *PortCreate
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*PortCreate) Exec ¶
func (pc *PortCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*PortCreate) ExecX ¶
func (pc *PortCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortCreate) Mutation ¶
func (pc *PortCreate) Mutation() *PortMutation
Mutation returns the PortMutation object of the builder.
func (*PortCreate) Save ¶
func (pc *PortCreate) Save(ctx context.Context) (*Port, error)
Save creates the Port in the database.
func (*PortCreate) SaveX ¶
func (pc *PortCreate) SaveX(ctx context.Context) *Port
SaveX calls Save and panics if Save returns an error.
func (*PortCreate) SetBind ¶
func (pc *PortCreate) SetBind(i int) *PortCreate
SetBind sets the "bind" field.
func (*PortCreate) SetCreatedAt ¶
func (pc *PortCreate) SetCreatedAt(i int64) *PortCreate
SetCreatedAt sets the "created_at" field.
func (*PortCreate) SetHost ¶
func (pc *PortCreate) SetHost(i int) *PortCreate
SetHost sets the "host" field.
func (*PortCreate) SetNillableCreatedAt ¶
func (pc *PortCreate) SetNillableCreatedAt(i *int64) *PortCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PortCreate) SetNillableUpdatedAt ¶
func (pc *PortCreate) SetNillableUpdatedAt(i *int64) *PortCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*PortCreate) SetProtocol ¶
func (pc *PortCreate) SetProtocol(i int) *PortCreate
SetProtocol sets the "protocol" field.
func (*PortCreate) SetUpdatedAt ¶
func (pc *PortCreate) SetUpdatedAt(i int64) *PortCreate
SetUpdatedAt sets the "updated_at" field.
type PortCreateBulk ¶
type PortCreateBulk struct {
// contains filtered or unexported fields
}
PortCreateBulk is the builder for creating many Port entities in bulk.
func (*PortCreateBulk) Exec ¶
func (pcb *PortCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*PortCreateBulk) ExecX ¶
func (pcb *PortCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type PortDelete ¶
type PortDelete struct {
// contains filtered or unexported fields
}
PortDelete is the builder for deleting a Port entity.
func (*PortDelete) Exec ¶
func (pd *PortDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*PortDelete) ExecX ¶
func (pd *PortDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*PortDelete) Where ¶
func (pd *PortDelete) Where(ps ...predicate.Port) *PortDelete
Where appends a list predicates to the PortDelete builder.
type PortDeleteOne ¶
type PortDeleteOne struct {
// contains filtered or unexported fields
}
PortDeleteOne is the builder for deleting a single Port entity.
func (*PortDeleteOne) Exec ¶
func (pdo *PortDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*PortDeleteOne) ExecX ¶
func (pdo *PortDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortDeleteOne) Where ¶
func (pdo *PortDeleteOne) Where(ps ...predicate.Port) *PortDeleteOne
Where appends a list predicates to the PortDelete builder.
type PortEdges ¶
type PortEdges struct { // Owner holds the value of the owner edge. Owner []*Container `json:"owner,omitempty"` // contains filtered or unexported fields }
PortEdges holds the relations/edges for other nodes in the graph.
func (PortEdges) OwnerOrErr ¶
OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading.
type PortGroupBy ¶
type PortGroupBy struct {
// contains filtered or unexported fields
}
PortGroupBy is the group-by builder for Port entities.
func (*PortGroupBy) Aggregate ¶
func (pgb *PortGroupBy) Aggregate(fns ...AggregateFunc) *PortGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*PortGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PortGroupBy) Scan ¶
func (pgb *PortGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PortGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PortMutation ¶
type PortMutation struct {
// contains filtered or unexported fields
}
PortMutation represents an operation that mutates the Port nodes in the graph.
func (*PortMutation) AddBind ¶
func (m *PortMutation) AddBind(i int)
AddBind adds i to the "bind" field.
func (*PortMutation) AddCreatedAt ¶
func (m *PortMutation) AddCreatedAt(i int64)
AddCreatedAt adds i to the "created_at" field.
func (*PortMutation) AddField ¶
func (m *PortMutation) 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 (*PortMutation) AddHost ¶
func (m *PortMutation) AddHost(i int)
AddHost adds i to the "host" field.
func (*PortMutation) AddOwnerIDs ¶
func (m *PortMutation) AddOwnerIDs(ids ...int)
AddOwnerIDs adds the "owner" edge to the Container entity by ids.
func (*PortMutation) AddProtocol ¶
func (m *PortMutation) AddProtocol(i int)
AddProtocol adds i to the "protocol" field.
func (*PortMutation) AddUpdatedAt ¶
func (m *PortMutation) AddUpdatedAt(i int64)
AddUpdatedAt adds i to the "updated_at" field.
func (*PortMutation) AddedBind ¶
func (m *PortMutation) AddedBind() (r int, exists bool)
AddedBind returns the value that was added to the "bind" field in this mutation.
func (*PortMutation) AddedCreatedAt ¶
func (m *PortMutation) AddedCreatedAt() (r int64, exists bool)
AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.
func (*PortMutation) AddedEdges ¶
func (m *PortMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*PortMutation) AddedField ¶
func (m *PortMutation) 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 (*PortMutation) AddedFields ¶
func (m *PortMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*PortMutation) AddedHost ¶
func (m *PortMutation) AddedHost() (r int, exists bool)
AddedHost returns the value that was added to the "host" field in this mutation.
func (*PortMutation) AddedIDs ¶
func (m *PortMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*PortMutation) AddedProtocol ¶
func (m *PortMutation) AddedProtocol() (r int, exists bool)
AddedProtocol returns the value that was added to the "protocol" field in this mutation.
func (*PortMutation) AddedUpdatedAt ¶
func (m *PortMutation) AddedUpdatedAt() (r int64, exists bool)
AddedUpdatedAt returns the value that was added to the "updated_at" field in this mutation.
func (*PortMutation) Bind ¶
func (m *PortMutation) Bind() (r int, exists bool)
Bind returns the value of the "bind" field in the mutation.
func (*PortMutation) ClearEdge ¶
func (m *PortMutation) 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 (*PortMutation) ClearField ¶
func (m *PortMutation) 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 (*PortMutation) ClearOwner ¶
func (m *PortMutation) ClearOwner()
ClearOwner clears the "owner" edge to the Container entity.
func (*PortMutation) ClearedEdges ¶
func (m *PortMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*PortMutation) ClearedFields ¶
func (m *PortMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (PortMutation) Client ¶
func (m PortMutation) 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 (*PortMutation) CreatedAt ¶
func (m *PortMutation) CreatedAt() (r int64, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*PortMutation) EdgeCleared ¶
func (m *PortMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*PortMutation) Field ¶
func (m *PortMutation) 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 (*PortMutation) FieldCleared ¶
func (m *PortMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*PortMutation) Fields ¶
func (m *PortMutation) 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 (*PortMutation) Host ¶
func (m *PortMutation) Host() (r int, exists bool)
Host returns the value of the "host" field in the mutation.
func (*PortMutation) ID ¶
func (m *PortMutation) 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 (*PortMutation) IDs ¶
func (m *PortMutation) 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 (*PortMutation) OldBind ¶
func (m *PortMutation) OldBind(ctx context.Context) (v int, err error)
OldBind returns the old "bind" field's value of the Port entity. If the Port 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 (*PortMutation) OldCreatedAt ¶
func (m *PortMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
OldCreatedAt returns the old "created_at" field's value of the Port entity. If the Port 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 (*PortMutation) 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 (*PortMutation) OldHost ¶
func (m *PortMutation) OldHost(ctx context.Context) (v int, err error)
OldHost returns the old "host" field's value of the Port entity. If the Port 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 (*PortMutation) OldProtocol ¶
func (m *PortMutation) OldProtocol(ctx context.Context) (v int, err error)
OldProtocol returns the old "protocol" field's value of the Port entity. If the Port 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 (*PortMutation) OldUpdatedAt ¶
func (m *PortMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
OldUpdatedAt returns the old "updated_at" field's value of the Port entity. If the Port 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 (*PortMutation) OwnerCleared ¶
func (m *PortMutation) OwnerCleared() bool
OwnerCleared reports if the "owner" edge to the Container entity was cleared.
func (*PortMutation) OwnerIDs ¶
func (m *PortMutation) OwnerIDs() (ids []int)
OwnerIDs returns the "owner" edge IDs in the mutation.
func (*PortMutation) Protocol ¶
func (m *PortMutation) Protocol() (r int, exists bool)
Protocol returns the value of the "protocol" field in the mutation.
func (*PortMutation) RemoveOwnerIDs ¶
func (m *PortMutation) RemoveOwnerIDs(ids ...int)
RemoveOwnerIDs removes the "owner" edge to the Container entity by IDs.
func (*PortMutation) RemovedEdges ¶
func (m *PortMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*PortMutation) RemovedIDs ¶
func (m *PortMutation) 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 (*PortMutation) RemovedOwnerIDs ¶
func (m *PortMutation) RemovedOwnerIDs() (ids []int)
RemovedOwner returns the removed IDs of the "owner" edge to the Container entity.
func (*PortMutation) ResetBind ¶
func (m *PortMutation) ResetBind()
ResetBind resets all changes to the "bind" field.
func (*PortMutation) ResetCreatedAt ¶
func (m *PortMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*PortMutation) ResetEdge ¶
func (m *PortMutation) 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 (*PortMutation) ResetField ¶
func (m *PortMutation) 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 (*PortMutation) ResetHost ¶
func (m *PortMutation) ResetHost()
ResetHost resets all changes to the "host" field.
func (*PortMutation) ResetOwner ¶
func (m *PortMutation) ResetOwner()
ResetOwner resets all changes to the "owner" edge.
func (*PortMutation) ResetProtocol ¶
func (m *PortMutation) ResetProtocol()
ResetProtocol resets all changes to the "protocol" field.
func (*PortMutation) ResetUpdatedAt ¶
func (m *PortMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*PortMutation) SetCreatedAt ¶
func (m *PortMutation) SetCreatedAt(i int64)
SetCreatedAt sets the "created_at" field.
func (*PortMutation) SetField ¶
func (m *PortMutation) 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 (*PortMutation) SetOp ¶
func (m *PortMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*PortMutation) SetProtocol ¶
func (m *PortMutation) SetProtocol(i int)
SetProtocol sets the "protocol" field.
func (*PortMutation) SetUpdatedAt ¶
func (m *PortMutation) SetUpdatedAt(i int64)
SetUpdatedAt sets the "updated_at" field.
func (PortMutation) Tx ¶
func (m PortMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*PortMutation) Type ¶
func (m *PortMutation) Type() string
Type returns the node type of this mutation (Port).
func (*PortMutation) UpdatedAt ¶
func (m *PortMutation) UpdatedAt() (r int64, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*PortMutation) Where ¶
func (m *PortMutation) Where(ps ...predicate.Port)
Where appends a list predicates to the PortMutation builder.
func (*PortMutation) WhereP ¶
func (m *PortMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the PortMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type PortQuery ¶
type PortQuery struct {
// contains filtered or unexported fields
}
PortQuery is the builder for querying Port entities.
func (*PortQuery) Aggregate ¶
func (pq *PortQuery) Aggregate(fns ...AggregateFunc) *PortSelect
Aggregate returns a PortSelect configured with the given aggregations.
func (*PortQuery) Clone ¶
Clone returns a duplicate of the PortQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*PortQuery) First ¶
First returns the first Port entity from the query. Returns a *NotFoundError when no Port was found.
func (*PortQuery) FirstID ¶
FirstID returns the first Port ID from the query. Returns a *NotFoundError when no Port ID was found.
func (*PortQuery) GroupBy ¶
func (pq *PortQuery) GroupBy(field string, fields ...string) *PortGroupBy
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 { Host int `json:"host,omitempty"` Count int `json:"count,omitempty"` } client.Port.Query(). GroupBy(port.FieldHost). Aggregate(ent.Count()). Scan(ctx, &v)
func (*PortQuery) Only ¶
Only returns a single Port entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Port entity is found. Returns a *NotFoundError when no Port entities are found.
func (*PortQuery) OnlyID ¶
OnlyID is like Only, but returns the only Port ID in the query. Returns a *NotSingularError when more than one Port ID is found. Returns a *NotFoundError when no entities are found.
func (*PortQuery) Order ¶
func (pq *PortQuery) Order(o ...port.OrderOption) *PortQuery
Order specifies how the records should be ordered.
func (*PortQuery) QueryOwner ¶
func (pq *PortQuery) QueryOwner() *ContainerQuery
QueryOwner chains the current query on the "owner" edge.
func (*PortQuery) Select ¶
func (pq *PortQuery) Select(fields ...string) *PortSelect
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 { Host int `json:"host,omitempty"` } client.Port.Query(). Select(port.FieldHost). Scan(ctx, &v)
func (*PortQuery) 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 (*PortQuery) WithOwner ¶
func (pq *PortQuery) WithOwner(opts ...func(*ContainerQuery)) *PortQuery
WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.
type PortSelect ¶
type PortSelect struct { *PortQuery // contains filtered or unexported fields }
PortSelect is the builder for selecting fields of Port entities.
func (*PortSelect) Aggregate ¶
func (ps *PortSelect) Aggregate(fns ...AggregateFunc) *PortSelect
Aggregate adds the given aggregation functions to the selector query.
func (*PortSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*PortSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*PortSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*PortSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*PortSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*PortSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*PortSelect) Scan ¶
func (ps *PortSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*PortSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type PortUpdate ¶
type PortUpdate struct {
// contains filtered or unexported fields
}
PortUpdate is the builder for updating Port entities.
func (*PortUpdate) AddBind ¶
func (pu *PortUpdate) AddBind(i int) *PortUpdate
AddBind adds i to the "bind" field.
func (*PortUpdate) AddCreatedAt ¶
func (pu *PortUpdate) AddCreatedAt(i int64) *PortUpdate
AddCreatedAt adds i to the "created_at" field.
func (*PortUpdate) AddHost ¶
func (pu *PortUpdate) AddHost(i int) *PortUpdate
AddHost adds i to the "host" field.
func (*PortUpdate) AddOwner ¶
func (pu *PortUpdate) AddOwner(c ...*Container) *PortUpdate
AddOwner adds the "owner" edges to the Container entity.
func (*PortUpdate) AddOwnerIDs ¶
func (pu *PortUpdate) AddOwnerIDs(ids ...int) *PortUpdate
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*PortUpdate) AddProtocol ¶
func (pu *PortUpdate) AddProtocol(i int) *PortUpdate
AddProtocol adds i to the "protocol" field.
func (*PortUpdate) AddUpdatedAt ¶
func (pu *PortUpdate) AddUpdatedAt(i int64) *PortUpdate
AddUpdatedAt adds i to the "updated_at" field.
func (*PortUpdate) ClearOwner ¶
func (pu *PortUpdate) ClearOwner() *PortUpdate
ClearOwner clears all "owner" edges to the Container entity.
func (*PortUpdate) Exec ¶
func (pu *PortUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*PortUpdate) ExecX ¶
func (pu *PortUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortUpdate) Mutation ¶
func (pu *PortUpdate) Mutation() *PortMutation
Mutation returns the PortMutation object of the builder.
func (*PortUpdate) RemoveOwner ¶
func (pu *PortUpdate) RemoveOwner(c ...*Container) *PortUpdate
RemoveOwner removes "owner" edges to Container entities.
func (*PortUpdate) RemoveOwnerIDs ¶
func (pu *PortUpdate) RemoveOwnerIDs(ids ...int) *PortUpdate
RemoveOwnerIDs removes the "owner" edge to Container entities by IDs.
func (*PortUpdate) Save ¶
func (pu *PortUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*PortUpdate) SaveX ¶
func (pu *PortUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*PortUpdate) SetBind ¶
func (pu *PortUpdate) SetBind(i int) *PortUpdate
SetBind sets the "bind" field.
func (*PortUpdate) SetCreatedAt ¶
func (pu *PortUpdate) SetCreatedAt(i int64) *PortUpdate
SetCreatedAt sets the "created_at" field.
func (*PortUpdate) SetHost ¶
func (pu *PortUpdate) SetHost(i int) *PortUpdate
SetHost sets the "host" field.
func (*PortUpdate) SetNillableBind ¶
func (pu *PortUpdate) SetNillableBind(i *int) *PortUpdate
SetNillableBind sets the "bind" field if the given value is not nil.
func (*PortUpdate) SetNillableCreatedAt ¶
func (pu *PortUpdate) SetNillableCreatedAt(i *int64) *PortUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PortUpdate) SetNillableHost ¶
func (pu *PortUpdate) SetNillableHost(i *int) *PortUpdate
SetNillableHost sets the "host" field if the given value is not nil.
func (*PortUpdate) SetNillableProtocol ¶
func (pu *PortUpdate) SetNillableProtocol(i *int) *PortUpdate
SetNillableProtocol sets the "protocol" field if the given value is not nil.
func (*PortUpdate) SetProtocol ¶
func (pu *PortUpdate) SetProtocol(i int) *PortUpdate
SetProtocol sets the "protocol" field.
func (*PortUpdate) SetUpdatedAt ¶
func (pu *PortUpdate) SetUpdatedAt(i int64) *PortUpdate
SetUpdatedAt sets the "updated_at" field.
func (*PortUpdate) Where ¶
func (pu *PortUpdate) Where(ps ...predicate.Port) *PortUpdate
Where appends a list predicates to the PortUpdate builder.
type PortUpdateOne ¶
type PortUpdateOne struct {
// contains filtered or unexported fields
}
PortUpdateOne is the builder for updating a single Port entity.
func (*PortUpdateOne) AddBind ¶
func (puo *PortUpdateOne) AddBind(i int) *PortUpdateOne
AddBind adds i to the "bind" field.
func (*PortUpdateOne) AddCreatedAt ¶
func (puo *PortUpdateOne) AddCreatedAt(i int64) *PortUpdateOne
AddCreatedAt adds i to the "created_at" field.
func (*PortUpdateOne) AddHost ¶
func (puo *PortUpdateOne) AddHost(i int) *PortUpdateOne
AddHost adds i to the "host" field.
func (*PortUpdateOne) AddOwner ¶
func (puo *PortUpdateOne) AddOwner(c ...*Container) *PortUpdateOne
AddOwner adds the "owner" edges to the Container entity.
func (*PortUpdateOne) AddOwnerIDs ¶
func (puo *PortUpdateOne) AddOwnerIDs(ids ...int) *PortUpdateOne
AddOwnerIDs adds the "owner" edge to the Container entity by IDs.
func (*PortUpdateOne) AddProtocol ¶
func (puo *PortUpdateOne) AddProtocol(i int) *PortUpdateOne
AddProtocol adds i to the "protocol" field.
func (*PortUpdateOne) AddUpdatedAt ¶
func (puo *PortUpdateOne) AddUpdatedAt(i int64) *PortUpdateOne
AddUpdatedAt adds i to the "updated_at" field.
func (*PortUpdateOne) ClearOwner ¶
func (puo *PortUpdateOne) ClearOwner() *PortUpdateOne
ClearOwner clears all "owner" edges to the Container entity.
func (*PortUpdateOne) Exec ¶
func (puo *PortUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*PortUpdateOne) ExecX ¶
func (puo *PortUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*PortUpdateOne) Mutation ¶
func (puo *PortUpdateOne) Mutation() *PortMutation
Mutation returns the PortMutation object of the builder.
func (*PortUpdateOne) RemoveOwner ¶
func (puo *PortUpdateOne) RemoveOwner(c ...*Container) *PortUpdateOne
RemoveOwner removes "owner" edges to Container entities.
func (*PortUpdateOne) RemoveOwnerIDs ¶
func (puo *PortUpdateOne) RemoveOwnerIDs(ids ...int) *PortUpdateOne
RemoveOwnerIDs removes the "owner" edge to Container entities by IDs.
func (*PortUpdateOne) Save ¶
func (puo *PortUpdateOne) Save(ctx context.Context) (*Port, error)
Save executes the query and returns the updated Port entity.
func (*PortUpdateOne) SaveX ¶
func (puo *PortUpdateOne) SaveX(ctx context.Context) *Port
SaveX is like Save, but panics if an error occurs.
func (*PortUpdateOne) Select ¶
func (puo *PortUpdateOne) Select(field string, fields ...string) *PortUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*PortUpdateOne) SetBind ¶
func (puo *PortUpdateOne) SetBind(i int) *PortUpdateOne
SetBind sets the "bind" field.
func (*PortUpdateOne) SetCreatedAt ¶
func (puo *PortUpdateOne) SetCreatedAt(i int64) *PortUpdateOne
SetCreatedAt sets the "created_at" field.
func (*PortUpdateOne) SetHost ¶
func (puo *PortUpdateOne) SetHost(i int) *PortUpdateOne
SetHost sets the "host" field.
func (*PortUpdateOne) SetNillableBind ¶
func (puo *PortUpdateOne) SetNillableBind(i *int) *PortUpdateOne
SetNillableBind sets the "bind" field if the given value is not nil.
func (*PortUpdateOne) SetNillableCreatedAt ¶
func (puo *PortUpdateOne) SetNillableCreatedAt(i *int64) *PortUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*PortUpdateOne) SetNillableHost ¶
func (puo *PortUpdateOne) SetNillableHost(i *int) *PortUpdateOne
SetNillableHost sets the "host" field if the given value is not nil.
func (*PortUpdateOne) SetNillableProtocol ¶
func (puo *PortUpdateOne) SetNillableProtocol(i *int) *PortUpdateOne
SetNillableProtocol sets the "protocol" field if the given value is not nil.
func (*PortUpdateOne) SetProtocol ¶
func (puo *PortUpdateOne) SetProtocol(i int) *PortUpdateOne
SetProtocol sets the "protocol" field.
func (*PortUpdateOne) SetUpdatedAt ¶
func (puo *PortUpdateOne) SetUpdatedAt(i int64) *PortUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*PortUpdateOne) Where ¶
func (puo *PortUpdateOne) Where(ps ...predicate.Port) *PortUpdateOne
Where appends a list predicates to the PortUpdate 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 TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Container is the client for interacting with the Container builders. Container *ContainerClient // Job is the client for interacting with the Job builders. Job *JobClient // Mount is the client for interacting with the Mount builders. Mount *MountClient // Node is the client for interacting with the Node builders. Node *NodeClient // Port is the client for interacting with the Port builders. Port *PortClient // 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"` // UID holds the value of the "uid" field. UID string `json:"uid,omitempty"` // Username holds the value of the "username" field. Username string `json:"username,omitempty"` // Email holds the value of the "email" field. Email string `json:"email,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // CreatedAt holds the value of the "created_at" field. CreatedAt int64 `json:"created_at,omitempty"` // UpdatedAt holds the value of the "updated_at" field. UpdatedAt int64 `json:"updated_at,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 info table
func (*User) QueryContainers ¶
func (u *User) QueryContainers() *ContainerQuery
QueryContainers queries the "containers" 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) QueryContainers ¶
func (c *UserClient) QueryContainers(u *User) *ContainerQuery
QueryContainers queries the containers 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) AddContainerIDs ¶
func (uc *UserCreate) AddContainerIDs(ids ...int) *UserCreate
AddContainerIDs adds the "containers" edge to the Container entity by IDs.
func (*UserCreate) AddContainers ¶
func (uc *UserCreate) AddContainers(c ...*Container) *UserCreate
AddContainers adds the "containers" edges to the Container 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) SetCreatedAt ¶
func (uc *UserCreate) SetCreatedAt(i int64) *UserCreate
SetCreatedAt sets the "created_at" field.
func (*UserCreate) SetEmail ¶
func (uc *UserCreate) SetEmail(s string) *UserCreate
SetEmail sets the "email" field.
func (*UserCreate) SetNillableCreatedAt ¶
func (uc *UserCreate) SetNillableCreatedAt(i *int64) *UserCreate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserCreate) SetNillableUID ¶
func (uc *UserCreate) SetNillableUID(s *string) *UserCreate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*UserCreate) SetNillableUpdatedAt ¶
func (uc *UserCreate) SetNillableUpdatedAt(i *int64) *UserCreate
SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.
func (*UserCreate) SetPassword ¶
func (uc *UserCreate) SetPassword(s string) *UserCreate
SetPassword sets the "password" field.
func (*UserCreate) SetUID ¶
func (uc *UserCreate) SetUID(s string) *UserCreate
SetUID sets the "uid" field.
func (*UserCreate) SetUpdatedAt ¶
func (uc *UserCreate) SetUpdatedAt(i int64) *UserCreate
SetUpdatedAt sets the "updated_at" field.
func (*UserCreate) SetUsername ¶
func (uc *UserCreate) SetUsername(s string) *UserCreate
SetUsername sets the "username" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserEdges ¶
type UserEdges struct { // Containers holds the value of the containers edge. Containers []*Container `json:"containers,omitempty"` // contains filtered or unexported fields }
UserEdges holds the relations/edges for other nodes in the graph.
func (UserEdges) ContainersOrErr ¶
ContainersOrErr returns the Containers value or an error if the edge was not loaded in eager-loading.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddContainerIDs ¶
func (m *UserMutation) AddContainerIDs(ids ...int)
AddContainerIDs adds the "containers" edge to the Container entity by ids.
func (*UserMutation) AddCreatedAt ¶
func (m *UserMutation) AddCreatedAt(i int64)
AddCreatedAt adds i to the "created_at" field.
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) AddUpdatedAt ¶
func (m *UserMutation) AddUpdatedAt(i int64)
AddUpdatedAt adds i to the "updated_at" field.
func (*UserMutation) AddedCreatedAt ¶
func (m *UserMutation) AddedCreatedAt() (r int64, exists bool)
AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.
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) AddedUpdatedAt ¶
func (m *UserMutation) AddedUpdatedAt() (r int64, exists bool)
AddedUpdatedAt returns the value that was added to the "updated_at" field in this mutation.
func (*UserMutation) ClearContainers ¶
func (m *UserMutation) ClearContainers()
ClearContainers clears the "containers" edge to the Container 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) 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) ContainersCleared ¶
func (m *UserMutation) ContainersCleared() bool
ContainersCleared reports if the "containers" edge to the Container entity was cleared.
func (*UserMutation) ContainersIDs ¶
func (m *UserMutation) ContainersIDs() (ids []int)
ContainersIDs returns the "containers" edge IDs in the mutation.
func (*UserMutation) CreatedAt ¶
func (m *UserMutation) CreatedAt() (r int64, exists bool)
CreatedAt returns the value of the "created_at" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Email ¶
func (m *UserMutation) Email() (r string, exists bool)
Email returns the value of the "email" field in the mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) 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) OldCreatedAt ¶
func (m *UserMutation) OldCreatedAt(ctx context.Context) (v int64, err error)
OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldEmail ¶
func (m *UserMutation) OldEmail(ctx context.Context) (v string, err error)
OldEmail returns the old "email" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldField ¶
OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.
func (*UserMutation) OldPassword ¶
func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
OldPassword returns the old "password" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUID ¶
func (m *UserMutation) OldUID(ctx context.Context) (v string, err error)
OldUID returns the old "uid" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUpdatedAt ¶
func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v int64, err error)
OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldUsername ¶
func (m *UserMutation) OldUsername(ctx context.Context) (v string, err error)
OldUsername returns the old "username" 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) Password ¶
func (m *UserMutation) Password() (r string, exists bool)
Password returns the value of the "password" field in the mutation.
func (*UserMutation) RemoveContainerIDs ¶
func (m *UserMutation) RemoveContainerIDs(ids ...int)
RemoveContainerIDs removes the "containers" edge to the Container entity by IDs.
func (*UserMutation) RemovedContainersIDs ¶
func (m *UserMutation) RemovedContainersIDs() (ids []int)
RemovedContainers returns the removed IDs of the "containers" edge to the Container entity.
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) ResetContainers ¶
func (m *UserMutation) ResetContainers()
ResetContainers resets all changes to the "containers" edge.
func (*UserMutation) ResetCreatedAt ¶
func (m *UserMutation) ResetCreatedAt()
ResetCreatedAt resets all changes to the "created_at" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetEmail ¶
func (m *UserMutation) ResetEmail()
ResetEmail resets all changes to the "email" field.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetUID ¶
func (m *UserMutation) ResetUID()
ResetUID resets all changes to the "uid" field.
func (*UserMutation) ResetUpdatedAt ¶
func (m *UserMutation) ResetUpdatedAt()
ResetUpdatedAt resets all changes to the "updated_at" field.
func (*UserMutation) ResetUsername ¶
func (m *UserMutation) ResetUsername()
ResetUsername resets all changes to the "username" field.
func (*UserMutation) SetCreatedAt ¶
func (m *UserMutation) SetCreatedAt(i int64)
SetCreatedAt sets the "created_at" field.
func (*UserMutation) SetEmail ¶
func (m *UserMutation) SetEmail(s string)
SetEmail sets the "email" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetUpdatedAt ¶
func (m *UserMutation) SetUpdatedAt(i int64)
SetUpdatedAt sets the "updated_at" field.
func (*UserMutation) SetUsername ¶
func (m *UserMutation) SetUsername(s string)
SetUsername sets the "username" field.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) UID ¶
func (m *UserMutation) UID() (r string, exists bool)
UID returns the value of the "uid" field in the mutation.
func (*UserMutation) UpdatedAt ¶
func (m *UserMutation) UpdatedAt() (r int64, exists bool)
UpdatedAt returns the value of the "updated_at" field in the mutation.
func (*UserMutation) Username ¶
func (m *UserMutation) Username() (r string, exists bool)
Username returns the value of the "username" field in the mutation.
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type UserQuery ¶
type UserQuery struct {
// contains filtered or unexported fields
}
UserQuery is the builder for querying User entities.
func (*UserQuery) Aggregate ¶
func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate returns a UserSelect configured with the given aggregations.
func (*UserQuery) Clone ¶
Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*UserQuery) First ¶
First returns the first User entity from the query. Returns a *NotFoundError when no User was found.
func (*UserQuery) FirstID ¶
FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.
func (*UserQuery) GroupBy ¶
func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy
GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.
Example:
var v []struct { UID string `json:"uid,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldUID). 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) QueryContainers ¶
func (uq *UserQuery) QueryContainers() *ContainerQuery
QueryContainers chains the current query on the "containers" 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 { UID string `json:"uid,omitempty"` } client.User.Query(). Select(user.FieldUID). 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) WithContainers ¶
func (uq *UserQuery) WithContainers(opts ...func(*ContainerQuery)) *UserQuery
WithContainers tells the query-builder to eager-load the nodes that are connected to the "containers" 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) AddContainerIDs ¶
func (uu *UserUpdate) AddContainerIDs(ids ...int) *UserUpdate
AddContainerIDs adds the "containers" edge to the Container entity by IDs.
func (*UserUpdate) AddContainers ¶
func (uu *UserUpdate) AddContainers(c ...*Container) *UserUpdate
AddContainers adds the "containers" edges to the Container entity.
func (*UserUpdate) AddCreatedAt ¶
func (uu *UserUpdate) AddCreatedAt(i int64) *UserUpdate
AddCreatedAt adds i to the "created_at" field.
func (*UserUpdate) AddUpdatedAt ¶
func (uu *UserUpdate) AddUpdatedAt(i int64) *UserUpdate
AddUpdatedAt adds i to the "updated_at" field.
func (*UserUpdate) ClearContainers ¶
func (uu *UserUpdate) ClearContainers() *UserUpdate
ClearContainers clears all "containers" edges to the Container 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) RemoveContainerIDs ¶
func (uu *UserUpdate) RemoveContainerIDs(ids ...int) *UserUpdate
RemoveContainerIDs removes the "containers" edge to Container entities by IDs.
func (*UserUpdate) RemoveContainers ¶
func (uu *UserUpdate) RemoveContainers(c ...*Container) *UserUpdate
RemoveContainers removes "containers" edges to Container entities.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetCreatedAt ¶
func (uu *UserUpdate) SetCreatedAt(i int64) *UserUpdate
SetCreatedAt sets the "created_at" field.
func (*UserUpdate) SetEmail ¶
func (uu *UserUpdate) SetEmail(s string) *UserUpdate
SetEmail sets the "email" field.
func (*UserUpdate) SetNillableCreatedAt ¶
func (uu *UserUpdate) SetNillableCreatedAt(i *int64) *UserUpdate
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdate) SetNillableEmail ¶
func (uu *UserUpdate) SetNillableEmail(s *string) *UserUpdate
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdate) SetNillablePassword ¶
func (uu *UserUpdate) SetNillablePassword(s *string) *UserUpdate
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdate) SetNillableUID ¶
func (uu *UserUpdate) SetNillableUID(s *string) *UserUpdate
SetNillableUID sets the "uid" field if the given value is not nil.
func (*UserUpdate) SetNillableUsername ¶
func (uu *UserUpdate) SetNillableUsername(s *string) *UserUpdate
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdate) SetPassword ¶
func (uu *UserUpdate) SetPassword(s string) *UserUpdate
SetPassword sets the "password" field.
func (*UserUpdate) SetUID ¶
func (uu *UserUpdate) SetUID(s string) *UserUpdate
SetUID sets the "uid" field.
func (*UserUpdate) SetUpdatedAt ¶
func (uu *UserUpdate) SetUpdatedAt(i int64) *UserUpdate
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdate) SetUsername ¶
func (uu *UserUpdate) SetUsername(s string) *UserUpdate
SetUsername sets the "username" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) AddContainerIDs ¶
func (uuo *UserUpdateOne) AddContainerIDs(ids ...int) *UserUpdateOne
AddContainerIDs adds the "containers" edge to the Container entity by IDs.
func (*UserUpdateOne) AddContainers ¶
func (uuo *UserUpdateOne) AddContainers(c ...*Container) *UserUpdateOne
AddContainers adds the "containers" edges to the Container entity.
func (*UserUpdateOne) AddCreatedAt ¶
func (uuo *UserUpdateOne) AddCreatedAt(i int64) *UserUpdateOne
AddCreatedAt adds i to the "created_at" field.
func (*UserUpdateOne) AddUpdatedAt ¶
func (uuo *UserUpdateOne) AddUpdatedAt(i int64) *UserUpdateOne
AddUpdatedAt adds i to the "updated_at" field.
func (*UserUpdateOne) ClearContainers ¶
func (uuo *UserUpdateOne) ClearContainers() *UserUpdateOne
ClearContainers clears all "containers" edges to the Container 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) RemoveContainerIDs ¶
func (uuo *UserUpdateOne) RemoveContainerIDs(ids ...int) *UserUpdateOne
RemoveContainerIDs removes the "containers" edge to Container entities by IDs.
func (*UserUpdateOne) RemoveContainers ¶
func (uuo *UserUpdateOne) RemoveContainers(c ...*Container) *UserUpdateOne
RemoveContainers removes "containers" edges to Container entities.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetCreatedAt ¶
func (uuo *UserUpdateOne) SetCreatedAt(i int64) *UserUpdateOne
SetCreatedAt sets the "created_at" field.
func (*UserUpdateOne) SetEmail ¶
func (uuo *UserUpdateOne) SetEmail(s string) *UserUpdateOne
SetEmail sets the "email" field.
func (*UserUpdateOne) SetNillableCreatedAt ¶
func (uuo *UserUpdateOne) SetNillableCreatedAt(i *int64) *UserUpdateOne
SetNillableCreatedAt sets the "created_at" field if the given value is not nil.
func (*UserUpdateOne) SetNillableEmail ¶
func (uuo *UserUpdateOne) SetNillableEmail(s *string) *UserUpdateOne
SetNillableEmail sets the "email" field if the given value is not nil.
func (*UserUpdateOne) SetNillablePassword ¶
func (uuo *UserUpdateOne) SetNillablePassword(s *string) *UserUpdateOne
SetNillablePassword sets the "password" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUID ¶
func (uuo *UserUpdateOne) SetNillableUID(s *string) *UserUpdateOne
SetNillableUID sets the "uid" field if the given value is not nil.
func (*UserUpdateOne) SetNillableUsername ¶
func (uuo *UserUpdateOne) SetNillableUsername(s *string) *UserUpdateOne
SetNillableUsername sets the "username" field if the given value is not nil.
func (*UserUpdateOne) SetPassword ¶
func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
SetPassword sets the "password" field.
func (*UserUpdateOne) SetUID ¶
func (uuo *UserUpdateOne) SetUID(s string) *UserUpdateOne
SetUID sets the "uid" field.
func (*UserUpdateOne) SetUpdatedAt ¶
func (uuo *UserUpdateOne) SetUpdatedAt(i int64) *UserUpdateOne
SetUpdatedAt sets the "updated_at" field.
func (*UserUpdateOne) SetUsername ¶
func (uuo *UserUpdateOne) SetUsername(s string) *UserUpdateOne
SetUsername sets the "username" field.
func (*UserUpdateOne) Where ¶
func (uuo *UserUpdateOne) Where(ps ...predicate.User) *UserUpdateOne
Where appends a list predicates to the UserUpdate builder.
type ValidationError ¶
type ValidationError struct { Name string // Field or edge name. // contains filtered or unexported fields }
ValidationError returns when validating a field or edge fails.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Error implements the error interface.
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error
Unwrap implements the errors.Wrapper interface.
Source Files
¶
- client.go
- container.go
- container_create.go
- container_delete.go
- container_query.go
- container_update.go
- ent.go
- job.go
- job_create.go
- job_delete.go
- job_query.go
- job_update.go
- mount.go
- mount_create.go
- mount_delete.go
- mount_query.go
- mount_update.go
- mutation.go
- node.go
- node_create.go
- node_delete.go
- node_query.go
- node_update.go
- port.go
- port_create.go
- port_delete.go
- port_query.go
- port_update.go
- runtime.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go