Documentation ¶
Index ¶
- Constants
- func Asc(fields ...string) func(*sql.Selector)
- func Desc(fields ...string) func(*sql.Selector)
- func IsConstraintError(err error) bool
- func IsNotFound(err error) bool
- func IsNotLoaded(err error) bool
- func IsNotSingular(err error) bool
- func IsValidationError(err error) bool
- func MaskNotFound(err error) error
- func NewContext(parent context.Context, c *Client) context.Context
- func NewTxContext(parent context.Context, tx *Tx) context.Context
- type Agent
- type AgentClient
- func (c *AgentClient) Create() *AgentCreate
- func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk
- func (c *AgentClient) Delete() *AgentDelete
- func (c *AgentClient) DeleteOne(a *Agent) *AgentDeleteOne
- func (c *AgentClient) DeleteOneID(id uuid.UUID) *AgentDeleteOne
- func (c *AgentClient) Get(ctx context.Context, id uuid.UUID) (*Agent, error)
- func (c *AgentClient) GetX(ctx context.Context, id uuid.UUID) *Agent
- func (c *AgentClient) Hooks() []Hook
- func (c *AgentClient) Intercept(interceptors ...Interceptor)
- func (c *AgentClient) Interceptors() []Interceptor
- func (c *AgentClient) Query() *AgentQuery
- func (c *AgentClient) Update() *AgentUpdate
- func (c *AgentClient) UpdateOne(a *Agent) *AgentUpdateOne
- func (c *AgentClient) UpdateOneID(id uuid.UUID) *AgentUpdateOne
- func (c *AgentClient) Use(hooks ...Hook)
- type AgentCreate
- func (ac *AgentCreate) Exec(ctx context.Context) error
- func (ac *AgentCreate) ExecX(ctx context.Context)
- func (ac *AgentCreate) Mutation() *AgentMutation
- func (ac *AgentCreate) Save(ctx context.Context) (*Agent, error)
- func (ac *AgentCreate) SaveX(ctx context.Context) *Agent
- func (ac *AgentCreate) SetID(u uuid.UUID) *AgentCreate
- func (ac *AgentCreate) SetName(s string) *AgentCreate
- func (ac *AgentCreate) SetNillableID(u *uuid.UUID) *AgentCreate
- type AgentCreateBulk
- type AgentDelete
- type AgentDeleteOne
- type AgentGroupBy
- func (agb *AgentGroupBy) Aggregate(fns ...AggregateFunc) *AgentGroupBy
- func (s *AgentGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgentGroupBy) BoolX(ctx context.Context) bool
- func (s *AgentGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *AgentGroupBy) BoolsX(ctx context.Context) []bool
- func (s *AgentGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgentGroupBy) Float64X(ctx context.Context) float64
- func (s *AgentGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgentGroupBy) Float64sX(ctx context.Context) []float64
- func (s *AgentGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *AgentGroupBy) IntX(ctx context.Context) int
- func (s *AgentGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *AgentGroupBy) IntsX(ctx context.Context) []int
- func (agb *AgentGroupBy) Scan(ctx context.Context, v any) error
- func (s *AgentGroupBy) ScanX(ctx context.Context, v any)
- func (s *AgentGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *AgentGroupBy) StringX(ctx context.Context) string
- func (s *AgentGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *AgentGroupBy) StringsX(ctx context.Context) []string
- type AgentMutation
- func (m *AgentMutation) AddField(name string, value ent.Value) error
- func (m *AgentMutation) AddedEdges() []string
- func (m *AgentMutation) AddedField(name string) (ent.Value, bool)
- func (m *AgentMutation) AddedFields() []string
- func (m *AgentMutation) AddedIDs(name string) []ent.Value
- func (m *AgentMutation) ClearEdge(name string) error
- func (m *AgentMutation) ClearField(name string) error
- func (m *AgentMutation) ClearedEdges() []string
- func (m *AgentMutation) ClearedFields() []string
- func (m AgentMutation) Client() *Client
- func (m *AgentMutation) EdgeCleared(name string) bool
- func (m *AgentMutation) Field(name string) (ent.Value, bool)
- func (m *AgentMutation) FieldCleared(name string) bool
- func (m *AgentMutation) Fields() []string
- func (m *AgentMutation) ID() (id uuid.UUID, exists bool)
- func (m *AgentMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *AgentMutation) Name() (r string, exists bool)
- func (m *AgentMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *AgentMutation) OldName(ctx context.Context) (v string, err error)
- func (m *AgentMutation) Op() Op
- func (m *AgentMutation) RemovedEdges() []string
- func (m *AgentMutation) RemovedIDs(name string) []ent.Value
- func (m *AgentMutation) ResetEdge(name string) error
- func (m *AgentMutation) ResetField(name string) error
- func (m *AgentMutation) ResetName()
- func (m *AgentMutation) SetField(name string, value ent.Value) error
- func (m *AgentMutation) SetID(id uuid.UUID)
- func (m *AgentMutation) SetName(s string)
- func (m *AgentMutation) SetOp(op Op)
- func (m AgentMutation) Tx() (*Tx, error)
- func (m *AgentMutation) Type() string
- func (m *AgentMutation) Where(ps ...predicate.Agent)
- func (m *AgentMutation) WhereP(ps ...func(*sql.Selector))
- type AgentQuery
- func (aq *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
- func (aq *AgentQuery) All(ctx context.Context) ([]*Agent, error)
- func (aq *AgentQuery) AllX(ctx context.Context) []*Agent
- func (aq *AgentQuery) Clone() *AgentQuery
- func (aq *AgentQuery) Count(ctx context.Context) (int, error)
- func (aq *AgentQuery) CountX(ctx context.Context) int
- func (aq *AgentQuery) Exist(ctx context.Context) (bool, error)
- func (aq *AgentQuery) ExistX(ctx context.Context) bool
- func (aq *AgentQuery) First(ctx context.Context) (*Agent, error)
- func (aq *AgentQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AgentQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (aq *AgentQuery) FirstX(ctx context.Context) *Agent
- func (aq *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy
- func (aq *AgentQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (aq *AgentQuery) IDsX(ctx context.Context) []uuid.UUID
- func (aq *AgentQuery) Limit(limit int) *AgentQuery
- func (aq *AgentQuery) Offset(offset int) *AgentQuery
- func (aq *AgentQuery) Only(ctx context.Context) (*Agent, error)
- func (aq *AgentQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (aq *AgentQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (aq *AgentQuery) OnlyX(ctx context.Context) *Agent
- func (aq *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
- func (aq *AgentQuery) Select(fields ...string) *AgentSelect
- func (aq *AgentQuery) Unique(unique bool) *AgentQuery
- func (aq *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery
- type AgentSelect
- func (as *AgentSelect) Aggregate(fns ...AggregateFunc) *AgentSelect
- func (s *AgentSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *AgentSelect) BoolX(ctx context.Context) bool
- func (s *AgentSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *AgentSelect) BoolsX(ctx context.Context) []bool
- func (s *AgentSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *AgentSelect) Float64X(ctx context.Context) float64
- func (s *AgentSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *AgentSelect) Float64sX(ctx context.Context) []float64
- func (s *AgentSelect) Int(ctx context.Context) (_ int, err error)
- func (s *AgentSelect) IntX(ctx context.Context) int
- func (s *AgentSelect) Ints(ctx context.Context) ([]int, error)
- func (s *AgentSelect) IntsX(ctx context.Context) []int
- func (as *AgentSelect) Scan(ctx context.Context, v any) error
- func (s *AgentSelect) ScanX(ctx context.Context, v any)
- func (s *AgentSelect) String(ctx context.Context) (_ string, err error)
- func (s *AgentSelect) StringX(ctx context.Context) string
- func (s *AgentSelect) Strings(ctx context.Context) ([]string, error)
- func (s *AgentSelect) StringsX(ctx context.Context) []string
- type AgentUpdate
- func (au *AgentUpdate) Exec(ctx context.Context) error
- func (au *AgentUpdate) ExecX(ctx context.Context)
- func (au *AgentUpdate) Mutation() *AgentMutation
- func (au *AgentUpdate) Save(ctx context.Context) (int, error)
- func (au *AgentUpdate) SaveX(ctx context.Context) int
- func (au *AgentUpdate) SetName(s string) *AgentUpdate
- func (au *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate
- type AgentUpdateOne
- func (auo *AgentUpdateOne) Exec(ctx context.Context) error
- func (auo *AgentUpdateOne) ExecX(ctx context.Context)
- func (auo *AgentUpdateOne) Mutation() *AgentMutation
- func (auo *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
- func (auo *AgentUpdateOne) SaveX(ctx context.Context) *Agent
- func (auo *AgentUpdateOne) Select(field string, fields ...string) *AgentUpdateOne
- func (auo *AgentUpdateOne) SetName(s string) *AgentUpdateOne
- func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne
- type Agents
- 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 ComputeImage
- type ComputeImageClient
- func (c *ComputeImageClient) Create() *ComputeImageCreate
- func (c *ComputeImageClient) CreateBulk(builders ...*ComputeImageCreate) *ComputeImageCreateBulk
- func (c *ComputeImageClient) Delete() *ComputeImageDelete
- func (c *ComputeImageClient) DeleteOne(ci *ComputeImage) *ComputeImageDeleteOne
- func (c *ComputeImageClient) DeleteOneID(id int32) *ComputeImageDeleteOne
- func (c *ComputeImageClient) Get(ctx context.Context, id int32) (*ComputeImage, error)
- func (c *ComputeImageClient) GetX(ctx context.Context, id int32) *ComputeImage
- func (c *ComputeImageClient) Hooks() []Hook
- func (c *ComputeImageClient) Intercept(interceptors ...Interceptor)
- func (c *ComputeImageClient) Interceptors() []Interceptor
- func (c *ComputeImageClient) Query() *ComputeImageQuery
- func (c *ComputeImageClient) Update() *ComputeImageUpdate
- func (c *ComputeImageClient) UpdateOne(ci *ComputeImage) *ComputeImageUpdateOne
- func (c *ComputeImageClient) UpdateOneID(id int32) *ComputeImageUpdateOne
- func (c *ComputeImageClient) Use(hooks ...Hook)
- type ComputeImageCreate
- func (cic *ComputeImageCreate) Exec(ctx context.Context) error
- func (cic *ComputeImageCreate) ExecX(ctx context.Context)
- func (cic *ComputeImageCreate) Mutation() *ComputeImageMutation
- func (cic *ComputeImageCreate) Save(ctx context.Context) (*ComputeImage, error)
- func (cic *ComputeImageCreate) SaveX(ctx context.Context) *ComputeImage
- func (cic *ComputeImageCreate) SetID(i int32) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetImage(s string) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetName(s string) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetPort(i int32) *ComputeImageCreate
- func (cic *ComputeImageCreate) SetTag(s string) *ComputeImageCreate
- type ComputeImageCreateBulk
- type ComputeImageDelete
- type ComputeImageDeleteOne
- type ComputeImageGroupBy
- func (cigb *ComputeImageGroupBy) Aggregate(fns ...AggregateFunc) *ComputeImageGroupBy
- func (s *ComputeImageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeImageGroupBy) BoolX(ctx context.Context) bool
- func (s *ComputeImageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeImageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ComputeImageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeImageGroupBy) Float64X(ctx context.Context) float64
- func (s *ComputeImageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeImageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ComputeImageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeImageGroupBy) IntX(ctx context.Context) int
- func (s *ComputeImageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeImageGroupBy) IntsX(ctx context.Context) []int
- func (cigb *ComputeImageGroupBy) Scan(ctx context.Context, v any) error
- func (s *ComputeImageGroupBy) ScanX(ctx context.Context, v any)
- func (s *ComputeImageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ComputeImageGroupBy) StringX(ctx context.Context) string
- func (s *ComputeImageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeImageGroupBy) StringsX(ctx context.Context) []string
- type ComputeImageMutation
- func (m *ComputeImageMutation) AddField(name string, value ent.Value) error
- func (m *ComputeImageMutation) AddPort(i int32)
- func (m *ComputeImageMutation) AddedEdges() []string
- func (m *ComputeImageMutation) AddedField(name string) (ent.Value, bool)
- func (m *ComputeImageMutation) AddedFields() []string
- func (m *ComputeImageMutation) AddedIDs(name string) []ent.Value
- func (m *ComputeImageMutation) AddedPort() (r int32, exists bool)
- func (m *ComputeImageMutation) ClearEdge(name string) error
- func (m *ComputeImageMutation) ClearField(name string) error
- func (m *ComputeImageMutation) ClearedEdges() []string
- func (m *ComputeImageMutation) ClearedFields() []string
- func (m ComputeImageMutation) Client() *Client
- func (m *ComputeImageMutation) EdgeCleared(name string) bool
- func (m *ComputeImageMutation) Field(name string) (ent.Value, bool)
- func (m *ComputeImageMutation) FieldCleared(name string) bool
- func (m *ComputeImageMutation) Fields() []string
- func (m *ComputeImageMutation) ID() (id int32, exists bool)
- func (m *ComputeImageMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ComputeImageMutation) Image() (r string, exists bool)
- func (m *ComputeImageMutation) Name() (r string, exists bool)
- func (m *ComputeImageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeImageMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) OldPort(ctx context.Context) (v int32, err error)
- func (m *ComputeImageMutation) OldTag(ctx context.Context) (v string, err error)
- func (m *ComputeImageMutation) Op() Op
- func (m *ComputeImageMutation) Port() (r int32, exists bool)
- func (m *ComputeImageMutation) RemovedEdges() []string
- func (m *ComputeImageMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeImageMutation) ResetEdge(name string) error
- func (m *ComputeImageMutation) ResetField(name string) error
- func (m *ComputeImageMutation) ResetImage()
- func (m *ComputeImageMutation) ResetName()
- func (m *ComputeImageMutation) ResetPort()
- func (m *ComputeImageMutation) ResetTag()
- func (m *ComputeImageMutation) SetField(name string, value ent.Value) error
- func (m *ComputeImageMutation) SetID(id int32)
- func (m *ComputeImageMutation) SetImage(s string)
- func (m *ComputeImageMutation) SetName(s string)
- func (m *ComputeImageMutation) SetOp(op Op)
- func (m *ComputeImageMutation) SetPort(i int32)
- func (m *ComputeImageMutation) SetTag(s string)
- func (m *ComputeImageMutation) Tag() (r string, exists bool)
- func (m ComputeImageMutation) Tx() (*Tx, error)
- func (m *ComputeImageMutation) Type() string
- func (m *ComputeImageMutation) Where(ps ...predicate.ComputeImage)
- func (m *ComputeImageMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeImageQuery
- func (ciq *ComputeImageQuery) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
- func (ciq *ComputeImageQuery) All(ctx context.Context) ([]*ComputeImage, error)
- func (ciq *ComputeImageQuery) AllX(ctx context.Context) []*ComputeImage
- func (ciq *ComputeImageQuery) Clone() *ComputeImageQuery
- func (ciq *ComputeImageQuery) Count(ctx context.Context) (int, error)
- func (ciq *ComputeImageQuery) CountX(ctx context.Context) int
- func (ciq *ComputeImageQuery) Exist(ctx context.Context) (bool, error)
- func (ciq *ComputeImageQuery) ExistX(ctx context.Context) bool
- func (ciq *ComputeImageQuery) First(ctx context.Context) (*ComputeImage, error)
- func (ciq *ComputeImageQuery) FirstID(ctx context.Context) (id int32, err error)
- func (ciq *ComputeImageQuery) FirstIDX(ctx context.Context) int32
- func (ciq *ComputeImageQuery) FirstX(ctx context.Context) *ComputeImage
- func (ciq *ComputeImageQuery) GroupBy(field string, fields ...string) *ComputeImageGroupBy
- func (ciq *ComputeImageQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (ciq *ComputeImageQuery) IDsX(ctx context.Context) []int32
- func (ciq *ComputeImageQuery) Limit(limit int) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Offset(offset int) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Only(ctx context.Context) (*ComputeImage, error)
- func (ciq *ComputeImageQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (ciq *ComputeImageQuery) OnlyIDX(ctx context.Context) int32
- func (ciq *ComputeImageQuery) OnlyX(ctx context.Context) *ComputeImage
- func (ciq *ComputeImageQuery) Order(o ...computeimage.OrderOption) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Select(fields ...string) *ComputeImageSelect
- func (ciq *ComputeImageQuery) Unique(unique bool) *ComputeImageQuery
- func (ciq *ComputeImageQuery) Where(ps ...predicate.ComputeImage) *ComputeImageQuery
- type ComputeImageSelect
- func (cis *ComputeImageSelect) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
- func (s *ComputeImageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeImageSelect) BoolX(ctx context.Context) bool
- func (s *ComputeImageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeImageSelect) BoolsX(ctx context.Context) []bool
- func (s *ComputeImageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeImageSelect) Float64X(ctx context.Context) float64
- func (s *ComputeImageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeImageSelect) Float64sX(ctx context.Context) []float64
- func (s *ComputeImageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeImageSelect) IntX(ctx context.Context) int
- func (s *ComputeImageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeImageSelect) IntsX(ctx context.Context) []int
- func (cis *ComputeImageSelect) Scan(ctx context.Context, v any) error
- func (s *ComputeImageSelect) ScanX(ctx context.Context, v any)
- func (s *ComputeImageSelect) String(ctx context.Context) (_ string, err error)
- func (s *ComputeImageSelect) StringX(ctx context.Context) string
- func (s *ComputeImageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeImageSelect) StringsX(ctx context.Context) []string
- type ComputeImageUpdate
- func (ciu *ComputeImageUpdate) AddPort(i int32) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) Exec(ctx context.Context) error
- func (ciu *ComputeImageUpdate) ExecX(ctx context.Context)
- func (ciu *ComputeImageUpdate) Mutation() *ComputeImageMutation
- func (ciu *ComputeImageUpdate) Save(ctx context.Context) (int, error)
- func (ciu *ComputeImageUpdate) SaveX(ctx context.Context) int
- func (ciu *ComputeImageUpdate) SetImage(s string) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) SetName(s string) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) SetPort(i int32) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) SetTag(s string) *ComputeImageUpdate
- func (ciu *ComputeImageUpdate) Where(ps ...predicate.ComputeImage) *ComputeImageUpdate
- type ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) AddPort(i int32) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) Exec(ctx context.Context) error
- func (ciuo *ComputeImageUpdateOne) ExecX(ctx context.Context)
- func (ciuo *ComputeImageUpdateOne) Mutation() *ComputeImageMutation
- func (ciuo *ComputeImageUpdateOne) Save(ctx context.Context) (*ComputeImage, error)
- func (ciuo *ComputeImageUpdateOne) SaveX(ctx context.Context) *ComputeImage
- func (ciuo *ComputeImageUpdateOne) Select(field string, fields ...string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetImage(s string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetName(s string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetPort(i int32) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) SetTag(s string) *ComputeImageUpdateOne
- func (ciuo *ComputeImageUpdateOne) Where(ps ...predicate.ComputeImage) *ComputeImageUpdateOne
- type ComputeImages
- type ComputeInstance
- type ComputeInstanceClient
- func (c *ComputeInstanceClient) Create() *ComputeInstanceCreate
- func (c *ComputeInstanceClient) CreateBulk(builders ...*ComputeInstanceCreate) *ComputeInstanceCreateBulk
- func (c *ComputeInstanceClient) Delete() *ComputeInstanceDelete
- func (c *ComputeInstanceClient) DeleteOne(ci *ComputeInstance) *ComputeInstanceDeleteOne
- func (c *ComputeInstanceClient) DeleteOneID(id uuid.UUID) *ComputeInstanceDeleteOne
- func (c *ComputeInstanceClient) Get(ctx context.Context, id uuid.UUID) (*ComputeInstance, error)
- func (c *ComputeInstanceClient) GetX(ctx context.Context, id uuid.UUID) *ComputeInstance
- func (c *ComputeInstanceClient) Hooks() []Hook
- func (c *ComputeInstanceClient) Intercept(interceptors ...Interceptor)
- func (c *ComputeInstanceClient) Interceptors() []Interceptor
- func (c *ComputeInstanceClient) Query() *ComputeInstanceQuery
- func (c *ComputeInstanceClient) Update() *ComputeInstanceUpdate
- func (c *ComputeInstanceClient) UpdateOne(ci *ComputeInstance) *ComputeInstanceUpdateOne
- func (c *ComputeInstanceClient) UpdateOneID(id uuid.UUID) *ComputeInstanceUpdateOne
- func (c *ComputeInstanceClient) Use(hooks ...Hook)
- type ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) Exec(ctx context.Context) error
- func (cic *ComputeInstanceCreate) ExecX(ctx context.Context)
- func (cic *ComputeInstanceCreate) Mutation() *ComputeInstanceMutation
- func (cic *ComputeInstanceCreate) Save(ctx context.Context) (*ComputeInstance, error)
- func (cic *ComputeInstanceCreate) SaveX(ctx context.Context) *ComputeInstance
- func (cic *ComputeInstanceCreate) SetContainerID(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetCore(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetExpirationTime(t time.Time) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetID(u uuid.UUID) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetImage(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetMemory(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetName(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillableContainerID(s *string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillableID(u *uuid.UUID) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetNillablePeerID(s *string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetOwner(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetPeerID(s string) *ComputeInstanceCreate
- func (cic *ComputeInstanceCreate) SetStatus(i int8) *ComputeInstanceCreate
- type ComputeInstanceCreateBulk
- func (cicb *ComputeInstanceCreateBulk) Exec(ctx context.Context) error
- func (cicb *ComputeInstanceCreateBulk) ExecX(ctx context.Context)
- func (cicb *ComputeInstanceCreateBulk) Save(ctx context.Context) ([]*ComputeInstance, error)
- func (cicb *ComputeInstanceCreateBulk) SaveX(ctx context.Context) []*ComputeInstance
- type ComputeInstanceDelete
- type ComputeInstanceDeleteOne
- type ComputeInstanceGroupBy
- func (cigb *ComputeInstanceGroupBy) Aggregate(fns ...AggregateFunc) *ComputeInstanceGroupBy
- func (s *ComputeInstanceGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeInstanceGroupBy) BoolX(ctx context.Context) bool
- func (s *ComputeInstanceGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeInstanceGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ComputeInstanceGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeInstanceGroupBy) Float64X(ctx context.Context) float64
- func (s *ComputeInstanceGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeInstanceGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ComputeInstanceGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeInstanceGroupBy) IntX(ctx context.Context) int
- func (s *ComputeInstanceGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeInstanceGroupBy) IntsX(ctx context.Context) []int
- func (cigb *ComputeInstanceGroupBy) Scan(ctx context.Context, v any) error
- func (s *ComputeInstanceGroupBy) ScanX(ctx context.Context, v any)
- func (s *ComputeInstanceGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ComputeInstanceGroupBy) StringX(ctx context.Context) string
- func (s *ComputeInstanceGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeInstanceGroupBy) StringsX(ctx context.Context) []string
- type ComputeInstanceMutation
- func (m *ComputeInstanceMutation) AddField(name string, value ent.Value) error
- func (m *ComputeInstanceMutation) AddStatus(i int8)
- func (m *ComputeInstanceMutation) AddedEdges() []string
- func (m *ComputeInstanceMutation) AddedField(name string) (ent.Value, bool)
- func (m *ComputeInstanceMutation) AddedFields() []string
- func (m *ComputeInstanceMutation) AddedIDs(name string) []ent.Value
- func (m *ComputeInstanceMutation) AddedStatus() (r int8, exists bool)
- func (m *ComputeInstanceMutation) ClearContainerID()
- func (m *ComputeInstanceMutation) ClearEdge(name string) error
- func (m *ComputeInstanceMutation) ClearField(name string) error
- func (m *ComputeInstanceMutation) ClearPeerID()
- func (m *ComputeInstanceMutation) ClearedEdges() []string
- func (m *ComputeInstanceMutation) ClearedFields() []string
- func (m ComputeInstanceMutation) Client() *Client
- func (m *ComputeInstanceMutation) ContainerID() (r string, exists bool)
- func (m *ComputeInstanceMutation) ContainerIDCleared() bool
- func (m *ComputeInstanceMutation) Core() (r string, exists bool)
- func (m *ComputeInstanceMutation) EdgeCleared(name string) bool
- func (m *ComputeInstanceMutation) ExpirationTime() (r time.Time, exists bool)
- func (m *ComputeInstanceMutation) Field(name string) (ent.Value, bool)
- func (m *ComputeInstanceMutation) FieldCleared(name string) bool
- func (m *ComputeInstanceMutation) Fields() []string
- func (m *ComputeInstanceMutation) ID() (id uuid.UUID, exists bool)
- func (m *ComputeInstanceMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *ComputeInstanceMutation) Image() (r string, exists bool)
- func (m *ComputeInstanceMutation) Memory() (r string, exists bool)
- func (m *ComputeInstanceMutation) Name() (r string, exists bool)
- func (m *ComputeInstanceMutation) OldContainerID(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldCore(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldExpirationTime(ctx context.Context) (v time.Time, err error)
- func (m *ComputeInstanceMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeInstanceMutation) OldImage(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldMemory(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldName(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldOwner(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldPeerID(ctx context.Context) (v string, err error)
- func (m *ComputeInstanceMutation) OldStatus(ctx context.Context) (v int8, err error)
- func (m *ComputeInstanceMutation) Op() Op
- func (m *ComputeInstanceMutation) Owner() (r string, exists bool)
- func (m *ComputeInstanceMutation) PeerID() (r string, exists bool)
- func (m *ComputeInstanceMutation) PeerIDCleared() bool
- func (m *ComputeInstanceMutation) RemovedEdges() []string
- func (m *ComputeInstanceMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeInstanceMutation) ResetContainerID()
- func (m *ComputeInstanceMutation) ResetCore()
- func (m *ComputeInstanceMutation) ResetEdge(name string) error
- func (m *ComputeInstanceMutation) ResetExpirationTime()
- func (m *ComputeInstanceMutation) ResetField(name string) error
- func (m *ComputeInstanceMutation) ResetImage()
- func (m *ComputeInstanceMutation) ResetMemory()
- func (m *ComputeInstanceMutation) ResetName()
- func (m *ComputeInstanceMutation) ResetOwner()
- func (m *ComputeInstanceMutation) ResetPeerID()
- func (m *ComputeInstanceMutation) ResetStatus()
- func (m *ComputeInstanceMutation) SetContainerID(s string)
- func (m *ComputeInstanceMutation) SetCore(s string)
- func (m *ComputeInstanceMutation) SetExpirationTime(t time.Time)
- func (m *ComputeInstanceMutation) SetField(name string, value ent.Value) error
- func (m *ComputeInstanceMutation) SetID(id uuid.UUID)
- func (m *ComputeInstanceMutation) SetImage(s string)
- func (m *ComputeInstanceMutation) SetMemory(s string)
- func (m *ComputeInstanceMutation) SetName(s string)
- func (m *ComputeInstanceMutation) SetOp(op Op)
- func (m *ComputeInstanceMutation) SetOwner(s string)
- func (m *ComputeInstanceMutation) SetPeerID(s string)
- func (m *ComputeInstanceMutation) SetStatus(i int8)
- func (m *ComputeInstanceMutation) Status() (r int8, exists bool)
- func (m ComputeInstanceMutation) Tx() (*Tx, error)
- func (m *ComputeInstanceMutation) Type() string
- func (m *ComputeInstanceMutation) Where(ps ...predicate.ComputeInstance)
- func (m *ComputeInstanceMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
- func (ciq *ComputeInstanceQuery) All(ctx context.Context) ([]*ComputeInstance, error)
- func (ciq *ComputeInstanceQuery) AllX(ctx context.Context) []*ComputeInstance
- func (ciq *ComputeInstanceQuery) Clone() *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Count(ctx context.Context) (int, error)
- func (ciq *ComputeInstanceQuery) CountX(ctx context.Context) int
- func (ciq *ComputeInstanceQuery) Exist(ctx context.Context) (bool, error)
- func (ciq *ComputeInstanceQuery) ExistX(ctx context.Context) bool
- func (ciq *ComputeInstanceQuery) First(ctx context.Context) (*ComputeInstance, error)
- func (ciq *ComputeInstanceQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (ciq *ComputeInstanceQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (ciq *ComputeInstanceQuery) FirstX(ctx context.Context) *ComputeInstance
- func (ciq *ComputeInstanceQuery) GroupBy(field string, fields ...string) *ComputeInstanceGroupBy
- func (ciq *ComputeInstanceQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (ciq *ComputeInstanceQuery) IDsX(ctx context.Context) []uuid.UUID
- func (ciq *ComputeInstanceQuery) Limit(limit int) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Offset(offset int) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Only(ctx context.Context) (*ComputeInstance, error)
- func (ciq *ComputeInstanceQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (ciq *ComputeInstanceQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (ciq *ComputeInstanceQuery) OnlyX(ctx context.Context) *ComputeInstance
- func (ciq *ComputeInstanceQuery) Order(o ...computeinstance.OrderOption) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Select(fields ...string) *ComputeInstanceSelect
- func (ciq *ComputeInstanceQuery) Unique(unique bool) *ComputeInstanceQuery
- func (ciq *ComputeInstanceQuery) Where(ps ...predicate.ComputeInstance) *ComputeInstanceQuery
- type ComputeInstanceSelect
- func (cis *ComputeInstanceSelect) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
- func (s *ComputeInstanceSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeInstanceSelect) BoolX(ctx context.Context) bool
- func (s *ComputeInstanceSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeInstanceSelect) BoolsX(ctx context.Context) []bool
- func (s *ComputeInstanceSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeInstanceSelect) Float64X(ctx context.Context) float64
- func (s *ComputeInstanceSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeInstanceSelect) Float64sX(ctx context.Context) []float64
- func (s *ComputeInstanceSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeInstanceSelect) IntX(ctx context.Context) int
- func (s *ComputeInstanceSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeInstanceSelect) IntsX(ctx context.Context) []int
- func (cis *ComputeInstanceSelect) Scan(ctx context.Context, v any) error
- func (s *ComputeInstanceSelect) ScanX(ctx context.Context, v any)
- func (s *ComputeInstanceSelect) String(ctx context.Context) (_ string, err error)
- func (s *ComputeInstanceSelect) StringX(ctx context.Context) string
- func (s *ComputeInstanceSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeInstanceSelect) StringsX(ctx context.Context) []string
- type ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) AddStatus(i int8) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) ClearContainerID() *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) ClearPeerID() *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) Exec(ctx context.Context) error
- func (ciu *ComputeInstanceUpdate) ExecX(ctx context.Context)
- func (ciu *ComputeInstanceUpdate) Mutation() *ComputeInstanceMutation
- func (ciu *ComputeInstanceUpdate) Save(ctx context.Context) (int, error)
- func (ciu *ComputeInstanceUpdate) SaveX(ctx context.Context) int
- func (ciu *ComputeInstanceUpdate) SetContainerID(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetCore(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetExpirationTime(t time.Time) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetImage(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetMemory(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetName(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetNillableContainerID(s *string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetNillablePeerID(s *string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetOwner(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetPeerID(s string) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) SetStatus(i int8) *ComputeInstanceUpdate
- func (ciu *ComputeInstanceUpdate) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdate
- type ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) AddStatus(i int8) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) ClearContainerID() *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) ClearPeerID() *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) Exec(ctx context.Context) error
- func (ciuo *ComputeInstanceUpdateOne) ExecX(ctx context.Context)
- func (ciuo *ComputeInstanceUpdateOne) Mutation() *ComputeInstanceMutation
- func (ciuo *ComputeInstanceUpdateOne) Save(ctx context.Context) (*ComputeInstance, error)
- func (ciuo *ComputeInstanceUpdateOne) SaveX(ctx context.Context) *ComputeInstance
- func (ciuo *ComputeInstanceUpdateOne) Select(field string, fields ...string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetContainerID(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetCore(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetExpirationTime(t time.Time) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetImage(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetMemory(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetName(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetNillableContainerID(s *string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetNillablePeerID(s *string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetOwner(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetPeerID(s string) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) SetStatus(i int8) *ComputeInstanceUpdateOne
- func (ciuo *ComputeInstanceUpdateOne) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdateOne
- type ComputeInstances
- type ComputeSpec
- type ComputeSpecClient
- func (c *ComputeSpecClient) Create() *ComputeSpecCreate
- func (c *ComputeSpecClient) CreateBulk(builders ...*ComputeSpecCreate) *ComputeSpecCreateBulk
- func (c *ComputeSpecClient) Delete() *ComputeSpecDelete
- func (c *ComputeSpecClient) DeleteOne(cs *ComputeSpec) *ComputeSpecDeleteOne
- func (c *ComputeSpecClient) DeleteOneID(id int32) *ComputeSpecDeleteOne
- func (c *ComputeSpecClient) Get(ctx context.Context, id int32) (*ComputeSpec, error)
- func (c *ComputeSpecClient) GetX(ctx context.Context, id int32) *ComputeSpec
- func (c *ComputeSpecClient) Hooks() []Hook
- func (c *ComputeSpecClient) Intercept(interceptors ...Interceptor)
- func (c *ComputeSpecClient) Interceptors() []Interceptor
- func (c *ComputeSpecClient) Query() *ComputeSpecQuery
- func (c *ComputeSpecClient) Update() *ComputeSpecUpdate
- func (c *ComputeSpecClient) UpdateOne(cs *ComputeSpec) *ComputeSpecUpdateOne
- func (c *ComputeSpecClient) UpdateOneID(id int32) *ComputeSpecUpdateOne
- func (c *ComputeSpecClient) Use(hooks ...Hook)
- type ComputeSpecCreate
- func (csc *ComputeSpecCreate) Exec(ctx context.Context) error
- func (csc *ComputeSpecCreate) ExecX(ctx context.Context)
- func (csc *ComputeSpecCreate) Mutation() *ComputeSpecMutation
- func (csc *ComputeSpecCreate) Save(ctx context.Context) (*ComputeSpec, error)
- func (csc *ComputeSpecCreate) SaveX(ctx context.Context) *ComputeSpec
- func (csc *ComputeSpecCreate) SetCore(s string) *ComputeSpecCreate
- func (csc *ComputeSpecCreate) SetID(i int32) *ComputeSpecCreate
- func (csc *ComputeSpecCreate) SetMemory(s string) *ComputeSpecCreate
- type ComputeSpecCreateBulk
- type ComputeSpecDelete
- type ComputeSpecDeleteOne
- type ComputeSpecGroupBy
- func (csgb *ComputeSpecGroupBy) Aggregate(fns ...AggregateFunc) *ComputeSpecGroupBy
- func (s *ComputeSpecGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeSpecGroupBy) BoolX(ctx context.Context) bool
- func (s *ComputeSpecGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeSpecGroupBy) BoolsX(ctx context.Context) []bool
- func (s *ComputeSpecGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeSpecGroupBy) Float64X(ctx context.Context) float64
- func (s *ComputeSpecGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeSpecGroupBy) Float64sX(ctx context.Context) []float64
- func (s *ComputeSpecGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeSpecGroupBy) IntX(ctx context.Context) int
- func (s *ComputeSpecGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeSpecGroupBy) IntsX(ctx context.Context) []int
- func (csgb *ComputeSpecGroupBy) Scan(ctx context.Context, v any) error
- func (s *ComputeSpecGroupBy) ScanX(ctx context.Context, v any)
- func (s *ComputeSpecGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *ComputeSpecGroupBy) StringX(ctx context.Context) string
- func (s *ComputeSpecGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeSpecGroupBy) StringsX(ctx context.Context) []string
- type ComputeSpecMutation
- func (m *ComputeSpecMutation) AddField(name string, value ent.Value) error
- func (m *ComputeSpecMutation) AddedEdges() []string
- func (m *ComputeSpecMutation) AddedField(name string) (ent.Value, bool)
- func (m *ComputeSpecMutation) AddedFields() []string
- func (m *ComputeSpecMutation) AddedIDs(name string) []ent.Value
- func (m *ComputeSpecMutation) ClearEdge(name string) error
- func (m *ComputeSpecMutation) ClearField(name string) error
- func (m *ComputeSpecMutation) ClearedEdges() []string
- func (m *ComputeSpecMutation) ClearedFields() []string
- func (m ComputeSpecMutation) Client() *Client
- func (m *ComputeSpecMutation) Core() (r string, exists bool)
- func (m *ComputeSpecMutation) EdgeCleared(name string) bool
- func (m *ComputeSpecMutation) Field(name string) (ent.Value, bool)
- func (m *ComputeSpecMutation) FieldCleared(name string) bool
- func (m *ComputeSpecMutation) Fields() []string
- func (m *ComputeSpecMutation) ID() (id int32, exists bool)
- func (m *ComputeSpecMutation) IDs(ctx context.Context) ([]int32, error)
- func (m *ComputeSpecMutation) Memory() (r string, exists bool)
- func (m *ComputeSpecMutation) OldCore(ctx context.Context) (v string, err error)
- func (m *ComputeSpecMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *ComputeSpecMutation) OldMemory(ctx context.Context) (v string, err error)
- func (m *ComputeSpecMutation) Op() Op
- func (m *ComputeSpecMutation) RemovedEdges() []string
- func (m *ComputeSpecMutation) RemovedIDs(name string) []ent.Value
- func (m *ComputeSpecMutation) ResetCore()
- func (m *ComputeSpecMutation) ResetEdge(name string) error
- func (m *ComputeSpecMutation) ResetField(name string) error
- func (m *ComputeSpecMutation) ResetMemory()
- func (m *ComputeSpecMutation) SetCore(s string)
- func (m *ComputeSpecMutation) SetField(name string, value ent.Value) error
- func (m *ComputeSpecMutation) SetID(id int32)
- func (m *ComputeSpecMutation) SetMemory(s string)
- func (m *ComputeSpecMutation) SetOp(op Op)
- func (m ComputeSpecMutation) Tx() (*Tx, error)
- func (m *ComputeSpecMutation) Type() string
- func (m *ComputeSpecMutation) Where(ps ...predicate.ComputeSpec)
- func (m *ComputeSpecMutation) WhereP(ps ...func(*sql.Selector))
- type ComputeSpecQuery
- func (csq *ComputeSpecQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
- func (csq *ComputeSpecQuery) All(ctx context.Context) ([]*ComputeSpec, error)
- func (csq *ComputeSpecQuery) AllX(ctx context.Context) []*ComputeSpec
- func (csq *ComputeSpecQuery) Clone() *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Count(ctx context.Context) (int, error)
- func (csq *ComputeSpecQuery) CountX(ctx context.Context) int
- func (csq *ComputeSpecQuery) Exist(ctx context.Context) (bool, error)
- func (csq *ComputeSpecQuery) ExistX(ctx context.Context) bool
- func (csq *ComputeSpecQuery) First(ctx context.Context) (*ComputeSpec, error)
- func (csq *ComputeSpecQuery) FirstID(ctx context.Context) (id int32, err error)
- func (csq *ComputeSpecQuery) FirstIDX(ctx context.Context) int32
- func (csq *ComputeSpecQuery) FirstX(ctx context.Context) *ComputeSpec
- func (csq *ComputeSpecQuery) GroupBy(field string, fields ...string) *ComputeSpecGroupBy
- func (csq *ComputeSpecQuery) IDs(ctx context.Context) (ids []int32, err error)
- func (csq *ComputeSpecQuery) IDsX(ctx context.Context) []int32
- func (csq *ComputeSpecQuery) Limit(limit int) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Offset(offset int) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Only(ctx context.Context) (*ComputeSpec, error)
- func (csq *ComputeSpecQuery) OnlyID(ctx context.Context) (id int32, err error)
- func (csq *ComputeSpecQuery) OnlyIDX(ctx context.Context) int32
- func (csq *ComputeSpecQuery) OnlyX(ctx context.Context) *ComputeSpec
- func (csq *ComputeSpecQuery) Order(o ...computespec.OrderOption) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Select(fields ...string) *ComputeSpecSelect
- func (csq *ComputeSpecQuery) Unique(unique bool) *ComputeSpecQuery
- func (csq *ComputeSpecQuery) Where(ps ...predicate.ComputeSpec) *ComputeSpecQuery
- type ComputeSpecSelect
- func (css *ComputeSpecSelect) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
- func (s *ComputeSpecSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *ComputeSpecSelect) BoolX(ctx context.Context) bool
- func (s *ComputeSpecSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *ComputeSpecSelect) BoolsX(ctx context.Context) []bool
- func (s *ComputeSpecSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *ComputeSpecSelect) Float64X(ctx context.Context) float64
- func (s *ComputeSpecSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *ComputeSpecSelect) Float64sX(ctx context.Context) []float64
- func (s *ComputeSpecSelect) Int(ctx context.Context) (_ int, err error)
- func (s *ComputeSpecSelect) IntX(ctx context.Context) int
- func (s *ComputeSpecSelect) Ints(ctx context.Context) ([]int, error)
- func (s *ComputeSpecSelect) IntsX(ctx context.Context) []int
- func (css *ComputeSpecSelect) Scan(ctx context.Context, v any) error
- func (s *ComputeSpecSelect) ScanX(ctx context.Context, v any)
- func (s *ComputeSpecSelect) String(ctx context.Context) (_ string, err error)
- func (s *ComputeSpecSelect) StringX(ctx context.Context) string
- func (s *ComputeSpecSelect) Strings(ctx context.Context) ([]string, error)
- func (s *ComputeSpecSelect) StringsX(ctx context.Context) []string
- type ComputeSpecUpdate
- func (csu *ComputeSpecUpdate) Exec(ctx context.Context) error
- func (csu *ComputeSpecUpdate) ExecX(ctx context.Context)
- func (csu *ComputeSpecUpdate) Mutation() *ComputeSpecMutation
- func (csu *ComputeSpecUpdate) Save(ctx context.Context) (int, error)
- func (csu *ComputeSpecUpdate) SaveX(ctx context.Context) int
- func (csu *ComputeSpecUpdate) SetCore(s string) *ComputeSpecUpdate
- func (csu *ComputeSpecUpdate) SetMemory(s string) *ComputeSpecUpdate
- func (csu *ComputeSpecUpdate) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdate
- type ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) Exec(ctx context.Context) error
- func (csuo *ComputeSpecUpdateOne) ExecX(ctx context.Context)
- func (csuo *ComputeSpecUpdateOne) Mutation() *ComputeSpecMutation
- func (csuo *ComputeSpecUpdateOne) Save(ctx context.Context) (*ComputeSpec, error)
- func (csuo *ComputeSpecUpdateOne) SaveX(ctx context.Context) *ComputeSpec
- func (csuo *ComputeSpecUpdateOne) Select(field string, fields ...string) *ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) SetCore(s string) *ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) SetMemory(s string) *ComputeSpecUpdateOne
- func (csuo *ComputeSpecUpdateOne) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdateOne
- type ComputeSpecs
- type ConstraintError
- type Employee
- type EmployeeClient
- func (c *EmployeeClient) Create() *EmployeeCreate
- func (c *EmployeeClient) CreateBulk(builders ...*EmployeeCreate) *EmployeeCreateBulk
- func (c *EmployeeClient) Delete() *EmployeeDelete
- func (c *EmployeeClient) DeleteOne(e *Employee) *EmployeeDeleteOne
- func (c *EmployeeClient) DeleteOneID(id int) *EmployeeDeleteOne
- func (c *EmployeeClient) Get(ctx context.Context, id int) (*Employee, error)
- func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee
- func (c *EmployeeClient) Hooks() []Hook
- func (c *EmployeeClient) Intercept(interceptors ...Interceptor)
- func (c *EmployeeClient) Interceptors() []Interceptor
- func (c *EmployeeClient) Query() *EmployeeQuery
- func (c *EmployeeClient) Update() *EmployeeUpdate
- func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne
- func (c *EmployeeClient) UpdateOneID(id int) *EmployeeUpdateOne
- func (c *EmployeeClient) Use(hooks ...Hook)
- type EmployeeCreate
- func (ec *EmployeeCreate) Exec(ctx context.Context) error
- func (ec *EmployeeCreate) ExecX(ctx context.Context)
- func (ec *EmployeeCreate) Mutation() *EmployeeMutation
- func (ec *EmployeeCreate) Save(ctx context.Context) (*Employee, error)
- func (ec *EmployeeCreate) SaveX(ctx context.Context) *Employee
- func (ec *EmployeeCreate) SetAge(i int32) *EmployeeCreate
- func (ec *EmployeeCreate) SetName(s string) *EmployeeCreate
- func (ec *EmployeeCreate) SetNillableAge(i *int32) *EmployeeCreate
- type EmployeeCreateBulk
- type EmployeeDelete
- type EmployeeDeleteOne
- type EmployeeGroupBy
- func (egb *EmployeeGroupBy) Aggregate(fns ...AggregateFunc) *EmployeeGroupBy
- func (s *EmployeeGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmployeeGroupBy) BoolX(ctx context.Context) bool
- func (s *EmployeeGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *EmployeeGroupBy) BoolsX(ctx context.Context) []bool
- func (s *EmployeeGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmployeeGroupBy) Float64X(ctx context.Context) float64
- func (s *EmployeeGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmployeeGroupBy) Float64sX(ctx context.Context) []float64
- func (s *EmployeeGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *EmployeeGroupBy) IntX(ctx context.Context) int
- func (s *EmployeeGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *EmployeeGroupBy) IntsX(ctx context.Context) []int
- func (egb *EmployeeGroupBy) Scan(ctx context.Context, v any) error
- func (s *EmployeeGroupBy) ScanX(ctx context.Context, v any)
- func (s *EmployeeGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *EmployeeGroupBy) StringX(ctx context.Context) string
- func (s *EmployeeGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *EmployeeGroupBy) StringsX(ctx context.Context) []string
- type EmployeeMutation
- func (m *EmployeeMutation) AddAge(i int32)
- func (m *EmployeeMutation) AddField(name string, value ent.Value) error
- func (m *EmployeeMutation) AddedAge() (r int32, exists bool)
- func (m *EmployeeMutation) AddedEdges() []string
- func (m *EmployeeMutation) AddedField(name string) (ent.Value, bool)
- func (m *EmployeeMutation) AddedFields() []string
- func (m *EmployeeMutation) AddedIDs(name string) []ent.Value
- func (m *EmployeeMutation) Age() (r int32, exists bool)
- func (m *EmployeeMutation) AgeCleared() bool
- func (m *EmployeeMutation) ClearAge()
- func (m *EmployeeMutation) ClearEdge(name string) error
- func (m *EmployeeMutation) ClearField(name string) error
- func (m *EmployeeMutation) ClearedEdges() []string
- func (m *EmployeeMutation) ClearedFields() []string
- func (m EmployeeMutation) Client() *Client
- func (m *EmployeeMutation) EdgeCleared(name string) bool
- func (m *EmployeeMutation) Field(name string) (ent.Value, bool)
- func (m *EmployeeMutation) FieldCleared(name string) bool
- func (m *EmployeeMutation) Fields() []string
- func (m *EmployeeMutation) ID() (id int, exists bool)
- func (m *EmployeeMutation) IDs(ctx context.Context) ([]int, error)
- func (m *EmployeeMutation) Name() (r string, exists bool)
- func (m *EmployeeMutation) OldAge(ctx context.Context) (v int32, err error)
- func (m *EmployeeMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *EmployeeMutation) OldName(ctx context.Context) (v string, err error)
- func (m *EmployeeMutation) Op() Op
- func (m *EmployeeMutation) RemovedEdges() []string
- func (m *EmployeeMutation) RemovedIDs(name string) []ent.Value
- func (m *EmployeeMutation) ResetAge()
- func (m *EmployeeMutation) ResetEdge(name string) error
- func (m *EmployeeMutation) ResetField(name string) error
- func (m *EmployeeMutation) ResetName()
- func (m *EmployeeMutation) SetAge(i int32)
- func (m *EmployeeMutation) SetField(name string, value ent.Value) error
- func (m *EmployeeMutation) SetName(s string)
- func (m *EmployeeMutation) SetOp(op Op)
- func (m EmployeeMutation) Tx() (*Tx, error)
- func (m *EmployeeMutation) Type() string
- func (m *EmployeeMutation) Where(ps ...predicate.Employee)
- func (m *EmployeeMutation) WhereP(ps ...func(*sql.Selector))
- type EmployeeQuery
- func (eq *EmployeeQuery) Aggregate(fns ...AggregateFunc) *EmployeeSelect
- func (eq *EmployeeQuery) All(ctx context.Context) ([]*Employee, error)
- func (eq *EmployeeQuery) AllX(ctx context.Context) []*Employee
- func (eq *EmployeeQuery) Clone() *EmployeeQuery
- func (eq *EmployeeQuery) Count(ctx context.Context) (int, error)
- func (eq *EmployeeQuery) CountX(ctx context.Context) int
- func (eq *EmployeeQuery) Exist(ctx context.Context) (bool, error)
- func (eq *EmployeeQuery) ExistX(ctx context.Context) bool
- func (eq *EmployeeQuery) First(ctx context.Context) (*Employee, error)
- func (eq *EmployeeQuery) FirstID(ctx context.Context) (id int, err error)
- func (eq *EmployeeQuery) FirstIDX(ctx context.Context) int
- func (eq *EmployeeQuery) FirstX(ctx context.Context) *Employee
- func (eq *EmployeeQuery) GroupBy(field string, fields ...string) *EmployeeGroupBy
- func (eq *EmployeeQuery) IDs(ctx context.Context) (ids []int, err error)
- func (eq *EmployeeQuery) IDsX(ctx context.Context) []int
- func (eq *EmployeeQuery) Limit(limit int) *EmployeeQuery
- func (eq *EmployeeQuery) Offset(offset int) *EmployeeQuery
- func (eq *EmployeeQuery) Only(ctx context.Context) (*Employee, error)
- func (eq *EmployeeQuery) OnlyID(ctx context.Context) (id int, err error)
- func (eq *EmployeeQuery) OnlyIDX(ctx context.Context) int
- func (eq *EmployeeQuery) OnlyX(ctx context.Context) *Employee
- func (eq *EmployeeQuery) Order(o ...employee.OrderOption) *EmployeeQuery
- func (eq *EmployeeQuery) Select(fields ...string) *EmployeeSelect
- func (eq *EmployeeQuery) Unique(unique bool) *EmployeeQuery
- func (eq *EmployeeQuery) Where(ps ...predicate.Employee) *EmployeeQuery
- type EmployeeSelect
- func (es *EmployeeSelect) Aggregate(fns ...AggregateFunc) *EmployeeSelect
- func (s *EmployeeSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *EmployeeSelect) BoolX(ctx context.Context) bool
- func (s *EmployeeSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *EmployeeSelect) BoolsX(ctx context.Context) []bool
- func (s *EmployeeSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *EmployeeSelect) Float64X(ctx context.Context) float64
- func (s *EmployeeSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *EmployeeSelect) Float64sX(ctx context.Context) []float64
- func (s *EmployeeSelect) Int(ctx context.Context) (_ int, err error)
- func (s *EmployeeSelect) IntX(ctx context.Context) int
- func (s *EmployeeSelect) Ints(ctx context.Context) ([]int, error)
- func (s *EmployeeSelect) IntsX(ctx context.Context) []int
- func (es *EmployeeSelect) Scan(ctx context.Context, v any) error
- func (s *EmployeeSelect) ScanX(ctx context.Context, v any)
- func (s *EmployeeSelect) String(ctx context.Context) (_ string, err error)
- func (s *EmployeeSelect) StringX(ctx context.Context) string
- func (s *EmployeeSelect) Strings(ctx context.Context) ([]string, error)
- func (s *EmployeeSelect) StringsX(ctx context.Context) []string
- type EmployeeUpdate
- func (eu *EmployeeUpdate) AddAge(i int32) *EmployeeUpdate
- func (eu *EmployeeUpdate) ClearAge() *EmployeeUpdate
- func (eu *EmployeeUpdate) Exec(ctx context.Context) error
- func (eu *EmployeeUpdate) ExecX(ctx context.Context)
- func (eu *EmployeeUpdate) Mutation() *EmployeeMutation
- func (eu *EmployeeUpdate) Save(ctx context.Context) (int, error)
- func (eu *EmployeeUpdate) SaveX(ctx context.Context) int
- func (eu *EmployeeUpdate) SetAge(i int32) *EmployeeUpdate
- func (eu *EmployeeUpdate) SetName(s string) *EmployeeUpdate
- func (eu *EmployeeUpdate) SetNillableAge(i *int32) *EmployeeUpdate
- func (eu *EmployeeUpdate) Where(ps ...predicate.Employee) *EmployeeUpdate
- type EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) AddAge(i int32) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) ClearAge() *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) Exec(ctx context.Context) error
- func (euo *EmployeeUpdateOne) ExecX(ctx context.Context)
- func (euo *EmployeeUpdateOne) Mutation() *EmployeeMutation
- func (euo *EmployeeUpdateOne) Save(ctx context.Context) (*Employee, error)
- func (euo *EmployeeUpdateOne) SaveX(ctx context.Context) *Employee
- func (euo *EmployeeUpdateOne) Select(field string, fields ...string) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) SetAge(i int32) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) SetName(s string) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) SetNillableAge(i *int32) *EmployeeUpdateOne
- func (euo *EmployeeUpdateOne) Where(ps ...predicate.Employee) *EmployeeUpdateOne
- type Employees
- type Hook
- type InterceptFunc
- type Interceptor
- type MutateFunc
- type Mutation
- type Mutator
- type NotFoundError
- type NotLoadedError
- type NotSingularError
- type Op
- type Option
- type OrderFunc
- type Policy
- type Querier
- type QuerierFunc
- type Query
- type QueryContext
- type RollbackFunc
- type RollbackHook
- type Rollbacker
- type Storage
- type StorageClient
- func (c *StorageClient) Create() *StorageCreate
- func (c *StorageClient) CreateBulk(builders ...*StorageCreate) *StorageCreateBulk
- func (c *StorageClient) Delete() *StorageDelete
- func (c *StorageClient) DeleteOne(s *Storage) *StorageDeleteOne
- func (c *StorageClient) DeleteOneID(id uuid.UUID) *StorageDeleteOne
- func (c *StorageClient) Get(ctx context.Context, id uuid.UUID) (*Storage, error)
- func (c *StorageClient) GetX(ctx context.Context, id uuid.UUID) *Storage
- func (c *StorageClient) Hooks() []Hook
- func (c *StorageClient) Intercept(interceptors ...Interceptor)
- func (c *StorageClient) Interceptors() []Interceptor
- func (c *StorageClient) Query() *StorageQuery
- func (c *StorageClient) Update() *StorageUpdate
- func (c *StorageClient) UpdateOne(s *Storage) *StorageUpdateOne
- func (c *StorageClient) UpdateOneID(id uuid.UUID) *StorageUpdateOne
- func (c *StorageClient) Use(hooks ...Hook)
- type StorageCreate
- func (sc *StorageCreate) Exec(ctx context.Context) error
- func (sc *StorageCreate) ExecX(ctx context.Context)
- func (sc *StorageCreate) Mutation() *StorageMutation
- func (sc *StorageCreate) Save(ctx context.Context) (*Storage, error)
- func (sc *StorageCreate) SaveX(ctx context.Context) *Storage
- func (sc *StorageCreate) SetCid(s string) *StorageCreate
- func (sc *StorageCreate) SetID(u uuid.UUID) *StorageCreate
- func (sc *StorageCreate) SetLastModify(t time.Time) *StorageCreate
- func (sc *StorageCreate) SetName(s string) *StorageCreate
- func (sc *StorageCreate) SetNillableID(u *uuid.UUID) *StorageCreate
- func (sc *StorageCreate) SetNillableLastModify(t *time.Time) *StorageCreate
- func (sc *StorageCreate) SetNillableType(i *int32) *StorageCreate
- func (sc *StorageCreate) SetOwner(s string) *StorageCreate
- func (sc *StorageCreate) SetParentID(s string) *StorageCreate
- func (sc *StorageCreate) SetSize(i int32) *StorageCreate
- func (sc *StorageCreate) SetType(i int32) *StorageCreate
- type StorageCreateBulk
- type StorageDelete
- type StorageDeleteOne
- type StorageGroupBy
- func (sgb *StorageGroupBy) Aggregate(fns ...AggregateFunc) *StorageGroupBy
- func (s *StorageGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageGroupBy) BoolX(ctx context.Context) bool
- func (s *StorageGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageGroupBy) BoolsX(ctx context.Context) []bool
- func (s *StorageGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageGroupBy) Float64X(ctx context.Context) float64
- func (s *StorageGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageGroupBy) Float64sX(ctx context.Context) []float64
- func (s *StorageGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *StorageGroupBy) IntX(ctx context.Context) int
- func (s *StorageGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *StorageGroupBy) IntsX(ctx context.Context) []int
- func (sgb *StorageGroupBy) Scan(ctx context.Context, v any) error
- func (s *StorageGroupBy) ScanX(ctx context.Context, v any)
- func (s *StorageGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *StorageGroupBy) StringX(ctx context.Context) string
- func (s *StorageGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *StorageGroupBy) StringsX(ctx context.Context) []string
- type StorageMutation
- func (m *StorageMutation) AddField(name string, value ent.Value) error
- func (m *StorageMutation) AddSize(i int32)
- func (m *StorageMutation) AddType(i int32)
- func (m *StorageMutation) AddedEdges() []string
- func (m *StorageMutation) AddedField(name string) (ent.Value, bool)
- func (m *StorageMutation) AddedFields() []string
- func (m *StorageMutation) AddedIDs(name string) []ent.Value
- func (m *StorageMutation) AddedSize() (r int32, exists bool)
- func (m *StorageMutation) AddedType() (r int32, exists bool)
- func (m *StorageMutation) Cid() (r string, exists bool)
- func (m *StorageMutation) ClearEdge(name string) error
- func (m *StorageMutation) ClearField(name string) error
- func (m *StorageMutation) ClearedEdges() []string
- func (m *StorageMutation) ClearedFields() []string
- func (m StorageMutation) Client() *Client
- func (m *StorageMutation) EdgeCleared(name string) bool
- func (m *StorageMutation) Field(name string) (ent.Value, bool)
- func (m *StorageMutation) FieldCleared(name string) bool
- func (m *StorageMutation) Fields() []string
- func (m *StorageMutation) GetType() (r int32, exists bool)
- func (m *StorageMutation) ID() (id uuid.UUID, exists bool)
- func (m *StorageMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *StorageMutation) LastModify() (r time.Time, exists bool)
- func (m *StorageMutation) Name() (r string, exists bool)
- func (m *StorageMutation) OldCid(ctx context.Context) (v *string, err error)
- func (m *StorageMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *StorageMutation) OldLastModify(ctx context.Context) (v time.Time, err error)
- func (m *StorageMutation) OldName(ctx context.Context) (v string, err error)
- func (m *StorageMutation) OldOwner(ctx context.Context) (v string, err error)
- func (m *StorageMutation) OldParentID(ctx context.Context) (v string, err error)
- func (m *StorageMutation) OldSize(ctx context.Context) (v int32, err error)
- func (m *StorageMutation) OldType(ctx context.Context) (v int32, err error)
- func (m *StorageMutation) Op() Op
- func (m *StorageMutation) Owner() (r string, exists bool)
- func (m *StorageMutation) ParentID() (r string, exists bool)
- func (m *StorageMutation) RemovedEdges() []string
- func (m *StorageMutation) RemovedIDs(name string) []ent.Value
- func (m *StorageMutation) ResetCid()
- func (m *StorageMutation) ResetEdge(name string) error
- func (m *StorageMutation) ResetField(name string) error
- func (m *StorageMutation) ResetLastModify()
- func (m *StorageMutation) ResetName()
- func (m *StorageMutation) ResetOwner()
- func (m *StorageMutation) ResetParentID()
- func (m *StorageMutation) ResetSize()
- func (m *StorageMutation) ResetType()
- func (m *StorageMutation) SetCid(s string)
- func (m *StorageMutation) SetField(name string, value ent.Value) error
- func (m *StorageMutation) SetID(id uuid.UUID)
- func (m *StorageMutation) SetLastModify(t time.Time)
- func (m *StorageMutation) SetName(s string)
- func (m *StorageMutation) SetOp(op Op)
- func (m *StorageMutation) SetOwner(s string)
- func (m *StorageMutation) SetParentID(s string)
- func (m *StorageMutation) SetSize(i int32)
- func (m *StorageMutation) SetType(i int32)
- func (m *StorageMutation) Size() (r int32, exists bool)
- func (m StorageMutation) Tx() (*Tx, error)
- func (m *StorageMutation) Type() string
- func (m *StorageMutation) Where(ps ...predicate.Storage)
- func (m *StorageMutation) WhereP(ps ...func(*sql.Selector))
- type StorageQuery
- func (sq *StorageQuery) Aggregate(fns ...AggregateFunc) *StorageSelect
- func (sq *StorageQuery) All(ctx context.Context) ([]*Storage, error)
- func (sq *StorageQuery) AllX(ctx context.Context) []*Storage
- func (sq *StorageQuery) Clone() *StorageQuery
- func (sq *StorageQuery) Count(ctx context.Context) (int, error)
- func (sq *StorageQuery) CountX(ctx context.Context) int
- func (sq *StorageQuery) Exist(ctx context.Context) (bool, error)
- func (sq *StorageQuery) ExistX(ctx context.Context) bool
- func (sq *StorageQuery) First(ctx context.Context) (*Storage, error)
- func (sq *StorageQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *StorageQuery) FirstIDX(ctx context.Context) uuid.UUID
- func (sq *StorageQuery) FirstX(ctx context.Context) *Storage
- func (sq *StorageQuery) GroupBy(field string, fields ...string) *StorageGroupBy
- func (sq *StorageQuery) IDs(ctx context.Context) (ids []uuid.UUID, err error)
- func (sq *StorageQuery) IDsX(ctx context.Context) []uuid.UUID
- func (sq *StorageQuery) Limit(limit int) *StorageQuery
- func (sq *StorageQuery) Offset(offset int) *StorageQuery
- func (sq *StorageQuery) Only(ctx context.Context) (*Storage, error)
- func (sq *StorageQuery) OnlyID(ctx context.Context) (id uuid.UUID, err error)
- func (sq *StorageQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (sq *StorageQuery) OnlyX(ctx context.Context) *Storage
- func (sq *StorageQuery) Order(o ...storage.OrderOption) *StorageQuery
- func (sq *StorageQuery) Select(fields ...string) *StorageSelect
- func (sq *StorageQuery) Unique(unique bool) *StorageQuery
- func (sq *StorageQuery) Where(ps ...predicate.Storage) *StorageQuery
- type StorageSelect
- func (ss *StorageSelect) Aggregate(fns ...AggregateFunc) *StorageSelect
- func (s *StorageSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *StorageSelect) BoolX(ctx context.Context) bool
- func (s *StorageSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *StorageSelect) BoolsX(ctx context.Context) []bool
- func (s *StorageSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *StorageSelect) Float64X(ctx context.Context) float64
- func (s *StorageSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *StorageSelect) Float64sX(ctx context.Context) []float64
- func (s *StorageSelect) Int(ctx context.Context) (_ int, err error)
- func (s *StorageSelect) IntX(ctx context.Context) int
- func (s *StorageSelect) Ints(ctx context.Context) ([]int, error)
- func (s *StorageSelect) IntsX(ctx context.Context) []int
- func (ss *StorageSelect) Scan(ctx context.Context, v any) error
- func (s *StorageSelect) ScanX(ctx context.Context, v any)
- func (s *StorageSelect) String(ctx context.Context) (_ string, err error)
- func (s *StorageSelect) StringX(ctx context.Context) string
- func (s *StorageSelect) Strings(ctx context.Context) ([]string, error)
- func (s *StorageSelect) StringsX(ctx context.Context) []string
- type StorageUpdate
- func (su *StorageUpdate) AddSize(i int32) *StorageUpdate
- func (su *StorageUpdate) AddType(i int32) *StorageUpdate
- func (su *StorageUpdate) Exec(ctx context.Context) error
- func (su *StorageUpdate) ExecX(ctx context.Context)
- func (su *StorageUpdate) Mutation() *StorageMutation
- func (su *StorageUpdate) Save(ctx context.Context) (int, error)
- func (su *StorageUpdate) SaveX(ctx context.Context) int
- func (su *StorageUpdate) SetCid(s string) *StorageUpdate
- func (su *StorageUpdate) SetLastModify(t time.Time) *StorageUpdate
- func (su *StorageUpdate) SetName(s string) *StorageUpdate
- func (su *StorageUpdate) SetNillableLastModify(t *time.Time) *StorageUpdate
- func (su *StorageUpdate) SetNillableType(i *int32) *StorageUpdate
- func (su *StorageUpdate) SetOwner(s string) *StorageUpdate
- func (su *StorageUpdate) SetParentID(s string) *StorageUpdate
- func (su *StorageUpdate) SetSize(i int32) *StorageUpdate
- func (su *StorageUpdate) SetType(i int32) *StorageUpdate
- func (su *StorageUpdate) Where(ps ...predicate.Storage) *StorageUpdate
- type StorageUpdateOne
- func (suo *StorageUpdateOne) AddSize(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) AddType(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) Exec(ctx context.Context) error
- func (suo *StorageUpdateOne) ExecX(ctx context.Context)
- func (suo *StorageUpdateOne) Mutation() *StorageMutation
- func (suo *StorageUpdateOne) Save(ctx context.Context) (*Storage, error)
- func (suo *StorageUpdateOne) SaveX(ctx context.Context) *Storage
- func (suo *StorageUpdateOne) Select(field string, fields ...string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetCid(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetLastModify(t time.Time) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetName(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetNillableLastModify(t *time.Time) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetNillableType(i *int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetOwner(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetParentID(s string) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetSize(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) SetType(i int32) *StorageUpdateOne
- func (suo *StorageUpdateOne) Where(ps ...predicate.Storage) *StorageUpdateOne
- type Storages
- 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 uuid.UUID) *UserDeleteOne
- func (c *UserClient) Get(ctx context.Context, id uuid.UUID) (*User, error)
- func (c *UserClient) GetX(ctx context.Context, id uuid.UUID) *User
- func (c *UserClient) Hooks() []Hook
- func (c *UserClient) Intercept(interceptors ...Interceptor)
- func (c *UserClient) Interceptors() []Interceptor
- func (c *UserClient) Query() *UserQuery
- func (c *UserClient) Update() *UserUpdate
- func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
- func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
- func (c *UserClient) Use(hooks ...Hook)
- type UserCreate
- func (uc *UserCreate) Exec(ctx context.Context) error
- func (uc *UserCreate) ExecX(ctx context.Context)
- func (uc *UserCreate) Mutation() *UserMutation
- func (uc *UserCreate) Save(ctx context.Context) (*User, error)
- func (uc *UserCreate) SaveX(ctx context.Context) *User
- func (uc *UserCreate) SetCountryCallCoding(s string) *UserCreate
- func (uc *UserCreate) SetCreateDate(t time.Time) *UserCreate
- func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
- func (uc *UserCreate) SetIcon(s string) *UserCreate
- func (uc *UserCreate) SetLastLoginDate(t time.Time) *UserCreate
- func (uc *UserCreate) SetName(s string) *UserCreate
- func (uc *UserCreate) SetNillableCreateDate(t *time.Time) *UserCreate
- func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
- func (uc *UserCreate) SetNillableLastLoginDate(t *time.Time) *UserCreate
- func (uc *UserCreate) SetPassword(s string) *UserCreate
- func (uc *UserCreate) SetTelephoneNumber(s string) *UserCreate
- type UserCreateBulk
- type UserDelete
- type UserDeleteOne
- type UserGroupBy
- func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
- func (s *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserGroupBy) BoolX(ctx context.Context) bool
- func (s *UserGroupBy) Bools(ctx context.Context) ([]bool, error)
- func (s *UserGroupBy) BoolsX(ctx context.Context) []bool
- func (s *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserGroupBy) Float64X(ctx context.Context) float64
- func (s *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserGroupBy) Float64sX(ctx context.Context) []float64
- func (s *UserGroupBy) Int(ctx context.Context) (_ int, err error)
- func (s *UserGroupBy) IntX(ctx context.Context) int
- func (s *UserGroupBy) Ints(ctx context.Context) ([]int, error)
- func (s *UserGroupBy) IntsX(ctx context.Context) []int
- func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
- func (s *UserGroupBy) ScanX(ctx context.Context, v any)
- func (s *UserGroupBy) String(ctx context.Context) (_ string, err error)
- func (s *UserGroupBy) StringX(ctx context.Context) string
- func (s *UserGroupBy) Strings(ctx context.Context) ([]string, error)
- func (s *UserGroupBy) StringsX(ctx context.Context) []string
- type UserMutation
- func (m *UserMutation) AddField(name string, value ent.Value) error
- func (m *UserMutation) AddedEdges() []string
- func (m *UserMutation) AddedField(name string) (ent.Value, bool)
- func (m *UserMutation) AddedFields() []string
- func (m *UserMutation) AddedIDs(name string) []ent.Value
- func (m *UserMutation) ClearEdge(name string) error
- func (m *UserMutation) ClearField(name string) error
- func (m *UserMutation) ClearedEdges() []string
- func (m *UserMutation) ClearedFields() []string
- func (m UserMutation) Client() *Client
- func (m *UserMutation) CountryCallCoding() (r string, exists bool)
- func (m *UserMutation) CreateDate() (r time.Time, exists bool)
- func (m *UserMutation) EdgeCleared(name string) bool
- func (m *UserMutation) Field(name string) (ent.Value, bool)
- func (m *UserMutation) FieldCleared(name string) bool
- func (m *UserMutation) Fields() []string
- func (m *UserMutation) ID() (id uuid.UUID, exists bool)
- func (m *UserMutation) IDs(ctx context.Context) ([]uuid.UUID, error)
- func (m *UserMutation) Icon() (r string, exists bool)
- func (m *UserMutation) LastLoginDate() (r time.Time, exists bool)
- func (m *UserMutation) Name() (r string, exists bool)
- func (m *UserMutation) OldCountryCallCoding(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldCreateDate(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)
- func (m *UserMutation) OldIcon(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldLastLoginDate(ctx context.Context) (v time.Time, err error)
- func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldPassword(ctx context.Context) (v string, err error)
- func (m *UserMutation) OldTelephoneNumber(ctx context.Context) (v string, err error)
- func (m *UserMutation) Op() Op
- func (m *UserMutation) Password() (r string, exists bool)
- func (m *UserMutation) RemovedEdges() []string
- func (m *UserMutation) RemovedIDs(name string) []ent.Value
- func (m *UserMutation) ResetCountryCallCoding()
- func (m *UserMutation) ResetCreateDate()
- func (m *UserMutation) ResetEdge(name string) error
- func (m *UserMutation) ResetField(name string) error
- func (m *UserMutation) ResetIcon()
- func (m *UserMutation) ResetLastLoginDate()
- func (m *UserMutation) ResetName()
- func (m *UserMutation) ResetPassword()
- func (m *UserMutation) ResetTelephoneNumber()
- func (m *UserMutation) SetCountryCallCoding(s string)
- func (m *UserMutation) SetCreateDate(t time.Time)
- func (m *UserMutation) SetField(name string, value ent.Value) error
- func (m *UserMutation) SetID(id uuid.UUID)
- func (m *UserMutation) SetIcon(s string)
- func (m *UserMutation) SetLastLoginDate(t time.Time)
- func (m *UserMutation) SetName(s string)
- func (m *UserMutation) SetOp(op Op)
- func (m *UserMutation) SetPassword(s string)
- func (m *UserMutation) SetTelephoneNumber(s string)
- func (m *UserMutation) TelephoneNumber() (r string, exists bool)
- func (m UserMutation) Tx() (*Tx, error)
- func (m *UserMutation) Type() string
- func (m *UserMutation) Where(ps ...predicate.User)
- func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
- type UserQuery
- func (uq *UserQuery) Aggregate(fns ...AggregateFunc) *UserSelect
- func (uq *UserQuery) All(ctx context.Context) ([]*User, error)
- func (uq *UserQuery) AllX(ctx context.Context) []*User
- func (uq *UserQuery) Clone() *UserQuery
- func (uq *UserQuery) Count(ctx context.Context) (int, error)
- func (uq *UserQuery) CountX(ctx context.Context) int
- func (uq *UserQuery) Exist(ctx context.Context) (bool, error)
- func (uq *UserQuery) ExistX(ctx context.Context) bool
- func (uq *UserQuery) First(ctx context.Context) (*User, error)
- func (uq *UserQuery) FirstID(ctx context.Context) (id uuid.UUID, err error)
- func (uq *UserQuery) FirstIDX(ctx context.Context) uuid.UUID
- 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 []uuid.UUID, err error)
- func (uq *UserQuery) IDsX(ctx context.Context) []uuid.UUID
- 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 uuid.UUID, err error)
- func (uq *UserQuery) OnlyIDX(ctx context.Context) uuid.UUID
- func (uq *UserQuery) OnlyX(ctx context.Context) *User
- func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
- func (uq *UserQuery) Select(fields ...string) *UserSelect
- func (uq *UserQuery) Unique(unique bool) *UserQuery
- func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery
- type UserSelect
- func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
- func (s *UserSelect) Bool(ctx context.Context) (_ bool, err error)
- func (s *UserSelect) BoolX(ctx context.Context) bool
- func (s *UserSelect) Bools(ctx context.Context) ([]bool, error)
- func (s *UserSelect) BoolsX(ctx context.Context) []bool
- func (s *UserSelect) Float64(ctx context.Context) (_ float64, err error)
- func (s *UserSelect) Float64X(ctx context.Context) float64
- func (s *UserSelect) Float64s(ctx context.Context) ([]float64, error)
- func (s *UserSelect) Float64sX(ctx context.Context) []float64
- func (s *UserSelect) Int(ctx context.Context) (_ int, err error)
- func (s *UserSelect) IntX(ctx context.Context) int
- func (s *UserSelect) Ints(ctx context.Context) ([]int, error)
- func (s *UserSelect) IntsX(ctx context.Context) []int
- func (us *UserSelect) Scan(ctx context.Context, v any) error
- func (s *UserSelect) ScanX(ctx context.Context, v any)
- func (s *UserSelect) String(ctx context.Context) (_ string, err error)
- func (s *UserSelect) StringX(ctx context.Context) string
- func (s *UserSelect) Strings(ctx context.Context) ([]string, error)
- func (s *UserSelect) StringsX(ctx context.Context) []string
- type UserUpdate
- func (uu *UserUpdate) Exec(ctx context.Context) error
- func (uu *UserUpdate) ExecX(ctx context.Context)
- func (uu *UserUpdate) Mutation() *UserMutation
- func (uu *UserUpdate) Save(ctx context.Context) (int, error)
- func (uu *UserUpdate) SaveX(ctx context.Context) int
- func (uu *UserUpdate) SetCountryCallCoding(s string) *UserUpdate
- func (uu *UserUpdate) SetCreateDate(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetIcon(s string) *UserUpdate
- func (uu *UserUpdate) SetLastLoginDate(t time.Time) *UserUpdate
- func (uu *UserUpdate) SetName(s string) *UserUpdate
- func (uu *UserUpdate) SetNillableCreateDate(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetNillableLastLoginDate(t *time.Time) *UserUpdate
- func (uu *UserUpdate) SetPassword(s string) *UserUpdate
- func (uu *UserUpdate) SetTelephoneNumber(s string) *UserUpdate
- func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
- type UserUpdateOne
- func (uuo *UserUpdateOne) Exec(ctx context.Context) error
- func (uuo *UserUpdateOne) ExecX(ctx context.Context)
- func (uuo *UserUpdateOne) Mutation() *UserMutation
- func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
- func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
- func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCountryCallCoding(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetCreateDate(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetIcon(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetLastLoginDate(t time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableCreateDate(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetNillableLastLoginDate(t *time.Time) *UserUpdateOne
- func (uuo *UserUpdateOne) SetPassword(s string) *UserUpdateOne
- func (uuo *UserUpdateOne) SetTelephoneNumber(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. TypeAgent = "Agent" TypeComputeImage = "ComputeImage" TypeComputeInstance = "ComputeInstance" TypeComputeSpec = "ComputeSpec" TypeEmployee = "Employee" TypeStorage = "Storage" TypeUser = "User" )
Variables ¶
This section is empty.
Functions ¶
func IsConstraintError ¶
IsConstraintError returns a boolean indicating whether the error is a constraint failure.
func IsNotFound ¶
IsNotFound returns a boolean indicating whether the error is a not found error.
func IsNotLoaded ¶
IsNotLoaded returns a boolean indicating whether the error is a not loaded error.
func IsNotSingular ¶
IsNotSingular returns a boolean indicating whether the error is a not singular error.
func IsValidationError ¶
IsValidationError returns a boolean indicating whether the error is a validation error.
func NewContext ¶
NewContext returns a new context with the given Client attached.
Types ¶
type Agent ¶
type Agent struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // contains filtered or unexported fields }
Agent is the model entity for the Agent schema.
func (*Agent) Unwrap ¶
Unwrap unwraps the Agent 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 (*Agent) Update ¶
func (a *Agent) Update() *AgentUpdateOne
Update returns a builder for updating this Agent. Note that you need to call Agent.Unwrap() before calling this method if this Agent was returned from a transaction, and the transaction was committed or rolled back.
type AgentClient ¶
type AgentClient struct {
// contains filtered or unexported fields
}
AgentClient is a client for the Agent schema.
func NewAgentClient ¶
func NewAgentClient(c config) *AgentClient
NewAgentClient returns a client for the Agent from the given config.
func (*AgentClient) Create ¶
func (c *AgentClient) Create() *AgentCreate
Create returns a builder for creating a Agent entity.
func (*AgentClient) CreateBulk ¶
func (c *AgentClient) CreateBulk(builders ...*AgentCreate) *AgentCreateBulk
CreateBulk returns a builder for creating a bulk of Agent entities.
func (*AgentClient) Delete ¶
func (c *AgentClient) Delete() *AgentDelete
Delete returns a delete builder for Agent.
func (*AgentClient) DeleteOne ¶
func (c *AgentClient) DeleteOne(a *Agent) *AgentDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*AgentClient) DeleteOneID ¶
func (c *AgentClient) DeleteOneID(id uuid.UUID) *AgentDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*AgentClient) Intercept ¶
func (c *AgentClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `agent.Intercept(f(g(h())))`.
func (*AgentClient) Interceptors ¶
func (c *AgentClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*AgentClient) Query ¶
func (c *AgentClient) Query() *AgentQuery
Query returns a query builder for Agent.
func (*AgentClient) Update ¶
func (c *AgentClient) Update() *AgentUpdate
Update returns an update builder for Agent.
func (*AgentClient) UpdateOne ¶
func (c *AgentClient) UpdateOne(a *Agent) *AgentUpdateOne
UpdateOne returns an update builder for the given entity.
func (*AgentClient) UpdateOneID ¶
func (c *AgentClient) UpdateOneID(id uuid.UUID) *AgentUpdateOne
UpdateOneID returns an update builder for the given id.
func (*AgentClient) Use ¶
func (c *AgentClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `agent.Hooks(f(g(h())))`.
type AgentCreate ¶
type AgentCreate struct {
// contains filtered or unexported fields
}
AgentCreate is the builder for creating a Agent entity.
func (*AgentCreate) Exec ¶
func (ac *AgentCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreate) ExecX ¶
func (ac *AgentCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentCreate) Mutation ¶
func (ac *AgentCreate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentCreate) Save ¶
func (ac *AgentCreate) Save(ctx context.Context) (*Agent, error)
Save creates the Agent in the database.
func (*AgentCreate) SaveX ¶
func (ac *AgentCreate) SaveX(ctx context.Context) *Agent
SaveX calls Save and panics if Save returns an error.
func (*AgentCreate) SetID ¶
func (ac *AgentCreate) SetID(u uuid.UUID) *AgentCreate
SetID sets the "id" field.
func (*AgentCreate) SetName ¶
func (ac *AgentCreate) SetName(s string) *AgentCreate
SetName sets the "name" field.
func (*AgentCreate) SetNillableID ¶
func (ac *AgentCreate) SetNillableID(u *uuid.UUID) *AgentCreate
SetNillableID sets the "id" field if the given value is not nil.
type AgentCreateBulk ¶
type AgentCreateBulk struct {
// contains filtered or unexported fields
}
AgentCreateBulk is the builder for creating many Agent entities in bulk.
func (*AgentCreateBulk) Exec ¶
func (acb *AgentCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentCreateBulk) ExecX ¶
func (acb *AgentCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type AgentDelete ¶
type AgentDelete struct {
// contains filtered or unexported fields
}
AgentDelete is the builder for deleting a Agent entity.
func (*AgentDelete) Exec ¶
func (ad *AgentDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*AgentDelete) ExecX ¶
func (ad *AgentDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*AgentDelete) Where ¶
func (ad *AgentDelete) Where(ps ...predicate.Agent) *AgentDelete
Where appends a list predicates to the AgentDelete builder.
type AgentDeleteOne ¶
type AgentDeleteOne struct {
// contains filtered or unexported fields
}
AgentDeleteOne is the builder for deleting a single Agent entity.
func (*AgentDeleteOne) Exec ¶
func (ado *AgentDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*AgentDeleteOne) ExecX ¶
func (ado *AgentDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentDeleteOne) Where ¶
func (ado *AgentDeleteOne) Where(ps ...predicate.Agent) *AgentDeleteOne
Where appends a list predicates to the AgentDelete builder.
type AgentGroupBy ¶
type AgentGroupBy struct {
// contains filtered or unexported fields
}
AgentGroupBy is the group-by builder for Agent entities.
func (*AgentGroupBy) Aggregate ¶
func (agb *AgentGroupBy) Aggregate(fns ...AggregateFunc) *AgentGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*AgentGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgentGroupBy) Scan ¶
func (agb *AgentGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgentGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgentMutation ¶
type AgentMutation struct {
// contains filtered or unexported fields
}
AgentMutation represents an operation that mutates the Agent nodes in the graph.
func (*AgentMutation) AddField ¶
func (m *AgentMutation) 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 (*AgentMutation) AddedEdges ¶
func (m *AgentMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*AgentMutation) AddedField ¶
func (m *AgentMutation) 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 (*AgentMutation) AddedFields ¶
func (m *AgentMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*AgentMutation) AddedIDs ¶
func (m *AgentMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*AgentMutation) ClearEdge ¶
func (m *AgentMutation) 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 (*AgentMutation) ClearField ¶
func (m *AgentMutation) 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 (*AgentMutation) ClearedEdges ¶
func (m *AgentMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*AgentMutation) ClearedFields ¶
func (m *AgentMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (AgentMutation) Client ¶
func (m AgentMutation) 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 (*AgentMutation) EdgeCleared ¶
func (m *AgentMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*AgentMutation) Field ¶
func (m *AgentMutation) 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 (*AgentMutation) FieldCleared ¶
func (m *AgentMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*AgentMutation) Fields ¶
func (m *AgentMutation) 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 (*AgentMutation) ID ¶
func (m *AgentMutation) ID() (id uuid.UUID, 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 (*AgentMutation) IDs ¶
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 (*AgentMutation) Name ¶
func (m *AgentMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*AgentMutation) 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 (*AgentMutation) OldName ¶
func (m *AgentMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Agent entity. If the Agent 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 (*AgentMutation) RemovedEdges ¶
func (m *AgentMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*AgentMutation) RemovedIDs ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetEdge ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetField ¶
func (m *AgentMutation) 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 (*AgentMutation) ResetName ¶
func (m *AgentMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*AgentMutation) SetField ¶
func (m *AgentMutation) 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 (*AgentMutation) SetID ¶
func (m *AgentMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Agent entities.
func (*AgentMutation) SetName ¶
func (m *AgentMutation) SetName(s string)
SetName sets the "name" field.
func (*AgentMutation) SetOp ¶
func (m *AgentMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (AgentMutation) Tx ¶
func (m AgentMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*AgentMutation) Type ¶
func (m *AgentMutation) Type() string
Type returns the node type of this mutation (Agent).
func (*AgentMutation) Where ¶
func (m *AgentMutation) Where(ps ...predicate.Agent)
Where appends a list predicates to the AgentMutation builder.
func (*AgentMutation) WhereP ¶
func (m *AgentMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the AgentMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type AgentQuery ¶
type AgentQuery struct {
// contains filtered or unexported fields
}
AgentQuery is the builder for querying Agent entities.
func (*AgentQuery) Aggregate ¶
func (aq *AgentQuery) Aggregate(fns ...AggregateFunc) *AgentSelect
Aggregate returns a AgentSelect configured with the given aggregations.
func (*AgentQuery) All ¶
func (aq *AgentQuery) All(ctx context.Context) ([]*Agent, error)
All executes the query and returns a list of Agents.
func (*AgentQuery) AllX ¶
func (aq *AgentQuery) AllX(ctx context.Context) []*Agent
AllX is like All, but panics if an error occurs.
func (*AgentQuery) Clone ¶
func (aq *AgentQuery) Clone() *AgentQuery
Clone returns a duplicate of the AgentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*AgentQuery) Count ¶
func (aq *AgentQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*AgentQuery) CountX ¶
func (aq *AgentQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*AgentQuery) Exist ¶
func (aq *AgentQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*AgentQuery) ExistX ¶
func (aq *AgentQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*AgentQuery) First ¶
func (aq *AgentQuery) First(ctx context.Context) (*Agent, error)
First returns the first Agent entity from the query. Returns a *NotFoundError when no Agent was found.
func (*AgentQuery) FirstID ¶
FirstID returns the first Agent ID from the query. Returns a *NotFoundError when no Agent ID was found.
func (*AgentQuery) FirstIDX ¶
func (aq *AgentQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*AgentQuery) FirstX ¶
func (aq *AgentQuery) FirstX(ctx context.Context) *Agent
FirstX is like First, but panics if an error occurs.
func (*AgentQuery) GroupBy ¶
func (aq *AgentQuery) GroupBy(field string, fields ...string) *AgentGroupBy
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.Agent.Query(). GroupBy(agent.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*AgentQuery) IDsX ¶
func (aq *AgentQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*AgentQuery) Limit ¶
func (aq *AgentQuery) Limit(limit int) *AgentQuery
Limit the number of records to be returned by this query.
func (*AgentQuery) Offset ¶
func (aq *AgentQuery) Offset(offset int) *AgentQuery
Offset to start from.
func (*AgentQuery) Only ¶
func (aq *AgentQuery) Only(ctx context.Context) (*Agent, error)
Only returns a single Agent entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Agent entity is found. Returns a *NotFoundError when no Agent entities are found.
func (*AgentQuery) OnlyID ¶
OnlyID is like Only, but returns the only Agent ID in the query. Returns a *NotSingularError when more than one Agent ID is found. Returns a *NotFoundError when no entities are found.
func (*AgentQuery) OnlyIDX ¶
func (aq *AgentQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*AgentQuery) OnlyX ¶
func (aq *AgentQuery) OnlyX(ctx context.Context) *Agent
OnlyX is like Only, but panics if an error occurs.
func (*AgentQuery) Order ¶
func (aq *AgentQuery) Order(o ...agent.OrderOption) *AgentQuery
Order specifies how the records should be ordered.
func (*AgentQuery) Select ¶
func (aq *AgentQuery) Select(fields ...string) *AgentSelect
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.Agent.Query(). Select(agent.FieldName). Scan(ctx, &v)
func (*AgentQuery) Unique ¶
func (aq *AgentQuery) Unique(unique bool) *AgentQuery
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 (*AgentQuery) Where ¶
func (aq *AgentQuery) Where(ps ...predicate.Agent) *AgentQuery
Where adds a new predicate for the AgentQuery builder.
type AgentSelect ¶
type AgentSelect struct { *AgentQuery // contains filtered or unexported fields }
AgentSelect is the builder for selecting fields of Agent entities.
func (*AgentSelect) Aggregate ¶
func (as *AgentSelect) Aggregate(fns ...AggregateFunc) *AgentSelect
Aggregate adds the given aggregation functions to the selector query.
func (*AgentSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*AgentSelect) Scan ¶
func (as *AgentSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*AgentSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type AgentUpdate ¶
type AgentUpdate struct {
// contains filtered or unexported fields
}
AgentUpdate is the builder for updating Agent entities.
func (*AgentUpdate) Exec ¶
func (au *AgentUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*AgentUpdate) ExecX ¶
func (au *AgentUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdate) Mutation ¶
func (au *AgentUpdate) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdate) Save ¶
func (au *AgentUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*AgentUpdate) SaveX ¶
func (au *AgentUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdate) SetName ¶
func (au *AgentUpdate) SetName(s string) *AgentUpdate
SetName sets the "name" field.
func (*AgentUpdate) Where ¶
func (au *AgentUpdate) Where(ps ...predicate.Agent) *AgentUpdate
Where appends a list predicates to the AgentUpdate builder.
type AgentUpdateOne ¶
type AgentUpdateOne struct {
// contains filtered or unexported fields
}
AgentUpdateOne is the builder for updating a single Agent entity.
func (*AgentUpdateOne) Exec ¶
func (auo *AgentUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*AgentUpdateOne) ExecX ¶
func (auo *AgentUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*AgentUpdateOne) Mutation ¶
func (auo *AgentUpdateOne) Mutation() *AgentMutation
Mutation returns the AgentMutation object of the builder.
func (*AgentUpdateOne) Save ¶
func (auo *AgentUpdateOne) Save(ctx context.Context) (*Agent, error)
Save executes the query and returns the updated Agent entity.
func (*AgentUpdateOne) SaveX ¶
func (auo *AgentUpdateOne) SaveX(ctx context.Context) *Agent
SaveX is like Save, but panics if an error occurs.
func (*AgentUpdateOne) Select ¶
func (auo *AgentUpdateOne) Select(field string, fields ...string) *AgentUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*AgentUpdateOne) SetName ¶
func (auo *AgentUpdateOne) SetName(s string) *AgentUpdateOne
SetName sets the "name" field.
func (*AgentUpdateOne) Where ¶
func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne
Where appends a list predicates to the AgentUpdate builder.
type AggregateFunc ¶
AggregateFunc applies an aggregation step on the group-by traversal/selector.
func As ¶
func As(fn AggregateFunc, end string) AggregateFunc
As is a pseudo aggregation function for renaming another other functions with custom names. For example:
GroupBy(field1, field2). Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")). Scan(ctx, &v)
func Count ¶
func Count() AggregateFunc
Count applies the "count" aggregation function on each group.
func Max ¶
func Max(field string) AggregateFunc
Max applies the "max" aggregation function on the given field of each group.
func Mean ¶
func Mean(field string) AggregateFunc
Mean applies the "mean" aggregation function on the given field of each group.
func Min ¶
func Min(field string) AggregateFunc
Min applies the "min" aggregation function on the given field of each group.
func Sum ¶
func Sum(field string) AggregateFunc
Sum applies the "sum" aggregation function on the given field of each group.
type Client ¶
type Client struct { // Schema is the client for creating, migrating and dropping schema. Schema *migrate.Schema // Agent is the client for interacting with the Agent builders. Agent *AgentClient // ComputeImage is the client for interacting with the ComputeImage builders. ComputeImage *ComputeImageClient // ComputeInstance is the client for interacting with the ComputeInstance builders. ComputeInstance *ComputeInstanceClient // ComputeSpec is the client for interacting with the ComputeSpec builders. ComputeSpec *ComputeSpecClient // Employee is the client for interacting with the Employee builders. Employee *EmployeeClient // Storage is the client for interacting with the Storage builders. Storage *StorageClient // 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(). Agent. 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 ComputeImage ¶
type ComputeImage struct { // ID of the ent. ID int32 `json:"id,omitempty"` // 显示名 Name string `json:"name,omitempty"` // 镜像名 Image string `json:"image,omitempty"` // 版本名 Tag string `json:"tag,omitempty"` // 端口号 Port int32 `json:"port,omitempty"` // contains filtered or unexported fields }
ComputeImage is the model entity for the ComputeImage schema.
func (*ComputeImage) String ¶
func (ci *ComputeImage) String() string
String implements the fmt.Stringer.
func (*ComputeImage) Unwrap ¶
func (ci *ComputeImage) Unwrap() *ComputeImage
Unwrap unwraps the ComputeImage 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 (*ComputeImage) Update ¶
func (ci *ComputeImage) Update() *ComputeImageUpdateOne
Update returns a builder for updating this ComputeImage. Note that you need to call ComputeImage.Unwrap() before calling this method if this ComputeImage was returned from a transaction, and the transaction was committed or rolled back.
type ComputeImageClient ¶
type ComputeImageClient struct {
// contains filtered or unexported fields
}
ComputeImageClient is a client for the ComputeImage schema.
func NewComputeImageClient ¶
func NewComputeImageClient(c config) *ComputeImageClient
NewComputeImageClient returns a client for the ComputeImage from the given config.
func (*ComputeImageClient) Create ¶
func (c *ComputeImageClient) Create() *ComputeImageCreate
Create returns a builder for creating a ComputeImage entity.
func (*ComputeImageClient) CreateBulk ¶
func (c *ComputeImageClient) CreateBulk(builders ...*ComputeImageCreate) *ComputeImageCreateBulk
CreateBulk returns a builder for creating a bulk of ComputeImage entities.
func (*ComputeImageClient) Delete ¶
func (c *ComputeImageClient) Delete() *ComputeImageDelete
Delete returns a delete builder for ComputeImage.
func (*ComputeImageClient) DeleteOne ¶
func (c *ComputeImageClient) DeleteOne(ci *ComputeImage) *ComputeImageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ComputeImageClient) DeleteOneID ¶
func (c *ComputeImageClient) DeleteOneID(id int32) *ComputeImageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ComputeImageClient) Get ¶
func (c *ComputeImageClient) Get(ctx context.Context, id int32) (*ComputeImage, error)
Get returns a ComputeImage entity by its id.
func (*ComputeImageClient) GetX ¶
func (c *ComputeImageClient) GetX(ctx context.Context, id int32) *ComputeImage
GetX is like Get, but panics if an error occurs.
func (*ComputeImageClient) Hooks ¶
func (c *ComputeImageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ComputeImageClient) Intercept ¶
func (c *ComputeImageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `computeimage.Intercept(f(g(h())))`.
func (*ComputeImageClient) Interceptors ¶
func (c *ComputeImageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ComputeImageClient) Query ¶
func (c *ComputeImageClient) Query() *ComputeImageQuery
Query returns a query builder for ComputeImage.
func (*ComputeImageClient) Update ¶
func (c *ComputeImageClient) Update() *ComputeImageUpdate
Update returns an update builder for ComputeImage.
func (*ComputeImageClient) UpdateOne ¶
func (c *ComputeImageClient) UpdateOne(ci *ComputeImage) *ComputeImageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ComputeImageClient) UpdateOneID ¶
func (c *ComputeImageClient) UpdateOneID(id int32) *ComputeImageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ComputeImageClient) Use ¶
func (c *ComputeImageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `computeimage.Hooks(f(g(h())))`.
type ComputeImageCreate ¶
type ComputeImageCreate struct {
// contains filtered or unexported fields
}
ComputeImageCreate is the builder for creating a ComputeImage entity.
func (*ComputeImageCreate) Exec ¶
func (cic *ComputeImageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageCreate) ExecX ¶
func (cic *ComputeImageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageCreate) Mutation ¶
func (cic *ComputeImageCreate) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageCreate) Save ¶
func (cic *ComputeImageCreate) Save(ctx context.Context) (*ComputeImage, error)
Save creates the ComputeImage in the database.
func (*ComputeImageCreate) SaveX ¶
func (cic *ComputeImageCreate) SaveX(ctx context.Context) *ComputeImage
SaveX calls Save and panics if Save returns an error.
func (*ComputeImageCreate) SetID ¶
func (cic *ComputeImageCreate) SetID(i int32) *ComputeImageCreate
SetID sets the "id" field.
func (*ComputeImageCreate) SetImage ¶
func (cic *ComputeImageCreate) SetImage(s string) *ComputeImageCreate
SetImage sets the "image" field.
func (*ComputeImageCreate) SetName ¶
func (cic *ComputeImageCreate) SetName(s string) *ComputeImageCreate
SetName sets the "name" field.
func (*ComputeImageCreate) SetPort ¶
func (cic *ComputeImageCreate) SetPort(i int32) *ComputeImageCreate
SetPort sets the "port" field.
func (*ComputeImageCreate) SetTag ¶
func (cic *ComputeImageCreate) SetTag(s string) *ComputeImageCreate
SetTag sets the "tag" field.
type ComputeImageCreateBulk ¶
type ComputeImageCreateBulk struct {
// contains filtered or unexported fields
}
ComputeImageCreateBulk is the builder for creating many ComputeImage entities in bulk.
func (*ComputeImageCreateBulk) Exec ¶
func (cicb *ComputeImageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageCreateBulk) ExecX ¶
func (cicb *ComputeImageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageCreateBulk) Save ¶
func (cicb *ComputeImageCreateBulk) Save(ctx context.Context) ([]*ComputeImage, error)
Save creates the ComputeImage entities in the database.
func (*ComputeImageCreateBulk) SaveX ¶
func (cicb *ComputeImageCreateBulk) SaveX(ctx context.Context) []*ComputeImage
SaveX is like Save, but panics if an error occurs.
type ComputeImageDelete ¶
type ComputeImageDelete struct {
// contains filtered or unexported fields
}
ComputeImageDelete is the builder for deleting a ComputeImage entity.
func (*ComputeImageDelete) Exec ¶
func (cid *ComputeImageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeImageDelete) ExecX ¶
func (cid *ComputeImageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageDelete) Where ¶
func (cid *ComputeImageDelete) Where(ps ...predicate.ComputeImage) *ComputeImageDelete
Where appends a list predicates to the ComputeImageDelete builder.
type ComputeImageDeleteOne ¶
type ComputeImageDeleteOne struct {
// contains filtered or unexported fields
}
ComputeImageDeleteOne is the builder for deleting a single ComputeImage entity.
func (*ComputeImageDeleteOne) Exec ¶
func (cido *ComputeImageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeImageDeleteOne) ExecX ¶
func (cido *ComputeImageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageDeleteOne) Where ¶
func (cido *ComputeImageDeleteOne) Where(ps ...predicate.ComputeImage) *ComputeImageDeleteOne
Where appends a list predicates to the ComputeImageDelete builder.
type ComputeImageGroupBy ¶
type ComputeImageGroupBy struct {
// contains filtered or unexported fields
}
ComputeImageGroupBy is the group-by builder for ComputeImage entities.
func (*ComputeImageGroupBy) Aggregate ¶
func (cigb *ComputeImageGroupBy) Aggregate(fns ...AggregateFunc) *ComputeImageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ComputeImageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeImageGroupBy) Scan ¶
func (cigb *ComputeImageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeImageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeImageMutation ¶
type ComputeImageMutation struct {
// contains filtered or unexported fields
}
ComputeImageMutation represents an operation that mutates the ComputeImage nodes in the graph.
func (*ComputeImageMutation) AddField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) AddPort ¶
func (m *ComputeImageMutation) AddPort(i int32)
AddPort adds i to the "port" field.
func (*ComputeImageMutation) AddedEdges ¶
func (m *ComputeImageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ComputeImageMutation) AddedField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) AddedFields ¶
func (m *ComputeImageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ComputeImageMutation) AddedIDs ¶
func (m *ComputeImageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ComputeImageMutation) AddedPort ¶
func (m *ComputeImageMutation) AddedPort() (r int32, exists bool)
AddedPort returns the value that was added to the "port" field in this mutation.
func (*ComputeImageMutation) ClearEdge ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ClearField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ClearedEdges ¶
func (m *ComputeImageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ComputeImageMutation) ClearedFields ¶
func (m *ComputeImageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ComputeImageMutation) Client ¶
func (m ComputeImageMutation) 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 (*ComputeImageMutation) EdgeCleared ¶
func (m *ComputeImageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ComputeImageMutation) Field ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) FieldCleared ¶
func (m *ComputeImageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ComputeImageMutation) Fields ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ID ¶
func (m *ComputeImageMutation) ID() (id int32, 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 (*ComputeImageMutation) IDs ¶
func (m *ComputeImageMutation) IDs(ctx context.Context) ([]int32, 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 (*ComputeImageMutation) Image ¶
func (m *ComputeImageMutation) Image() (r string, exists bool)
Image returns the value of the "image" field in the mutation.
func (*ComputeImageMutation) Name ¶
func (m *ComputeImageMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ComputeImageMutation) 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 (*ComputeImageMutation) OldImage ¶
func (m *ComputeImageMutation) OldImage(ctx context.Context) (v string, err error)
OldImage returns the old "image" field's value of the ComputeImage entity. If the ComputeImage 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 (*ComputeImageMutation) OldName ¶
func (m *ComputeImageMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ComputeImage entity. If the ComputeImage 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 (*ComputeImageMutation) OldPort ¶
func (m *ComputeImageMutation) OldPort(ctx context.Context) (v int32, err error)
OldPort returns the old "port" field's value of the ComputeImage entity. If the ComputeImage 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 (*ComputeImageMutation) OldTag ¶
func (m *ComputeImageMutation) OldTag(ctx context.Context) (v string, err error)
OldTag returns the old "tag" field's value of the ComputeImage entity. If the ComputeImage 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 (*ComputeImageMutation) Op ¶
func (m *ComputeImageMutation) Op() Op
Op returns the operation name.
func (*ComputeImageMutation) Port ¶
func (m *ComputeImageMutation) Port() (r int32, exists bool)
Port returns the value of the "port" field in the mutation.
func (*ComputeImageMutation) RemovedEdges ¶
func (m *ComputeImageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ComputeImageMutation) RemovedIDs ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ResetEdge ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ResetField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) ResetImage ¶
func (m *ComputeImageMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*ComputeImageMutation) ResetName ¶
func (m *ComputeImageMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ComputeImageMutation) ResetPort ¶
func (m *ComputeImageMutation) ResetPort()
ResetPort resets all changes to the "port" field.
func (*ComputeImageMutation) ResetTag ¶
func (m *ComputeImageMutation) ResetTag()
ResetTag resets all changes to the "tag" field.
func (*ComputeImageMutation) SetField ¶
func (m *ComputeImageMutation) 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 (*ComputeImageMutation) SetID ¶
func (m *ComputeImageMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ComputeImage entities.
func (*ComputeImageMutation) SetImage ¶
func (m *ComputeImageMutation) SetImage(s string)
SetImage sets the "image" field.
func (*ComputeImageMutation) SetName ¶
func (m *ComputeImageMutation) SetName(s string)
SetName sets the "name" field.
func (*ComputeImageMutation) SetOp ¶
func (m *ComputeImageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ComputeImageMutation) SetPort ¶
func (m *ComputeImageMutation) SetPort(i int32)
SetPort sets the "port" field.
func (*ComputeImageMutation) SetTag ¶
func (m *ComputeImageMutation) SetTag(s string)
SetTag sets the "tag" field.
func (*ComputeImageMutation) Tag ¶
func (m *ComputeImageMutation) Tag() (r string, exists bool)
Tag returns the value of the "tag" field in the mutation.
func (ComputeImageMutation) Tx ¶
func (m ComputeImageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ComputeImageMutation) Type ¶
func (m *ComputeImageMutation) Type() string
Type returns the node type of this mutation (ComputeImage).
func (*ComputeImageMutation) Where ¶
func (m *ComputeImageMutation) Where(ps ...predicate.ComputeImage)
Where appends a list predicates to the ComputeImageMutation builder.
func (*ComputeImageMutation) WhereP ¶
func (m *ComputeImageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ComputeImageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ComputeImageQuery ¶
type ComputeImageQuery struct {
// contains filtered or unexported fields
}
ComputeImageQuery is the builder for querying ComputeImage entities.
func (*ComputeImageQuery) Aggregate ¶
func (ciq *ComputeImageQuery) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
Aggregate returns a ComputeImageSelect configured with the given aggregations.
func (*ComputeImageQuery) All ¶
func (ciq *ComputeImageQuery) All(ctx context.Context) ([]*ComputeImage, error)
All executes the query and returns a list of ComputeImages.
func (*ComputeImageQuery) AllX ¶
func (ciq *ComputeImageQuery) AllX(ctx context.Context) []*ComputeImage
AllX is like All, but panics if an error occurs.
func (*ComputeImageQuery) Clone ¶
func (ciq *ComputeImageQuery) Clone() *ComputeImageQuery
Clone returns a duplicate of the ComputeImageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ComputeImageQuery) Count ¶
func (ciq *ComputeImageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeImageQuery) CountX ¶
func (ciq *ComputeImageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeImageQuery) Exist ¶
func (ciq *ComputeImageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeImageQuery) ExistX ¶
func (ciq *ComputeImageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeImageQuery) First ¶
func (ciq *ComputeImageQuery) First(ctx context.Context) (*ComputeImage, error)
First returns the first ComputeImage entity from the query. Returns a *NotFoundError when no ComputeImage was found.
func (*ComputeImageQuery) FirstID ¶
func (ciq *ComputeImageQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first ComputeImage ID from the query. Returns a *NotFoundError when no ComputeImage ID was found.
func (*ComputeImageQuery) FirstIDX ¶
func (ciq *ComputeImageQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeImageQuery) FirstX ¶
func (ciq *ComputeImageQuery) FirstX(ctx context.Context) *ComputeImage
FirstX is like First, but panics if an error occurs.
func (*ComputeImageQuery) GroupBy ¶
func (ciq *ComputeImageQuery) GroupBy(field string, fields ...string) *ComputeImageGroupBy
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.ComputeImage.Query(). GroupBy(computeimage.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ComputeImageQuery) IDs ¶
func (ciq *ComputeImageQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ComputeImage IDs.
func (*ComputeImageQuery) IDsX ¶
func (ciq *ComputeImageQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ComputeImageQuery) Limit ¶
func (ciq *ComputeImageQuery) Limit(limit int) *ComputeImageQuery
Limit the number of records to be returned by this query.
func (*ComputeImageQuery) Offset ¶
func (ciq *ComputeImageQuery) Offset(offset int) *ComputeImageQuery
Offset to start from.
func (*ComputeImageQuery) Only ¶
func (ciq *ComputeImageQuery) Only(ctx context.Context) (*ComputeImage, error)
Only returns a single ComputeImage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ComputeImage entity is found. Returns a *NotFoundError when no ComputeImage entities are found.
func (*ComputeImageQuery) OnlyID ¶
func (ciq *ComputeImageQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only ComputeImage ID in the query. Returns a *NotSingularError when more than one ComputeImage ID is found. Returns a *NotFoundError when no entities are found.
func (*ComputeImageQuery) OnlyIDX ¶
func (ciq *ComputeImageQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeImageQuery) OnlyX ¶
func (ciq *ComputeImageQuery) OnlyX(ctx context.Context) *ComputeImage
OnlyX is like Only, but panics if an error occurs.
func (*ComputeImageQuery) Order ¶
func (ciq *ComputeImageQuery) Order(o ...computeimage.OrderOption) *ComputeImageQuery
Order specifies how the records should be ordered.
func (*ComputeImageQuery) Select ¶
func (ciq *ComputeImageQuery) Select(fields ...string) *ComputeImageSelect
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.ComputeImage.Query(). Select(computeimage.FieldName). Scan(ctx, &v)
func (*ComputeImageQuery) Unique ¶
func (ciq *ComputeImageQuery) Unique(unique bool) *ComputeImageQuery
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 (*ComputeImageQuery) Where ¶
func (ciq *ComputeImageQuery) Where(ps ...predicate.ComputeImage) *ComputeImageQuery
Where adds a new predicate for the ComputeImageQuery builder.
type ComputeImageSelect ¶
type ComputeImageSelect struct { *ComputeImageQuery // contains filtered or unexported fields }
ComputeImageSelect is the builder for selecting fields of ComputeImage entities.
func (*ComputeImageSelect) Aggregate ¶
func (cis *ComputeImageSelect) Aggregate(fns ...AggregateFunc) *ComputeImageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ComputeImageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeImageSelect) Scan ¶
func (cis *ComputeImageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeImageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeImageUpdate ¶
type ComputeImageUpdate struct {
// contains filtered or unexported fields
}
ComputeImageUpdate is the builder for updating ComputeImage entities.
func (*ComputeImageUpdate) AddPort ¶
func (ciu *ComputeImageUpdate) AddPort(i int32) *ComputeImageUpdate
AddPort adds i to the "port" field.
func (*ComputeImageUpdate) Exec ¶
func (ciu *ComputeImageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeImageUpdate) ExecX ¶
func (ciu *ComputeImageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageUpdate) Mutation ¶
func (ciu *ComputeImageUpdate) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageUpdate) Save ¶
func (ciu *ComputeImageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ComputeImageUpdate) SaveX ¶
func (ciu *ComputeImageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeImageUpdate) SetImage ¶
func (ciu *ComputeImageUpdate) SetImage(s string) *ComputeImageUpdate
SetImage sets the "image" field.
func (*ComputeImageUpdate) SetName ¶
func (ciu *ComputeImageUpdate) SetName(s string) *ComputeImageUpdate
SetName sets the "name" field.
func (*ComputeImageUpdate) SetPort ¶
func (ciu *ComputeImageUpdate) SetPort(i int32) *ComputeImageUpdate
SetPort sets the "port" field.
func (*ComputeImageUpdate) SetTag ¶
func (ciu *ComputeImageUpdate) SetTag(s string) *ComputeImageUpdate
SetTag sets the "tag" field.
func (*ComputeImageUpdate) Where ¶
func (ciu *ComputeImageUpdate) Where(ps ...predicate.ComputeImage) *ComputeImageUpdate
Where appends a list predicates to the ComputeImageUpdate builder.
type ComputeImageUpdateOne ¶
type ComputeImageUpdateOne struct {
// contains filtered or unexported fields
}
ComputeImageUpdateOne is the builder for updating a single ComputeImage entity.
func (*ComputeImageUpdateOne) AddPort ¶
func (ciuo *ComputeImageUpdateOne) AddPort(i int32) *ComputeImageUpdateOne
AddPort adds i to the "port" field.
func (*ComputeImageUpdateOne) Exec ¶
func (ciuo *ComputeImageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeImageUpdateOne) ExecX ¶
func (ciuo *ComputeImageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeImageUpdateOne) Mutation ¶
func (ciuo *ComputeImageUpdateOne) Mutation() *ComputeImageMutation
Mutation returns the ComputeImageMutation object of the builder.
func (*ComputeImageUpdateOne) Save ¶
func (ciuo *ComputeImageUpdateOne) Save(ctx context.Context) (*ComputeImage, error)
Save executes the query and returns the updated ComputeImage entity.
func (*ComputeImageUpdateOne) SaveX ¶
func (ciuo *ComputeImageUpdateOne) SaveX(ctx context.Context) *ComputeImage
SaveX is like Save, but panics if an error occurs.
func (*ComputeImageUpdateOne) Select ¶
func (ciuo *ComputeImageUpdateOne) Select(field string, fields ...string) *ComputeImageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ComputeImageUpdateOne) SetImage ¶
func (ciuo *ComputeImageUpdateOne) SetImage(s string) *ComputeImageUpdateOne
SetImage sets the "image" field.
func (*ComputeImageUpdateOne) SetName ¶
func (ciuo *ComputeImageUpdateOne) SetName(s string) *ComputeImageUpdateOne
SetName sets the "name" field.
func (*ComputeImageUpdateOne) SetPort ¶
func (ciuo *ComputeImageUpdateOne) SetPort(i int32) *ComputeImageUpdateOne
SetPort sets the "port" field.
func (*ComputeImageUpdateOne) SetTag ¶
func (ciuo *ComputeImageUpdateOne) SetTag(s string) *ComputeImageUpdateOne
SetTag sets the "tag" field.
func (*ComputeImageUpdateOne) Where ¶
func (ciuo *ComputeImageUpdateOne) Where(ps ...predicate.ComputeImage) *ComputeImageUpdateOne
Where appends a list predicates to the ComputeImageUpdate builder.
type ComputeImages ¶
type ComputeImages []*ComputeImage
ComputeImages is a parsable slice of ComputeImage.
type ComputeInstance ¶
type ComputeInstance struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Owner holds the value of the "owner" field. Owner string `json:"owner,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Core holds the value of the "core" field. Core string `json:"core,omitempty"` // Memory holds the value of the "memory" field. Memory string `json:"memory,omitempty"` // Image holds the value of the "image" field. Image string `json:"image,omitempty"` // ExpirationTime holds the value of the "expiration_time" field. ExpirationTime time.Time `json:"expiration_time,omitempty"` // 0: 启动中,1:运行中,2:连接中断, 3:过期 Status int8 `json:"status,omitempty"` // 容器id ContainerID string `json:"container_id,omitempty"` // p2p agent Id PeerID string `json:"peer_id,omitempty"` // contains filtered or unexported fields }
ComputeInstance is the model entity for the ComputeInstance schema.
func (*ComputeInstance) String ¶
func (ci *ComputeInstance) String() string
String implements the fmt.Stringer.
func (*ComputeInstance) Unwrap ¶
func (ci *ComputeInstance) Unwrap() *ComputeInstance
Unwrap unwraps the ComputeInstance 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 (*ComputeInstance) Update ¶
func (ci *ComputeInstance) Update() *ComputeInstanceUpdateOne
Update returns a builder for updating this ComputeInstance. Note that you need to call ComputeInstance.Unwrap() before calling this method if this ComputeInstance was returned from a transaction, and the transaction was committed or rolled back.
type ComputeInstanceClient ¶
type ComputeInstanceClient struct {
// contains filtered or unexported fields
}
ComputeInstanceClient is a client for the ComputeInstance schema.
func NewComputeInstanceClient ¶
func NewComputeInstanceClient(c config) *ComputeInstanceClient
NewComputeInstanceClient returns a client for the ComputeInstance from the given config.
func (*ComputeInstanceClient) Create ¶
func (c *ComputeInstanceClient) Create() *ComputeInstanceCreate
Create returns a builder for creating a ComputeInstance entity.
func (*ComputeInstanceClient) CreateBulk ¶
func (c *ComputeInstanceClient) CreateBulk(builders ...*ComputeInstanceCreate) *ComputeInstanceCreateBulk
CreateBulk returns a builder for creating a bulk of ComputeInstance entities.
func (*ComputeInstanceClient) Delete ¶
func (c *ComputeInstanceClient) Delete() *ComputeInstanceDelete
Delete returns a delete builder for ComputeInstance.
func (*ComputeInstanceClient) DeleteOne ¶
func (c *ComputeInstanceClient) DeleteOne(ci *ComputeInstance) *ComputeInstanceDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ComputeInstanceClient) DeleteOneID ¶
func (c *ComputeInstanceClient) DeleteOneID(id uuid.UUID) *ComputeInstanceDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ComputeInstanceClient) Get ¶
func (c *ComputeInstanceClient) Get(ctx context.Context, id uuid.UUID) (*ComputeInstance, error)
Get returns a ComputeInstance entity by its id.
func (*ComputeInstanceClient) GetX ¶
func (c *ComputeInstanceClient) GetX(ctx context.Context, id uuid.UUID) *ComputeInstance
GetX is like Get, but panics if an error occurs.
func (*ComputeInstanceClient) Hooks ¶
func (c *ComputeInstanceClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ComputeInstanceClient) Intercept ¶
func (c *ComputeInstanceClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `computeinstance.Intercept(f(g(h())))`.
func (*ComputeInstanceClient) Interceptors ¶
func (c *ComputeInstanceClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ComputeInstanceClient) Query ¶
func (c *ComputeInstanceClient) Query() *ComputeInstanceQuery
Query returns a query builder for ComputeInstance.
func (*ComputeInstanceClient) Update ¶
func (c *ComputeInstanceClient) Update() *ComputeInstanceUpdate
Update returns an update builder for ComputeInstance.
func (*ComputeInstanceClient) UpdateOne ¶
func (c *ComputeInstanceClient) UpdateOne(ci *ComputeInstance) *ComputeInstanceUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ComputeInstanceClient) UpdateOneID ¶
func (c *ComputeInstanceClient) UpdateOneID(id uuid.UUID) *ComputeInstanceUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ComputeInstanceClient) Use ¶
func (c *ComputeInstanceClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `computeinstance.Hooks(f(g(h())))`.
type ComputeInstanceCreate ¶
type ComputeInstanceCreate struct {
// contains filtered or unexported fields
}
ComputeInstanceCreate is the builder for creating a ComputeInstance entity.
func (*ComputeInstanceCreate) Exec ¶
func (cic *ComputeInstanceCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceCreate) ExecX ¶
func (cic *ComputeInstanceCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceCreate) Mutation ¶
func (cic *ComputeInstanceCreate) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceCreate) Save ¶
func (cic *ComputeInstanceCreate) Save(ctx context.Context) (*ComputeInstance, error)
Save creates the ComputeInstance in the database.
func (*ComputeInstanceCreate) SaveX ¶
func (cic *ComputeInstanceCreate) SaveX(ctx context.Context) *ComputeInstance
SaveX calls Save and panics if Save returns an error.
func (*ComputeInstanceCreate) SetContainerID ¶
func (cic *ComputeInstanceCreate) SetContainerID(s string) *ComputeInstanceCreate
SetContainerID sets the "container_id" field.
func (*ComputeInstanceCreate) SetCore ¶
func (cic *ComputeInstanceCreate) SetCore(s string) *ComputeInstanceCreate
SetCore sets the "core" field.
func (*ComputeInstanceCreate) SetExpirationTime ¶
func (cic *ComputeInstanceCreate) SetExpirationTime(t time.Time) *ComputeInstanceCreate
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceCreate) SetID ¶
func (cic *ComputeInstanceCreate) SetID(u uuid.UUID) *ComputeInstanceCreate
SetID sets the "id" field.
func (*ComputeInstanceCreate) SetImage ¶
func (cic *ComputeInstanceCreate) SetImage(s string) *ComputeInstanceCreate
SetImage sets the "image" field.
func (*ComputeInstanceCreate) SetMemory ¶
func (cic *ComputeInstanceCreate) SetMemory(s string) *ComputeInstanceCreate
SetMemory sets the "memory" field.
func (*ComputeInstanceCreate) SetName ¶
func (cic *ComputeInstanceCreate) SetName(s string) *ComputeInstanceCreate
SetName sets the "name" field.
func (*ComputeInstanceCreate) SetNillableContainerID ¶
func (cic *ComputeInstanceCreate) SetNillableContainerID(s *string) *ComputeInstanceCreate
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillableID ¶
func (cic *ComputeInstanceCreate) SetNillableID(u *uuid.UUID) *ComputeInstanceCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetNillablePeerID ¶
func (cic *ComputeInstanceCreate) SetNillablePeerID(s *string) *ComputeInstanceCreate
SetNillablePeerID sets the "peer_id" field if the given value is not nil.
func (*ComputeInstanceCreate) SetOwner ¶
func (cic *ComputeInstanceCreate) SetOwner(s string) *ComputeInstanceCreate
SetOwner sets the "owner" field.
func (*ComputeInstanceCreate) SetPeerID ¶
func (cic *ComputeInstanceCreate) SetPeerID(s string) *ComputeInstanceCreate
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceCreate) SetStatus ¶
func (cic *ComputeInstanceCreate) SetStatus(i int8) *ComputeInstanceCreate
SetStatus sets the "status" field.
type ComputeInstanceCreateBulk ¶
type ComputeInstanceCreateBulk struct {
// contains filtered or unexported fields
}
ComputeInstanceCreateBulk is the builder for creating many ComputeInstance entities in bulk.
func (*ComputeInstanceCreateBulk) Exec ¶
func (cicb *ComputeInstanceCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceCreateBulk) ExecX ¶
func (cicb *ComputeInstanceCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceCreateBulk) Save ¶
func (cicb *ComputeInstanceCreateBulk) Save(ctx context.Context) ([]*ComputeInstance, error)
Save creates the ComputeInstance entities in the database.
func (*ComputeInstanceCreateBulk) SaveX ¶
func (cicb *ComputeInstanceCreateBulk) SaveX(ctx context.Context) []*ComputeInstance
SaveX is like Save, but panics if an error occurs.
type ComputeInstanceDelete ¶
type ComputeInstanceDelete struct {
// contains filtered or unexported fields
}
ComputeInstanceDelete is the builder for deleting a ComputeInstance entity.
func (*ComputeInstanceDelete) Exec ¶
func (cid *ComputeInstanceDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeInstanceDelete) ExecX ¶
func (cid *ComputeInstanceDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceDelete) Where ¶
func (cid *ComputeInstanceDelete) Where(ps ...predicate.ComputeInstance) *ComputeInstanceDelete
Where appends a list predicates to the ComputeInstanceDelete builder.
type ComputeInstanceDeleteOne ¶
type ComputeInstanceDeleteOne struct {
// contains filtered or unexported fields
}
ComputeInstanceDeleteOne is the builder for deleting a single ComputeInstance entity.
func (*ComputeInstanceDeleteOne) Exec ¶
func (cido *ComputeInstanceDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeInstanceDeleteOne) ExecX ¶
func (cido *ComputeInstanceDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceDeleteOne) Where ¶
func (cido *ComputeInstanceDeleteOne) Where(ps ...predicate.ComputeInstance) *ComputeInstanceDeleteOne
Where appends a list predicates to the ComputeInstanceDelete builder.
type ComputeInstanceGroupBy ¶
type ComputeInstanceGroupBy struct {
// contains filtered or unexported fields
}
ComputeInstanceGroupBy is the group-by builder for ComputeInstance entities.
func (*ComputeInstanceGroupBy) Aggregate ¶
func (cigb *ComputeInstanceGroupBy) Aggregate(fns ...AggregateFunc) *ComputeInstanceGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ComputeInstanceGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ComputeInstanceGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceGroupBy) Scan ¶
func (cigb *ComputeInstanceGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeInstanceGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeInstanceMutation ¶
type ComputeInstanceMutation struct {
// contains filtered or unexported fields
}
ComputeInstanceMutation represents an operation that mutates the ComputeInstance nodes in the graph.
func (*ComputeInstanceMutation) AddField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) AddStatus ¶
func (m *ComputeInstanceMutation) AddStatus(i int8)
AddStatus adds i to the "status" field.
func (*ComputeInstanceMutation) AddedEdges ¶
func (m *ComputeInstanceMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ComputeInstanceMutation) AddedField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) AddedFields ¶
func (m *ComputeInstanceMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ComputeInstanceMutation) AddedIDs ¶
func (m *ComputeInstanceMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ComputeInstanceMutation) AddedStatus ¶
func (m *ComputeInstanceMutation) AddedStatus() (r int8, exists bool)
AddedStatus returns the value that was added to the "status" field in this mutation.
func (*ComputeInstanceMutation) ClearContainerID ¶
func (m *ComputeInstanceMutation) ClearContainerID()
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceMutation) ClearEdge ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ClearField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ClearPeerID ¶
func (m *ComputeInstanceMutation) ClearPeerID()
ClearPeerID clears the value of the "peer_id" field.
func (*ComputeInstanceMutation) ClearedEdges ¶
func (m *ComputeInstanceMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ComputeInstanceMutation) ClearedFields ¶
func (m *ComputeInstanceMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ComputeInstanceMutation) Client ¶
func (m ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ContainerID ¶
func (m *ComputeInstanceMutation) ContainerID() (r string, exists bool)
ContainerID returns the value of the "container_id" field in the mutation.
func (*ComputeInstanceMutation) ContainerIDCleared ¶
func (m *ComputeInstanceMutation) ContainerIDCleared() bool
ContainerIDCleared returns if the "container_id" field was cleared in this mutation.
func (*ComputeInstanceMutation) Core ¶
func (m *ComputeInstanceMutation) Core() (r string, exists bool)
Core returns the value of the "core" field in the mutation.
func (*ComputeInstanceMutation) EdgeCleared ¶
func (m *ComputeInstanceMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ComputeInstanceMutation) ExpirationTime ¶
func (m *ComputeInstanceMutation) ExpirationTime() (r time.Time, exists bool)
ExpirationTime returns the value of the "expiration_time" field in the mutation.
func (*ComputeInstanceMutation) Field ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) FieldCleared ¶
func (m *ComputeInstanceMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ComputeInstanceMutation) Fields ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ID ¶
func (m *ComputeInstanceMutation) ID() (id uuid.UUID, 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 (*ComputeInstanceMutation) IDs ¶
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 (*ComputeInstanceMutation) Image ¶
func (m *ComputeInstanceMutation) Image() (r string, exists bool)
Image returns the value of the "image" field in the mutation.
func (*ComputeInstanceMutation) Memory ¶
func (m *ComputeInstanceMutation) Memory() (r string, exists bool)
Memory returns the value of the "memory" field in the mutation.
func (*ComputeInstanceMutation) Name ¶
func (m *ComputeInstanceMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*ComputeInstanceMutation) OldContainerID ¶
func (m *ComputeInstanceMutation) OldContainerID(ctx context.Context) (v string, err error)
OldContainerID returns the old "container_id" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) OldCore ¶
func (m *ComputeInstanceMutation) OldCore(ctx context.Context) (v string, err error)
OldCore returns the old "core" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) OldExpirationTime ¶
OldExpirationTime returns the old "expiration_time" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) 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 (*ComputeInstanceMutation) OldImage ¶
func (m *ComputeInstanceMutation) OldImage(ctx context.Context) (v string, err error)
OldImage returns the old "image" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) OldMemory ¶
func (m *ComputeInstanceMutation) OldMemory(ctx context.Context) (v string, err error)
OldMemory returns the old "memory" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) OldName ¶
func (m *ComputeInstanceMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) OldOwner ¶
func (m *ComputeInstanceMutation) OldOwner(ctx context.Context) (v string, err error)
OldOwner returns the old "owner" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) OldPeerID ¶
func (m *ComputeInstanceMutation) OldPeerID(ctx context.Context) (v string, err error)
OldPeerID returns the old "peer_id" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) OldStatus ¶
func (m *ComputeInstanceMutation) OldStatus(ctx context.Context) (v int8, err error)
OldStatus returns the old "status" field's value of the ComputeInstance entity. If the ComputeInstance 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 (*ComputeInstanceMutation) Op ¶
func (m *ComputeInstanceMutation) Op() Op
Op returns the operation name.
func (*ComputeInstanceMutation) Owner ¶
func (m *ComputeInstanceMutation) Owner() (r string, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*ComputeInstanceMutation) PeerID ¶
func (m *ComputeInstanceMutation) PeerID() (r string, exists bool)
PeerID returns the value of the "peer_id" field in the mutation.
func (*ComputeInstanceMutation) PeerIDCleared ¶
func (m *ComputeInstanceMutation) PeerIDCleared() bool
PeerIDCleared returns if the "peer_id" field was cleared in this mutation.
func (*ComputeInstanceMutation) RemovedEdges ¶
func (m *ComputeInstanceMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ComputeInstanceMutation) RemovedIDs ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ResetContainerID ¶
func (m *ComputeInstanceMutation) ResetContainerID()
ResetContainerID resets all changes to the "container_id" field.
func (*ComputeInstanceMutation) ResetCore ¶
func (m *ComputeInstanceMutation) ResetCore()
ResetCore resets all changes to the "core" field.
func (*ComputeInstanceMutation) ResetEdge ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ResetExpirationTime ¶
func (m *ComputeInstanceMutation) ResetExpirationTime()
ResetExpirationTime resets all changes to the "expiration_time" field.
func (*ComputeInstanceMutation) ResetField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) ResetImage ¶
func (m *ComputeInstanceMutation) ResetImage()
ResetImage resets all changes to the "image" field.
func (*ComputeInstanceMutation) ResetMemory ¶
func (m *ComputeInstanceMutation) ResetMemory()
ResetMemory resets all changes to the "memory" field.
func (*ComputeInstanceMutation) ResetName ¶
func (m *ComputeInstanceMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*ComputeInstanceMutation) ResetOwner ¶
func (m *ComputeInstanceMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*ComputeInstanceMutation) ResetPeerID ¶
func (m *ComputeInstanceMutation) ResetPeerID()
ResetPeerID resets all changes to the "peer_id" field.
func (*ComputeInstanceMutation) ResetStatus ¶
func (m *ComputeInstanceMutation) ResetStatus()
ResetStatus resets all changes to the "status" field.
func (*ComputeInstanceMutation) SetContainerID ¶
func (m *ComputeInstanceMutation) SetContainerID(s string)
SetContainerID sets the "container_id" field.
func (*ComputeInstanceMutation) SetCore ¶
func (m *ComputeInstanceMutation) SetCore(s string)
SetCore sets the "core" field.
func (*ComputeInstanceMutation) SetExpirationTime ¶
func (m *ComputeInstanceMutation) SetExpirationTime(t time.Time)
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceMutation) SetField ¶
func (m *ComputeInstanceMutation) 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 (*ComputeInstanceMutation) SetID ¶
func (m *ComputeInstanceMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ComputeInstance entities.
func (*ComputeInstanceMutation) SetImage ¶
func (m *ComputeInstanceMutation) SetImage(s string)
SetImage sets the "image" field.
func (*ComputeInstanceMutation) SetMemory ¶
func (m *ComputeInstanceMutation) SetMemory(s string)
SetMemory sets the "memory" field.
func (*ComputeInstanceMutation) SetName ¶
func (m *ComputeInstanceMutation) SetName(s string)
SetName sets the "name" field.
func (*ComputeInstanceMutation) SetOp ¶
func (m *ComputeInstanceMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*ComputeInstanceMutation) SetOwner ¶
func (m *ComputeInstanceMutation) SetOwner(s string)
SetOwner sets the "owner" field.
func (*ComputeInstanceMutation) SetPeerID ¶
func (m *ComputeInstanceMutation) SetPeerID(s string)
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceMutation) SetStatus ¶
func (m *ComputeInstanceMutation) SetStatus(i int8)
SetStatus sets the "status" field.
func (*ComputeInstanceMutation) Status ¶
func (m *ComputeInstanceMutation) Status() (r int8, exists bool)
Status returns the value of the "status" field in the mutation.
func (ComputeInstanceMutation) Tx ¶
func (m ComputeInstanceMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ComputeInstanceMutation) Type ¶
func (m *ComputeInstanceMutation) Type() string
Type returns the node type of this mutation (ComputeInstance).
func (*ComputeInstanceMutation) Where ¶
func (m *ComputeInstanceMutation) Where(ps ...predicate.ComputeInstance)
Where appends a list predicates to the ComputeInstanceMutation builder.
func (*ComputeInstanceMutation) WhereP ¶
func (m *ComputeInstanceMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ComputeInstanceMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ComputeInstanceQuery ¶
type ComputeInstanceQuery struct {
// contains filtered or unexported fields
}
ComputeInstanceQuery is the builder for querying ComputeInstance entities.
func (*ComputeInstanceQuery) Aggregate ¶
func (ciq *ComputeInstanceQuery) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
Aggregate returns a ComputeInstanceSelect configured with the given aggregations.
func (*ComputeInstanceQuery) All ¶
func (ciq *ComputeInstanceQuery) All(ctx context.Context) ([]*ComputeInstance, error)
All executes the query and returns a list of ComputeInstances.
func (*ComputeInstanceQuery) AllX ¶
func (ciq *ComputeInstanceQuery) AllX(ctx context.Context) []*ComputeInstance
AllX is like All, but panics if an error occurs.
func (*ComputeInstanceQuery) Clone ¶
func (ciq *ComputeInstanceQuery) Clone() *ComputeInstanceQuery
Clone returns a duplicate of the ComputeInstanceQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ComputeInstanceQuery) Count ¶
func (ciq *ComputeInstanceQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeInstanceQuery) CountX ¶
func (ciq *ComputeInstanceQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeInstanceQuery) Exist ¶
func (ciq *ComputeInstanceQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeInstanceQuery) ExistX ¶
func (ciq *ComputeInstanceQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeInstanceQuery) First ¶
func (ciq *ComputeInstanceQuery) First(ctx context.Context) (*ComputeInstance, error)
First returns the first ComputeInstance entity from the query. Returns a *NotFoundError when no ComputeInstance was found.
func (*ComputeInstanceQuery) FirstID ¶
FirstID returns the first ComputeInstance ID from the query. Returns a *NotFoundError when no ComputeInstance ID was found.
func (*ComputeInstanceQuery) FirstIDX ¶
func (ciq *ComputeInstanceQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeInstanceQuery) FirstX ¶
func (ciq *ComputeInstanceQuery) FirstX(ctx context.Context) *ComputeInstance
FirstX is like First, but panics if an error occurs.
func (*ComputeInstanceQuery) GroupBy ¶
func (ciq *ComputeInstanceQuery) GroupBy(field string, fields ...string) *ComputeInstanceGroupBy
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 { Owner string `json:"owner,omitempty"` Count int `json:"count,omitempty"` } client.ComputeInstance.Query(). GroupBy(computeinstance.FieldOwner). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ComputeInstanceQuery) IDs ¶
IDs executes the query and returns a list of ComputeInstance IDs.
func (*ComputeInstanceQuery) IDsX ¶
func (ciq *ComputeInstanceQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*ComputeInstanceQuery) Limit ¶
func (ciq *ComputeInstanceQuery) Limit(limit int) *ComputeInstanceQuery
Limit the number of records to be returned by this query.
func (*ComputeInstanceQuery) Offset ¶
func (ciq *ComputeInstanceQuery) Offset(offset int) *ComputeInstanceQuery
Offset to start from.
func (*ComputeInstanceQuery) Only ¶
func (ciq *ComputeInstanceQuery) Only(ctx context.Context) (*ComputeInstance, error)
Only returns a single ComputeInstance entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ComputeInstance entity is found. Returns a *NotFoundError when no ComputeInstance entities are found.
func (*ComputeInstanceQuery) OnlyID ¶
OnlyID is like Only, but returns the only ComputeInstance ID in the query. Returns a *NotSingularError when more than one ComputeInstance ID is found. Returns a *NotFoundError when no entities are found.
func (*ComputeInstanceQuery) OnlyIDX ¶
func (ciq *ComputeInstanceQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeInstanceQuery) OnlyX ¶
func (ciq *ComputeInstanceQuery) OnlyX(ctx context.Context) *ComputeInstance
OnlyX is like Only, but panics if an error occurs.
func (*ComputeInstanceQuery) Order ¶
func (ciq *ComputeInstanceQuery) Order(o ...computeinstance.OrderOption) *ComputeInstanceQuery
Order specifies how the records should be ordered.
func (*ComputeInstanceQuery) Select ¶
func (ciq *ComputeInstanceQuery) Select(fields ...string) *ComputeInstanceSelect
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 { Owner string `json:"owner,omitempty"` } client.ComputeInstance.Query(). Select(computeinstance.FieldOwner). Scan(ctx, &v)
func (*ComputeInstanceQuery) Unique ¶
func (ciq *ComputeInstanceQuery) Unique(unique bool) *ComputeInstanceQuery
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 (*ComputeInstanceQuery) Where ¶
func (ciq *ComputeInstanceQuery) Where(ps ...predicate.ComputeInstance) *ComputeInstanceQuery
Where adds a new predicate for the ComputeInstanceQuery builder.
type ComputeInstanceSelect ¶
type ComputeInstanceSelect struct { *ComputeInstanceQuery // contains filtered or unexported fields }
ComputeInstanceSelect is the builder for selecting fields of ComputeInstance entities.
func (*ComputeInstanceSelect) Aggregate ¶
func (cis *ComputeInstanceSelect) Aggregate(fns ...AggregateFunc) *ComputeInstanceSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ComputeInstanceSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Float64sX ¶
Float64sX is like Float64s, but panics if an error occurs.
func (*ComputeInstanceSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeInstanceSelect) Scan ¶
func (cis *ComputeInstanceSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeInstanceSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeInstanceUpdate ¶
type ComputeInstanceUpdate struct {
// contains filtered or unexported fields
}
ComputeInstanceUpdate is the builder for updating ComputeInstance entities.
func (*ComputeInstanceUpdate) AddStatus ¶
func (ciu *ComputeInstanceUpdate) AddStatus(i int8) *ComputeInstanceUpdate
AddStatus adds i to the "status" field.
func (*ComputeInstanceUpdate) ClearContainerID ¶
func (ciu *ComputeInstanceUpdate) ClearContainerID() *ComputeInstanceUpdate
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceUpdate) ClearPeerID ¶
func (ciu *ComputeInstanceUpdate) ClearPeerID() *ComputeInstanceUpdate
ClearPeerID clears the value of the "peer_id" field.
func (*ComputeInstanceUpdate) Exec ¶
func (ciu *ComputeInstanceUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeInstanceUpdate) ExecX ¶
func (ciu *ComputeInstanceUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceUpdate) Mutation ¶
func (ciu *ComputeInstanceUpdate) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceUpdate) Save ¶
func (ciu *ComputeInstanceUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ComputeInstanceUpdate) SaveX ¶
func (ciu *ComputeInstanceUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeInstanceUpdate) SetContainerID ¶
func (ciu *ComputeInstanceUpdate) SetContainerID(s string) *ComputeInstanceUpdate
SetContainerID sets the "container_id" field.
func (*ComputeInstanceUpdate) SetCore ¶
func (ciu *ComputeInstanceUpdate) SetCore(s string) *ComputeInstanceUpdate
SetCore sets the "core" field.
func (*ComputeInstanceUpdate) SetExpirationTime ¶
func (ciu *ComputeInstanceUpdate) SetExpirationTime(t time.Time) *ComputeInstanceUpdate
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceUpdate) SetImage ¶
func (ciu *ComputeInstanceUpdate) SetImage(s string) *ComputeInstanceUpdate
SetImage sets the "image" field.
func (*ComputeInstanceUpdate) SetMemory ¶
func (ciu *ComputeInstanceUpdate) SetMemory(s string) *ComputeInstanceUpdate
SetMemory sets the "memory" field.
func (*ComputeInstanceUpdate) SetName ¶
func (ciu *ComputeInstanceUpdate) SetName(s string) *ComputeInstanceUpdate
SetName sets the "name" field.
func (*ComputeInstanceUpdate) SetNillableContainerID ¶
func (ciu *ComputeInstanceUpdate) SetNillableContainerID(s *string) *ComputeInstanceUpdate
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetNillablePeerID ¶
func (ciu *ComputeInstanceUpdate) SetNillablePeerID(s *string) *ComputeInstanceUpdate
SetNillablePeerID sets the "peer_id" field if the given value is not nil.
func (*ComputeInstanceUpdate) SetOwner ¶
func (ciu *ComputeInstanceUpdate) SetOwner(s string) *ComputeInstanceUpdate
SetOwner sets the "owner" field.
func (*ComputeInstanceUpdate) SetPeerID ¶
func (ciu *ComputeInstanceUpdate) SetPeerID(s string) *ComputeInstanceUpdate
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceUpdate) SetStatus ¶
func (ciu *ComputeInstanceUpdate) SetStatus(i int8) *ComputeInstanceUpdate
SetStatus sets the "status" field.
func (*ComputeInstanceUpdate) Where ¶
func (ciu *ComputeInstanceUpdate) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdate
Where appends a list predicates to the ComputeInstanceUpdate builder.
type ComputeInstanceUpdateOne ¶
type ComputeInstanceUpdateOne struct {
// contains filtered or unexported fields
}
ComputeInstanceUpdateOne is the builder for updating a single ComputeInstance entity.
func (*ComputeInstanceUpdateOne) AddStatus ¶
func (ciuo *ComputeInstanceUpdateOne) AddStatus(i int8) *ComputeInstanceUpdateOne
AddStatus adds i to the "status" field.
func (*ComputeInstanceUpdateOne) ClearContainerID ¶
func (ciuo *ComputeInstanceUpdateOne) ClearContainerID() *ComputeInstanceUpdateOne
ClearContainerID clears the value of the "container_id" field.
func (*ComputeInstanceUpdateOne) ClearPeerID ¶
func (ciuo *ComputeInstanceUpdateOne) ClearPeerID() *ComputeInstanceUpdateOne
ClearPeerID clears the value of the "peer_id" field.
func (*ComputeInstanceUpdateOne) Exec ¶
func (ciuo *ComputeInstanceUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeInstanceUpdateOne) ExecX ¶
func (ciuo *ComputeInstanceUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeInstanceUpdateOne) Mutation ¶
func (ciuo *ComputeInstanceUpdateOne) Mutation() *ComputeInstanceMutation
Mutation returns the ComputeInstanceMutation object of the builder.
func (*ComputeInstanceUpdateOne) Save ¶
func (ciuo *ComputeInstanceUpdateOne) Save(ctx context.Context) (*ComputeInstance, error)
Save executes the query and returns the updated ComputeInstance entity.
func (*ComputeInstanceUpdateOne) SaveX ¶
func (ciuo *ComputeInstanceUpdateOne) SaveX(ctx context.Context) *ComputeInstance
SaveX is like Save, but panics if an error occurs.
func (*ComputeInstanceUpdateOne) Select ¶
func (ciuo *ComputeInstanceUpdateOne) Select(field string, fields ...string) *ComputeInstanceUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ComputeInstanceUpdateOne) SetContainerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetContainerID(s string) *ComputeInstanceUpdateOne
SetContainerID sets the "container_id" field.
func (*ComputeInstanceUpdateOne) SetCore ¶
func (ciuo *ComputeInstanceUpdateOne) SetCore(s string) *ComputeInstanceUpdateOne
SetCore sets the "core" field.
func (*ComputeInstanceUpdateOne) SetExpirationTime ¶
func (ciuo *ComputeInstanceUpdateOne) SetExpirationTime(t time.Time) *ComputeInstanceUpdateOne
SetExpirationTime sets the "expiration_time" field.
func (*ComputeInstanceUpdateOne) SetImage ¶
func (ciuo *ComputeInstanceUpdateOne) SetImage(s string) *ComputeInstanceUpdateOne
SetImage sets the "image" field.
func (*ComputeInstanceUpdateOne) SetMemory ¶
func (ciuo *ComputeInstanceUpdateOne) SetMemory(s string) *ComputeInstanceUpdateOne
SetMemory sets the "memory" field.
func (*ComputeInstanceUpdateOne) SetName ¶
func (ciuo *ComputeInstanceUpdateOne) SetName(s string) *ComputeInstanceUpdateOne
SetName sets the "name" field.
func (*ComputeInstanceUpdateOne) SetNillableContainerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetNillableContainerID(s *string) *ComputeInstanceUpdateOne
SetNillableContainerID sets the "container_id" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetNillablePeerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetNillablePeerID(s *string) *ComputeInstanceUpdateOne
SetNillablePeerID sets the "peer_id" field if the given value is not nil.
func (*ComputeInstanceUpdateOne) SetOwner ¶
func (ciuo *ComputeInstanceUpdateOne) SetOwner(s string) *ComputeInstanceUpdateOne
SetOwner sets the "owner" field.
func (*ComputeInstanceUpdateOne) SetPeerID ¶
func (ciuo *ComputeInstanceUpdateOne) SetPeerID(s string) *ComputeInstanceUpdateOne
SetPeerID sets the "peer_id" field.
func (*ComputeInstanceUpdateOne) SetStatus ¶
func (ciuo *ComputeInstanceUpdateOne) SetStatus(i int8) *ComputeInstanceUpdateOne
SetStatus sets the "status" field.
func (*ComputeInstanceUpdateOne) Where ¶
func (ciuo *ComputeInstanceUpdateOne) Where(ps ...predicate.ComputeInstance) *ComputeInstanceUpdateOne
Where appends a list predicates to the ComputeInstanceUpdate builder.
type ComputeInstances ¶
type ComputeInstances []*ComputeInstance
ComputeInstances is a parsable slice of ComputeInstance.
type ComputeSpec ¶
type ComputeSpec struct { // ID of the ent. ID int32 `json:"id,omitempty"` // Core holds the value of the "core" field. Core string `json:"core,omitempty"` // Memory holds the value of the "memory" field. Memory string `json:"memory,omitempty"` // contains filtered or unexported fields }
ComputeSpec is the model entity for the ComputeSpec schema.
func (*ComputeSpec) String ¶
func (cs *ComputeSpec) String() string
String implements the fmt.Stringer.
func (*ComputeSpec) Unwrap ¶
func (cs *ComputeSpec) Unwrap() *ComputeSpec
Unwrap unwraps the ComputeSpec 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 (*ComputeSpec) Update ¶
func (cs *ComputeSpec) Update() *ComputeSpecUpdateOne
Update returns a builder for updating this ComputeSpec. Note that you need to call ComputeSpec.Unwrap() before calling this method if this ComputeSpec was returned from a transaction, and the transaction was committed or rolled back.
type ComputeSpecClient ¶
type ComputeSpecClient struct {
// contains filtered or unexported fields
}
ComputeSpecClient is a client for the ComputeSpec schema.
func NewComputeSpecClient ¶
func NewComputeSpecClient(c config) *ComputeSpecClient
NewComputeSpecClient returns a client for the ComputeSpec from the given config.
func (*ComputeSpecClient) Create ¶
func (c *ComputeSpecClient) Create() *ComputeSpecCreate
Create returns a builder for creating a ComputeSpec entity.
func (*ComputeSpecClient) CreateBulk ¶
func (c *ComputeSpecClient) CreateBulk(builders ...*ComputeSpecCreate) *ComputeSpecCreateBulk
CreateBulk returns a builder for creating a bulk of ComputeSpec entities.
func (*ComputeSpecClient) Delete ¶
func (c *ComputeSpecClient) Delete() *ComputeSpecDelete
Delete returns a delete builder for ComputeSpec.
func (*ComputeSpecClient) DeleteOne ¶
func (c *ComputeSpecClient) DeleteOne(cs *ComputeSpec) *ComputeSpecDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*ComputeSpecClient) DeleteOneID ¶
func (c *ComputeSpecClient) DeleteOneID(id int32) *ComputeSpecDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*ComputeSpecClient) Get ¶
func (c *ComputeSpecClient) Get(ctx context.Context, id int32) (*ComputeSpec, error)
Get returns a ComputeSpec entity by its id.
func (*ComputeSpecClient) GetX ¶
func (c *ComputeSpecClient) GetX(ctx context.Context, id int32) *ComputeSpec
GetX is like Get, but panics if an error occurs.
func (*ComputeSpecClient) Hooks ¶
func (c *ComputeSpecClient) Hooks() []Hook
Hooks returns the client hooks.
func (*ComputeSpecClient) Intercept ¶
func (c *ComputeSpecClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `computespec.Intercept(f(g(h())))`.
func (*ComputeSpecClient) Interceptors ¶
func (c *ComputeSpecClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*ComputeSpecClient) Query ¶
func (c *ComputeSpecClient) Query() *ComputeSpecQuery
Query returns a query builder for ComputeSpec.
func (*ComputeSpecClient) Update ¶
func (c *ComputeSpecClient) Update() *ComputeSpecUpdate
Update returns an update builder for ComputeSpec.
func (*ComputeSpecClient) UpdateOne ¶
func (c *ComputeSpecClient) UpdateOne(cs *ComputeSpec) *ComputeSpecUpdateOne
UpdateOne returns an update builder for the given entity.
func (*ComputeSpecClient) UpdateOneID ¶
func (c *ComputeSpecClient) UpdateOneID(id int32) *ComputeSpecUpdateOne
UpdateOneID returns an update builder for the given id.
func (*ComputeSpecClient) Use ¶
func (c *ComputeSpecClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `computespec.Hooks(f(g(h())))`.
type ComputeSpecCreate ¶
type ComputeSpecCreate struct {
// contains filtered or unexported fields
}
ComputeSpecCreate is the builder for creating a ComputeSpec entity.
func (*ComputeSpecCreate) Exec ¶
func (csc *ComputeSpecCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecCreate) ExecX ¶
func (csc *ComputeSpecCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecCreate) Mutation ¶
func (csc *ComputeSpecCreate) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecCreate) Save ¶
func (csc *ComputeSpecCreate) Save(ctx context.Context) (*ComputeSpec, error)
Save creates the ComputeSpec in the database.
func (*ComputeSpecCreate) SaveX ¶
func (csc *ComputeSpecCreate) SaveX(ctx context.Context) *ComputeSpec
SaveX calls Save and panics if Save returns an error.
func (*ComputeSpecCreate) SetCore ¶
func (csc *ComputeSpecCreate) SetCore(s string) *ComputeSpecCreate
SetCore sets the "core" field.
func (*ComputeSpecCreate) SetID ¶
func (csc *ComputeSpecCreate) SetID(i int32) *ComputeSpecCreate
SetID sets the "id" field.
func (*ComputeSpecCreate) SetMemory ¶
func (csc *ComputeSpecCreate) SetMemory(s string) *ComputeSpecCreate
SetMemory sets the "memory" field.
type ComputeSpecCreateBulk ¶
type ComputeSpecCreateBulk struct {
// contains filtered or unexported fields
}
ComputeSpecCreateBulk is the builder for creating many ComputeSpec entities in bulk.
func (*ComputeSpecCreateBulk) Exec ¶
func (cscb *ComputeSpecCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecCreateBulk) ExecX ¶
func (cscb *ComputeSpecCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecCreateBulk) Save ¶
func (cscb *ComputeSpecCreateBulk) Save(ctx context.Context) ([]*ComputeSpec, error)
Save creates the ComputeSpec entities in the database.
func (*ComputeSpecCreateBulk) SaveX ¶
func (cscb *ComputeSpecCreateBulk) SaveX(ctx context.Context) []*ComputeSpec
SaveX is like Save, but panics if an error occurs.
type ComputeSpecDelete ¶
type ComputeSpecDelete struct {
// contains filtered or unexported fields
}
ComputeSpecDelete is the builder for deleting a ComputeSpec entity.
func (*ComputeSpecDelete) Exec ¶
func (csd *ComputeSpecDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*ComputeSpecDelete) ExecX ¶
func (csd *ComputeSpecDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecDelete) Where ¶
func (csd *ComputeSpecDelete) Where(ps ...predicate.ComputeSpec) *ComputeSpecDelete
Where appends a list predicates to the ComputeSpecDelete builder.
type ComputeSpecDeleteOne ¶
type ComputeSpecDeleteOne struct {
// contains filtered or unexported fields
}
ComputeSpecDeleteOne is the builder for deleting a single ComputeSpec entity.
func (*ComputeSpecDeleteOne) Exec ¶
func (csdo *ComputeSpecDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*ComputeSpecDeleteOne) ExecX ¶
func (csdo *ComputeSpecDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecDeleteOne) Where ¶
func (csdo *ComputeSpecDeleteOne) Where(ps ...predicate.ComputeSpec) *ComputeSpecDeleteOne
Where appends a list predicates to the ComputeSpecDelete builder.
type ComputeSpecGroupBy ¶
type ComputeSpecGroupBy struct {
// contains filtered or unexported fields
}
ComputeSpecGroupBy is the group-by builder for ComputeSpec entities.
func (*ComputeSpecGroupBy) Aggregate ¶
func (csgb *ComputeSpecGroupBy) Aggregate(fns ...AggregateFunc) *ComputeSpecGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*ComputeSpecGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeSpecGroupBy) Scan ¶
func (csgb *ComputeSpecGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeSpecGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeSpecMutation ¶
type ComputeSpecMutation struct {
// contains filtered or unexported fields
}
ComputeSpecMutation represents an operation that mutates the ComputeSpec nodes in the graph.
func (*ComputeSpecMutation) AddField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) AddedEdges ¶
func (m *ComputeSpecMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*ComputeSpecMutation) AddedField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) AddedFields ¶
func (m *ComputeSpecMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*ComputeSpecMutation) AddedIDs ¶
func (m *ComputeSpecMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*ComputeSpecMutation) ClearEdge ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ClearField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ClearedEdges ¶
func (m *ComputeSpecMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*ComputeSpecMutation) ClearedFields ¶
func (m *ComputeSpecMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (ComputeSpecMutation) Client ¶
func (m ComputeSpecMutation) 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 (*ComputeSpecMutation) Core ¶
func (m *ComputeSpecMutation) Core() (r string, exists bool)
Core returns the value of the "core" field in the mutation.
func (*ComputeSpecMutation) EdgeCleared ¶
func (m *ComputeSpecMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*ComputeSpecMutation) Field ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) FieldCleared ¶
func (m *ComputeSpecMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*ComputeSpecMutation) Fields ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ID ¶
func (m *ComputeSpecMutation) ID() (id int32, 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 (*ComputeSpecMutation) IDs ¶
func (m *ComputeSpecMutation) IDs(ctx context.Context) ([]int32, 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 (*ComputeSpecMutation) Memory ¶
func (m *ComputeSpecMutation) Memory() (r string, exists bool)
Memory returns the value of the "memory" field in the mutation.
func (*ComputeSpecMutation) OldCore ¶
func (m *ComputeSpecMutation) OldCore(ctx context.Context) (v string, err error)
OldCore returns the old "core" field's value of the ComputeSpec entity. If the ComputeSpec 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 (*ComputeSpecMutation) 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 (*ComputeSpecMutation) OldMemory ¶
func (m *ComputeSpecMutation) OldMemory(ctx context.Context) (v string, err error)
OldMemory returns the old "memory" field's value of the ComputeSpec entity. If the ComputeSpec 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 (*ComputeSpecMutation) Op ¶
func (m *ComputeSpecMutation) Op() Op
Op returns the operation name.
func (*ComputeSpecMutation) RemovedEdges ¶
func (m *ComputeSpecMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*ComputeSpecMutation) RemovedIDs ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ResetCore ¶
func (m *ComputeSpecMutation) ResetCore()
ResetCore resets all changes to the "core" field.
func (*ComputeSpecMutation) ResetEdge ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ResetField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) ResetMemory ¶
func (m *ComputeSpecMutation) ResetMemory()
ResetMemory resets all changes to the "memory" field.
func (*ComputeSpecMutation) SetCore ¶
func (m *ComputeSpecMutation) SetCore(s string)
SetCore sets the "core" field.
func (*ComputeSpecMutation) SetField ¶
func (m *ComputeSpecMutation) 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 (*ComputeSpecMutation) SetID ¶
func (m *ComputeSpecMutation) SetID(id int32)
SetID sets the value of the id field. Note that this operation is only accepted on creation of ComputeSpec entities.
func (*ComputeSpecMutation) SetMemory ¶
func (m *ComputeSpecMutation) SetMemory(s string)
SetMemory sets the "memory" field.
func (*ComputeSpecMutation) SetOp ¶
func (m *ComputeSpecMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (ComputeSpecMutation) Tx ¶
func (m ComputeSpecMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*ComputeSpecMutation) Type ¶
func (m *ComputeSpecMutation) Type() string
Type returns the node type of this mutation (ComputeSpec).
func (*ComputeSpecMutation) Where ¶
func (m *ComputeSpecMutation) Where(ps ...predicate.ComputeSpec)
Where appends a list predicates to the ComputeSpecMutation builder.
func (*ComputeSpecMutation) WhereP ¶
func (m *ComputeSpecMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the ComputeSpecMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type ComputeSpecQuery ¶
type ComputeSpecQuery struct {
// contains filtered or unexported fields
}
ComputeSpecQuery is the builder for querying ComputeSpec entities.
func (*ComputeSpecQuery) Aggregate ¶
func (csq *ComputeSpecQuery) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
Aggregate returns a ComputeSpecSelect configured with the given aggregations.
func (*ComputeSpecQuery) All ¶
func (csq *ComputeSpecQuery) All(ctx context.Context) ([]*ComputeSpec, error)
All executes the query and returns a list of ComputeSpecs.
func (*ComputeSpecQuery) AllX ¶
func (csq *ComputeSpecQuery) AllX(ctx context.Context) []*ComputeSpec
AllX is like All, but panics if an error occurs.
func (*ComputeSpecQuery) Clone ¶
func (csq *ComputeSpecQuery) Clone() *ComputeSpecQuery
Clone returns a duplicate of the ComputeSpecQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*ComputeSpecQuery) Count ¶
func (csq *ComputeSpecQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*ComputeSpecQuery) CountX ¶
func (csq *ComputeSpecQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*ComputeSpecQuery) Exist ¶
func (csq *ComputeSpecQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*ComputeSpecQuery) ExistX ¶
func (csq *ComputeSpecQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*ComputeSpecQuery) First ¶
func (csq *ComputeSpecQuery) First(ctx context.Context) (*ComputeSpec, error)
First returns the first ComputeSpec entity from the query. Returns a *NotFoundError when no ComputeSpec was found.
func (*ComputeSpecQuery) FirstID ¶
func (csq *ComputeSpecQuery) FirstID(ctx context.Context) (id int32, err error)
FirstID returns the first ComputeSpec ID from the query. Returns a *NotFoundError when no ComputeSpec ID was found.
func (*ComputeSpecQuery) FirstIDX ¶
func (csq *ComputeSpecQuery) FirstIDX(ctx context.Context) int32
FirstIDX is like FirstID, but panics if an error occurs.
func (*ComputeSpecQuery) FirstX ¶
func (csq *ComputeSpecQuery) FirstX(ctx context.Context) *ComputeSpec
FirstX is like First, but panics if an error occurs.
func (*ComputeSpecQuery) GroupBy ¶
func (csq *ComputeSpecQuery) GroupBy(field string, fields ...string) *ComputeSpecGroupBy
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 { Core string `json:"core,omitempty"` Count int `json:"count,omitempty"` } client.ComputeSpec.Query(). GroupBy(computespec.FieldCore). Aggregate(ent.Count()). Scan(ctx, &v)
func (*ComputeSpecQuery) IDs ¶
func (csq *ComputeSpecQuery) IDs(ctx context.Context) (ids []int32, err error)
IDs executes the query and returns a list of ComputeSpec IDs.
func (*ComputeSpecQuery) IDsX ¶
func (csq *ComputeSpecQuery) IDsX(ctx context.Context) []int32
IDsX is like IDs, but panics if an error occurs.
func (*ComputeSpecQuery) Limit ¶
func (csq *ComputeSpecQuery) Limit(limit int) *ComputeSpecQuery
Limit the number of records to be returned by this query.
func (*ComputeSpecQuery) Offset ¶
func (csq *ComputeSpecQuery) Offset(offset int) *ComputeSpecQuery
Offset to start from.
func (*ComputeSpecQuery) Only ¶
func (csq *ComputeSpecQuery) Only(ctx context.Context) (*ComputeSpec, error)
Only returns a single ComputeSpec entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ComputeSpec entity is found. Returns a *NotFoundError when no ComputeSpec entities are found.
func (*ComputeSpecQuery) OnlyID ¶
func (csq *ComputeSpecQuery) OnlyID(ctx context.Context) (id int32, err error)
OnlyID is like Only, but returns the only ComputeSpec ID in the query. Returns a *NotSingularError when more than one ComputeSpec ID is found. Returns a *NotFoundError when no entities are found.
func (*ComputeSpecQuery) OnlyIDX ¶
func (csq *ComputeSpecQuery) OnlyIDX(ctx context.Context) int32
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*ComputeSpecQuery) OnlyX ¶
func (csq *ComputeSpecQuery) OnlyX(ctx context.Context) *ComputeSpec
OnlyX is like Only, but panics if an error occurs.
func (*ComputeSpecQuery) Order ¶
func (csq *ComputeSpecQuery) Order(o ...computespec.OrderOption) *ComputeSpecQuery
Order specifies how the records should be ordered.
func (*ComputeSpecQuery) Select ¶
func (csq *ComputeSpecQuery) Select(fields ...string) *ComputeSpecSelect
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 { Core string `json:"core,omitempty"` } client.ComputeSpec.Query(). Select(computespec.FieldCore). Scan(ctx, &v)
func (*ComputeSpecQuery) Unique ¶
func (csq *ComputeSpecQuery) Unique(unique bool) *ComputeSpecQuery
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 (*ComputeSpecQuery) Where ¶
func (csq *ComputeSpecQuery) Where(ps ...predicate.ComputeSpec) *ComputeSpecQuery
Where adds a new predicate for the ComputeSpecQuery builder.
type ComputeSpecSelect ¶
type ComputeSpecSelect struct { *ComputeSpecQuery // contains filtered or unexported fields }
ComputeSpecSelect is the builder for selecting fields of ComputeSpec entities.
func (*ComputeSpecSelect) Aggregate ¶
func (css *ComputeSpecSelect) Aggregate(fns ...AggregateFunc) *ComputeSpecSelect
Aggregate adds the given aggregation functions to the selector query.
func (*ComputeSpecSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*ComputeSpecSelect) Scan ¶
func (css *ComputeSpecSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*ComputeSpecSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type ComputeSpecUpdate ¶
type ComputeSpecUpdate struct {
// contains filtered or unexported fields
}
ComputeSpecUpdate is the builder for updating ComputeSpec entities.
func (*ComputeSpecUpdate) Exec ¶
func (csu *ComputeSpecUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*ComputeSpecUpdate) ExecX ¶
func (csu *ComputeSpecUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecUpdate) Mutation ¶
func (csu *ComputeSpecUpdate) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecUpdate) Save ¶
func (csu *ComputeSpecUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*ComputeSpecUpdate) SaveX ¶
func (csu *ComputeSpecUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecUpdate) SetCore ¶
func (csu *ComputeSpecUpdate) SetCore(s string) *ComputeSpecUpdate
SetCore sets the "core" field.
func (*ComputeSpecUpdate) SetMemory ¶
func (csu *ComputeSpecUpdate) SetMemory(s string) *ComputeSpecUpdate
SetMemory sets the "memory" field.
func (*ComputeSpecUpdate) Where ¶
func (csu *ComputeSpecUpdate) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdate
Where appends a list predicates to the ComputeSpecUpdate builder.
type ComputeSpecUpdateOne ¶
type ComputeSpecUpdateOne struct {
// contains filtered or unexported fields
}
ComputeSpecUpdateOne is the builder for updating a single ComputeSpec entity.
func (*ComputeSpecUpdateOne) Exec ¶
func (csuo *ComputeSpecUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*ComputeSpecUpdateOne) ExecX ¶
func (csuo *ComputeSpecUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*ComputeSpecUpdateOne) Mutation ¶
func (csuo *ComputeSpecUpdateOne) Mutation() *ComputeSpecMutation
Mutation returns the ComputeSpecMutation object of the builder.
func (*ComputeSpecUpdateOne) Save ¶
func (csuo *ComputeSpecUpdateOne) Save(ctx context.Context) (*ComputeSpec, error)
Save executes the query and returns the updated ComputeSpec entity.
func (*ComputeSpecUpdateOne) SaveX ¶
func (csuo *ComputeSpecUpdateOne) SaveX(ctx context.Context) *ComputeSpec
SaveX is like Save, but panics if an error occurs.
func (*ComputeSpecUpdateOne) Select ¶
func (csuo *ComputeSpecUpdateOne) Select(field string, fields ...string) *ComputeSpecUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*ComputeSpecUpdateOne) SetCore ¶
func (csuo *ComputeSpecUpdateOne) SetCore(s string) *ComputeSpecUpdateOne
SetCore sets the "core" field.
func (*ComputeSpecUpdateOne) SetMemory ¶
func (csuo *ComputeSpecUpdateOne) SetMemory(s string) *ComputeSpecUpdateOne
SetMemory sets the "memory" field.
func (*ComputeSpecUpdateOne) Where ¶
func (csuo *ComputeSpecUpdateOne) Where(ps ...predicate.ComputeSpec) *ComputeSpecUpdateOne
Where appends a list predicates to the ComputeSpecUpdate builder.
type ComputeSpecs ¶
type ComputeSpecs []*ComputeSpec
ComputeSpecs is a parsable slice of ComputeSpec.
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 Employee ¶
type Employee struct { // ID of the ent. ID int `json:"id,omitempty"` // Name holds the value of the "name" field. Name string `json:"name,omitempty"` // Age holds the value of the "age" field. Age int32 `json:"age,omitempty"` // contains filtered or unexported fields }
Employee is the model entity for the Employee schema.
func (*Employee) Unwrap ¶
Unwrap unwraps the Employee 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 (*Employee) Update ¶
func (e *Employee) Update() *EmployeeUpdateOne
Update returns a builder for updating this Employee. Note that you need to call Employee.Unwrap() before calling this method if this Employee was returned from a transaction, and the transaction was committed or rolled back.
type EmployeeClient ¶
type EmployeeClient struct {
// contains filtered or unexported fields
}
EmployeeClient is a client for the Employee schema.
func NewEmployeeClient ¶
func NewEmployeeClient(c config) *EmployeeClient
NewEmployeeClient returns a client for the Employee from the given config.
func (*EmployeeClient) Create ¶
func (c *EmployeeClient) Create() *EmployeeCreate
Create returns a builder for creating a Employee entity.
func (*EmployeeClient) CreateBulk ¶
func (c *EmployeeClient) CreateBulk(builders ...*EmployeeCreate) *EmployeeCreateBulk
CreateBulk returns a builder for creating a bulk of Employee entities.
func (*EmployeeClient) Delete ¶
func (c *EmployeeClient) Delete() *EmployeeDelete
Delete returns a delete builder for Employee.
func (*EmployeeClient) DeleteOne ¶
func (c *EmployeeClient) DeleteOne(e *Employee) *EmployeeDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*EmployeeClient) DeleteOneID ¶
func (c *EmployeeClient) DeleteOneID(id int) *EmployeeDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*EmployeeClient) GetX ¶
func (c *EmployeeClient) GetX(ctx context.Context, id int) *Employee
GetX is like Get, but panics if an error occurs.
func (*EmployeeClient) Hooks ¶
func (c *EmployeeClient) Hooks() []Hook
Hooks returns the client hooks.
func (*EmployeeClient) Intercept ¶
func (c *EmployeeClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `employee.Intercept(f(g(h())))`.
func (*EmployeeClient) Interceptors ¶
func (c *EmployeeClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*EmployeeClient) Query ¶
func (c *EmployeeClient) Query() *EmployeeQuery
Query returns a query builder for Employee.
func (*EmployeeClient) Update ¶
func (c *EmployeeClient) Update() *EmployeeUpdate
Update returns an update builder for Employee.
func (*EmployeeClient) UpdateOne ¶
func (c *EmployeeClient) UpdateOne(e *Employee) *EmployeeUpdateOne
UpdateOne returns an update builder for the given entity.
func (*EmployeeClient) UpdateOneID ¶
func (c *EmployeeClient) UpdateOneID(id int) *EmployeeUpdateOne
UpdateOneID returns an update builder for the given id.
func (*EmployeeClient) Use ¶
func (c *EmployeeClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `employee.Hooks(f(g(h())))`.
type EmployeeCreate ¶
type EmployeeCreate struct {
// contains filtered or unexported fields
}
EmployeeCreate is the builder for creating a Employee entity.
func (*EmployeeCreate) Exec ¶
func (ec *EmployeeCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeCreate) ExecX ¶
func (ec *EmployeeCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeCreate) Mutation ¶
func (ec *EmployeeCreate) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeCreate) Save ¶
func (ec *EmployeeCreate) Save(ctx context.Context) (*Employee, error)
Save creates the Employee in the database.
func (*EmployeeCreate) SaveX ¶
func (ec *EmployeeCreate) SaveX(ctx context.Context) *Employee
SaveX calls Save and panics if Save returns an error.
func (*EmployeeCreate) SetAge ¶
func (ec *EmployeeCreate) SetAge(i int32) *EmployeeCreate
SetAge sets the "age" field.
func (*EmployeeCreate) SetName ¶
func (ec *EmployeeCreate) SetName(s string) *EmployeeCreate
SetName sets the "name" field.
func (*EmployeeCreate) SetNillableAge ¶
func (ec *EmployeeCreate) SetNillableAge(i *int32) *EmployeeCreate
SetNillableAge sets the "age" field if the given value is not nil.
type EmployeeCreateBulk ¶
type EmployeeCreateBulk struct {
// contains filtered or unexported fields
}
EmployeeCreateBulk is the builder for creating many Employee entities in bulk.
func (*EmployeeCreateBulk) Exec ¶
func (ecb *EmployeeCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeCreateBulk) ExecX ¶
func (ecb *EmployeeCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type EmployeeDelete ¶
type EmployeeDelete struct {
// contains filtered or unexported fields
}
EmployeeDelete is the builder for deleting a Employee entity.
func (*EmployeeDelete) Exec ¶
func (ed *EmployeeDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*EmployeeDelete) ExecX ¶
func (ed *EmployeeDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeDelete) Where ¶
func (ed *EmployeeDelete) Where(ps ...predicate.Employee) *EmployeeDelete
Where appends a list predicates to the EmployeeDelete builder.
type EmployeeDeleteOne ¶
type EmployeeDeleteOne struct {
// contains filtered or unexported fields
}
EmployeeDeleteOne is the builder for deleting a single Employee entity.
func (*EmployeeDeleteOne) Exec ¶
func (edo *EmployeeDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*EmployeeDeleteOne) ExecX ¶
func (edo *EmployeeDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeDeleteOne) Where ¶
func (edo *EmployeeDeleteOne) Where(ps ...predicate.Employee) *EmployeeDeleteOne
Where appends a list predicates to the EmployeeDelete builder.
type EmployeeGroupBy ¶
type EmployeeGroupBy struct {
// contains filtered or unexported fields
}
EmployeeGroupBy is the group-by builder for Employee entities.
func (*EmployeeGroupBy) Aggregate ¶
func (egb *EmployeeGroupBy) Aggregate(fns ...AggregateFunc) *EmployeeGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*EmployeeGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EmployeeGroupBy) Scan ¶
func (egb *EmployeeGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmployeeGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmployeeMutation ¶
type EmployeeMutation struct {
// contains filtered or unexported fields
}
EmployeeMutation represents an operation that mutates the Employee nodes in the graph.
func (*EmployeeMutation) AddAge ¶
func (m *EmployeeMutation) AddAge(i int32)
AddAge adds i to the "age" field.
func (*EmployeeMutation) AddField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) AddedAge ¶
func (m *EmployeeMutation) AddedAge() (r int32, exists bool)
AddedAge returns the value that was added to the "age" field in this mutation.
func (*EmployeeMutation) AddedEdges ¶
func (m *EmployeeMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*EmployeeMutation) AddedField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) AddedFields ¶
func (m *EmployeeMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*EmployeeMutation) AddedIDs ¶
func (m *EmployeeMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*EmployeeMutation) Age ¶
func (m *EmployeeMutation) Age() (r int32, exists bool)
Age returns the value of the "age" field in the mutation.
func (*EmployeeMutation) AgeCleared ¶
func (m *EmployeeMutation) AgeCleared() bool
AgeCleared returns if the "age" field was cleared in this mutation.
func (*EmployeeMutation) ClearAge ¶
func (m *EmployeeMutation) ClearAge()
ClearAge clears the value of the "age" field.
func (*EmployeeMutation) ClearEdge ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ClearField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ClearedEdges ¶
func (m *EmployeeMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*EmployeeMutation) ClearedFields ¶
func (m *EmployeeMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (EmployeeMutation) Client ¶
func (m EmployeeMutation) 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 (*EmployeeMutation) EdgeCleared ¶
func (m *EmployeeMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*EmployeeMutation) Field ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) FieldCleared ¶
func (m *EmployeeMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*EmployeeMutation) Fields ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ID ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) IDs ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) Name ¶
func (m *EmployeeMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*EmployeeMutation) OldAge ¶
func (m *EmployeeMutation) OldAge(ctx context.Context) (v int32, err error)
OldAge returns the old "age" field's value of the Employee entity. If the Employee 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 (*EmployeeMutation) 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 (*EmployeeMutation) OldName ¶
func (m *EmployeeMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Employee entity. If the Employee 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 (*EmployeeMutation) RemovedEdges ¶
func (m *EmployeeMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*EmployeeMutation) RemovedIDs ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ResetAge ¶
func (m *EmployeeMutation) ResetAge()
ResetAge resets all changes to the "age" field.
func (*EmployeeMutation) ResetEdge ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ResetField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) ResetName ¶
func (m *EmployeeMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*EmployeeMutation) SetAge ¶
func (m *EmployeeMutation) SetAge(i int32)
SetAge sets the "age" field.
func (*EmployeeMutation) SetField ¶
func (m *EmployeeMutation) 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 (*EmployeeMutation) SetName ¶
func (m *EmployeeMutation) SetName(s string)
SetName sets the "name" field.
func (*EmployeeMutation) SetOp ¶
func (m *EmployeeMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (EmployeeMutation) Tx ¶
func (m EmployeeMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*EmployeeMutation) Type ¶
func (m *EmployeeMutation) Type() string
Type returns the node type of this mutation (Employee).
func (*EmployeeMutation) Where ¶
func (m *EmployeeMutation) Where(ps ...predicate.Employee)
Where appends a list predicates to the EmployeeMutation builder.
func (*EmployeeMutation) WhereP ¶
func (m *EmployeeMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the EmployeeMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type EmployeeQuery ¶
type EmployeeQuery struct {
// contains filtered or unexported fields
}
EmployeeQuery is the builder for querying Employee entities.
func (*EmployeeQuery) Aggregate ¶
func (eq *EmployeeQuery) Aggregate(fns ...AggregateFunc) *EmployeeSelect
Aggregate returns a EmployeeSelect configured with the given aggregations.
func (*EmployeeQuery) All ¶
func (eq *EmployeeQuery) All(ctx context.Context) ([]*Employee, error)
All executes the query and returns a list of Employees.
func (*EmployeeQuery) AllX ¶
func (eq *EmployeeQuery) AllX(ctx context.Context) []*Employee
AllX is like All, but panics if an error occurs.
func (*EmployeeQuery) Clone ¶
func (eq *EmployeeQuery) Clone() *EmployeeQuery
Clone returns a duplicate of the EmployeeQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*EmployeeQuery) Count ¶
func (eq *EmployeeQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*EmployeeQuery) CountX ¶
func (eq *EmployeeQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*EmployeeQuery) Exist ¶
func (eq *EmployeeQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*EmployeeQuery) ExistX ¶
func (eq *EmployeeQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*EmployeeQuery) First ¶
func (eq *EmployeeQuery) First(ctx context.Context) (*Employee, error)
First returns the first Employee entity from the query. Returns a *NotFoundError when no Employee was found.
func (*EmployeeQuery) FirstID ¶
func (eq *EmployeeQuery) FirstID(ctx context.Context) (id int, err error)
FirstID returns the first Employee ID from the query. Returns a *NotFoundError when no Employee ID was found.
func (*EmployeeQuery) FirstIDX ¶
func (eq *EmployeeQuery) FirstIDX(ctx context.Context) int
FirstIDX is like FirstID, but panics if an error occurs.
func (*EmployeeQuery) FirstX ¶
func (eq *EmployeeQuery) FirstX(ctx context.Context) *Employee
FirstX is like First, but panics if an error occurs.
func (*EmployeeQuery) GroupBy ¶
func (eq *EmployeeQuery) GroupBy(field string, fields ...string) *EmployeeGroupBy
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.Employee.Query(). GroupBy(employee.FieldName). Aggregate(ent.Count()). Scan(ctx, &v)
func (*EmployeeQuery) IDs ¶
func (eq *EmployeeQuery) IDs(ctx context.Context) (ids []int, err error)
IDs executes the query and returns a list of Employee IDs.
func (*EmployeeQuery) IDsX ¶
func (eq *EmployeeQuery) IDsX(ctx context.Context) []int
IDsX is like IDs, but panics if an error occurs.
func (*EmployeeQuery) Limit ¶
func (eq *EmployeeQuery) Limit(limit int) *EmployeeQuery
Limit the number of records to be returned by this query.
func (*EmployeeQuery) Offset ¶
func (eq *EmployeeQuery) Offset(offset int) *EmployeeQuery
Offset to start from.
func (*EmployeeQuery) Only ¶
func (eq *EmployeeQuery) Only(ctx context.Context) (*Employee, error)
Only returns a single Employee entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Employee entity is found. Returns a *NotFoundError when no Employee entities are found.
func (*EmployeeQuery) OnlyID ¶
func (eq *EmployeeQuery) OnlyID(ctx context.Context) (id int, err error)
OnlyID is like Only, but returns the only Employee ID in the query. Returns a *NotSingularError when more than one Employee ID is found. Returns a *NotFoundError when no entities are found.
func (*EmployeeQuery) OnlyIDX ¶
func (eq *EmployeeQuery) OnlyIDX(ctx context.Context) int
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*EmployeeQuery) OnlyX ¶
func (eq *EmployeeQuery) OnlyX(ctx context.Context) *Employee
OnlyX is like Only, but panics if an error occurs.
func (*EmployeeQuery) Order ¶
func (eq *EmployeeQuery) Order(o ...employee.OrderOption) *EmployeeQuery
Order specifies how the records should be ordered.
func (*EmployeeQuery) Select ¶
func (eq *EmployeeQuery) Select(fields ...string) *EmployeeSelect
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.Employee.Query(). Select(employee.FieldName). Scan(ctx, &v)
func (*EmployeeQuery) Unique ¶
func (eq *EmployeeQuery) Unique(unique bool) *EmployeeQuery
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 (*EmployeeQuery) Where ¶
func (eq *EmployeeQuery) Where(ps ...predicate.Employee) *EmployeeQuery
Where adds a new predicate for the EmployeeQuery builder.
type EmployeeSelect ¶
type EmployeeSelect struct { *EmployeeQuery // contains filtered or unexported fields }
EmployeeSelect is the builder for selecting fields of Employee entities.
func (*EmployeeSelect) Aggregate ¶
func (es *EmployeeSelect) Aggregate(fns ...AggregateFunc) *EmployeeSelect
Aggregate adds the given aggregation functions to the selector query.
func (*EmployeeSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*EmployeeSelect) Scan ¶
func (es *EmployeeSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*EmployeeSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type EmployeeUpdate ¶
type EmployeeUpdate struct {
// contains filtered or unexported fields
}
EmployeeUpdate is the builder for updating Employee entities.
func (*EmployeeUpdate) AddAge ¶
func (eu *EmployeeUpdate) AddAge(i int32) *EmployeeUpdate
AddAge adds i to the "age" field.
func (*EmployeeUpdate) ClearAge ¶
func (eu *EmployeeUpdate) ClearAge() *EmployeeUpdate
ClearAge clears the value of the "age" field.
func (*EmployeeUpdate) Exec ¶
func (eu *EmployeeUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*EmployeeUpdate) ExecX ¶
func (eu *EmployeeUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeUpdate) Mutation ¶
func (eu *EmployeeUpdate) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeUpdate) Save ¶
func (eu *EmployeeUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*EmployeeUpdate) SaveX ¶
func (eu *EmployeeUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*EmployeeUpdate) SetAge ¶
func (eu *EmployeeUpdate) SetAge(i int32) *EmployeeUpdate
SetAge sets the "age" field.
func (*EmployeeUpdate) SetName ¶
func (eu *EmployeeUpdate) SetName(s string) *EmployeeUpdate
SetName sets the "name" field.
func (*EmployeeUpdate) SetNillableAge ¶
func (eu *EmployeeUpdate) SetNillableAge(i *int32) *EmployeeUpdate
SetNillableAge sets the "age" field if the given value is not nil.
func (*EmployeeUpdate) Where ¶
func (eu *EmployeeUpdate) Where(ps ...predicate.Employee) *EmployeeUpdate
Where appends a list predicates to the EmployeeUpdate builder.
type EmployeeUpdateOne ¶
type EmployeeUpdateOne struct {
// contains filtered or unexported fields
}
EmployeeUpdateOne is the builder for updating a single Employee entity.
func (*EmployeeUpdateOne) AddAge ¶
func (euo *EmployeeUpdateOne) AddAge(i int32) *EmployeeUpdateOne
AddAge adds i to the "age" field.
func (*EmployeeUpdateOne) ClearAge ¶
func (euo *EmployeeUpdateOne) ClearAge() *EmployeeUpdateOne
ClearAge clears the value of the "age" field.
func (*EmployeeUpdateOne) Exec ¶
func (euo *EmployeeUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*EmployeeUpdateOne) ExecX ¶
func (euo *EmployeeUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*EmployeeUpdateOne) Mutation ¶
func (euo *EmployeeUpdateOne) Mutation() *EmployeeMutation
Mutation returns the EmployeeMutation object of the builder.
func (*EmployeeUpdateOne) Save ¶
func (euo *EmployeeUpdateOne) Save(ctx context.Context) (*Employee, error)
Save executes the query and returns the updated Employee entity.
func (*EmployeeUpdateOne) SaveX ¶
func (euo *EmployeeUpdateOne) SaveX(ctx context.Context) *Employee
SaveX is like Save, but panics if an error occurs.
func (*EmployeeUpdateOne) Select ¶
func (euo *EmployeeUpdateOne) Select(field string, fields ...string) *EmployeeUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*EmployeeUpdateOne) SetAge ¶
func (euo *EmployeeUpdateOne) SetAge(i int32) *EmployeeUpdateOne
SetAge sets the "age" field.
func (*EmployeeUpdateOne) SetName ¶
func (euo *EmployeeUpdateOne) SetName(s string) *EmployeeUpdateOne
SetName sets the "name" field.
func (*EmployeeUpdateOne) SetNillableAge ¶
func (euo *EmployeeUpdateOne) SetNillableAge(i *int32) *EmployeeUpdateOne
SetNillableAge sets the "age" field if the given value is not nil.
func (*EmployeeUpdateOne) Where ¶
func (euo *EmployeeUpdateOne) Where(ps ...predicate.Employee) *EmployeeUpdateOne
Where appends a list predicates to the EmployeeUpdate builder.
type InterceptFunc ¶
type InterceptFunc = ent.InterceptFunc
ent aliases to avoid import conflicts in user's code.
type Interceptor ¶
type Interceptor = ent.Interceptor
ent aliases to avoid import conflicts in user's code.
type MutateFunc ¶
type MutateFunc = ent.MutateFunc
ent aliases to avoid import conflicts in user's code.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError returns when trying to fetch a specific entity and it was not found in the database.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error implements the error interface.
type NotLoadedError ¶
type NotLoadedError struct {
// contains filtered or unexported fields
}
NotLoadedError returns when trying to get a node that was not loaded by the query.
func (*NotLoadedError) Error ¶
func (e *NotLoadedError) Error() string
Error implements the error interface.
type NotSingularError ¶
type NotSingularError struct {
// contains filtered or unexported fields
}
NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.
func (*NotSingularError) Error ¶
func (e *NotSingularError) Error() string
Error implements the error interface.
type OrderFunc ¶
OrderFunc applies an ordering on the sql selector. Deprecated: Use Asc/Desc functions or the package builders instead.
type QuerierFunc ¶
type QuerierFunc = ent.QuerierFunc
ent aliases to avoid import conflicts in user's code.
type QueryContext ¶
type QueryContext = ent.QueryContext
ent aliases to avoid import conflicts in user's code.
type 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 Storage ¶
type Storage struct { // ID of the ent. ID uuid.UUID `json:"id,omitempty"` // Owner holds the value of the "owner" field. Owner string `json:"owner,omitempty"` // 0: DIR, 1:file Type int32 `json:"type,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"` // size Size int32 `json:"size,omitempty"` // LastModify holds the value of the "last_modify" field. LastModify time.Time `json:"last_modify,omitempty"` // ParentID holds the value of the "parent_id" field. ParentID string `json:"parent_id,omitempty"` // contains filtered or unexported fields }
Storage is the model entity for the Storage schema.
func (*Storage) Unwrap ¶
Unwrap unwraps the Storage 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 (*Storage) Update ¶
func (s *Storage) Update() *StorageUpdateOne
Update returns a builder for updating this Storage. Note that you need to call Storage.Unwrap() before calling this method if this Storage was returned from a transaction, and the transaction was committed or rolled back.
type StorageClient ¶
type StorageClient struct {
// contains filtered or unexported fields
}
StorageClient is a client for the Storage schema.
func NewStorageClient ¶
func NewStorageClient(c config) *StorageClient
NewStorageClient returns a client for the Storage from the given config.
func (*StorageClient) Create ¶
func (c *StorageClient) Create() *StorageCreate
Create returns a builder for creating a Storage entity.
func (*StorageClient) CreateBulk ¶
func (c *StorageClient) CreateBulk(builders ...*StorageCreate) *StorageCreateBulk
CreateBulk returns a builder for creating a bulk of Storage entities.
func (*StorageClient) Delete ¶
func (c *StorageClient) Delete() *StorageDelete
Delete returns a delete builder for Storage.
func (*StorageClient) DeleteOne ¶
func (c *StorageClient) DeleteOne(s *Storage) *StorageDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*StorageClient) DeleteOneID ¶
func (c *StorageClient) DeleteOneID(id uuid.UUID) *StorageDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*StorageClient) Hooks ¶
func (c *StorageClient) Hooks() []Hook
Hooks returns the client hooks.
func (*StorageClient) Intercept ¶
func (c *StorageClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `storage.Intercept(f(g(h())))`.
func (*StorageClient) Interceptors ¶
func (c *StorageClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*StorageClient) Query ¶
func (c *StorageClient) Query() *StorageQuery
Query returns a query builder for Storage.
func (*StorageClient) Update ¶
func (c *StorageClient) Update() *StorageUpdate
Update returns an update builder for Storage.
func (*StorageClient) UpdateOne ¶
func (c *StorageClient) UpdateOne(s *Storage) *StorageUpdateOne
UpdateOne returns an update builder for the given entity.
func (*StorageClient) UpdateOneID ¶
func (c *StorageClient) UpdateOneID(id uuid.UUID) *StorageUpdateOne
UpdateOneID returns an update builder for the given id.
func (*StorageClient) Use ¶
func (c *StorageClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `storage.Hooks(f(g(h())))`.
type StorageCreate ¶
type StorageCreate struct {
// contains filtered or unexported fields
}
StorageCreate is the builder for creating a Storage entity.
func (*StorageCreate) Exec ¶
func (sc *StorageCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageCreate) ExecX ¶
func (sc *StorageCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageCreate) Mutation ¶
func (sc *StorageCreate) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageCreate) Save ¶
func (sc *StorageCreate) Save(ctx context.Context) (*Storage, error)
Save creates the Storage in the database.
func (*StorageCreate) SaveX ¶
func (sc *StorageCreate) SaveX(ctx context.Context) *Storage
SaveX calls Save and panics if Save returns an error.
func (*StorageCreate) SetCid ¶
func (sc *StorageCreate) SetCid(s string) *StorageCreate
SetCid sets the "cid" field.
func (*StorageCreate) SetID ¶
func (sc *StorageCreate) SetID(u uuid.UUID) *StorageCreate
SetID sets the "id" field.
func (*StorageCreate) SetLastModify ¶
func (sc *StorageCreate) SetLastModify(t time.Time) *StorageCreate
SetLastModify sets the "last_modify" field.
func (*StorageCreate) SetName ¶
func (sc *StorageCreate) SetName(s string) *StorageCreate
SetName sets the "name" field.
func (*StorageCreate) SetNillableID ¶
func (sc *StorageCreate) SetNillableID(u *uuid.UUID) *StorageCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*StorageCreate) SetNillableLastModify ¶
func (sc *StorageCreate) SetNillableLastModify(t *time.Time) *StorageCreate
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageCreate) SetNillableType ¶
func (sc *StorageCreate) SetNillableType(i *int32) *StorageCreate
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageCreate) SetOwner ¶
func (sc *StorageCreate) SetOwner(s string) *StorageCreate
SetOwner sets the "owner" field.
func (*StorageCreate) SetParentID ¶
func (sc *StorageCreate) SetParentID(s string) *StorageCreate
SetParentID sets the "parent_id" field.
func (*StorageCreate) SetSize ¶
func (sc *StorageCreate) SetSize(i int32) *StorageCreate
SetSize sets the "size" field.
func (*StorageCreate) SetType ¶
func (sc *StorageCreate) SetType(i int32) *StorageCreate
SetType sets the "type" field.
type StorageCreateBulk ¶
type StorageCreateBulk struct {
// contains filtered or unexported fields
}
StorageCreateBulk is the builder for creating many Storage entities in bulk.
func (*StorageCreateBulk) Exec ¶
func (scb *StorageCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageCreateBulk) ExecX ¶
func (scb *StorageCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type StorageDelete ¶
type StorageDelete struct {
// contains filtered or unexported fields
}
StorageDelete is the builder for deleting a Storage entity.
func (*StorageDelete) Exec ¶
func (sd *StorageDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*StorageDelete) ExecX ¶
func (sd *StorageDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*StorageDelete) Where ¶
func (sd *StorageDelete) Where(ps ...predicate.Storage) *StorageDelete
Where appends a list predicates to the StorageDelete builder.
type StorageDeleteOne ¶
type StorageDeleteOne struct {
// contains filtered or unexported fields
}
StorageDeleteOne is the builder for deleting a single Storage entity.
func (*StorageDeleteOne) Exec ¶
func (sdo *StorageDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*StorageDeleteOne) ExecX ¶
func (sdo *StorageDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageDeleteOne) Where ¶
func (sdo *StorageDeleteOne) Where(ps ...predicate.Storage) *StorageDeleteOne
Where appends a list predicates to the StorageDelete builder.
type StorageGroupBy ¶
type StorageGroupBy struct {
// contains filtered or unexported fields
}
StorageGroupBy is the group-by builder for Storage entities.
func (*StorageGroupBy) Aggregate ¶
func (sgb *StorageGroupBy) Aggregate(fns ...AggregateFunc) *StorageGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*StorageGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StorageGroupBy) Scan ¶
func (sgb *StorageGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageMutation ¶
type StorageMutation struct {
// contains filtered or unexported fields
}
StorageMutation represents an operation that mutates the Storage nodes in the graph.
func (*StorageMutation) AddField ¶
func (m *StorageMutation) 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 (*StorageMutation) AddSize ¶
func (m *StorageMutation) AddSize(i int32)
AddSize adds i to the "size" field.
func (*StorageMutation) AddType ¶
func (m *StorageMutation) AddType(i int32)
AddType adds i to the "type" field.
func (*StorageMutation) AddedEdges ¶
func (m *StorageMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*StorageMutation) AddedField ¶
func (m *StorageMutation) 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 (*StorageMutation) AddedFields ¶
func (m *StorageMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*StorageMutation) AddedIDs ¶
func (m *StorageMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*StorageMutation) AddedSize ¶
func (m *StorageMutation) AddedSize() (r int32, exists bool)
AddedSize returns the value that was added to the "size" field in this mutation.
func (*StorageMutation) AddedType ¶
func (m *StorageMutation) AddedType() (r int32, exists bool)
AddedType returns the value that was added to the "type" field in this mutation.
func (*StorageMutation) Cid ¶
func (m *StorageMutation) Cid() (r string, exists bool)
Cid returns the value of the "cid" field in the mutation.
func (*StorageMutation) ClearEdge ¶
func (m *StorageMutation) 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 (*StorageMutation) ClearField ¶
func (m *StorageMutation) 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 (*StorageMutation) ClearedEdges ¶
func (m *StorageMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*StorageMutation) ClearedFields ¶
func (m *StorageMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (StorageMutation) Client ¶
func (m StorageMutation) 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 (*StorageMutation) EdgeCleared ¶
func (m *StorageMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*StorageMutation) Field ¶
func (m *StorageMutation) 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 (*StorageMutation) FieldCleared ¶
func (m *StorageMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*StorageMutation) Fields ¶
func (m *StorageMutation) 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 (*StorageMutation) GetType ¶
func (m *StorageMutation) GetType() (r int32, exists bool)
GetType returns the value of the "type" field in the mutation.
func (*StorageMutation) ID ¶
func (m *StorageMutation) ID() (id uuid.UUID, 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 (*StorageMutation) IDs ¶
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 (*StorageMutation) LastModify ¶
func (m *StorageMutation) LastModify() (r time.Time, exists bool)
LastModify returns the value of the "last_modify" field in the mutation.
func (*StorageMutation) Name ¶
func (m *StorageMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*StorageMutation) OldCid ¶
func (m *StorageMutation) OldCid(ctx context.Context) (v *string, err error)
OldCid returns the old "cid" field's value of the Storage entity. If the Storage 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 (*StorageMutation) 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 (*StorageMutation) OldLastModify ¶
OldLastModify returns the old "last_modify" field's value of the Storage entity. If the Storage 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 (*StorageMutation) OldName ¶
func (m *StorageMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the Storage entity. If the Storage 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 (*StorageMutation) OldOwner ¶
func (m *StorageMutation) OldOwner(ctx context.Context) (v string, err error)
OldOwner returns the old "owner" field's value of the Storage entity. If the Storage 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 (*StorageMutation) OldParentID ¶
func (m *StorageMutation) OldParentID(ctx context.Context) (v string, err error)
OldParentID returns the old "parent_id" field's value of the Storage entity. If the Storage 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 (*StorageMutation) OldSize ¶
func (m *StorageMutation) OldSize(ctx context.Context) (v int32, err error)
OldSize returns the old "size" field's value of the Storage entity. If the Storage 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 (*StorageMutation) OldType ¶
func (m *StorageMutation) OldType(ctx context.Context) (v int32, err error)
OldType returns the old "type" field's value of the Storage entity. If the Storage 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 (*StorageMutation) Owner ¶
func (m *StorageMutation) Owner() (r string, exists bool)
Owner returns the value of the "owner" field in the mutation.
func (*StorageMutation) ParentID ¶
func (m *StorageMutation) ParentID() (r string, exists bool)
ParentID returns the value of the "parent_id" field in the mutation.
func (*StorageMutation) RemovedEdges ¶
func (m *StorageMutation) RemovedEdges() []string
RemovedEdges returns all edge names that were removed in this mutation.
func (*StorageMutation) RemovedIDs ¶
func (m *StorageMutation) 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 (*StorageMutation) ResetCid ¶
func (m *StorageMutation) ResetCid()
ResetCid resets all changes to the "cid" field.
func (*StorageMutation) ResetEdge ¶
func (m *StorageMutation) 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 (*StorageMutation) ResetField ¶
func (m *StorageMutation) 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 (*StorageMutation) ResetLastModify ¶
func (m *StorageMutation) ResetLastModify()
ResetLastModify resets all changes to the "last_modify" field.
func (*StorageMutation) ResetName ¶
func (m *StorageMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*StorageMutation) ResetOwner ¶
func (m *StorageMutation) ResetOwner()
ResetOwner resets all changes to the "owner" field.
func (*StorageMutation) ResetParentID ¶
func (m *StorageMutation) ResetParentID()
ResetParentID resets all changes to the "parent_id" field.
func (*StorageMutation) ResetSize ¶
func (m *StorageMutation) ResetSize()
ResetSize resets all changes to the "size" field.
func (*StorageMutation) ResetType ¶
func (m *StorageMutation) ResetType()
ResetType resets all changes to the "type" field.
func (*StorageMutation) SetCid ¶
func (m *StorageMutation) SetCid(s string)
SetCid sets the "cid" field.
func (*StorageMutation) SetField ¶
func (m *StorageMutation) 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 (*StorageMutation) SetID ¶
func (m *StorageMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of Storage entities.
func (*StorageMutation) SetLastModify ¶
func (m *StorageMutation) SetLastModify(t time.Time)
SetLastModify sets the "last_modify" field.
func (*StorageMutation) SetName ¶
func (m *StorageMutation) SetName(s string)
SetName sets the "name" field.
func (*StorageMutation) SetOp ¶
func (m *StorageMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*StorageMutation) SetOwner ¶
func (m *StorageMutation) SetOwner(s string)
SetOwner sets the "owner" field.
func (*StorageMutation) SetParentID ¶
func (m *StorageMutation) SetParentID(s string)
SetParentID sets the "parent_id" field.
func (*StorageMutation) SetSize ¶
func (m *StorageMutation) SetSize(i int32)
SetSize sets the "size" field.
func (*StorageMutation) SetType ¶
func (m *StorageMutation) SetType(i int32)
SetType sets the "type" field.
func (*StorageMutation) Size ¶
func (m *StorageMutation) Size() (r int32, exists bool)
Size returns the value of the "size" field in the mutation.
func (StorageMutation) Tx ¶
func (m StorageMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*StorageMutation) Type ¶
func (m *StorageMutation) Type() string
Type returns the node type of this mutation (Storage).
func (*StorageMutation) Where ¶
func (m *StorageMutation) Where(ps ...predicate.Storage)
Where appends a list predicates to the StorageMutation builder.
func (*StorageMutation) WhereP ¶
func (m *StorageMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the StorageMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type StorageQuery ¶
type StorageQuery struct {
// contains filtered or unexported fields
}
StorageQuery is the builder for querying Storage entities.
func (*StorageQuery) Aggregate ¶
func (sq *StorageQuery) Aggregate(fns ...AggregateFunc) *StorageSelect
Aggregate returns a StorageSelect configured with the given aggregations.
func (*StorageQuery) All ¶
func (sq *StorageQuery) All(ctx context.Context) ([]*Storage, error)
All executes the query and returns a list of Storages.
func (*StorageQuery) AllX ¶
func (sq *StorageQuery) AllX(ctx context.Context) []*Storage
AllX is like All, but panics if an error occurs.
func (*StorageQuery) Clone ¶
func (sq *StorageQuery) Clone() *StorageQuery
Clone returns a duplicate of the StorageQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.
func (*StorageQuery) Count ¶
func (sq *StorageQuery) Count(ctx context.Context) (int, error)
Count returns the count of the given query.
func (*StorageQuery) CountX ¶
func (sq *StorageQuery) CountX(ctx context.Context) int
CountX is like Count, but panics if an error occurs.
func (*StorageQuery) Exist ¶
func (sq *StorageQuery) Exist(ctx context.Context) (bool, error)
Exist returns true if the query has elements in the graph.
func (*StorageQuery) ExistX ¶
func (sq *StorageQuery) ExistX(ctx context.Context) bool
ExistX is like Exist, but panics if an error occurs.
func (*StorageQuery) First ¶
func (sq *StorageQuery) First(ctx context.Context) (*Storage, error)
First returns the first Storage entity from the query. Returns a *NotFoundError when no Storage was found.
func (*StorageQuery) FirstID ¶
FirstID returns the first Storage ID from the query. Returns a *NotFoundError when no Storage ID was found.
func (*StorageQuery) FirstIDX ¶
func (sq *StorageQuery) FirstIDX(ctx context.Context) uuid.UUID
FirstIDX is like FirstID, but panics if an error occurs.
func (*StorageQuery) FirstX ¶
func (sq *StorageQuery) FirstX(ctx context.Context) *Storage
FirstX is like First, but panics if an error occurs.
func (*StorageQuery) GroupBy ¶
func (sq *StorageQuery) GroupBy(field string, fields ...string) *StorageGroupBy
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 { Owner string `json:"owner,omitempty"` Count int `json:"count,omitempty"` } client.Storage.Query(). GroupBy(storage.FieldOwner). Aggregate(ent.Count()). Scan(ctx, &v)
func (*StorageQuery) IDsX ¶
func (sq *StorageQuery) IDsX(ctx context.Context) []uuid.UUID
IDsX is like IDs, but panics if an error occurs.
func (*StorageQuery) Limit ¶
func (sq *StorageQuery) Limit(limit int) *StorageQuery
Limit the number of records to be returned by this query.
func (*StorageQuery) Offset ¶
func (sq *StorageQuery) Offset(offset int) *StorageQuery
Offset to start from.
func (*StorageQuery) Only ¶
func (sq *StorageQuery) Only(ctx context.Context) (*Storage, error)
Only returns a single Storage entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Storage entity is found. Returns a *NotFoundError when no Storage entities are found.
func (*StorageQuery) OnlyID ¶
OnlyID is like Only, but returns the only Storage ID in the query. Returns a *NotSingularError when more than one Storage ID is found. Returns a *NotFoundError when no entities are found.
func (*StorageQuery) OnlyIDX ¶
func (sq *StorageQuery) OnlyIDX(ctx context.Context) uuid.UUID
OnlyIDX is like OnlyID, but panics if an error occurs.
func (*StorageQuery) OnlyX ¶
func (sq *StorageQuery) OnlyX(ctx context.Context) *Storage
OnlyX is like Only, but panics if an error occurs.
func (*StorageQuery) Order ¶
func (sq *StorageQuery) Order(o ...storage.OrderOption) *StorageQuery
Order specifies how the records should be ordered.
func (*StorageQuery) Select ¶
func (sq *StorageQuery) Select(fields ...string) *StorageSelect
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 { Owner string `json:"owner,omitempty"` } client.Storage.Query(). Select(storage.FieldOwner). Scan(ctx, &v)
func (*StorageQuery) Unique ¶
func (sq *StorageQuery) Unique(unique bool) *StorageQuery
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 (*StorageQuery) Where ¶
func (sq *StorageQuery) Where(ps ...predicate.Storage) *StorageQuery
Where adds a new predicate for the StorageQuery builder.
type StorageSelect ¶
type StorageSelect struct { *StorageQuery // contains filtered or unexported fields }
StorageSelect is the builder for selecting fields of Storage entities.
func (*StorageSelect) Aggregate ¶
func (ss *StorageSelect) Aggregate(fns ...AggregateFunc) *StorageSelect
Aggregate adds the given aggregation functions to the selector query.
func (*StorageSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*StorageSelect) Scan ¶
func (ss *StorageSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*StorageSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type StorageUpdate ¶
type StorageUpdate struct {
// contains filtered or unexported fields
}
StorageUpdate is the builder for updating Storage entities.
func (*StorageUpdate) AddSize ¶
func (su *StorageUpdate) AddSize(i int32) *StorageUpdate
AddSize adds i to the "size" field.
func (*StorageUpdate) AddType ¶
func (su *StorageUpdate) AddType(i int32) *StorageUpdate
AddType adds i to the "type" field.
func (*StorageUpdate) Exec ¶
func (su *StorageUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*StorageUpdate) ExecX ¶
func (su *StorageUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageUpdate) Mutation ¶
func (su *StorageUpdate) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageUpdate) Save ¶
func (su *StorageUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*StorageUpdate) SaveX ¶
func (su *StorageUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*StorageUpdate) SetCid ¶
func (su *StorageUpdate) SetCid(s string) *StorageUpdate
SetCid sets the "cid" field.
func (*StorageUpdate) SetLastModify ¶
func (su *StorageUpdate) SetLastModify(t time.Time) *StorageUpdate
SetLastModify sets the "last_modify" field.
func (*StorageUpdate) SetName ¶
func (su *StorageUpdate) SetName(s string) *StorageUpdate
SetName sets the "name" field.
func (*StorageUpdate) SetNillableLastModify ¶
func (su *StorageUpdate) SetNillableLastModify(t *time.Time) *StorageUpdate
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageUpdate) SetNillableType ¶
func (su *StorageUpdate) SetNillableType(i *int32) *StorageUpdate
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageUpdate) SetOwner ¶
func (su *StorageUpdate) SetOwner(s string) *StorageUpdate
SetOwner sets the "owner" field.
func (*StorageUpdate) SetParentID ¶
func (su *StorageUpdate) SetParentID(s string) *StorageUpdate
SetParentID sets the "parent_id" field.
func (*StorageUpdate) SetSize ¶
func (su *StorageUpdate) SetSize(i int32) *StorageUpdate
SetSize sets the "size" field.
func (*StorageUpdate) SetType ¶
func (su *StorageUpdate) SetType(i int32) *StorageUpdate
SetType sets the "type" field.
func (*StorageUpdate) Where ¶
func (su *StorageUpdate) Where(ps ...predicate.Storage) *StorageUpdate
Where appends a list predicates to the StorageUpdate builder.
type StorageUpdateOne ¶
type StorageUpdateOne struct {
// contains filtered or unexported fields
}
StorageUpdateOne is the builder for updating a single Storage entity.
func (*StorageUpdateOne) AddSize ¶
func (suo *StorageUpdateOne) AddSize(i int32) *StorageUpdateOne
AddSize adds i to the "size" field.
func (*StorageUpdateOne) AddType ¶
func (suo *StorageUpdateOne) AddType(i int32) *StorageUpdateOne
AddType adds i to the "type" field.
func (*StorageUpdateOne) Exec ¶
func (suo *StorageUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*StorageUpdateOne) ExecX ¶
func (suo *StorageUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*StorageUpdateOne) Mutation ¶
func (suo *StorageUpdateOne) Mutation() *StorageMutation
Mutation returns the StorageMutation object of the builder.
func (*StorageUpdateOne) Save ¶
func (suo *StorageUpdateOne) Save(ctx context.Context) (*Storage, error)
Save executes the query and returns the updated Storage entity.
func (*StorageUpdateOne) SaveX ¶
func (suo *StorageUpdateOne) SaveX(ctx context.Context) *Storage
SaveX is like Save, but panics if an error occurs.
func (*StorageUpdateOne) Select ¶
func (suo *StorageUpdateOne) Select(field string, fields ...string) *StorageUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*StorageUpdateOne) SetCid ¶
func (suo *StorageUpdateOne) SetCid(s string) *StorageUpdateOne
SetCid sets the "cid" field.
func (*StorageUpdateOne) SetLastModify ¶
func (suo *StorageUpdateOne) SetLastModify(t time.Time) *StorageUpdateOne
SetLastModify sets the "last_modify" field.
func (*StorageUpdateOne) SetName ¶
func (suo *StorageUpdateOne) SetName(s string) *StorageUpdateOne
SetName sets the "name" field.
func (*StorageUpdateOne) SetNillableLastModify ¶
func (suo *StorageUpdateOne) SetNillableLastModify(t *time.Time) *StorageUpdateOne
SetNillableLastModify sets the "last_modify" field if the given value is not nil.
func (*StorageUpdateOne) SetNillableType ¶
func (suo *StorageUpdateOne) SetNillableType(i *int32) *StorageUpdateOne
SetNillableType sets the "type" field if the given value is not nil.
func (*StorageUpdateOne) SetOwner ¶
func (suo *StorageUpdateOne) SetOwner(s string) *StorageUpdateOne
SetOwner sets the "owner" field.
func (*StorageUpdateOne) SetParentID ¶
func (suo *StorageUpdateOne) SetParentID(s string) *StorageUpdateOne
SetParentID sets the "parent_id" field.
func (*StorageUpdateOne) SetSize ¶
func (suo *StorageUpdateOne) SetSize(i int32) *StorageUpdateOne
SetSize sets the "size" field.
func (*StorageUpdateOne) SetType ¶
func (suo *StorageUpdateOne) SetType(i int32) *StorageUpdateOne
SetType sets the "type" field.
func (*StorageUpdateOne) Where ¶
func (suo *StorageUpdateOne) Where(ps ...predicate.Storage) *StorageUpdateOne
Where appends a list predicates to the StorageUpdate builder.
type TraverseFunc ¶
type TraverseFunc = ent.TraverseFunc
ent aliases to avoid import conflicts in user's code.
type Tx ¶
type Tx struct { // Agent is the client for interacting with the Agent builders. Agent *AgentClient // ComputeImage is the client for interacting with the ComputeImage builders. ComputeImage *ComputeImageClient // ComputeInstance is the client for interacting with the ComputeInstance builders. ComputeInstance *ComputeInstanceClient // ComputeSpec is the client for interacting with the ComputeSpec builders. ComputeSpec *ComputeSpecClient // Employee is the client for interacting with the Employee builders. Employee *EmployeeClient // Storage is the client for interacting with the Storage builders. Storage *StorageClient // 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 uuid.UUID `json:"id,omitempty"` // CountryCallCoding holds the value of the "country_call_coding" field. CountryCallCoding string `json:"country_call_coding,omitempty"` // TelephoneNumber holds the value of the "telephone_number" field. TelephoneNumber string `json:"telephone_number,omitempty"` // Password holds the value of the "password" field. Password string `json:"password,omitempty"` // CreateDate holds the value of the "create_date" field. CreateDate time.Time `json:"create_date,omitempty"` // LastLoginDate holds the value of the "last_login_date" field. LastLoginDate time.Time `json:"last_login_date,omitempty"` // 用户名 Name string `json:"name,omitempty"` // 头像地址 Icon string `json:"icon,omitempty"` // contains filtered or unexported fields }
User is the model entity for the User schema.
func (*User) Unwrap ¶
Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.
func (*User) Update ¶
func (u *User) Update() *UserUpdateOne
Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.
type UserClient ¶
type UserClient struct {
// contains filtered or unexported fields
}
UserClient is a client for the User schema.
func NewUserClient ¶
func NewUserClient(c config) *UserClient
NewUserClient returns a client for the User from the given config.
func (*UserClient) Create ¶
func (c *UserClient) Create() *UserCreate
Create returns a builder for creating a User entity.
func (*UserClient) CreateBulk ¶
func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk
CreateBulk returns a builder for creating a bulk of User entities.
func (*UserClient) Delete ¶
func (c *UserClient) Delete() *UserDelete
Delete returns a delete builder for User.
func (*UserClient) DeleteOne ¶
func (c *UserClient) DeleteOne(u *User) *UserDeleteOne
DeleteOne returns a builder for deleting the given entity.
func (*UserClient) DeleteOneID ¶
func (c *UserClient) DeleteOneID(id uuid.UUID) *UserDeleteOne
DeleteOneID returns a builder for deleting the given entity by its id.
func (*UserClient) Intercept ¶
func (c *UserClient) Intercept(interceptors ...Interceptor)
Intercept adds a list of query interceptors to the interceptors stack. A call to `Intercept(f, g, h)` equals to `user.Intercept(f(g(h())))`.
func (*UserClient) Interceptors ¶
func (c *UserClient) Interceptors() []Interceptor
Interceptors returns the client interceptors.
func (*UserClient) Query ¶
func (c *UserClient) Query() *UserQuery
Query returns a query builder for User.
func (*UserClient) Update ¶
func (c *UserClient) Update() *UserUpdate
Update returns an update builder for User.
func (*UserClient) UpdateOne ¶
func (c *UserClient) UpdateOne(u *User) *UserUpdateOne
UpdateOne returns an update builder for the given entity.
func (*UserClient) UpdateOneID ¶
func (c *UserClient) UpdateOneID(id uuid.UUID) *UserUpdateOne
UpdateOneID returns an update builder for the given id.
func (*UserClient) Use ¶
func (c *UserClient) Use(hooks ...Hook)
Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.
type UserCreate ¶
type UserCreate struct {
// contains filtered or unexported fields
}
UserCreate is the builder for creating a User entity.
func (*UserCreate) Exec ¶
func (uc *UserCreate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreate) ExecX ¶
func (uc *UserCreate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserCreate) Mutation ¶
func (uc *UserCreate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserCreate) Save ¶
func (uc *UserCreate) Save(ctx context.Context) (*User, error)
Save creates the User in the database.
func (*UserCreate) SaveX ¶
func (uc *UserCreate) SaveX(ctx context.Context) *User
SaveX calls Save and panics if Save returns an error.
func (*UserCreate) SetCountryCallCoding ¶
func (uc *UserCreate) SetCountryCallCoding(s string) *UserCreate
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserCreate) SetCreateDate ¶
func (uc *UserCreate) SetCreateDate(t time.Time) *UserCreate
SetCreateDate sets the "create_date" field.
func (*UserCreate) SetID ¶
func (uc *UserCreate) SetID(u uuid.UUID) *UserCreate
SetID sets the "id" field.
func (*UserCreate) SetIcon ¶
func (uc *UserCreate) SetIcon(s string) *UserCreate
SetIcon sets the "icon" field.
func (*UserCreate) SetLastLoginDate ¶
func (uc *UserCreate) SetLastLoginDate(t time.Time) *UserCreate
SetLastLoginDate sets the "last_login_date" field.
func (*UserCreate) SetName ¶
func (uc *UserCreate) SetName(s string) *UserCreate
SetName sets the "name" field.
func (*UserCreate) SetNillableCreateDate ¶
func (uc *UserCreate) SetNillableCreateDate(t *time.Time) *UserCreate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserCreate) SetNillableID ¶
func (uc *UserCreate) SetNillableID(u *uuid.UUID) *UserCreate
SetNillableID sets the "id" field if the given value is not nil.
func (*UserCreate) SetNillableLastLoginDate ¶
func (uc *UserCreate) SetNillableLastLoginDate(t *time.Time) *UserCreate
SetNillableLastLoginDate sets the "last_login_date" 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) SetTelephoneNumber ¶
func (uc *UserCreate) SetTelephoneNumber(s string) *UserCreate
SetTelephoneNumber sets the "telephone_number" field.
type UserCreateBulk ¶
type UserCreateBulk struct {
// contains filtered or unexported fields
}
UserCreateBulk is the builder for creating many User entities in bulk.
func (*UserCreateBulk) Exec ¶
func (ucb *UserCreateBulk) Exec(ctx context.Context) error
Exec executes the query.
func (*UserCreateBulk) ExecX ¶
func (ucb *UserCreateBulk) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
type UserDelete ¶
type UserDelete struct {
// contains filtered or unexported fields
}
UserDelete is the builder for deleting a User entity.
func (*UserDelete) Exec ¶
func (ud *UserDelete) Exec(ctx context.Context) (int, error)
Exec executes the deletion query and returns how many vertices were deleted.
func (*UserDelete) ExecX ¶
func (ud *UserDelete) ExecX(ctx context.Context) int
ExecX is like Exec, but panics if an error occurs.
func (*UserDelete) Where ¶
func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete
Where appends a list predicates to the UserDelete builder.
type UserDeleteOne ¶
type UserDeleteOne struct {
// contains filtered or unexported fields
}
UserDeleteOne is the builder for deleting a single User entity.
func (*UserDeleteOne) Exec ¶
func (udo *UserDeleteOne) Exec(ctx context.Context) error
Exec executes the deletion query.
func (*UserDeleteOne) ExecX ¶
func (udo *UserDeleteOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserDeleteOne) Where ¶
func (udo *UserDeleteOne) Where(ps ...predicate.User) *UserDeleteOne
Where appends a list predicates to the UserDelete builder.
type UserGroupBy ¶
type UserGroupBy struct {
// contains filtered or unexported fields
}
UserGroupBy is the group-by builder for User entities.
func (*UserGroupBy) Aggregate ¶
func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy
Aggregate adds the given aggregation functions to the group-by query.
func (*UserGroupBy) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserGroupBy) Scan ¶
func (ugb *UserGroupBy) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserGroupBy) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserMutation ¶
type UserMutation struct {
// contains filtered or unexported fields
}
UserMutation represents an operation that mutates the User nodes in the graph.
func (*UserMutation) AddField ¶
func (m *UserMutation) AddField(name string, value ent.Value) error
AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) AddedEdges ¶
func (m *UserMutation) AddedEdges() []string
AddedEdges returns all edge names that were set/added in this mutation.
func (*UserMutation) AddedField ¶
func (m *UserMutation) AddedField(name string) (ent.Value, bool)
AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) AddedFields ¶
func (m *UserMutation) AddedFields() []string
AddedFields returns all numeric fields that were incremented/decremented during this mutation.
func (*UserMutation) AddedIDs ¶
func (m *UserMutation) AddedIDs(name string) []ent.Value
AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.
func (*UserMutation) ClearEdge ¶
func (m *UserMutation) ClearEdge(name string) error
ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.
func (*UserMutation) ClearField ¶
func (m *UserMutation) ClearField(name string) error
ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ClearedEdges ¶
func (m *UserMutation) ClearedEdges() []string
ClearedEdges returns all edge names that were cleared in this mutation.
func (*UserMutation) ClearedFields ¶
func (m *UserMutation) ClearedFields() []string
ClearedFields returns all nullable fields that were cleared during this mutation.
func (UserMutation) Client ¶
func (m UserMutation) Client() *Client
Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.
func (*UserMutation) CountryCallCoding ¶
func (m *UserMutation) CountryCallCoding() (r string, exists bool)
CountryCallCoding returns the value of the "country_call_coding" field in the mutation.
func (*UserMutation) CreateDate ¶
func (m *UserMutation) CreateDate() (r time.Time, exists bool)
CreateDate returns the value of the "create_date" field in the mutation.
func (*UserMutation) EdgeCleared ¶
func (m *UserMutation) EdgeCleared(name string) bool
EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.
func (*UserMutation) Field ¶
func (m *UserMutation) Field(name string) (ent.Value, bool)
Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.
func (*UserMutation) FieldCleared ¶
func (m *UserMutation) FieldCleared(name string) bool
FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.
func (*UserMutation) Fields ¶
func (m *UserMutation) Fields() []string
Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().
func (*UserMutation) ID ¶
func (m *UserMutation) ID() (id uuid.UUID, 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 ¶
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) Icon ¶
func (m *UserMutation) Icon() (r string, exists bool)
Icon returns the value of the "icon" field in the mutation.
func (*UserMutation) LastLoginDate ¶
func (m *UserMutation) LastLoginDate() (r time.Time, exists bool)
LastLoginDate returns the value of the "last_login_date" field in the mutation.
func (*UserMutation) Name ¶
func (m *UserMutation) Name() (r string, exists bool)
Name returns the value of the "name" field in the mutation.
func (*UserMutation) OldCountryCallCoding ¶
func (m *UserMutation) OldCountryCallCoding(ctx context.Context) (v string, err error)
OldCountryCallCoding returns the old "country_call_coding" 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) OldCreateDate ¶
OldCreateDate returns the old "create_date" 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) OldIcon ¶
func (m *UserMutation) OldIcon(ctx context.Context) (v string, err error)
OldIcon returns the old "icon" 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) OldLastLoginDate ¶
OldLastLoginDate returns the old "last_login_date" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) OldName ¶
func (m *UserMutation) OldName(ctx context.Context) (v string, err error)
OldName returns the old "name" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.
func (*UserMutation) 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) OldTelephoneNumber ¶
func (m *UserMutation) OldTelephoneNumber(ctx context.Context) (v string, err error)
OldTelephoneNumber returns the old "telephone_number" 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) 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) ResetCountryCallCoding ¶
func (m *UserMutation) ResetCountryCallCoding()
ResetCountryCallCoding resets all changes to the "country_call_coding" field.
func (*UserMutation) ResetCreateDate ¶
func (m *UserMutation) ResetCreateDate()
ResetCreateDate resets all changes to the "create_date" field.
func (*UserMutation) ResetEdge ¶
func (m *UserMutation) ResetEdge(name string) error
ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.
func (*UserMutation) ResetField ¶
func (m *UserMutation) ResetField(name string) error
ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.
func (*UserMutation) ResetIcon ¶
func (m *UserMutation) ResetIcon()
ResetIcon resets all changes to the "icon" field.
func (*UserMutation) ResetLastLoginDate ¶
func (m *UserMutation) ResetLastLoginDate()
ResetLastLoginDate resets all changes to the "last_login_date" field.
func (*UserMutation) ResetName ¶
func (m *UserMutation) ResetName()
ResetName resets all changes to the "name" field.
func (*UserMutation) ResetPassword ¶
func (m *UserMutation) ResetPassword()
ResetPassword resets all changes to the "password" field.
func (*UserMutation) ResetTelephoneNumber ¶
func (m *UserMutation) ResetTelephoneNumber()
ResetTelephoneNumber resets all changes to the "telephone_number" field.
func (*UserMutation) SetCountryCallCoding ¶
func (m *UserMutation) SetCountryCallCoding(s string)
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserMutation) SetCreateDate ¶
func (m *UserMutation) SetCreateDate(t time.Time)
SetCreateDate sets the "create_date" field.
func (*UserMutation) SetField ¶
func (m *UserMutation) SetField(name string, value ent.Value) error
SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.
func (*UserMutation) SetID ¶
func (m *UserMutation) SetID(id uuid.UUID)
SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.
func (*UserMutation) SetIcon ¶
func (m *UserMutation) SetIcon(s string)
SetIcon sets the "icon" field.
func (*UserMutation) SetLastLoginDate ¶
func (m *UserMutation) SetLastLoginDate(t time.Time)
SetLastLoginDate sets the "last_login_date" field.
func (*UserMutation) SetName ¶
func (m *UserMutation) SetName(s string)
SetName sets the "name" field.
func (*UserMutation) SetOp ¶
func (m *UserMutation) SetOp(op Op)
SetOp allows setting the mutation operation.
func (*UserMutation) SetPassword ¶
func (m *UserMutation) SetPassword(s string)
SetPassword sets the "password" field.
func (*UserMutation) SetTelephoneNumber ¶
func (m *UserMutation) SetTelephoneNumber(s string)
SetTelephoneNumber sets the "telephone_number" field.
func (*UserMutation) TelephoneNumber ¶
func (m *UserMutation) TelephoneNumber() (r string, exists bool)
TelephoneNumber returns the value of the "telephone_number" field in the mutation.
func (UserMutation) Tx ¶
func (m UserMutation) Tx() (*Tx, error)
Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.
func (*UserMutation) Type ¶
func (m *UserMutation) Type() string
Type returns the node type of this mutation (User).
func (*UserMutation) Where ¶
func (m *UserMutation) Where(ps ...predicate.User)
Where appends a list predicates to the UserMutation builder.
func (*UserMutation) WhereP ¶
func (m *UserMutation) WhereP(ps ...func(*sql.Selector))
WhereP appends storage-level predicates to the UserMutation builder. Using this method, users can use type-assertion to append predicates that do not depend on any generated package.
type 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 { CountryCallCoding string `json:"country_call_coding,omitempty"` Count int `json:"count,omitempty"` } client.User.Query(). GroupBy(user.FieldCountryCallCoding). Aggregate(ent.Count()). Scan(ctx, &v)
func (*UserQuery) Only ¶
Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.
func (*UserQuery) OnlyID ¶
OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.
func (*UserQuery) Order ¶
func (uq *UserQuery) Order(o ...user.OrderOption) *UserQuery
Order specifies how the records should be ordered.
func (*UserQuery) Select ¶
func (uq *UserQuery) Select(fields ...string) *UserSelect
Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.
Example:
var v []struct { CountryCallCoding string `json:"country_call_coding,omitempty"` } client.User.Query(). Select(user.FieldCountryCallCoding). Scan(ctx, &v)
type UserSelect ¶
type UserSelect struct { *UserQuery // contains filtered or unexported fields }
UserSelect is the builder for selecting fields of User entities.
func (*UserSelect) Aggregate ¶
func (us *UserSelect) Aggregate(fns ...AggregateFunc) *UserSelect
Aggregate adds the given aggregation functions to the selector query.
func (*UserSelect) Bool ¶
Bool returns a single bool from a selector. It is only allowed when selecting one field.
func (*UserSelect) Bools ¶
Bools returns list of bools from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64 ¶
Float64 returns a single float64 from a selector. It is only allowed when selecting one field.
func (*UserSelect) Float64s ¶
Float64s returns list of float64s from a selector. It is only allowed when selecting one field.
func (*UserSelect) Int ¶
Int returns a single int from a selector. It is only allowed when selecting one field.
func (*UserSelect) Ints ¶
Ints returns list of ints from a selector. It is only allowed when selecting one field.
func (*UserSelect) Scan ¶
func (us *UserSelect) Scan(ctx context.Context, v any) error
Scan applies the selector query and scans the result into the given value.
func (*UserSelect) String ¶
String returns a single string from a selector. It is only allowed when selecting one field.
type UserUpdate ¶
type UserUpdate struct {
// contains filtered or unexported fields
}
UserUpdate is the builder for updating User entities.
func (*UserUpdate) Exec ¶
func (uu *UserUpdate) Exec(ctx context.Context) error
Exec executes the query.
func (*UserUpdate) ExecX ¶
func (uu *UserUpdate) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdate) Mutation ¶
func (uu *UserUpdate) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdate) Save ¶
func (uu *UserUpdate) Save(ctx context.Context) (int, error)
Save executes the query and returns the number of nodes affected by the update operation.
func (*UserUpdate) SaveX ¶
func (uu *UserUpdate) SaveX(ctx context.Context) int
SaveX is like Save, but panics if an error occurs.
func (*UserUpdate) SetCountryCallCoding ¶
func (uu *UserUpdate) SetCountryCallCoding(s string) *UserUpdate
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserUpdate) SetCreateDate ¶
func (uu *UserUpdate) SetCreateDate(t time.Time) *UserUpdate
SetCreateDate sets the "create_date" field.
func (*UserUpdate) SetIcon ¶
func (uu *UserUpdate) SetIcon(s string) *UserUpdate
SetIcon sets the "icon" field.
func (*UserUpdate) SetLastLoginDate ¶
func (uu *UserUpdate) SetLastLoginDate(t time.Time) *UserUpdate
SetLastLoginDate sets the "last_login_date" field.
func (*UserUpdate) SetName ¶
func (uu *UserUpdate) SetName(s string) *UserUpdate
SetName sets the "name" field.
func (*UserUpdate) SetNillableCreateDate ¶
func (uu *UserUpdate) SetNillableCreateDate(t *time.Time) *UserUpdate
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdate) SetNillableLastLoginDate ¶
func (uu *UserUpdate) SetNillableLastLoginDate(t *time.Time) *UserUpdate
SetNillableLastLoginDate sets the "last_login_date" 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) SetTelephoneNumber ¶
func (uu *UserUpdate) SetTelephoneNumber(s string) *UserUpdate
SetTelephoneNumber sets the "telephone_number" field.
func (*UserUpdate) Where ¶
func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate
Where appends a list predicates to the UserUpdate builder.
type UserUpdateOne ¶
type UserUpdateOne struct {
// contains filtered or unexported fields
}
UserUpdateOne is the builder for updating a single User entity.
func (*UserUpdateOne) Exec ¶
func (uuo *UserUpdateOne) Exec(ctx context.Context) error
Exec executes the query on the entity.
func (*UserUpdateOne) ExecX ¶
func (uuo *UserUpdateOne) ExecX(ctx context.Context)
ExecX is like Exec, but panics if an error occurs.
func (*UserUpdateOne) Mutation ¶
func (uuo *UserUpdateOne) Mutation() *UserMutation
Mutation returns the UserMutation object of the builder.
func (*UserUpdateOne) Save ¶
func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)
Save executes the query and returns the updated User entity.
func (*UserUpdateOne) SaveX ¶
func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User
SaveX is like Save, but panics if an error occurs.
func (*UserUpdateOne) Select ¶
func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne
Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.
func (*UserUpdateOne) SetCountryCallCoding ¶
func (uuo *UserUpdateOne) SetCountryCallCoding(s string) *UserUpdateOne
SetCountryCallCoding sets the "country_call_coding" field.
func (*UserUpdateOne) SetCreateDate ¶
func (uuo *UserUpdateOne) SetCreateDate(t time.Time) *UserUpdateOne
SetCreateDate sets the "create_date" field.
func (*UserUpdateOne) SetIcon ¶
func (uuo *UserUpdateOne) SetIcon(s string) *UserUpdateOne
SetIcon sets the "icon" field.
func (*UserUpdateOne) SetLastLoginDate ¶
func (uuo *UserUpdateOne) SetLastLoginDate(t time.Time) *UserUpdateOne
SetLastLoginDate sets the "last_login_date" field.
func (*UserUpdateOne) SetName ¶
func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne
SetName sets the "name" field.
func (*UserUpdateOne) SetNillableCreateDate ¶
func (uuo *UserUpdateOne) SetNillableCreateDate(t *time.Time) *UserUpdateOne
SetNillableCreateDate sets the "create_date" field if the given value is not nil.
func (*UserUpdateOne) SetNillableLastLoginDate ¶
func (uuo *UserUpdateOne) SetNillableLastLoginDate(t *time.Time) *UserUpdateOne
SetNillableLastLoginDate sets the "last_login_date" 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) SetTelephoneNumber ¶
func (uuo *UserUpdateOne) SetTelephoneNumber(s string) *UserUpdateOne
SetTelephoneNumber sets the "telephone_number" 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 ¶
- agent.go
- agent_create.go
- agent_delete.go
- agent_query.go
- agent_update.go
- client.go
- computeimage.go
- computeimage_create.go
- computeimage_delete.go
- computeimage_query.go
- computeimage_update.go
- computeinstance.go
- computeinstance_create.go
- computeinstance_delete.go
- computeinstance_query.go
- computeinstance_update.go
- computespec.go
- computespec_create.go
- computespec_delete.go
- computespec_query.go
- computespec_update.go
- employee.go
- employee_create.go
- employee_delete.go
- employee_query.go
- employee_update.go
- ent.go
- generate.go
- mutation.go
- runtime.go
- storage.go
- storage_create.go
- storage_delete.go
- storage_query.go
- storage_update.go
- tx.go
- user.go
- user_create.go
- user_delete.go
- user_query.go
- user_update.go